Business component verification method and device, electronic equipment and storage medium

By acquiring verification data blocks and using client functional components for dual verification, the problem of low verification efficiency of business components in private deployment is solved, realizing full-link closed-loop verification and improving verification efficiency.

CN117556408BActive Publication Date: 2026-08-04TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT CLOUD COMPUTING (BEIJING) CO LTD
Filing Date
2022-08-05
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In a private deployment scheme, once the server infrastructure is deployed, the operations and maintenance team cannot directly access the business services. This means that verifying whether the server business components are running normally requires obtaining data resources from the business and development teams, which lengthens the data processing cycle and reduces verification efficiency.

Method used

By acquiring preset verification data blocks, the input and output data of the target business component are obtained, and the target data carrier is generated in the verification application. The input data is processed by the client functional component to achieve dual verification of the target business component, including verification of the business component itself and the link between the client and the business component, thus shortening the data processing cycle.

Benefits of technology

It achieves closed-loop verification of the target business components across the entire chain, improving verification efficiency, eliminating the need to obtain data resources from the business and R&D sides, and shortening the data processing cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117556408B_ABST
    Figure CN117556408B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a kind of service component verification method, device, electronic equipment and storage medium, the service component verification method is based on verification data block, it is realized to the first re-verification of target service component;When first output data is consistent with reference output data, it can be determined that target service component is normal, further generate target data carrier for verification application to obtain verification data block, then, verification application can verify whether the link between client and target service component is normal according to verification data block, it is realized to the second re-verification of target service component, based on the double verification of above-mentioned target service component, it can be realized to the full-link closed loop verification of target service component, and in this process, data resource does not need to be obtained from service end and research and development end, shorten the period of data processing, to improve the verification efficiency of target service component, can be widely applied in cloud computing and other technical fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a business component verification method, apparatus, electronic device, and storage medium. Background Technology

[0002] In current private deployment schemes, after the server infrastructure is deployed, specific business parameters need to be configured and clients need to be developed. However, the deployment of the server infrastructure is generally handled by the operations and maintenance team, while the configuration of specific business parameters is handled by the business team, and client development is handled by the development team. Because private deployments generally involve security protocols, the operations and maintenance team cannot directly access the server's business services. Therefore, after the server infrastructure is deployed, if the operations and maintenance team needs to verify whether the server's business components are functioning correctly, it needs to obtain data resources from both the business team and the development team, which lengthens the data processing cycle and reduces verification efficiency. Summary of the Invention

[0003] The following is an overview of the subject matter described in detail in this application. This overview is not intended to limit the scope of the claims.

[0004] This application provides a business component verification method, apparatus, electronic device, and storage medium, which can improve the verification efficiency of target business components.

[0005] On the one hand, embodiments of this application provide a business component verification method, including:

[0006] Obtain a preset verification data block, and obtain the first input data of the target business interface of the target business component and the reference output data of the target business interface from the verification data block;

[0007] The first input data is input to the target business interface, and the first output data returned by the target business interface is obtained. When the first output data is consistent with the reference output data, a target data carrier is generated for the verification application to obtain the verification data block. The verification application is equipped with a client function component corresponding to the target business component.

[0008] Obtain the second input data obtained after the client functional component processes the first input data, input the second input data to the target business interface, and obtain the second output data returned by the target business interface;

[0009] The second output data is sent to the verification application so that the verification application can obtain the verification result of the target business component based on the second output data and the reference output data.

[0010] On the other hand, embodiments of this application also provide a business component verification method, including:

[0011] Based on the target data carrier, a verification data block is obtained. From the verification data block, the first input data and reference output data corresponding to the target business interface of the target business component are obtained. The target data carrier is generated by the server after determining that the first output data is consistent with the reference output data. The first output data is the data returned by the target business interface after the server inputs the first input data to the target business interface.

[0012] The client-side functional component corresponding to the target business component is invoked to process the first input data to obtain the second input data;

[0013] The second input data is sent to the server so that the server can input the second input data into the target service interface;

[0014] Obtain the second output data returned by the target business interface, and obtain the verification result of the target business component based on the second output data and the reference output data.

[0015] On the other hand, embodiments of this application also provide a business component verification device, including:

[0016] The first data block acquisition module is used to acquire a preset verification data block and to acquire the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block.

[0017] The first verification module is used to input the first input data to the target business interface, obtain the first output data returned by the target business interface, and when the first output data is consistent with the reference output data, generate a target data carrier for the verification application to obtain the verification data block, wherein the verification application is provided with a client function component corresponding to the target business component;

[0018] The first data sending module is used to obtain the second input data obtained after the client functional component processes the first input data, input the second input data to the target service interface, and obtain the second output data returned by the target service interface.

[0019] The data pass-through module is used to send the second output data to the verification application, so that the verification application can obtain the verification result of the target business component based on the second output data and the reference output data.

[0020] Furthermore, the aforementioned first data block acquisition module is specifically used for:

[0021] Obtain the business component identifier of the target business component, and the business interface identifier of the target business interface of the target business component;

[0022] Based on the business component identifier and the business interface identifier, the first input data and reference output data of the target business interface are obtained from the verification data block.

[0023] Furthermore, the verification data block is configured with multiple first data nodes for storing candidate component identifiers, each first data node is connected to multiple second data nodes for storing candidate interface identifiers, each second data node is connected to a third data node for storing candidate input data and a fourth data node for storing candidate output data, and the aforementioned first data block acquisition module is specifically used for:

[0024] Based on the matching relationship between the business component identifier and the candidate component identifier, a first target node is determined from a plurality of first data nodes;

[0025] Based on the matching relationship between the business interface identifier and the candidate interface identifier, a second target node is determined from a plurality of second data nodes connected to the first target node;

[0026] Obtain the candidate input data from the third data node connected to the second target node, and use it as the first input data corresponding to the target service interface;

[0027] The candidate output data in the fourth data node connected to the second target node is obtained as the reference output data corresponding to the target service interface.

[0028] Furthermore, the verification data block is also equipped with a fifth data node for storing target version information, and each of the first data nodes is connected to the fifth data node. The aforementioned first data block acquisition module is specifically used for:

[0029] Determine the current version information of the target business component;

[0030] Obtain the target version information from the fifth data node, and verify the verification data block according to the matching relationship between the target version information and the current version information;

[0031] Based on the matching relationship between the business component identifier and the candidate component identifier, a first target node is determined from multiple first data nodes of the verified data block that have passed the verification.

[0032] Furthermore, the aforementioned first data block acquisition module is specifically used for:

[0033] Obtain the business configuration file, and retrieve the runtime scenario information of the target business component from the business configuration file;

[0034] When the running scenario information indicates that the target business component is in a test running scenario, the business component identifier of the target business component and the business interface identifier of the target business interface of the target business component are obtained from the business configuration file; or, when the running scenario information indicates that the target business component is in a formal running scenario, in response to the verification instruction for the target business component, the business component identifier of the target business component and the business interface identifier of the target business interface of the target business component are obtained from the business configuration file.

[0035] Furthermore, the aforementioned first data block acquisition module is also used for:

[0036] Determine the data acquisition status of the first input data and the reference output data;

[0037] When at least one of the first input data and the reference output data is in a failed state, retrieve the historical business request that has been successfully executed from the cache of the target business interface;

[0038] Obtain historical input data from the historical service requests that was input to the target service component, and historical output data returned by the target service component after processing the historical input data;

[0039] The historical input data is used as the first input data, and the historical output data is used as the reference output data.

[0040] Furthermore, the aforementioned first data block acquisition module is specifically used for:

[0041] The historical input data and the historical output data are anonymized.

[0042] The anonymized historical input data is used as the first input data, and the anonymized historical output data is used as the reference output data.

[0043] Furthermore, the target data carrier includes a graphic code, and the aforementioned first verification module is specifically used for:

[0044] The verification data block is encoded to obtain first encoded information, and the graphic code is generated and displayed based on the first encoded information block.

[0045] Alternatively, the access address of the verification data block is determined, the access address is encoded to obtain second encoding information, and the graphic code is generated and displayed based on the second encoding information block.

[0046] Furthermore, the aforementioned first data sending module is specifically used for:

[0047] The second input data is used as the data body to generate the target business request;

[0048] Add a verification identifier to the header of the target service request. The verification identifier is used to indicate that the target service request is a test type request.

[0049] The target service request, after adding the verification identifier, is sent to the target service interface.

[0050] On the other hand, embodiments of this application also provide a business component verification device, including:

[0051] The second data block acquisition module acquires a verification data block based on the target data carrier, and acquires the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block. The target data carrier is generated by the server after determining that the first output data is consistent with the reference output data. The first output data is the data returned by the target business interface after the server inputs the first input data to the target business interface.

[0052] The calling module is used to call the client function component corresponding to the target business component to process the first input data and obtain the second input data;

[0053] The second data sending module is used to send the second input data to the server so that the server can input the second input data into the target service interface;

[0054] The second verification module is used to obtain the second output data returned by the target business interface, and to obtain the verification result of the target business component based on the second output data and the reference output data.

[0055] On the other hand, embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described business component verification method.

[0056] On the other hand, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is executed by a processor to implement the above-described business component verification method.

[0057] On the other hand, embodiments of this application also provide a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the business component verification method described above.

[0058] The embodiments of this application include at least the following beneficial effects: Based on the verification data block, first output data can be obtained from the first input data in the verification data block, and then the target business component can be verified as normal based on the first output data and the reference output data in the verification data block, thus realizing the first layer of verification of the target business component; when the first output data is consistent with the reference output data, it can be determined that the target business component is normal, and a target data carrier for the verification application to obtain the verification data block can be further generated. Since the verification application is equipped with a client function component corresponding to the target business component, based on the verification data block, the verification application can obtain second output data from the first input data in the verification data block, and then verify the link between the client and the target business component as normal based on the second output data and the reference output data in the verification data block, thus realizing the second layer of verification of the target business component. Based on the above dual verification of the target business component, the full-link closed-loop verification of the target business component can be realized. Moreover, in this process, it is not necessary to obtain data resources from the business end and the R&D end, shortening the data processing cycle and thus improving the verification efficiency of the target business component.

[0059] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. Attached Figure Description

[0060] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0061] Figure 1 A schematic diagram of a private deployment architecture provided in the embodiments of this application;

[0062] Figure 2 for Figure 1 A schematic diagram illustrating the operating mechanism of the architecture shown;

[0063] Figure 3 The verification process for business components in the related technologies provided in the embodiments of this application;

[0064] Figure 4 A schematic diagram illustrating an optional implementation environment provided for an embodiment of this application;

[0065] Figure 5 A schematic diagram of an optional process for a business component verification method provided in an embodiment of this application;

[0066] Figure 6 A schematic diagram of an optional data processing procedure for the target business interface provided in the embodiments of this application;

[0067] Figure 7 A schematic diagram of an optional data structure for a verification data block provided in an embodiment of this application;

[0068] Figure 8 Another optional flowchart illustrating the business component verification method provided in the embodiments of this application;

[0069] Figure 9 Another optional flowchart illustrating the business component verification method provided in the embodiments of this application;

[0070] Figure 10 A schematic diagram of an optional architecture for the business component verification method provided in the embodiments of this application;

[0071] Figure 11 A schematic diagram of an optional architecture for the verification service provided in an embodiment of this application;

[0072] Figure 12 A schematic diagram of an optional operation flow for the verification service provided in an embodiment of this application;

[0073] Figure 13 A schematic diagram of an optional operation flow of the verification application provided in an embodiment of this application;

[0074] Figure 14 A schematic diagram of an optional process for dual verification provided in an embodiment of this application;

[0075] Figure 15 A schematic diagram of an optional structure of the business component verification device provided in this application embodiment;

[0076] Figure 16 Another optional structural diagram of the business component verification device provided in the embodiments of this application;

[0077] Figure 17 This is a partial structural block diagram of a terminal provided in an embodiment of this application;

[0078] Figure 18 A partial structural block diagram of the server provided in an embodiment of this application. Detailed Implementation

[0079] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0080] It should be noted that in various specific embodiments of this application, when processing data related to the characteristics of the target object, such as target object attribute information or attribute information sets, is required, the permission or consent of the target object will be obtained first. Furthermore, the collection, use, and processing of this data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when embodiments of this application need to obtain target object attribute information, separate permission or consent from the target object will be obtained through pop-up windows or redirection to a confirmation page. Only after obtaining the separate permission or consent of the target object will the necessary target object-related data for the normal operation of the embodiments of this application be obtained.

[0081] To facilitate understanding of the technical solutions provided in the embodiments of this application, some key terms used in the embodiments of this application will be explained below:

[0082] SDK (Software Development Kit): A collection of development tools used to create application software for specific software packages, software frameworks, hardware platforms, operating systems, etc. It facilitates application creation through compilers, debuggers, software frameworks, etc. An SDK can simply provide an application programming interface for a programming language, or it can include complex hardware capable of communicating with an embedded system.

[0083] Cloud computing refers to a delivery and usage model for IT (Internet Technology) infrastructure, meaning obtaining necessary resources through a network in an on-demand and easily scalable manner. In a broader sense, cloud computing also refers to a service delivery and usage model, meaning obtaining necessary services through a network in an on-demand and easily scalable manner. These services can be IT and software-related, internet-related, or other services. Cloud computing is a product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.

[0084] Reference Figure 1 , Figure 1 This is a schematic diagram of a private deployment architecture provided in the embodiments of this application. The architecture mainly includes a management console, business services, and a client SDK. The management console and business services primarily run on the server side, while the client SDK primarily runs on the terminal side. The management console mainly provides an entry point for configuring parameters of the business services. The business services mainly implement specific business logic and expose APIs (Application Program Interfaces) to the client SDK. The client SDK mainly encapsulates and provides the client's business logic-related functions.

[0085] Reference Figure 2 , Figure 2 for Figure 1 The diagram illustrates the operational mechanism of this architecture. In a private deployment, it typically involves an operations and maintenance (O&M) team, a business team, and a development team. The O&M team is responsible for deploying the management console and business services (but does not have management console access) to ensure business availability. The business team is responsible for controlling the parameters of the business services through the management console. The development team is responsible for integrating the business parameters configured in the management console and verifying the business effects on the client side (but does not have management console access). After the O&M team deploys the management console and business services, the business team configures the business parameters (gateway API interface name, server address, etc.) in the management console. The development team develops and integrates the client SDK and obtains the configuration information of the business services from the business team, enabling the client to use the business services normally.

[0086] As can be seen, in current private deployment schemes, after the server infrastructure is deployed, specific business parameters need to be configured and clients need to be developed. The deployment of the server infrastructure is generally handled by the operations and maintenance (O&M) team, while the configuration of specific business parameters is handled by the business team, and client development is handled by the development team. After configuring the business parameters and developing the client, the O&M team generally needs to verify whether the server's business components are functioning correctly. Because private deployments typically involve security protocols, the O&M team cannot directly access the server's business services. Therefore, after the server infrastructure is deployed, if the O&M team needs to verify whether the server's business components are functioning correctly, it needs to obtain data resources from both the business team and the development team.

[0087] Specifically, refer to Figure 3 , Figure 3The verification process for business components in the related technologies provided in this application embodiment involves the operation and maintenance end deploying the server infrastructure, then synchronizing the server deployment completion information to the business end. After the business end configures specific business parameters, the development end integrates the client SDK corresponding to the business parameters to verify whether the operating logic of the server's business components is normal. The verification result is then fed back to the operation and maintenance end. If the verification passes, it indicates that the server deployment is successful. If the verification fails, it indicates that the server deployment has failed. The operation and maintenance end needs to troubleshoot, redeploy the server infrastructure, and repeat the above verification process.

[0088] It is evident that the verification methods used for the aforementioned server business components lengthen the data processing cycle, thereby reducing verification efficiency.

[0089] Based on this, embodiments of this application provide a business component verification method, apparatus, electronic device, and storage medium, which can improve the verification efficiency of target business components.

[0090] Reference Figure 4 , Figure 4 This is a schematic diagram of an optional implementation environment provided in an embodiment of this application. The implementation environment includes a terminal 401 and a server 402, wherein the terminal 401 and the server 402 are connected through a communication network.

[0091] Server 402 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Additionally, server 402 can also be a node server in a blockchain network.

[0092] Terminal 401 can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, vehicle terminal, etc., but is not limited to these. Terminal 401 and server 402 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the application does not impose any limitations.

[0093] For example, server 402 can obtain a preset verification data block, retrieve the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block, input the first input data to the target business interface, and retrieve the first output data returned by the target business interface. When the first output data matches the reference output data, a target data carrier is generated for the verification application to obtain the verification data block. Terminal 401 can use the verification application to obtain the verification data block based on the target data carrier, process the first input data through the client functional component to obtain the second input data, and send the second input data to server 402. Server 402 inputs the second input data to the target business interface, retrieves the second output data returned by the target business interface, and sends the second output data to terminal 401. Terminal 401 obtains the verification result of the target business component through the verification application based on the second output data and the reference output data.

[0094] In addition, another implementation environment of this application embodiment may only include server 402. In this case, both the verification application and the client functional component are installed in server 402. Server 402 can obtain a preset verification data block, obtain the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block, input the first input data to the target business interface, obtain the first output data returned by the target business interface, and when the first output data is consistent with the reference output data, generate a target data carrier for the verification application to obtain the verification data block, process the first input data through the client functional component to obtain the second input data, input the second input data to the target business interface, obtain the second output data returned by the target business interface, and obtain the verification result of the target business component through the verification application based on the second output data and the reference output data.

[0095] The methods provided in this application can be applied to various technical fields, including but not limited to cloud computing.

[0096] Reference Figure 5 , Figure 5 This is an optional flowchart of a business component verification method provided in an embodiment of this application. The business component verification method can be executed by a server that performs business component verification. The business component verification method includes, but is not limited to, the following steps 501 to 504.

[0097] Step 501: Obtain a preset verification data block, and obtain the first input data of the target business interface of the target business component and the reference output data of the target business interface from the verification data block.

[0098] In one possible implementation, the target business component is a functional component that implements business logic, such as an instant messaging message sending component, a payment verification component, a game resource distribution component, etc. The target business component can be determined according to the specific business, and this application embodiment does not limit it. The target business interface is a data interaction interface set up for the target business component, used to interact with the client of the target business. The verification data block is used to verify the target business component and determine whether the target business component is running normally. The verification data block is set with first input data and reference output data corresponding to the target business interface. The first input data serves as sample input data for verifying the target business component, such as an instant messaging message sending request, a payment request, a game resource purchase request, etc. The first input data can be determined according to the actual situation, as long as it can be recognized and processed by the target business component, and this application embodiment does not limit it. The reference output data is the standard output data obtained by the target business component after processing the first input data, used as reference data for verifying the target business component. Similarly, the reference output data corresponds to the first input data and changes according to the first input data, and this application embodiment does not limit it.

[0099] In one possible implementation, the verification data block can be preset in the server. If there are multiple target business interfaces, the verification data block is correspondingly set with multiple first input data and reference output data. Each pair of first input data and reference output data corresponds to one target business interface. It can be understood that when there are multiple target business interfaces, there may be multiple target business components, each target business component is set with one target business interface; or, there may be one target business component, which is set with multiple target business interfaces; or, there may be multiple target business components, each target business component is set with multiple target business interfaces. This application embodiment does not limit the scope of the implementation.

[0100] Step 502: Input the first input data into the target business interface, obtain the first output data returned by the target business interface, and when the first output data is consistent with the reference output data, generate a target data carrier for the verification application to obtain the verification data block.

[0101] In one possible implementation, refer to Figure 6 , Figure 6This is a schematic diagram illustrating an optional data processing procedure for the target business interface provided in this application embodiment. After the first input data is input to the target business interface, the target business component performs corresponding business logic processing based on the first input data and returns first output data from the target business interface. The target business component can be located on a server performing business component verification, or on a server other than the server performing business component verification; this application embodiment does not impose any limitations. After obtaining the first output data returned by the target business interface, reference output data obtained from the verification data block can be compared with the first output data. Since the reference output data is the standard output data obtained after the target business component processes the first input data, when the first output data matches the reference output data, it indicates that the target business component is operating normally; when the first output data does not match the reference output data, it indicates that the target business component is not operating normally, thereby allowing for quick verification of the target business component's operation.

[0102] In one possible implementation, the verification application verifies whether the link between the client and the target business component is normal. This verification includes whether the client itself is functioning correctly, or whether communication between the client and the target business component is normal. The verification application has client-side functional components corresponding to the target business component. These components implement the client's functions, such as instant messaging, payment, in-game purchases, etc., which are not limited in this embodiment. For example, the client-side functional component can be a client SDK. By setting client-side functional components corresponding to the target business component in the verification application, the operations team can utilize the verification application to implement client-related functions when verifying the target business component, thereby verifying the link between the verification client and the target business component without the need for development intervention, thus improving the verification efficiency of the target business component.

[0103] In one possible implementation, when verifying whether the link between the client and the target business component is normal, the verification application can also use the first input data and reference output data in the verification data block. The verification application can obtain the verification data block through the target data carrier.

[0104] In one possible implementation, the target data carrier may include a verification data block, in which case the verification application can directly obtain the verification data block through the target data carrier; or, the target data carrier may include an access address of the verification data block, in which case the verification application can obtain the verification data block through the access address of the verification data block.

[0105] In one possible implementation, the target data carrier can be an image code or a notification message. The image code can be a QR code, barcode, etc., and this application embodiment does not limit the type of image code. When the target data carrier is an image code, when the verification application needs to obtain the verification data block, it can access the image code to directly obtain the verification data block or obtain the access address of the verification data block. When the target data carrier is a notification message, when the first output data is consistent with the reference output data, the server can use the verification data block to generate a notification message and send it to the verification application. The verification application can directly receive the verification data block. Alternatively, the server can also use the access address of the verification data block to generate a notification message and send it to the verification application. After receiving the access address of the verification data block, the verification application obtains the verification data block through the access address.

[0106] In one possible implementation, when the target data carrier is a graphical code, a target data carrier for the verification application to obtain verification data blocks is generated. Specifically, this can be done by encoding the verification data block to obtain first encoded information, generating and displaying the graphical code based on the first encoded information block; or, it can be done by determining the access address of the verification data block, encoding the access address to obtain second encoded information, generating and displaying the graphical code based on the second encoded information block. The verification application can be installed on the terminal performing business component verification. When the verification application is installed on the terminal performing business component verification, displaying the graphical code allows the verification application to obtain the verification data block, achieving a visual display effect of the target data carrier. Furthermore, the terminal performing business component verification only needs to recognize the graphical code to obtain the verification data block, reducing data interaction between the terminal and the server and improving the efficiency of obtaining the verification data block.

[0107] Step 503: Obtain the second input data obtained after the client functional component processes the first input data, input the second input data into the target business interface, and obtain the second output data returned by the target business interface.

[0108] In one possible implementation, after the verification application obtains the verification data block, it extracts the first input data from the verification data block and then calls its own pre-built client function component to process the first input data. The processing method of the first input data by the client function component can be determined according to the specific function of the client function component, such as conversion, encryption, merging, etc. This application embodiment does not limit it.

[0109] In one possible implementation, after processing the first input data, the client functional component obtains the second input data. When the verification application is installed on the server performing business component verification, the second input data obtained by the client functional component after processing the first input data is transmitted to the target business interface of the target business component, and the target business interface returns the second output data. When the verification application is installed on the terminal performing business component verification, the terminal sends the second input data obtained by the client functional component after processing the first input data to the server where the target business component is located, and then returns the second output data to the terminal performing business component verification through the target business interface.

[0110] In one possible implementation, when the second input data is input to the target business interface, the target business component will first perform the reverse operation that the client functional component performed on the first input data to restore the second input data. For example, if the client functional component encrypts the first input data to obtain the second input data, then after the second input data is input to the target business interface, the target business component will first decrypt the second input data and then obtain the second output data through the corresponding business logic. This facilitates subsequent comparison between the reference output data and the second output data to determine the verification result of the target business component, achieving the reuse effect of the reference output data and reducing the complexity of verifying the target business component.

[0111] Step 504: Send the second output data to the verification application so that the verification application can obtain the verification result of the target business component based on the second output data and the reference output data.

[0112] Since the verification application has obtained the verification data block, it indicates that the server has determined that the first output data is consistent with the reference output data. Then, if the verification application determines that the second output data is also consistent with the reference output data, it indicates that the link between the client and the target business component is also normal, thus determining that the target business component is operating normally. If the verification application determines that the second output data is inconsistent with the reference output data, it indicates that the link between the client and the target business component is abnormal, thus determining that the target business component is not operating normally.

[0113] In summary, based on the verification data block, the first output data can be obtained from the first input data in the verification data block. Then, the first output data and the reference output data in the verification data block are used to verify whether the target business component is normal, thus achieving the first layer of verification of the target business component. When the first output data is consistent with the reference output data, it can be determined that the target business component is normal, and a target data carrier for the verification application to obtain the verification data block is further generated. Since the verification application has a client function component corresponding to the target business component, based on the verification data block, the verification application can obtain the second output data from the first input data in the verification data block. Then, the second output data and the reference output data in the verification data block are used to verify whether the link between the client and the target business component is normal, thus achieving the second layer of verification of the target business component. Based on the above dual verification of the target business component, the full-link closed-loop verification of the target business component can be achieved. Moreover, in this process, it is not necessary to obtain data resources from the business end and the R&D end, shortening the data processing cycle and thus improving the verification efficiency of the target business component.

[0114] In one possible implementation, when there are multiple target business components and each target business component has multiple target business interfaces, the verification data block correspondingly includes multiple first input data and multiple reference output data. The first input data and reference output data of the target business interfaces of the target business components are obtained from the verification data block. Specifically, the business component identifier of the target business component and the business interface identifier of the target business interface of the target business component can be obtained. Based on the business component identifier and the business interface identifier, the first input data and reference output data of the target business interface are obtained from the verification data block.

[0115] In one possible implementation, the business component identifier of the target business component and the business interface identifier of the target business interface of the target business component are obtained. Specifically, the business configuration file can be obtained, and the runtime scenario information of the target business component can be obtained from the business configuration file. When the runtime scenario information indicates that the target business component is in a test runtime scenario, the business component identifier of the target business component and the business interface identifier of the target business interface of the target business component are obtained from the business configuration file.

[0116] The business configuration file, which can be a YAML configuration file, stores the runtime information of the target business component. This runtime information can include runtime scenario information, runtime duration information, and so on. Specifically, the runtime scenario information of the target business component can be obtained from the business configuration file. This runtime scenario information indicates the runtime scenario of the target business component, such as a test runtime scenario or a production runtime scenario. When the runtime scenario information indicates that the target business component is in a test runtime scenario, the business component identifier and the business interface identifier of the target business interface can be automatically obtained from the business configuration file. The verification frequency for the target business component can be pre-set, and the business component identifier and business interface identifier can be automatically obtained based on this verification frequency. This enables automated verification of the target business component and improves the convenience of verifying it.

[0117] In addition, when the runtime scenario information indicates that the target business component is in a formal runtime scenario, in response to the verification command for the target business component, the business component identifier and the business interface identifier of the target business interface of the target business component are obtained from the business configuration file. Since verifying the target business component when the runtime scenario information indicates that it is in a formal runtime scenario might affect its normal operation, it is necessary to obtain the business component identifier and business interface identifier from the business configuration file again through the verification command for the target business component, thereby improving the reliability of the verification of the target business component.

[0118] In one possible implementation, the data structure of the verification data block can be an array structure. The array name can be obtained by concatenating the business component identifier and the business interface identifier. The array stores the corresponding first input data and reference output data. Therefore, the array corresponding to a certain target business interface can be determined based on the business component identifier and the business interface identifier.

[0119] For example, a target service may correspond to target service component A and target service component B. Target service component A has target service interfaces A1 and A2, and target service component B has target service interfaces B1 and B2. In this case, the verification data block includes the first input data a11 and reference output data a12 corresponding to target service interface A1, the first input data a21 and reference output data a22 corresponding to target service interface A2, the first input data b11 and reference output data b12 corresponding to target service interface B1, and the first input data b21 and reference output data b22 corresponding to target service interface B2. The service component identifier of target service component A can be A, and the service interface identifier of target service interface A1 can be A1. The same applies to the other target service components and interfaces, and will not be elaborated further here.

[0120] Taking the target business interface A1 as an example, the first input data a11 and the reference output data a12 corresponding to the target business interface A1 in the verification data block are stored in an array named AA1, which can be represented as AA1[1] = a11 and AA1[2] = a12. The business interface identifier of the target business interface A1 is A1, and the business component identifier of the target business component is A. After concatenation, AA1 can be obtained. Then, a matching search is performed in the verification data block to determine the array named AA1, and the first input data a11 and the reference output data a12 are extracted from the array. It is understood that the processing principle of the other target business interfaces is similar, and will not be elaborated here.

[0121] In one possible implementation, the data structure of the verification data block can be a tree structure. The verification data block has multiple first data nodes for storing candidate component identifiers. Each first data node is connected to multiple second data nodes for storing candidate interface identifiers. Each second data node is connected to a third data node for storing candidate input data and a fourth data node for storing candidate output data. In this case, based on the business component identifier and the business interface identifier, the first input data and reference output data corresponding to the target business interface are obtained from the verification data block. Specifically, this can be done by determining a first target node from the multiple first data nodes based on the matching relationship between the business component identifier and the candidate component identifier; determining a second target node from the multiple second data nodes connected to the first target node based on the matching relationship between the business interface identifier and the candidate interface identifier; obtaining candidate input data from the third data nodes connected to the second target node as the first input data corresponding to the target business interface; and obtaining candidate output data from the fourth data nodes connected to the second target node as the reference output data corresponding to the target business interface.

[0122] For example, refer to Figure 7 , Figure 7 This is a schematic diagram of an optional data structure for a verification data block provided in an embodiment of this application. The first data node is a second-level node in a tree structure, with candidate component identifiers A, B, and C. The second data node is a third-level node in the tree structure. The candidate interface identifiers corresponding to the second data node connected to the first data node A are A1, A2...An; the candidate interface identifiers corresponding to the second data node connected to the first data node B are B1, B2...Bn; and the candidate interface identifiers corresponding to the second data node connected to the first data node C are C1, C2...Cn. The third and fourth data nodes are fourth-level nodes in the tree structure. The candidate input data corresponding to the third data node connected to the second data node A1 is a11; the candidate output data corresponding to the fourth data node connected to the second data node A1 is a12; and the candidate output data corresponding to the third data node connected to the second data node An is a11. The corresponding candidate input data is an1, and the candidate output data corresponding to the fourth data node connected to the second data node An is an2; the candidate input data corresponding to the third data node connected to the second data node B1 is b11, and the candidate output data corresponding to the fourth data node connected to the second data node B1 is b12; the candidate input data corresponding to the third data node connected to the second data node Bn is bn1, and the candidate output data corresponding to the fourth data node connected to the second data node Bn is bn2; the candidate input data corresponding to the third data node connected to the second data node C1 is c11, and the candidate output data corresponding to the fourth data node connected to the second data node C1 is c12; the candidate input data corresponding to the third data node connected to the second data node Cn is cn1, and the candidate output data corresponding to the fourth data node connected to the second data node Cn is cn2. Based on this, when the target component identifier of the target business component is A and the target interface identifier of the target business interface is A1, the first target node can be determined as the first data node A, and the second target node can be determined as the second data node A1. Then, the candidate input data a11 in the third data node connected to the second data node A1 is used as the first input data corresponding to the target business interface A1, and the candidate output data a12 in the fourth data node connected to the second data node A1 is used as the reference output data corresponding to the target business interface A1.

[0123] It is understood that, for a certain second data node, the specific positions of the third and fourth data nodes connecting the second data node can be interchanged, and this application embodiment does not limit this.

[0124] By using a tree-structured verification data block to store the first input data and reference output data corresponding to each target business interface, the amount of data retrieval can be reduced and the efficiency of obtaining the first input data and reference output data can be improved when retrieving the first input data and reference output data corresponding to the target business interface from the verification data block. In addition, it can also isolate the data of different target business interfaces, thereby improving the storage stability of the first input data and reference output data.

[0125] In one possible implementation, the verification data block also includes a fifth data node for storing target version information, with each first data node connected to the fifth data node, for example, referring to... Figure 7 The fifth data node is the root node of the verification data block. Based on this, when determining the first target node from multiple first data nodes according to the matching relationship between the business component identifier and the candidate component identifier, the current version information of the target business component can be determined; the target version information in the fifth data node is obtained, and the verification data block is verified according to the matching relationship between the target version information and the current version information; the first target node is determined from multiple first data nodes of the verification data block that has passed the verification according to the matching relationship between the business component identifier and the candidate component identifier.

[0126] When the target version information matches the current version information, it indicates that the version corresponding to the verification data block is correct, and the verification data block passes the verification. When the target version information does not match the current version information, it indicates that the version corresponding to the verification data block is incorrect, and the verification data block fails the verification. A warning message can be issued to indicate this.

[0127] By setting a fifth data node in the verification data block to store target version information, when using the verification data block to verify the target business component, the applicability of the verification data block can be verified based on the target version information and the current version information of the target business component, thereby improving the reliability of using the verification data block to verify the target business component.

[0128] In one possible implementation, the verification data block can also contain multiple tree structures, each rooted by the aforementioned fifth data node. The fifth data nodes in different tree structures store different target version information. Correspondingly, the first, second, third, and fourth data nodes in different tree structures correspond to the target version information of the fifth data node in that tree structure. Based on this, the target tree structure can be determined from the multiple tree structures according to the matching relationship between the current version information and the target version information. Then, the first input data and reference output data corresponding to the target business interface can be obtained from the target tree structure. If the target version information of the fifth data nodes in all tree structures does not match the current version information of the target business component, a warning message can be issued.

[0129] In one possible implementation, after obtaining the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block, the data acquisition status of the first input data and reference output data can also be determined; when at least one of the first input data and reference output data is in a failed state, the historical business request that has been successfully executed is obtained from the cache of the target business interface; the historical input data input to the target business component and the historical output data returned by the target business component after processing the historical input data are obtained from the historical business request; the historical input data is used as the first input data and the historical output data is used as the reference output data.

[0130] Specifically, retrieving the first input data and reference output data from the verification data block may fail. For example, the target version information of the verification data block may not correspond to the current version information of the target business component, or the first input data and reference output data corresponding to a certain target business interface in the verification data block may be lost. In such cases, the data retrieval status will be "failed." In this situation, successfully executed historical business requests can be retrieved from the cache of the target business interface. The cache of the target business interface can be Redis (Remote Dictionary Server), a cache database, or runtime logs, etc., which are not limited in this embodiment. The historical business requests in the cache contain historical input data and historical output data from the current request. The historical output data can be obtained by the target business component after processing historical input data in the actual running scenario. Therefore, the historical input data can be used as the first input data, and the historical output data can be used as the reference output data for verifying the target business component.

[0131] By retrieving historical business requests from the cache of the target business interface when at least one of the first input data and the reference output data is in a failed state, and then using the historical input data in the historical business requests as the first input data and the historical output data in the historical business requests as the reference output data, the reliability and stability of verifying the target business components can be effectively improved.

[0132] In one possible implementation, when using historical input data as the first input data and historical output data as the reference output data, the historical input data and historical output data can be anonymized; the anonymized historical input data can be used as the first input data and the anonymized historical output data can be used as the reference output data.

[0133] Specifically, desensitizing historical input and output data can involve deleting sensitive data from them, thereby improving data security when using historical input and output data to verify target business components.

[0134] In one possible implementation, when the server inputs the second input data to the target business interface, it can specifically use the second input data as the data body to generate a target business request, add a verification identifier to the data header of the target business request, and send the target business request with the added verification identifier to the target business interface.

[0135] Specifically, the verification identifier indicates that the target business request is a test-type request. When using a verification application to verify a target business component, the business request sent to the server where the target business component resides is similar to a normal business request. Therefore, the server where the target business component resides cannot determine whether the business request is a request from a production environment. By adding a verification identifier to the header of the target business request, the server can easily determine that the target business request corresponding to the verification application is not a request from a production environment, thereby reducing the impact on the operation of the target business component during verification. When the server where the target business component resides receives a target business request carrying a verification identifier, it can create a separate virtual host to handle the target business request.

[0136] In one possible implementation, refer to Figure 8 , Figure 8 This is another optional flowchart of the business component verification method provided in the embodiments of this application. When the verification application is installed on the terminal, the business component verification method can be executed by the terminal on which the verification application is installed. The business component verification method includes, but is not limited to, the following steps 801 to 804.

[0137] Step 801: Obtain the verification data block based on the target data carrier, and obtain the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block.

[0138] In one possible implementation, the terminal can identify the target data carrier through the verification application and then obtain the verification data block. The target data carrier is generated by the server after determining that the first output data is consistent with the reference output data. The first output data is the data returned by the target business interface after the server inputs the first input data to the target business interface. The principle of the target data carrier can be found in the explanation of step 502 above, and will not be repeated here.

[0139] Step 802: Call the client-side functional component corresponding to the target business component to process the first input data and obtain the second input data.

[0140] In one possible implementation, the client-side functional component corresponding to the target business component, that is, the functional component that implements the relevant functions of the target business component on the client, allows the terminal to process the first input data through the client-side functional component built into the verification application. For example, it can be a conversion, encryption, merging, etc., which are not limited in the embodiments of this application.

[0141] Step 803: Send the second input data to the server so that the server can input the second input data into the target business interface;

[0142] In one possible implementation, if the target service interface is located on a server that receives the second input data, the terminal sends the second input data to the server that receives the second input data and then the data is directly transmitted to the target service interface. If the target service interface is located on a server other than the server that receives the second input data, the terminal sends the second input data to the server that receives the second input data and then the server that receives the second input data forwards the second input data to the server where the target service interface is located.

[0143] Step 804: Obtain the second output data returned by the target business interface, and obtain the verification result of the target business component based on the second output data and the reference output data.

[0144] In one possible implementation, the second output data returned by the target service interface is sent to the terminal by a server that directly interacts with the terminal. After receiving the second output data, the terminal can compare it with the reference output data in the verification data block. Since the verification application can obtain the verification data block, it indicates that the server has determined that the first output data is consistent with the reference output data. Then, if the terminal determines through the verification application that the second output data is also consistent with the reference output data, it indicates that the link between the client and the target service component is normal, thus determining that the target service component is operating normally. If the terminal determines through the verification application that the second output data is inconsistent with the reference output data, it indicates that the link between the client and the target service component is abnormal, thus determining that the target service component is not operating normally.

[0145] Similarly, based on the verification data block, the verification application can obtain the second output data from the first input data in the verification data block, and then verify whether the link between the client and the target business component is normal based on the second output data and the reference output data in the verification data block, thus realizing the second verification of the target business component. Based on the above dual verification of the target business component, the full-link closed-loop verification of the target business component can be realized. Moreover, in this process, there is no need to obtain data resources from the business end and the R&D end, which shortens the data processing cycle and improves the verification efficiency of the target business component.

[0146] Reference Figure 9 , Figure 9 This is another optional flowchart of the business component verification method provided in the embodiments of this application. The business component verification method is executed by the server and the terminal in cooperation. The business component verification method includes, but is not limited to, the following steps 901 to 902.

[0147] Step 901: The server obtains a preset verification data block, and from the verification data block, obtains the first input data of the target business interface of the target business component, and the reference output data of the target business interface;

[0148] Step 902: The server inputs the first input data to the target business interface, obtains the first output data returned by the target business interface, and when the first output data is consistent with the reference output data, generates a target data carrier for the verification application to obtain the verification data block;

[0149] Step 903: The terminal runs the diagnostic application, obtains the verification data block based on the target data carrier, and obtains the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block;

[0150] Step 904: The terminal calls the client function component corresponding to the target business component in the diagnostic application to process the first input data, obtain the second input data, and send the second input data to the server;

[0151] Step 905: The server obtains the second input data, inputs the second input data into the target business interface, obtains the second output data returned by the target business interface, and sends the second output data to the terminal;

[0152] Step 906: The terminal obtains the verification result of the target service component based on the second output data and the reference output data.

[0153] The verification data block and target data carrier are explained above and will not be repeated here. Based on the verification data block, the server can obtain the first output data from the first input data in the verification data block, and then verify whether the target business component is normal based on the first output data and the reference output data in the verification data block, thus achieving the first layer of verification of the target business component. Based on the verification data block, the terminal can obtain the second output data from the first input data in the verification data block, and then verify whether the link between the client and the target business component is normal based on the second output data and the reference output data in the verification data block, thus achieving the second layer of verification of the target business component. Based on the above dual verification of the target business component, a closed-loop verification of the entire link of the target business component can be achieved. Moreover, in this process, it is not necessary to obtain data resources from the business end and the R&D end, shortening the data processing cycle and thus improving the verification efficiency of the target business component.

[0154] The following practical example illustrates the principle of the business component verification method provided in this application.

[0155] Reference Figure 10 , Figure 10 This is a schematic diagram of an optional architecture for the business component verification method provided in this application embodiment. In this embodiment, a verification service is added on the server side, and a verification application is added on the terminal side. The verification service is used to perform preliminary verification of the target business component of the business service, and the verification application is used to verify the link between the client and the target business component. Figure 10 The architecture shown enables dual verification of the target business components of the business service.

[0156] Specifically, refer to Figure 11 , Figure 11 This is a schematic diagram of an optional architecture for the verification service provided in an embodiment of this application. The verification service includes a data layer, a business layer, and a functional layer, wherein:

[0157] The data layer is configured with two types of verification data blocks: original verification data blocks and de-identified verification data blocks. The original verification data block is a preset verification data block, which includes first input data and reference output data used to input to the target business interface. The de-identified verification data block is an incrementally generated data block. The first input data and reference output data in the de-identified verification data block have different sources than the first input data and reference output data in the original verification data block. The first input data in the de-identified verification data block is de-identified historical input data obtained from the cache of the target business interface, and the reference output data in the de-identified verification data block is de-identified historical output data obtained from the cache of the target business interface.

[0158] The business layer includes a data collection and processing unit, an internal verification unit, a verification configuration management unit, and a QR code generation unit. The data collection and processing unit primarily acquires information such as the business component identifier of the target business component and the business interface identifier of the target business interface, and performs anonymization processing on historical input and output data retrieved from the cache of the target business interface. The internal verification unit primarily performs internal verification of the target business component (the first layer of dual verification), i.e., verifying whether the target business component itself is functioning correctly. The verification configuration management unit primarily updates and caches the configuration information of the verification service, such as the verification cycle and verification results. The QR code generation unit primarily generates QR codes for retrieving verification data blocks from the data layer.

[0159] The functional layer includes a verification data export unit and a business component status display unit. The verification data export unit is used to visualize the QR code generated by the QR code generation unit, and the business component status display unit is used to visualize the verification results of the target business component.

[0160] Specifically, refer to Figure 12 , Figure 12 This is a schematic diagram of an optional operation flow of the verification service provided in the embodiments of this application. The operation flow of the verification service includes, but is not limited to, the following steps 1201 to 1205.

[0161] Step 1201: The verification service obtains the list of business components from the YAML configuration file;

[0162] Step 1202: The verification service traverses the list of business components, obtains the business component identifier and business interface identifier of the current target business component, and obtains the first input data and reference output data from the verification data block based on the business component identifier and business interface identifier.

[0163] In step 1202, the first input data and reference output data are first obtained from the original verification data block according to the business component identifier and the business interface identifier. If the first input data and reference output data cannot be obtained from the original verification data block, the cache location of the target business interface is determined according to the business component identifier and the business interface identifier. The historical input data and historical output data in the historical business requests are obtained from the cache, and after desensitization processing, they are stored as a desensitized verification data block as a replacement for the original verification data block.

[0164] Step 1203: The verification service runs internal verification based on the first input data and the reference output data;

[0165] In step 1203, after obtaining the first input data and the reference output data, the first input data is used as the standard input to access the target business interface provided by the target business component. After obtaining the first output data returned by the target business interface, the first output data is compared with the reference output data. If the first output data matches the reference output data, the internal verification result is passed and the target business interface is running normally; otherwise, the internal verification result is failed and the target business interface is not running normally.

[0166] Step 1204: The verification service determines whether the internal verification result is passed. If yes, proceed to step 1205; otherwise, end the process.

[0167] Step 1205: The verification service generates a QR code for the currently used verification data block and ends the process.

[0168] After the verification service completes internal verification, the terminal can use the verification application to perform a second layer of verification on the target business component. Specifically, refer to... Figure 13 , Figure 13 This is a schematic diagram of an optional operation flow of the verification application provided in the embodiments of this application. The operation flow of the verification application includes, but is not limited to, the following steps 1301 to 1312.

[0169] Step 1301: Verify the application by scanning the QR code generated by the verification service;

[0170] Step 1302: Verify that the application retrieves the information from the QR code;

[0171] Step 1303: The verification application obtains the verification data block based on the information in the QR code;

[0172] Step 1304: The verification application stores the verification data block;

[0173] Step 1305: Verify that the application parses the verification data block and extracts the first input data from the verification data block;

[0174] Step 1306: The verification application uses the built-in client SDK to convert the first input data into the second input data, and uses the second input data to request access to the target business interface of the target business component from the verification service;

[0175] Step 1307: The verification service adds a verification identifier to the second input data;

[0176] Step 1308: The verification service forwards the second input data with the added verification identifier to the target business interface;

[0177] Step 1309: Verify that the service receives the second output data returned by the target business interface;

[0178] Step 1310: The verification service sends the second output data to the verification application;

[0179] Step 1311: Verify that the application extracts the reference output data from the verification data block and compares the second output data with the reference output data;

[0180] Step 1312: Determine and display the verification result of the target business interface based on the comparison result between the second output data and the reference output data.

[0181] Thus, dual verification of the target business component has been completed through verification services and verification applications, enabling full-link closed-loop verification of the target business component. Furthermore, in this process, there is no need to obtain data resources from the business and R&D ends, shortening the data processing cycle and thereby improving the verification efficiency of the target business component.

[0182] The principle of the above double verification is fully described below through an example.

[0183] Reference Figure 14 , Figure 14 This is an optional flowchart illustrating a dual verification process provided in an embodiment of this application. The dual verification process includes, but is not limited to, the following steps 1401 to 1406.

[0184] Step 1401: Run the verification service;

[0185] In step 1401, after the operation and maintenance end deploys the business service (containing multiple target business components) on the server, it runs the verification service, obtains the business component list from the YAML configuration file, traverses the business component list, and obtains the business component identifier and business interface identifier of the current target business component.

[0186] Step 1402: Obtain historical input and output data of the target business interface;

[0187] Step 1403: De-identify historical input and output data and store them in the verification data block;

[0188] In step 1403, the anonymized historical input data and historical output data are stored in a tree structure according to the business component identifier and business interface identifier of the target business component.

[0189] Step 1404: Generate the QR code corresponding to the verification data block;

[0190] In step 1404, the verification service performs a first verification on the current target business component based on the first input data and the reference output data. After the verification is successful, a QR code is generated using the verification data block.

[0191] Step 1405: Verify the application's recognition of the QR code;

[0192] In step 1405, the operation and maintenance terminal runs a verification application on the terminal and uses the verification application to identify the QR code generated by the verification service to obtain a verification data block.

[0193] Step 1406: Display the verification results.

[0194] In step 1406, the verification application performs a second verification on the current target business component. It uses the built-in client SDK to convert the first input data in the verification data block into second input data, and uses the second input data to request access to the target business interface of the target business component from the verification service. The verification service adds a verification identifier to the second input data and forwards it to the target business interface of the target business component. It receives the second output data returned by the target business interface and sends the second output data to the verification application. The verification application determines the verification result of the target business interface based on the comparison result between the second output data and the reference output data in the verification data block, and displays it, thereby facilitating the operation and maintenance end to adjust the deployment of business services based on the verification result.

[0195] As can be seen, the first step is to use the verification service to perform a first-level verification of the target business component to check if it is functioning correctly. After successful verification, a QR code corresponding to the verification data block is generated, which facilitates the verification application to obtain the verification data block. Based on the verification data block, the verification application can obtain the second output data according to the first input data in the verification data block. Then, based on the second output data and the reference output data in the verification data block, it can verify whether the link between the client and the target business component is normal, thus achieving a second-level verification of the target business component. Based on the above dual verification of the target business component, a closed-loop verification of the entire link of the target business component can be achieved. Moreover, in this process, it is not necessary to obtain data resources from the business side and the development side, which shortens the data processing cycle and improves the verification efficiency of the target business component.

[0196] It is understood that although the steps in the above flowcharts are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this embodiment, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the above flowcharts may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.

[0197] Reference Figure 15 , Figure 15 This application provides an optional structural diagram of a service component verification device 1500, comprising:

[0198] The first data block acquisition module 1501 is used to acquire a preset verification data block and obtain the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block.

[0199] The first verification module 1502 is used to input the first input data to the target business interface, obtain the first output data returned by the target business interface, and when the first output data is consistent with the reference output data, generate a target data carrier for the verification application to obtain the verification data block. The verification application is equipped with a client function component corresponding to the target business component.

[0200] The first data sending module 1503 is used to obtain the second input data after the client functional component processes the first input data, input the second input data to the target business interface, and obtain the second output data returned by the target business interface.

[0201] The data pass-through module 1504 is used to send the second output data to the verification application so that the verification application can obtain the verification result of the target business component based on the second output data and the reference output data.

[0202] Furthermore, the aforementioned first data block acquisition module 1501 is specifically used for:

[0203] Obtain the business component identifier of the target business component, and the business interface identifier of the target business interface of the target business component;

[0204] Based on the business component identifier and business interface identifier, obtain the first input data and reference output data of the target business interface from the verification data block.

[0205] Furthermore, the verification data block is configured with multiple first data nodes for storing candidate component identifiers, each first data node is connected to multiple second data nodes for storing candidate interface identifiers, each second data node is connected to a third data node for storing candidate input data and a fourth data node for storing candidate output data. The aforementioned first data block acquisition module 1501 is specifically used for:

[0206] Based on the matching relationship between the business component identifier and the candidate component identifier, the first target node is determined from multiple first data nodes;

[0207] Based on the matching relationship between the business interface identifier and the candidate interface identifier, the second target node is determined from the multiple second data nodes connected to the first target node;

[0208] Obtain candidate input data from the third data node connected to the second target node, and use it as the first input data corresponding to the target business interface;

[0209] Obtain candidate output data from the fourth data node connected to the second target node, and use it as reference output data for the target business interface.

[0210] Furthermore, the verification data block also includes a fifth data node for storing target version information, and each first data node is connected to the fifth data node. The aforementioned first data block acquisition module 1501 is specifically used for:

[0211] Determine the current version information of the target business component;

[0212] Obtain the target version information from the fifth data node, and verify the verification data block based on the matching relationship between the target version information and the current version information;

[0213] Based on the matching relationship between the business component identifier and the candidate component identifier, the first target node is determined from multiple first data nodes of the verified data block that have passed the verification.

[0214] Furthermore, the aforementioned first data block acquisition module 1501 is specifically used for:

[0215] Obtain the business configuration file and retrieve the runtime scenario information of the target business component from the business configuration file;

[0216] When the runtime scenario information indicates that the target business component is in a test runtime scenario, the business component identifier of the target business component and the business interface identifier of the target business interface of the target business component are obtained from the business configuration file; or, when the runtime scenario information indicates that the target business component is in a formal runtime scenario, in response to the verification instruction for the target business component, the business component identifier of the target business component and the business interface identifier of the target business interface of the target business component are obtained from the business configuration file.

[0217] Furthermore, the aforementioned first data block acquisition module 1501 is also used for:

[0218] Determine the data acquisition status of the first input data and the reference output data;

[0219] If at least one of the first input data and the reference output data is in a failed state, retrieve the historical business request that has been successfully executed from the cache of the target business interface;

[0220] Obtain historical input data from historical business requests that were input to the target business component, as well as historical output data returned by the target business component after processing the historical input data;

[0221] Use historical input data as the first input data and historical output data as the reference output data.

[0222] Furthermore, the aforementioned first data block acquisition module 1501 is specifically used for:

[0223] De-identify historical input and output data;

[0224] Use the anonymized historical input data as the first input data and the anonymized historical output data as the reference output data.

[0225] Furthermore, the target data carrier includes a graphic code, and the aforementioned first verification module 1502 is specifically used for:

[0226] Encode the verification data block to obtain the first encoded information, generate a graphic code based on the first encoded information block and display the graphic code;

[0227] Alternatively, determine the access address of the verification data block, encode the access address to obtain the second encoding information, generate a graphic code based on the second encoding information block, and display the graphic code.

[0228] Furthermore, the aforementioned first data sending module 1503 is specifically used for:

[0229] The second input data is used as the data body to generate the target business request;

[0230] Add a verification flag to the header of the target business request. The verification flag is used to indicate that the target business request is a test type request.

[0231] Send the target business request with the added verification identifier to the target business interface.

[0232] The aforementioned first business component verification device 1500 and Figure 5 The business component verification method shown is based on the same inventive concept. Therefore, based on the verification data block, the first output data can be obtained from the first input data in the verification data block. Then, the first output data and the reference output data in the verification data block are used to verify whether the target business component is normal, thus achieving the first layer of verification of the target business component. When the first output data is consistent with the reference output data, it can be determined that the target business component is normal. The target data carrier for the verification application to obtain the verification data block is further generated. Since the verification application has a client function component corresponding to the target business component, based on the verification data block, the verification application can obtain the second output data from the first input data in the verification data block. Then, the second output data and the reference output data in the verification data block are used to verify whether the link between the client and the target business component is normal, thus achieving the second layer of verification of the target business component. Based on the above dual verification of the target business component, the full-link closed-loop verification of the target business component can be achieved. Moreover, in this process, it is not necessary to obtain data resources from the business end and the R&D end, which shortens the data processing cycle and improves the verification efficiency of the target business component.

[0233] Reference Figure 16 , Figure 16 This is a schematic diagram of another optional structure of the service component verification device provided in the embodiments of this application. The second service component verification device 1600 includes:

[0234] The second data block acquisition module 1601 acquires a verification data block based on the target data carrier, and acquires the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block. The target data carrier is generated by the server after determining that the first output data and the reference output data are consistent. The first output data is the data returned by the target business interface after the server inputs the first input data into the target business interface.

[0235] Module 1602 is invoked to call the client-side functional component corresponding to the target business component to process the first input data and obtain the second input data;

[0236] The second data sending module 1603 is used to send the second input data to the server so that the server can input the second input data into the target service interface;

[0237] The second verification module 1604 is used to obtain the second output data returned by the target business interface, and to obtain the verification result of the target business component based on the second output data and the reference output data.

[0238] The aforementioned second business component verification device 1600 and Figure 8 The business component verification method shown is based on the same inventive concept. Therefore, based on the verification data block, the first output data can be obtained from the first input data in the verification data block. Then, the first output data and the reference output data in the verification data block are used to verify whether the target business component is normal, thus achieving the first layer of verification of the target business component. When the first output data is consistent with the reference output data, it can be determined that the target business component is normal. The target data carrier for the verification application to obtain the verification data block is further generated. Since the verification application has a client function component corresponding to the target business component, based on the verification data block, the verification application can obtain the second output data from the first input data in the verification data block. Then, the second output data and the reference output data in the verification data block are used to verify whether the link between the client and the target business component is normal, thus achieving the second layer of verification of the target business component. Based on the above dual verification of the target business component, the full-link closed-loop verification of the target business component can be achieved. Moreover, in this process, it is not necessary to obtain data resources from the business end and the R&D end, which shortens the data processing cycle and improves the verification efficiency of the target business component.

[0239] The electronic device provided in this application embodiment for executing the above-described business component verification method can be a terminal, as shown below. Figure 17 , Figure 17 This is a partial structural block diagram of a terminal provided in an embodiment of this application. The terminal includes: a radio frequency (RF) circuit 1710, a memory 1720, an input unit 1730, a display unit 1740, a sensor 1750, an audio circuit 1760, a wireless fidelity (WiFi) module 1770, a processor 1780, and a power supply 1790, among other components. Those skilled in the art will understand that... Figure 17 The terminal structure shown does not constitute a limitation on the terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0240] RF circuit 1710 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with processor 1780; in addition, it transmits uplink data to the base station.

[0241] The memory 1720 can be used to store software programs and modules. The processor 1780 executes various terminal functions and data processing by running the software programs and modules stored in the memory 1720.

[0242] The input unit 1730 can be used to receive input numeric or character information, and to generate key signal inputs related to the terminal's settings and function control. Specifically, the input unit 1730 may include a touch panel 1731 and other input devices 1732.

[0243] The display unit 1740 can be used to display input or provided information, as well as various menus of the terminal. The display unit 1740 may include a display panel 1741.

[0244] Audio circuitry 1760, speaker 1761, and microphone 1762 provide an audio interface.

[0245] In this embodiment, the processor 1780 included in the terminal can execute the business component verification method of the previous embodiment.

[0246] The electronic device provided in this application embodiment for executing the above-described business component verification method can also be a server, see reference. Figure 18 , Figure 18 The diagram illustrates a partial structural block of a server provided in this application embodiment. The server 1800 can vary significantly due to different configurations or performance characteristics. It may include one or more Central Processing Units (CPUs) 1822 (e.g., one or more processors) and a memory 1832, and one or more storage media 1830 (e.g., one or more mass storage devices) for storing application programs 1842 or data 1844. The memory 1832 and storage media 1830 may be temporary or persistent storage. The program stored in the storage media 1830 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server 1800. Furthermore, the CPU 1822 may be configured to communicate with the storage media 1830 and execute the series of instruction operations in the storage media 1830 on the server 1800.

[0247] Server 1800 may also include one or more power supplies 1826, one or more wired or wireless network interfaces 1850, one or more input / output interfaces 1858, and / or one or more operating systems 1841, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0248] The processor in Server 1800 can be used to execute business component verification methods.

[0249] This application also provides a computer-readable storage medium for storing program code, which is used to execute the business component verification methods of the foregoing embodiments.

[0250] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the business component verification method described above.

[0251] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatuses.

[0252] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0253] It should be understood that in the description of the embodiments of this application, "multiple" means two or more, "greater than", "less than", "exceeding" etc. are understood to exclude the number itself, and "above", "below", "within" etc. are understood to include the number itself.

[0254] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0255] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0256] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0257] If the integrated unit is implemented as 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 this application, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0258] It should also be understood that the various implementation methods provided in this application can be combined arbitrarily to achieve different technical effects.

[0259] The above provides a detailed description of the preferred embodiments of this application. However, this application is not limited to the above-described embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A method for verifying business components, characterized in that, include: Obtain a preset verification data block, and obtain the first input data of the target business interface of the target business component and the reference output data of the target business interface from the verification data block; The first input data is input to the target business interface, and the first output data returned by the target business interface is obtained. When the first output data is consistent with the reference output data, a target data carrier is generated for the verification application to obtain the verification data block. The verification application is equipped with a client function component corresponding to the target business component. The client functional component obtains the second input data after processing the first input data. The second input data is used as the data body to generate a target business request. A verification identifier is added to the data header of the target business request. The verification identifier is used to indicate that the target business request is a test type request. The target business request with the added verification identifier is sent to the target business interface. The second output data returned by the target business interface is obtained. The second output data is sent to the verification application so that the verification application can obtain the verification result of the target business component based on the second output data and the reference output data; The target data carrier includes a graphic code, and generating the target data carrier for the verification application to obtain the verification data block includes: The verification data block is encoded to obtain first encoded information, and the graphic code is generated and displayed based on the first encoded information block. Alternatively, the access address of the verification data block is determined, the access address is encoded to obtain second encoding information, and the graphic code is generated and displayed based on the second encoding information block.

2. The business component verification method according to claim 1, characterized in that, The step of obtaining the first input data of the target business interface of the target business component and the reference output data of the target business interface from the verification data block includes: Obtain the business component identifier of the target business component, and the business interface identifier of the target business interface of the target business component; Based on the business component identifier and the business interface identifier, the first input data and reference output data of the target business interface are obtained from the verification data block.

3. The business component verification method according to claim 2, characterized in that, The verification data block is configured with multiple first data nodes for storing candidate component identifiers. Each first data node is connected to multiple second data nodes for storing candidate interface identifiers. Each second data node is connected to a third data node for storing candidate input data and a fourth data node for storing candidate output data. The step of obtaining the first input data and reference output data corresponding to the target business interface from the verification data block based on the business component identifier and the business interface identifier includes: Based on the matching relationship between the business component identifier and the candidate component identifier, a first target node is determined from a plurality of first data nodes; Based on the matching relationship between the business interface identifier and the candidate interface identifier, a second target node is determined from a plurality of second data nodes connected to the first target node; Obtain the candidate input data from the third data node connected to the second target node, and use it as the first input data corresponding to the target service interface; The candidate output data in the fourth data node connected to the second target node is obtained as the reference output data corresponding to the target service interface.

4. The business component verification method according to claim 3, characterized in that, The verification data block is further provided with a fifth data node for storing target version information, and each of the first data nodes is connected to the fifth data node. The step of determining the first target node from multiple first data nodes based on the matching relationship between the business component identifier and the candidate component identifier includes: Determine the current version information of the target business component; Obtain the target version information from the fifth data node, and verify the verification data block according to the matching relationship between the target version information and the current version information; Based on the matching relationship between the business component identifier and the candidate component identifier, a first target node is determined from multiple first data nodes of the verified data block that have passed the verification.

5. The business component verification method according to any one of claims 2 to 4, characterized in that, The step of obtaining the business component identifier of the target business component and the business interface identifier of the target business interface of the target business component includes: Obtain the business configuration file, and retrieve the runtime scenario information of the target business component from the business configuration file; When the running scenario information indicates that the target business component is in a test running scenario, the business component identifier of the target business component and the business interface identifier of the target business interface of the target business component are obtained from the business configuration file; or, when the running scenario information indicates that the target business component is in a formal running scenario, in response to the verification instruction for the target business component, the business component identifier of the target business component and the business interface identifier of the target business interface of the target business component are obtained from the business configuration file.

6. The business component verification method according to claim 1, characterized in that, After obtaining the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block, the business component verification method further includes: Determine the data acquisition status of the first input data and the reference output data; When at least one of the first input data and the reference output data is in a failed state, retrieve the historical business request that has been successfully executed from the cache of the target business interface; Obtain historical input data from the historical service requests that was input to the target service component, and historical output data returned by the target service component after processing the historical input data; The historical input data is used as the first input data, and the historical output data is used as the reference output data.

7. The business component verification method according to claim 6, characterized in that, The step of using the historical input data as the first input data and the historical output data as the reference output data includes: The historical input data and the historical output data are anonymized. The anonymized historical input data is used as the first input data, and the anonymized historical output data is used as the reference output data.

8. A method for verifying business components, characterized in that, include: Based on the target data carrier, a verification data block is obtained. From the verification data block, the first input data and reference output data corresponding to the target business interface of the target business component are obtained. The target data carrier is generated by the server after determining that the first output data is consistent with the reference output data. The first output data is the data returned by the target business interface after the server inputs the first input data to the target business interface. The client-side functional component corresponding to the target business component is invoked to process the first input data to obtain the second input data; The second input data is sent to the server so that the server can use the second input data as the data body to generate a target business request, add a verification identifier to the data header of the target business request, the verification identifier is used to indicate that the target business request is a test type request, and send the target business request with the added verification identifier to the target business interface. Obtain the second output data returned by the target business interface, and obtain the verification result of the target business component based on the second output data and the reference output data; The target data carrier includes a graphic code, and the target data carrier is generated by the server through the following steps: The verification data block is encoded to obtain first encoded information, and the graphic code is generated and displayed based on the first encoded information block. Alternatively, the access address of the verification data block is determined, the access address is encoded to obtain second encoding information, and the graphic code is generated and displayed based on the second encoding information block.

9. A business component verification device, characterized in that, include: The first data block acquisition module is used to acquire a preset verification data block and to acquire the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block. The first verification module is used to input the first input data to the target business interface, obtain the first output data returned by the target business interface, and when the first output data is consistent with the reference output data, generate a target data carrier for the verification application to obtain the verification data block, wherein the verification application is provided with a client function component corresponding to the target business component; The first data sending module is used to obtain the second input data obtained after the client functional component processes the first input data, use the second input data as the data body to generate a target business request, add a verification identifier to the data header of the target business request, the verification identifier is used to indicate that the target business request is a test type request, send the target business request with the added verification identifier to the target business interface, and obtain the second output data returned by the target business interface. The data pass-through module is used to send the second output data to the verification application, so that the verification application can obtain the verification result of the target business component based on the second output data and the reference output data; The target data carrier includes a graphic code, and the target data carrier is generated by the server through the following steps: The verification data block is encoded to obtain first encoded information, and the graphic code is generated and displayed based on the first encoded information block. Alternatively, the access address of the verification data block is determined, the access address is encoded to obtain second encoding information, and the graphic code is generated and displayed based on the second encoding information block.

10. A business component verification device, characterized in that, include: The second data block acquisition module acquires a verification data block based on the target data carrier, and acquires the first input data and reference output data corresponding to the target business interface of the target business component from the verification data block. The target data carrier is generated by the server after determining that the first output data is consistent with the reference output data. The first output data is the data returned by the target business interface after the server inputs the first input data to the target business interface. The calling module is used to call the client function component corresponding to the target business component to process the first input data and obtain the second input data; The second data sending module is used to send the second input data to the server, so that the server can use the second input data as the data body to generate a target service request, add a verification identifier to the data header of the target service request, the verification identifier is used to indicate that the target service request is a test type request, and send the target service request with the added verification identifier to the target service interface. The second verification module is used to obtain the second output data returned by the target business interface, and to obtain the verification result of the target business component based on the second output data and the reference output data. The target data carrier includes a graphic code, and the target data carrier is generated by the server through the following steps: The verification data block is encoded to obtain first encoded information, and the graphic code is generated and displayed based on the first encoded information block. Alternatively, the access address of the verification data block is determined, the access address is encoded to obtain second encoding information, and the graphic code is generated and displayed based on the second encoding information block.

11. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the business component verification method according to any one of claims 1 to 8.

12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the business component verification method according to any one of claims 1 to 8.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the business component verification method according to any one of claims 1 to 8.