Target service verification method, electronic equipment and computer readable storage medium
By obtaining fact objects and converting business logic into data, the separation of business logic and technical logic is achieved, and the operation logic to be verified is generated and verification is performed, the problem of low verification efficiency of business logic is solved, and efficient business logic verification is achieved.
Patent Information
- Application Number
- CN202411873653.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, the verification efficiency of business logic is low, which makes the verification of business operation logic difficult and inefficient.
By obtaining the fact object that matches the verification request message, and converting the business logic into data and storing it in the fact object, the separation of the business logic and the technical logic is achieved, thereby generating the verification operation logic for the target service, and determining the verification execution type based on the configuration information to perform verification.
It realizes flexible verification of target services, effectively improving the verification efficiency of business logic, and reducing the cost of business logic management.
Smart Images

Figure CN119760697A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a verification method for a target business, an electronic device and a computer-readable storage medium. Background Art
[0002] With the rapid development of communication technology, more and more companies have realized the importance of information technology. As information technology can bring great convenience to the industry, more and more industries are using information technology to realize the originally complex offline businesses. However, with the informatization of various industries, the program codes corresponding to the informatization businesses of various industries are becoming more and more complex. In order to ensure the normal operation of the business, it is necessary to manage the business logic of the program code. However, the business verification logic in related technologies is often coupled with the technical logic, which makes it difficult to verify the business verification logic, so that the verification efficiency of the business operation logic is low.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a method for verifying a target business, an electronic device, and a computer-readable storage medium, so as to at least solve the technical problem of low verification efficiency of business logic in the related art.
[0005] According to one aspect of an embodiment of the present invention, a verification method for a target business is provided, comprising: in response to receiving a verification request message of the target business, obtaining a fact object matching the verification request message, wherein the fact object is used to represent the entity object to be verified in the verification request message; based on the verification request message and the fact object, generating an operation logic to be verified corresponding to the target business; determining a verification execution type of the target business based on configuration information of the operation logic to be verified, wherein the verification execution type is used to represent a verification method for the operation logic to be verified; and verifying the operation logic to be verified based on the verification execution type to obtain a verification result, wherein the verification result is used to determine whether an abnormality occurs in the operation logic to be verified of the target business.
[0006] Furthermore, based on the verification request message and the fact object, the operation logic to be verified corresponding to the target business is generated, including: filling in the attributes of the fact object based on the verification request message to obtain the fact object information; retrieving the business verification rules corresponding to the target business based on the identification information of the target business; and generating the operation logic to be verified based on the business verification rules and the fact object information.
[0007] Furthermore, based on the verification execution type, the running logic to be verified is verified to obtain a verification result, including: in response to the verification execution type being a custom verification execution type, obtaining pre-configured custom class information, and verifying the running logic to be verified based on the implementation class corresponding to the custom class information to obtain a verification result; in response to the verification execution type being an expression verification execution type, obtaining pre-configured expression information, loading the object properties corresponding to the running logic to be verified based on the expression information, and verifying the running logic to be verified based on the loading result of the object properties to obtain a verification result.
[0008] Furthermore, the method also includes: verifying the expression information based on preset conditions to obtain a verification result, wherein the verification result is used to indicate whether the expression information meets the preset conditions; in response to the verification result being that the expression information meets the preset conditions, executing loading of object properties corresponding to the running logic to be verified based on the expression information.
[0009] Furthermore, the running logic to be verified is verified based on the loading result of the object attributes to obtain a verification result, including: in response to the loading result being that the object attributes have been loaded, the running logic to be verified is verified based on the object attributes to obtain a verification result; in response to the loading result being that the object attributes have not been loaded, the object attributes associated with the expression information are loaded from the running logic to be verified, and the running logic to be verified is verified based on the object attributes to obtain a verification result.
[0010] Furthermore, obtaining the fact object that matches the verification request message includes: obtaining tenant information, business category information and business scenario information in the verification request message, wherein the tenant information is used to represent the information of the tenant corresponding to the target business, the business category information is used to represent the information of the business category corresponding to the target business, and the business scenario information is used to represent the information of the business scenario involved in the target business; determining the fact object based on the tenant information, business category information and business scenario information.
[0011] Furthermore, determining fact objects based on tenant information, business category information and business scenario information includes: obtaining fact objects corresponding to the tenant information, business category information and business scenario information based on preset corresponding relationships, wherein the preset corresponding relationships are used to represent the corresponding relationships between the tenant information, business category information and business scenario information and the fact objects.
[0012] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.
[0013] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0014] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0015] According to another aspect of the embodiments of the present invention, a computer program is provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.
[0016] In an embodiment of the present invention, in response to receiving a verification request message of a target business, a fact object matching the verification request message is obtained; based on the verification request message and the fact object, the to-be-verified operation logic corresponding to the target business is generated; based on the configuration information of the to-be-verified operation logic, the verification execution type of the target business is determined; based on the verification execution type, the to-be-verified operation logic is verified to obtain a verification result. This application achieves the separation of business logic and technical logic by obtaining a fact object matching the verification request message and converting the business logic into data and storing it in the fact object, thereby achieving the purpose of flexibly verifying the target business, thereby achieving the technical effect of effectively improving the verification efficiency of the business logic, and further solving the technical problem of low verification efficiency of the business logic in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 is a flow chart of an optional target service verification method according to an embodiment of the present invention;
[0019] Figure 2 is a flowchart of another optional target service verification method according to an embodiment of the present invention;
[0020] Figure 3 is a flow chart of an optional verification method for airline business according to an embodiment of the present invention;
[0021] Figure 4 is a schematic structural diagram of an optional target service verification device according to an embodiment of the present invention;
[0022] Figure 5It is a schematic diagram of the structure of an optional target service verification device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] According to an embodiment of the present invention, an embodiment of a method for verifying a target business is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a 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 here.
[0026] Figure 1 is a flow chart of an optional target service verification method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0027] Step S102: in response to receiving a verification request message of a target service, obtaining a fact object matching the verification request message, wherein the fact object is used to represent an entity object to be verified in the verification request message.
[0028] The above-mentioned target business refers to an information-based business. The above-mentioned target business needs to be implemented in a computer through program code. In this application, the above-mentioned target business needs to be verified to determine whether the business logic of the above-mentioned target business is correct. Among them, the above-mentioned target business includes but is not limited to: inventory verification business, data entry business, identity authentication business, transaction verification business, tax declaration business, order verification business, security vulnerability scanning business or product inspection business, etc.
[0029] The user terminal is a terminal device used to send a verification request of the target service to the server corresponding to the target service. The user can control the server corresponding to the target service to verify the target service through the user terminal. The user terminal includes but is not limited to: computers, mobile phones, tablets or user servers.
[0030] The above-mentioned verification request message (Verification Request Message, referred to as VRM) refers to a message used to verify and confirm information in network communication. In this application, a user can send a verification request message to a server corresponding to a target service through a user terminal. After receiving the above-mentioned verification request message, the server corresponding to the target service verifies the above-mentioned target service.
[0031] The above-mentioned fact object (Fact Object) refers to an entity object determined by a preset corresponding relationship in the business operation logic based on tenant information, business category information and business scenario information. These entity objects encapsulate specific business data and attributes, and are the basis for the rule engine to perform verification and decision-making. In the present application, the above-mentioned fact object is matched with the above-mentioned verification request message, and the business logic of the above-mentioned target business is converted into data and stored in the above-mentioned fact object, so as to generate the operation logic to be verified corresponding to the above-mentioned target business through the above-mentioned fact object and the above-mentioned verification request message, so as to verify the business logic of the above-mentioned target business. Among them, the above-mentioned fact objects include but are not limited to: customers, orders, goods, suppliers, logistics, contracts, finance, employees or projects, etc.
[0032] In an optional embodiment, a user may send a verification request message to a server corresponding to the target service through a user terminal. After receiving the verification request of the target service, the server corresponding to the target service determines the fact object that matches the verification request message based on the entity object to be verified in the verification request message.
[0033] In another optional embodiment, a fact object determination model may be pre-established. After receiving the verification request of the target business, the server corresponding to the target business takes the verification request of the target business as input, inputs it into the fact object determination model, and outputs the fact object that matches the verification request message.
[0034] Furthermore, the user can hash the verification request message through the user terminal, encrypt the hash value with the private key, and generate a digital signature. After receiving the message, the server corresponding to the target service will use the sender's public key to decrypt the digital signature and hash the message itself, and compare the two hash values to verify the integrity and source of the message. After receiving the verification request of the target service, the server corresponding to the target service determines the fact object that matches the verification request message based on the entity object to be verified in the verification request message.
[0035] Furthermore, the user can also convert the verification request message into a hash value of fixed length through a hash function. The user terminal calculates the hash value of the verification request message and sends the hash value together with the verification request message to the server corresponding to the above-mentioned target business. After receiving the above-mentioned verification request message, the server corresponding to the target business recalculates the hash value and compares it with the hash value calculated by the user terminal to verify the correctness of the verification request message. After verifying that the verification request message is correct, the fact object that matches the verification request message is determined based on the entity object to be verified in the verification request message.
[0036] Exemplarily, in the case where the target service is an identity authentication service, the user sends a verification request message corresponding to the identity authentication service to the server corresponding to the identity authentication service through the user terminal. After the server receives the verification request message corresponding to the above identity authentication service, it determines that the entity object to be verified in the above verification request message is the customer, and determines that the fact object that matches the verification request message is the customer.
[0037] In the present application, a verification request message is used to obtain the entity object to be verified in the verification request message, that is, the fact object that matches the verification request message. The separation of business logic and technical logic is achieved through the fact object, which effectively improves the flexibility of business logic verification and reduces the cost of verifying the business logic of the target business.
[0038] Step S104: Generate the to-be-verified operation logic corresponding to the target business based on the verification request message and the fact object.
[0039] The above operation logic refers to the basic rules, principles and processes followed by enterprises or organizations when carrying out business activities. The above business operation logic involves various aspects such as business planning, execution, monitoring and optimization. The correctness of the operation logic can ensure the safe and stable operation of the above target business. The above operation logic is the logic of the operation of the above target business.
[0040] In an optional embodiment, after obtaining the verification request message and the fact object, the fact object may be filled according to the verification request message to obtain the to-be-verified operation logic corresponding to the target business.
[0041] In another optional embodiment, a model for obtaining the operating logic to be verified can be established in advance. After obtaining the verification request message and the fact object, the verification request and the fact object are used as inputs of the above-mentioned model for obtaining the operating logic to be verified, and the above-mentioned model for obtaining the operating logic to be verified is input to output the operating logic to be verified corresponding to the target business.
[0042] In this application, the operating logic to be verified corresponding to the target business is generated by verifying the request and the fact object, which effectively improves the rate of obtaining the operating logic to be verified, thereby improving the rate of verifying the target business and improving the user experience.
[0043] Step S106: determining the verification execution type of the target service based on the configuration information of the running logic to be verified, wherein the verification execution type is used to indicate the verification method of the running logic to be verified.
[0044] The above configuration information refers to the information configured in the program corresponding to the running logic to be verified, wherein the above configuration information includes but is not limited to: field name, field description, field type, default value, primary key, index and remarks, etc. In this application, the verification execution type of the target business is determined by the configuration information of the running logic to be verified.
[0045] The above-mentioned verification execution type (Verification Execution Type, referred to as VET) refers to a series of methods and processes in the field of computer science and software development, which are used to ensure that the code or system is executed and runs as expected. These methods and processes can help developers discover and fix potential errors, defects or loopholes to improve the quality and reliability of the software. In this application, the verification execution type of the target business is determined by the configuration information of the running logic to be verified to determine the verification method for the running logic to be verified. In this application, the above-mentioned verification execution type is divided into a custom class verification execution body and an expression execution body.
[0046] In an optional embodiment, after obtaining the running logic to be verified, the configuration information corresponding to the running logic to be verified can be determined, and the verification execution type of the target business can be determined as a custom class verification execution body or an expression execution body based on the configuration information in the program corresponding to the running logic to be verified, so as to indicate the verification method for the running logic to be verified.
[0047] In another optional embodiment, a verification execution type determination model may be established in advance. After determining the configuration information corresponding to the running logic to be verified, the configuration information corresponding to the running logic to be verified may be input into the above-mentioned verification execution type determination model as input, and the verification execution type of the output target business may be a custom class verification execution body or an expression execution body.
[0048] In the present application, the verification execution type of the target business is quickly determined by configuring information to indicate the verification method for the verification operation logic, which effectively improves the verification rate of the target business and improves the user experience.
[0049] Step S108, verifying the running logic to be verified based on the verification execution type to obtain a verification result, wherein the verification result is used to determine whether the running logic to be verified of the target business is abnormal.
[0050] The above-mentioned verification result refers to the verification result obtained after verifying the above-mentioned target business operation logic. In the present application, the verification methods corresponding to different verification execution types are different. Therefore, it is necessary to verify the verification operation logic according to the verification execution type to obtain a verification result that the target business's operation logic to be verified has an abnormality, or that the target business's operation logic to be verified has no abnormality.
[0051] In an optional embodiment, after obtaining the verification execution type, the information of the custom class verification execution body and / or the information of the expression execution body can be pre-configured, and the corresponding pre-configured custom class verification execution body information and / or the expression execution body information can be selected according to the verification execution type to verify the running logic to be verified, and a verification result is obtained that the running logic to be verified of the target business has an abnormality, or that the running logic to be verified of the target business has no abnormality.
[0052] In another optional embodiment, a verification result acquisition model may be established in advance, and the verification execution type and the operating logic to be verified may be used as inputs of the verification result acquisition model, and input into the verification result acquisition model to output a verification result indicating that an abnormality has occurred in the operating logic to be verified of the target business, or that no abnormality has occurred in the operating logic to be verified of the target business.
[0053] In this application, the operation logic to be verified is verified through different verification execution types to obtain more accurate verification results, which effectively improves the accuracy of verification of the target business and effectively improves the user experience.
[0054] Through the above steps, in response to receiving the verification request message of the target business, a fact object matching the verification request message is obtained; based on the verification request message and the fact object, the operation logic to be verified corresponding to the target business is generated; based on the configuration information of the operation logic to be verified, the verification execution type of the target business is determined; based on the verification execution type, the operation logic to be verified is verified to obtain a verification result. This application realizes the separation of business logic and technical logic by obtaining a fact object matching the verification request message and converting the business logic into data and storing it in the fact object, thereby achieving the purpose of flexibly verifying the target business, thereby achieving the technical effect of effectively reducing the cost of business logic management, and further solving the technical problem of low verification efficiency of business logic in related technologies.
[0055] Optionally, based on the verification request message and the fact object, the operation logic to be verified corresponding to the target business is generated, including: filling in the attributes of the fact object based on the verification request message to obtain the fact object information; retrieving the business verification rules corresponding to the target business based on the identification information of the target business; and generating the operation logic to be verified based on the business verification rules and the fact object information.
[0056] The above-mentioned factual object information refers to the specific information corresponding to the above-mentioned factual object. When the factual object is a customer, the above-mentioned factual object information includes but is not limited to: customer name, customer contact information or customer address, etc.; when the factual object is a product, the above-mentioned factual object information includes but is not limited to: product name, product specifications, product price or product inventory, etc.
[0057] The above identification information refers to the identification information of the target business. Different target businesses have different identification information. Therefore, the specific target business can be determined through the identification information of the target business, and the business verification rules corresponding to the target business can also be retrieved. Among them, the above identification information can be set according to the target business, the above identification information can also be manually set according to experience and needs, and the above identification information can also be set according to the actual application scenario.
[0058] The above-mentioned business verification rules refer to rules for verifying the above-mentioned target business. The above-mentioned business verification rules are a set of conditions and actions that define verification behavior. The above-mentioned business verification rules are used to verify the above-mentioned target business.
[0059] In an optional embodiment, a relationship table between business and fact objects can be established in advance, wherein the above-mentioned business and fact object relationship table contains information corresponding to the above-mentioned target business. After obtaining the verification request and the fact object, the fact object information corresponding to the fact object in the information corresponding to the target business is determined in the business and fact object relationship table according to the verification request. After obtaining the fact object information, the business verification rules corresponding to the target business are obtained in the business and implementation object relationship table, and the target business to be verified running logic is generated according to the business verification rules and the fact object information.
[0060] In another optional embodiment, a fact object information acquisition module can be established in advance, and the verification request message and the fact object can be input into the above-mentioned fact object information acquisition module as input, and the fact object information corresponding to the fact object in the information corresponding to the target business is output. After obtaining the fact object information, the business verification rules corresponding to the target business are obtained in the business and implementation object relationship table, and the target business to be verified running logic is generated according to the business verification rules and the fact object information.
[0061] In this application, the business verification rules corresponding to the target business are retrieved through fact object information, and the running logic to be verified is accurately generated according to the business verification rules and fact object information, which effectively improves the accuracy of generating the running logic to be verified and improves the user experience.
[0062] Optionally, the running logic to be checked is checked based on the check execution type to obtain a check result, including: in response to the check execution type being a custom check execution type, obtaining pre-configured custom class information, and checking the running logic to be checked based on the implementation class corresponding to the custom class information to obtain a check result; in response to the check execution type being an expression check execution type, obtaining pre-configured expression information, loading the object properties corresponding to the running logic to be checked based on the expression information, and checking the running logic to be checked based on the loading result of the object properties to obtain a check result.
[0063] The above custom validation execution types refer to validation rules or validation methods created by developers based on specific requirements and business logic during programming and software development. These validation rules or methods are used to verify the legitimacy, integrity and consistency of data to ensure that the application can correctly process input data and prevent errors and abnormal situations.
[0064] The above expression verification execution type generally refers to the methods and steps for verifying and executing expressions during programming and software development. This process involves checking the syntax, semantics, and runtime behavior of expressions to ensure that the expressions produce the expected results when executed and do not cause program errors or exceptions.
[0065] The above-mentioned custom class refers to a class defined by the developer in a programming language according to specific requirements and functions. In this application, the above-mentioned custom class refers to a custom class whose verification execution type is a custom verification execution type.
[0066] The above implementation class refers to a class that implements one or more interfaces in object-oriented programming, and the implementation class provides a specific implementation method. In this application, the verification of the operation logic to be verified is implemented through the above implementation class, the corresponding target business is implemented through the above implementation class, and the verification result of the verification operation logic is determined.
[0067] In an optional embodiment, after determining the above-mentioned verification execution type, the verification method of the above-mentioned target business is distinguished according to the above-mentioned verification execution type. When the above-mentioned verification instruction type is a custom verification execution type, a rule execution table can be pre-configured, and the pre-configured custom class information can be directly obtained in the rule execution table, and the method in the specific implementation class corresponding to the rule is executed. After the target business is completed, the above-mentioned verification result is determined according to the completion of the target business. When the target business is completed, the above-mentioned verification result is determined to be that the operation logic to be verified of the target business has no abnormality. When the target business is not completed, the above-mentioned verification result is determined to be that the operation logic to be verified of the target business has an abnormality. When the verification execution type is an expression verification execution type, a rule execution table can be pre-configured, and expression information can be pre-set in the rule execution table, and the object attribute corresponding to the operation logic to be verified can be loaded according to the expression information. The above-mentioned expression can be executed through the object attribute to obtain the execution result of the expression, and the verification result of the operation logic can be determined according to the execution result of the expression. When the expression is successfully executed, it is determined that the above-mentioned verification result is that the operation logic to be verified of the target business has no abnormality. When the expression is not successfully executed, it is determined that the above-mentioned verification result is that the operation logic to be verified of the target business has an abnormality.
[0068] In this application, the target business is verified according to different verification execution types, which effectively improves the accuracy of the verification of the target business and improves the user experience.
[0069] Optionally, the method also includes: verifying the expression information based on preset conditions to obtain a verification result, wherein the verification result is used to indicate whether the expression information meets the preset conditions; in response to the verification result being that the expression information meets the preset conditions, executing loading of object properties corresponding to the running logic to be verified based on the expression information.
[0070] The above-mentioned preset conditions refer to the pre-set conditions for detecting the expression. The above-mentioned preset conditions can be set according to the expression, the above-mentioned preset conditions can also be set manually according to experience and needs, and the above-mentioned preset conditions can also be set according to the actual application scenario. Among them, the above-mentioned preset conditions include but are not limited to: static syntax analysis, type checking and dependency analysis.
[0071] In an optional embodiment, a rule execution table can be established in advance, and the expression information is configured in the above rule execution table. Based on the information of the expression, combined with the static syntax analysis method, the static analysis capability of the rule engine or expression engine is used to perform a syntax check on the expression to determine whether the expression has a syntax error; based on the information of the expression, the types of all objects and attributes involved in the expression are checked to determine that the types of all objects and attributes are the same as the types defined in the database, and analyze whether all objects and attributes referenced in the expression are correctly declared and configured. When the expression has no syntax errors, the types of all objects and attributes are the same as the types defined in the database, and all objects and attributes referenced in the expression are correctly declared and configured, it is determined that the expression information meets the preset conditions. When the expression information meets the preset conditions, the object attributes corresponding to the running logic to be verified are loaded based on the expression information.
[0072] In this application, the expression information is verified by preset conditions, which effectively improves the accuracy of obtaining the verification results, effectively improves the accuracy of verifying the target business, and improves the user experience.
[0073] Optionally, the running logic to be verified is verified based on the loading result of the object attributes to obtain a verification result, including: in response to the loading result being that the object attributes have been loaded, the running logic to be verified is verified based on the object attributes to obtain a verification result; in response to the loading result being that the object attributes have not been loaded, the object attributes associated with the expression information are loaded from the running logic to be verified, and the running logic to be verified is verified based on the object attributes to obtain a verification result.
[0074] The above loading result refers to the result used to determine whether the object attribute corresponding to the expression is loaded. When the expression is legal, it is necessary to determine whether the object corresponding to the execution expression is loaded normally.
[0075] In an optional embodiment, after judging whether the expression is legal, it is judged whether the object attribute corresponding to the expression is loaded to obtain the loading result. When the loading result is that the object attribute has been loaded, the expression is executed based on the object attribute to obtain the execution result of the expression, and the verification result of the operation logic is determined according to the execution result of the expression. When the expression is successfully executed, it is determined that the above verification result is that the operation logic to be verified of the target business has no abnormality. When the expression is not successfully executed, it is determined that the above verification result is that the operation logic to be verified of the target business has an abnormality. When the loading result is that the object attribute is not loaded, the object attribute associated with the operation logic to be verified and the expression information can be determined from the pre-established rule execution table, and the expression is executed based on the object attribute to obtain the execution result of the expression, and the verification result of the operation logic is determined according to the execution result of the expression. When the expression is successfully executed, it is determined that the above verification result is that the operation logic to be verified of the target business has no abnormality. When the expression is not successfully executed, it is determined that the above verification result is that the operation logic to be verified of the target business has an abnormality.
[0076] In the present application, by loading the object properties associated with the expression information from the running logic to be verified, when the loading result is that the object properties are not loaded, the running logic to be verified can still be verified, which effectively improves the applicability of the target business verification method and improves the user experience.
[0077] Optionally, obtaining a fact object that matches the verification request message includes: obtaining tenant information, business category information and business scenario information in the verification request message, wherein the tenant information is used to represent information about the tenant corresponding to the target business, the business category information is used to represent information about the business category corresponding to the target business, and the business scenario information is used to represent information about the business scenario involved in the target business; determining the fact object based on the tenant information, business category information and business scenario information.
[0078] The above tenant information refers to the code of the department to which it belongs. The above tenant information can be used to determine which department the above target business belongs to. The above tenant information is pre-set, the above tenant information can be set according to the target business, the above tenant information can also be set manually according to experience and needs, and the above tenant information can also be set according to the actual application scenario.
[0079] The above-mentioned business category information refers to the business category of the target business. Different categories of target businesses correspond to different service types. Therefore, it is necessary to determine the fact object corresponding to the target business by determining the business category of the target business.
[0080] The above-mentioned business scenario information refers to the scenario in which the target business is carried out. The business scenario information corresponding to different target businesses may be different. A more accurate fact object can be determined based on the above-mentioned business scenario information.
[0081] In an optional embodiment, the tenant information, business category information and business scenario information in the verification request message can be obtained through a protocol analysis method to determine the information of the department corresponding to the target business, the information of the business category corresponding to the target business, and the information of the business scenario involved in the target business. After obtaining the tenant information, business category information and business scenario information, the fact object corresponding to the target business is determined according to the tenant information, business category information and business scenario information. Among them, the tenant information, business category information and business scenario information in the verification request message can also be determined by a regular expression, and the tenant information, business category information and business scenario information in the verification request message can also be obtained by a natural language processing method.
[0082] In this application, fact objects can be accurately obtained through tenant information, business category information and business scenario information, which effectively improves the accuracy of obtaining fact objects and improves the user experience.
[0083] Optionally, determining the fact object based on tenant information, business category information and business scenario information includes: obtaining the fact object corresponding to the tenant information, business category information and business scenario information based on a preset corresponding relationship, wherein the preset corresponding relationship is used to represent the correspondence between the tenant information, business category information and business scenario information and the fact object.
[0084] The above-mentioned preset corresponding relationship refers to the corresponding relationship between the fact object and the tenant information, business category information and business scenario information. According to the above-mentioned preset corresponding relationship, the fact object can be determined through the tenant information, business category information and business scenario information.
[0085] In an optional embodiment, a service and fact object relationship table may be established in advance, and after obtaining tenant information, business category information and business scenario information, the fact object corresponding to the target business may be determined in the service and fact object relationship table.
[0086] In another optional embodiment, a fact object model may be pre-established, and tenant information, business category information, and business scenario information may be input into the fact object model as inputs to output fact objects corresponding to the target business.
[0087] In the present application, the fact object corresponding to the target business can be quickly determined through the preset relationship, which effectively improves the speed of determining the fact object and improves the user experience.
[0088] Combine the following Figure 2 Another optional embodiment of the present invention is described in detail, wherein: Figure 2is a flowchart of another optional target service verification method according to an embodiment of the present invention. Figure 2 As shown, the user sends a service verification request to the server corresponding to the target service through the user terminal, and the request data is formatted. After the request data is formatted, the service data is processed, and the service verification rules corresponding to the target service are matched based on the identification information of the target service and the pre-established service scenario relationship table.
[0089] like Figure 2 As shown, after determining the business verification rules, determine the verification execution type of the target business. When the above verification instruction type is a custom verification execution type, directly obtain the pre-configured custom class information in the business scenario-related table, and execute the method in the specific implementation class corresponding to the rule. After completing the target business, determine the above verification result according to the completion status of the target business. When the target business is completed, it is determined that the above verification result is that there is no abnormality in the target business's running logic to be verified. When the target business is not completed, it is determined that the above verification result is that there is an abnormality in the target business's running logic to be verified.
[0090] like Figure 2 As shown, when the verification execution type is the expression verification execution type, the expression information can be pre-set in the business scenario related table, and the object attributes corresponding to the running logic to be verified are loaded according to the expression information, and it is determined whether the object attributes are loaded successfully. When the object attributes are loaded successfully, the expression is executed; when the object attributes are not loaded successfully, the object attributes are loaded according to the business scenario related table, and the expression is executed after the object attributes are loaded.
[0091] like Figure 2 As shown, an expression is executed to obtain the execution result of the expression, and the verification result of the running logic is determined according to the execution result of the expression. When the expression is successfully executed, it is determined that the above verification result is that there is no abnormality in the running logic to be verified of the target business. When the expression is not successfully executed, it is determined that the above verification result is that there is an abnormality in the running logic to be verified of the target business.
[0092] like Figure 2 As shown, after obtaining the verification result, it is determined whether the target service has been fully verified. If not, the service verification rule matching and the steps after the service verification rule matching are repeated until the target service is fully verified. When the target service is fully verified, the verification log is recorded and fed back to the user terminal.
[0093] For example, when the target business is airline business, Figure 3 An optional embodiment of the present invention is described in detail, wherein: Figure 3 is a flow chart of an optional verification method for airline business according to an embodiment of the present invention, such as Figure 3 As shown, the verification data of the airline business is sent to the verification interface, the verification rule query module and the verification rule modification module. After receiving the data to be verified, the verification interface transmits the data to be verified to the application service module in the business system. The application service module then stores the data to be verified in the business database (Business Database, DB for short) in the business system. The verification interface also transmits the data to be verified to the entry of the verification engine. The entry of the verification engine transmits the data to be verified to the verification task chain of the airline business, and prepares the business data to be processed, matches the business verification rule scenarios, executes some expression matching, executes the expression / executes the program module, and summarizes the execution results to complete the verification of the data to be verified.
[0094] like Figure 3 As shown, after the verification is completed, the verification results of the airline business are sent to the verification execution log, and the verification execution log sends the verification results to the log acceptance module and stores them in the log database for storage. Among them, the results of the verification rule query module, the verification rule modification module, the business verification rule scenario matching, the execution part expression matching and the execution expression / execution program module are also sent to the verification configuration module, and the verification configuration module sends these data to the verification database for storage to provide reference data when the next airline business needs to be verified.
[0095] Figure 4 is a schematic diagram of the structure of another optional target service verification device according to an embodiment of the present invention, such as Figure 3 As shown, the application layer transmits data to the business service group through the rule maintenance interface, the business verification interface and the rule verification interface, wherein the application layer includes but is not limited to the application operating system (Application Operating System, referred to as AOS), the manufacturing design method (Design for Manufacturing, referred to as DFM), the data flow framework (Data Flow Framework, referred to as DFF), the data flow integrity technology (Data Flow Integrity, referred to as DFI) and the deep flow analysis tool (Deep Flow Explorer, referred to as DFE). The application layer manages and coordinates the operation of the application corresponding to the target business through AOS to ensure the stability of the execution of the target business, optimizes the design of the target business software and system level through DFM, processes the data of the target business through DFF, protects the security of the application corresponding to the target business through DFI, and helps users identify and analyze the applications and protocols in the network through DFE.
[0096] like Figure 4As shown, the data of the business service group interacts with the data in the execution management layer and the configuration management layer respectively, and the execution management layer and the configuration management layer respectively perform business execution management and business configuration management. The execution management layer includes: verification matching module, expression parsing module, object construction module and context management module, etc. The configuration management layer includes: object / factor configuration management module, verification configuration management module, verification relationship configuration management module and verification rule difference comparison module, etc. Among them, the verification matching module is used to verify and match the target business to determine the fact object corresponding to the target business; the expression parsing layer is used to obtain the expression corresponding to the target business; the object construction layer is used to load the object attribute according to the business scenario related table when the object attribute is not successfully loaded; the context management layer is used to perform context management on the expression corresponding to the target business to avoid errors in the expression; the object / factor configuration management module is used to determine the correctness of the object attribute; the verification configuration management module is used to ensure the correctness of the verification configuration; the verification relationship configuration management layer is used to determine the verification relationship of the target business; the verification rule difference comparison module is used to ensure the correctness of the verification rule.
[0097] like Figure 4 As shown in the figure, the business management layer also transmits data to the verification execution layer, configuration data layer, cache data layer, execution log layer and change impact analysis layer. The verification execution layer is used to verify the target business, the configuration data layer is used to provide data support for verifying the target business, the cache data layer is used to cache data, the execution log layer is used to store verification logs, and the change impact analysis layer is used to analyze the impact of data changes on verification.
[0098] According to another aspect of an embodiment of the present invention, a target service verification device is also provided, which can execute the target service verification method of the above embodiment. The specific implementation method and preferred application scenario are the same as the above embodiment and will not be repeated here. Figure 5 is a schematic diagram of the structure of an optional target service verification device according to an embodiment of the present invention, such as Figure 5 As shown, the device includes: an acquisition module 50, which is used to obtain a fact object matching the verification request message in response to receiving a verification request message of the target business, wherein the fact object is used to represent the entity object to be verified in the verification request message; a generation module 52, which is used to generate the operation logic to be verified corresponding to the target business based on the verification request message and the fact object; a determination module 54, which is used to determine the verification execution type of the target business based on the configuration information of the operation logic to be verified, wherein the verification execution type is used to represent the verification method of the operation logic to be verified; a verification module 56, which is used to verify the operation logic to be verified based on the verification execution type to obtain a verification result, wherein the verification result is used to determine whether there is an abnormality in the operation logic to be verified of the target business.
[0099] Optionally, the generation module includes a filling unit, which is used to fill in the attributes of the fact object based on the verification request message to obtain fact object information; a calling unit, which is used to call the business verification rules corresponding to the target business based on the identification information of the target business; and a generation unit, which is used to generate the operation logic to be verified based on the business verification rules and the fact object information.
[0100] Optionally, the verification module includes: a first verification unit, which is used to obtain pre-configured custom class information in response to the verification execution type being a custom verification execution type, and verify the running logic to be verified based on the implementation class corresponding to the custom class information to obtain a verification result; a second verification unit, which is used to obtain pre-configured expression information in response to the verification execution type being an expression verification execution type, load the object properties corresponding to the running logic to be verified based on the expression information, and verify the running logic to be verified based on the loading result of the object properties to obtain a verification result.
[0101] Optionally, the verification module also includes: a verification unit, which is used to verify the expression information based on preset conditions to obtain a verification result, wherein the verification result is used to indicate whether the expression information meets the preset conditions; and a checking unit, which is used to execute loading of object properties corresponding to the running logic to be verified based on the expression information in response to the verification result being that the expression information meets the preset conditions.
[0102] Optionally, the second verification unit includes: a first verification sub-unit, which is used to, in response to the loading result being that the object attributes have been loaded, verify the running logic to be verified based on the object attributes to obtain a verification result; a second verification sub-unit, which is used to, in response to the loading result being that the object attributes have not been loaded, load the object attributes associated with the expression information from the running logic to be verified, and verify the running logic to be verified based on the object attributes to obtain a verification result.
[0103] Optionally, the acquisition module includes: an acquisition unit, used to obtain tenant information, business category information and business scenario information in the verification request message, wherein the tenant information is used to represent the information of the tenant corresponding to the target business, the business category information is used to represent the information of the business category corresponding to the target business, and the business scenario information is used to represent the information of the business scenario involved in the target business; a determination unit, used to determine the fact object based on the tenant information, business category information and business scenario information.
[0104] Optionally, the determination unit includes: an acquisition subunit, used to acquire fact objects corresponding to tenant information, business category information and business scenario information based on a preset correspondence relationship, wherein the preset correspondence relationship is used to represent the correspondence between tenant information, business category information and business scenario information and the fact objects.
[0105] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention when running.
[0106] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0107] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.
[0108] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.
[0109] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0110] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0111] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0112] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0113] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0114] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for verifying a target service, characterized in that: include: In response to receiving a verification request message of a target service, obtaining a fact object matching the verification request message, wherein the fact object is used to represent an entity object to be verified in the verification request message; Based on the verification request message and the fact object, generate the to-be-verified operation logic corresponding to the target business; Determining a verification execution type of the target service based on the configuration information of the operation logic to be verified, wherein the verification execution type is used to indicate a verification method for the operation logic to be verified; The operation logic to be verified is verified based on the verification execution type to obtain a verification result, wherein the verification result is used to determine whether an abnormality occurs in the operation logic to be verified of the target business.
2. The target service verification method according to claim 1, characterized in that: Based on the verification request message and the fact object, generating the to-be-verified operation logic corresponding to the target business, including: Filling the attributes of the fact object based on the verification request message to obtain fact object information; Retrieving a service verification rule corresponding to the target service based on the identification information of the target service; The operation logic to be verified is generated based on the business verification rules and the fact object information.
3. The target service verification method according to claim 1, characterized in that: The operation logic to be verified is verified based on the verification execution type to obtain a verification result, including: In response to the verification execution type being a custom verification execution type, obtaining pre-configured custom class information, and verifying the to-be-verified operation logic based on an implementation class corresponding to the custom class information to obtain the verification result; In response to the verification execution type being an expression verification execution type, pre-configured expression information is obtained, object properties corresponding to the running logic to be verified are loaded based on the expression information, and the running logic to be verified is verified based on the loading result of the object properties to obtain the verification result.
4. The target service verification method according to claim 3, characterized in that: The method further comprises: Verifying the expression information based on the preset condition to obtain a verification result, wherein the verification result is used to indicate whether the expression information meets the preset condition; In response to the verification result that the expression information meets the preset condition, the object attribute corresponding to the running logic to be verified is loaded based on the expression information.
5. The target service verification method according to claim 3, characterized in that: Verifying the operation logic to be verified based on the loading result of the object attribute to obtain the verification result includes: In response to the loading result indicating that the object attribute has been loaded, verifying the to-be-verified operation logic based on the object attribute to obtain the verification result; In response to the loading result being that the object attribute is not loaded, the object attribute associated with the expression information is loaded from the running logic to be verified, and the running logic to be verified is verified based on the object attribute to obtain the verification result.
6. The target service verification method according to claim 1, characterized in that: Obtaining a fact object that matches the verification request message includes: Obtain tenant information, service category information, and service scenario information in the verification request message, wherein the tenant information is used to indicate information about the tenant implementing the target service, the service category information is used to indicate information about the service category corresponding to the target service, and the service scenario information is used to indicate information about the service scenario involved in the target service; The fact object is determined based on the tenant information, the business category information, and the business scenario information.
7. The target service verification method according to claim 6, characterized in that: Determining the fact object based on the tenant information, the business category information, and the business scenario information includes: Based on a preset correspondence relationship, the fact object corresponding to the tenant information, the business category information and the business scenario information is obtained, wherein the preset correspondence relationship is used to represent the correspondence between the tenant information, the business category information and the business scenario information and the fact object.
8. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 7 when running.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.