Service interface performance optimization method and device, electronic equipment and storage medium

By obtaining the resource utilization parameters of the application service equipment, determining the business interface performance optimization strategy, and optimizing resource allocation and configuration, the problem of insufficient business interface resources in the existing technology is solved, and efficient resource utilization and cost control are achieved.

CN118585291APending Publication Date: 2024-09-03QI AN XIN TECHNOLOGY GROUP INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410728691.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

When existing technology improves the utilization of business interface resources in application services, it is necessary to replace hardware devices with higher performance, resulting in increased resource usage costs, and it is difficult to accurately determine device resource utilization parameters to optimize business interface performance.

Method used

By obtaining the resource utilization parameters of the application service device, determine the performance optimization strategy of the business interface, including retaining or deleting processing steps, optimizing resource allocation, ensuring that the business interface has sufficient resources to process requests, and monitoring and adjusting resource configuration to improve performance.

Benefits of technology

Without increasing resource usage costs, full utilization of business interface resources can be achieved, equipment resource utilization can be optimized, the processing performance and efficiency of business interfaces can be improved, and the need to replace hardware equipment can be avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585291A_ABST
    Figure CN118585291A_ABST
Patent Text Reader

Abstract

The invention provides a business interface performance optimization method and device, electronic equipment and a storage medium. The business interface performance optimization method comprises the steps of obtaining current resource utilization parameters of equipment where application service is located; according to the resource utilization parameter, determining a performance optimization strategy corresponding to a service interface in the application service, the performance optimization strategy comprising reservation of each processing step of the service interface for the service request or deletion of the corresponding processing step; and optimizing the processing steps in the service interface by adopting a performance optimization strategy, so that the currently allocated resources of the service interface can be provided for the service interface to process the service request. Through the resource utilization parameter of the device where the application service is located, the processing condition of the service interface for the service request in the application service can be determined, and then the processing steps for the service request in the service interface are deleted according to the condition. And the operation cost of the service is not increased while the smooth operation of the service interface is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for optimizing service interface performance. Background Art

[0002] Application services include various specific services. Each service has a corresponding service interface in the application service. When a user sends a service request through a service interface, the service request will be processed by the corresponding service, thereby enabling the user to use the corresponding service in the application service.

[0003] Generally speaking, application services need to be installed in hardware devices to provide corresponding services. However, the resources of hardware devices are limited. When the resources provided by the hardware devices are not enough to support the business (that is, the business interface) in the application service, the current main approach is to replace the hardware devices. Use hardware devices with better performance to replace the existing hardware devices. The better the performance of the hardware devices, the more resources they can provide. In this way, the business interfaces in the application services will have enough resources to use, thereby improving the service quality of the business in the application services.

[0004] However, the higher the performance of the hardware device, the more expensive it is. Although hardware devices with better performance can provide sufficient resources for business interfaces, they also increase the cost of resource use. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a service interface performance optimization method, device, electronic device and storage medium, which ensure that the service interface has sufficient resources to use while not increasing the cost of resource use.

[0006] In order to solve the above technical problems, the embodiments of the present application provide the following technical solutions:

[0007] The first aspect of the present application provides a method for optimizing the performance of a business interface, the method comprising: obtaining current resource utilization parameters of a device where an application service is located; determining a performance optimization strategy corresponding to a business interface in the application service based on the resource utilization parameters, wherein the performance optimization strategy comprises retaining each processing step of a business request by the business interface or deleting the corresponding processing steps; and optimizing the processing steps in the business interface using the performance optimization strategy so that the resources currently allocated to the business interface can be used by the business interface to process business requests.

[0008] Compared with the prior art, the service interface performance optimization method provided in the first aspect of the present application can determine the processing status of the service interface in the application service for the service request through the resource utilization parameters of the device where the application service is located, and then delete the processing steps for the service request in the service interface according to the situation. After deleting the processing steps, the resources consumed by the service interface when processing the service request will be reduced. In the case of limited equipment resources, the service interface can also have sufficient resources to process the service request. There is no need to replace hardware equipment with better performance, and the service interface can also have sufficient resources to use. While ensuring the smooth operation of the service interface, it will not increase the operating cost of the business.

[0009] In some changed implementation modes of the first aspect of the present application, obtaining the current resource utilization parameters of the device where the application service is located includes: obtaining the number of business requests currently received by the application service; determining the current resource utilization parameters of the device based on the number of business requests, wherein the resource utilization parameters are positively correlated with the number.

[0010] Since the processing of business requests is the key to the consumption of device resources by the business interface, determining the resource utilization parameters of the device by the number of business requests can achieve accurate determination of the device resource utilization parameters, thereby improving the accuracy of determining the business interface performance optimization strategy and improving the processing performance of the business interface.

[0011] In some changed implementation modes of the first aspect of the present application, before determining the current resource utilization parameters of the device based on the number of business requests, the method further includes: determining whether the number of business requests exceeds a preset number; if so, executing the step of determining the current resource utilization parameters of the device based on the number of business requests.

[0012] If the number of business requests is small, the device resources are unlikely to be overutilized due to the operation of the business interface. Therefore, when the number of business requests is large, the device resource utilization parameters are determined based on the number of business requests, and then the performance optimization strategy of the business interface is determined. This can reduce the invalid determination of the device resource utilization parameters, and then reduce the invalid determination of the performance optimization strategy, thereby improving the performance optimization efficiency of the business interface.

[0013] In some changed implementation modes of the first aspect of the present application, determining the performance optimization strategy corresponding to the business interface in the application service based on the resource utilization parameters includes: determining the performance optimization level of the business interface based on the resource utilization parameters; searching the business interface for the performance optimization strategy corresponding to the performance optimization level, wherein the business interface has multiple performance optimization levels and their corresponding performance optimization strategies pre-stored; and using the found performance optimization strategy as the performance optimization strategy corresponding to the business interface in the application service.

[0014] The performance optimization level is determined by resource utilization parameters, and then the performance optimization strategy corresponding to the business interface is determined according to the performance optimization level. By adding the performance optimization level between the resource utilization parameters and the performance optimization strategy, the resource utilization parameters and the performance optimization strategy can be untied to achieve flexible configuration of the resource utilization parameters and the performance optimization strategy.

[0015] In some changed implementation modes of the first aspect of the present application, there are multiple business interfaces, and the performance optimization strategies corresponding to the multiple performance optimization levels pre-stored in different business interfaces are not completely the same; determining the performance optimization level of the business interface according to the resource utilization parameter comprises: searching for the performance optimization level corresponding to the resource utilization parameter from a configuration file, wherein the configuration file pre-stores multiple resource utilization parameters and their corresponding performance optimization levels; searching for the performance optimization strategy corresponding to the performance optimization level in the business interface comprises: based on the found performance optimization level, searching for the corresponding performance optimization strategy in each business interface, and using the found performance optimization strategy as the performance optimization strategy of the corresponding business interface.

[0016] By directly searching for the performance optimization level corresponding to the resource utilization parameter through the configuration file, the efficiency of searching for the performance optimization level can be improved. And according to the performance optimization level, the performance optimization strategy corresponding to the performance optimization level can be searched in different business interfaces. Since the performance optimization strategies corresponding to the same performance optimization level in different business interfaces are all different, the personalized configuration of the performance optimization strategies corresponding to different performance optimization levels in different business interfaces can be improved.

[0017] In some changed implementation modes of the first aspect of the present application, after the performance optimization strategy is adopted to optimize the processing steps in the business interface, the method further includes: obtaining the current processing performance parameters of the device; based on the processing performance parameters, allocating different resource amounts and / or cache data to the business interfaces in a virtual environment, so that the business interfaces run under different resource amounts and / or cache data, respectively, wherein the cache data is data in a database corresponding to the business interface with a query frequency higher than a preset frequency, and when the business interface queries based on a business request, the cache data has a higher priority than the database; obtaining the processing performance parameters of the business interface running under different resource amounts and / or cache data; determining whether the resource amount and / or cache data corresponding to the optimal processing performance parameters are the same as the resource amount and / or cache data currently allocated to the business interface; if not, configuring the resource amount and / or cache data corresponding to the optimal processing performance parameters to the business interface.

[0018] After optimizing the performance of the business interface, continue to monitor the processing performance of the device, and simulate using different resource amounts and cache data according to the monitored processing performance of the device, and select the resource amount and cache data with the best operating effect for the business interface to configure the business interface, so that the operating status of the business interface is optimal, further improving the performance of the business interface.

[0019] In some changed implementation modes of the first aspect of the present application, the method further includes: obtaining business requests historically received by the application service; analyzing and displaying business types and request quantities corresponding to the business requests historically received; receiving adjustment instructions for performance optimization strategies, wherein the adjustment instructions are generated based on the displayed business types and request quantities; and modifying the currently stored performance optimization strategies according to the adjustment instructions.

[0020] By displaying the business types and request quantities of historical business requests to users, users can judge the future trends of business requests and adjust the current performance optimization strategy to improve the optimization effect of the performance optimization strategy on business interface performance.

[0021] In some changed implementation modes of the first aspect of the present application, the business request includes a query request; after optimizing the processing steps in the business interface using the performance optimization strategy, the method further includes: obtaining the query request received by the application service; determining whether the query request has been authorized; if authorized, determining whether the query content in the query request matches a whitelist, wherein the whitelist stores query content that has been confirmed to be safe; if matched, causing the query request to skip the application service, and providing feedback that the query content in the query request is safe; if not matched, querying the cached data of the business interface corresponding to the application service based on the query request, wherein the cached data is data in a database corresponding to the business interface whose query frequency is higher than a preset frequency.

[0022] After the application service receives the query request, it intercepts the query request and further matches the query request with the whitelist when it is determined that the query request has query permission. If the match is successful, the security result is directly fed back. This can avoid the query request from querying in the application service, reduce the query of the corresponding cached data in the application service or the call of the corresponding database, and reduce the processing pressure of the application service. If the match fails, the query is first performed in the cached data. If the query fails, the query is performed in the database. Since there is less cached data, it can not only improve the query efficiency, but also reduce the call of the database and reduce the resources consumed when processing the business interface.

[0023] The second aspect of the present application provides a service interface performance optimization device, which includes: an acquisition module for acquiring the current resource utilization parameters of the device where the application service is located; a determination module for determining the performance optimization strategy corresponding to the service interface in the application service based on the resource utilization parameters, wherein the performance optimization strategy includes the retention of each processing step of the service request by the service interface or the deletion of the corresponding processing steps; an optimization module for optimizing the processing steps in the service interface using the performance optimization strategy so that the resources currently allocated to the service interface can be used by the service interface to process the service request.

[0024] The third aspect of the present application provides an electronic device, comprising: a processor, a memory, and a bus; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute the method in the first aspect.

[0025] A fourth aspect of the present application provides a computer-readable storage medium, the storage medium comprising: a stored program; wherein, when the program is executed, the device where the storage medium is located is controlled to execute the method in the first aspect.

[0026] The service interface performance optimization device provided in the second aspect of this application, the electronic device provided in the third aspect, and the computer-readable storage medium provided in the fourth aspect have the same or similar beneficial effects as the service interface performance optimization method provided in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0028] Figure 1 The overall architecture diagram of the service interface performance optimization in the embodiment of the present application is as follows Figure 1 ;

[0029] Figure 2 The process diagram of the service interface performance optimization method in the embodiment of the present application is as follows: Figure 1 ;

[0030] Figure 3 The overall architecture diagram of the service interface performance optimization in the embodiment of the present application is as follows Figure 2 ;

[0031] Figure 4 The process diagram of the service interface performance optimization method in the embodiment of the present application is as follows: Figure 2 ;

[0032] Figure 5 The structure of the service interface performance optimization device in the embodiment of the present application is shown as follows: Figure 1 ;

[0033] Figure 6 The structure of the service interface performance optimization device in the embodiment of the present application is shown in FIG. Figure 2 ;

[0034] Figure 7 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0036] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.

[0037] At present, in order to ensure that the business interfaces in application services have sufficient resources, the main approach is to improve the performance of the hardware devices where the application services are located. However, the higher the performance of the hardware devices, the more expensive they are. Therefore, while ensuring the business interface resources, the cost of using resources will increase.

[0038] In view of this, the embodiments of the present application provide a method, device, electronic device and storage medium for optimizing the performance of a business interface, which reduces the corresponding processing steps for processing business requests in the business interface of the application service according to the resource utilization of the hardware device where the application service is located. The reduced processing steps reduce the consumption of resources. Using the current hardware equipment, the business interface of the application service can also have sufficient resources to use. While ensuring the smooth operation of the business interface, it will not increase the operating cost of the business.

[0039] First, the overall architecture of the service interface performance optimization method provided in the embodiment of the present application is described.

[0040] Figure 1 The overall architecture diagram of the service interface performance optimization in the embodiment of the present application is as follows Figure 1 , see Figure 1 As shown, the architecture may include: hardware device 11 , application service 12 and business interface 13 .

[0041] There may be multiple service interfaces 13 .

[0042] The hardware device 11 is installed with an application service 12. The application service 12 includes multiple services. Each service corresponds to a service interface 13.

[0043] When a user needs to use a service in the application service 12, the user sends a service request to the corresponding service interface 13. The service request is processed through various processing steps preset in the service interface 13 to implement the user's operation.

[0044] Sometimes, the business interface 13 processes a large number of requests, and the hardware device 11 cannot provide enough resources for the business interface 13 to use. At this time, the processing steps in the business interface 13 can be optimized. That is, delete some processing steps that are of low importance and do not affect the overall function of the business after deletion. In addition, different step optimization strategies can be configured according to the scarcity of resources. The processing steps in the business interface 13 are reduced, but it will not affect the overall implementation of the business, but it can reduce the amount of resources consumed when the business is running. There is no need to use a hardware device 11 with better performance to provide more resources, and the business interface 13 can have enough resources to use. While ensuring the smooth operation of the business interface, it will not increase the operating cost of the business.

[0045] Prior to this, it is necessary to configure the corresponding performance optimization strategy for the business interface 13. In this way, after determining that the current resources of the hardware device 11 are insufficient, the corresponding performance optimization strategy can be implemented for the business interface 13. The subject who configures the performance optimization strategy can be the developer of the business interface 13, or the user of the application service 12, operation and maintenance personnel, etc. Here, there is no specific limitation on the subject who configures the performance optimization strategy.

[0046] It should be noted here that the execution subject in the embodiment of the present application can be a hardware device 11, an application service 12, a business interface 13, or a software program or monitoring device other than the hardware device 11, application service 12, and business interface 13.

[0047] Next, the service interface performance optimization method provided in the embodiment of the present application is described in detail.

[0048] Figure 2 The process diagram of the service interface performance optimization method in the embodiment of the present application is as follows: Figure 1 , see Figure 2 As shown, the method may include:

[0049] S21: Obtain current resource utilization parameters of the device where the application service is located.

[0050] Application services, or applications, can provide corresponding functions for users to use.

[0051] Devices are hardware devices on which various applications can be installed and on which the applications can run normally.

[0052] Resources may refer to the processing units provided by the device to enable the application services installed therein to run normally. For example, central processing unit (CPU), memory, etc. Resource utilization parameters may refer to the current usage of the above processing units. For example, CPU utilization, memory utilization, CPU usage, remaining memory, etc.

[0053] When obtaining resource utilization parameters, the control end of the service interface performance optimization can send a resource utilization parameter acquisition request to the device. After receiving the request, the device feeds back the current resource utilization parameters of the device to the control end based on the request. Alternatively, the device is configured in advance so that the device sends the current resource utilization parameters of the device to the control end at a preset time interval. The specific method for obtaining resource utilization parameters is not limited here.

[0054] S22: Determine a performance optimization strategy corresponding to a business interface in the application service according to the resource utilization parameter.

[0055] The performance optimization strategy includes retaining each processing step of the business request of the business interface or deleting the corresponding processing steps.

[0056] For business interfaces, different resource utilization parameters correspond to different performance optimization strategies. When the resource utilization parameters indicate that resources are sufficient, the business interface corresponds to the performance optimization strategy of retaining each processing step. When the resource utilization parameters indicate that resources are insufficient, the business interface corresponds to the performance optimization strategy of deleting the corresponding processing steps.

[0057] Resource shortage can also be divided into different levels. Different levels correspond to different processing steps to be deleted. The higher the resource shortage level, the more scarce the resources are, and the more processing steps to be deleted.

[0058] Specifically, all processing steps in the business interface can be sorted according to importance. The higher the resource shortage level, the more steps are deleted, starting from the processing steps with low importance. For example: for the Internet Protocol (IP) reputation detection interface, three processing steps can be included: IP reputation detection, generation of detection log, and output of detection log. The three processing steps are sorted from high to low in importance as IP reputation detection, generation of detection log, and output of detection log. When the resource utilization parameters of the device indicate that the device resources are in a first-level shortage, the detection log is no longer output, that is, only the IP reputation detection and generation of detection log operations are performed for business requests. When the resource utilization parameters of the device indicate that the device resources are in a second-level shortage, the detection log is no longer generated and the detection log is no longer output, that is, only the IP reputation detection operation is performed for business requests.

[0059] S23: Optimize the processing steps in the business interface using a performance optimization strategy, so that the resources currently allocated to the business interface can be used by the business interface to process business requests.

[0060] If the resource utilization parameter indicates that the current resources of the device are not in short supply, it means that the device can provide sufficient resources to the business interface. The corresponding performance optimization strategy is that the business interface can execute all the processing steps. After the business interface receives the business request, it can execute all the processing steps in sequence for the business request, so that the business request can be fully executed and the quality of business processing is ensured.

[0061] If the resource utilization parameter indicates that the current resource shortage of the device means that the device cannot provide sufficient resource usage to the business interface, the corresponding performance optimization strategy is that the business interface only executes some of the processing steps. After the business interface receives the business request, it can only execute some of the key processing steps for the business request, so that the business request can be processed and the smooth execution of the business is ensured.

[0062] It can be seen from the above content that the service interface performance optimization method provided in the embodiment of the present application can determine the processing status of the service interface in the application service for the service request through the resource utilization parameters of the device where the application service is located, and then delete the processing steps for the service request in the service interface according to the situation. After deleting the processing steps, the resources consumed by the service interface when processing the service request will be reduced. In the case of limited equipment resources, the service interface can also have sufficient resources to process the service request. There is no need to replace hardware equipment with better performance, and the service interface can also have sufficient resources to use. While ensuring the smooth operation of the service interface, it will not increase the operating cost of the business.

[0063] Furthermore, as a Figure 2As a refinement and extension of the method shown, an embodiment of the present application also provides a method for optimizing service interface performance.

[0064] Figure 3 The overall architecture diagram of the service interface performance optimization in the embodiment of the present application is as follows Figure 2 , see Figure 3 As shown, the architecture may include: hardware device 11 , application service 12 and business interface 13 .

[0065] During the development phase of the application service 12 , the developers took into account the resource shortage of the business interface 13 and configured corresponding performance optimization strategies for each business interface 13 .

[0066] During the use phase of the application service 12, the user or operation and maintenance personnel of the application service 12 may configure different resource utilization parameter intervals and their corresponding performance optimization levels according to actual conditions.

[0067] When a user needs to use a service in the application service 12 through the device 11, the user sends a service request to the corresponding service interface 13 in the application service 12. In the embodiment of the present application, the corresponding performance optimization level is determined according to the number of service requests received by the service interface 13 and the resource utilization parameters of the device 11, and then the performance optimization strategy corresponding to the performance optimization level is searched in each service interface 13, and then the processing steps in the corresponding service interface 13 are optimized according to the corresponding performance optimization strategy.

[0068] For example, assume that the application service includes business interface a and business interface b. Business interface a corresponds to processing steps a1, a2, and a3, and business interface b corresponds to processing steps b1, b2, and b3. Business interface a corresponds to performance optimization strategy L1: do not execute a3, L2: do not execute a2 and a3. Business interface b corresponds to performance optimization strategy L1: do not execute b3, L2: do not execute b2 and b3. In addition, the user pre-configures that the CPU utilization of the device is less than x1, and the performance optimization strategy is not executed; x1≤the CPU utilization of the device is less than x2, corresponding to the performance optimization level L1; the CPU utilization of the device is greater than or equal to x2, corresponding to the performance optimization level L2. At this time, the CPU utilization of the device is monitored to be x2, corresponding to the performance optimization level L2, and business interface a does not execute a2 and a3, but only executes a1, and business interface b does not execute b2 and b3, but only executes b1.

[0069] Figure 4 The process diagram of the service interface performance optimization method in the embodiment of the present application is as follows: Figure 2 , see Figure 4 As shown, the method may include:

[0070] S41: Obtain the number of business requests currently received by the application service.

[0071] The business interface of the application service is used to receive and process business requests, which is also the key to the business interface consuming device resources. Therefore, the number of business requests currently received by the application service can determine the current resource utilization parameters of the device, and then provide corresponding performance optimization strategies for the business interface. Since the number of business requests is easier to obtain than the resource utilization parameters of the device, both in terms of acquisition method and security strategy. Therefore, according to the number of business requests, the configuration of the business interface performance optimization strategy can be accurately and efficiently implemented, and the performance of the business interface can be accurately and quickly improved.

[0072] The so-called business request is a request that needs to be implemented through a business interface to implement the corresponding business function. For example, an IP reputation query request is to query the IP reputation through the IP reputation query interface.

[0073] When obtaining the number of service requests, a query request may be sent to the application service, so that the application service feeds back the number of service requests currently received based on the query request. Alternatively, the application service may be pre-configured so that the application service feeds back the number of service requests currently received at a preset time interval. The specific method for obtaining the number of service requests is not limited here.

[0074] It should be noted here that the number of service requests currently received may refer to a time period starting from the current moment and moving forward by a preset time. For example, the number of service requests received within the previous minute, the number of service requests received within the previous 10 minutes, and so on. The specific length of the time period is not limited here and can be determined according to the specific requirements of the service interface performance optimization.

[0075] S42: Determine whether the number of service requests exceeds a preset number. If yes, execute S43; if no, execute S44.

[0076] If the number of business requests is large, the processing of business requests will inevitably consume more resources of the business interface, and the resources currently allocated to the business interface may not be sufficient to provide it with business requests. At this time, it is necessary to determine the performance optimization strategy of the business interface and optimize the performance of the business interface so that the business interface can smoothly process a large number of business requests. If the number of business requests is small, the processing of business requests will not consume more resources of the business interface, and the resources currently allocated to the business interface may be sufficient to provide it with business requests. At this time, there is no need to determine the performance optimization strategy of the business interface, and there is no need to optimize the performance of the business interface, which can avoid invalid performance optimization of the business interface.

[0077] The preset number here can be determined based on the proportion of the resources initially allocated to the application service in the total device resources. The larger the proportion of device resources initially allocated to the application service, the more business requests can be processed smoothly with a greater probability, and the larger the preset number can be, thereby reducing the frequency of business interface performance optimization. Of course, it can also be determined based on the importance of the business corresponding to the business interface. The higher the importance of the business, the less likely the business interface is to have a resource shortage, and the smaller the preset number needs to be, thereby ensuring that requests for important businesses can be processed smoothly through the business interface. The specific method for determining the preset number and the specific value are not limited here.

[0078] Since the number of business requests and the preset number are both specific values, the two values ​​are compared. If the former is larger, the number of business requests exceeds the preset number. If the former is smaller, or the former and the latter are the same, the number of business requests does not exceed the preset number.

[0079] S43: Determine the current resource utilization parameter of the device according to the number of service requests.

[0080] Among them, resource utilization parameters are positively correlated with quantity.

[0081] When the number of business requests exceeds the preset number, it means that the business interface currently needs to process a large number of business requests, and the resources currently allocated to the business interface may not be able to provide smooth processing of the business requests. Therefore, it is necessary to determine the current resource utilization parameters of the device based on the number of business requests, and then optimize the performance of the business interface based on the current resource utilization parameters of the device.

[0082] When determining the current resource utilization parameters of the device based on the number of service requests, the number of service requests can be divided into different intervals, for example: the number of service requests in the three intervals of 1-100, 101-1000, and 1001-10000. Resource utilization parameters can also be divided into different levels, for example: level 1, level 2, and level 3. The number of service requests in different intervals is matched with the resource utilization parameters of the corresponding level. After obtaining the number of service requests, the target interval where the number is located is found in each interval, and then the level corresponding to the target interval is used as the determined resource utilization parameter. For example: the number of service requests currently received is 500, then the corresponding resource utilization parameter is level 2. In this way, the resource utilization parameters can be quickly determined.

[0083] Of course, you can also use preset calculation rules to determine resource utilization parameters. The calculation rules include the number of business requests, the total number of various applications in the device, etc. The resource utilization parameter is positively correlated with the number of business requests and the total number of various applications in the device. The result output by the calculation rule is the current resource utilization parameter of the device.

[0084] S44: End the service interface performance optimization.

[0085] When the number of business requests does not exceed the preset number, it means that the business interface currently needs to process fewer business requests, and the resources currently allocated to the business interface are likely to be able to provide smooth processing of business requests. Therefore, there is no need to determine the current resource utilization parameters of the device, determine the performance optimization strategy of the business interface, or optimize the performance of the business interface.

[0086] After the current resource utilization parameters of the device are determined, a performance optimization strategy for the service interface can be determined based on the resource utilization parameters, thereby achieving performance optimization of the service interface.

[0087] In addition to directly determining the performance optimization strategy of the business interface based on the resource utilization parameters, the resource utilization parameters can also be decoupled from the performance optimization strategy by using the performance optimization level in between, so that the resource utilization parameters and the performance optimization strategy can be flexibly configured.

[0088] S45: Determine the performance optimization level of the service interface according to the resource utilization parameter.

[0089] S46: Searching for a performance optimization strategy corresponding to the performance optimization level in the service interface.

[0090] Among them, multiple performance optimization levels and their corresponding performance optimization strategies are pre-stored in the business interface.

[0091] S47: Use the found performance optimization strategy as the performance optimization strategy corresponding to the business interface in the application service.

[0092] That is to say, during the development phase of the business interface, the developers consider that there may be insufficient resources when the business interface is used, so they pre-configure various performance optimization strategies corresponding to different degrees of insufficient resources in the business interface. That is, various performance optimization levels and their corresponding performance optimization strategies. During the use phase, users can configure different resource utilization parameters for different performance optimization levels according to their actual needs. That is, different resource utilization parameters correspond to different performance optimization levels. In this way, flexible configuration of performance optimization strategies and resource utilization parameters is achieved.

[0093] For example, assume that the service interface is configured with: performance optimization level L1-performance optimization strategy a, performance optimization level L2-performance optimization strategy b, performance optimization level L3-performance optimization strategy c. The user configures in the application service: x<resource utilization parameter≤y-performance optimization level L1, y<resource utilization parameter≤z-performance optimization level L2, resource utilization parameter>z-performance optimization level L3. After determining that the resource utilization parameter of the device is z, the corresponding performance optimization level L2 can be determined through the configuration in the application service, and then through the configuration in the service interface, it is determined that the service interface currently needs to use performance optimization strategy b for performance optimization.

[0094] It should be noted here that if the resource utilization parameter is ≤x, it can be considered that there is no shortage of resources in the business interface, and the performance optimization level can be L0. The corresponding performance optimization strategy is to retain all processing steps in the business interface so that the business requests are fully processed.

[0095] In actual applications, an application service generally does not have only one business interface, and the number of business interfaces in an application service may be multiple. Generally speaking, different business interfaces correspond to different businesses. However, the processing steps and their importance of different businesses are not exactly the same. When optimizing the performance of different business interfaces, the deleted steps and the number of deleted steps may be different. When optimizing the performance of a certain business interface to different degrees, the deleted steps and the number of deleted steps may also be different. In other words, the performance optimization strategies corresponding to the multiple performance optimization levels pre-stored in different business interfaces are not exactly the same. Therefore, after determining the performance optimization level, it is necessary to find the corresponding performance optimization strategy in each business interface.

[0096] Specifically, the above step S45 may include:

[0097] Step A1: Find the performance optimization level corresponding to the resource utilization parameter from the configuration file.

[0098] Among them, a plurality of resource utilization parameters and their corresponding performance optimization levels are pre-stored in the configuration file.

[0099] That is to say, in the application service, a configuration file is provided. In the configuration file, users can configure different resource utilization parameter intervals and their corresponding performance optimization levels according to the usage of the device and service interface. For example: 70% < CPU utilization ≤ 80% - performance optimization level L1, 70% < CPU utilization ≤ 80% - performance optimization level L2, CPU utilization > 80% - performance optimization level L3. After determining the resource utilization parameters of the device, you can find the performance optimization level corresponding to the resource utilization parameters in the configuration file. For example: determine that the CPU utilization is 75%, and determine the performance optimization level L1 through the configuration file.

[0100] Specifically, the above step S46 may include:

[0101] Step A2: Based on the found performance optimization level, find the corresponding performance optimization strategy in each service interface, and use the found performance optimization strategy as the performance optimization strategy of the corresponding service interface.

[0102] For different service interfaces, each service interface has multiple corresponding performance optimization strategies and their corresponding performance optimization levels. After the performance optimization level is determined by the resource utilization parameter, in each service interface, the corresponding performance optimization strategy can be found through the corresponding relationship between the performance optimization level and the performance optimization strategy, so as to use the performance optimization strategy to optimize the performance of the corresponding service interface.

[0103] S48: Optimize the processing steps in the service interface using a performance optimization strategy, so that the resources currently allocated to the service interface can be used by the service interface to process service requests.

[0104] For example, suppose an application service includes two services, Indicators Of Compromise (IOC) and IP reputation query. In the IOC interface, the following are preset: L1: turn off log generation for requests; L2: turn off log transmission; L3: turn off a custom intelligence library for hits. In the IP reputation query interface, the following are preset: L1: turn off log generation for requests; L2: turn off log transmission; L3: turn off whitelist query. In the application service, the following are also configured: 70% < CPU utilization ≤ 80% - L1, 70% < CPU utilization ≤ 80% - L2, CPU utilization > 80% - L3. When it is determined that the current CPU utilization of the device is 95%, the corresponding performance optimization level is determined to be L3, and then the performance optimization strategy corresponding to the IOC interface is determined to be: turn off a custom intelligence library for hits, and the performance optimization strategy corresponding to the IP reputation query interface is: turn off whitelist query.

[0105] In the service interface, there is a default performance optimization strategy at the beginning. The initial performance optimization strategy in the service interface can be determined according to the corresponding service type. For example, for the IP reputation query interface, since the query volume of IP is relatively large, the default performance optimization strategy can be L1. For the domain name query interface, since the query volume of domain name is relatively small, the default performance optimization strategy can be L2.

[0106] When it is determined that the number of business requests is large and that the current resource utilization of the device is tight, some processing steps in each business interface in the application service can be reduced to reduce the consumption of device resources when the business interface processes business requests. While ensuring that each business can proceed smoothly, there is no need to replace the device with better performance to provide more resources, thereby avoiding increasing the operating costs of the business.

[0107] After optimizing the performance of the service interface, the optimization results can be fed back to the user. The optimization results can include the results of successful optimization or failed optimization, as well as the specific optimization content of this time. In this way, the user can clearly know the current optimization status of the service interface and the specific processing status in the service interface through the optimization results.

[0108] After the performance of the service interface is optimized, the processing of the service interface can be further monitored to check whether the optimized service interface has reached the expected target. If it has, the monitoring is terminated; if it has not, the performance optimization of the service interface and the post-optimization monitoring are continued until it is determined that the optimized service interface has reached the expected target. The expected target here may refer to the ability of the service interface to normally process the currently received service request.

[0109] After the performance of the service interface is optimized, the amount of resources configured for the service interface can also be adjusted so that the service interface can fully utilize the device resources, avoid resource waste, and avoid the problem of insufficient resources after the performance of the service interface is optimized.

[0110] S49: Obtain the current processing performance parameters of the device.

[0111] The processing performance parameters here can be used to characterize the current processing status of the device for the service request. In practical applications, the processing performance parameters may include: the hit rate of the service request (the service request is specifically a query request), the response time of the service request, the delay time of the service request, the load of the device, the resource utilization rate of the device, etc.

[0112] The processing performance parameter can be obtained by sending a request to the device, or the device can be made to send the request at a preset time interval. The specific method for obtaining the processing performance parameter is not limited here.

[0113] S410: Based on the processing performance parameter, different resource amounts and / or cache data are allocated to the service interfaces in the virtual environment, so that the service interfaces run under different resource amounts and / or cache data.

[0114] The cached data is data in a database corresponding to the business interface whose query frequency is higher than a preset frequency. When the business interface performs a query based on a business request, the cached data has a higher priority than the database.

[0115] The virtual environment may refer to a scenario simulated in a virtual machine based on the actual operation of a device, that is, simulating the system scenario of the device and the processing process of a request, or simulating the actual processing performance parameters of the device.

[0116] In a virtual environment, each service interface has an originally configured resource amount. At this time, multiple different resource amounts are configured for each service interface. These configured resource amounts are different, some of which are higher than the originally configured resource amounts, and some are lower than the originally configured resource amounts. Then, the currently received service requests are run under different resource amounts of the service interface to view the running effect of the service requests.

[0117] Generally speaking, the services provided by the business interface are mainly query services. In order to improve query efficiency, on the basis of receiving a business request and calling the database for query, the hot data in the database (that is, data with high query frequency, specifically higher than the preset frequency) can be cached. In this way, subsequent queries for business requests can be queried in the cache first. The data in the cache has a high query frequency, and the probability of a business request hitting is relatively high. Once hit, the query efficiency can be improved. In addition, it can also reduce database calls and reduce the use of device resources.

[0118] Therefore, each business interface in the virtual environment also corresponds to different cache data. The cache data corresponding to each business interface is the hot data in the current corresponding database (the query data and frequency are different in different periods, and the hot data in the database is also constantly changing), or it is the data that is added or deleted based on the existing hot data. A business interface can correspond to multiple cache data, and each cache data may not be exactly the same. It can be cache data that is added or deleted based on one cache data. Then, the currently received business request is queried in the different cache data of the business interface to view the running effect of the business request.

[0119] Different amounts of resources and cache data simulated in a virtual environment may be simulated simultaneously or one by one, and the specific simulation may be determined based on the actual needs of business interface optimization.

[0120] S411: Obtain processing performance parameters of the service interface running under different resource amounts and / or cache data.

[0121] The service request is run under the resource volume and cache data provided by the service interface in the virtual environment, and after running, the corresponding processing performance parameters can be obtained. The processing performance parameters here are the same as the above processing performance parameters, and will not be repeated here.

[0122] S412: Determine whether the amount of resources and / or cache data corresponding to the optimal processing performance parameter is the same as the amount of resources and / or cache data currently allocated by the service interface. If so, execute S413; if not, execute S414.

[0123] For a service interface in a virtual environment, there are multiple resource amounts, which correspond to multiple processing performance parameters. The optimal processing performance parameter is selected from the multiple processing performance parameters, that is, the maximum parameter or the minimum parameter is selected according to the processing performance. For example, the processing performance parameter with the shortest response time and the highest hit rate is selected. If the processing performance parameter includes multiple specific parameters, a comprehensive selection is made.

[0124] For a service interface in a virtual environment, there are multiple cache data and multiple processing performance parameters. The optimal processing performance parameter is selected from the multiple processing performance parameters. The specific selection method is the same as the selection method under the above resource quantity, which will not be repeated here.

[0125] If the service interface in the virtual environment corresponds to multiple resource amounts and multiple cache data at the same time, multiple processing performance parameters can be obtained by combining the multiple resource amounts and the multiple cache data in different ways, so as to select the optimal processing performance parameters. The selection of the optimal processing performance parameters is the same as the selection method under the above-mentioned multiple resource amounts and multiple cache data, which will not be repeated here.

[0126] For the service interface in the device, resources and cache data are also configured in the initial stage. The resources and cache data corresponding to the optimal processing performance parameters selected in the virtual environment are most conducive to the service interface processing service requests. Therefore, it is necessary to check whether the resources and cache data currently configured for the service interface in the device are the same as the resources and cache data selected in the virtual environment. In this way, the service interface in the device uses the optimal resource configuration and cache data to improve the resource utilization efficiency and request processing efficiency.

[0127] S413: Maintain the current resource volume and / or cache data of the service interface unchanged.

[0128] The amount of resources and / or cache data corresponding to the optimal processing performance parameters determined from the virtual environment are the same as the amount of resources and / or cache data currently allocated to the business interface, indicating that the amount of resources and cache data currently configured for the business interface are already optimal, so there is no need to adjust the amount of resources and cache data for the business interface.

[0129] S414: configuring the resource amount and / or cache data corresponding to the optimal processing performance parameter on the service interface.

[0130] If the amount of resources and / or cache data corresponding to the optimal processing performance parameters determined from the virtual environment are different from the amount of resources and / or cache data currently allocated to the business interface, it means that the amount of resources and cache data currently configured for the business interface are not optimal. In this case, it is necessary to adjust the amount of resources and cache data of the business interface and configure the business interface with the amount of resources and / or cache data corresponding to the optimal processing performance parameters determined from the virtual environment.

[0131] After optimizing the service interface, that is, after the above step S48, the sending trend of the service request can also be predicted, so that the user can adjust the performance optimization strategy of the service interface according to the future trend of the service request, and further ensure the continuous smooth operation of the service interface.

[0132] S415: Obtain business requests received in the application service history.

[0133] Once an application service is put into use, it will continuously receive business requests. The so-called historically received business requests can be all business requests received from the beginning of use to the current time, or business requests received within a period of time before, for example: business requests received in the past month, business requests received in the past year.

[0134] S416: Analyze and display the service types and request quantities corresponding to the service requests received historically.

[0135] The service requests received historically may be classified according to service types, and the number of service requests corresponding to each service type may be counted.

[0136] When classifying multiple service requests according to service types, the multiple service requests may be classified according to the service interface to which the service requests are sent, or the service requests may be parsed to determine the specific service, thereby classifying the multiple service requests according to service types. The specific method of classifying multiple service requests according to service types is not limited here.

[0137] After the multiple business requests are classified according to the business type and the number of business requests corresponding to each business type is determined, each business type and its corresponding request number can be displayed to the user.

[0138] After users see each business type and its corresponding number of requests, they can determine which business has a large number of requests in history, and thus predict that these businesses will also have a large number of requests in the future. If the performance optimization strategy currently configured for a business interface is not suitable for a large number of business requests, users can adjust the performance optimization strategy in the business interface so that the adjusted performance optimization strategy can handle a large number of business requests with limited resources.

[0139] S417: Receive an adjustment instruction for a performance optimization strategy.

[0140] The adjustment instruction is generated based on the displayed business type and its request quantity.

[0141] The adjustment instruction may include the adjusted specific performance optimization strategy, or may include the adjustment content for the current performance optimization strategy. In this way, after receiving the adjustment instruction, the business interface can adjust its existing performance optimization strategy based on the adjustment instruction.

[0142] S418: Modify the current stored performance optimization strategy according to the adjustment instruction.

[0143] For a certain business interface, if it is predicted that it will receive a large number of business requests in the future, and the performance optimization strategy currently configured for the business interface is not sufficient to support a large number of business requests, then the adjustment instruction is to delete the performance optimization strategy of more processing steps, and then modify the highest level performance optimization strategy in the business interface based on the adjustment instruction to delete more processing steps. If it is predicted that it will only receive a small number of business requests in the future, and the performance optimization strategy currently configured for the business interface can support a large number of business requests, then the adjustment instruction is to retain the performance optimization strategy of more processing steps, and then modify the lowest level performance optimization strategy in the business interface based on the adjustment instruction to add some processing steps.

[0144] After optimizing the service interface, that is, after the above step S48, the resource consumption of the service interface can be further reduced when processing service requests, that is, by at least one of whitelist query and cache data query.

[0145] S419: Obtain the query request received by the application service.

[0146] Generally speaking, the services provided by application services are mainly used for query, such as IP reputation query, domain name query, IOC detection, etc. Therefore, the service request may include a query request.

[0147] After receiving the query request, the application service can intercept the query request received by the application service to obtain the query request received by the application service, or the application service can proactively submit the query request it received without querying based on the query request. The specific operations of intercepting, not executing the query, and proactively submitting are prior art and will not be described in detail here.

[0148] It should be noted here that when multiple query requests are received at one time and the business interface cannot process all the received query requests at one time, for each query request, the business type can be determined from the query request, and then the priority corresponding to the business type can be determined, so that query requests corresponding to high-priority business types can be processed first.

[0149] S420: Determine whether the query request is authorized. If yes, execute S421, if no, execute S422.

[0150] When making authorization judgments, you can check whether the certificate in the query request is consistent with the authorized certificate, which can improve the efficiency of authorization judgments. You can also ask the user to send the authorization certificate again to determine whether the authorization certificate sent by the user is consistent with the authorized certificate. This can avoid the step of searching for the certificate in the request, improve the efficiency of authorization judgments, and avoid using non-certificate data in the request as a certificate, thereby improving the accuracy of authorization judgments.

[0151] S421: Determine whether the query content in the query request matches the whitelist. If yes, execute S423; if no, execute S424.

[0152] The whitelist stores query contents that have been confirmed to be safe.

[0153] The query content here may refer to the object that the user needs to query whether it is safe, such as IP, domain name, etc.

[0154] The query content is extracted from the query request, and then compared with each query content in the whitelist that has been confirmed to be safe. If the query content in the query request is consistent with a query content in the whitelist, the match is determined to be successful. If the query content in the query request is inconsistent with all query contents in the whitelist, the match is determined to have failed.

[0155] It should be noted here that for multi-condition query, that is, it is necessary to query according to multiple query contents in the query request, only when each query content in the query request is consistent with the query content in the whitelist, it is determined that the match is successful.

[0156] S422: The query request is rejected.

[0157] If the query request is judged to be unauthorized, it means that the query is an illegal query and needs to be rejected, and the user who sent the query request should be paid special attention.

[0158] S423: Make the query request skip the application service, and feedback that the query content in the query request is safe.

[0159] If the query content matches the whitelist, it means that the query content is safe. There is no need to query in the business interface. You can directly provide feedback to the user that the query content is safe. This can avoid querying in the business interface and reduce the occupation of device resources by the business interface.

[0160] S424: Query the cache data of the business interface corresponding to the application service based on the query request.

[0161] The cached data is data in the database corresponding to the business interface that has a query frequency higher than a preset frequency.

[0162] The query content does not match the whitelist, which means that the security of the query content is unknown and the query request needs to be queried through the business interface.

[0163] The queries corresponding to the business interface include cache queries and database queries. Whether in the cache or in the database, there is content that has been determined to be unsafe. When a query request is made through the business interface, the query content in the query request is first queried in the cache data. If the query is found, a prompt message indicating that the query content is unsafe is fed back to the user. If the query is not found, the corresponding database is called for query. If the query is found, a prompt message indicating that the query content is unsafe is fed back to the user. If the query is not found, a prompt message indicating that the query content is safe is fed back to the user.

[0164] For cache query, the cache stores the current hot data in the database. The amount of data in the cache is small, the query does not need to call the database (reducing disk I / O operations), and the hot data is the data with high query frequency. Therefore, while improving the search efficiency and reducing the resource consumption of the business interface, it can also ensure that the data fed back to the user is the latest and most accurate.

[0165] It should be noted here that for the above steps S420-S424, in each step of processing the query request, the processing results, especially the abnormal results, can also be fed back to the user. For example: when performing authorization verification on the query request, if it is determined that it is not authorized, a prompt message that the query request is not authorized is fed back to the user to prompt the user to confirm whether the query request generates an error, so that the authorized user can subsequently resend the authorized query request to ensure that the query can proceed smoothly. Another example: when using a query request to query in a cache or database, if there is a key error or a parameter error, a prompt message that the key error or the parameter error is fed back to the user to prompt the user to confirm whether there is a problem with the query request, so that the user can subsequently resend the correct query request to ensure that the query can proceed smoothly.

[0166] Finally, it should be noted that all or part of the above steps S41-S424 can be implemented by a dynamic strategy optimization algorithm (DSOA) built into the application service. Of course, it can also be implemented by other algorithms that can achieve corresponding functions.

[0167] At this point, the service interface performance optimization method provided in the embodiment of the present application has been fully described.

[0168] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application also provides a service interface performance optimization device.

[0169] Figure 5 The structure of the service interface performance optimization device in the embodiment of the present application is shown in FIG. Figure 1 , see Figure 5 As shown, the device may include: an acquisition module 51, a determination module 52 and an optimization module 53. The acquisition module 51, the determination module 52 and the optimization module 53 are connected in sequence.

[0170] The acquisition module 51 is used to acquire the current resource utilization parameters of the device where the application service is located.

[0171] The determination module 52 is used to determine the performance optimization strategy corresponding to the business interface in the application service according to the resource utilization parameter, wherein the performance optimization strategy includes the retention of each processing step of the business interface for the business request or the deletion of the corresponding processing steps.

[0172] The optimization module 53 is used to optimize the processing steps in the service interface by adopting the performance optimization strategy, so that the resources currently allocated to the service interface can be used by the service interface to process service requests.

[0173] Furthermore, as a Figure 5 As a refinement and extension of the device shown, an embodiment of the present application also provides a service interface performance optimization device.

[0174] Figure 6 The structure of the service interface performance optimization device in the embodiment of the present application is shown in FIG. Figure 2 , see Figure 6 As shown, the device may include: an acquisition module 61, a determination module 62, an optimization module 63, a resource adjustment module 64, a policy adjustment module 65 and a request processing module 66. The acquisition module 61, the determination module 62, the optimization module 63 and the resource adjustment module 64 are connected in sequence. The policy adjustment module 65 is connected to the optimization module 63, and the request processing module 66 is connected to the optimization module 63.

[0175] The acquisition module 61 includes: a quantity acquisition unit 611, a quantity judgment unit 612 and a parameter determination unit 613. The quantity acquisition unit 611, the quantity judgment unit 612 and the parameter determination unit 613 are connected in sequence.

[0176] The quantity acquisition unit 611 is used to acquire the quantity of business requests currently received by the application service.

[0177] The quantity determination unit 612 is used to determine whether the quantity of the service requests exceeds a preset quantity. If so, the process proceeds to the parameter determination unit 613.

[0178] The parameter determination unit 613 is used to determine the current resource utilization parameter of the device according to the number of the service requests, wherein the resource utilization parameter is positively correlated with the number.

[0179] The determination module 62 includes: a level determination module 621, a policy search module 622 and a policy determination module 623. The level determination module 621, the policy search module 622 and the policy determination module 623 are connected in sequence.

[0180] The level determination module 621 is used to determine the performance optimization level of the service interface according to the resource utilization parameter.

[0181] When there are multiple business interfaces and the performance optimization strategies corresponding to the multiple performance optimization levels pre-stored in different business interfaces are not exactly the same, the level determination module 621 is specifically used to search the performance optimization level corresponding to the resource utilization parameter from the configuration file, wherein the configuration file pre-stores multiple resource utilization parameters and their corresponding performance optimization levels.

[0182] The policy search module 622 is used to search the service interface for the performance optimization policy corresponding to the performance optimization level, wherein the service interface pre-stores a plurality of performance optimization levels and their corresponding performance optimization policies.

[0183] The policy search module 622 is specifically used to search for a corresponding performance optimization policy in each service interface based on the found performance optimization level, and use the found performance optimization policy as the performance optimization policy of the corresponding service interface.

[0184] The policy determination module 623 is used to use the found performance optimization policy as the performance optimization policy corresponding to the business interface in the application service.

[0185] The optimization module 63 is used to optimize the processing steps in the service interface by adopting the performance optimization strategy, so that the resources currently allocated to the service interface can be used by the service interface to process service requests.

[0186] The resource adjustment module 64 includes: a first acquisition unit 641, a simulation unit 642, a second acquisition unit 643, a resource judgment unit 644 and a resource configuration unit 645. The first acquisition unit 641, the simulation unit 642, the second acquisition unit 643, the resource judgment unit 644 and the resource configuration unit 645 are connected in sequence.

[0187] The first acquisition unit 641 is used to acquire the current processing performance parameters of the device.

[0188] The simulation unit 642 is used to allocate different resource amounts and / or cache data to the business interfaces respectively in a virtual environment based on the processing performance parameters, so that the business interfaces operate under different resource amounts and / or cache data respectively, wherein the cached data is data in a database corresponding to the business interface that has a query frequency higher than a preset frequency, and when the business interface queries based on a business request, the cached data has a higher priority than the database.

[0189] The second acquisition unit 643 is used to acquire the processing performance parameters of the service interface running under different resource amounts and / or cache data.

[0190] The resource determination unit 644 is used to determine whether the resource amount and / or cache data corresponding to the optimal processing performance parameter is the same as the resource amount and / or cache data currently allocated by the service interface. If not, the process proceeds to the resource configuration unit 645.

[0191] The resource configuration unit 645 is used to configure the resource amount and / or cache data corresponding to the optimal processing performance parameter on the service interface.

[0192] The strategy adjustment module 65 includes: a history acquisition unit 651, an analysis and display unit 652, an instruction receiving unit 653 and a strategy modification unit 654. The history acquisition unit 651, the analysis and display unit 652, the instruction receiving unit 653 and the strategy modification unit 654 are connected in sequence.

[0193] The history acquisition unit 651 is used to acquire the business requests received in the application service history.

[0194] The analysis and display unit 652 is used to analyze and display the service types and request quantities corresponding to the service requests received historically.

[0195] The instruction receiving unit 653 is used to receive an adjustment instruction of the performance optimization strategy, wherein the adjustment instruction is generated based on the displayed business type and the request quantity thereof.

[0196] The policy modification unit 654 is used to modify the currently stored performance optimization policy according to the adjustment instruction.

[0197] The request processing module 66 includes: a request acquisition unit 661, an authorization judgment unit 662, a whitelist judgment unit 663, a feedback unit 664 and a query unit 665. The request acquisition unit 661, the authorization judgment unit 662, the whitelist judgment unit 663 and the feedback unit 664 are connected in sequence, and the query unit 665 is connected to the whitelist judgment unit 663.

[0198] The request acquisition unit 661 is used to acquire the query request received by the application service.

[0199] The authorization judgment unit 662 is used to judge whether the query request is authorized. If it is authorized, it enters the whitelist judgment unit 663.

[0200] The whitelist determination unit 663 is used to determine whether the query content in the query request matches the whitelist, wherein the whitelist stores query content that has been confirmed to be safe. If it matches, it enters the feedback unit 664, and if it does not match, it enters the query unit 665.

[0201] The feedback unit 664 is configured to enable the query request to skip the application service and to provide feedback indicating that the query content in the query request is safe.

[0202] The query unit 665 is used to query the cache data of the business interface corresponding to the application service based on the query request, wherein the cache data is data in the database corresponding to the business interface with a query frequency higher than a preset frequency.

[0203] It should be noted here that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0204] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.

[0205] Figure 7 This is a schematic diagram of the structure of the electronic device in the embodiment of the present application, see Figure 7 As shown, the electronic device may include: a processor 71, a memory 72, and a bus 73; wherein the processor 71 and the memory 72 communicate with each other via the bus 73; the processor 71 is used to call program instructions in the memory 72 to execute the methods in one or more of the above embodiments.

[0206] It should be noted that the description of the above electronic device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the electronic device embodiment of this application, please refer to the description of the method embodiment of this application for understanding.

[0207] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, which may include: a stored program; wherein, when the program is running, the device where the storage medium is located is controlled to execute the method in one or more of the above embodiments.

[0208] It should be noted here that the description of the above storage medium embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the storage medium embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0209] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for optimizing service interface performance, characterized in that: The method comprises: Get the current resource utilization parameters of the device where the application service is located; Determining a performance optimization strategy corresponding to the business interface in the application service according to the resource utilization parameter, wherein the performance optimization strategy includes retaining each processing step of the business interface for the business request or deleting the corresponding processing steps; The performance optimization strategy is adopted to optimize the processing steps in the service interface so that the resources currently allocated to the service interface can be used by the service interface to process service requests.

2. The method according to claim 1, characterized in that The obtaining of the current resource utilization parameters of the device where the application service is located includes: Obtain the number of business requests currently received by the application service; A current resource utilization parameter of the device is determined according to the number of the service requests, wherein the resource utilization parameter is positively correlated with the number.

3. The method according to claim 2, characterized in that Before determining the current resource utilization parameter of the device according to the number of the service requests, the method further includes: Determining whether the number of the service requests exceeds a preset number; If yes, then a step of determining the current resource utilization parameter of the device according to the number of the service requests is performed.

4. The method according to claim 1, characterized in that: The determining, according to the resource utilization parameter, a performance optimization strategy corresponding to the business interface in the application service comprises: Determining a performance optimization level of the service interface according to the resource utilization parameter; Searching the service interface for a performance optimization strategy corresponding to the performance optimization level, wherein the service interface pre-stores a plurality of performance optimization levels and their corresponding performance optimization strategies; The found performance optimization strategy is used as the performance optimization strategy corresponding to the business interface in the application service.

5. The method according to claim 4, characterized in that There are multiple service interfaces, and the performance optimization strategies corresponding to the multiple performance optimization levels pre-stored in different service interfaces are not completely the same; determining the performance optimization level of the service interface according to the resource utilization parameter includes: Searching for the performance optimization level corresponding to the resource utilization parameter from a configuration file, wherein the configuration file pre-stores a plurality of resource utilization parameters and their corresponding performance optimization levels; The searching the service interface for a performance optimization strategy corresponding to the performance optimization level includes: Based on the found performance optimization level, the corresponding performance optimization strategy is searched in each business interface, and the found performance optimization strategy is used as the performance optimization strategy of the corresponding business interface.

6. The method according to any one of claims 1 to 5, characterized in that After optimizing the processing steps in the service interface using the performance optimization strategy, the method further includes: Obtaining current processing performance parameters of the device; Based on the processing performance parameters, different resource amounts and / or cache data are allocated to the service interfaces in the virtual environment, so that the service interfaces run under different resource amounts and / or cache data, respectively, wherein the cache data is data in a database corresponding to the service interface with a query frequency higher than a preset frequency, and when the service interface queries based on a service request, the cache data has a higher priority than the database; Obtaining processing performance parameters of the service interface running under different resource amounts and / or cache data; Determine whether the amount of resources and / or cache data corresponding to the optimal processing performance parameter is the same as the amount of resources and / or cache data currently allocated to the service interface; If not, the resource amount and / or cache data corresponding to the optimal processing performance parameter is configured on the service interface.

7. The method according to any one of claims 1 to 5, characterized in that After optimizing the processing steps in the service interface using the performance optimization strategy, the method further includes: Obtaining business requests received historically by the application service; Analyze and display the business types and request quantities corresponding to the business requests received historically; Receiving an adjustment instruction of a performance optimization strategy, wherein the adjustment instruction is generated based on the displayed service type and the number of requests thereof; The currently stored performance optimization strategy is modified according to the adjustment instruction.

8. The method according to any one of claims 1 to 5, characterized in that The service request includes a query request; after optimizing the processing steps in the service interface using the performance optimization strategy, the method further includes: Obtaining a query request received by the application service; Determining whether the query request has been authorized; If authorized, determining whether the query content in the query request matches a whitelist, wherein the whitelist stores query content that has been confirmed to be safe; If there is a match, the query request skips the application service and feedback is given that the query content in the query request is safe; If there is no match, a query is performed in cache data of the business interface corresponding to the application service based on the query request, wherein the cache data is data in a database corresponding to the business interface with a query frequency higher than a preset frequency.

9. A service interface performance optimization device, characterized in that: The device comprises: The acquisition module is used to obtain the current resource utilization parameters of the device where the application service is located; A determination module, used to determine the performance optimization strategy corresponding to the business interface in the application service according to the resource utilization parameter, wherein the performance optimization strategy includes the retention of each processing step of the business interface for the business request or the deletion of the corresponding processing step; The optimization module is used to optimize the processing steps in the service interface by adopting the performance optimization strategy so that the resources currently allocated to the service interface can be used by the service interface to process service requests.

10. An electronic device, characterized in that: The electronic device comprises: a processor, a memory, and a bus; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute the method as claimed in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The storage medium comprises: a stored program; wherein, when the program is running, the device where the storage medium is located is controlled to execute the method as claimed in any one of claims 1 to 8.