Cloud service platform-oriented virtualization service implementation method and device, computer equipment, readable storage medium and program product

By simulating external services on the cloud service platform and using configuration files and interceptors to process requests, the problem of insufficient flexibility of traditional virtualized services is solved, and flexible, easy-to-use and efficient virtualized services are implemented, which are suitable for various development and testing scenarios.

CN120705054APending Publication Date: 2025-09-26ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510859862.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Traditional virtualization services have low flexibility in software development and testing and cannot quickly adapt to different testing scenarios.

Method used

By simulating some service functions of the external service to be simulated, a virtualized service is generated and deployed on the cloud service platform. The configuration of the virtualized service is adjusted using the configuration file, and the interceptor is used to intercept user requests to decide whether to start the virtualized service to process the request. It supports multiple simulation modes and plug-in mechanisms.

Benefits of technology

It improves the flexibility and adaptability of virtualized services, supports multiple simulation scenarios, enhances usability and security, reduces dependence on external services, and reduces development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705054A_ABST
    Figure CN120705054A_ABST
Patent Text Reader

Abstract

The invention relates to a cloud service platform-oriented virtualization service implementation method and device, computer equipment, a readable storage medium and a program product. The method comprises the following steps: simulating at least part of service functions of a to-be-simulated external service to obtain a virtualized service; service functions of the virtualization service are the same as at least part of service functions of the external service to be simulated, and a calling interface of the virtualization service is the same as a calling interface of the external service to be simulated; the virtualization service is deployed on a cloud service platform; obtaining a configuration file, and adjusting the configuration of the virtualization service based on the configuration file to obtain a target virtualization service; intercepting a target calling request of the user for the to-be-simulated external service based on the interceptor, and determining whether to start a target virtualization service according to the target calling request; and if yes, running the target virtualization service to process the target calling request. By adopting the method, the flexibility of the virtualization service can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer equipment, readable storage medium, and program product for implementing virtualized services for a cloud service platform. Background Art

[0002] In the power industry, software development and testing often encounter situations where dependent external services become unavailable, which can hinder software development and testing.

[0003] Therefore, it is necessary to simulate external services to replace them. In traditional technologies, the simulated virtualized services have the problem of low flexibility and cannot quickly adapt to different test scenarios. Summary of the Invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment, readable storage medium and program product for implementing virtualization services for cloud service platforms that can improve the flexibility of virtualization services in response to the above technical problems.

[0005] In the first aspect, the present application provides a method for implementing a virtualization service for a cloud service platform, the method comprising: simulating at least part of the service functions of an external service to be simulated to obtain a virtualized service; the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is the same as the calling interface of the external service to be simulated; the virtualized service is deployed on a cloud service platform; obtaining a configuration file, and adjusting the configuration of the virtualized service based on the configuration file to obtain a target virtualized service; intercepting the user's target call request for the external service to be simulated based on an interceptor, and determining whether to start the target virtualized service based on the target call request; if so, running the target virtualized service to process the target call request.

[0006] In one embodiment, obtaining a configuration file includes: recording the correspondence between multiple call requests and multiple response data received by the external service to be simulated during operation, and generating a configuration file based on the correspondence between the multiple call requests and the multiple response data; or, receiving a custom file sent by a user, and using the custom file as the configuration file; or, displaying a configuration interface, and generating a configuration file based on the configuration data entered by the user in the configuration interface.

[0007] In one of the embodiments, the method further includes: when a service function plug-in is obtained, integrating the service function plug-in into a target virtualization service; correspondingly, running the target virtualization service to process a target call request, including: running the service function plug-in and the target virtualization service to process the target call request.

[0008] In one embodiment, the target virtualization service includes a data verification service function and a data processing service function. Running the target virtualization service to process the target call request includes: running the data verification service function to determine whether the request parameters in the target call request meet the preset conditions; if so, running the data processing service function to process the target call request.

[0009] In one embodiment, the target virtualization service includes an error reporting service function, and the target virtualization service is run to process the target call request, including: during the process of running the target virtualization service to process the target call request, if an exception occurs, an error message is output through the error reporting service function.

[0010] In one embodiment, the target virtualized service is a virtualized payment service or a virtualized database query service.

[0011] On the second aspect, the present application also provides an implementation device for a virtualization service for a cloud service platform, the device comprising: a simulation module, used to simulate at least part of the service functions of an external service to be simulated to obtain a virtualized service; the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is the same as the calling interface of the external service to be simulated; the virtualized service is deployed on a cloud service platform; an adjustment module, used to obtain a configuration file, and adjust the configuration of the virtualization service based on the configuration file to obtain a target virtualized service; a processing module, used to intercept the user's target call request for the external service to be simulated based on an interceptor, and determine whether to start the target virtualization service according to the target call request; if so, run the target virtualization service to process the target call request.

[0012] In one embodiment, the adjustment module includes an acquisition unit for recording the correspondence between multiple call requests and multiple response data received by the external service to be simulated during operation, and generating a configuration file based on the correspondence between the multiple call requests and the multiple response data; or, receiving a custom file sent by a user and using the custom file as a configuration file; or, displaying a configuration interface and generating a configuration file based on the configuration data entered by the user in the configuration interface.

[0013] In one embodiment, the device also includes an integration module for integrating the service function plug-in into the target virtualization service when the service function plug-in is obtained; correspondingly, a processing module is specifically used to run the service function plug-in and the target virtualization service to process the target call request.

[0014] In one embodiment, the target virtualization service includes a data verification service function and a data processing service function. The processing module is specifically used to run the data verification service function to determine whether the request parameters in the target call request meet the preset conditions; if so, run the data processing service function to process the target call request.

[0015] In one embodiment, the target virtualization service includes an error reporting service function and a processing module, which is specifically used to output error information through the error reporting service function if an exception occurs during the process of processing the target call request by running the target virtualization service.

[0016] In one embodiment, the target virtualized service is a virtualized payment service or a virtualized database query service.

[0017] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0018] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.

[0019] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect above.

[0020] The above-mentioned implementation method, apparatus, computer equipment, readable storage medium and program product of the virtualization service for the cloud service platform obtains a virtualized service by simulating at least part of the service functions of the external service to be simulated; the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is the same as the calling interface of the external service to be simulated; the virtualized service is deployed on the cloud service platform; a configuration file is obtained, and the configuration of the virtualized service is adjusted based on the configuration file to obtain a target virtualized service; the user's target call request for the external service to be simulated is intercepted based on the interceptor, and it is determined whether to start the target virtualized service according to the target call request; if so, the target virtualized service is run to process the target call request. Since the virtualized service obtained by simulating the external service can be adjusted through the configuration file, the simulation behavior of the virtualized service can be adjusted at any time through the configuration file, thereby improving the flexibility of the virtualized service. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 A flowchart of a method for implementing a virtualized service for a cloud service platform in one embodiment;

[0023] Figure 2 A flowchart of a method for implementing a virtualized service for a cloud service platform in another embodiment;

[0024] Figure 3 A structural block diagram of an implementation apparatus for a virtualized service for a cloud service platform in one embodiment;

[0025] Figure 4 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0027] In an exemplary embodiment, Figure 1 As shown, a method for implementing virtualized services for a cloud service platform is provided, which is described by taking the method applied to a computer device as an example, and includes the following steps 101 to 103. Among them:

[0028] Step 101, simulate at least part of the service functions of the external service to be simulated to obtain a virtualized service; the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is the same as the calling interface of the external service to be simulated; the virtualized service is deployed on a cloud service platform.

[0029] Among them, when the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, the virtualized service can simulate the behavior of the external service, which can be specifically simulating all the behaviors of the external service or simulating part of the behaviors of the external service. The virtualized service simulates the behavior of the external service, such as simulating the external service to process different input parameters, simulating the return value after the external service processes different input parameters, simulating the external service to process abnormal situations, etc. During the simulation process, random logic, fixed return values ​​or rule-based responses can be used to simulate different service behaviors. For example, if the external service to be simulated is a payment service, different payment scenarios can be simulated, such as payment success, payment failure, payment timeout, etc. It should be noted that during the simulation process, log information is recorded to facilitate debugging and monitoring.

[0030] The calling interface of the virtualized service is the same as the calling interface of the external service to be simulated, so that the virtualized service can seamlessly replace the external service during the software development and testing process.

[0031] Simulating at least part of the service functionality of the external service to be simulated can involve obtaining interface information for the call interface of the external service to be simulated, including method signatures, parameter types, and return value types. Based on this interface information and at least part of the service functionality of the external service to be simulated, logic code is written to obtain a virtualized service. After obtaining the virtualized service, the virtualized service is deployed on the cloud service platform.

[0032] Step 102: Obtain a configuration file, and adjust the configuration of the virtualization service based on the configuration file to obtain a target virtualization service.

[0033] Among them, the virtualization service supports multiple simulation modes, including recording mode, playback mode and custom mode.

[0034] In recording mode, the correspondence between multiple call requests and multiple response data received by the external service to be simulated during operation is recorded.

[0035] In playback mode, a configuration file is generated based on the correspondence between multiple call requests and multiple response data recorded in recording mode, and the configuration of the virtualized service is adjusted based on the configuration file, so that the target virtualized service can return the same response data as the external service when receiving the same call request.

[0036] In custom mode, users can manually define simulation behaviors and return data through custom files or interfaces. Specifically, in one possible implementation, a custom file sent by the user is received, the custom file is used as a configuration file, and the configuration of the virtualization service is adjusted based on the configuration file to achieve customization of the virtualization service; in another possible implementation, a configuration interface is displayed, and a configuration file is generated based on the configuration data entered by the user in the configuration interface, and the configuration of the virtualization service is adjusted based on the configuration file to achieve customization of the virtualization service. That is, the virtualization service can provide a configuration interface, so that the user can enter configuration data in the configuration interface through the configuration interface to achieve customization of the virtualization service. Even through this configuration interface, users can be allowed to dynamically modify the configuration while the virtualization service is running, further enhancing the flexibility of the virtualization service.

[0037] In addition, in custom mode, the virtualization service supports the configuration of static data and dynamic data, and dynamic data can be generated through scripts or rules. For example, data templates (including format and structure) and rules are defined in the custom file, which clearly state the meaning and use of each configuration item, that is, describe the return data in different scenarios, so that the target virtualization service can generate corresponding data according to the definition in the custom file (that is, the configuration file) during operation. For example, when the custom file includes instructions for the virtualization service to generate dynamic data, the target virtualization service will use a scripting language or expression engine to return data during operation to implement more complex data generation logic. Among them, the custom file can be XML, JSON or a property file. It should be noted that the virtualization service has the function of reading and parsing configuration files, so that it can adjust its own configuration based on the configuration file.

[0038] Step 103: intercept the target call request of the user to the external service to be simulated based on the interceptor, and determine whether to start the target virtualization service according to the target call request; if so, run the target virtualization service to process the target call request.

[0039] Among them, the interceptor can be set using AOP (Aspect-Oriented Programming) technology or other interception mechanisms.

[0040] Setting an interceptor can intercept the user's target call request for the simulated external service, that is, it can intercept calls to the external service.

[0041] Determine whether to start the target virtualization service based on the target call request. This can be done by judging whether the method signature in the target call request is consistent with the method signature of the target virtualization service. If they are consistent, it means that the target virtualization service can provide the service function that the user wants to call, and the target virtualization service is started; if they are inconsistent, it means that the target virtualization service cannot provide the service function that the user wants to call, and the target virtualization service is not started.

[0042] If the target virtualization service is started, the target call request is processed using the target virtualization service. If the target virtualization service is not started, the target call request is sent to the external service to be processed based on the external service.

[0043] The above-mentioned method for implementing a virtualized service for a cloud service platform obtains a virtualized service by simulating at least part of the service functions of an external service to be simulated; the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is the same as the calling interface of the external service to be simulated; the virtualized service is deployed on the cloud service platform; a configuration file is obtained, and the configuration of the virtualized service is adjusted based on the configuration file to obtain a target virtualized service; the user's target call request for the external service to be simulated is intercepted based on the interceptor, and it is determined whether to start the target virtualized service based on the target call request; if so, the target virtualized service is run to process the target call request. Since the virtualized service obtained by simulating the external service can be adjusted through the configuration file, the simulation behavior of the virtualized service can be adjusted at any time through the configuration file, thereby improving the flexibility of the virtualized service.

[0044] In one of the embodiments, the method further includes: when a service function plug-in is obtained, integrating the service function plug-in into a target virtualization service; correspondingly, running the target virtualization service to process a target call request, including: running the service function plug-in and the target virtualization service to process the target call request.

[0045] A service function plug-in refers to user-defined simulation logic and data processing rules. The target virtualization service supports hot swapping. This means that after integrating a service function plug-in into the target virtualization service, the service function plug-in can be loaded without restarting the target virtualization service.

[0046] Optionally, the computer device is provided with a plug-in loader that is executed periodically to perform round-robin inspections. When a new service function plug-in is discovered, the service function plug-in is integrated into the target virtualized service. In this way, during the process of processing a target call request, the service function plug-in and the target virtualized service can be executed to jointly process the target call request. During this process, the service function plug-in can influence the simulated behavior of the target virtualized service.

[0047] In this embodiment, by setting a plug-in mechanism, the function of the virtualization service can be expanded, and the flexibility of the virtualization service can be further improved.

[0048] In one embodiment, Figure 2 As shown, another method for implementing a virtualization service is provided, wherein the target virtualization service includes a data verification service function and a data processing service function. The target virtualization service is run to process the target call request, including: running the data verification service function to determine whether the request parameters in the target call request meet the preset conditions; if so, running the data processing service function to process the target call request.

[0049] The determination of whether the request parameters in the target call request meet preset conditions may involve, for example, determining whether the type, range, and format of the request parameters meet data rules. If the type, range, and format of the request parameters all meet the data rules, the request parameters are determined to meet the preset conditions. If at least one of the type, range, and format of the request parameters does not meet the data rules, the request parameters are determined to not meet the preset conditions. For example, in a simulated payment service, the target call request may be a payment request, and the determination of whether the amount in the payment request is a positive number and whether the payment method is valid may be performed.

[0050] Optionally, after intercepting the target call request, data verification is performed, that is, the data verification service function is run to determine whether the request parameters in the target call request meet the preset conditions. If so, the data processing service function is run to process the target call request. If not, the target call request is not processed, and an error message is output to facilitate developers to quickly locate the problem.

[0051] In this embodiment, by performing data verification on the request parameters, illegal data can be prevented from interfering with or damaging the simulation environment, thereby ensuring the security of the simulation environment.

[0052] In one embodiment, the target virtualization service includes an error reporting service function, and the target virtualization service is run to process the target call request, including: during the process of running the target virtualization service to process the target call request, if an exception occurs, an error message is output through the error reporting service function.

[0053] The error reporting service enables exception capture and handling. For common exceptions, a predefined error response file is provided. When an exception occurs, error information can be output based on the error response information in the error response file. For example, in a simulated payment service, when a payment request times out or fails, the error reporting service can return a specific error code and description, helping developers quickly locate and resolve the issue.

[0054] In addition, when an exception occurs, you can also record the error log to facilitate subsequent analysis and improvement.

[0055] In this embodiment, by outputting error information in abnormal situations, the stability and maintainability of the virtualization service can be enhanced.

[0056] In one embodiment, the target virtualized service is a virtualized payment service or a virtualized database query service.

[0057] The external service to be simulated is, for example, a third-party payment service. The target virtualized service obtained through the aforementioned service virtualization implementation method is a virtualized payment service. This virtualized payment service can return a predefined payment result, such as success or failure, based on the input payment amount and method. The return data for the payment result can be configured using custom files, supporting the dynamic generation of different payment scenarios.

[0058] The external service to be simulated is, for example, a database query service. The target virtualized service obtained through the aforementioned service virtualization implementation method is a virtualized database query service, capable of simulating database query and update operations. In the query method, based on the SQL statement passed in, predefined query results can be returned. Dynamically generated query results can also be generated through scripts to simulate different database states.

[0059] The above-mentioned implementation method of virtualized services for cloud platform services has the following advantages:

[0060] (1) Flexibility and scalability.

[0061] Multiple simulation modes: Recording mode, playback mode and custom mode are provided, and users can flexibly choose the simulation mode according to their needs.

[0062] Plug-in mechanism: allows users to add customized simulation logic and data processing rules, supports hot plugging, and can load new plug-ins without restarting the application.

[0063] (2) Ease of use and simplicity of configuration.

[0064] Configuration file or interface: Provides a configuration file or interface to allow users to customize simulation behavior and data, and supports the configuration of static data and dynamic data.

[0065] Intercept and forward requests: By setting an interceptor, users can easily decide whether to call the target virtualized service or an external service.

[0066] (3) Performance optimization:

[0067] Lightweight implementation: Compared with traditional system-level virtualization, virtualization services deployed on cloud platforms reduce system resource consumption and improve application response speed and operating efficiency.

[0068] Dynamic data generation: Supports dynamic data generation through scripts or rules, which can more realistically simulate the behavior of external services and improve test accuracy and efficiency.

[0069] (4) Security and reliability.

[0070] Data verification: Verify the legitimacy of requested data in the simulation service to ensure the security of the simulation environment.

[0071] Error handling: Able to handle various abnormal situations, provide meaningful error information, and improve system stability and reliability.

[0072] (5) Wide range of applications:

[0073] Multi-scenario support: Suitable for different development and testing scenarios, it can simulate various third-party services, such as payment services, database services, weather query services, etc.

[0074] Cross-platform compatibility: It can be applied in different technology stacks and development environments, and has good versatility and portability.

[0075] (6) Cost-effectiveness:

[0076] Reduced reliance on external services: During the development and testing process, there is no need to actually call third-party services, saving related costs.

[0077] Improve development efficiency: Reduce development cycle and resource investment through rapid simulation and testing.

[0078] In summary, the virtualization service implementation method of the present application has significant advantages in terms of flexibility, ease of use, performance, security, scope of application and cost-effectiveness.

[0079] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0080] Based on the same inventive concept, the embodiments of the present application also provide a device for implementing a virtualized service for a cloud service platform for implementing the aforementioned method for implementing a virtualized service for a cloud service platform. The solution to the problem provided by the device is similar to the solution described in the aforementioned method. Therefore, the specific limitations in the embodiments of one or more devices for implementing a virtualized service for a cloud service platform provided below can be found in the above-mentioned limitations on the method for implementing a virtualized service for a cloud service platform, and will not be repeated here.

[0081] In an exemplary embodiment, Figure 3 As shown, a device for implementing virtualized services for a cloud service platform is provided. The device 300 for implementing virtualized services for a cloud service platform includes: a simulation module 301, an adjustment module 302, and a processing module 303, wherein:

[0082] The simulation module 301 is used to simulate at least part of the service functions of the external service to be simulated to obtain a virtualized service; the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is the same as the calling interface of the external service to be simulated; the virtualized service is deployed on the cloud service platform.

[0083] The adjustment module 302 is configured to obtain a configuration file and adjust the configuration of the virtualization service based on the configuration file to obtain a target virtualization service.

[0084] The processing module 303 is used to intercept the user's target call request for the external service to be simulated based on the interceptor, and determine whether to start the target virtualization service according to the target call request; if so, run the target virtualization service to process the target call request.

[0085] In one embodiment, the adjustment module 302 includes an acquisition unit for recording the correspondence between multiple call requests and multiple response data received by the external service to be simulated during operation, and generating a configuration file based on the correspondence between the multiple call requests and the multiple response data; or, receiving a custom file sent by the user and using the custom file as the configuration file; or, displaying a configuration interface and generating a configuration file based on the configuration data entered by the user in the configuration interface.

[0086] In one embodiment, the device also includes an integration module for integrating the service function plug-in into the target virtualization service when the service function plug-in is obtained; correspondingly, the processing module 303 is specifically used to run the service function plug-in and the target virtualization service to process the target call request.

[0087] In one embodiment, the target virtualization service includes a data verification service function and a data processing service function. The processing module is specifically used to run the data verification service function to determine whether the request parameters in the target call request meet the preset conditions; if so, run the data processing service function to process the target call request.

[0088] In one embodiment, the target virtualization service includes an error reporting service function, and the processing module 303 is specifically used to output error information through the error reporting service function if an exception occurs during the process of processing the target call request by running the target virtualization service.

[0089] In one embodiment, the target virtualized service is a virtualized payment service or a virtualized database query service.

[0090] Each module in the aforementioned apparatus for implementing virtualized services for a cloud service platform may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0091] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 4As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data such as configuration files and error information. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for implementing a virtualization service for a cloud service platform is implemented.

[0092] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0093] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0094] At least part of the service functions of the external service to be simulated is simulated to obtain a virtualized service; the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is the same as the calling interface of the external service to be simulated; the virtualized service is deployed on a cloud service platform; a configuration file is obtained, and the configuration of the virtualized service is adjusted based on the configuration file to obtain a target virtualized service; the user's target call request for the external service to be simulated is intercepted based on the interceptor, and it is determined whether to start the target virtualized service according to the target call request; if so, the target virtualized service is run to process the target call request.

[0095] In one embodiment, when the processor executes the computer program, it also implements the following steps: recording the correspondence between multiple call requests and multiple response data received by the external service to be simulated during operation, and generating a configuration file based on the correspondence between the multiple call requests and the multiple response data; or, receiving a custom file sent by the user, and using the custom file as the configuration file; or, displaying a configuration interface, and generating a configuration file based on the configuration data entered by the user in the configuration interface.

[0096] In one embodiment, when the processor executes the computer program, it also implements the following steps: when a service function plug-in is obtained, the service function plug-in is integrated into the target virtualization service, and correspondingly, the service function plug-in and the target virtualization service are run to process the target call request.

[0097] In one embodiment, the target virtualization service includes a data verification service function and a data processing service function. When the processor executes the computer program, it also implements the following steps: running the data verification service function to determine whether the request parameters in the target call request meet the preset conditions; if so, running the data processing service function to process the target call request.

[0098] In one embodiment, the target virtualization service includes an error reporting service function, and the processor also implements the following steps when executing the computer program: when the target virtualization service is running to process the target call request, if an exception occurs, the error information is output through the error reporting service function.

[0099] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0100] At least part of the service functions of the external service to be simulated is simulated to obtain a virtualized service; the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is the same as the calling interface of the external service to be simulated; the virtualized service is deployed on a cloud service platform; a configuration file is obtained, and the configuration of the virtualized service is adjusted based on the configuration file to obtain a target virtualized service; the user's target call request for the external service to be simulated is intercepted based on the interceptor, and it is determined whether to start the target virtualized service according to the target call request; if so, the target virtualized service is run to process the target call request.

[0101] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0102] At least part of the service functions of the external service to be simulated is simulated to obtain a virtualized service; the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is the same as the calling interface of the external service to be simulated; the virtualized service is deployed on a cloud service platform; a configuration file is obtained, and the configuration of the virtualized service is adjusted based on the configuration file to obtain a target virtualized service; the user's target call request for the external service to be simulated is intercepted based on the interceptor, and it is determined whether to start the target virtualized service according to the target call request; if so, the target virtualized service is run to process the target call request.

[0103] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0104] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0105] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0106] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for implementing virtualized services for a cloud service platform, characterized in that: The method comprises: Simulating at least part of the service functions of the external service to be simulated to obtain a virtualized service; the service functions of the virtualized service are the same as at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is the same as the calling interface of the external service to be simulated; the virtualized service is deployed on a cloud service platform; Obtaining a configuration file, and adjusting the configuration of the virtualized service based on the configuration file to obtain a target virtualized service; The interceptor intercepts the user's target call request for the external service to be simulated, and determines whether to start the target virtualization service according to the target call request; if so, runs the target virtualization service to process the target call request.

2. The method according to claim 1, characterized in that The obtaining of the configuration file comprises: Recording the correspondence between multiple call requests and multiple response data received by the external service to be simulated during operation, and generating the configuration file according to the correspondence between the multiple call requests and the multiple response data; or, receiving a custom file sent by the user, and using the custom file as the configuration file; or, A configuration interface is displayed, and the configuration file is generated based on the configuration data input by the user on the configuration interface.

3. The method according to claim 1, characterized in that The method further comprises: In the case of obtaining a service function plug-in, integrating the service function plug-in into the target virtualized service; Correspondingly, running the target virtualization service to process the target call request includes: The service function plug-in and the target virtualization service are run to process the target call request.

4. The method according to claim 1, wherein The target virtualization service includes a data verification service function and a data processing service function. Running the target virtualization service to process the target call request includes: Run the data verification service function to determine whether the request parameters in the target call request meet the preset conditions; If so, the data processing service function is run to process the target call request.

5. The method according to claim 1, wherein The target virtualization service includes an error reporting service function, and the running of the target virtualization service to process the target call request includes: During the process of running the target virtualization service to process the target call request, if an exception occurs, an error message is output through the error reporting service function.

6. The method according to claim 1, wherein The target virtualized service is a virtualized payment service or a virtualized database query service.

7. A device for implementing virtualized services for a cloud service platform, characterized in that: The device comprises: a simulation module configured to simulate at least part of the service functions of the external service to be simulated to obtain a virtualized service; the service functions of the virtualized service are identical to at least part of the service functions of the external service to be simulated, and the calling interface of the virtualized service is identical to the calling interface of the external service to be simulated; and the virtualized service is deployed on a cloud service platform; An adjustment module, configured to obtain a configuration file and adjust the configuration of the virtualized service based on the configuration file to obtain a target virtualized service; The processing module is used to intercept the user's target call request for the external service to be simulated based on the interceptor, and determine whether to start the target virtualization service according to the target call request; if so, run the target virtualization service to process the target call request.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.