Simulation method and device of application service system and electronic equipment
By building a resource occupancy model and simulating the system environment, and using privacy-protected resource call data, we solve the problems of application service system performance test accuracy and behavior simulation, achieve high-precision performance testing and a safe simulation process, and avoid Service interruption.
Patent Information
- Application Number
- CN202311759733.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2024-10-18
AI Technical Summary
The accuracy of performance testing of application service systems in the existing technology is not high enough to truly reproduce the expansion and contraction process, and direct performance testing of the system in use involves the risk of service interruption.
By building a resource occupancy model, sampling the operating status of hardware and software resources, building a matching simulation system environment, and using privacy-protected resource call data to simulate system responses, comprehensive performance testing and behavioral simulation of the application service system can be achieved.
It improves the accuracy of application service system performance testing and operational behavior simulation, avoids the risk of service interruption, and enhances data security.
Smart Images

Figure CN118796339A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud platform simulation technology, and in particular to a simulation method, device and electronic equipment for an in-application service system. Background Art
[0002] With the development of big data and cloud platform technology, cloud platform application service systems are being used more and more widely. In order to ensure that the business applications of the application service system meet user needs, avoid performance failures, and plan the capacity of the application service system, it is necessary to simulate the operation process of the application service system and test and evaluate its performance.
[0003] At present, there are three main methods for simulating application service systems: collecting system information for simulation, building a test system for testing, and directly performing performance tests on systems in use. Specifically, the method of collecting system information for simulation is to collect performance data from the production system in use, and then use data simulation methods to check the performance of the application service system, so as to timely discover and predict performance problems. The method of building a test system for testing is to build the same operating environment as the production system and conduct relevant tests to obtain system performance data more realistically. The method of directly performing performance tests on systems in use is to directly simulate stress tests on the production system to obtain system performance data.
[0004] However, the current methods of collecting system information for simulation and building test systems for testing are all based on simulation and simulation only from the perspectives of network traffic, memory usage, CPU utilization, and storage read and write, lacking a comprehensive simulation of the expansion and contraction process, making it impossible to truly reproduce the actual operating state of the application service system, the performance test accuracy of the application service system is not high enough, and the accuracy of the simulation of the operating behavior of the application service system is not high enough. The method of directly performing performance testing on the system in use has the risk of causing service interruption. Therefore, it is urgent to provide a simulation method that is more accurate and has a wider range of applications for simulating the behavior of the application service system. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a simulation method, device and electronic device for an in-application service system to solve the problems in the prior art of insufficient accuracy in performance testing of the application service system and insufficient accuracy in simulating the operating behavior of the application service system.
[0006] To solve the above technical problems, the embodiments of the present invention are implemented as follows:
[0007] In a first aspect, an embodiment of the present invention provides a simulation method for an application service system, the method comprising:
[0008] Based on the acquired input information and the preset cloud service application, a resource occupancy model of the application service system to be simulated is constructed, wherein the application service system includes a hardware layer, a software layer and an application layer, and the resource occupancy model is used to simulate the process in which the cloud service application receives input information and consumes hardware resources and software resources based on the input information;
[0009] Based on the resource occupancy model, sampling the running status of the hardware resources and software resources occupied by the cloud service application to obtain resource consumption timing information of the cloud service application;
[0010] Building an operating environment of a simulation system for simulating the operating state of the application service system, wherein the software resource version and hardware configuration information in the operating environment match the software resource version and hardware configuration information of the application service system respectively;
[0011] Based on the resource consumption timing information, the resource call data after privacy protection processing is used to simulate the operation process of the application service system responding to the input information in the operation environment.
[0012] Optionally, the resource consumption timing information includes: one or more of: CPU and its corresponding CPU utilization, memory and its corresponding memory capacity, storage interface and its corresponding read and write rate, GPU (Graphics Processing Unit) and its corresponding GPU utilization, database and its corresponding query rate, object storage and its corresponding read and write file traffic.
[0013] Optionally, the input information type of the application service system includes: input information for responding to a request or input information based on a timed event.
[0014] Optionally, the input information content of the application service system includes: one or more of: message keywords, message length interval, and message sending time interval.
[0015] Optionally, the resource call data includes business data in the resource call process and instructions for implementing system resource calls, and the method for performing privacy protection processing on the resource call data includes:
[0016] Use the preset data sequence to replace the business data in the application service system;
[0017] When extracting instructions for implementing system resource calls from the source code corresponding to the cloud service application, the operation logic information in the source code is deleted.
[0018] Optionally, based on the resource consumption time series information, simulating the operation process of the application service system responding to the input information in the operation environment by using the resource call data after privacy protection processing includes:
[0019] The simulation system is built based on a message sending simulator and a simulation application system, wherein the simulation application system includes at least one application simulator, the message sending simulator is used to send simulation information of a specified business flow to the simulation application system to simulate the input information, and the application simulator is used to respond to the simulation information according to the message sending timing of the message sending simulator;
[0020] Acquire target resource consumption timing information through the message sending simulator, and send the simulation information and the target resource consumption timing information to the application simulator;
[0021] Acquire, from the application simulator, simulation resource consumption timing information corresponding to the input information determined based on a length interval of the simulation information and target resource consumption timing information;
[0022] Determining a hardware performance ratio factor of the application service system and the simulation system based on the hardware performance test data of the application service system and the simulation system;
[0023] According to the period of the simulated resource consumption timing information corresponding to the input information, the resource call data after the privacy protection processing is run based on the application simulator in the constructed operating environment to respond to the simulation information and obtain the simulated load of the application service system, wherein the simulated load includes at least a CPU simulated load and a memory simulated load;
[0024] Based on the simulated load and the determined hardware performance ratio factor, the privacy-protected application service system operating parameters that match the target resource consumption timing information are determined, so as to simulate the operating process of the application service system in response to the input information in the operating environment based on the operating parameters.
[0025] Optionally, based on the hardware performance test data of the application service system and the simulation system, the method for determining the hardware performance ratio factor of the application service system and the simulation system includes:
[0026] Stress testing the hardware resources of the cloud service application and the hardware resources of the simulation system respectively to obtain the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system, wherein the hardware performance test data includes: one of CPU operation speed, memory size and network throughput;
[0027] Based on the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system, a hardware performance ratio factor of the application service system and the simulation system is determined.
[0028] In a second aspect, an embodiment of the present invention provides a simulation device for an application service system, the device comprising:
[0029] A resource occupancy model building module, which is used to build a resource occupancy model of the application service system to be simulated based on the acquired input information and the preset cloud service application. The application service system includes a hardware layer, a software layer and an application layer. The resource occupancy model is used to simulate the process of the cloud service application receiving input information and consuming hardware resources and software resources based on the input information;
[0030] A resource consumption timing information acquisition module, configured to sample the operating status of the hardware resources and software resources occupied by the cloud service application based on the resource occupation model, and acquire the resource consumption timing information of the cloud service application;
[0031] An operating environment building module, used to build an operating environment of a simulation system for simulating the operating state of the application service system, wherein the software resource version and hardware configuration information in the operating environment are respectively consistent with the software resource version and hardware configuration information of the application service system;
[0032] The performance simulation module is used to simulate the operation process of the application service system responding to the input information in the operation environment by using the resource call data after privacy protection processing based on the resource consumption timing information.
[0033] Optionally, the resource consumption timing information in the resource consumption timing information acquisition module includes: one or more of: CPU and its corresponding CPU utilization, memory and its corresponding memory capacity, storage interface and its corresponding read and write rate, GPU and its corresponding GPU utilization, database and its corresponding query rate, object storage and its corresponding read and write file traffic.
[0034] Optionally, the input information type in the resource occupancy model building module includes: input information for responding to a request or input information based on a timed event.
[0035] Optionally, the input information content in the resource occupancy model building module includes: one or more of: message keywords, message length intervals, and message sending time intervals.
[0036] Optionally, the resource call data in the performance simulation module includes: business data in the resource call process and instructions for implementing system resource calls, and the performance simulation module includes: a privacy protection processing unit, and the privacy protection processing unit is used to replace the business data in the application service system with a preset data sequence, and when extracting instructions for implementing system resource calls from the source code corresponding to the cloud service application, delete the operation logic information in the source code.
[0037] Optionally, the performance simulation module includes:
[0038] A simulation system building unit, used to build the simulation system based on a message sending simulator and a simulation application system, wherein the simulation application system includes at least one application simulator, the message sending simulator is used to send simulation information of a specified business flow to the simulation application system to simulate the input information, and the application simulator is used to respond to the simulation information according to the message sending timing of the message sending simulator;
[0039] A message sending unit, used for acquiring target resource consumption timing information through the message sending simulator, and sending the simulation information and the target resource consumption timing information to the application simulator;
[0040] A simulation resource consumption timing information acquisition unit, configured to acquire, from the application simulator, simulation resource consumption timing information corresponding to the input information determined based on a length interval of the simulation information and target resource consumption timing information;
[0041] A hardware performance ratio factor determination unit, configured to determine a hardware performance ratio factor of the application service system and the simulation system based on hardware performance test data of the application service system and the simulation system;
[0042] A response unit, configured to run the resource call data after the privacy protection processing based on the application simulator in the established operation environment according to the cycle of the simulated resource consumption timing information corresponding to the input information, so as to respond to the simulation information and obtain the simulated load of the application service system, wherein the simulated load includes at least a CPU simulated load and a memory simulated load;
[0043] An operating parameter determination unit is used to determine the privacy-protected operating parameters of the application service system that match the target resource consumption timing information based on the simulated load and the determined hardware performance ratio factor, so as to simulate the operating process of the application service system in response to the input information in the operating environment based on the operating parameters.
[0044] Optionally, the operating parameter determination unit includes:
[0045] The stress test subunit is used to perform stress tests on the hardware resources of the cloud service application and the hardware resources of the simulation system, respectively, to obtain the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system, wherein the hardware performance test data includes: one of CPU operation rate, memory size and network throughput;
[0046] The hardware performance proportional factor determination subunit is used to determine the hardware performance proportional factor of the application service system and the simulation system based on the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system.
[0047] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the simulation method of the application service system provided in the above embodiment.
[0048] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the simulation method of the application service system provided in the above embodiment are implemented.
[0049] It can be seen from the technical solution provided by the above embodiment of the present invention that the embodiment of the present invention builds a resource occupancy model of the application service system to be simulated based on the acquired input information and the preset cloud service application, samples the running status of the hardware resources and software resources occupied by the cloud service application based on the resource occupancy model, obtains the resource consumption timing information of the cloud service application, builds the running environment of the simulation system for simulating the running status of the application system, and the software resource version and hardware configuration information in the running environment are respectively matched with the software resource version and hardware configuration information of the application service system, and based on the resource consumption timing information, the resource call data processed by privacy protection is used to simulate the running process of the application system in response to the input information in the running environment. In this way, by sampling the running status of the hardware resources and software resources through the resource occupancy model, the application service system information can be simulated from both hardware and software aspects, and the acquired resource information is more comprehensive, which is conducive to the comprehensive simulation of the expansion and reduction process, thereby improving the accuracy of the performance test of the application service system and the accuracy of the running behavior simulation. By obtaining the resource consumption timing information of the cloud service application, the changing timing of resource occupancy consumption can be accurately simulated, the behavior of the application service can be simulated at the resource scheduling level, and it is also conducive to improving the accuracy of the simulation of the running behavior of the application service system. In the simulation system operating environment, by controlling the software resource version and hardware configuration information in the operating environment to match the software resource version and hardware configuration information of the application service system, the consistency of the simulation system and the application service system operating environment can be further ensured, and accurate performance simulation at the API level and message level can be achieved, thereby improving the accuracy of the performance test of the application service system and the accuracy of the operation behavior simulation. By using the input information obtained by the resource call data response after privacy protection processing, the specified message can be accurately simulated in the collected resource consumption time sequence under the premise of ensuring data desensitization and source code desensitization, which is conducive to improving the security of data in the application service system. In addition, the present application simulates the operation process of the application service system by building a simulation system, and does not directly participate in the operation process of the application service system, which can avoid the risk of service interruption. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0051] Figure 1 A schematic diagram of a flow chart of a simulation method of an application service system of the present invention;
[0052] Figure 2 It is a schematic diagram of the principle of the resource occupation model in the present invention;
[0053] Figure 3 It is a schematic diagram of resource consumption timing information in the present invention;
[0054] Figure 4 A schematic diagram of a flow chart of another simulation method of an application service system of the present invention;
[0055] Figure 5 It is a schematic diagram of the logical structure of the simulation system of the present invention;
[0056] Figure 6 It is a schematic diagram of the working principle of the application service system in the present invention;
[0057] Figure 7 A schematic diagram of using the perf tool to collect application service system call information in the present invention;
[0058] Figure 8 A flame graph of system calls generated by an API call in the present invention;
[0059] Fig. 9 A schematic diagram of CPU utilization statistics based on time in the present invention;
[0060] Fig.10 A schematic diagram of a method for extracting key functions from source code in the present invention;
[0061] Fig.11 A schematic diagram of the structure of a simulation device of an application service system of the present invention;
[0062] Fig.12 The figure is a schematic structural diagram of an electronic device of the present invention. DETAILED DESCRIPTION
[0063] The embodiments of the present invention provide a simulation method, device and electronic device for an application service system.
[0064] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0065] Embodiment 1
[0066] like Figure 1As shown, an embodiment of the present invention provides a simulation method for an application service system. The execution subject of the method may be a server, and the server may be an independent server or a server cluster composed of multiple servers. The method may specifically include the following steps:
[0067] In S102, a resource occupancy model of the application service system to be simulated is constructed based on the acquired input information and the preset cloud service application program.
[0068] Input information refers to the input information from the corresponding business scenario obtained by the application service system. The business scenario in the embodiment of the present invention is mainly a typical API (Application Program Interface) message-driven scenario in cloud services, and can also be used to simulate the operation process of a single cloud service in a multi-tenant cloud service deployment scenario. The content of the input information is mainly the message keywords representing the attributes of the input message, and the related content representing the size of the input message, and does not involve the real data in the input message.
[0069] The application service system in the embodiment of the present invention includes: a hardware layer, a software layer and an application layer, wherein the hardware layer refers to a hardware layer composed of multiple nodes containing computing resources (such as: CPU / GPU, storage nodes, etc.) interconnected through a network; the software layer refers to a software capability layer composed of basic software (such as: operating system, database, middleware, etc.); the application layer refers to an application layer composed of network message connections between applications (such as IP (Internet Protocol, network protocol), MQ (Message Queue, message queue), etc.).
[0070] The resource occupancy model is used to simulate the process of a cloud service application receiving input information and consuming hardware resources and software resources based on the input information. Figure 2 ,Depend on Figure 2 It can be seen that if it is necessary to simulate the cloud service application receiving the upstream input message drive, local resources can be used for processing through local resource calls, and messages can be sent to downstream nodes through the cloud service application to assign part of the processing tasks and receive the processing results returned by the downstream nodes. Taking the API message-driven scenario as an example, the API-based application has a clear message format definition: at least including the field name and data type. Based on this, the size and frequency of the input and output messages at the API interface can be accurately estimated.
[0071] In S104, based on the resource occupancy model, the running status of the hardware resources and software resources occupied by the cloud service application is sampled to obtain the resource consumption time series information of the cloud service application.
[0072] The resource consumption timing information in the embodiment of the present invention may be composed of two key parameters: the type of resource and the resource occupancy rate. For example, the resource consumption timing information of the CPU includes: the CPU and its corresponding CPU utilization rate. In addition, the application service system in the embodiment of the present invention performs resource consumption at both the hardware and computing environment levels. In addition to measuring hardware resources such as CPU occupancy rate, external software computing resources such as sending specific queries and modification instructions to the database, or the flow of reading and writing files to the object storage are also measured as an independent resource type. Therefore, the resource consumption timing information includes both the resource consumption timing information of hardware resources, such as: the resource consumption timing information of CPU, memory, I / O storage and GPU, and the resource consumption timing information of software resources, such as: the resource consumption timing information of database and object storage.
[0073] Resource consumption timing information can be determined by measuring resource consumption of timing-based applications under typical business scenarios (such as light-load business scenarios and full-load business scenarios).
[0074] The schematic diagram of resource consumption timing information in the embodiment of the present invention can be found in Figure 3 As shown, Figure 3 The grid-shaped shaded area in the middle is the local file read and write rate, the oblique shaded area is the network traffic, the 0, H7, Z10, Z9, Z8, Z5, Z4, Z1 images are the CPU utilization of the main application, and the triangle H3, H4, Z6 and triangle H5, H6, Z7 parts are the GPU utilization. Assuming that after receiving the API request at time 0, the resource consumption timing information of the cloud service application can be described as Figure 3 As shown in the content, different resources can be selected for different simulation scenarios.
[0075] In implementation, the operating status of the hardware resources and software resources occupied by the cloud service application can be sampled based on a preset time interval. For example, the preset time interval can be 0.1 seconds, 0.2 seconds, etc. The sampling interval can be adjusted according to different application scenarios and user needs to obtain a suitable sampling accuracy, which is not limited in the embodiments of the present invention.
[0076] In S106, an operating environment of a simulation system for simulating the operating state of the application service system is built, and the software resource version and hardware configuration information in the operating environment are matched with the software resource version and hardware configuration information of the application service system respectively.
[0077] In implementation, when building the operating environment of the simulation system, it can be built from two aspects: hardware environment and software environment. In terms of hardware environment, it is mainly to use hardware resources that match the specifications and hardware configuration information of the application service system to be tested. In terms of software environment, it is mainly to use software resources that match the software resource version of the application service system to be tested, so as to build a hardware and software environment consistent with the application service system environment.
[0078] In practice, when the software environment is built, the operating system, basic software (such as database, object storage and middleware, etc.), and upper-layer application (such as API runtime) versions of the simulation system's operating environment and the application service system to be tested can be made consistent, so that the behavior of the application service system can be accurately simulated. When the software environment is built, the system parameters (such as concurrency) of the simulation system and the application service system to be tested can also be made consistent.
[0079] In S108, based on the resource consumption time series information, the resource call data after privacy protection processing is used to simulate the operation process of the application service system responding to the input information in the operation environment.
[0080] Among them, resource call data refers to the data called during the operation of the simulated application service system in response to input information, which includes: business data in the resource call process and instructions for implementing system resource calls. The privacy protection method for resource call data can be to encrypt the resource call data, replace the data, or extract only the key information that can simulate the operation process of the application service system under the premise of deleting the real data, so as to ensure that the system behavior consistent with the application service system to be tested can be obtained through the simulation system, and at the same time, the performance test is carried out using data unrelated to the real user data to realize the behavior abstraction of the application service.
[0081] Embodiment 2
[0082] like Figure 4 As shown, an embodiment of the present invention provides a simulation method for an application service system. The execution subject of the method may be a server, and the server may be an independent server or a server cluster composed of multiple servers. The method may specifically include the following steps:
[0083] In S202, based on the acquired input information and the preset cloud service application, a resource occupancy model of the application service system to be simulated is constructed. The application service system includes a hardware layer, a software layer and an application layer. The resource occupancy model is used to simulate the process of the cloud service application receiving input information and consuming hardware resources and software resources based on the input information.
[0084] The input information types of the application service system include: input information used to respond to requests or input information based on timed events. That is, the input information obtained may be input information used to respond to cloud service application requests, such as input information corresponding to the user's irregular phone charge behavior, or input information based on timed events, such as input information corresponding to the phone charge deduction behavior at a preset fixed time at the beginning of each month according to a preset time.
[0085] In one implementation, the input information content of the application service system includes: message keywords (such as: URL (Uniform Resource Locator) path, operator, etc.), message length range (for example: average message length, maximum message length and minimum message length) and one or more of the message sending time intervals.
[0086] In S204, based on the resource occupancy model, the running status of the hardware resources and software resources occupied by the cloud service application is sampled to obtain the resource consumption time series information of the cloud service application.
[0087] Among them, the resource consumption timing information may include: one or more of: CPU and its corresponding CPU utilization, memory and its corresponding memory capacity, storage interface and its corresponding read and write rate, GPU and its corresponding GPU utilization, database and its corresponding query rate, object storage and its corresponding read and write file traffic.
[0088] In implementation, corresponding hardware resources and software resources can be selected for sampling according to specific application scenarios to obtain corresponding resource consumption timing information. Corresponding resource consumption timing information can be selected for different message keywords. For example, if the message keyword is image recognition, the corresponding resource consumption timing information may include resource consumption timing information generated by local image storage, memory space application, etc.
[0089] In S206, an operating environment of a simulation system for simulating the operating state of the application service system is built, and the software resource version and hardware configuration information in the operating environment are matched with the software resource version and hardware configuration information of the application service system respectively.
[0090] For other specific processing processes of the above S202-S206, reference may be made to the relevant contents of S102-S106 in the above embodiment 1, which will not be repeated here.
[0091] In S20802, a simulation system is built based on a message sending simulator and a simulation application system. The simulation application system includes at least one application simulator. The message sending simulator is used to send simulation information of specified business traffic to the simulation application system to simulate input information. The application simulator is used to respond to the simulation information according to the message sending timing of the message sending simulator.
[0092] The logical structure diagram of the simulation system in the embodiment of the present invention can be found in Figure 5 As shown. Figure 5 It can be seen that the simulation system mainly includes a message sending simulator and a simulation application system, and the simulation application system includes one or more application simulators. In a simple single-node processing, the simulation application system has only one application simulator #1, while in a multi-layer simulation application system, there are application simulator #1, application simulator #2, and application simulator #3. In this logical architecture, if application simulator #1 is regarded as a message sending simulator for downstream application simulators #2 and #3, the behavior simulation process of application simulators #2 and #3 is the same as that of application simulator #1.
[0093] Among them, the message sending simulator is used to send simulated information of the specified business traffic to the simulated application system to simulate the input information, and the application simulator is used to respond to the simulated information according to the message sending timing of the message sending simulator to simulate the business pressure of the real application obtained by the application service system to be tested. If there is only application simulator #1 in the simulated application system, application simulator #2 and application simulator #3 are run on other nodes. At this time, application simulator #2 and application simulator #3 are used for auxiliary testing, and application simulator #2 and application simulator #3 can return information of corresponding length according to the received information, without the need to simulate resource consumption of the system locally.
[0094] In S20804, the target resource consumption timing information is acquired through the message sending simulator, and the simulation information and the target resource consumption timing information are sent to the application simulator.
[0095] In S20806, simulated resource consumption timing information corresponding to the input information determined based on the length interval of the simulation information and the target resource consumption timing information is obtained from the application simulator.
[0096] In S20808, based on the hardware performance test data of the application service system and the simulation system, a hardware performance ratio factor of the application service system and the simulation system is determined.
[0097] During implementation, the hardware performance proportional factor can be obtained by comparing the hardware performance test data of the application service system and the simulation system. In the subsequent operation process simulation, the simulation system can convert the resource consumption value according to the determined hardware performance proportional factor, thereby further improving the accuracy of the simulation effect.
[0098] In an embodiment of the present invention, the method for determining the hardware performance ratio factor of the application service system and the simulation system may include the following process:
[0099] In step A1, the hardware resources of the cloud service application and the hardware resources of the simulation system are stress tested respectively to obtain the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system. The hardware performance test data includes: one of: CPU operation speed, memory size and network throughput.
[0100] In step A2, based on the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system, a hardware performance ratio factor of the application service system and the simulation system is determined.
[0101] Determining the hardware performance proportional factor by using the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system is not only easy to implement, but also can evaluate the extreme system parameters of the application service system and the simulation system, thereby more faithfully reflecting the operation process of the application service system and helping to improve the accuracy of the simulation results.
[0102] In S20810, according to the cycle of the simulated resource consumption timing information corresponding to the input information, the resource call data after privacy protection processing is run based on the application simulator in the established operating environment to respond to the simulation information and obtain the simulated load of the application service system, which includes at least CPU simulation load and memory simulation load.
[0103] In the embodiment of the present invention, the resource call data includes: business data in the resource call process and instructions for implementing the system resource call. The method for performing privacy protection processing on the resource call data may include the following process:
[0104] In step B1, the business data in the application service system is replaced with a preset data sequence.
[0105] The preset data sequence may be a specified data sequence or a randomly generated data sequence. In implementation, a preset data sequence, such as a data sequence of 0101...repeated 01, may be used to fill in the business data in the application service system. Taking the specified message length of 12Kbyte as an example, after receiving this message, 12Kbyte of memory consumption and 12Kbyte of files are generated in the simulated system environment. According to step B1 in the embodiment of the present invention, the business data related to the memory consumption does not need to use real user data, and can be filled by the specified data sequence 00001111...
[0106] By using preset data sequences to simulate real business data to execute the same system resource scheduling and desensitizing the real business data, it is helpful to improve the security of data transmission.
[0107] In step B2, when extracting instructions for implementing system resource calls from the source code corresponding to the cloud service application, the operation logic information in the source code is deleted.
[0108] In implementation, we can extract the system resource call related instructions in the source code, delete the operation logic information in the source code, and then use the preset data sequence to simulate the real business data. By removing the specific operation logic information in the source code and only recording the instructions for CPU, GPU and memory allocation, we can remove the business logic of the application service program and achieve source code desensitization.
[0109] In S20812, based on the simulated load and the determined hardware performance ratio factor, the privacy-protected application service system operating parameters that match the target resource consumption timing information are determined to simulate the operating process of the application service system responding to input information in the operating environment based on the operating parameters.
[0110] In combination with the above steps S20802-S20810, in implementation, the working principle diagram of the application service system in the present invention can be seen in Figure 6 shown. Figure 6 The execution subject of step S301 is the message sending simulator, and the execution subject of steps S302-S304 is the application simulator.
[0111] It should be noted that Figure 6For CPU load simulation, you can use specified operations, such as addition operations, or use instruction sets consistent with the application service system, such as AVX2 instruction operations. Similarly, for resource consumption other than the CPU (such as adding threads, subprocesses, and GPU operations), you can use typical instructions. For load simulation of databases and storage objects, you can first build a database or file pool of a similar size to the application service system to be tested, and fill it with randomly generated data; then use the operation instructions of the same structure as the application service system to be tested (such as SQL query instructions, file read and write instructions) for simulation.
[0112] The following is a detailed description of the method in the embodiment of the present application, taking an enterprise work order system as an example. It should be noted that: the enterprise work order system adopts a system architecture with front-end and back-end separation: the front-end APP (Application) and desktop program submit business information to the back-end service through the API interface; the back-end service performs corresponding processing and returns the results to the front-end APP and desktop program for page rendering and output. The back-end service can use the Python 3.8 / Flask framework to implement the http API. The back-end service is an application running in a container, which provides an http API interface to the outside world. According to business needs, the API of the back-end service includes: reading and writing database records, saving pictures, and OCR (Optical Character Recognition) recognition of pictures.
[0113] 1) Based on the input information obtained and the preset cloud service application, a resource occupancy model of the application service system to be simulated is constructed.
[0114] 2) Based on the resource occupancy model, the operating status of the hardware resources and software resources occupied by the cloud service application is sampled to obtain the resource consumption timing information of the cloud service application.
[0115] The execution process of the above steps 1)-2) has been described in detail in the previous embodiment and will not be repeated here.
[0116] 3) Build an operating environment for a simulation system that simulates the operating status of an application service system.
[0117] The process of building the operating environment includes:
[0118] 31) Collect the operating environment parameters of the simulation system, which include hardware configuration information (such as CPU model, memory capacity, storage interface protocol, etc.), operating system version information, and basic software version information (such as libc, openssl, docker, python, node / npm).
[0119] 32) Collect performance data for specified applications.
[0120] There are two ways to collect the performance data of a specified application. The first is to directly collect the resource call data and resource consumption data generated during the API call process, and use statements similar to the application service system (i.e., resource call data after privacy protection processing) for simulation. The second is to use scripts to extract key functions from the source code to generate simulation code to achieve business logic desensitization. That is, only the system call instructions that generate obvious resource consumption are extracted from the source code, and the simulation script is directly generated.
[0121] For the first method, taking the Linux system's perf tool (or command) as an example, you can use filters (you need to specify the program PID and application name when using filters) to collect the raw system resource consumption data related to the system calls of the specified application. The raw system resource consumption data collected by the perf tool is saved in a file. For example, to collect the python / Flask system call data of PID 3500, see Figure 7 The schematic diagram shown is a diagram of using the perf tool to collect application service system call information, where the call information is system call information generated when a client sends an http GET request to a corresponding Web application service program.
[0122] Based on this, we can collect the system calls (such as CPU, memory, storage read and write, etc.) corresponding to each API request and the size of the message sent. Figure 8 The system call flame graph FrameGraph shown can more intuitively show the system application status collected by the perf tool. Figure 8 This is a flame graph of system calls generated by API calls for a 240K image. This graph only shows the system-related functions involved in the API call. The functions of each function are as follows:
[0123] Tracesys: trace and record system processing, Sys_write: write data operation at the system layer, Vfs_write: write operation at the file system layer, Do_sync: refresh cache data, libc_start_main: system call main function, Main: main function, Reader_loop: loop read operation, execute_command: execute command function, execute_command_internal: internal execution command function, Execute_while_conmand: execute commands simultaneously, Execute_while_or_until: execute until the preset conditions are met.
[0124] Taking the CPU as an example, the time-based CPU utilization statistics diagram in the embodiment of the present invention can be found in Fig. 9 As shown, Fig. 9 Mainly the change process of CPU usage over time.
[0125] like Fig.10 As shown, for the second method, in implementation, taking the loading of OpenCV dnn function in Python code for detecting people and objects in the picture as an example, it can be known through system performance data analysis that this function operation consumes a lot of resources during system operation, and resource calls include two functions: cv2.dnn.blobFromImage model loading and net.forward model reasoning. According to the method in the embodiment of the present invention, the above two functions can be extracted and public images of corresponding input formats can be used, such as replacing the image corresponding to frame_tocheck in the application.
[0126] In addition, when using scripts to extract key functions from source code and generate simulation code, random characters can be replaced for variables and path names, and simple assignment logic operations can be merged and replaced. For example, one multiplication operation can be used to replace multiple assignment operations or addition and subtraction operations.
[0127] 4) Based on the collected API call data, a simulation program is constructed, which is used to describe the operation process of simulating the application service system responding to input information in the operation environment based on the resource consumption timing information and using the resource call data processed after privacy protection.
[0128] Since the text messages and pictures used in real business involve the user's data privacy, the embodiment of the present invention uses public pictures to replace the pictures in real business, for example, randomly selecting public pictures from ImageNet and COCO picture libraries to replace the pictures in real business. Figure 6 The schematic diagram of the working principle of the application service system simulates the operation process of the application service system. When the simulation program receives the preset API request, the CPU operation simulation and I / O operation simulation are performed according to the resource consumption timing data collected in step 32).
[0129] For the simulation of a large number of concurrent API requests or API combinations of different business processes, it can be obtained by superimposing multiple API resource consumption data at corresponding moments. Therefore, the method in the embodiment of the present invention can also effectively simulate the application service system in the application scenario of multi-tenant cloud service deployment, and can perform privacy protection processing on the data of multi-tenant cloud services respectively. The specific privacy protection processing method has been described in detail in the previous embodiment and will not be repeated here.
[0130] Embodiment 3
[0131] The above is a simulation method for an application service system provided by an embodiment of the present invention. Based on the same idea, an embodiment of the present invention also provides a simulation device for an application service system, such as Fig.11 shown.
[0132] The simulation device of the application service system includes: a resource occupancy model building module 410, a resource consumption timing information acquisition module 420, an operating environment building module 430 and a performance simulation module 440, wherein:
[0133] The resource occupancy model building module 410 is used to build a resource occupancy model of the application service system to be simulated based on the acquired input information and the preset cloud service application. The application service system includes a hardware layer, a software layer and an application layer. The resource occupancy model is used to simulate the process of the cloud service application receiving the input information and consuming hardware resources and software resources based on the input information.
[0134] The resource consumption timing information acquisition module 420 is used to sample the operation status of the hardware resources and software resources occupied by the cloud service application based on the resource occupation model to obtain the resource consumption timing information of the cloud service application;
[0135] The operating environment building module 430 is used to build an operating environment of a simulation system for simulating the operating state of the application service system, and the software resource version and hardware configuration information in the operating environment are respectively consistent with the software resource version and hardware configuration information of the application service system;
[0136] The performance simulation module 440 is used to simulate the operation process of the application service system responding to input information in the operation environment based on the resource consumption timing information and using the resource call data after privacy protection processing.
[0137] In an embodiment of the present invention, the resource consumption timing information in the resource consumption timing information acquisition module includes: one or more of: CPU and its corresponding CPU utilization, memory and its corresponding memory capacity, storage interface and its corresponding read and write rate, GPU and its corresponding GPU utilization, database and its corresponding query rate, object storage and its corresponding read and write file traffic.
[0138] In the embodiment of the present invention, the input information types in the resource occupancy model building module include: input information for responding to a request or input information based on a timed event.
[0139] In the embodiment of the present invention, the input information content in the resource occupancy model building module includes: one or more of: message keywords, message length intervals, and message sending time intervals.
[0140] In an embodiment of the present invention, the resource call data in the performance simulation module includes: business data in the resource call process and instructions for implementing system resource calls. The performance simulation module includes: a privacy protection processing unit. The privacy protection processing unit is used to replace the business data in the application service system with a preset data sequence, and when extracting instructions for implementing system resource calls from the source code corresponding to the cloud service application, delete the calculation logic information in the source code.
[0141] In an embodiment of the present invention, the performance simulation module includes:
[0142] A simulation system building unit is used to build a simulation system based on a message sending simulator and a simulation application system, wherein the simulation application system includes at least one application simulator, the message sending simulator is used to send simulation information of a specified business flow to the simulation application system to simulate input information, and the application simulator is used to respond to the simulation information according to the message sending timing of the message sending simulator;
[0143] A message sending unit, used for obtaining target resource consumption timing information through a message sending simulator, and sending simulation information and target resource consumption timing information to an application simulator;
[0144] A simulation resource consumption timing information acquisition unit, used to acquire simulation resource consumption timing information corresponding to input information determined based on a length interval of simulation information and target resource consumption timing information from an application simulator;
[0145] A hardware performance ratio factor determination unit, used to determine the hardware performance ratio factor of the application service system and the simulation system based on the hardware performance test data of the application service system and the simulation system;
[0146] A response unit is used to run the resource call data after privacy protection processing based on the application simulator in the established operating environment according to the cycle of the simulated resource consumption timing information corresponding to the input information, so as to respond to the simulation information and obtain the simulated load of the application service system, where the simulated load includes at least a CPU simulated load and a memory simulated load;
[0147] An operating parameter determination unit is used to determine the privacy-protected operating parameters of the application service system that match the target resource consumption timing information based on the simulated load and the determined hardware performance ratio factor, so as to simulate the operating process of the application service system in response to the input information in the operating environment based on the operating parameters.
[0148] In an embodiment of the present invention, the operating parameter determination unit includes:
[0149] The stress test subunit is used to perform stress tests on the hardware resources of the cloud service application and the hardware resources of the simulation system, respectively, to obtain the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system, the hardware performance test data including: one of: CPU operation rate, memory size and network throughput;
[0150] The hardware performance proportional factor determination subunit is used to determine the hardware performance proportional factor between the application service system and the simulation system based on the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system.
[0151] Embodiment 4
[0152] Fig.12 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0153] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that Fig.12 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.
[0154] Among them, the processor 510 is used to: build a resource occupancy model of the application service system to be simulated based on the acquired input information and the preset cloud service application, the application service system includes a hardware layer, a software layer and an application layer, and the resource occupancy model is used to simulate the process of the cloud service application receiving input information and consuming hardware resources and software resources based on the input information; based on the resource occupancy model, sample the operating status of the hardware resources and software resources occupied by the cloud service application to obtain the resource consumption timing information of the cloud service application; build an operating environment of a simulation system for simulating the operating status of the application service system, the software resource version and hardware configuration information in the operating environment are matched with the software resource version and hardware configuration information of the application service system respectively; based on the resource consumption timing information, use the resource call data processed by privacy protection to simulate the operating process of the application service system responding to the input information in the operating environment.
[0155] The processor 510 is further used to: replace the business data in the application service system with a preset data sequence; and delete the operation logic information in the source code when extracting instructions for implementing system resource calls from the source code corresponding to the cloud service application.
[0156] The processor 510 is further used to: build a simulation system based on a message sending simulator and a simulation application system, wherein the simulation application system includes at least one application simulator, the message sending simulator is used to send simulation information of a specified business flow to the simulation application system to simulate input information, and the application simulator is used to respond to the simulation information according to the message sending timing of the message sending simulator; obtain target resource consumption timing information through the message sending simulator, and send the simulation information and the target resource consumption timing information to the application simulator; obtain simulation resource consumption timing information corresponding to the input information determined based on the length interval of the simulation information and the target resource consumption timing information from the application simulator; based on the application service The hardware performance test data of the system and the simulation system are used to determine the hardware performance ratio factor of the application service system and the simulation system; according to the period of the simulated resource consumption timing information corresponding to the input information, the resource call data after privacy protection processing is run based on the application simulator in the established operating environment to respond to the simulation information and obtain the simulated load of the application service system, where the simulated load includes at least the CPU simulation load and the memory simulation load; based on the simulated load and the determined hardware performance ratio factor, the operating parameters of the application service system after privacy protection processing that match the target resource consumption timing information are determined to simulate the operating process of the application service system in response to the input information in the operating environment based on the operating parameters.
[0157] Processor 510 is also used to: perform stress tests on the hardware resources of the cloud service application and the hardware resources of the simulation system respectively, obtain the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system, the hardware performance test data including: one of the CPU operation rate, memory size and network throughput; based on the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system, determine the hardware performance ratio factor of the application service system and the simulation system.
[0158] It should be understood that in the embodiment of the present invention, the radio frequency unit 501 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 510 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 501 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 501 can also communicate with the network and other electronic devices through a wireless communication system.
[0159] The electronic device provides users with wireless broadband Internet access through the network module 502, such as helping users to send and receive emails, browse web pages, and access streaming media.
[0160] The audio output unit 503 can convert the audio data received by the RF unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output it as sound. Moreover, the audio output unit 503 can also provide audio output related to a specific function performed by the electronic device 500 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, etc.
[0161] The input unit 504 is used to receive audio or video signals. The input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042. The graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 506. The image frame processed by the graphics processor 5041 can be stored in the memory 509 (or other storage medium) or sent via the radio frequency unit 501 or the network module 502. The microphone 5042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 501 in the case of a telephone call mode.
[0162] The electronic device 500 also includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 5061 and / or the backlight when the electronic device 500 is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 505 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.
[0163] The display unit 506 is used to display information input by the user or information provided to the user. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0164] The user input unit 507 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 5071 or near the touch panel 5071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 5071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 510, receives the command sent by the processor 510 and executes it. In addition, the touch panel 5071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 5071, the user input unit 507 may also include other input devices 5072. Specifically, other input devices 5072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.
[0165] Furthermore, the touch panel 5071 may be overlaid on the display panel 5061. When the touch panel 5071 detects a touch operation on or near it, it transmits the information to the processor 510 to determine the type of the touch event. Then, the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Fig.12 In the figure, the touch panel 5071 and the display panel 5061 are used as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 5071 and the display panel 5061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.
[0166] The interface unit 508 is an interface for connecting an external device to the electronic device 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 500 or may be used to transmit data between the electronic device 500 and an external device.
[0167] The memory 509 can be used to store software programs and various data. The memory 509 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 509 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0168] The processor 510 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 509 and calling data stored in the memory 509, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 510.
[0169] The electronic device 500 may also include a power supply 511 (such as a battery) for supplying power to each component. Preferably, the power supply 511 may be logically connected to the processor 510 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0170] Preferably, an embodiment of the present invention further provides an electronic device, comprising a processor 510, a memory 509, and a computer program stored in the memory 509 and executable on the processor 510. When the computer program is executed by the processor 510, each process of the above-mentioned method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0171] Embodiment 5
[0172] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the simulation method embodiment of the above-mentioned application service system is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0173] The embodiment of the present invention provides a computer-readable storage medium, which builds a resource occupancy model of an application service system to be simulated based on the acquired input information and a preset cloud service application, samples the running status of the hardware resources and software resources occupied by the cloud service application based on the resource occupancy model, obtains the resource consumption timing information of the cloud service application, builds a running environment of a simulation system for simulating the running status of the application system, and the software resource version and hardware configuration information in the running environment are respectively matched with the software resource version and hardware configuration information of the application service system, and simulates the running process of the application system responding to the input information in the running environment using the resource call data processed after privacy protection based on the resource consumption timing information. In this way, by sampling the running status of the hardware resources and software resources through the resource occupancy model, the application service system information can be simulated from both hardware and software aspects, and the acquired resource information is more comprehensive, which is conducive to the comprehensive simulation of the expansion and contraction process, thereby improving the accuracy of the performance test of the application service system and the accuracy of the running behavior simulation. By obtaining the resource consumption timing information of the cloud service application, the changing timing of resource occupancy and consumption can be accurately simulated, the behavior of the application service can be simulated at the resource scheduling level, and it is also conducive to improving the accuracy of the simulation of the running behavior of the application service system. In the simulation system operating environment, by controlling the software resource version and hardware configuration information in the operating environment to match the software resource version and hardware configuration information of the application service system, the consistency of the simulation system and the application service system operating environment can be further ensured, and accurate performance simulation at the API level and message level can be achieved, thereby improving the accuracy of the performance test of the application service system and the accuracy of the operation behavior simulation. By using the input information obtained by the resource call data response after privacy protection processing, the specified message can be accurately simulated in the collected resource consumption time sequence under the premise of ensuring data desensitization and source code desensitization, which is beneficial to improve the security of data in the application service system. In addition, the present application can avoid the risk of service interruption by building a simulation system to simulate the operation process of the application service system.
[0174] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0175] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0176] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0178] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0179] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0180] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0181] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.
[0182] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0183] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A simulation method for an application service system, characterized in that: The method comprises: Based on the acquired input information and the preset cloud service application, a resource occupancy model of the application service system to be simulated is constructed, wherein the application service system includes a hardware layer, a software layer and an application layer, and the resource occupancy model is used to simulate the process in which the cloud service application receives input information and consumes hardware resources and software resources based on the input information; Based on the resource occupancy model, sampling the running status of the hardware resources and software resources occupied by the cloud service application to obtain resource consumption timing information of the cloud service application; Building an operating environment of a simulation system for simulating the operating state of the application service system, wherein the software resource version and hardware configuration information in the operating environment match the software resource version and hardware configuration information of the application service system respectively; Based on the resource consumption timing information, the resource call data after privacy protection processing is used to simulate the operation process of the application service system responding to the input information in the operation environment.
2. The method according to claim 1, characterized in that The resource consumption timing information includes: one or more of: CPU and its corresponding CPU utilization, memory and its corresponding memory capacity, storage interface and its corresponding read and write rate, GPU and its corresponding GPU utilization, database and its corresponding query rate, object storage and its corresponding read and write file traffic.
3. The method according to claim 1, characterized in that The input information types of the application service system include: input information used to respond to a request or input information based on a timed event.
4. The method according to claim 1, characterized in that The input information content of the application service system includes: one or more of message keywords, message length interval and message sending time interval.
5. The method according to claim 1, characterized in that: The resource call data includes business data in the resource call process and instructions for implementing system resource calls. The method for performing privacy protection processing on the resource call data includes: Use the preset data sequence to replace the business data in the application service system; When extracting instructions for implementing system resource calls from the source code corresponding to the cloud service application, the operation logic information in the source code is deleted.
6. The method according to claim 1, characterized in that The simulating the operation process of the application service system responding to the input information in the operation environment by using the resource call data after privacy protection based on the resource consumption time series information includes: The simulation system is built based on a message sending simulator and a simulation application system, wherein the simulation application system includes at least one application simulator, the message sending simulator is used to send simulation information of a specified business flow to the simulation application system to simulate the input information, and the application simulator is used to respond to the simulation information according to the message sending timing of the message sending simulator; Acquire target resource consumption timing information through the message sending simulator, and send the simulation information and the target resource consumption timing information to the application simulator; Acquire, from the application simulator, simulation resource consumption timing information corresponding to the input information determined based on a length interval of the simulation information and target resource consumption timing information; Determining a hardware performance ratio factor of the application service system and the simulation system based on the hardware performance test data of the application service system and the simulation system; According to the period of the simulated resource consumption timing information corresponding to the input information, the resource call data after the privacy protection processing is run based on the application simulator in the constructed operating environment to respond to the simulation information and obtain the simulated load of the application service system, wherein the simulated load includes at least a CPU simulated load and a memory simulated load; Based on the simulated load and the determined hardware performance ratio factor, the privacy-protected application service system operating parameters that match the target resource consumption timing information are determined, so as to simulate the operating process of the application service system in response to the input information in the operating environment based on the operating parameters.
7. The method according to claim 6, characterized in that The method for determining the hardware performance ratio factor of the application service system and the simulation system based on the hardware performance test data of the application service system and the simulation system includes: Stress testing the hardware resources of the cloud service application and the hardware resources of the simulation system respectively to obtain the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system, wherein the hardware performance test data includes: one of CPU operation speed, memory size and network throughput; Based on the maximum value of the hardware performance test data of the cloud service application and the maximum value of the hardware performance test data of the simulation system, a hardware performance ratio factor of the application service system and the simulation system is determined.
8. A simulation device for an application service system, characterized in that: The device comprises: A resource occupancy model building module, which is used to build a resource occupancy model of the application service system to be simulated based on the acquired input information and the preset cloud service application. The application service system includes a hardware layer, a software layer and an application layer. The resource occupancy model is used to simulate the process of the cloud service application receiving input information and consuming hardware resources and software resources based on the input information; A resource consumption timing information acquisition module, configured to sample the operating status of the hardware resources and software resources occupied by the cloud service application based on the resource occupation model, and acquire the resource consumption timing information of the cloud service application; An operating environment building module, used to build an operating environment of a simulation system for simulating the operating state of the application service system, wherein the software resource version and hardware configuration information in the operating environment are respectively consistent with the software resource version and hardware configuration information of the application service system; The performance simulation module is used to simulate the operation process of the application service system responding to the input information in the operation environment by using the resource call data after privacy protection processing based on the resource consumption timing information.
9. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the simulation method of the application service system as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the simulation method of the application service system according to any one of claims 1 to 7 are implemented.
