Service optimization method and apparatus, electronic device, and storage medium
By applying full tuning files to multiple application environments, the environment category is determined based on the differences in runtime data, and a correspondence between tuning files and environment categories is established. This solves the problems of high cost and large error in manually selecting tuning files, and realizes automated service optimization.
Patent Information
- Application Number
- CN202311062342.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-08-21
AI Technical Summary
In existing technologies, selecting appropriate tuning files for service optimization involves high human costs, large errors, and is difficult to automate performance optimization in different environments.
After applying the full set of optimization files to multiple application environments, the environment category is determined based on the differences in runtime data, and a correspondence between optimization files and environment categories is established, automatically selecting the target optimization file for optimization.
This reduces the cost of manually selecting and optimizing files, minimizes errors, and enables automated service optimization in new environments.
Smart Images

Figure CN119493613B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a service optimization method, apparatus, electronic device, and storage medium. Background Technology
[0002] The server runs various services (e.g., big data services, database services, AI-related services), each requiring different tuning files for optimization. The performance optimization strategies in these tuning files differ for each service, necessitating the selection of appropriate files to optimize performance and improve overall service quality. One related technique relies on the experience of performance experts to select suitable tuning files for different services, resulting in high human costs, significant errors in file selection, and inconsistent performance across different environments. Furthermore, manual judgment and analysis cannot comprehensively cover all scenarios, making it impossible to automatically select suitable tuning files for performance optimization across various services. Summary of the Invention
[0003] This application provides a service optimization method, apparatus, electronic device, and storage medium to address problems existing in related technologies.
[0004] In a first aspect, embodiments of this application provide a service optimization method, comprising: applying at least one optimization file from a full optimization file in multiple application environments respectively; determining multiple environment categories to which the multiple application environments belong based on the differences in the running data of the application environments before and after applying the at least one optimization file; wherein the application environments include computer systems and services running on the computer systems, and the running data includes data generated by the services running on the computer systems; determining a correspondence between each optimization file in the full optimization file and at least one environment category among the multiple environment categories; and determining a target optimization file in the full optimization file according to the correspondence, so as to apply the target optimization file to optimize the service running in the new application environment.
[0005] Secondly, embodiments of this application provide a service optimization apparatus, comprising: an environment category determination unit configured to, after applying at least one optimization file from a full set of optimization files in multiple application environments, determine multiple environment categories to which the multiple application environments belong based on the differences in running data of the application environments before and after applying the at least one optimization file, wherein the application environments include computer systems and services running on the computer systems, and the running data includes data generated by the services running on the computer systems; a correspondence determination unit configured to determine the correspondence between each optimization file in the full set of optimization files and at least one environment category among the multiple environment categories; and an optimization file determination unit configured to, based on the correspondence, determine a target optimization file from the full set of optimization files, so as to apply the target optimization file to optimize the service running in the new application environment.
[0006] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method described in any of the above-mentioned embodiments.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method described in any of the preceding claims.
[0008] Compared with the prior art, this application has the following advantages:
[0009] According to the embodiments of this application, multiple environment categories to which multiple application environments belong can be determined based on the differences in the running data of the application environment before and after applying at least one tuning file; according to the correspondence between the tuning file and the environment category, a target tuning file is determined so as to apply the target tuning file to optimize the service running in the new application environment. This can automatically select a suitable tuning file to optimize the service in the new application environment, reducing the cost of manually selecting tuning files and reducing the error in selecting tuning files.
[0010] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application, it can be implemented according to the contents of the specification. In order to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description
[0011] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments according to this application and should not be construed as limiting the scope of this application.
[0012] Figure 1 This is a schematic diagram illustrating a service optimization scheme according to an embodiment of this application;
[0013] Figure 2 This is a flowchart illustrating a service optimization method according to an embodiment of this application;
[0014] Figure 3 This is a schematic diagram illustrating an embodiment of obtaining a first vector according to this application;
[0015] Figure 4 This is a schematic diagram illustrating an embodiment of the present application for obtaining feature vectors corresponding to the application environment;
[0016] Figure 5 This is a structural block diagram illustrating a service optimization apparatus according to an embodiment of this application; and
[0017] Figure 6 This is a block diagram illustrating an electronic device according to an embodiment of this application. Detailed Implementation
[0018] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the concept or scope of this application. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0019] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application are described below. The following relevant technologies are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and all of them fall within the protection scope of the embodiments of this application.
[0020] This application provides a service optimization solution to solve all or part of the problems existing in the related technologies described above. To more clearly illustrate the service optimization solution provided in this application, the following is combined with… Figure 1 The optimization plan for this service will be explained. Figure 1 This is a schematic diagram illustrating a service optimization scheme according to an embodiment of this application. For example... Figure 1As shown, the application environment includes a computer system and services running on that computer system. First, it is necessary to determine multiple environment categories to which multiple application environments belong. Then, it is necessary to determine the correspondence between each tuning file and these environment categories. Finally, based on the environment category of the new application environment and the correspondence, a suitable target tuning file is determined to optimize the services running in the new application environment. Based on the service optimization scheme of this application embodiment, a target tuning file can be determined according to the correspondence between tuning files and environment categories. This allows for the automatic selection of suitable tuning files for optimizing services in the new application environment, reducing the cost of manual tuning file selection and minimizing errors in tuning file selection.
[0021] One embodiment of this application provides a service optimization method 200, which is applied to an electronic device, such as a server, computer, mobile phone, or smartwatch. The following will refer to... Figure 2 The service optimization method 200 of this application is explained. Figure 2 This is a flowchart illustrating a service optimization method according to an embodiment of this application. For example... Figure 2 As shown, the service optimization method 200 may include the following steps S201 to S203. Steps S201 to S203 will be described in detail below with reference to specific embodiments.
[0022] First, proceed to step S201. In step S201, after applying at least one tuning file from the full tuning files in multiple application environments, based on the differences in the running data of the application environments before and after applying the at least one tuning file, determine the multiple environment categories to which the multiple application environments belong. The application environments include computer systems and services running on the computer systems, and the running data includes data generated by the services running on the computer systems.
[0023] The application environment includes the computer system and the services running on that computer system. Services can be such as big data services, database services, AI-related services, etc. Services are also called workloads, and different services running on different computer systems will exhibit different performance characteristics. Different computer systems refer to different specifications; for example, computer system C1 has 8 CPUs, 32GB of RAM, and 4 network cards, while computer system C2 has 16 CPUs, 64GB of RAM, and 8 network cards.
[0024] In one embodiment, multiple application environments can be obtained by arranging and combining different computer systems and different services. For example, if there are currently 3 computer systems (i.e., computer systems C1 to C3) and 2 services (service S1 and service S2), arranging and combining these 3 computer systems and 2 services can yield 6 application environments, namely {computer system C1, service S1}, {computer system C1, service S2}, and so on, up to {computer system C3, service S2}.
[0025] A full profile is a collection of all existing profiles on an electronic device. A profile is a configuration scheme for a set of system parameters, including multiple system parameters and their values.
[0026] In one embodiment, the tuning file includes multiple system parameters and the values of the multiple system parameters, wherein the system parameters include at least one of the following: kernel configuration parameters and application configuration parameters.
[0027] System parameters refer to configuration items in the operating system that can be dynamically set and affect application performance, such as kernel configuration parameters and application configuration parameters. Kernel configuration parameters may include parameters such as `fs.file-max` (representing the maximum number of files the kernel can open), `kernel.sem` (representing kernel semaphores), and `vm.dirty_ratio` (representing the percentage of available memory). Application configuration parameters may include, for example, nginx application parameters, such as `worker_connections` (representing the number of external connections a single worker process can establish simultaneously) and `keepalive_timeout` (representing the timeout for keeping connections open). In the application environment, parameters can be set according to the system parameter configuration scheme described in the tuning file to optimize the performance of services in the application environment. The above selection of system parameters is merely exemplary; those skilled in the art can select system parameters according to actual circumstances.
[0028] In one embodiment, determining the multiple environment categories to which the multiple application environments belong based on the differences in the running data of the application environment before and after applying the at least one tuning file includes: obtaining a feature vector corresponding to the application environment based on the differences in the running data of the application environment before and after applying the at least one tuning file; and determining the multiple environment categories corresponding to the multiple application environments based on the feature vectors corresponding to each of the multiple application environments.
[0029] In one embodiment, obtaining the feature vector corresponding to the application environment based on the difference in running data before and after applying the at least one tuning file includes: calculating the difference between a first vector corresponding to the first running data of the application environment before applying the at least one tuning file and a second vector corresponding to at least one second running data of the application environment after applying the at least one tuning file; obtaining at least one difference vector based on the difference; and concatenating the at least one difference vector to obtain the feature vector corresponding to the application environment.
[0030] Before applying at least one tuning file, an application environment can use different performance monitoring tools (e.g., iperf, top, etc.) to obtain initial runtime data at a certain time. This initial runtime data may include, for example, CPU utilization, memory utilization, and network bandwidth utilization. Arranging, standardizing, and normalizing this initial runtime data yields a first vector. The arrangement of the initial runtime data can be ascending, descending, or random; this application does not impose any restrictions on this. Standardizing the initial data transforms it into a distribution with a mean of 0 and a standard deviation of 1. After standardization, the initial data can be normalized, which transforms the standardized initial data into a fixed interval, such as the [0,1] interval. The following will refer to... Figure 3 The process of obtaining the first vector will be explained. Figure 3 This is a schematic diagram illustrating the acquisition of a first vector according to an embodiment of this application. Figure 3 As shown, in a certain application environment, before applying the tuning file, the first running data output by performance monitoring tools 1 and 2 includes n data points. For example, running data 1 could be CPU utilization, and running data n could be memory utilization. After arranging these n data points, standardizing and normalizing them yields the first vector corresponding to the first running data, which is an n-dimensional vector. The vector corresponding to the running data at a single moment cannot accurately represent the characteristics of the application environment. This is because two application environments with similar vectors may exhibit different performance after applying the same tuning file. Therefore, it is necessary to obtain a vector based on the differences between the application environment before and after applying the tuning file to accurately represent the characteristics of the application environment.
[0031] Following the same method described above, a second vector corresponding to at least one second run data point after applying at least one tuning file can be obtained in the application environment. The number of second vectors equals the number of tuning files applied by the application environment. For example, if the application environment applies three different tuning files, it will generate three second run data points, each corresponding to one second vector, for a total of three second vectors. By calculating the difference between the first vector and at least one second vector, at least one difference vector can be obtained. The following will refer to... Figure 4 The method for obtaining the feature vectors corresponding to the application environment is explained. Figure 4 This is a schematic diagram illustrating an embodiment of the present application for obtaining feature vectors corresponding to the application environment. For example... Figure 4 As shown, a certain application environment uses three tuning files. The vector corresponding to the first run data before applying the tuning files is the first vector. After applying the three tuning files, the application environment generates three second run data sets, each corresponding to a second vector, resulting in three second vectors. By calculating the difference between the first vector and each second vector, three difference vectors are obtained. These three difference vectors are concatenated to obtain the feature vector corresponding to the application environment.
[0032] According to the embodiments of this application, the feature vector obtained based on the difference in running data before and after applying at least one tuning file in the application environment can accurately characterize the features of the application environment, thereby distinguishing different application environments.
[0033] In one embodiment, determining the multiple environment categories to which the multiple application environments belong based on the feature vectors corresponding to each of the multiple application environments includes: performing clustering processing on the multiple application environments based on the feature vectors corresponding to each of the multiple application environments to determine the multiple environment categories to which the multiple application environments belong. The clustering processing algorithm includes at least one of the following algorithms: K-means clustering algorithm, DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm, and agglomerative hierarchical algorithm.
[0034] Clustering is the process of grouping data with similar characteristics into groups, forming clusters (categories). Based on the feature vectors corresponding to each application environment, application environments with similar characteristics can be grouped together. Taking the K-means algorithm as an example, this explains how to cluster multiple application environments to obtain all the categories corresponding to them. The K-means clustering algorithm is an unsupervised learning algorithm, capable of clustering unlabeled data (i.e., data without defined categories). For example, to divide multiple application environments into 3 clusters, first, 3 initial points are randomly selected as centroids (the center of all points in a cluster). Then, based on the feature vectors corresponding to each application environment, the Euclidean distance between each application environment and the centroid of each cluster is calculated. Each application environment is assigned to the cluster closest to it, and the centroid of each cluster is updated. This process is repeated until each application environment is closest to its corresponding centroid. By performing clustering on multiple application environments through the above steps, all the categories corresponding to these application environments can be obtained.
[0035] According to the embodiments of this application, the application environment can be clustered by an unsupervised learning algorithm. There is no need to prepare a labeled training set in advance. The application environment can be divided into different categories based on its characteristics, which can reduce the cost of labeling data.
[0036] Next, proceed to step S102. In step S102, determine the correspondence between each tuning file in the full tuning file and at least one of the multiple environment categories.
[0037] In one embodiment, determining the correspondence between each tuning file in the full tuning files and at least one environment category among the plurality of environment categories includes: determining the correspondence by setting a label for the at least one environment category in each tuning file, wherein the label indicates whether the tuning file can improve the service performance of the application environment in the environment category.
[0038] After obtaining multiple environment categories to which multiple application environments belong, performance testing tools (e.g., sysbench, wrk, etc.) can be used to determine whether the service performance (e.g., network throughput, latency, etc.) of the application environments in the environment categories has improved after applying each tuning file, and a label for at least one environment category can be set in each tuning file. For example, a full optimization file includes three optimization files (P1, P2, and P3), and multiple application environments are divided into three environment categories (A, B, and C). If application environment A1 in environment category A experiences performance improvement after applying optimization file P1, then the tag for environment category A will be set to 1 in optimization file P1 (1 represents that the optimization file can improve the service performance of application environments in this category). If application environment B1 in environment category B does not experience performance improvement after applying optimization file P1, then the tag for environment category B will be set to 0 in optimization file P1 (0 represents that the optimization file cannot improve the service performance of application environments in this category). If application environment C1 in environment category C does not experience performance improvement after applying optimization file P1, then the tag for environment category C will be set to 0 in optimization file P1, and so on. Tags for these three environment categories can be set in other optimization files within the full optimization file.
[0039] In one embodiment, the application environment in the environment category is the application environment that is closest to the center point of the environment category.
[0040] A category can include multiple application environments. The center of the category is calculated using the average of all application environments included in the category. The application environment with the shortest distance to the center of the category can be considered the application environment with the most common characteristics in that category. Determining whether the tuning file can improve the service performance of the application environment with the shortest distance to the center of a category, and assigning a label to that category, can reduce the probability of the label being inaccurate.
[0041] Next, proceed to step S103. In step S103, based on the aforementioned correspondence, a target tuning file is determined from the full tuning file, so as to apply the target tuning file to optimize the service running in the new application environment.
[0042] When a new application environment emerges, it is necessary to determine the environment category to which this new application environment belongs, and based on the correspondence between the tuning files and at least one of the multiple environment categories, select the appropriate tuning file from the full set of tuning files to optimize the services in the new application environment.
[0043] In one embodiment, determining a target optimization file from the full optimization file based on the correspondence, and applying the target optimization file to optimize the service running in the new application environment, includes: obtaining a feature vector corresponding to the new application environment; determining the environment category to which the new application environment belongs among multiple environment categories based on the feature vector corresponding to the new application environment; obtaining a label corresponding to the environment category to which the new application environment belongs from the full optimization file, and determining a target optimization file from the full optimization file based on the label corresponding to the environment category to which the new application environment belongs and the correspondence, so as to apply the target optimization file to optimize the service running in the new application environment.
[0044] When a new application environment emerges, a feature vector corresponding to the new application environment can be obtained based on the difference in runtime data before and after applying at least one tuning file to the new target environment. Then, based on the Euclidean distance between this feature vector and the center of each environment category, it can be determined which environment category the new application environment belongs to. After obtaining the environment category to which the new application environment belongs, the target tuning file can be determined to optimize the service in the new application environment based on the labels corresponding to the environment category of the new application environment in the full tuning files and the correspondence between tuning files and environment categories. For example, if the full tuning files include three tuning files (P1, P2, and P3), and the existing application environments can be divided into three environment categories (A, B, and C), and the feature vector corresponding to the new application environment N is closest to the center of environment category C, then the new application environment N can be determined to belong to environment category C. In tuning file P1, the label for environment category C is 0 (0 means that the tuning file cannot improve the service performance of the application environment in this category); in tuning file P2, the label for environment category C is 0; and in tuning file P3, the label for environment category C is 1 (1 means that the tuning file can improve the service performance of the application environment in this category). Therefore, in the full tuning files, P3 can be selected to optimize the service in the new application environment N.
[0045] Corresponding to the application scenarios and methods provided in the embodiments of this application, the embodiments of this application also provide a service optimization device 500, which is deployed on an electronic device, such as a server, computer, mobile phone, or smartwatch. The following will refer to... Figure 5 The service optimization device 500 of this application will be described. Figure 5 This is a structural block diagram illustrating a service optimization apparatus according to an embodiment of this application. Figure 5As shown, the service optimization device 500 may include: an environment category determination unit 501, a correspondence determination unit 502, and an optimization file determination unit 503.
[0046] The environment category determination unit 501 is configured to apply at least one tuning file from the full tuning files in multiple application environments, and then determine multiple environment categories to which the multiple application environments belong based on the differences in the running data of the application environments before and after applying the at least one tuning file. The application environments include computer systems and services running on the computer systems, and the running data includes data generated by the services running on the computer systems.
[0047] The environment category determination unit 501 can be a component of an electronic device, through which the electronic device obtains multiple environment categories to which multiple application environments belong.
[0048] The correspondence determination unit 502 is configured to determine the correspondence between each optimization file in the full optimization file and at least one environment category among the multiple environment categories.
[0049] The correspondence determination unit 502 can be a component in an electronic device, through which the electronic device determines the correspondence between the tuning file and the environment category to which the application environment belongs.
[0050] The tuning file determination unit 503 is configured to determine a target tuning file from the full set of tuning files based on the correspondence, so as to apply the target tuning file to optimize the service running in the new application environment.
[0051] The tuning file determination unit 503 can be a component in an electronic device, through which the electronic device selects a target tuning file to optimize services running in a new application environment.
[0052] In one embodiment, the environment category determination unit 501 is further configured to obtain a feature vector corresponding to the application environment based on the difference in running data of the application environment before and after applying the at least one tuning file; and to determine multiple environment categories corresponding to the multiple application environments based on the feature vectors corresponding to each of the multiple application environments.
[0053] In one embodiment, the environment category determination unit 501 is further configured to calculate the difference between a first vector corresponding to the first running data of the application environment before applying the at least one tuning file and a second vector corresponding to at least one second running data of the application environment after applying the at least one tuning file, and obtain at least one difference vector based on the difference; and concatenate the at least one difference vector to obtain the feature vector corresponding to the application environment.
[0054] In one embodiment, the correspondence determination unit 502 is further configured to determine the correspondence by setting a label for the at least one environment category in each of the tuning files, the label indicating whether each of the tuning files can improve the service performance of the application environment in the environment category.
[0055] In one embodiment, the optimization file determination unit 503 is further configured to obtain the feature vector corresponding to the new application environment; based on the feature vector corresponding to the new application environment, determine the environment category to which the new application environment belongs among the multiple environment categories; obtain the label corresponding to the category to which the new application environment belongs from the full optimization file, and based on the label corresponding to the environment category to which the new application environment belongs and the corresponding relationship, determine the target optimization file from the full optimization file, so as to apply the target optimization file to optimize the service running in the new application environment.
[0056] In one embodiment, the correspondence determination unit 502 is further configured to perform clustering processing on the plurality of application environments based on the feature vectors corresponding to each application environment, so as to determine the plurality of environment categories to which the plurality of application environments belong.
[0057] According to the embodiments of this application, multiple environment categories to which multiple application environments belong can be determined based on the differences in the running data of the application environment before and after applying at least one tuning file; according to the correspondence between the tuning file and the environment category, a target tuning file is determined so as to apply the target tuning file to optimize the service running in the new application environment. This can automatically select a suitable tuning file to optimize the service in the new application environment, reducing the cost of manually selecting tuning files and reducing the error in selecting tuning files.
[0058] According to the embodiments of this application, the feature vector obtained based on the difference in running data before and after applying at least one tuning file in the application environment can accurately characterize the features of the application environment, thereby distinguishing different application environments.
[0059] According to the embodiments of this application, the application environment can be clustered by an unsupervised learning algorithm. There is no need to prepare a labeled training set in advance. The application environment can be divided into different categories based on its characteristics, which can reduce the cost of labeling data.
[0060] The functions of each module in each device in the embodiments of this application can be found in the corresponding description in the above method, and they have corresponding beneficial effects, which will not be repeated here.
[0061] Figure 6This is a block diagram of an electronic device used to implement embodiments of this application. For example... Figure 6 As shown, the electronic device includes a memory 601 and a processor 602. The memory 601 stores a computer program that can run on the processor 602. When the processor 602 executes the computer program, it implements the methods described in the above embodiments. The number of memories 601 and processors 602 can be one or more.
[0062] The electronic device also includes:
[0063] The communication interface 603 is used to communicate with external devices and perform data exchange and transmission.
[0064] If the memory 601, processor 602, and communication interface 603 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0065] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.
[0066] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method provided in this application.
[0067] This application also provides a chip including a processor for calling and executing instructions stored in a memory, causing a communication device with the chip installed to perform the method provided in this application.
[0068] This application also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in the application embodiment.
[0069] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.
[0070] Further, optionally, the aforementioned memory may include read-only memory and random access memory. The memory may be volatile memory or non-volatile memory, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0071] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0072] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0073] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0074] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.
[0075] The logic and / or steps described in the flowchart or otherwise herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0076] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.
[0077] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.
[0078] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope described in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A service optimization method, comprising: After applying at least one tuning file from the full tuning files in multiple application environments, the multiple application environments are clustered based on the differences in the running data before and after applying the at least one tuning file, in order to determine the multiple environment categories to which the multiple application environments belong. The application environment includes a computer system and a service running on the computer system, and the running data includes the data generated by the service running on the computer system. Determining the correspondence between each tuning file in the full tuning files and at least one environment category among the plurality of environment categories includes: determining the correspondence by setting a label for the at least one environment category in each tuning file, wherein the label indicates whether each tuning file can improve the service performance of the application environment in the environment category; Based on the correspondence, a target tuning file is determined in the full tuning file, so as to apply the target tuning file to optimize the service running in the new application environment.
2. The method according to claim 1, wherein, The step of clustering the multiple application environments based on the differences in runtime data before and after applying the at least one tuning file to determine the multiple environment categories to which the multiple application environments belong includes: Based on the differences in the running data of the application environment before and after applying the at least one tuning file, a feature vector corresponding to the application environment is obtained. Based on the feature vectors corresponding to each of the multiple application environments, clustering is performed on the multiple application environments to determine the multiple environment categories to which the multiple application environments belong.
3. The method according to claim 2, wherein, The step of obtaining the feature vector corresponding to the application environment based on the difference in running data before and after applying the at least one tuning file includes: Calculate the difference between the first vector corresponding to the first running data of the application environment before applying the at least one tuning file and the second vector corresponding to the at least one second running data of the application environment after applying the at least one tuning file, and obtain at least one difference vector based on the difference; The at least one difference vector is concatenated to obtain the feature vector corresponding to the application environment.
4. The method according to claim 1, wherein, The step of determining a target tuning file based on the correspondence in the full tuning file, and applying the target tuning file to optimize the service running in the new application environment, includes: Obtain the feature vector corresponding to the new application environment; Based on the feature vector corresponding to the new application environment, the environment category to which the new application environment belongs among the multiple environment categories is determined; Obtain the tag corresponding to the environment category to which the new application environment belongs from the full optimization file, and determine the target optimization file from the full optimization file based on the tag corresponding to the environment category to which the new application environment belongs and the corresponding relationship, so as to apply the target optimization file to optimize the service running in the new application environment.
5. The method according to claim 1, wherein, The application environment in the environment category is the one that is closest to the center point of the environment category.
6. A service optimization apparatus, comprising: An environment category determination unit is configured to apply at least one tuning file from the full tuning files to multiple application environments, and then perform clustering processing on the multiple application environments based on the differences in the running data of the application environments before and after applying the at least one tuning file, so as to determine the multiple environment categories to which the multiple application environments belong. The application environment includes a computer system and a service running on the computer system, and the running data includes the data generated by the service running on the computer system. The correspondence determination unit is configured to determine the correspondence between each tuning file in the full set of tuning files and at least one environment category among the plurality of environment categories, including: determining the correspondence by setting a label for the at least one environment category in each tuning file, wherein the label indicates whether each tuning file can improve the service performance of the application environment in the environment category; The tuning file determination unit is configured to determine a target tuning file from the full set of tuning files based on the correspondence, so as to apply the target tuning file to optimize the service running in the new application environment.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method of any one of claims 1-5.
8. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of any one of claims 1-5.
Citation Information
Patent Citations
Configuration file pushing method and device, server and storage medium
CN112948012A
Performance tuning method and system, electronic equipment and readable storage medium
CN116107761A