Resource allocation method of business system production environment, related hardware and program product

By pairing request packets and response packets for traffic in the production environment and playback environment of the business system, determining the target resource configuration plan, optimizing the resource configuration of the business system, solving the performance problems caused by insufficient resource allocation, and achieving more efficient system operation.

CN119849819APending Publication Date: 2025-04-18CHINA TOWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411908430.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

How to optimize the resource configuration of business systems to improve system performance.

Method used

By classifying and pairing the target traffic in the production environment and playback environment of the business system, we determine the target production request package and the target playback request package that are aligned with each other. Based on the performance data and resource status of these packages, we determine the target resource configuration scheme for the production environment, and configure the production environment according to this scheme.

Benefits of technology

It has achieved optimization of resource allocation in the production environment of the business system, improved system performance, and can dynamically adjust resource allocation according to actual needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849819A_ABST
    Figure CN119849819A_ABST
Patent Text Reader

Abstract

The invention provides a resource allocation method for a service system production environment, related hardware and a program product. The method comprises the following steps: carrying out classified pairing of request packets and response packets on target traffic in a production environment of a service system to obtain paired production request packets and production response packets; and performing playback on the target traffic in the playback environment, and performing classification pairing of the request packet and the response packet to obtain the paired playback request packet and playback response packet. And aligning the paired production request packet with the paired playback request packet. Selecting a target production request packet and a target playback request packet which are aligned, based on the resource state of the production environment corresponding to the target production request packet, the processing performance reflected by the target production request packet and the paired production response packet, the resource state of the playback environment corresponding to the target playback request packet, and the processing performance reflected by the target playback request packet and the paired playback response packet, the processing performance of the production environment corresponding to the target production request packet; and determining a target resource configuration scheme of the production environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data management technology, and in particular to a resource configuration method for a business system production environment, and related hardware and program products. Background Art

[0002] The high-performance operation of business systems is crucial to enterprises. The resource allocation of business systems is a major factor in determining system performance.

[0003] Therefore, how to optimize the resource allocation of the business system is a technical problem to be solved by this application. Summary of the invention

[0004] The purpose of this application is to provide a resource configuration method for a business system production environment, related hardware and program products, which can reasonably adjust the resource configuration of the business system production environment.

[0005] In order to achieve the above purpose, the embodiment of the present application is implemented as follows: First, we propose resource configuration methods for the business system production environment, including: Classify and pair the request packets and response packets of the target traffic in the production environment of the business system to obtain paired production request packets and production response packets; Replay the target traffic in the playback environment of the business system, and classify and pair the request packet and the response packet to obtain a paired playback request packet and a playback response packet; Aligning the paired production request packet with the paired playback request packet; Selecting a target production request packet and a target playback request packet that are aligned with each other, so as to determine a target resource configuration scheme for the production environment based on the resource status of the production environment corresponding to the time window to which the target production request packet belongs, the processing performance reflected by the target production request packet and the paired production response packet, the resource status of the playback environment corresponding to the time window to which the target playback request packet belongs, and the processing performance reflected by the target playback request packet and the paired playback response packet; The production environment is resource configured according to the target resource configuration plan.

[0006] In a second aspect, a resource configuration device for a business system production environment is provided, comprising: The first matching module is used to classify and match the request packets and response packets of the target traffic in the production environment of the business system to obtain the paired production request packets and production response packets; A second matching module is used to replay the target traffic in the playback environment of the business system, and classify and match the request packet and the response packet to obtain a paired playback request packet and a playback response packet; A packet alignment module, used for aligning a paired production request packet with a paired playback request packet; A configuration generation module, used for selecting mutually aligned target production request packets and target playback request packets, so as to determine a target resource configuration scheme for the production environment based on the resource status of the production environment corresponding to the time window to which the target production request packet belongs, the processing performance reflected by the target production request packet and the paired production response packet, the resource status of the playback environment corresponding to the time window to which the target playback request packet belongs, and the processing performance reflected by the target playback request packet and the paired playback response packet; A configuration execution module is used to perform resource configuration on the production environment according to the target resource configuration scheme.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to execute the method described in the first aspect.

[0008] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the method described in the first aspect.

[0009] The request packets and response packets of the target traffic in the production environment of the business system are classified and matched to obtain paired production request packets and production response packets, and the target traffic is replayed in the playback environment of the business system, and the request packets and response packets are classified and matched to obtain paired playback request packets and playback response packets; thereafter, the paired production request packets are aligned with the paired playback request packets to select the aligned target production request packets and target playback request packets, so as to determine the target resource allocation scheme for the production environment based on the resource status of the production environment corresponding to the time window to which the target production request packet belongs, the processing performance reflected by the target production request packet and the paired production response packet, the resource status of the playback environment corresponding to the time window to which the target playback request packet belongs, and the processing performance reflected by the target playback request packet and the paired playback response packet, so as to configure resources for the production environment according to the target resource allocation scheme. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0011] Figure 1 A flowchart of a method for configuring resources in a business system production environment according to an embodiment of the present application.

[0012] Figure 2 Schematic diagram of traffic collection comparison between the generation environment and the playback environment of an embodiment of the present application.

[0013] Figure 3 This is a schematic diagram of the alignment of a production request packet and a playback request packet according to an embodiment of the present application.

[0014] Figure 4 A schematic diagram of the structure of a resource configuration device for a business system production environment according to an embodiment of the present application.

[0015] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0016] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0017] This application proposes a resource configuration method for a business system production environment. Figure 1 It is a flowchart of the resource configuration method, which includes the following steps: S102, classify and pair request packets and response packets of target traffic in the production environment of the business system to obtain paired production request packets and production response packets.

[0018] In this embodiment, the target traffic comes from real production network requests. The control center can call the collection proxy service to capture network traffic within a specified time range on the host where each application node is located, generate production environment network traffic data packets, and stop collecting at the end of the specified time.

[0019] After capturing the target traffic data packets, start parsing and reassembling the data packets. Take a captured data packet as an example: First, load the data packet file, read each data packet separately according to the TCP protocol, and obtain the source IP, source port, destination IP, and destination port of each data packet, record them as four-tuples, and the same four-tuple is the same TCP data stream. By parsing and recording the request and response of the same data stream together, the request and response are distinguished by taking the server IP port as the target IP port for the request and the server IP port wield source IP port as the response.

[0020] Secondly: Considering that an http request may be transmitted multiple times in fragments, and there may be a disordered order, it is necessary to splice it with the ACK and SEQ of the TCP data packet, and check the delimiter "\r\n\r\n" of the spliced ​​http request header each time, and record the byte position of the delimiter. After finding the delimiter, it means that the http file header is complete. At the same time, get "Content-Length" or Transfer-Encoding: chunked to ensure that the end of a request can be fully obtained. The response header of the obtained response contains Content-Length, Transfer-Encoding: chunked, connection closed, multipart, or directly through HTTP / 2's END_STREAM, etc. to mark the end of a complete response. The above method can complete the reorganization of fragmented http.

[0021] Again: obtain the timestamp of the HTTP request or the first timestamp of the reassembled fragment and record it as the start time of the HTTP request. Obtain the timestamp of the response or the last timestamp of the reassembled fragment and record it as the end time of the HTTP response, which will be used for the subsequent calculation of the request response time.

[0022] Data packet request response pairing: A four-tuple is a TCP data stream. When a complete HTTP request is not completed, the response transmission of the same connection will not start. In the same TCP data stream, requests and responses appear in pairs. At this time, the HTTP connection request and response can be paired, and the HTTP request response pairing can be completed.

[0023] To distinguish from the subsequent playback environment, the present embodiment defines the request packet and response packet in the production environment as a production request packet and a production response packet, respectively. The pairing is to determine the processing performance (such as processing delay) reflected by the production request packet and the production response packet.

[0024] Taking processing delay as an example, this embodiment extracts and stores key information of HTTP data packets for subsequent performance analysis. The extracted information includes: HTTP timestamp (mentioned when the above data packet is reassembled), HTTP request type (such as GET, POST, etc.), request URL (and separates the URL parameters of the GET request), the timestamp of the last data packet sent in the HTTP response, the response status code and other information.

[0025] The response time of each HTTP request can be calculated by extracting the timestamp, which is the timestamp of the response data packet minus the timestamp of the request data packet. The calculated request time is associated with the corresponding request URL to generate the response time of each request. By analyzing this data, the processing delay of the request can be evaluated. In addition, the response status code of each HTTP request can be counted to understand whether the request is successful (such as status code 200) or an error occurs (such as status code 404 or 500). Through the comprehensive analysis of request information, request time and response status code, performance bottlenecks, abnormal requests and other problems can be identified, providing data support for optimizing applications.

[0026] S104, replaying the target traffic in the playback environment of the business system, and classifying and pairing the request packet and the response packet to obtain paired playback request packet and playback response packet.

[0027] Similarly, to distinguish from the production environment described above, this embodiment defines the request packet and response packet in the playback environment as playback request packet and playback response packet, respectively. The pairing is to determine the processing performance (such as processing delay) reflected by the playback request packet and the playback response packet.

[0028] Among them, the pairing of request packets and response packets, information extraction, determination of processing performance (processing latency), etc. can be referred to the production environment, and will not be repeated in this article.

[0029] It should be noted that the playback environment is provided with the same service nodes as the production environment, and the resource configuration of the service nodes of the playback environment is different from that of the production environment. This embodiment can determine the optimization solution for the resource configuration of the production environment by comparing the resource configuration of the two environments and the processing performance reflected by the paired request packets and responses.

[0030] Figure 2The figure shows the traffic collection comparison between the production environment and the playback environment. The production environment will distribute the request packets to the lower-level business nodes (App Node) through the network agent node (Net Agent) according to some complex scheduling strategies (such as load balancing). The collection of its traffic packets is to call the collection agent service on the host where each node of the application is located within a specified time range through the control center to capture the network traffic, generate the production environment network traffic data packet, and stop the collection at the end of the specified time.

[0031] The settings of the playback environment can be simplified appropriately. Here, the nginx proxy created in the playback environment of this embodiment sends the corresponding playback request packet to the business node in the playback environment through the nginx proxy to simulate the target traffic, and obtains the corresponding playback response packet from the business node in the playback environment based on the nginx proxy. Compared with the network traffic collection in the production environment, the nginx proxy concentrates the network traffic of the playback environment on the same host. When capturing the network traffic of the playback environment, there is no need to deploy the traffic collection service separately on each application node as in production. Instead, the network traffic collection tool is completed in advance on the host where the nginx proxy is located, and the collection of multiple data packets is realized through the dynamic configuration of the program. Solve the pain point that the collection of playback environment traffic needs to be deployed multiple times on different hosts of each node of the playback service.

[0032] S106: Align the paired production request packet with the paired playback request packet.

[0033] The basic principle of alignment is to find the matching playback request packet based on the characteristic information in the production request packet, such as path information path, query parameter information query and source port information srcport.

[0034] In practical applications, this embodiment may introduce a baseline of a time dimension for assistance based on the alignment of feature information.

[0035] refer to Figure 3 As shown, it is assumed that the current production request packet to be aligned is the Nth (N is a positive integer), that is, packetN.

[0036] If N is greater than 1, determine the time difference between the Nth production request packet and the N-1th production request packet, and determine the time threshold based on the time difference; and select from all the playback request packets to be aligned a playback request packet that matches the feature information in the Nth production request packet and whose time difference from the last aligned playback request packet does not exceed the time threshold, and use the selected playback request packet as the playback request packet aligned with the Nth production request packet.

[0037] If N=1, a playback request packet matching the characteristic information in the Nth production request packet is selected from all the playback request packets to be aligned, and the selected playback request packet is used as the playback request packet aligned with the Nth production request packet.

[0038] That is, when this embodiment aligns the playback request packet with the current Nth round of production request packets, if the Nth round is not the first round, an approximate time threshold is estimated based on the time difference between the Nth production request packet and the N-1th production request packet (the difference between the timestamps of the two). The time threshold is slightly larger than the time difference and can be set to M times the time difference but not more than X seconds. Subsequently, the time threshold is used as a baseline to quickly find the playback request packets within the time threshold and with matching feature information for alignment.

[0039] The specific steps for implementing the above alignment are as follows: 1) Input data: Read the paired request data of the production environment and the playback environment respectively, and store them in two data packets production_df (production environment data packet) and back_df (playback environment data packet). Each data packet contains information such as HTTP request processing delay (response time), HTTP request type (such as GET, POST, etc.), request path, parameters, timestamp, etc.

[0040] 2) Traffic data packet request grouping: In the process of realizing request alignment, if the requests in the traffic data packets of the production environment are traversed in the playback environment according to the timestamps and aligned one by one, if the same path, query and srcport appear in the early stage of the playback environment and later, this will cause the request alignment of the two environments to be wrong, thus affecting the performance analysis.

[0041] In order to solve the problem of request alignment errors, the requests are divided into two tuples for alignment. First, the production environment traffic data packets are grouped, and then read cyclically according to the timestamps to extract the information of the current data packet and the previous data packet to be aligned (path, query, srcport). That is, packet1 and packet2 are grouped together, packet2 and packet3 are grouped together, and so on to complete the two-tuple grouping.

[0042] 3) Time threshold setting: Based on the grouped binary, the time difference between two adjacent requests, time_diff_production, is calculated. This time difference will be used as the time threshold (time_threshold) for subsequent matching requests. The time threshold here is set to M times the time difference, with a maximum of N seconds, that is, Min{M * time_diff_production, N seconds} is taken to ensure that the time difference of the matching request is not too large or too small, so as to accurately match the request in the playback data packet without missing any.

[0043] 4) Alignment of playback environment requests: For each pair of adjacent requests in the production environment, the playback request corresponding to the production request will be found in back_df based on the path (Path) + query parameter (Query) + source port (Src_Port). To ensure the accuracy of the alignment, set the back_match_times list to record the request time of the latest completed alignment in the playback environment data packet. If it is the first alignment, that is, looking for the request for packet1 alignment in the playback data packet, and back_match_times is empty at this time, then the request with the earliest time in the playback environment is selected as the alignment object, and the time of the request is recorded and placed in back_match_times. Then, for subsequent alignment, that is, there is already an aligned playback request (the time is stored in the back_match_times list), the difference between the new playback request and the latest matched request time (that is, the latest request time in back_match_times) will be calculated, and the difference will be checked to see if it is within the threshold range, and the playback request with the smallest time difference will be selected for alignment.

[0044] If a playback request that meets the conditions is found, the program will record the matching result in the aligned_data dictionary. At this time, all relevant information in the production and playback environments (such as path, query parameters, port, timestamp, time difference, etc.) will be saved, and the back_match_times list will be updated to record the latest playback request time. After a successful match, the matched playback request will be removed from back_df to ensure that subsequent matches will not reuse the same playback request. If no playback request that meets the conditions is found, the program will mark the match as failed and record the corresponding failure information (such as "No match found") in aligned_data.

[0045] The core principle of the above alignment is: first, binary division to ensure an accurate baseline for request alignment; second, time difference matching. This algorithm is based on the time difference of adjacent requests in the production environment, and searches for requests that match this time difference in the playback environment for matching. By setting a dynamic time threshold (time_threshold), the program can ensure that the time difference between matching requests is not too large, and can adapt to latency fluctuations under different network conditions; third, dynamic update, designing the time storage list back_match_times, each time an alignment request is found, the time of the alignment request will be recorded and used in the alignment process of the next request pair to ensure that subsequent time matching is more accurate; finally, deduplication in the playback environment, each time an aligned playback request is found, the request will be removed from back_df to ensure that a playback request will only be aligned to one production request, avoiding the occurrence of duplicate request alignment.

[0046] S108, select the target production request package and the target playback request package that are aligned with each other to determine the target resource configuration plan for the production environment based on the resource status of the production environment corresponding to the time window to which the target production request package belongs, the processing performance reflected by the target production request package and the paired production response package, the resource status of the playback environment corresponding to the time window to which the target playback request package belongs, and the processing performance reflected by the target playback request package and the paired playback response package.

[0047] Based on the foregoing, it can be seen that this embodiment can determine an optimization solution for resource configuration of the production environment by comparing the resource configurations of the two environments and the processing performance reflected by the respective paired request packets and responses.

[0048] For example, when the processing performance reflected by the target production request packet and the corresponding production response packet does not meet the first preset requirement, and the processing performance reflected by the target playback request packet and the corresponding playback response packet meets the second preset requirement, the resource status of the production environment corresponding to the time window to which the target production request packet belongs is compared with the resource status of the playback environment corresponding to the time window to which the target playback request packet belongs, and the target resource item of the playback environment is determined to be higher than that of the production environment, and a resource configuration plan is determined to increase the target resource item of the production environment configuration.

[0049] In actual applications, after completing the alignment of the production environment and playback environment data packets, the processing delays of the request path URLs of the two environments are calculated respectively. At the same time, combined with the performance data of the server and database (such as CPU, memory, number of waiting connections during the collection period), the requests with large processing delays are analyzed, and the correlation coefficients between the processing delay value and various performance data (CPU, memory, database) and the correlation coefficients between the abnormal delay ratio and various performance data are calculated. If the correlation coefficient between the abnormal ratio and the CPU utilization is high (such as above 0.65), it means that when the CPU load increases, the proportion of abnormal requests also increases. This indicates that the system may have a processing capacity bottleneck under high load, resulting in slower request processing. It is necessary to reasonably configure server resources or optimize the system architecture.

[0050] Requests are classified based on the path URL into four categories: api_post, static resource, api_get, and other. After the data packets of the two environments are classified, the application request information with large processing delay in each category is obtained. By comparing the exception ratios of different request types, it is found that some types of requests (such as database query and file upload) are more susceptible to resource load, resulting in more exceptions, which helps to locate specific business function bottlenecks and determine the target resource configuration plan that meets the current production environment.

[0051] S110, configuring resources for the production environment according to the target resource configuration plan.

[0052] In this embodiment, the same service nodes as those in the production environment are set in the playback environment, and the target resource configuration scheme can be used to adjust the resource configuration of the service nodes in the production environment.

[0053] It should be noted that the above is only used to exemplify the method of this embodiment. Among them, the processing performance is not limited to the processing delay, but can also be comprehensively considered according to factors such as the processing result and the cost of load imbalance caused by the processing. In addition, the resource items that can be adjusted can be computing resources, storage resources, bandwidth resources, etc., which are not specifically limited in this article.

[0054] In addition, corresponding to Figure 1 Another embodiment of this embodiment further provides a resource configuration device for a business system production environment. Figure 4 4 is a schematic diagram of the structure of the resource configuration device 400, including: The first matching module 410 is used to classify and match request packets and response packets of target traffic in the production environment of the business system to obtain paired production request packets and production response packets.

[0055] The second matching module 420 is used to replay the target traffic in the playback environment of the business system, and classify and pair the request packet and the response packet to obtain the paired playback request packet and playback response packet.

[0056] The packet alignment module 430 is used to align the paired production request packet with the paired playback request packet.

[0057] The configuration generation module 440 is used to select mutually aligned target production request packages and target playback request packages to determine the target resource configuration scheme for the production environment based on the resource status of the production environment corresponding to the time window to which the target production request package belongs, the processing performance reflected by the target production request package and the paired production response package, the resource status of the playback environment corresponding to the time window to which the target playback request package belongs, and the processing performance reflected by the target playback request package and the paired playback response package.

[0058] The configuration execution module 450 is used to perform resource configuration on the production environment according to the target resource configuration solution.

[0059] Optionally, the packet alignment module 430 aligns the paired production request packet with the paired playback request packet, including: selecting the Nth production request packet according to the order in which the alignment is performed, where N is a positive integer; if N is greater than 1, determining the time difference between the Nth production request packet and the N-1th production request packet, and determining the time threshold based on the time difference; and selecting a playback request packet that matches the feature information in the Nth production request packet from all the playback request packets to be aligned, and whose time difference from the last aligned playback request packet does not exceed the time threshold, and using the selected playback request packet as the playback request packet aligned with the Nth production request packet. If N=1, selecting a playback request packet that matches the feature information in the Nth production request packet from all the playback request packets to be aligned, and using the selected playback request packet as the playback request packet aligned with the Nth production request packet.

[0060] Optionally, the characteristic information includes: at least one of path information, query parameter information and source port information.

[0061] Optionally, the playback environment is provided with the same service nodes as the production environment; The second matching module 420 plays back the target traffic in the playback environment of the business system, including: the nginx proxy created in the playback environment simulates the target traffic to send the corresponding playback request packet to the business node in the playback environment, and obtains the corresponding playback response packet from the business node in the playback environment based on the nginx proxy.

[0062] Optionally, resource configuration of the service nodes in the playback environment is different from that in the production environment; and the target resource configuration scheme is used to adjust the resource configuration of the service nodes in the production environment.

[0063] Optionally, the configuration generation module 440 selects a target production request package and a target playback request package that are aligned with each other to determine a target resource configuration scheme for the production environment based on the resource status of the production environment corresponding to the time window to which the target production request package belongs, the processing performance reflected by the target production request package and the paired production response package, the resource status of the playback environment corresponding to the time window to which the target playback request package belongs, and the processing performance reflected by the target playback request package and the paired playback response package, including: when the processing performance reflected by the target production request package and the paired production response package does not meet the first preset requirement, and the processing performance reflected by the target playback request package and the paired playback response package meets the second preset requirement, compare the resource status of the production environment corresponding to the time window to which the target production request package belongs with the resource status of the playback environment corresponding to the time window to which the target playback request package belongs, determine that the playback environment is higher than the target resource item of the production environment, and determine a resource configuration scheme for increasing the configuration of the target resource item of the production environment.

[0064] It should be noted that the resource allocation device of this embodiment can be used as Figure 1 The execution subject of the method shown can thus realize Figure 1 The steps and functions in the method shown.

[0065] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0066] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0067] The memory is used to store the computer program. Specifically, the computer program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides the computer program to the processor.

[0068] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming the above-mentioned Figure 4 The resource configuration device shown. Correspondingly, the processor executes the program stored in the memory and is specifically used to perform the following operations: The metadata knowledge and content knowledge of the target data element are obtained from the metadata knowledge base and content knowledge base set up by the large language model hanging data platform, and the target data element is stored in the data platform.

[0069] The metadata knowledge and content knowledge of the target data element are set as prompt words to be imported into the large language model, so as to execute through the large language model: generating query commands based on the metadata knowledge of the target business document, and querying the data platform according to the query commands to obtain query results; and determining the degree of match between the query results and the content knowledge of the target data element.

[0070] Based on the matching degree between the query result and the content knowledge of the target data element and the cost of applying the target data element to the large language model, the effectiveness of applying the target data element to the large language model is determined.

[0071] The above is as in this manual Figure 1The method disclosed in the illustrated embodiment can be applied to a processor and implemented by the processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0072] Of course, in addition to software implementation, the electronic device of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0073] In addition, an embodiment of the present application provides a computer program product, the computer program product comprising a computer-readable storage medium storing a computer program. The computer program is operable to cause a computer to execute Figure 1 The steps in the method shown include: The request packets and response packets of the target traffic in the production environment of the business system are classified and matched to obtain matched production request packets and production response packets.

[0074] The target traffic is replayed in the playback environment of the business system, and the request packets and the response packets are classified and paired to obtain paired playback request packets and playback response packets.

[0075] Align the paired production request packets with the paired playback request packets.

[0076] Select mutually aligned target production request packages and target playback request packages to determine the target resource configuration plan for the production environment based on the resource status of the production environment corresponding to the time window to which the target production request package belongs, the processing performance reflected by the target production request package and the paired production response package, the resource status of the playback environment corresponding to the time window to which the target playback request package belongs, and the processing performance reflected by the target playback request package and the paired playback response package.

[0077] The production environment is resource configured according to the target resource configuration plan.

[0078] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0079] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0080] The above are only embodiments of this specification and are not intended to limit this specification. For those skilled in the art, this specification may be subject to various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of the claims of this specification. In addition, all other embodiments obtained by ordinary technicians in this field without creative work shall fall within the scope of protection of this document.

Claims

1. A resource configuration method for a business system production environment, characterized in that: include: Classify and pair the request packets and response packets of the target traffic in the production environment of the business system to obtain paired production request packets and production response packets; Replay the target traffic in the playback environment of the business system, and classify and pair the request packet and the response packet to obtain a paired playback request packet and a playback response packet; Aligning the paired production request packet with the paired playback request packet; Selecting a target production request packet and a target playback request packet that are aligned with each other, so as to determine a target resource configuration scheme for the production environment based on the resource status of the production environment corresponding to the time window to which the target production request packet belongs, the processing performance reflected by the target production request packet and the paired production response packet, the resource status of the playback environment corresponding to the time window to which the target playback request packet belongs, and the processing performance reflected by the target playback request packet and the paired playback response packet; The production environment is resource configured according to the target resource configuration plan.

2. The method according to claim 1, characterized in that Align the paired production request packets with the paired playback request packets, including: Select the Nth production request packet according to the order of execution alignment, where N is a positive integer; If N is greater than 1, determine the time difference between the Nth production request packet and the N-1th production request packet, and determine the time threshold based on the time difference; and select from all the playback request packets to be aligned a playback request packet that matches the feature information in the Nth production request packet and whose time difference from the last aligned playback request packet does not exceed the time threshold, and use the selected playback request packet as the playback request packet aligned with the Nth production request packet.

3. The method according to claim 2, characterized in that Aligning the paired production request packets with the paired playback request packets also includes: If N=1, a playback request packet matching the characteristic information in the Nth production request packet is selected from all the playback request packets to be aligned, and the selected playback request packet is used as the playback request packet aligned with the Nth production request packet.

4. The method according to claim 2, characterized in that: The characteristic information includes: at least one of path information, query parameter information and source port information.

5. The method according to claim 1, characterized in that The playback environment is provided with the same service nodes as the production environment; Replaying the target traffic in the playback environment of the business system includes: The nginx proxy created in the playback environment sends the corresponding playback request packet to the business node in the playback environment according to the target traffic, and obtains the corresponding playback response packet from the business node in the playback environment based on the nginx proxy.

6. The method according to claim 5, characterized in that The resource configuration of the service nodes in the playback environment is different from that in the production environment; the target resource configuration scheme is used to adjust the resource configuration of the service nodes in the production environment.

7. The method according to claim 1, characterized in that Selecting a target production request packet and a target playback request packet that are aligned with each other to determine a target resource configuration scheme for the production environment based on the resource status of the production environment corresponding to the time window to which the target production request packet belongs, the processing performance reflected by the target production request packet and the paired production response packet, the resource status of the playback environment corresponding to the time window to which the target playback request packet belongs, and the processing performance reflected by the target playback request packet and the paired playback response packet, including: When the processing performance reflected by the target production request packet and the paired production response packet does not meet the first preset requirement, and the processing performance reflected by the target playback request packet and the paired playback response packet meets the second preset requirement, the resource status of the production environment corresponding to the time window to which the target production request packet belongs is compared with the resource status of the playback environment corresponding to the time window to which the target playback request packet belongs, and the target resource item of the playback environment is determined to be higher than that of the production environment, and a resource configuration plan for increasing the target resource item of the production environment configuration is determined.

8. A resource configuration device for a business system production environment, characterized in that: include: The first matching module is used to classify and match the request packets and response packets of the target traffic in the production environment of the business system to obtain the paired production request packets and production response packets; A second matching module is used to replay the target traffic in the playback environment of the business system, and classify and match the request packet and the response packet to obtain a paired playback request packet and a playback response packet; A packet alignment module, used for aligning a paired production request packet with a paired playback request packet; A configuration generation module, used for selecting mutually aligned target production request packets and target playback request packets, so as to determine a target resource configuration scheme for the production environment based on the resource status of the production environment corresponding to the time window to which the target production request packet belongs, the processing performance reflected by the target production request packet and the paired production response packet, the resource status of the playback environment corresponding to the time window to which the target playback request packet belongs, and the processing performance reflected by the target playback request packet and the paired playback response packet; A configuration execution module is used to perform resource configuration on the production environment according to the target resource configuration scheme.

9. An electronic device, comprising: processor; and a memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method as claimed in any one of claims 1 to 7.

10. A computer program product, comprising a computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute the method according to any one of claims 1 to 7.