Testing method and device of operator service and electronic equipment
By deploying operator services and domain-based services in containers and using virtualized container technology for testing, the problems of cumbersome deployment of operator services and long testing time in the existing technology are solved, achieving fast and accurate testing and reducing the cost of testing. Production environment risks.
Patent Information
- Application Number
- CN202410705637.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-05-31
AI Technical Summary
When testing operator services, the existing technology is cumbersome and time-consuming to deploy, is limited by differences in operating system versions, cannot respond to changes in business requirements in a timely manner, and has risks when deployed in a production environment.
By deploying operator services and domain services in containers, using virtualized container technology for testing, and calling operator services to process test data according to preset processing procedures, the test of simulated production environment is realized and the defective operators are avoided. Risks of deploying services to production environments.
It simplifies the deployment method of operator services, improves testing efficiency, can respond to changes in business requirements in a timely manner, reduces the risk and time of deployment in the production environment, and ensures the accuracy and consistency of test results.
Smart Images

Figure CN118535474A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to technical fields such as machine learning, data processing, and intelligent testing, and in particular to a testing method, device, and electronic device for an operator service. Background Art
[0002] Operator services encapsulate operators as independent service entities, so that operators can exist in the form of standardized, directly callable services for convenient access and use by external systems or applications. Operator services need to be tested during the development process or in the iteration process after being deployed in the production environment to determine whether the operator services meet the standards for use in the production environment. How to achieve efficient testing of operator services is a problem that needs to be solved. Summary of the invention
[0003] The present disclosure provides a method, device and electronic device for testing an operator service.
[0004] According to one aspect of the present disclosure, a testing method for an operator service is provided, the method comprising: obtaining an operator service to be tested; deploying the operator service and a domain-based service in a container; testing the operator service in the container based on the domain-based service and test data to obtain corresponding test results; wherein the domain-based service is used to call the operator service to process the test data according to a preset processing flow during the testing of the operator service.
[0005] According to another aspect of the present disclosure, a testing device for an operator service is provided, the device comprising: an acquisition module, used to acquire the operator service to be tested; a deployment module, used to deploy the operator service and the domain-based service in a container; a testing module, used to test the operator service in the container based on the domain-based service and test data to obtain corresponding test results; wherein the domain-based service is used to call the operator service to process the test data according to a preset processing flow during the process of testing the operator service.
[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the test method of the operator service proposed above in the present disclosure.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the operator service testing method proposed above in the present disclosure.
[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements the steps of the operator service testing method proposed above in the present disclosure when executed by a processor.
[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0011] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;
[0012] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;
[0013] Figure 3 is a schematic diagram according to a third embodiment of the present disclosure;
[0014] Figure 4 This is an example diagram of container scheduling management;
[0015] Figure 5 is a schematic diagram according to a fourth embodiment of the present disclosure;
[0016] Figure 6 is a schematic diagram according to a fifth embodiment of the present disclosure;
[0017] Figure 7 is a schematic diagram according to a sixth embodiment of the present disclosure;
[0018] Figure 8 is a schematic diagram according to a seventh embodiment of the present disclosure;
[0019] Fig. 9 is a schematic diagram according to an eighth embodiment of the present disclosure;
[0020] Fig.10 The block diagram is a block diagram of an electronic device for implementing the test of the operator service in the embodiment of the present disclosure. DETAILED DESCRIPTION
[0021] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0022] Operator services encapsulate operators as independent service entities, so that operators can exist in the form of standardized, directly callable services for convenient access and use by external systems or applications. Operator services need to be tested during the development process or in the iteration process after being deployed in the production environment to determine whether the operator services meet the standards for use in the production environment.
[0023] When testing operator services, related technologies use a static deployment method to deploy operator services on the operating system, which requires manual configuration of the environment and dependencies. The deployment of operator services is limited by the version differences of the operating system. The deployment process of operator services is cumbersome and time-consuming, and the operator services need to be deployed in the production environment (online) to test the situation when the operator services are used online. Putting the operator service online requires putting the entire operating system online, which results in a long testing time for the operator service and an inability to respond to changes in business needs in a timely manner.
[0024] In view of the above problems, the present disclosure proposes a testing method, device and electronic device for operator services.
[0025] Figure 1 This is a schematic diagram according to the first embodiment of the present disclosure. It should be noted that the test method of the operator service of the embodiment of the present disclosure can be applied to the test device of the operator service, which can be an electronic device or can be configured in an electronic device so that the electronic device can perform the test function of the operator service. The test device of the operator service can be, for example, an algorithm iteration platform configured in an electronic device.
[0026] Among them, the electronic device can be any device with computing capabilities, such as a personal computer (PC), a mobile terminal, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a smart speaker, and other hardware devices with various operating systems, touch screens and / or display screens.
[0027] like Figure 1 As shown, the test method of the operator service may include the following steps:
[0028] Step 101: Obtain the operator service to be tested.
[0029] In the embodiments of the present disclosure, the number of operator services may be one or more, and the present disclosure does not limit this. The operator encapsulated in the operator service may be an algorithm model or other computing unit, and the present disclosure does not limit this. The operator service may be an operator service in the development process, or an operator service in the iteration process after being deployed in the production environment, that is, the operator service to be tested may have a historical version that has been deployed in the production environment, and the present disclosure does not limit this.
[0030] Step 102: deploy operator services and domain services in the container.
[0031] Among them, domain-based services are services that can simulate the processing flows corresponding to various application scenarios within a certain technical field. They are configured in different scenarios, such as how to configure multiple operator services to combine in different application scenarios to implement the corresponding processing flows, thereby simulating the processing flows corresponding to different application scenarios.
[0032] For example, domain-based services can simulate the processing flows corresponding to various application scenarios in the business security field, where application scenarios can include, for example, abnormal information recognition scenarios in images or videos, abnormal face recognition scenarios in images or recognition, etc. Alternatively, domain-based services can simulate the processing flows corresponding to various application scenarios in the financial credit field, where application scenarios can include, for example, credit assessment scenarios, financial risk prediction scenarios, etc. Alternatively, domain-based services can simulate the processing flows corresponding to various application scenarios in the information recommendation field, where application scenarios can include, for example, item recommendation scenarios, video recommendation scenarios, article recommendation scenarios, etc.
[0033] In the embodiments of the present disclosure, the processing flow corresponding to a certain application scenario can be implemented by one operator service alone or by multiple operator services jointly. One or more operator services that implement the processing flow corresponding to the same application scenario can be deployed in the same container. The codes of domain services deployed in different containers can be the same.
[0034] For example, assuming that operator service a and operator service b jointly implement the processing flow corresponding to the video recommendation scenario, the processing flow may include: classifying the user based on the user's feature information by operator service a to obtain the category to which the user belongs, and recommending videos to the user based on the category to which the user belongs by operator service b. Operator service a and operator service b can be deployed in the same container, and a domain-based service can be deployed in the container. The domain-based service can configure the combination of operator service a and operator service b in the video recommendation scenario to implement the processing flow, thereby simulating the processing flow corresponding to the video recommendation scenario.
[0035] Step 103, test the operator service in the container based on the domain-based service and the test data to obtain the corresponding test results; wherein the domain-based service is used to call the operator service to process the test data according to a preset processing flow during the process of testing the operator service.
[0036] The preset processing flow is a processing flow corresponding to any preset application scenario, for example, it may be a processing flow in a real scenario in a production environment.
[0037] Test data, i.e., data used to test the operator service, can be processed by the operator service according to a preset processing flow to implement the test of the operator service. In particular, taking the preset processing flow corresponding to the video recommendation scenario in the above example as an example, the test data may include feature information of the user to be recommended a video. Alternatively, taking the preset processing flow corresponding to the abnormal information identification scenario as an example, the test data may include multimedia data such as images or videos to be identified for abnormal information.
[0038] In the embodiment of the present disclosure, during the process of testing the operator service, the domain-based service can call the operator service to process the test data according to the preset processing flow to simulate the preset processing flow to test the operator service.
[0039] The test method of the operator service of the embodiment of the present disclosure is to obtain the operator service to be tested; deploy the operator service and the domain service in the container; test the operator service in the container based on the domain service and the test data according to the business process flow, and obtain the corresponding test result; wherein the domain service is used to call the operator service to process the test data according to the preset processing flow in the process of testing the operator service. Thus, the operator service can be automatically deployed in the container through the virtualization container technology, and the operator service can be tested in the container. The deployment method of the operator service is simple and fast, and is not limited by the version difference of the operating system. Since the domain service can call the operator service to process the test data according to the preset processing flow, the operator service can be tested by simulating the preset processing flow, so that the operator service does not need to be deployed in the production environment, and the operator service can be tested according to the processing flow in the production environment, which saves the time of deploying the operator service in the production environment, greatly improves the test efficiency of the operator service, and can respond to changes in business needs in a timely manner.
[0040] In addition, when there are defects in the operator service, deploying the operator service through a container can reduce the rollback time and avoid deploying the defective operator service in the production environment when testing the operator service, thereby reducing the risk of deploying the operator service in the production environment.
[0041] In order to clearly illustrate the process of testing an operator service based on domain-based services and test data in a container, the embodiment of the present disclosure also provides a method for testing an operator service.
[0042] like Figure 2 As shown, Figure 2 is a schematic diagram according to a second embodiment of the present disclosure, Figure 2 The illustrated embodiment may include the following steps:
[0043] Step 201: Obtain the operator service to be tested.
[0044] Step 202: deploy operator services and domain services in the container.
[0045] Step 203: Acquire test data through domain-based services, and call operator services to process the test data according to a preset processing flow.
[0046] In the embodiments of the present disclosure, the preset processing flow can be implemented by one operator service alone or by multiple operator services in combination. At least one operator service that implements the preset processing flow can be deployed in the same container. The codes of domain services deployed in different containers can be the same.
[0047] In the embodiments of the present disclosure, an application scenario of abnormal information identification in the field of business security is taken as an example. The test data may include multimedia data for abnormal information identification, and the multimedia data includes at least one of text, video, picture and audio. At least one operator service that implements a preset processing flow may include a first operator service, wherein the first operator service independently implements a preset processing flow. The preset processing flow may include: identifying abnormal information on multimedia data through the first operator service. The processing result obtained by processing the test data may include the confidence level of the presence of abnormal information in the multimedia data.
[0048] The amount of multimedia data can be set as required.
[0049] That is, the domain-based service can obtain multimedia data for which abnormal information is to be identified, and according to the preset processing flow, call the first operator service to identify abnormal information on the multimedia data, and obtain the confidence level of the presence of abnormal information in the multimedia data.
[0050] Therefore, the domain-based service can call the first operator service to process the multimedia data according to the processing flow corresponding to the abnormal information identification scenario to simulate the processing flow corresponding to the abnormal information identification scenario, thereby realizing the operator service test under the abnormal information identification scenario.
[0051] In the embodiments of the present disclosure, an application scenario of abnormal face recognition scenario in the field of business security is taken as an example. The test data may include videos and / or pictures to be subjected to abnormal face recognition. At least one operator service that implements a preset processing flow may include a second operator service and a third operator service, wherein the second operator service and the third operator service jointly implement the preset processing flow. The preset processing flow may include: performing face detection on the video and / or picture through the second operator service to obtain a detection frame including the face, and judging whether the face in the detection frame is the face of an abnormal user through the third operator service. The processing result obtained by processing the test data may include the confidence that there is an abnormal user's face in the video and / or picture.
[0052] The number of videos and / or pictures can be set as needed.
[0053] That is, the domain-based service can obtain the video and / or picture on which abnormal face recognition is to be performed, and according to the preset processing flow, call the second operator service to perform face detection on the video and / or picture to obtain a detection frame including the face, and the domain-based service can call the third operator service to determine whether the face in the detection frame is the face of an abnormal user, and obtain the confidence level of the presence of the abnormal user's face in the video and / or picture.
[0054] Therefore, the domain-based service can call the second operator service and the third operator service to process the video and / or image according to the processing flow corresponding to the abnormal face recognition scenario to simulate the processing flow corresponding to the abnormal face recognition scenario, thereby realizing the operator service test under the abnormal face recognition scenario.
[0055] In the embodiments of the present disclosure, an application scenario is taken as an example of an item recommendation scenario in the field of information recommendation. The test data may include feature information of a target user for whom item recommendation is to be performed. At least one operator service that implements a preset processing flow may include a fourth operator service and a fifth operator service, wherein the fourth operator service and the fifth operator service jointly implement the preset processing flow. The preset processing flow may include: classifying the target user based on the feature information of the target user through the fourth operator service to obtain the type to which the target user belongs, and recommending a target item to the target user based on the type to which the target user belongs through the fifth operator service. The processing result obtained by processing the test data may include the confidence of multiple candidate items as target items.
[0056] Among them, the number of target users can be set as needed.
[0057] That is, the domain-based service can obtain the characteristic information of the target user for whom the item is to be recommended, and according to the preset processing flow, call the fourth operator service to classify the target user based on the characteristic information of the target user to obtain the type to which the target user belongs, and the domain-based service can call the fifth operator service to recommend the target item to the target user based on the type to which the target user belongs. In the process of recommending the target item to the target user based on the type to which the target user belongs, the confidence of multiple candidate items as the target item can be obtained, and the confidence can be used to determine the final recommended target item from the multiple candidate items.
[0058] Therefore, the domain-based service can call the fourth operator service and the fifth operator service to process the feature information of the target user according to the processing flow corresponding to the item recommendation scenario, so as to simulate the processing flow corresponding to the item recommendation scenario, thereby realizing the operator service test in the item recommendation scenario.
[0059] Step 204 : Generate a test result corresponding to the operator service based on at least one of the following information: a processing result of the test data, a data processing amount of the test data, and resource usage of the operator service in the process of processing the test data.
[0060] In the embodiment of the present disclosure, the test of the operator service may include an effect test, and the operator service to be tested may include at least one operator service that implements a preset processing flow alone or in combination. The effect test is to test the predicted effect of the operator service. Accordingly, step 204 may be implemented in the following manner:
[0061] Based on the processing results of at least one operator service on the test data, generate the test results of the corresponding effect test, wherein the test results include the predicted effect of at least one operator service, and the predicted effect is characterized by at least one of the following indicators: accuracy, precision, recall, and the harmonic mean F1 score of precision and recall.
[0062] In an example of an embodiment of the present disclosure, taking the processing result of the test data including the confidence level in any of the above-mentioned application scenarios as an example, the domain-based service can generate the prediction result of the at least one operator service through the following preset strategy: based on the confidence level, determine the final prediction result of the at least one operator service, and then the test device of the operator service can determine the prediction effect of the operator service based on the prediction result, or display the prediction result, so as to manually determine the prediction effect of the operator service based on the prediction result.
[0063] Taking the application scenario of abnormal information identification as an example, for any multimedia data among multiple multimedia data, the domain service can compare the confidence of the existence of abnormal information in the multimedia data with the confidence threshold. When the confidence is greater than the confidence threshold, the prediction result of the existence of abnormal information in the multimedia data is obtained. When the confidence is not greater than the confidence threshold, the prediction result of the absence of abnormal information in the multimedia data is obtained. Then, the test device of the operator service can determine the accuracy, precision, recall, and harmonic mean F1 score of the operator service's prediction based on the prediction results of whether there is abnormal information in the multiple multimedia data and whether the multiple multimedia data actually have abnormal information.
[0064] Taking the application scenario of abnormal face recognition as an example, for any video or picture in multiple videos and / or pictures, the domain service can compare the confidence of the presence of the abnormal user's face in the video or picture with the confidence threshold. When the confidence is greater than the confidence threshold, the prediction result of the presence of the abnormal user's face in the video or picture is obtained. When the confidence is not greater than the confidence threshold, the prediction result of the absence of the abnormal user's face in the video or picture is obtained. Then, the test device of the operator service can determine the accuracy, precision, recall, and harmonic mean F1 score of the operator service's prediction based on the prediction results of whether there are abnormal user faces in multiple videos and / or pictures, and whether there are actually abnormal user faces in the multiple videos and / or pictures.
[0065] Taking the application scenario of item recommendation as an example, for multiple target users, the domain-based service can compare the confidence of multiple candidate items as target items with the confidence threshold, and determine the preset number of candidate items with confidence greater than the confidence threshold as the target items, which are the prediction results of the operator service. Then, the test device of the operator service can determine the accuracy, precision, recall, and harmonic mean F1 score of the operator service's prediction based on the prediction results corresponding to the multiple target users and the feedback of the multiple target users.
[0066] As a result, there is no need to deploy operator services that implement the same processing flow individually or jointly in the production environment. The effect of the operator service can be tested in the container according to the processing flow in the production environment.
[0067] In the embodiment of the present disclosure, the test performed on the operator service may include a stress test, the amount of test data is greater than a preset threshold, and the operator service includes at least one operator service that implements a preset processing flow alone or in combination. The stress test is to simulate the concurrent processing requests of multiple users through a stress testing tool to test the service performance of the operator service under high load. Accordingly, step 204 can be implemented in the following manner:
[0068] Based on the data processing volume of at least one operator service for the test data and / or the resource usage of at least one operator service in the process of processing the test data, a corresponding stress test result is generated, wherein the test result includes the service performance of at least one operator service, and the service performance is characterized by at least one of the following indicators: data processing speed, resource usage. The resource usage may include the usage of resources such as memory and CPU (Central Processing Unit).
[0069] In an example of an embodiment of the present disclosure, a testing device for an operator service can generate the service performance of the at least one operator service through the following preset strategy: based on the total processing volume of the at least one operator service for test data, the data processing volume of the at least one operator service for the test data per unit time is obtained, and the resource usage of the at least one operator service in the process of processing the test data is obtained, thereby obtaining the data processing speed and resource usage of the at least one operator service.
[0070] Therefore, there is no need to deploy operator services that implement the same processing flow individually or jointly in the production environment. Instead, the operator services can be stress tested in the container according to the processing flow in the production environment to obtain the service performance of the operator services under high load conditions.
[0071] In the embodiment of the present disclosure, the test performed on the operator service may include a comparison test (AB test), the operator service includes multiple operator service sets, and the same operator service set includes at least one operator service that implements a preset processing flow individually or jointly. The comparison test is to perform a comparative test on the multiple operator service sets to compare the differences between the multiple operator service sets. Accordingly, step 204 can be implemented in the following manner:
[0072] Based on the processing results and data processing volume of the test data by multiple operator service sets, and at least one of the resource usage in the process of processing the test data, a corresponding test result of the control test is generated, wherein the test result includes the differences between the multiple operator service sets.
[0073] Among them, the processing flow implemented by different operator service sets is the same.
[0074] Multiple operator service sets can be deployed in the same container or in different containers, and this disclosure does not limit this.
[0075] The differences among multiple operator service sets may include differences in prediction effect, service performance, etc.
[0076] In an embodiment of the present disclosure, the testing device of the operator service can generate the difference conditions of multiple operator service sets through the following preset strategy: based on any operator service set, based on the processing result of the operator service set on the test data, the prediction effect of the operator service set is obtained, and based on the data processing amount of the operator service set on the test data, the data processing speed of the operator service set on the test data is obtained, and the resource usage of the operator service set in the process of testing the test data is obtained, and then the prediction effects, data processing speeds and resource usage of multiple operator service sets are compared to obtain the differences in prediction effects and service performance of the multiple operator service sets.
[0077] Therefore, there is no need to deploy multiple operator service sets in the production environment. Instead, multiple operator service sets can be tested against each other in the container according to the processing flow in the production environment, thereby obtaining the differences between the multiple operator service sets.
[0078] In an embodiment of the present disclosure, the test result is generated based on a preset strategy, and the test method of the operator service may further include:
[0079] In response to receiving an update request for a preset policy sent by a cloud server, the preset policy is updated based on configuration information of the preset policy carried in the update request.
[0080] In the embodiments of the present disclosure, the test device of the operator service can be a client and has a corresponding cloud server. The user can configure the preset strategy at any time in the interactive interface of the cloud server, such as configuring the confidence threshold and / or preset number in the above example. The test device of the operator service can interact with the cloud server, so as to respond to the preset strategy update request sent by the cloud server and update the preset strategy based on the configuration information of the preset strategy carried in the update request. After the preset strategy is updated, the updated preset strategy can be quickly loaded, and the test process of the operator service can be re-executed based on the updated preset strategy.
[0081] In this way, it is possible to flexibly configure the preset strategy according to demand through the cloud server, and dynamically update the preset strategy based on the configuration information of the preset strategy.
[0082] In the embodiments of the present disclosure, the operator service deployed in the container can also be dynamically updated according to user needs. For example, the test device of the operator service can provide an interactive interface, and the user can trigger a request to update the version of the operator service on the interactive interface, so that the test device of the operator service can respond to the request and quickly redeploy a new version of the operator service in the container to quickly update the operator service deployed in the container to the new version of the operator service. Since there is no need to bring the operator service online and stop the operation of the operating system, the redeployment of the operator service can be achieved, thereby realizing the hot deployment of the operator service.
[0083] In an example of an embodiment of the present disclosure, test data can be automatically and regularly obtained from online logs through the container service provided by the container, and when the operator service and the domain service are deployed, the test data are packaged into a data packet together with the operator service and deployed in the container, so that when the test data is obtained through the domain service in step 203, the test data can be obtained from the data packet in the container through the domain service.
[0084] The online log is a file generated in the actual production environment to record events that occur when the operator service is running, processed data, etc. It should be noted that the operator service can be a historical version of the operator service to be tested.
[0085] By packaging the test data obtained from online logs together with the operator service into a data package and deploying it in a container, the integration of test data and operator service is achieved. Since the test data is obtained from online logs, it is possible to implement testing that is indistinguishable from real data in the production environment, ensuring the performance stability and consistency of operator services that pass the test in the production environment.
[0086] In another example of an embodiment of the present disclosure, the test data may also be offline data with or without annotations specified by the user, and when the operator service and the domain service are deployed, the test data is packaged together with the operator service into a data packet and deployed in a container, so that when the test data is obtained through the domain service in step 203, the test data can be obtained from the data packet in the container through the domain service.
[0087] In the disclosed embodiment, test data can be put into a message queue, so that the domain-based service can asynchronously obtain the test data from the message queue and perform the test of the operator service, further improving the test efficiency of the operator service.
[0088] It should be noted that similar steps in the embodiment of the present disclosure and other embodiments may be used in other embodiments and will not be described in detail here.
[0089] The test method of the operator service of the embodiment of the present disclosure obtains test data through the domain service, and calls the operator service to process the test data according to the preset processing flow, and generates the test result corresponding to the operator service based on at least one of the following information: the processing result of the test data, the data processing amount of the test data, and the resource usage of the operator service in the process of processing the test data. It can be realized based on the virtualization container technology to simulate the preset processing flow to test the operator service, so that there is no need to deploy the operator service in the production environment, and the operator service can be tested according to the processing flow in the production environment, which saves the time of deploying the operator service in the production environment, greatly improves the testing efficiency of the operator service, and can respond to changes in business needs in a timely manner. In addition, it can avoid the impact on the production environment caused by deploying a defective operator service in the production environment when testing the operator service, and reduce the risk brought by the deployment of the operator service in the production environment.
[0090] In the embodiments of the present disclosure, an environment pool including multiple containers can also be managed. Before deploying operator services and domain services, an idle container is first determined from the environment pool, and then the operator services and domain services to be tested are deployed in the idle containers. Figure 3 , further illustrating the testing method of the operator service provided in the embodiment of the present disclosure.
[0091] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure, Figure 3 As shown, the test method of the operator service may include the following steps:
[0092] Step 301: In response to a test request for an operator service triggered on an interactive interface, allocate an idle container for the operator service.
[0093] In an embodiment of the present disclosure, the test device of the operator service may provide an interactive interface, and a user may trigger a test request for the operator service in the interactive interface. The test device of the operator service may include a container scheduling management module or unit, so that the container scheduling management module or unit may allocate an idle container for the operator service in response to the test request for the operator service triggered in the interactive interface.
[0094] Among them, the idle containers are the containers that do not currently have any operator services or domain services deployed. Among them, the containers that have operator services and domain services deployed are in the occupied state.
[0095] In an embodiment of the present disclosure, a container scheduling management module or unit in a test device of an operator service can dynamically manage an environment pool including multiple containers based on a K8s platform (Kubernetes platform, a platform for managing containers), and realize dynamic allocation of container resources, including application, allocation, and release of containers. Among them, resources can be dynamically allocated in the resource pool according to test requests for operator services, and automation of resource allocation can be realized according to automated scripts or APIs (Application Programming Interfaces). And a release mechanism can be set to ensure that containers can be released in time when they are no longer needed.
[0096] Step 302: Obtain the code corresponding to the operator service from the code library through the container service provided by the container.
[0097] Step 303: Deploy the operator service and domain service in the container based on the code.
[0098] Step 304, perform a target test type test on the operator service based on the domain-based service and the test data in the container to obtain a corresponding test result; wherein the domain-based service is used to call the operator service to process the test data according to a preset processing flow during the test of the operator service.
[0099] In the embodiment of the present disclosure, the container is in an occupied state during the test of the operator service and is released when the test of the operator service is completed.
[0100] refer to Figure 4 , taking the container scheduling management unit 401 included in the test device of the operator service as an example, the container scheduling management unit 401 can schedule the container according to any test task to deploy the operator service and the domain service in the idle container. Among them, any test request triggered by the user to test the operator service is a test task. For example, for the test task of the operator service M, the K8s instance M 402 can be scheduled to deploy the operator service M and the domain service, and for the test task of the operator service N, the K8s instance N 403 can be scheduled to deploy the operator service N and the domain service. Among them, the K8s instance refers to the K8s container instance, that is, the container, which is a running container entity. Among them, any K8s instance in the K8s instance M 402 or the K8s instance N 403 can perform dynamic deployment of the operator service, dynamic deployment of the scenario service, and dynamic acquisition of the test data during operation, and the synchronization data of the test task can be reported to the container scheduling management unit 401 through the task synchronization component. The synchronization data of the test task may include the status of the corresponding container (occupied or released, etc.), the test result, etc.
[0101] In the test method of the operator service of the embodiment of the present disclosure, by responding to the test request for the operator service triggered on the interactive interface, an idle container is allocated to the operator service, and the container is released when the test of the operator service is completed, so as to realize the dynamic allocation of the container and improve the resource utilization. And by responding to the test request for the operator service triggered on the interactive interface, the code corresponding to the operator service is obtained from the code base through the container service provided by the container, and the operator service and the corresponding domain service are deployed in the container based on the code, so that the dynamic deployment of the operator service can be flexibly realized.
[0102] The following uses the application scenario of abnormal information identification as an example to illustrate the effect test process of operator service A.
[0103] Figure 5 is a schematic diagram according to a fourth embodiment of the present disclosure.
[0104] Step 501 , in response to a test request for performing an effect test on operator service A triggered on an interactive interface, allocate an idle container 1 to operator service A.
[0105] The operator service A is the first operator service in the above embodiment.
[0106] The operator service A independently implements a preset processing flow, and the preset processing flow includes: identifying abnormal information of multimedia data through the operator service A.
[0107] Step 502: Obtain the code corresponding to operator service A from the code library through the container service provided by container 1.
[0108] Step 503: Deploy operator service A and domain-based service in container 1 based on the code.
[0109] Step 504: Acquire test data through domain-based services, wherein the test data includes multimedia data for abnormal information identification, and the multimedia data includes at least one of text, video, picture, and audio.
[0110] In the embodiment of the present disclosure, the container service provided by container 1 can be used to periodically obtain test data from online logs, and then the test data can be packaged into a data packet together with operator service A and deployed in container 1. Thus, the domain service can obtain test data from the data packet in container 1.
[0111] Step 505, through the domain service, call the operator service A according to the preset processing flow to identify abnormal information on the test data, and obtain the processing result of the operator service A on the test data, wherein the processing result includes the confidence level of the abnormal information in the multimedia data.
[0112] Step 506: Generate test results of the corresponding effect test based on the processing results of operator service A on the test data, wherein the test results include the prediction effect of operator service A, and the prediction effect is characterized by at least one of the following indicators: accuracy, precision, recall, and the harmonic mean F1 score of precision and recall.
[0113] The following uses the abnormal face recognition scenario as an example to illustrate the stress testing process of operator service B and operator service C.
[0114] Figure 6 is a schematic diagram according to a fifth embodiment of the present disclosure.
[0115] Step 601 , in response to a test request for stress testing operator service B and operator service C triggered on an interactive interface, allocate idle container 2 to operator service B and operator service C.
[0116] Among them, operator service B is the second operator service in the above embodiment, and operator service C is the third operator service in the above embodiment.
[0117] Among them, operator service B and operator service C jointly implement a preset processing flow, which includes: performing face detection on videos and / or pictures through the second operator service to obtain a detection frame including the face, and through the third operator service, determining whether the face in the detection frame is the face of an abnormal user.
[0118] Step 602: Obtain the codes corresponding to operator service B and operator service C from the code library through the container service provided by container 2.
[0119] Step 603: Based on the code, deploy operator service B, operator service C, and domain service in container 2.
[0120] Step 604: Acquire test data through domain-based services, wherein the test data includes videos and / or pictures to be subjected to abnormal face recognition, and the amount of the test data is greater than a preset threshold.
[0121] In the embodiment of the present disclosure, the container service provided by container 2 can be used to periodically obtain test data from online logs, and then the test data can be packaged into a data package together with operator service B and operator service C, and deployed in container 2. Thus, the domain service can obtain test data from the data package in container 2.
[0122] Step 605: Through the domain-based service, operator service B is called according to the preset processing flow to perform face detection on the video and / or image, a detection frame including the face is obtained, and operator service C is called to determine whether the face in the detection frame is the face of an abnormal user.
[0123] Step 606: Generate the corresponding stress test results based on the data processing volume of operator service B and operator service C for the test data, and the resource usage of operator service B and operator service C in the process of processing the test data, wherein the test results include the service performance of operator service B and operator service C, and the service performance is characterized by at least one of the following indicators: data processing speed and resource usage.
[0124] The following takes the item recommendation scenario as an example to illustrate the comparative test process of operator service D and operator service E.
[0125] Figure 7 is a schematic diagram according to a sixth embodiment of the present disclosure.
[0126] Step 701 , in response to a test request for performing a comparative test on operator service set 1 and operator service set 2 triggered on an interactive interface, allocate an idle container 3 to operator service set 1 and allocate an idle container 4 to operator service set 2.
[0127] Among them, operator service set 1 includes operator service D1 and operator service E1 that jointly implement a preset processing flow, and algorithm service set 2 includes operator service D2 and operator service E2 that jointly implement a preset processing flow.
[0128] Among them, the operator service D1 and the operator service D2 are the fourth operator service in the above embodiment, and the operator service E1 and the operator service E2 are the fifth operator service in the above embodiment.
[0129] The preset processing flow includes: classifying the target user based on the feature information through the fourth operator service to obtain the type to which the target user belongs, and recommending a target item to the target user based on the type to which the target user belongs through the fifth operator service.
[0130] Step 702: Obtain the codes corresponding to the operator service D1 and the operator service E1 from the code library through the container service provided by the container 3.
[0131] Step 703: Obtain the codes corresponding to the operator service D2 and the operator service E2 from the code library through the container service provided by the container 4.
[0132] Among them, step 702 and step 703 can be executed in parallel or in sequence, and the present disclosure does not limit this.
[0133] Step 704: Based on the codes corresponding to the operator service D1 and the operator service E1, the operator service D1, the operator service E1 and the domain service are deployed in the container 3.
[0134] Step 705: Based on the codes corresponding to the operator service D2 and the operator service E2, the operator service D2, the operator service E2 and the domain service are deployed in the container 4.
[0135] Among them, step 704 and step 705 can be executed in parallel or in sequence, and the present disclosure does not limit this.
[0136] Step 706: Acquire test data through the domain-based service in container 3, wherein the test data includes feature information of the target user for whom item recommendation is to be performed.
[0137] In the embodiment of the present disclosure, the container service provided by the container 3 can be used to periodically obtain test data from the online log, and then the test data can be packaged into a data packet together with the operator service D1 and the operator service E1 and deployed in the container 3. Thus, the domain service in the container 3 can obtain the test data from the data packet in the container 3.
[0138] Step 707, through the domain-based services in container 3, according to the preset processing flow, call the operator service D1 to classify the target user based on the feature information, obtain the type of the target user, and call the operator service E1 to recommend the target item to the target user based on the type of the target user, and obtain the processing result of the operator service set 1 for the test data.
[0139] The processing result includes the confidence of multiple candidate items as target items.
[0140] Step 708: Acquire test data through the domain-based service in container 4, wherein the test data includes feature information of the target user for whom item recommendation is to be performed.
[0141] In the embodiment of the present disclosure, the container service provided by the container 4 can be used to periodically obtain test data from the online log, and then the test data can be packaged into a data packet together with the operator service D2 and the operator service E2, and deployed in the container 4. Thus, the domain service in the container 4 can obtain the test data from the data packet in the container 4.
[0142] Among them, step 706 and step 708 can be executed in parallel or in sequence, and the present disclosure does not limit this.
[0143] Step 709, through the domain-based services in container 4, according to the preset processing flow, call operator service D2 to classify the target user based on the feature information to obtain the type of the target user, and call operator service E2 to recommend the target item to the target user based on the type of the target user to obtain the processing result of operator service set 2 for the test data.
[0144] The processing result includes the confidence of multiple candidate items as target items.
[0145] Step 710, based on the processing results and data processing volume of the test data of operator service set 1 and operator service set 2, as well as the resource usage in the process of processing the test data, generate the test results of the corresponding control test, wherein the test results include the differences between operator service set 1 and operator service 2.
[0146] It should be noted that the above-mentioned abnormal information recognition scenarios, abnormal face recognition scenarios, item recommendation scenarios and preset processing flows in each application scenario are only examples. In actual applications, those skilled in the art can adopt the testing method of the operator service provided in the embodiment of the present disclosure as needed to test the operator service that implements any processing flow in any application scenario, and the present disclosure does not impose any restrictions on this.
[0147] The following is an example of the process of implementing effect testing, stress testing, and control testing of operator services on the algorithm iteration platform.
[0148] Figure 8 is a schematic diagram according to a seventh embodiment of the present disclosure.
[0149] refer to Figure 8 The architecture of the algorithm iteration platform may include an access module 801, wherein the access module 801 includes an effect testing unit 802, a stress testing unit 803 and a control testing unit 804.
[0150] Take the operator service currently being used online as the initial operator service, and after updating the initial operator service, obtain the V1 version of the operator service, namely, operator service V1, and need to test the operator service V1. Among them, the initial operator service may include an operator service that implements the preset processing flow alone or multiple operator services that jointly implement the preset processing flow. The user can trigger a test request for the effect test of the operator service V1 through the interactive interface provided by the algorithm iteration platform. In response to the request, the effect test unit 802 can apply for an idle container from the container scheduling management unit 808. The container scheduling management unit 808 is based on the K8s platform 809, and can allocate idle containers to the operator service V1 according to the status of the containers contained in the experimental environment pool 805. Among them, the containers contained in the experimental environment pool are containers specifically used for effect testing. Then, the idle container can be used as an experimental environment for effect testing, in which domain services and operator service V1 are deployed, and test data is obtained through domain services. Operator service V1 is called to process the test data according to the preset processing flow. Based on the processing result of the test data by operator service V1, the corresponding test result of the effect test is generated, including the predicted effect of operator service V1. According to the predicted effect, it can be determined whether operator service V1 meets the online standard. If it does, it is determined that the test of operator service V1 has passed. If it does not meet the standard, operator service V1 can be sent back for offline iteration. By combining the test results of the effect test corresponding to operator service V1 to perform offline iteration on operator service V1, the operator service can better adapt to the environment and needs.
[0151] Furthermore, the user can trigger a test request for the stress test of the operator service V1 through the interactive interface provided by the algorithm iteration platform. In response to the request, the stress test unit 803 can apply for an idle container from the container scheduling management unit 808. The container scheduling management unit 808 is based on the K8s platform 809 and can allocate idle containers to the operator service V1 according to the status of the containers contained in the stress test environment pool 806. Among them, the containers contained in the stress test environment pool are containers specifically used for stress testing. Then, the idle container can be used as a stress test environment for stress testing, in which domain services and operator service V1 are deployed, and test data is obtained through domain services. The operator service V1 is called to process the test data according to the preset processing flow, and the corresponding stress test test results are generated based on the data processing volume of the operator service V1 for the test data and the resource usage of the operator service V1 during the processing of the test data, including the service performance of the operator service V1. Based on the service performance, it can be determined whether the operator service V1 meets the online standards. If it does, it is determined that the test of the operator service V1 has passed. If it does not, the operator service V1 can be sent back for offline iteration. By combining the test results of the stress test corresponding to the operator service V1 to perform offline iteration on the operator service V1, the service performance of the operator service can be improved, and its stability and efficiency in dealing with high-load scenarios can be improved.
[0152] Furthermore, the user can trigger a test request for the control test of the initial operator service and the operator service V1 through the interactive interface provided by the algorithm iteration platform. In response to the request, the control test unit 804 can apply for an idle container from the container scheduling management unit 808. The container scheduling management unit 808 is based on the K8s platform 809 and can allocate idle containers to the initial operator service and the operator service V1 according to the status of the containers contained in the control test environment pool 807. Among them, the containers contained in the control test environment pool are containers specifically used for control tests. Then, the idle container can be used as a control test environment for control tests. Among them, different containers or the same container can be allocated to the initial operator service and the operator service V1 respectively. Taking the allocation of different containers for the initial operator service and operator service V1 as an example, the domain service and the initial operator service can be deployed in one container, and the test data can be obtained through the domain service, and the initial operator service can be called to process the test data according to the preset processing flow. The domain service and operator service V1 can be deployed in another container, and the test data can be obtained through the domain service, and the operator service V1 can be called to process the test data according to the preset processing flow. Based on the processing results of the test data, the data processing volume, and the resource usage during the processing of the test data of the initial operator service and the operator service V1, the test results of the control test are generated, including the differences between the initial operator service and the operator service V1. According to the difference, it can be determined whether the operator service V1 meets the online standards. If it does, it is determined that the test of the operator service V1 has passed. If it does not meet the standards, the operator service V1 can be sent back for offline iteration. By combining the test results of the control test between the initial operator service and the operator service V1, as well as various performance indicators and user feedback, the operator service V1 is iterated offline, so that the service performance and prediction effect of the iterated operator service can meet the standards for online use.
[0153] In addition, the prediction effect, service performance and differences of operator service V1 compared with the initial operator service can generate a result report and provide it to the user.
[0154] Take the operator service V1 as an example, which is optimized to the V2 version of the operator service through offline iteration, namely the operator service V2. Similar to the above process, the user can re-trigger the effect test, stress test and control test of the operator service V2, and then the algorithm iteration platform can quickly update the operator service V1 deployed in the container to the operator service V2, and re-test the effect test, stress test and control test of the operator service V2 to obtain the test results of the corresponding tests. Then, according to the test results, it is determined whether the operator service V2 meets the online standards. If it does, it is determined that the test of the operator service V2 has passed. If not, the operator service V2 can be sent back for offline iteration until it meets the standards for online use.
[0155] Therefore, the operator service can be automatically deployed in the container through the virtualized container technology, and the operator service can be tested for effect, stress and control in the container to achieve comprehensive evaluation and optimization of the operator service. The operator service is tested in the container environment to ensure the consistency and stability of the operator service. The deployment method of the operator service is simple and fast, not limited by the version difference of the operating system, which improves the flexibility and scalability of the system. In addition, since the domain service can call the operator service to process the test data according to the preset processing flow, the operator service can be tested by simulating the preset processing flow. Therefore, there is no need to deploy the operator service in the production environment. The operator service can be tested according to the processing flow in the production environment, which saves the time of deploying the operator service in the production environment, greatly improves the testing efficiency of the operator service, and can respond to changes in business needs in a timely manner. In the iteration process of the operator service, this test method is used to test the operator service before going online, which can greatly improve the iteration efficiency of the operator service and reduce the iteration cycle. By deploying operator services and domain services in containers and encapsulating operator services in scenarios, operator services can be packaged uniformly and have the ability to be quickly applied in different scenarios, improving the applicability and flexibility of operator services. In addition, in the case of defects in operator services, the method of deploying operator services in containers can reduce the rollback time and avoid deploying defective operator services in the production environment when testing the operator services, thereby reducing the risks brought by the deployment of operator services in the production environment.
[0156] In order to implement the above embodiment, the present disclosure also provides a testing device for operator services. Fig. 9 As shown, Fig. 9 1 is a schematic diagram according to the eighth embodiment of the present disclosure. The operator service testing device 90 may include: an acquisition module 901 , a deployment module 902 and a testing module 903 .
[0157] Wherein, the acquisition module 901 is used to acquire the operator service to be tested;
[0158] A deployment module 902 is used to deploy operator services and domain services in a container;
[0159] The testing module 903 is used to test the operator service based on the domain service and the test data in the container to obtain the corresponding test results;
[0160] Among them, the domain-based service is used to call the operator service to process the test data according to the preset processing flow during the testing of the operator service.
[0161] As a possible implementation of the embodiment of the present disclosure, the test module 903 includes:
[0162] The processing unit is used to obtain test data through domain services and call operator services to process the test data according to the preset processing flow;
[0163] The generating unit is used to generate a test result corresponding to the operator service based on at least one of the following information: a processing result of the test data, a data processing amount of the test data, and resource usage of the operator service in a process of processing the test data.
[0164] As a possible implementation of the embodiment of the present disclosure, the test performed on the operator service includes an effect test, and the operator service includes at least one operator service that implements a preset processing flow individually or jointly; the generation unit includes:
[0165] The first generating subunit is used to generate a test result of a corresponding effect test based on the processing result of at least one operator service on the test data, wherein the test result includes the predicted effect of at least one operator service, and the predicted effect is characterized by at least one of the following indicators: accuracy, precision, recall, and a harmonic mean F1 score of precision and recall.
[0166] As a possible implementation of the embodiment of the present disclosure, the test performed on the operator service includes a stress test, the amount of test data is greater than a preset threshold, and the operator service includes at least one operator service that implements a preset processing flow alone or in combination;
[0167] Generate a unit, including:
[0168] The second generation sub-unit is used to generate a corresponding stress test result based on the data processing volume of at least one operator service for the test data and / or the resource usage of at least one operator service in the process of processing the test data, wherein the test result includes the service performance of at least one operator service, and the service performance is characterized by at least one of the following indicators: data processing speed, resource usage.
[0169] As a possible implementation of the embodiment of the present disclosure, the test performed on the operator service includes a control test, the operator service includes multiple operator service sets, and the same operator service set includes at least one operator service that implements a preset processing flow individually or jointly;
[0170] Generate a unit, including:
[0171] The third generation sub-unit is used to generate corresponding test results of the control test based on multiple operator service sets for at least one of the processing results and data processing volume of the test data and the resource usage in the process of processing the test data, wherein the test results include the differences between the multiple operator service sets.
[0172] As a possible implementation method of an embodiment of the present disclosure, at least one operator service includes a first operator service; the test data includes multimedia data for which abnormal information is to be identified, and the multimedia data includes at least one of text, video, picture and audio; the preset processing flow includes: identifying abnormal information on the multimedia data through the first operator service; the processing result includes the confidence level of the existence of abnormal information in the multimedia data.
[0173] As a possible implementation method of an embodiment of the present disclosure, at least one operator service includes a second operator service and a third operator service; the test data includes videos and / or pictures on which abnormal face recognition is to be performed; the preset processing flow includes: performing face detection on the video and / or picture through the second operator service to obtain a detection frame including the face, and judging whether the face in the detection frame is the face of an abnormal user through the third operator service; the processing result includes the confidence level of the presence of the abnormal user's face in the video and / or picture.
[0174] As a possible implementation of an embodiment of the present disclosure, at least one operator service includes a fourth operator service and a fifth operator service; the test data includes feature information of a target user for whom item recommendation is to be performed; the preset processing flow includes: classifying the target user based on the feature information through the fourth operator service to obtain the type of the target user, and recommending a target item to the target user based on the type of the target user through the fifth operator service; the processing result includes the confidence level of multiple candidate items as the target items.
[0175] As a possible implementation of the embodiment of the present disclosure, the test result is generated based on a preset strategy, and the device 900 further includes:
[0176] The updating module is used to update the preset policy based on the configuration information of the preset policy carried in the updating request in response to receiving the updating request of the preset policy sent by the cloud server.
[0177] As a possible implementation of the embodiment of the present disclosure, test data is periodically obtained from online logs through a container service provided by a container, and is packaged into a data package together with an operator service and deployed in a container;
[0178] Processing unit, comprising:
[0179] The acquisition subunit is used to obtain test data from the data package in the container through the domain service.
[0180] As a possible implementation of the embodiment of the present disclosure, the acquisition module 901 includes:
[0181] An acquisition unit, configured to respond to a test request for an operator service triggered on an interactive interface and acquire a code corresponding to the operator service from a code base through a container service provided by the container;
[0182] The deployment module 902 includes:
[0183] The deployment unit is used to deploy operator services and corresponding domain services in containers based on code.
[0184] As a possible implementation of the embodiment of the present disclosure, the apparatus 900 further includes:
[0185] The allocation module is used to allocate idle containers to the operator service in response to the test request, wherein the container is in an occupied state during the test process of the operator service and is released when the test of the operator service is completed.
[0186] The test device of the operator service of the embodiment of the present disclosure obtains the operator service to be tested; deploys the operator service and the domain service in the container; tests the operator service based on the domain service and the test data in the container according to the business processing flow to obtain the corresponding test result; wherein the domain service is used to call the operator service to process the test data according to the preset processing flow in the process of testing the operator service. Thus, the operator service can be automatically deployed in the container through the virtualization container technology, and the operator service can be tested in the container. The deployment method of the operator service is simple and fast, and is not restricted by the version difference of the operating system. Since the domain service can call the operator service to process the test data according to the preset processing flow, the operator service can be tested by simulating the preset processing flow, so that the operator service does not need to be deployed in the production environment, and the operator service can be tested according to the processing flow in the production environment, which saves the time of deploying the operator service in the production environment, greatly improves the test efficiency of the operator service, and can respond to changes in business needs in a timely manner.
[0187] In addition, when there are defects in the operator service, deploying the operator service through a container can reduce the rollback time and avoid deploying the defective operator service in the production environment when testing the operator service, thereby reducing the risk of deploying the operator service in the production environment.
[0188] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, comply with the relevant laws and regulations, and do not violate public order and good morals.
[0189] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0190] Fig.10 A schematic block diagram of an example electronic device 1000 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0191] like Fig.10 As shown, the device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0192] A number of components in the device 1000 are connected to the I / O interface 1005, including: an input unit 1006, such as a keyboard, a mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a disk, an optical disk, etc.; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the device 1000 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0193] The computing unit 1001 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1001 performs the various methods and processes described above, such as the test method of the operator service. For example, in some embodiments, the test method of the operator service may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the test method of the operator service described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute the test method of the operator service in any other appropriate manner (eg, by means of firmware).
[0194] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0195] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0196] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0197] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0198] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0199] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0200] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0201] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for testing an operator service, characterized in that: The method comprises: Get the operator service to be tested; Deploy the operator service and domain-based service in the container; Testing the operator service in the container based on the domain-based service and the test data to obtain a corresponding test result; The domain-based service is used to call the operator service to process the test data according to a preset processing flow during the testing of the operator service.
2. The method according to claim 1, wherein: The testing of the operator service in the container based on the domain-based service and the test data to obtain a corresponding test result includes: Acquire the test data through the domain-based service, and call the operator service to process the test data according to the preset processing flow; A test result corresponding to the operator service is generated based on at least one of the following information: a processing result of the test data, a data processing amount of the test data, and resource usage of the operator service during processing of the test data.
3. The method according to claim 2, wherein: The test performed on the operator service includes an effect test, and the operator service includes at least one operator service that implements the preset processing flow alone or in combination; The generating of the test result corresponding to the operator service based on at least one of the following information: the processing result of the test data, the data processing amount of the test data, and the resource usage of the operator service in the process of processing the test data includes: Based on the processing result of the at least one operator service on the test data, generate the corresponding test result of the effect test, wherein the test result includes the predicted effect of the at least one operator service, and the predicted effect is characterized by at least one of the following indicators: accuracy, precision, recall, and a harmonic mean F1 score of the precision and the recall.
4. The method according to claim 2, wherein: The test performed on the operator service includes a stress test, the data volume of the test data is greater than a preset threshold, and the operator service includes at least one operator service that implements the preset processing flow alone or in combination; The generating of the test result corresponding to the operator service based on at least one of the following information: the processing result of the test data, the data processing amount of the test data, and the resource usage of the operator service in the process of processing the test data includes: Based on the data processing volume of the at least one operator service for the test data and / or the resource usage of the at least one operator service in the process of processing the test data, a corresponding test result of the stress test is generated, wherein the test result includes the service performance of the at least one operator service, and the service performance is characterized by at least one of the following indicators: data processing speed, resource usage.
5. The method according to claim 2, wherein: The test performed on the operator service includes a control test, the operator service includes a plurality of operator service sets, and the same operator service set includes at least one operator service that implements the preset processing flow alone or in combination; The generating of the test result corresponding to the operator service based on at least one of the following information: the processing result of the test data, the data processing amount of the test data, and the resource usage of the operator service in the process of processing the test data includes: Based on the processing results and data processing volume of the test data respectively by the multiple operator service sets, and at least one of the resource usage in the process of processing the test data, a corresponding test result of the control test is generated, wherein the test result includes the differences among the multiple operator service sets.
6. The method according to any one of claims 2 to 5, wherein: The at least one operator service includes a first operator service; the test data includes multimedia data for abnormal information identification, and the multimedia data includes at least one of text, video, picture and audio; The preset processing flow includes: identifying abnormal information of the multimedia data through the first operator service; The processing result includes a confidence level that abnormal information exists in the multimedia data.
7. The method according to any one of claims 2 to 5, wherein: The at least one operator service includes a second operator service and a third operator service; the test data includes a video and / or a picture to be subjected to abnormal face recognition; The preset processing flow includes: performing face detection on the video and / or picture through the second operator service to obtain a detection frame including a face, and judging whether the face in the detection frame is a face of an abnormal user through the third operator service; the processing result includes the confidence level of the presence of the face of the abnormal user in the video and / or picture.
8. The method according to any one of claims 2 to 5, wherein: The at least one operator service includes a fourth operator service and a fifth operator service; the test data includes feature information of a target user for whom item recommendation is to be performed; The preset processing flow includes: classifying the target user based on the feature information through the fourth operator service to obtain the type of the target user, and recommending a target item to the target user based on the type of the target user through the fifth operator service; the processing result includes the confidence of multiple candidate items as the target item.
9. The method according to any one of claims 2 to 5, wherein: The test result is generated based on a preset strategy, and the method further includes: In response to receiving an update request for the preset policy sent by a cloud server, the preset policy is updated based on the configuration information of the preset policy carried in the update request.
10. The method according to any one of claims 2 to 5, wherein: The test data is periodically obtained from online logs through the container service provided by the container, and is packaged into a data package together with the operator service and deployed in the container; The obtaining of the test data through the domain-based service includes: The test data is obtained from the data packet in the container through the domain-based service.
11. The method according to any one of claims 1 to 5, wherein: The obtaining of the operator service to be tested includes: In response to a test request for the operator service triggered on the interactive interface, obtaining a code corresponding to the operator service from a code library through a container service provided by the container; The deploying of the operator service and the domain service in the container includes: Based on the code, the operator service and the corresponding domain-based service are deployed in the container.
12. The method according to claim 11, wherein: The method further comprises: In response to the test request, an idle container is allocated to the operator service, wherein the container is in an occupied state during the test of the operator service and is released when the test of the operator service is completed.
13. A testing device for an operator service, the device comprising: The acquisition module is used to obtain the operator service to be tested; A deployment module, used to deploy the operator service and domain-based service in a container; A testing module, used to test the operator service in the container based on the domain-based service and the test data to obtain a corresponding test result; The domain-based service is used to call the operator service to process the test data according to a preset processing flow during the testing of the operator service.
14. The device according to claim 13, wherein: The test module comprises: A processing unit, configured to obtain the test data through the domain-based service, and call the operator service to process the test data according to the preset processing flow; A generating unit is used to generate a test result corresponding to the operator service based on at least one of the following information: a processing result of the test data, a data processing amount of the test data, and resource usage of the operator service during processing of the test data.
15. The device according to claim 14, wherein: The test performed on the operator service includes an effect test, and the operator service includes at least one operator service that implements the preset processing flow alone or in combination; The generating unit comprises: The first generating subunit is used to generate a test result of the corresponding effect test based on the processing result of the at least one operator service on the test data, wherein the test result includes the predicted effect of the at least one operator service, and the predicted effect is characterized by at least one of the following indicators: accuracy, precision, recall, and a harmonic mean F1 score of the precision and the recall.
16. The device according to claim 14, wherein: The test performed on the operator service includes a stress test, the data volume of the test data is greater than a preset threshold, and the operator service includes at least one operator service that implements the preset processing flow alone or in combination; The generating unit comprises: The second generating sub-unit is used to generate a corresponding test result of the stress test based on the data processing amount of the at least one operator service for the test data and / or the resource usage of the at least one operator service in the process of processing the test data, wherein the test result includes the service performance of the at least one operator service, and the service performance is characterized by at least one of the following indicators: data processing speed, resource usage.
17. The device according to claim 14, wherein: The test performed on the operator service includes a control test, the operator service includes a plurality of operator service sets, and the same operator service set includes at least one operator service that implements the preset processing flow alone or in combination; The generating unit comprises: The third generating sub-unit is used to generate the corresponding test results of the control test based on the processing results and data processing volume of the test data by the multiple operator service sets, and at least one of the resource usage in the process of processing the test data, wherein the test results include the differences between the multiple operator service sets.
18. The device according to any one of claims 14 to 17, wherein: The at least one operator service includes a first operator service; the test data includes multimedia data for abnormal information identification, and the multimedia data includes at least one of text, video, picture and audio; The preset processing flow includes: identifying abnormal information of the multimedia data through the first operator service; The processing result includes a confidence level that abnormal information exists in the multimedia data.
19. The device according to any one of claims 14 to 17, wherein: The at least one operator service includes a second operator service and a third operator service; the test data includes a video and / or a picture to be subjected to abnormal face recognition; The preset processing flow includes: performing face detection on the video and / or picture through the second operator service to obtain a detection frame including a face, and judging whether the face in the detection frame is a face of an abnormal user through the third operator service; the processing result includes the confidence level of the presence of the face of the abnormal user in the video and / or picture.
20. The device according to any one of claims 14 to 17, wherein: The at least one operator service includes a fourth operator service and a fifth operator service; the test data includes feature information of a target user for whom item recommendation is to be performed; The preset processing flow includes: classifying the target user based on the feature information through the fourth operator service to obtain the type of the target user, and recommending a target item to the target user based on the type of the target user through the fifth operator service; the processing result includes the confidence of multiple candidate items as the target item.
21. The device according to any one of claims 14 to 17, wherein: The test result is generated based on a preset strategy, and the device further includes: The updating module is used to update the preset policy based on the configuration information of the preset policy carried in the updating request in response to receiving the updating request of the preset policy sent by the cloud server.
22. The device according to any one of claims 14 to 17, wherein: The test data is periodically obtained from online logs through the container service provided by the container, and is packaged into a data package together with the operator service and deployed in the container; The processing unit comprises: The acquisition subunit is used to acquire the test data from the data packet in the container through the domain service.
23. The device according to any one of claims 13 to 17, wherein: The acquisition module comprises: an acquisition unit, configured to, in response to a test request for the operator service triggered on the interactive interface, acquire a code corresponding to the operator service from a code library through a container service provided by the container; The deployment module includes: A deployment unit is used to deploy the operator service and the corresponding domain service in the container based on the code.
24. The device according to claim 23, wherein: The device also includes: An allocation module is used to allocate the idle container to the operator service in response to the test request, wherein the container is in an occupied state during the test of the operator service and is released when the test of the operator service is completed.
25. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 12.
26. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 12.
27. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Processing method and device for operator service, intelligent workstation and electronic equipment
CN112148494A
Operator performance evaluation method and device, electronic equipment and storage medium
CN114564374A
Test method and device, storage medium and electronic equipment
CN116775463A
Containerization of network services
US20180075152A1
Cited By
Method, device and recording medium for managing test code information
TWI922034B
