Instruction execution effect verification method and device, equipment and medium
By automatically parsing the source instruction content and generating verification instructions, the problem of low efficiency in manually writing verification scripts in existing technologies has been solved, enabling efficient and accurate script verification for fintech and healthcare businesses.
Patent Information
- Application Number
- CN202511043616.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-07
AI Technical Summary
Current technologies rely on manual script verification, which is inefficient, error-prone, and lacks a mechanism to automatically generate verification instructions for different script contents, making it difficult to meet the high requirements of fintech and healthcare businesses.
By acquiring the source instruction to be verified, parsing the operation keywords and operation targets, matching the type definition, generating verification conditions, and executing the verification instruction, an automated script verification process is achieved.
This improves the efficiency and accuracy of script verification, reduces the need for manual intervention, and ensures system stability and data security.
Smart Images

Figure CN120909651A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of infrastructure operation and maintenance, and particularly relates to a command execution effect verification method and device, equipment and a storage medium. BACKGROUND
[0002] In the existing technical field of infrastructure operation and maintenance, especially in the process of database operation and maintenance management, the verification work for various scripts is usually dependent on a large number of manual operations. In the project development process, in order to meet the needs of different business systems, a large number of database scripts need to be written, such as scripts for data structure adjustment, permission configuration or data initialization. These scripts must be strictly verified before being officially released to the production environment to ensure that they will not affect the stability of the system and the security of the data. However, due to the large number of scripts and the complexity of the script content, the traditional manual writing of verification scripts is not only a huge workload and low efficiency, but also prone to incomplete verification due to human error, which has a high risk of error and brings hidden dangers to the system operation.
[0003] In the field of financial technology business, the number and complexity of database scripts are particularly prominent. With the continuous expansion of business needs of the financial system, the data structure involving account information, transaction data, permission control and other dimensions frequently changes, and the correctness of the data structure and data content needs to be repeatedly verified in the release link. The traditional way of manually writing verification scripts one by one not only consumes time and effort, but also easily misses key verification points, especially in the face of high concurrency and sensitive data in the financial environment, incomplete script verification can easily lead to system vulnerabilities or data anomalies, seriously affecting the stability of the system and data compliance.
[0004] In the field of medical and health business, the data system carries key data such as patient information, medical records and permission management, and there are also a large number of structure changes and permission adjustment requirements. Especially in the process of upgrading medical information systems, adjusting data structures or modifying permission configurations, the correctness of database scripts is directly related to the integrity of medical data and the security of the system. However, in the existing technology, the process of verifying these scripts still mainly relies on manual methods, which has the problems of low efficiency, low accuracy, easy omission of verification steps, etc., and the medical industry has more stringent requirements for data security and system stability, which makes it difficult for the traditional script verification method to meet the actual operation and maintenance needs. SUMMARY
[0005] The main purpose of the present application is to provide a command execution effect verification method, device, equipment and storage medium, which aims to solve the technical problems in the prior art that script verification relies on manual writing of verification scripts, which is low in efficiency, prone to errors, and lacks a mechanism for automatically generating verification instructions for different script contents.
[0006] To achieve the above object, the present application provides a kind of instruction execution effect verification method, comprising:
[0007] The source instruction to be verified is obtained, and the source instruction is parsed, and the operation keyword and operation target in the source instruction are extracted;
[0008] The operation keyword is matched with the type definition of pre-set, and the operation type of the source instruction is determined;
[0009] According to the operation type and the operation target, the verification condition for verifying the execution effect of the source instruction is determined;
[0010] The verification condition is combined, and verification instruction is generated;
[0011] The execution effect of the source instruction is verified by executing the verification instruction.
[0012] Further, to achieve the above object, the present application provides a kind of instruction execution effect verification device, comprising:
[0013] Source instruction parsing module, for obtaining the source instruction to be verified, and the source instruction is parsed, and the operation keyword and operation target in the source instruction are extracted;
[0014] Operation type determination module, for matching the operation keyword with the type definition of pre-set, and determining the operation type of the source instruction;
[0015] Verification condition generation module, for determining the verification condition for verifying the execution effect of the source instruction according to the operation type and the operation target;
[0016] Verification instruction construction module, for generating verification instruction based on the verification condition;
[0017] Effect verification module, for executing the verification instruction, and verifying the execution effect of the source instruction.
[0018] Further, to achieve the above object, the present application also provides a kind of computer equipment, the computer equipment includes memory, processor and storage to the memory and can be run on the processor instruction execution effect verification program, the instruction execution effect verification program is implemented when the processor executes the steps of the instruction execution effect verification method as described above.
[0019] Further, to achieve the above object, the present application also provides a kind of computer readable storage medium, the storage medium stores instruction execution effect verification program, and the instruction execution effect verification program is implemented when the processor executes the steps of the instruction execution effect verification method as described above.
[0020] Beneficial effects: The present application relates to the technical field of infrastructure operation and maintenance, and can be applied to business scenarios such as financial technology and medical health. A kind of instruction execution effect verification method, device, equipment and medium are disclosed, comprising: obtaining source instruction to be verified, and extracting operation keyword and operation target by analyzing source instruction;Matching operation keyword and preset type definition, determine the operation type of source instruction;According to operation type and operation target, determine the verification condition for verifying the execution effect of source instruction;Verification instruction is generated based on verification condition;Execute verification instruction, and verify the execution effect of source instruction.The present application automatically analyzes the content of source instruction, dynamically generates verification instruction based on operation type and operation target, realizes the automation of script verification process, reduces the need for manual intervention, and improves verification efficiency and accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0021] The present application will be further described below in conjunction with the drawings and embodiments, wherein:
[0022] Figure 1 It is an application environment schematic diagram of the instruction execution effect verification method in an embodiment of the present application.
[0023] Figure 2 It is a flowchart of the instruction execution effect verification method in an embodiment of the present application.
[0024] Figure 3 It is a functional module schematic diagram of the preferred embodiment of the instruction execution effect verification device of the present application.
[0025] Figure 4 It is a structure schematic diagram of the computer device in an embodiment of the present application.
[0026] Figure 5 It is another structure schematic diagram of the computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0027] It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0028] The instruction execution effect verification method provided by the embodiments of the present application can be applied to, for example, Figure 1The application environment is that a user end communicates with a service end through a network. The service end can obtain a source instruction to be verified through the user end, parse the source instruction to extract an operation keyword and an operation target, match the operation keyword with a preset type definition to determine an operation type of the source instruction, determine a verification condition for verifying an execution effect of the source instruction according to the operation type and the operation target, generate a verification instruction based on the verification condition, and execute the verification instruction to verify the execution effect of the source instruction. The application can automatically parse the content of the source instruction, dynamically generate the verification instruction based on the operation type and the operation target, realize the automation of the script verification process, reduce the requirement for manual intervention, and improve the verification efficiency and accuracy. The user end can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices. The service end can be realized by an independent server or a server cluster composed of multiple servers. The application will be described in detail through specific embodiments.
[0029] Please refer to Figure 2 , Figure 2 The flowchart of an embodiment of the instruction execution effect verification method provided by the application is shown. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown.
[0030] As Figure 2 shown, the instruction execution effect verification method provided by the application includes the following steps:
[0031] S10, obtaining a source instruction to be verified and parsing the source instruction to extract an operation keyword and an operation target in the source instruction;
[0032] In this embodiment, obtaining the source instruction to be verified includes extracting instruction information to be executed in a production environment from a data source. The data source can be a file system, a database, a message queue or a remote transmission interface. The source instruction to be verified is a set of instructions that have specific execution logic but have not completed the verification process. The content of the source instruction can include different types such as structure operation, permission configuration and data operation, and the specific form can be a standard database statement, a script language fragment or other text expressions with independent execution capability. When extracting the source instruction, first, according to a preset access strategy, the original data of the instruction to be verified is read from the target data source through a security authentication mechanism. The original data can be a single independent instruction or a batch instruction set. The data acquisition efficiency can be improved by combining a cache mechanism and a batch processing mechanism during the reading process.
[0033] The parsing source instruction refers to the structured processing of the obtained source instruction content. The parsing process is based on syntax rules or language specifications to ensure that the instruction content has complete semantic expression capability. Specifically, it can be implemented through a built-in syntax parsing engine. The parsing engine can be compatible with multiple instruction language types and dynamically load corresponding syntax rule sets according to the instruction type. In the parsing process, the character sequence of the source instruction is converted into a structured syntax tree. The syntax tree describes the components of the instruction and their hierarchical relationships in a tree structure. The syntax nodes can include operation actions, object identifiers, conditional expressions, parameter configurations, and other information.
[0034] The extraction of operation keywords in the source instruction is based on the parsed syntax tree. The operation keywords are the core action identifiers that reflect the intent of the instruction, such as CREATE, ALTER, GRANT, INSERT, and other keywords in database scripts. The extraction process of operation keywords combines a pre-set keyword library, which maintains a set of action identifiers for different types of instructions. The structured syntax tree is traversed to match the entries in the keyword library, locate nodes with operation attributes, and extract the contents of the nodes as operation keywords to ensure accurate action expression.
[0035] The extraction of operation targets in the source instruction refers to determining the object information directly associated with the operation behavior based on the context relationship of the operation keywords in the syntax tree structure. The operation target can include database object names, permission subject identifiers, data condition expressions, parameter setting contents, etc. When extracting the operation target, the syntax strategy library is combined, which defines the mapping relationship between different operation keywords and their dependent nodes. By traversing the syntax tree structure and locking the dependent nodes according to the mapping relationship, the node contents are extracted to form the operation target, ensuring that the scope and boundary of the operation object are clear. The entire extraction process strictly depends on structured syntax analysis to avoid semantic bias and ensure accurate subsequent verification.
[0036] The source instruction can be obtained through a database listening module, which captures the instruction stream to be executed in the production environment in real time and transmits the captured instructions to the verification system. It can also be achieved through a file parsing module, which regularly reads the instruction files stored in the specified path and extracts the contents of the instructions to be verified. It can also be combined with a message queue component to listen to specific message channels and obtain the pushed source instruction data. For the process of parsing the source instruction, a custom syntax tree construction engine can be used to convert the text content of the source instruction into a standardized data structure based on the abstract syntax tree model, supporting multi-level node expression. During the parsing process, corresponding syntax rule templates can be loaded for different instruction types to achieve instruction compatibility and parsing in a multi-language environment.
[0037] In the extraction process of operation keywords, a dynamic matching algorithm can be used to maintain the content of the keyword library in real time, support the expansion and adjustment of the keyword library, and adapt to different business needs. The content of the keyword library can be obtained from existing database language standards, or can be extended in combination with user-defined actions to enhance the applicability of the system. When extracting operation targets, differentiated dependency node positioning strategies are used for different operation types. For structural operation types, object name information is extracted first; for permission operation types, permission subjects and resource object information are extracted first; for data operation types, condition expressions and parameter configuration contents are combined to ensure the accuracy and completeness of target extraction.
[0038] Example: In the medical health business field, there are a large number of automated management scripts in hospital information systems, which involve patient information table structure adjustment, permission configuration change, and dynamic update of medical data. Through this processing flow, the medical management scripts to be published can be obtained in real time, the script content can be parsed, and the structure change keywords and table structure information can be accurately extracted. Combined with permission configuration and data operation content, the script intent can be fully understood before data verification, avoiding the impact of misoperation on the integrity and security of medical data, and improving the stability of the medical system.
[0039] In the financial technology business field, bank data platforms regularly publish scripts for permission changes and data updates, involving customer information table structure adjustment, permission control strategy optimization, and financial data update operations. Combined with this processing flow, the system can automatically capture financial script data before publication, accurately extract script operation types, target objects, and parameter information based on syntax parsing technology, ensure the accuracy of data permission adjustment and structure change process, effectively reduce the time cost of manually writing verification scripts, and ensure the stability and security of the financial data system.
[0040] This embodiment automatically obtains the source instructions to be verified from the data source, avoiding the inefficient operation of manually entering instructions one by one, and improving the completeness and real-time performance of instruction acquisition. Based on the standardized syntax parsing process, the structure and semantic information of the source instructions can be accurately restored, eliminating compatibility differences between different formats and different language instructions. Through the structured extraction of operation keywords and operation targets, the accurate identification of instruction action intent and object range is realized, providing a clear and standard data basis for the subsequent verification process, effectively reducing the need for human intervention in the verification process, and improving the overall verification efficiency and accuracy.
[0041] S20, matching the operation keyword with a preset type definition to determine the operation type of the source instruction;
[0042] In the present embodiment, matching the operation keyword with the preset type definition refers to comparing the operation keyword extracted from the source instruction with the type definition preset in the system to identify the operation type range to which the operation keyword belongs. The operation keyword is a core action identifier in the source instruction with a behavior indicating function, and is usually used to express the execution intention of the instruction. The operation keyword can be derived from the action instruction in the standard database language or script language, such as CREATE, ALTER, GRANT, REVOKE, INSERT, UPDATE, etc. The preset type definition is the instruction classification standard maintained in the system, which is used to distinguish the category information corresponding to different operation intentions. The type definition includes three different classifications of structure operation type, permission operation type and data operation type. The structure operation type usually involves the addition or modification of data structure, the permission operation type mainly reflects the access control and permission configuration, and the data operation type involves the addition, deletion, modification and query of data content. In the matching process, the operation keyword is searched with the keyword template in the type definition. The keyword template is a specific keyword set preset for different operation types, for example, the keyword template of the structure operation type includes CREATE and ALTER, the keyword template of the permission operation type includes GRANT and REVOKE, and the keyword template of the data operation type includes INSERT and UPDATE. The system compares the operation keyword with the content of each type keyword template one by one. If the matching is successful, the corresponding type indicator is generated. The type indicator is used to identify the specific type category to which the operation keyword belongs.
[0043] The generated type indicator includes three forms of structure operation type indicator, permission operation type indicator and data operation type indicator. Finally, based on the generated type indicator, the system determines the operation type of the source instruction. The operation type is the basic information for subsequent instruction verification, condition generation and instruction classification, which ensures that the entire instruction processing flow has clear operation category division, and facilitates the system to formulate differentiated verification strategies according to different operation types.
[0044] The content of the type definition can be dynamically maintained through a configuration file, supporting system administrators to extend or adjust the type classification and keyword template content according to business needs. When matching the operation keywords, the system can improve the matching efficiency through hash mapping table, keyword index library and other data structures, avoiding the performance bottleneck caused by the large keyword set. In the structure operation type, other structure management instructions except CREATE and ALTER can be supported, the permission operation type can be extended to complex permission instructions such as REVOKE, DENY, GRANT OPTION, and the data operation type can be adapted to various data operation instruction forms such as DELETE, MERGE, UPSERT, etc., enhancing the applicability of the system. When generating the type indicator, the system can use coding identification, label identification or structured data object form to ensure that the type information has good transferability and scalability in the subsequent processing process.
[0045] Example: In the medical health business field, the automatic scripts of the hospital information platform often contain DDL scripts related to data structure adjustment, DCL scripts for permission configuration optimization, and DML scripts for medical data update. Through the matching mechanism, the system can accurately identify the structure operation type instructions in the script, such as CREATE TABLE for adding medical information table structure, ALTER TABLE for adjusting table structure field, ensuring the integrity and standardization of data structure; for permission operation type instructions, such as GRANT SELECT ON patient_data TO doctor_group, the system can distinguish the permission configuration behavior, facilitating subsequent verification of the correctness of permission configuration and ensuring the security of medical data access; for data operation type instructions, such as INSERT INTO diagnosis_records VALUES(...), the system can accurately identify the data insertion operation, facilitating verification of the accuracy and integrity of medical data writing and ensuring the reliability of data.
[0046] In the financial technology business field, the bank data system regularly executes multiple types of instructions related to table structure management, permission adjustment and data update. Through the matching process, it can effectively distinguish CREATE INDEX, ALTER VIEW and other structure adjustment operations to ensure the rationality and stability of data index and view structure, recognize GRANT SELECT, REVOKE UPDATE and other permission management operations to ensure the security of access control of sensitive financial data, and distinguish INSERT INTO account_records, UPDATE transaction_logs and other data operation behaviors to ensure the accuracy and efficiency of data processing of financial transactions and account information, reduce operation risk, and improve the stability of the financial system.
[0047] The embodiment can accurately distinguish the operation intention of the source instruction by comparing the operation keyword with the type definition maintained in the system, and avoid the mixed use or misjudgment of different types of instructions in the verification and processing process. Based on the clear operation type division, the system can formulate targeted verification processes and strategies for different categories of instructions, improve the accuracy and efficiency of instruction verification, and reduce the processing deviation caused by ambiguous operation types. At the same time, the dynamic configuration mechanism of type definition and keyword template enhances the adaptability of the system in different business scenarios and instruction language environments, and improves the overall flexibility and maintainability.
[0048] S30, determining a verification condition for verifying the execution effect of the source instruction according to the operation type and the operation target;
[0049] In the embodiment, the verification condition for verifying the execution effect of the source instruction is determined according to the operation type and the operation target, wherein the operation type and the operation target are derived from the parsing process of the source instruction. The operation type is used to reflect the functional attribute of the source instruction in the database management environment, and usually includes a structure operation type, a permission operation type and a data operation type. The structure operation type refers to the data structure management behavior involved in the source instruction, such as creating a database object, modifying the attribute of a database object, and common objects include data tables, indexes, views or other storage entities. The permission operation type refers to the permission configuration operation involved in the source instruction, typical scenarios such as authorization, revocation of authorization, modification of permission settings, and the permission subject involved usually is a database user, a role or a system account, and the permission target is a specific data object or resource. The data operation type refers to the data insertion, update or deletion operation of the source instruction on the database content, and the operation target usually includes the affected data record, field and value.
[0050] To ensure that the execution effect of the source instruction meets the system expectation, a targeted verification condition needs to be generated. The verification condition refers to a data condition or a logic condition that can be used to objectively judge the actual execution result of the source instruction, and its type is distinguished according to the operation type.
[0051] For the structure operation type, the database object identifier in the operation target is obtained through syntax analysis, which reflects the name of the data object operated, such as the name of a data table or a view, and the system generates an object existence verification condition based on the identifier. The object existence verification condition is used to detect whether the database object exists effectively in the specified environment, and common implementation methods include generating a SQL statement to query the existence of the object, or calling a database metadata interface to verify the structure state.
[0052] For the permission operation type, the operation target is further distinguished into a permission subject identifier and a permission target entity identifier. The permission subject identifier is used to refer to the user, role, or user group that initiates the permission operation, and the permission target entity identifier is used to refer to the data object or resource that the permission acts on. The system generates a permission state verification condition based on these two types of information, which is used to detect whether the permission operation achieves the expected effect. Common implementations include querying a database permission table, calling a system permission verification interface, or verifying the specific operation permission state.
[0053] For the data operation type, the operation target usually includes data operation conditions and data operation content. The data operation conditions are used to limit the scope of the data operation, and the data operation content is used to describe the data fields and corresponding value information of the operation. The system generates a data state verification condition based on these two types of information. The data state verification condition is used to detect whether the data operation result is consistent with the expectation. Common implementation methods include data record counting, field value comparison, data integrity verification, or business logic consistency checking.
[0054] The system generates one of the object existence verification condition generated according to the structure operation type, the permission state verification condition generated according to the permission operation type, and the data state verification condition generated according to the data operation type as the final verification condition. The verification condition provides basic data support for the subsequent generation of verification instructions, ensuring that the verification instructions are targeted and accurate.
[0055] In the specific implementation process, the system first extracts the operation target information in the source instruction through syntax analysis and abstract syntax tree generation technology. For the structure operation type, the database object identifier involved in the operation target can be extracted by traversing the abstract syntax tree nodes, combining regular expressions and string parsing methods to extract table name, index name, or view name information. The system then dynamically selects the appropriate existence detection statement according to the database type, supporting mainstream relational databases and some non-relational database environments.
[0056] For the permission operation type, the system locates the permission operation related clauses by analyzing the structure of the source instruction and extracts the identification information of the permission subject and the permission target. The system supports multi-level permission configuration and complex role systems, and generates multi-dimensional permission state verification conditions such as read-write permission, execution permission, and structure modification permission by querying the database permission mapping table or calling built-in permission verification functions.
[0057] For the data operation type, the system identifies the data operation conditions and data operation content in the abstract syntax tree, and extracts the field name, data value, and filtering condition in combination with the SQL standard parsing strategy. The data state verification condition can be extended based on business logic, supporting field value checking, data integrity verification, and cross-table data consistency checking to ensure that the data operation result completely matches the expectation.
[0058] The system supports adaptive verification condition generation in a multi-database environment. Verification condition templates and parsing logic can be flexibly configured according to specific business requirements and database characteristics, improving adaptation ability and operational stability.
[0059] Example: In a medical health business system, changes in the structure of data tables often involve key business data structures such as patient information tables, examination record tables, and drug inventory tables. The system can extract table name information from the operation target, generate object existence verification conditions, and use SHOW TABLES or SELECT statements to check whether the data tables are correctly created or modified, ensuring the integrity and stability of medical data structures. Permission configuration operations involve adjusting the permissions of doctors, nurses, or other medical personnel accounts. The system can parse account information and data object information from the operation target, generate permission state verification conditions, and check whether the account permission state is consistent with the requirements of the security policy to ensure the security of access control for sensitive data. Data operations are usually used to add or update case records, examination results, or drug inventory data. The system extracts data operation conditions and content, generates data state verification conditions, and checks whether data writing, field value updating, or data deletion operations are performed as expected, ensuring the accuracy and consistency of medical business data.
[0060] In a financial technology business system, account management, transaction flow, and data storage operations have strict requirements for data structure, permission configuration, and data content. During structure operations, the system can parse object identifiers such as account information tables and transaction flow tables from the operation target, generate object existence verification conditions, and check whether data structure adjustments are effective. During permission operations, the system extracts user, role, and data object information from the operation target, generates permission state verification conditions, and verifies the effectiveness and security of permission configuration. During data operations, the system generates data state verification conditions based on data operation conditions and data operation content, checks whether transaction data writing, modification, and deletion comply with business logic, reduces data anomaly risks, and ensures the stable and reliable operation of the financial business system.
[0061] The embodiment combines operation type and operation target to generate targeted verification conditions, so that the system can effectively improve the accuracy and comprehensiveness of source instruction execution effect verification. The introduction of operation type enables the verification logic to have clear functional differentiation, avoids incomplete coverage or misjudgment caused by a single verification mechanism, and enhances the reliability of the system. The analysis of operation target ensures that the verification condition is closely related to the actual object of the source instruction, improving the pertinence and representativeness of the verification data. The overall process realizes multi-dimensional effect verification of structure change, permission configuration and data processing, reduces data structure abnormalities, permission configuration errors and business data inconsistency problems caused by insufficient verification, ensures the safe and stable operation of system data and permissions, improves the level of automated verification, saves manual input, and reduces the risk of human intervention.
[0062] S40, combining the verification conditions to generate verification instructions;
[0063] In the embodiment, the verification conditions are combined to generate verification instructions, and the overall process relies on the verification conditions determined in the previous steps and constructs a structured and standardized instruction expression form based on different types of verification requirements. The verification condition is used to define the specific check standard for the execution effect of the source instruction, which essentially reflects the comparison basis between the expected system state and the actual system state. The generated verification instruction is an operation instruction that can be directly executed by the execution system to verify whether the actual execution effect of the source instruction meets the expected requirements.
[0064] The verification condition includes object existence verification condition, permission state verification condition or data state verification condition, and the specific type depends on the combination of operation type and operation target. The object existence verification condition is suitable for scenarios involving structure operation type, such as creation and modification of data tables or views; the permission state verification condition is suitable for permission operation type scenarios, mainly used to check the correctness of permission assignment or revocation; and the data state verification condition is suitable for data operation type scenarios, mainly verifying the actual effect of data insertion, update or deletion operations.
[0065] The system determines the specific category of the verification condition through condition type identification logic and selects the corresponding verification statement template according to the category. The verification statement template is a structured query or detection instruction framework, containing a standard syntax structure and a reserved parameter placeholder, which is used to dynamically fill in specific information related to the verification condition. The system analyzes the verification condition and extracts verification parameters, including but not limited to data table name, field name, permission subject information, permission target information, data content or filtering condition, and the specific extraction method depends on the structure of the verification condition.
[0066] After the template and parameters are prepared, the system fills the parameters into the corresponding positions of the template to generate a verification statement with complete syntax structure and business pertinence. The verification statement is the final verification instruction. The generated verification instruction can be directly executed by the system to verify whether the actual effect of the source instruction meets the logical requirements preset by the system, ensuring that the data structure, permission configuration, and data content are in the correct state.
[0067] In the actual implementation process, the system first distinguishes the type of the verification condition based on the type identification logic. For object existence verification conditions, the system selects an object existence query template, common forms such as SELECT statements, SHOW commands, or system information query interfaces, and the template contains parameter placeholder positions such as table names or view names. The system extracts the database object identifier in the verification condition and fills it into the template to generate a complete structure existence check statement, such as SELECT * FROM data table name, to check whether the table structure exists.
[0068] For permission state verification conditions, the system selects a permission state query template, and the template structure is designed according to the database permission system. Common forms include SELECT statements combined with permission table information or system permission interfaces, and parameters include permission subject identifiers and permission target entity identifiers. The system fills the extracted user or role information and data object information into the template to generate a permission state verification instruction to detect whether the permission configuration meets the expectations.
[0069] For data state verification conditions, the system selects a data state query template, which is usually based on SELECT statements or data statistics statements, and the parameters include data filtering conditions and data content descriptions. The system extracts the operation conditions and data content information and fills them into the template to generate a data state verification instruction to check the correctness and integrity of the data write, modification, or deletion results.
[0070] During the template filling process, the system supports dynamic parameter checking and syntax integrity checking to ensure that the generated verification instruction meets the database system standards and is suitable for multiple database environments. The system supports SQL, NoSQL, distributed databases, and other types, and the verification instruction template can be dynamically switched according to the database type to improve the adaptation ability and operation safety.
[0071] Example: In a medical health service system, structural operations involve adjusting the structure of medical record information tables and drug inventory tables. The system generates existence check instructions for SELECT * FROM data table name based on object existence verification conditions, and automatically verifies whether the data table structure adjustment takes effect. Permission operations involve assigning and revoking permissions for medical staff accounts. The system generates instructions for querying the permission table based on permission state verification conditions, and checks the correctness of account permission configuration. Data operations involve medical record information input and examination result updates. The system generates verification instructions based on data state verification conditions, based on data filtering and field value comparison, to ensure that data operation results are accurate and reliable, and to ensure stable operation of the medical data system.
[0072] In a financial technology business system, structural operations involve adjusting the structure of account information tables and transaction log tables. The system generates existence verification instructions for data table structures based on object existence verification conditions, to ensure that data table structure adjustments take effect correctly. Permission operations involve managing and adjusting user account permissions. The system generates verification instructions based on permission mapping table queries based on permission state verification conditions, to automatically detect permission configuration states. Data operations involve writing, updating, or deleting transaction data. The system generates verification instructions based on data filtering and field value comparison based on data state verification conditions, to ensure that transaction data processing results meet business logic requirements and to ensure the safe and stable operation of the financial system.
[0073] This embodiment generates verification instructions by combining verification conditions, and the system realizes the standardized conversion from abstract verification requirements to specific executable instructions, improving the automation level and operation accuracy of the verification process. The template-based instruction structure ensures the grammatical correctness and execution compatibility of the verification instructions, and the dynamic parameter filling mechanism ensures the close association between the verification instructions and the actual operation targets, improving the relevance and effectiveness of the verification process. The overall system process avoids the high cost and high error rate of manually writing verification scripts, enhances the operation efficiency and data security in complex system environments, reduces the risk of structural abnormalities, permission configuration errors, or data inconsistencies due to verification omissions, and improves the overall stability and reliability of the system.
[0074] S50, executing the verification instruction, verifying the execution effect of the source instruction.
[0075] In this embodiment, the execution of the verification instruction verifies the execution effect of the source instruction, which involves submitting the standardized verification instruction generated in the previous steps to the target system environment and objectively determining the execution state of the source instruction through actual running results. The verification instruction is based on a standardized query or detection statement structure, with complete operation syntax and targeted parameter configuration, ensuring normal execution in different databases or system environments.
[0076] The system first loads the verification instruction to a preset target execution environment before executing the verification instruction. The target execution environment usually includes a system platform, a database instance, or a test environment that is the same as or highly consistent with the source instruction, ensuring the accuracy and representativeness of the verification result. The loading process transmits the verification instruction to the execution environment through a secure interface or an automated script, avoiding human operation errors and improving operational efficiency.
[0077] The verification instruction runs in the target execution environment, and the system captures the return data in real time during the execution process. The return data includes structured query results, state identification information, or operation feedback data. Depending on the type and structure of the verification instruction, the format of the return data may differ.
[0078] The system extracts the actual execution result value from the return data. The actual execution result value refers to the key data indicator that can reflect the execution effect of the source instruction, including data table existence flag, permission configuration state flag, or data content state information. The system is based on the preset expected result value, which comes from the system rule library, historical data, or business logic setting, representing the ideal state after the correct execution of the source instruction.
[0079] The system compares the actual execution result value with the expected result value. The comparison process uses a strict logical judgment mechanism, supporting numerical comparison, string comparison, structure comparison, and other ways to ensure the objective accuracy of the comparison result. When the actual execution result value is equal to the expected result value, the system generates an execution success state, indicating that the source instruction has been correctly executed and achieved the expected effect. When the actual execution result value is not equal to the expected result value, the system generates an execution failure state, indicating that the source instruction execution has deviation or error, which needs to be further investigated and handled.
[0080] Finally, the system outputs the execution success state or the execution failure state as the execution effect of the source instruction, which serves as the input basis for the subsequent business process or exception handling mechanism of the source instruction, ensuring the stability and safety of the overall system process.
[0081] In the specific implementation process, the system accurately transmits the verification instruction to the database instance or the specified system environment through the API interface, command line tool, or automated operation script. For structure operation type, the verification instruction is usually a standard SQL statement that queries the existence of a data table, index, or view, such as SELECT * FROM data table name. The system extracts the actual result value of whether the data table exists by parsing the returned result set and compares it with the expected existence state to generate the execution effect.
[0082] For permission operation type, the verification instruction is a query statement of the joint permission information table or the system permission configuration interface. The system extracts the actual permission state of the user or role and compares it with the expected permission configuration state to determine whether the permission operation is successful.
[0083] For data operation types, the verification instruction is usually a data filtering and state detection statement. The system determines the actual effect of the data operation based on the field value in the query result, the data entry state, or the number of data records, to ensure the correctness and integrity of the data write, modification, or deletion operation.
[0084] During the comparison process, the system supports fuzzy matching, strict matching, or multi-condition joint judgment, which is suitable for complex data structures and variable business logic scenarios. The system ensures the transparency and traceability of the verification process through log recording, state marking, and exception capture mechanisms, improving the overall reliability and security of the system.
[0085] Example: In a medical health business system, the structure operation involves adjusting the medical record information table or the drug inventory table. The system executes the verification instruction for the data table structure, extracts the data table existence state, and compares it with the expected existence state to verify the structure adjustment effect. The permission operation involves configuring and adjusting the account permissions of medical personnel. The system executes the verification instruction of the joint permission information table, extracts the permission state information, and compares it with the expected permission configuration state to ensure the accuracy of permission management. The data operation involves entering medical record information and updating test results. The system executes the verification instruction based on data filtering, extracts the data record state, and compares it with the expected data state to ensure the reliability of data operation and the stable operation and business continuity of the medical data system.
[0086] In a financial technology business system, the structure operation involves changing the structure of the account information table and the transaction log table. The system executes the standardized query instruction to detect the data table structure state and ensure the correctness of the structure adjustment. The permission operation involves dynamic management of user account permissions. The system executes the permission state verification instruction to extract the permission configuration state information and compare it with the expected state set by the system to ensure the security of the permission configuration. The data operation involves real-time writing, data revision, or record deletion of transaction data. The system extracts key indicators by filtering data content and state information and compares them with the expected business data state to ensure the accuracy and integrity of transaction data, ensuring the stable, safe, and efficient operation of the financial system.
[0087] This embodiment implements comprehensive detection and objective verification of the execution effect of the source instruction by executing the verification instruction, improving the operation accuracy and system security. The verification process is based on standardized instructions and structured comparison mechanisms to ensure the reliability and consistency of the verification results. The system accurately determines the execution state of the source instruction by dynamically comparing the actual execution result value with the expected result value, avoiding data structure errors, permission configuration vulnerabilities, or data content deviation problems caused by human operation errors or system abnormalities, improving the overall operation efficiency and system stability, and reducing potential risks in the production environment.
[0088] The present application relates to the technical field of infrastructure operation and maintenance, and can be applied to business scenarios such as financial technology and medical health, and discloses a method and device for verifying the execution effect of an instruction, equipment and a medium, comprising: obtaining a source instruction to be verified, parsing the source instruction to extract an operation keyword and an operation target; matching the operation keyword with a preset type definition to determine the operation type of the source instruction; determining a verification condition for verifying the execution effect of the source instruction according to the operation type and the operation target; generating a verification instruction based on the verification condition; and executing the verification instruction to verify the execution effect of the source instruction. The present application automatically parses the content of the source instruction, dynamically generates a verification instruction based on the operation type and the operation target, realizes the automation of the script verification process, reduces the need for manual intervention, and improves the verification efficiency and accuracy.
[0089] In one embodiment, the above step S10 comprises:
[0090] S101, receiving an instruction data stream and performing binary decoding on the instruction data stream to generate a text character sequence;
[0091] S102, checking the encoding integrity of the text character sequence, and when the check passes, taking the text character sequence as a source instruction to be verified;
[0092] S103, performing syntax analysis on the source instruction to generate a structured syntax tree;
[0093] S104, traversing the structured syntax tree, matching entries in a preset keyword library, and identifying an operation keyword node in the structured syntax tree;
[0094] S105, based on a syntax strategy library, locating a dependent node in the structured syntax tree that has a syntax association with the operation keyword node;
[0095] S106, extracting the content of the operation keyword node as an operation keyword and extracting the content of the dependent node as an operation target.
[0096] In the present embodiment, obtaining a source instruction to be verified means receiving data instruction information for verification through a system interface, a network link or a local file, etc. The source instruction can be in various formats such as a database operation instruction, a configuration change instruction, a permission adjustment instruction or a data update instruction, and the source can include scripts before production and release, change statements in a test environment or other system operation instructions that need to be verified, to ensure coverage of various business operation scenarios.
[0097] Parsing the source instruction is mainly achieved through a series of standardized data processing and syntax analysis processes, and specifically includes the following operations:
[0098] Firstly, the system receives an instruction data stream, which is a to-be-verified instruction content transmitted in the form of a data packet, a data segment or a continuous character stream. The data stream form can vary according to the system structure and network environment, supporting both TCP / IP-based network transmission and local file reading or internal system interface calling.
[0099] The received instruction data stream is usually in binary encoding format. To ensure data accuracy and subsequent processing efficiency, the system performs binary decoding on the instruction data stream. Binary decoding includes restoring binary data to standard text information according to a preset character set or protocol specification. The text character sequence is a character-level representation of the instruction content, facilitating subsequent syntax analysis and feature extraction.
[0100] The system performs encoding integrity verification on the text character sequence. The verification process detects data integrity and legality according to the character encoding specification, avoiding subsequent parsing failures caused by truncation, incorrect encoding or format damage during data transmission. When the verification passes, the system directly takes the text character sequence as the source instruction to be verified, ensuring the accuracy and reliability of the data source.
[0101] Based on standard syntax analysis rules, the system performs syntax analysis on the source instruction to generate a structured syntax tree. The syntax tree structure reflects the syntax level relationship and operation logic structure of the source instruction, facilitating the system to efficiently identify instruction composition units and key content. The syntax tree includes root nodes, child nodes and attribute nodes, covering operators, parameters, keywords and logical dependencies, ensuring complete expression of source instruction structure information.
[0102] The system traverses the structured syntax tree and identifies operation keyword nodes in the syntax tree by matching with a preset keyword library. The keyword library stores various standardized operation keyword templates, including create class, modify class, delete class, permission class, data operation class, etc., ensuring wide applicability in different business systems and database environments.
[0103] Based on the syntax strategy library, the system locates the dependency nodes associated with the operation keyword nodes in the structured syntax tree. Dependency nodes represent parameter information, target objects or supplementary content associated with operation keywords in terms of syntax, logic or structure. The syntax strategy library defines diversified dependency node parsing rules according to different syntax rules, instruction types and operation logic, ensuring adaptation to different instruction structures and syntax standards.
[0104] The system extracts the content of the operation keyword node as an operation keyword, which is used for subsequent operation type identification and instruction logic determination, directly affecting the processing path of the verification process. At the same time, the system extracts the content of the dependency node as an operation target, which is usually a data table, a database object, a permission subject, a data filtering condition or an operation parameter, reflecting the specific business entity or operation range involved in the source instruction, ensuring the accuracy and pertinence of subsequent verification operations.
[0105] The embodiment realizes accurate restoration of the source instruction structure and efficient identification of operation information by standardizing analysis and feature extraction of the source instruction, significantly improving the accuracy and automation level of source instruction analysis. Based on multiple technical paths such as binary decoding, encoding integrity verification, syntax tree generation and dependency node analysis, the system ensures the integrity of the source instruction content and the reliability of the analysis process. The extraction of operation keywords and operation targets provides basic data support for subsequent operation type determination and verification process, reduces the need for manual intervention and information extraction error rate, improves the system automation processing capability and overall operation efficiency, avoids verification logic deviation or business process interruption caused by inaccurate data analysis, and ensures the stability and security of the system.
[0106] In one embodiment, the above step S20 comprises:
[0107] S201, calling a preset type definition including a structure operation type, a permission operation type and a data operation type;
[0108] S202, matching the operation keyword with the keyword template corresponding to the structure operation type, and when the operation keyword is a create instruction or a modify instruction, determining that the matching is successful and generating a structure operation type indicator;
[0109] S203, matching the operation keyword with the keyword template corresponding to the permission operation type, and when the operation keyword is an authorization instruction or a revocation instruction, determining that the matching is successful and generating a permission operation type indicator;
[0110] S204, matching the operation keyword with the keyword template corresponding to the data operation type, and when the operation keyword is an insert instruction or an update instruction, determining that the matching is successful and generating a data operation type indicator;
[0111] S205, determining the operation type to be the structure operation type, the permission operation type or the data operation type based on the generated indicator.
[0112] In the embodiment, matching the operation keyword with the preset type definition refers to determining the specific operation category of the source instruction based on the pre-extracted operation keyword and combining the preset operation type classification standard in the system. The operation keyword is the core vocabulary in the source instruction that can reflect the essence of the operation behavior, and is usually in the form of standard instructions in database management languages, configuration languages, or system operation languages, such as CREATE, ALTER, GRANT, REVOKE, INSERT, UPDATE, etc. The type definition is the operation type division rule and its corresponding keyword template set stored in the system, which ensures that operation instructions of different sources, formats, and syntax environments can be accurately classified.
[0113] The preset type definition includes the structure operation type, the permission operation type, and the data operation type, which refers to the operation type classification structure maintained in the system, which includes at least three basic operation types. The structure operation type mainly involves the creation and modification of data structures such as databases, table structures, indexes, or views, the permission operation type involves the authorization and revocation of users, roles, or access control, and the data operation type involves the insertion, update, or deletion of data content. The classification standard establishes a mapping relationship between the keyword template set and the operation behavior, which facilitates automatic classification by the system through matching of the operation keyword.
[0114] Matching the operation keyword with the keyword template corresponding to the structure operation type refers to the system searching for an entry consistent with the content or semantically equivalent to the operation keyword in the structure operation type keyword template. The keyword template can include standard keywords, synonymous extensions, and variant expressions in different language environments to ensure compatibility under different development habits, business needs, or system environments. When the operation keyword is a creation instruction or a modification instruction, the system determines that the matching is successful, and further generates a structure operation type indicator. The creation instruction usually includes structure initialization instructions such as CREATE TABLE and CREATE INDEX, and the modification instruction includes structure adjustment instructions such as ALTER TABLE and ALTER INDEX. The generated structure operation type indicator is an important parameter for subsequent logical processing, indicating that the source instruction belongs to the structure change operation category.
[0115] Similarly, matching the operation keyword with the keyword template corresponding to the permission operation type refers to the system determining whether the operation keyword is an authorization instruction or a revocation instruction. The authorization instruction includes GRANT and GRANT OPTION, and the revocation instruction includes REVOKE. After matching is successful, the system generates a permission operation type indicator indicating that the source instruction involves permission configuration or access control change.
[0116] Further, the system matches the operation keyword with the keyword template corresponding to the data operation type, determines whether the operation keyword is an insert instruction or an update instruction, the insert instruction is, for example, INSERT INTO, INSERT OVERWRITE, etc., the update instruction is, for example, UPDATE SET, MERGE INTO, etc., and generates a data operation type indicator after successful matching.
[0117] Based on the generated indicator, the system finally determines that the operation type is a structure operation type, a permission operation type, or a data operation type. The operation type information runs through the subsequent verification logic, condition generation, and verification instruction construction, ensuring that the system executes different processing paths according to the nature of the operation in the automated verification process.
[0118] In this embodiment, by matching the operation keyword with the type definition preset in the system, the system realizes the unified classification of operation instructions of different sources, formats, and syntax environments, significantly improving the accuracy and automation level of operation type determination. Based on the classification standards of structure operation type, permission operation type, and data operation type, the system can perform verification condition generation and instruction construction in a targeted manner, avoiding subjective errors and omissions in the traditional manual classification process. Through the diversification design of keyword templates and the matching mechanism, the system is compatible with different development languages, expression habits, and system environments, enhancing the applicability and stability of the system. The introduction of the type indicator provides a clear operation identification for the subsequent automated process, reduces the complexity of operation type determination, and improves the overall processing efficiency and operation and maintenance quality of the system.
[0119] In one embodiment, the above step S30 comprises:
[0120] S301, identifying whether the operation type is a structure operation type, a permission operation type, or a data operation type;
[0121] S302, when the operation type is a structure operation type, parsing the database object identifier in the operation target, and generating an object existence verification condition based on the database object identifier;
[0122] S303, when the operation type is a permission operation type, parsing the permission subject identifier and the permission target entity identifier in the operation target, and generating a permission state verification condition based on the permission subject identifier and the permission target entity identifier;
[0123] S304, when the operation type is a data operation type, parsing the data operation condition and the data operation content in the operation target, and generating a data state verification condition based on the data operation condition and the data operation content;
[0124] S305, the object existence verification condition, the permission state verification condition or the data state verification condition is taken as the verification condition.
[0125] In this embodiment, the verification condition for verifying the execution effect of the source instruction is determined according to the operation type and the operation target, which involves deriving the specific verification condition in the operation scenario by the operation type information obtained in the early stage in the system and the extracted operation target content, for automatically generating the verification instruction and detecting the actual execution effect of the source instruction subsequently. The operation type is the explicit category information generated based on the operation keyword and type definition matching in the upstream step, which is usually divided into three types: structure operation type, permission operation type and data operation type, corresponding to different operation requirements in the system structure layer, permission control layer and data content layer respectively.
[0126] The operation type is identified as the structure operation type, the permission operation type or the data operation type, which means that the system performs conditional judgment on the operation type information according to the established classification standard, and clearly distinguishes the processing logic in different categories. The structure operation type usually involves the creation and change of database tables, indexes, views and other objects; the permission operation type involves the grant and revocation of permission configuration such as users, roles and access policies; and the data operation type involves the insertion, update, deletion or other data level change behaviors of specific data records.
[0127] When the operation type is the structure operation type, the system performs parsing operation on the operation target and extracts the database object identifier involved therein. The database object identifier is the logical name or path information used to uniquely identify the internal structure object of the database, which usually includes the identification information of structure entities such as table name, index name, view name and stored procedure name. The system accurately identifies the database object identifier in the operation target by means of structured syntax analysis, keyword positioning or regular extraction, and generates the object existence verification condition based on the identifier. The object existence verification condition is usually a logical expression or a query template, which aims to detect whether the target structure object actually exists or is correctly created in the verification phase, for example, generating SELECT or INFORMATION_SCHEMA query logic for table existence.
[0128] If the operation type is a permission operation type, the system further parses the permission subject identifier and the permission target entity identifier in the operation target. The permission subject identifier is usually the user, role or account identifier that initiates the permission operation, and the permission target entity identifier is the unique name of the database object, such as a table, view or other structured resource, that needs to be configured with permissions. Based on these two types of identifiers, the system generates a permission state verification condition, which is used to check whether the target subject has the expected permissions on the target entity. Common methods include querying system permission configuration tables, system views or executing permission detection statements, and the verification result reflects whether the permission change meets the expectations.
[0129] When the operation type is a data operation type, the system performs parsing operations on the data operation condition and data operation content in the operation target. The data operation condition is usually a filter condition expression that constrains the data positioning range, such as a condition group in a WHERE statement, and the data operation content is the specific data field and its operation value, such as the field assignment table in a SET statement. The system extracts the data operation condition and data operation content in the operation target through syntax tree traversal, key structure parsing, parameter extraction and other methods, and generates a data state verification condition based on this information. The data state verification condition is usually constructed as a query logic, statistical expression or data validation rule to ensure that the verification phase can accurately detect whether the data record has been correctly inserted, updated or deleted, and whether the data content meets the expected state.
[0130] Finally, the system outputs the object existence verification condition, the permission state verification condition or the data state verification condition as the final verification condition according to the specific operation type. This verification condition is the core input for the subsequent automatic generation of verification instructions, directly determining the accuracy and effectiveness of the verification process, ensuring that different categories of source instructions can quickly and accurately complete the execution effect verification after being published.
[0131] This embodiment can generate verification conditions that are highly matched with the actual operation content through the combination of operation type and operation target, significantly improving the accuracy and automation level of the verification process. The differentiated processing logic for structure operations, permission operations and data operations ensures that the system can flexibly handle different types of instruction verification requirements, avoiding the low efficiency and high error rate problems caused by traditional manual script writing methods. The automatic generation mechanism of the verification condition further reduces the human involvement cost, improves the applicability and stability of the system in high-frequency instruction publishing, complex permission configuration and data change scenarios, and enhances the reliability and security of the overall operation system.
[0132] In one embodiment, the above step S40 includes:
[0133] S401, determine the condition type corresponding to the verification condition, the condition type including object existence type, permission state type or data state type;
[0134] S402, when the condition type is object existence type, obtain object existence query template;
[0135] S403, when the condition type is permission state type, obtain permission state query template;
[0136] S404, when the condition type is data state type, obtain data state query template;
[0137] S405, extract the verification parameter in the verification condition;
[0138] S406, fill the verification parameter into the corresponding query template, generate verification statement, and take the verification statement as verification instruction.
[0139] In the embodiment, the verification instruction is generated based on the verification condition, which means that the system dynamically generates a specific verification statement that can be directly executed according to the verification condition information determined in the previous stage, so as to ensure that the subsequent verification stage can accurately evaluate the actual execution effect of the source instruction based on the verification statement. The verification condition is a logical expression or rule parameter generated by combining the operation type and the operation target, which clearly defines the specific content and scope of the verification requirement.
[0140] Determining the condition type corresponding to the verification condition belongs to the process of classifying and identifying the structural characteristics of the verification condition by the system, and the condition type mainly includes object existence type, permission state type and data state type. The object existence type is mainly used in the structural operation type scene, and is used for the verification requirement of whether the database structure object exists correctly. The permission state type is mainly used in the permission operation type scene, and is used for the verification requirement of the permission configuration state of the permission subject and the target entity. The data state type is mainly used in the data operation type scene, and is used for the verification requirement of the state or correctness of the specific data record. The system accurately determines the type of the verification condition by condition identifier analysis, structured expression matching or keyword mapping, so as to ensure that different types of verification requirements adopt different template generation strategies.
[0141] When the condition type is object existence type, the system automatically obtains object existence query template. The template is usually a standard query statement structure for detecting the existence of database structure object, and typical examples include SELECT, INFORMATION_SCHEMA or system metadata table query logic for data table, and the template has parameter placeholders to be filled with specific object identifier information later.
[0142] If the condition type is the permission state type, the system acquires a permission state query template. The template is a standard query statement structure for the permission configuration result, which is usually designed as a query logic of a system permission information table, a permission view or an access control table, and has parameter placeholder positions for permission subjects and permission target entities, facilitating subsequent flexible filling of specific verification data.
[0143] If the condition type is the data state type, the system acquires a data state query template. The template is mainly applied to data record state or content accuracy verification, usually including standard data filtering, field value detection or data statistical query statement structures, and has parameter positions for data operation conditions and data operation contents inside the template, facilitating subsequent construction of complete data state verification statements.
[0144] Extracting verification parameters in the verification condition refers to the system positioning and refining core parameter information that can be directly applied to the template generation process based on the acquired verification condition structure content. The verification parameters are usually database object identifiers, permission subject and permission target entity identifiers, data operation condition expressions, data operation fields and corresponding values, etc. The system ensures the accuracy and integrity of the verification parameters through structured data analysis, parameter mapping relationship analysis or key field extraction techniques.
[0145] Filling the verification parameters into the corresponding query template to generate the final verification statement. The system injects the extracted verification parameters one by one into the parameter placeholder positions in the corresponding query template through parameter substitution, dynamic splicing or structured reconstruction, forming a final verification statement that is complete in structure, correct in syntax and rigorous in logic. The verification statement is the verification instruction generated by the system, which can be directly used for actual execution in the downstream database environment to complete the automatic verification of the source instruction execution effect.
[0146] This embodiment realizes the efficient, accurate and automatic generation of verification instructions through the differential template acquisition strategy and parameter dynamic filling mechanism based on the verification condition type, effectively avoiding the logical omissions, syntax errors and low efficiency problems in the traditional manual writing of verification statements. The application of structured templates ensures that different types of verification requirements can use the most suitable verification statement form, improving the specificity and reliability of the verification process. The parameter extraction and dynamic filling technology improves the flexibility and intelligence level of the verification instruction generation process, reduces the human involvement, improves the overall operation and verification efficiency of the system, and ensures the safety and stability of the database structure change, permission configuration adjustment and data operation publishing links.
[0147] In one embodiment, the above step S50 includes:
[0148] S501, loading and running the verification instruction in the target execution environment to obtain execution result data;
[0149] S502, extracting an actual execution result value from the execution result data, and obtaining an expected result value corresponding to the verification instruction;
[0150] S503, comparing the actual execution result value with the expected result value;
[0151] S504, generating an execution success state when the actual execution result value is equal to the expected result value;
[0152] S505, generating an execution failure state when the actual execution result value is not equal to the expected result value;
[0153] S506, taking the execution success state or the execution failure state as an execution effect of the source instruction.
[0154] In the embodiment, loading and running the verification instruction in the target execution environment means deploying the generated verification statement to a specified database system, data service platform or other data processing environment through a standard interface or database connection mechanism, and completing the actual execution operation of the verification statement. The target execution environment usually refers to a database instance, cluster system or data service platform associated with the source instruction execution logic, ensuring that the verification process is consistent with the actual impact range of the source instruction, and avoiding verification deviation caused by environment difference. The loading and running process of the verification instruction needs to follow the standard database access protocol, permission control specification and data operation specification, to ensure the accuracy and system stability of the execution.
[0155] The execution result data refers to the result set or state feedback information returned by the system after executing the verification instruction. Common forms include query result records, data statistics values, system status codes or logical judgment results, etc. The execution result data provides an actual basis for subsequent effect comparison. The system obtains the execution result data completely through a standard interface or data extraction mechanism, to ensure the accuracy and integrity of the data.
[0156] Extracting the actual execution result value from the execution result data means that the system performs directional analysis and extraction operation on the key indicators, statistical values or judgment results in the result data, to obtain specific data values that can be used for effect determination. The actual execution result value is usually the number of rows, field value, permission identifier, status flag, etc. The system ensures the accuracy of the extraction result through structured data analysis, field positioning or rule matching technology, to avoid the influence of data deviation on effect determination.
[0157] An expected result value corresponding to the verification instruction is obtained, and the system determines a standard value for the current verification comparison based on a pre-set business rule, data standard or verification logic. The expected result value is usually dynamically generated according to the operation type, operation target and verification condition or called from a rule library, covering different dimensions of verification requirements such as object existence state, permission configuration state, data record state, etc. The system obtains accurate expected result values through rule management modules, parameter mapping relationships or logical derivation methods.
[0158] The actual execution result value is compared with the expected result value, and the system confirms whether the actual execution result meets the expected standard through numerical comparison, logical judgment or state matching technology, and judges whether the execution effect of the source instruction meets the system or business requirements. The comparison process can include accurate matching, interval judgment, logical compliance analysis and other forms to ensure the rigor and accuracy of the effect determination.
[0159] When the actual execution result value is equal to the expected result value, the system generates an execution success state, indicating that the source instruction has been correctly executed and meets the business requirements. The execution success state is usually expressed in the form of a Boolean flag, a state code or structured identification information, facilitating subsequent processing or result recording by the system.
[0160] When the actual execution result value is not equal to the expected result value, the system generates an execution failure state, indicating that there is a difference between the execution result of the source instruction and the expectation, and there may be execution abnormalities, logical errors or data deviation problems, which need to be paid attention to by operation and development personnel. The execution failure state is also output in the form of a Boolean flag, a state code or structured information for system tracking and exception handling.
[0161] The execution success state or the execution failure state is taken as the execution effect of the source instruction, and the system generates a unified effect conclusion information based on the verification result to feedback the actual running situation of the source instruction, facilitating overall monitoring, quality evaluation and problem tracing of the system, and improving the stability of the database system and the reliability of business processing.
[0162] The embodiment automatically loads and runs the verification instruction in the target execution environment, and determines the execution effect of the source instruction through comparison between the actual execution result value and the standard expected result value. The system realizes full-process, automated and accurate verification of the execution effect of the source instruction, eliminating subjective misjudgment, operation omission and low efficiency problems in traditional manual inspection mode. Dynamic extraction of the actual execution result value and the standardized expected result value for comparison ensures the objectivity and accuracy of the effect determination, and the explicit generation of the execution success and failure states facilitates the system to timely capture abnormal problems and quickly locate error sources, effectively ensuring the safety and consistency of database structure changes, permission configuration adjustments and data operation execution, and improving the stable operation level of the overall system and the reliability of business processing.
[0163] In an embodiment, after step S50, the method further comprises:
[0164] S601, when the execution effect is an execution failure state, determining a difference type between the actual execution result value and the expected result value based on an operation type of the source instruction;
[0165] S602, based on the operation type and the difference type, querying a preset instruction correction strategy library, and generating a correction operation parameter according to the instruction correction strategy library;
[0166] S603, injecting the correction operation parameter into the source instruction to generate a corrected source instruction.
[0167] In the embodiment, after verifying the execution completion of the instruction and outputting the execution effect of the source instruction, for the case that the execution effect is an execution failure state, the system automatically triggers a difference type determination process, and the determination of the difference type is based on the operation type of the source instruction for classification analysis. The operation type is generated through the previous steps, and is classified into a structure operation type, an authority operation type and a data operation type. The system determines the scope and focus of the difference analysis according to the classification result.
[0168] When the operation type is the structure operation type, the difference type mainly involves the existence and structural integrity of the database object, including but not limited to the missing of objects such as tables, views and indexes, the structure not conforming to the expectation or the object attribute configuration being inconsistent. The system analyzes the return information about the structure in the actual execution result value, and combines the expected result value to determine whether there is object missing, structure deviation or attribute abnormality.
[0169] When the operation type is the authority operation type, the difference type mainly focuses on the authorization relationship between the permission configuration state and the permission subject and the target entity. The system retrieves the permission state information in the actual execution result value to confirm whether the permission subject has the necessary operation permission on the target entity. If the permission is missing or the permission level does not conform to the expectation, the system determines that it is a permission type difference.
[0170] When the operation type is the data operation type, the difference type is embodied as the state difference of the data content. The system compares the actual effect of the data operation with the expected value to detect whether the data addition, modification or deletion operation meets the set requirement, including whether the data record exists, the field value matches, the data range covers, etc.
[0171] After determining the difference type, the system queries the instruction revision policy library based on the combination condition of the operation type and the difference type. The policy library contains standardized revision policies and parameter generation rules for different operation types and difference types. The policy content covers three major categories of operation revision schemes: structure completion, permission configuration, and data adjustment. The system locates the revision policy entry corresponding to the current operation type and difference type through matching search. Based on the logical rules and parameter templates in the policy entry, it dynamically generates revision operation parameters that can be directly applied to the source instruction.
[0172] After generating the revision operation parameters, the system injects the parameters into the source instruction. The injection process includes the following steps: first, parse the complete structure of the source instruction and build its syntax tree structure representation based on the syntax rules; second, locate the syntax nodes related to the current difference type in the syntax tree, which are the parameter positions that need to be inserted or replaced; third, embed the generated revision operation parameters into the specified node positions according to the syntax requirements and structure specifications; finally, reconstruct the source instruction to ensure the closure of the syntax structure and the integrity of the logical chain, forming the revised source instruction with revision function.
[0173] The revised source instruction maintains the basic syntax framework and business logic of the source instruction, while eliminating the difference problem by supplementing or adjusting parameters. It has the integrity and accuracy to be re-executed. The system completes the automatic identification and efficient revision of the source instruction exception without human intervention, ensuring the stability and consistency of the instruction execution process.
[0174] Example: In a medical health information management system, a hospital needs to automatically update the patient information table in the electronic medical record management database through a batch script. The batch script includes operations such as creating a new table, granting access, and batch inserting patient basic data. For the verification needs of this batch script, the system first receives the script instruction data stream to be verified. The instruction data stream is transmitted through the script publishing channel of the medical health information platform. The system decodes the received instruction data stream into a text character sequence that conforms to the current database environment, and performs encoding integrity check on the character sequence to ensure that the character data is complete and meets the database instruction parsing requirements. After passing the check, the character sequence is extracted as the source instruction to be verified.
[0175] The system performs syntax analysis on the source instruction and constructs a structured syntax tree that conforms to the database syntax rules. By traversing the syntax tree structure, the system matches and identifies the operation keyword nodes in the instruction from the pre-set medical health script keyword library. For example, it identifies the CREATE, GRANT, INSERT, and other keyword nodes. Meanwhile, combined with the medical health script syntax policy library, the system locates the dependent nodes that have syntax association with the operation keyword nodes, and extracts the patient information table, authorized user group, and inserted data set as the operation targets.
[0176] The system further calls the configured type definitions to load the keyword templates of the structure operation type, the permission operation type, and the data operation type respectively. The system matches the parsed CREATE instruction with the keyword template of the structure operation type, identifies it as the structure operation type, matches the GRANT instruction with the keyword template of the permission operation type, identifies it as the permission operation type, and matches the INSERT instruction with the keyword template of the data operation type, identifies it as the data operation type. For each successfully matched keyword node, the system generates a corresponding structure operation type indicator, a permission operation type indicator, and a data operation type indicator, and corresponds each indicator to the operation type parsed from the current source instruction.
[0177] The system generates a verification condition for each operation according to the operation type and the operation target. When the operation type is the structure operation type, the system parses the patient information table as the database object identifier and generates a query condition to verify the existence of the patient information table. When the operation type is the permission operation type, the system parses the authorization relationship between the authorized user group and the patient information table and generates a permission state verification condition to verify whether the user group has the query and update permissions. When the operation type is the data operation type, the system parses the insertion data condition and the data content and generates a verification condition to verify the insertion state of the patient information data.
[0178] Based on the generated verification conditions, the system determines the condition type of each verification condition, which are respectively the object existence type, the permission state type, and the data state type. For the object existence type, the system calls the object existence query template to automatically load the standard query statement to query whether the patient information table exists. For the permission state type, the system calls the permission state query template to load the standard query statement to query the permission configuration of the current user group. For the data state type, the system calls the data state query template to load the standard query statement to query whether the patient data is successfully inserted and the field values are correct. The system extracts the verification parameters such as the patient information table name, the authorized user group identifier, the data condition field, and the inserted data field value from each verification condition, fills the extracted verification parameters into the corresponding query template, dynamically generates a complete verification query statement, and takes the generated verification query statement as the verification instruction.
[0179] The system loads and runs the generated verification instructions in the database instance of the hospital production environment, and the system obtains the execution result data of the verification instructions. For the structure operation type, the system extracts the actual execution result value of the patient information table existence state from the verification result, for the permission operation type, the actual permission state of the authorized user group is extracted, for the data operation type, the patient information data insertion result and the field value after insertion are extracted. The system queries the verification rule library to obtain the expected result value corresponding to the verification instruction, such as the patient information table should exist, the user group should have query and update permissions, the patient record should exist after data insertion, and the field value should be consistent with the inserted value.
[0180] The system compares the actual execution result value with the expected result value one by one, generates an execution success state when the results are consistent, and generates an execution failure state when the results are inconsistent, and takes the execution result state as the execution effect of the current source instruction.
[0181] In the case of verification result as execution failure state, the system determines the difference type of missing patient information table for structure operation type based on the operation type generated in the previous sequence. The system queries the instruction correction strategy library, retrieves the correction strategy entry according to the structure operation type and the difference type of missing object, generates the correction operation parameter, and the correction parameter is the complete table creation statement for creating the patient information table. The system injects the correction operation parameter into the source instruction, parses the source instruction structure, locates the syntax node of missing table creation in the source instruction, inserts the correction operation parameter into the node, reconstructs the syntax structure, forms the corrected source instruction, and the corrected source instruction contains the correct patient information table creation statement, which meets the execution requirements in the hospital production database environment.
[0182] This process automatically completes the verification and correction of batch scripts in the medical and health business scenario, and is suitable for the database maintenance process of the patient information management system, effectively reducing the problem of insufficient verification caused by human omission. The system realizes the whole process automation from source instruction parsing to automatic generation of verification instructions and automatic correction of failed instructions in actual application, ensuring the accuracy and security of hospital key business data processing.
[0183] In the field of financial technology business, a financial institution needs to perform batch account permission adjustment and transaction data initialization operations in the account management system. Through batch scripts, the database table structure is adjusted, account authorization is performed, and transaction data is written. In view of the verification needs of the batch script, the system first receives the script instruction data stream to be verified. The instruction data stream is transmitted through the automatic script publishing channel of the financial technology system. The system decodes the received instruction data stream in binary, converts it into a text character sequence that conforms to the current financial transaction database environment, and checks the encoding integrity of the text character sequence item by item to ensure that the character data is complete, the instruction format is accurate, and there is no data loss. After the verification is passed, the text character sequence is extracted as the source instruction to be verified.
[0184] The system strictly parses the source instruction, parses the structure of the financial transaction instruction through a syntax tree generation module, constructs a structured syntax tree that conforms to the financial database standard, and through traversing the syntax tree structure, the system matches the keyword nodes from the preset financial transaction script keyword library, identifies the operation keywords such as CREATE, GRANT, INSERT, etc., and through the financial script syntax strategy library, locates the instruction nodes that have a syntax dependency relationship with the operation keyword nodes. The system extracts the account transaction table associated with the CREATE node, the account administrator role associated with the GRANT node, and the initialization transaction data associated with the INSERT node as operation targets.
[0185] The system calls the configured type definition, loads the keyword templates of the structure operation type, the permission operation type, and the data operation type, and matches the extracted operation keywords. The CREATE instruction matches the structure operation type keyword template successfully, the GRANT instruction matches the permission operation type keyword template successfully, and the INSERT instruction matches the data operation type keyword template successfully. The system generates a structure operation type indicator, a permission operation type indicator, and a data operation type indicator, and corresponds each indicator to the operation type of the current source instruction.
[0186] The system generates corresponding verification conditions according to the operation type and the operation target. When the operation type is the structure operation type, the system extracts the account transaction table name as the database object identifier and generates the verification condition for the existence of the account transaction table. When the operation type is the permission operation type, the system extracts the account administrator role name and the account transaction table name and generates the account administrator permission verification condition. When the operation type is the data operation type, the system extracts the initialization transaction data condition and the data content and generates the state verification condition after the transaction data is inserted.
[0187] The system analyzes the condition type of each verification condition, classifies the account transaction table existence verification condition as an object existence type, classifies the account administrator permission verification condition as a permission state type, and classifies the transaction data state verification condition as a data state type. For the object existence type, the system automatically loads a query template for verifying the existence of the account transaction table, for the permission state type, loads a query template for verifying the account administrator permission configuration, and for the data state type, loads a query template for verifying the correctness of the transaction data insertion. The system extracts verification parameters such as the account transaction table name, the account administrator role name, and the transaction data field value, fills the extracted verification parameters into the corresponding query template, dynamically generates a verification query statement, and uses the generated verification query statement as a verification instruction.
[0188] The system loads and runs the generated verification instruction in the financial transaction database production environment, and obtains the execution result data of the verification instruction in real time. For the structure operation type, the system extracts the existence state of the account transaction table as the actual execution result value; for the permission operation type, the system extracts the account administrator permission configuration state as the actual execution result value; and for the data operation type, the system extracts the data entry and field value after the transaction data insertion as the actual execution result value. The system queries the verification rule library to obtain the expected result value corresponding to the verification instruction, including that the account transaction table must exist, the account administrator must have read and write permissions, and the transaction data must be successfully inserted and the field value must be accurate.
[0189] The system compares the actual execution result value with the expected result value one by one, generates an execution success state when the actual execution result value is equal to the expected result value, and generates an execution failure state when the actual execution result value is not equal to the expected result value, and uses the execution success state or the execution failure state as the execution effect of the source instruction.
[0190] When the verification result is the execution failure state, the system determines the difference type of the operation failure based on the operation type obtained from the previous analysis. For example, the account transaction table does not exist, the account administrator permission configuration is missing, or the transaction data field value does not match. The system queries the preset instruction correction strategy library based on the operation type and the difference type to retrieve the correction rule that matches the current difference situation. For the structure operation type and the table missing difference type, the system generates account transaction table creation parameters; for the permission operation type and the permission missing difference type, the system generates account administrator permission authorization parameters; and for the data operation type and the data field value mismatch difference type, the system generates transaction data field correction parameters. The system injects the generated correction operation parameters into the source instruction, analyzes the syntax structure of the source instruction, accurately locates the instruction node that needs to be corrected, replaces the node content with the correction operation parameters, reconstructs the syntax tree, generates the corrected source instruction, and the corrected source instruction meets the production requirements of the financial transaction database environment.
[0191] During the whole process, the system automatically completes the verification and correction of batch scripts in the field of financial technology business, and is suitable for database maintenance of account management systems, transaction record systems and financial statement systems. Through full-process automatic verification and automatic correction instructions, the system reduces the manual intervention intensity of financial script verification, avoids the problem of insufficient verification caused by manual omission, and effectively improves the accuracy and efficiency of financial script verification. The system supports batch instruction verification in complex account management scenarios, ensures the security and consistency of financial transaction data, and improves the stability of batch operations of financial institutions.
[0192] In this embodiment, the operation type of the source instruction is dynamically identified, and the joint query strategy library is based on the operation type and the difference type. The system can intelligently and accurately match the most suitable correction scheme, ensuring the pertinence and effectiveness of the correction parameters. The injection of correction operation parameters avoids spelling errors and logical omissions under manual intervention, improving the efficiency and accuracy of the instruction correction process. The overall process realizes automatic analysis and correction of source instruction exceptions, reduces time waste and human errors caused by manual troubleshooting and repair, reduces risks in database structure changes, permission configuration adjustments and data operation processes, improves system stability and business continuity, effectively meets the requirements of high reliability and high efficiency of instruction management and operation and maintenance.
[0193] In an embodiment, an instruction execution effect verification device is provided, which corresponds to the instruction execution effect verification method in the above embodiments. Referring to Figure 3 , Figure 3 A functional module schematic diagram of a preferred embodiment of the instruction execution effect verification device of the present application is shown. The source instruction analysis module 10, the operation type determination module 20, the verification condition generation module 30, the verification instruction construction module 40 and the effect verification module 50. The detailed description of each functional module is as follows:
[0194] The source instruction analysis module 10 is used to obtain the source instruction to be verified, and analyze the source instruction to extract the operation keyword and operation target in the source instruction;
[0195] The operation type determination module 20 is used to match the operation keyword with the preset type definition to determine the operation type of the source instruction;
[0196] The verification condition generation module 30 is used to determine the verification condition for verifying the execution effect of the source instruction according to the operation type and the operation target;
[0197] The verification instruction construction module 40 is used to generate a verification instruction based on the verification condition;
[0198] The effect verification module 50 is used to execute the verification instruction to verify the execution effect of the source instruction.
[0199] In an embodiment, the source instruction parsing module 10 is specifically configured to:
[0200] receive an instruction data stream, and perform binary decoding on the instruction data stream to generate a text character sequence;
[0201] check the encoding integrity of the text character sequence, and when the check passes, take the text character sequence as a source instruction to be verified;
[0202] perform syntax analysis on the source instruction to generate a structured syntax tree;
[0203] traverse the structured syntax tree, match entries in a preset keyword library, and identify an operation keyword node in the structured syntax tree;
[0204] based on a syntax strategy library, locate a dependent node in the structured syntax tree that has a syntax association with the operation keyword node;
[0205] extract the content of the operation keyword node as an operation keyword, and extract the content of the dependent node as an operation target.
[0206] In an embodiment, the operation type determination module 20 is specifically configured to:
[0207] call a preset type definition including a structure operation type, an authority operation type, and a data operation type;
[0208] match the operation keyword with a keyword template corresponding to the structure operation type, and when the operation keyword is a creation instruction or a modification instruction, determine that the matching is successful and generate a structure operation type indicator;
[0209] match the operation keyword with a keyword template corresponding to the authority operation type, and when the operation keyword is an authorization instruction or a revocation instruction, determine that the matching is successful and generate an authority operation type indicator;
[0210] match the operation keyword with a keyword template corresponding to the data operation type, and when the operation keyword is an insertion instruction or an update instruction, determine that the matching is successful and generate a data operation type indicator;
[0211] based on the generated indicators, determine that the operation type is the structure operation type, the authority operation type, or the data operation type.
[0212] In an embodiment, the verification condition generation module 30 is specifically configured to:
[0213] identify whether the operation type is the structure operation type, the authority operation type, or the data operation type;
[0214] When the operation type is a structure operation type, parse the database object identifier in the operation target, and generate an object existence verification condition based on the database object identifier;
[0215] When the operation type is a permission operation type, parse the permission subject identifier and the permission target entity identifier in the operation target, and generate a permission state verification condition based on the permission subject identifier and the permission target entity identifier;
[0216] When the operation type is a data operation type, parse the data operation condition and the data operation content in the operation target, and generate a data state verification condition based on the data operation condition and the data operation content;
[0217] The object existence verification condition, the permission state verification condition or the data state verification condition is taken as the verification condition.
[0218] In an embodiment, the verification instruction construction module 40 is specifically configured to:
[0219] Determine a condition type corresponding to the verification condition, the condition type including an object existence type, a permission state type or a data state type;
[0220] When the condition type is the object existence type, an object existence query template is obtained;
[0221] When the condition type is the permission state type, a permission state query template is obtained;
[0222] When the condition type is the data state type, a data state query template is obtained;
[0223] Extract a verification parameter in the verification condition;
[0224] Fill the verification parameter into the corresponding query template, generate a verification statement, and take the verification statement as a verification instruction.
[0225] In an embodiment, the effect verification module 50 is specifically configured to:
[0226] Load and run the verification instruction in a target execution environment, and obtain execution result data;
[0227] Extract an actual execution result value from the execution result data, and obtain an expected result value corresponding to the verification instruction;
[0228] Compare the actual execution result value with the expected result value;
[0229] When the actual execution result value is equal to the expected result value, generate an execution success state;
[0230] generating an execution failure state when the actual execution result value is not equal to the expected result value;
[0231] taking the execution success state or the execution failure state as an execution effect of the source instruction.
[0232] In an embodiment, the effect verification module 50 is specifically configured to:
[0233] when the execution effect is the execution failure state, determining a difference type of the actual execution result value and the expected result value based on an operation type of the source instruction;
[0234] querying a preset instruction correction strategy library based on the operation type and the difference type, and generating a correction operation parameter according to the instruction correction strategy library;
[0235] injecting the correction operation parameter into the source instruction to generate a corrected source instruction.
[0236] In one embodiment, a computer device is provided, which can be a server, and an internal structure diagram thereof can be as shown in Figure 4 The computer device includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is configured to provide determination and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium, an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with an external user terminal through a network connection. The computer program is executed by the processor to implement the functions or steps of the instruction execution effect verification method on the server side.
[0237] In one embodiment, a computer device is provided, which can be a user terminal, and an internal structure diagram thereof can be as shown in Figure 5 The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. The processor of the computer device is configured to provide determination and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with an external server through a network connection. The computer program is executed by the processor to implement the functions or steps of the instruction execution effect verification method on the user terminal side
[0238] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable in the processor, wherein the processor implements the following steps when executing the computer program:
[0239] obtaining a source instruction to be verified, and parsing the source instruction to extract an operation keyword and an operation target in the source instruction;
[0240] matching the operation keyword with a preset type definition to determine an operation type of the source instruction;
[0241] determining a verification condition for verifying an execution effect of the source instruction according to the operation type and the operation target;
[0242] combining the verification condition to generate a verification instruction;
[0243] executing the verification instruction to verify the execution effect of the source instruction.
[0244] In one embodiment, a computer readable storage medium is provided, which stores a computer program executable in a processor, wherein the processor implements the following steps when executing the computer program:
[0245] obtaining a source instruction to be verified, and parsing the source instruction to extract an operation keyword and an operation target in the source instruction;
[0246] matching the operation keyword with a preset type definition to determine an operation type of the source instruction;
[0247] determining a verification condition for verifying an execution effect of the source instruction according to the operation type and the operation target;
[0248] combining the verification condition to generate a verification instruction;
[0249] executing the verification instruction to verify the execution effect of the source instruction.
[0250] It should be noted that the functions or steps that the computer readable storage medium or the computer device can implement correspond to the descriptions of the server side and the user side in the foregoing method embodiments, and will not be described again here to avoid repetition.
[0251] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, database or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0252] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
[0253] It should be noted that if non-company software tools or components appear in the embodiments of the present application, they are only used for example introduction and do not represent actual use. The above-described embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. An instruction execution effect verification method characterized by comprising: The method comprises the following steps: obtaining a source instruction to be verified, and parsing the source instruction to extract an operation keyword and an operation target in the source instruction; matching the operation keyword with a preset type definition to determine an operation type of the source instruction; determining a verification condition for verifying an execution effect of the source instruction according to the operation type and the operation target; combining the verification condition to generate a verification instruction; executing the verification instruction to verify the execution effect of the source instruction.
2. The instruction execution effect verification method of claim 1, wherein The method comprises the following steps: receiving an instruction data stream, and performing binary decoding on the instruction data stream to generate a text character sequence; checking the encoding integrity of the text character sequence, and taking the text character sequence as the source instruction to be verified when the checking passes; performing syntax analysis on the source instruction to generate a structured syntax tree; traversing the structured syntax tree, matching entries in a preset keyword library, and identifying an operation keyword node in the structured syntax tree; locating a dependent node that has a syntax association with the operation keyword node in the structured syntax tree based on a syntax strategy library; extracting the content of the operation keyword node as an operation keyword, and extracting the content of the dependent node as an operation target.
3. The instruction execution effect verification method of claim 1, wherein The method comprises the following steps: calling a preset type definition comprising a structure operation type, an authority operation type, and a data operation type; matching the operation keyword with a keyword template corresponding to the structure operation type, and determining that the matching is successful and generating a structure operation type indicator when the operation keyword is a creation instruction or a modification instruction; matching the operation keyword with a keyword template corresponding to the authority operation type, and determining that the matching is successful and generating an authority operation type indicator when the operation keyword is an authorization instruction or a revocation instruction; matching the operation keyword with a keyword template corresponding to the data operation type, and determining that the matching is successful and generating a data operation type indicator when the operation keyword is an insertion instruction or an update instruction; determining the operation type to be the structure operation type, the authority operation type, or the data operation type based on the generated indicators.
4. The instruction execution effect verification method of claim 1, wherein The method comprises the following steps: identifying whether the operation type is the structure operation type, the authority operation type, or the data operation type; when the operation type is the structure operation type, parsing a database object identifier in the operation target, and generating an object existence verification condition based on the database object identifier; when the operation type is the authority operation type, parsing an authority subject identifier and an authority target entity identifier in the operation target, and generating an authority state verification condition based on the authority subject identifier and the authority target entity identifier. When the operation type is a data operation type, a data operation condition and a data operation content in the operation target are parsed, and a data state verification condition is generated based on the data operation condition and the data operation content; The object existence verification condition, the permission state verification condition, or the data state verification condition is taken as the verification condition.
5. The instruction execution effect verification method of claim 1, wherein Based on the verification condition, a verification instruction is generated, including: Determining a condition type corresponding to the verification condition, the condition type including an object existence type, a permission state type, or a data state type; When the condition type is the object existence type, an object existence query template is obtained; When the condition type is the permission state type, a permission state query template is obtained; When the condition type is the data state type, a data state query template is obtained; Verification parameters in the verification condition are extracted; The verification parameters are filled into the corresponding query template, a verification statement is generated, and the verification statement is taken as the verification instruction.
6. The instruction execution effect verification method of claim 1, wherein The verification instruction is executed to verify an execution effect of the source instruction, including: The verification instruction is loaded and run in a target execution environment to obtain execution result data; An actual execution result value is extracted from the execution result data, and an expected result value corresponding to the verification instruction is obtained; The actual execution result value and the expected result value are compared; When the actual execution result value is equal to the expected result value, an execution success state is generated; When the actual execution result value is not equal to the expected result value, an execution failure state is generated; The execution success state or the execution failure state is taken as the execution effect of the source instruction.
7. The instruction execution effect verification method of claim 1, wherein After the verification instruction is executed to verify the execution effect of the source instruction, the method further includes: When the execution effect is the execution failure state, a difference type of the actual execution result value and the expected result value is determined based on the operation type of the source instruction; Based on the operation type and the difference type, a preset instruction correction strategy library is queried, and a correction operation parameter is generated according to the instruction correction strategy library; The correction operation parameter is injected into the source instruction to generate a corrected source instruction.
8. An instruction execution effect verification apparatus characterized by comprising: The instruction execution effect verification device includes: A source instruction analysis module is configured to obtain a source instruction to be verified and analyze the source instruction to extract an operation keyword and an operation target in the source instruction; An operation type determination module is configured to match the operation keyword with a preset type definition to determine an operation type of the source instruction; A verification condition generation module is configured to determine a verification condition for verifying an execution effect of the source instruction according to the operation type and the operation target; A verification instruction construction module is configured to generate a verification instruction based on the verification condition; An effect verification module is configured to execute the verification instruction to verify the execution effect of the source instruction.
9. A computer device, comprising: The computer device includes a memory, a processor, and an instruction execution effect verification program stored on the memory and executable on the processor, and the instruction execution effect verification program, when executed by the processor, implements the steps of the instruction execution effect verification method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium has stored thereon an instruction execution effect verification program, and the instruction execution effect verification program, when executed by the processor, implements the steps of the instruction execution effect verification method according to any one of claims 1-7.