Data processing method and device, electronic equipment, storage medium and computer program product

By determining the initial parameter values ​​of multiple operating environment parameters of electronic devices, and selecting the most suitable data processing method based on the weights and initial parameter values, the decision tree is used to adjust the weights and optimize resource allocation. This solves the problem of low performance caused by single-dimensional data processing methods and achieves efficient data processing for electronic devices.

CN123178043APending Publication Date: 2026-11-27TENCENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510683040.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, single-dimensional data processing methods cannot select the optimal performance parameters, resulting in poor data processing performance of electronic devices.

Method used

By determining the initial parameter values ​​of multiple operating environment parameters of the electronic device, and based on the weights and initial parameter values, the most suitable data processing method is selected, and the weights are adjusted and resource allocation is optimized using a decision tree.

Benefits of technology

It improves the processing performance of data processing, enables electronic devices to allocate resources optimally according to real-time requests, and enhances the efficiency and stability of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178043A_ABST
    Figure CN123178043A_ABST
Patent Text Reader

Abstract

The application provides a data processing method and device, electronic equipment, storage medium and computer program product; the method comprises the following steps: in response to a data processing request, determining initial parameter values of a plurality of running environment parameters of the electronic equipment respectively, wherein the running environment parameters are used to represent the running environment of the electronic equipment; determining the weight of each running environment parameter based on the initial parameter values, and determining a target parameter value based on the weight and the initial parameter value of each running environment parameter; and based on the target parameter value, selecting a target data processing mode from a plurality of preset data processing modes for responding to the data processing request. Through the application, the processing performance of data processing can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] Data processing refers to the process of collecting, storing, transforming, analyzing, and transmitting data in order to extract valuable information or support decision-making.

[0003] In related technologies, data processing is usually carried out by selecting a data processing method based on a single dimension, and then processing the data using the selected data processing method. However, since the factors affecting the performance parameters of electronic devices are numerous and complex, the selection of a data processing method based on a single dimension cannot select the data processing method with the optimal performance parameters, resulting in poor performance parameters of the electronic device during data processing and low data processing performance. Summary of the Invention

[0004] This application provides a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can effectively improve the processing performance of data processing.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] This application provides a data processing method, including:

[0007] In response to a data processing request, initial parameter values ​​for each of the multiple operating environment parameters of the electronic device are determined, wherein the operating environment parameters are used to characterize the operating environment of the electronic device;

[0008] Based on the initial parameter values, the weight of each of the operating environment parameters is determined, and the target parameter value is determined based on the weights and the initial parameter values ​​of each of the operating environment parameters.

[0009] Based on the target parameter value, a target data processing method is selected from multiple preset data processing methods to respond to the data processing request.

[0010] This application provides a data processing apparatus, including:

[0011] The acquisition module is used to determine the initial parameter values ​​of each of the multiple operating environment parameters of the electronic device in response to a data processing request. The operating environment parameters are used to characterize the operating environment of the electronic device.

[0012] The determination module is used to determine the weight of each of the operating environment parameters based on the initial parameter values, and to determine the target parameter value based on the weights and the initial parameter values ​​of each of the operating environment parameters;

[0013] The selection module is used to select a target data processing method from multiple preset data processing methods based on the target parameter value to respond to the data processing request.

[0014] In the above scheme, the determining module is further configured to: obtain an initial weight sequence corresponding to the data processing request, wherein the initial weight sequence includes the initial weight of each of the operating environment parameters; obtain a decision tree corresponding to the data processing request, wherein different operating environment parameters correspond to different levels in the decision tree; based on the initial parameter value of each of the operating environment parameters, predict a weight adjustment sequence through the decision tree, wherein the weight adjustment sequence includes multiple weight adjustment coefficients for adjusting the weights of multiple operating environment parameters; and adjust the initial weight of each of the operating environment parameters based on the weight adjustment sequence to obtain the weight of each of the operating environment parameters.

[0015] In the above scheme, the determining module is further used to obtain a preset judgment condition for each of the operating environment parameters, the judgment condition being used to determine whether the initial parameter value of the operating environment parameter is within a preset parameter value range; using the judgment condition of each of the operating environment parameters as the non-leaf node of the decision tree, and using multiple preset weight adjustment sequences as leaf nodes, a decision tree corresponding to the data processing request is constructed.

[0016] In the above scheme, the determining module is further used to determine the order of the plurality of operating environment parameters, wherein the order of the operating environment parameters corresponds to the level of the decision tree in which the operating environment parameters are located; to obtain the preset weight adjustment sequence, wherein the number of the preset weight adjustment sequence is positively correlated with the number of operating environment parameters; and to perform relationship fitting on the plurality of operating environment parameters based on the order of the plurality of operating environment parameters, the judgment condition of each operating environment parameter and the preset weight adjustment sequence, thereby obtaining the decision tree.

[0017] In the above scheme, when the data processing request is the j-th data processing request, j is the number of times the application sends the data processing request, and j is a positive integer greater than or equal to 2. The above determining module is further used to obtain the initial weight sequence corresponding to the (j-1)-th data processing request, the initial weight sequence corresponding to the (j-1)-th data processing request includes the initial weights of each operating environment parameter determined when responding to the (j-1)-th data processing request; determine the performance parameters of the electronic device when responding to the (j-1)-th data processing request; and adjust the initial weight sequence corresponding to the (j-1)-th data processing request based on the performance parameters to obtain the initial weight sequence corresponding to the j-th data processing request.

[0018] In the above scheme, the performance parameters include multiple sub-performance parameters, and the sub-performance parameters are associated with the initial weight of at least one of the runtime environment parameters; the determining module is further configured to, for each sub-performance parameter, adjust the initial weight associated with the sub-performance parameter in the initial weight sequence corresponding to the (j-1)th data processing request, to obtain the adjusted weight; and replace the initial weights in the initial weight sequence corresponding to the (j-1)th data processing request with the corresponding adjusted weights to obtain the initial weight sequence of the j-th data processing request of the application.

[0019] In the above scheme, the determining module is further used to determine the parameter change value of the sub-performance parameter, determine the preset change value that is the same as the parameter change value among multiple preset change values ​​as the target preset change value, and different preset change values ​​correspond to different adjustment weight values; add the adjustment weight value corresponding to the target preset change value to the initial weight associated with the sub-performance parameter to obtain the adjusted weight.

[0020] In the above scheme, the determining module is further used to obtain the decision tree corresponding to the (j-1)th data processing request; when there is no initial weight equal to zero in the initial weight sequence corresponding to the (j-1)th data processing request of the application, the decision tree corresponding to the (j-1)th data processing request of the application is determined as the decision tree corresponding to the j-th data processing request; when there is an initial weight equal to zero in the initial weight sequence corresponding to the (j-1)th data processing request, the decision tree corresponding to the (j-1)th data processing request is adjusted based on the initial weight sequence corresponding to the (j-1)th data processing request to obtain the decision tree corresponding to the j-th data processing request.

[0021] In the above scheme, the determining module is further configured to perform the following processing for each initial weight in the initial weight sequence of the (j-1)th data processing request of the application, so as to obtain the decision tree corresponding to the j-th data processing request: when the value of the initial weight is zero, delete the node of the level corresponding to the initial weight in the decision tree corresponding to the (j-1)th data processing request, and connect the nodes in the two levels adjacent to the level corresponding to the initial weight.

[0022] In the above scheme, the nodes at each level corresponding to the operating environment parameter in the decision tree are preset judgment conditions for the operating environment parameter. The leaf nodes of the decision tree are preset weight adjustment sequences used to adjust the initial weights. The values ​​of the weight adjustment coefficients in the preset weight adjustment sequences of different leaf nodes are at least partially different. The weight adjustment coefficients correspond one-to-one with the operating environment parameters. The above-mentioned determining module is further used to determine the target leaf node corresponding to the data processing request in the leaf nodes of the decision tree based on the initial parameter value of each operating environment parameter and through the decision tree corresponding to the data processing request; and to determine the preset weight adjustment sequence corresponding to the target leaf node as the weight adjustment sequence. The above-mentioned determining module is further used to multiply the value of each weight adjustment coefficient in the weight adjustment sequence by the initial weight of the corresponding operating environment parameter to obtain the weight of each operating environment parameter.

[0023] In the above scheme, the determining module is further configured to perform a weighted summation of the initial parameter values ​​of each of the operating environment parameters according to the weight of each of the operating environment parameters to obtain candidate parameter values; obtain a preset parameter adjustment coefficient, and adjust the candidate parameter values ​​based on the parameter adjustment coefficient to obtain the target parameter value.

[0024] In the above scheme, the determining module is further used to determine the difference between the parameter adjustment coefficient and the candidate parameter value, and multiply the difference with a preset coefficient to obtain a product value; and normalize the product value through an activation function to obtain the target parameter value.

[0025] In the above scheme, the selection module is further used to obtain parameter value ranges that correspond one-to-one with the preset data processing methods, compare the target parameter value with each of the parameter value ranges respectively to determine the target parameter value range to which the target parameter value belongs, and determine the data processing method corresponding to the target parameter value range as the target data processing method.

[0026] In the above scheme, the response module is further configured to: when the target data processing method is a first data processing method, obtain a first data processing result from the server for the data processing request and send the first data processing result to the application; when the target data processing method is a second data processing method, perform data processing for the data processing request based on the cache of the electronic device to obtain a first sub-result and obtain a second sub-result from the server for the data processing request; determine a second data processing result for the data processing request based on the first sub-result and the second sub-result, and send the second data processing result to the application.

[0027] In the above scheme, the operating environment parameters include a first operating environment parameter associated with the request information, a second operating environment parameter associated with the operating state, and a third operating environment parameter associated with the application. The determining module is further configured to, for the first operating environment parameter, extract from the request information at least one of the following: the data volume of the target data requested for processing by the data processing request, the file size of the data file containing the target data, and a preset information value corresponding to the data access type corresponding to the data processing request, as the initial parameter value; for the second operating environment parameter, extract from the operating state at least one of the following: the resource usage ratio of the application in the electronic device, the memory usage of the application in the electronic device, the load value of the electronic device, and the network transmission speed of the electronic device, as the initial parameter value; and for the third operating environment parameter, use the application level value of the application as the initial parameter value.

[0028] This application provides an electronic device, including:

[0029] Memory is used to store executable instructions or computer programs.

[0030] The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method provided in the embodiments of this application.

[0031] This application provides a computer-readable storage medium storing computer-executable instructions for inducing a processor to execute and implement the data processing method provided in this application.

[0032] This application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the data processing method described in this application.

[0033] The embodiments of this application have the following beneficial effects:

[0034] In response to data processing requests, initial parameter values ​​for multiple operating environment parameters of the electronic device are determined. By combining the weight of each operating environment parameter with its initial value, a target parameter value that reflects the contribution of all operating environment parameters to performance is determined. Based on the target parameter value, the most suitable target data processing method is selected from multiple preset data processing methods. This enables the electronic device to determine the target data processing method that achieves optimal resource allocation based on real-time data processing requests and respond to data processing requests according to the target data processing method, thereby effectively improving data processing performance. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of the architecture of the data processing system provided in the embodiments of this application;

[0036] Figure 2 This is a schematic diagram of the structure of an electronic device for data processing provided in an embodiment of this application;

[0037] Figure 3 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 1 ;

[0038] Figure 4 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 2 ;

[0039] Figure 5 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 3 ;

[0040] Figure 6 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 4 ;

[0041] Figure 7 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 5 ;

[0042] Figure 8This is a schematic diagram of the decision tree structure provided in the embodiments of this application. Figure 1 ;

[0043] Figure 9 This is a schematic diagram of the data processing method provided in the embodiments of this application. Figure 1 ;

[0044] Figure 10 This is a schematic diagram of the data processing method provided in the embodiments of this application. Figure 2 ;

[0045] Figure 11 This is a schematic diagram of the data processing method provided in the embodiments of this application. Figure 3 ;

[0046] Figure 12 This is a schematic diagram illustrating the principle of the model training process provided in the embodiments of this application;

[0047] Figure 13 This is a schematic diagram illustrating the principle of weight adjustment provided in the embodiments of this application;

[0048] Figure 14 This is a schematic diagram illustrating the principle of decision tree pruning provided in the embodiments of this application;

[0049] Figure 15 This is a schematic diagram of the decision tree structure provided in the embodiments of this application. Figure 2 ;

[0050] Figure 16 This is a schematic diagram illustrating the principle of weight adjustment provided in the embodiments of this application;

[0051] Figure 17 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 6 . Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0053] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0054] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0056] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0057] 1) IO Mode: IO mode refers to the methods and strategies used to handle data read / write requests from upper-layer applications in a distributed storage system. An effective IO mode can significantly impact system performance and resource utilization efficiency. Buffered IO and Direct IO are two common IO modes. Buffered IO optimizes data read / write operations through local caching. When writing data, it is first written to the cache and then synchronized to the remote server; when reading data, it prioritizes retrieval from the cache. This mode is suitable for scenarios with sufficient cache resources and a low probability of concurrent data modification, improving the efficiency of asynchronous data synchronization and sequential reading. Direct IO, on the other hand, does not use local caching and directly sends data read / write requests to the remote server, suitable for scenarios where data is frequently modified and randomly accessed. Choosing the appropriate IO mode is crucial for improving the performance and resource utilization of a distributed storage system; inappropriate mode selection can lead to performance degradation and resource waste. Selecting the optimal mode for data IO requests from upper-layer applications efficiently satisfies these requests.

[0058] 2) Application: This refers to software that runs on a computer system, designed to perform a specific task or provide a specific function. Applications can be standalone programs or part of a larger system. They can be categorized into various types, including desktop applications, mobile applications, web applications, and enterprise applications. Applications typically consist of a series of instructions that tell the computer how to perform a task. These instructions can be source code written in a high-level programming language, compiled or interpreted so that the computer can understand and execute them. Applications can perform a wide variety of tasks, from simple calculators to complex database management systems, multimedia players, games, and office suites. The design and development of applications involves multiple aspects, including user interface design, functionality implementation, performance optimization, and security considerations. Good applications are not only powerful but also easy to use, providing a good user experience. As technology advances, applications are constantly evolving to adapt to new hardware, operating systems, and user needs.

[0059] 3) Decision Tree: A graphical tool for decision analysis that uses a tree structure to display the various possible choices and outcomes in the decision-making process. Each branch of a decision tree represents a possible outcome of a decision or event, while each node represents a decision point or event point.

[0060] 4) Input / Output (IO): This refers to the process of inputting and outputting data in a computer system. IO operations involve transferring data from external devices (such as keyboards, mice, cameras, storage devices, etc.) to computer memory, or transferring data from memory to external devices. These operations are fundamental to the interaction between the computer and the external world and are crucial for the normal operation of the computer and the execution of application software. The performance of IO operations has a significant impact on the overall performance of the computer. IO operations are typically much slower than CPU and memory operations, making IO bottlenecks a common problem in computer performance optimization. To improve IO performance, computer systems employ various techniques, such as buffering, caching, DMA (Direct Memory Access), multitasking, and IO scheduling algorithms. IO operations are usually implemented through specific APIs (Application Programming Interfaces), which provide functions for reading and writing data. Different programming languages ​​and operating systems provide different IO APIs, but their basic principles are similar. Data reading and writing is a fundamental and critical operation in a computer system, ensuring that the computer can interact effectively with the external world, thereby supporting the operation of various application software and meeting user needs.

[0061] During the implementation of the embodiments of this application, the applicant discovered the following problems with the related technology:

[0062] In related technologies, data processing is usually carried out by selecting a data processing method based on a single dimension, and then processing the data using the selected data processing method. However, since the factors affecting the performance parameters of electronic devices are numerous and complex, the selection of a data processing method based on a single dimension cannot select the data processing method with the optimal performance parameters, resulting in poor performance parameters of the electronic device during data processing and low data processing performance.

[0063] This application provides a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can effectively improve the processing performance of data processing. The exemplary application of the data processing system provided in this application is described below.

[0064] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of the data processing system 100 provided in the embodiments of this application. The terminal (terminal 400 is shown as an example) connects to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0065] Terminal 400 is used by users to access client 410 and display data processing results on a graphical interface 410-1 (graphical interface 410-1 is shown as an example). Terminal 400 and server 200 are interconnected via wired or wireless network.

[0066] In some embodiments, server 200 can be a standalone physical server, a server cluster or business system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal 400 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smart TV, smartwatch, in-vehicle terminal, etc., but is not limited to these. The electronic device provided in this application embodiment can be implemented as a terminal or a server. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application embodiment.

[0067] In some embodiments, the server 200 obtains a data processing request and determines parameter values ​​based on the request information and the running status. Based on the weight and parameter value of each running environment parameter, it determines a target parameter value. Based on the target parameter value, it selects a target data processing method from multiple preset data processing methods and responds to the data processing request based on the target data processing method.

[0068] In other embodiments, the terminal 400 receives a data processing request, determines parameter values ​​based on the request information and operating status, determines a target parameter value based on the weight and parameter value of each operating environment parameter, selects a target data processing method from multiple preset data processing methods based on the target parameter value, and responds to the data processing request based on the target data processing method.

[0069] See Figure 2 , Figure 2 This is a schematic diagram of the structure of an electronic device 500 for data processing provided in an embodiment of this application, wherein, Figure 2 The electronic device 500 shown can be Figure 1 Server 200 or terminal 400 in the middle, Figure 2 The illustrated electronic device 500 includes at least one processor 430, a memory 450, and at least one network interface 420. The various components in the electronic device 500 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 440.

[0070] Processor 430 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0071] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 430.

[0072] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0073] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0074] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0075] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, such as Bluetooth, WiFi, and Universal Serial Bus (USB).

[0076] In some embodiments, the data processing apparatus provided in this application can be implemented in software. Figure 2 A data processing device 455 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: an acquisition module 4551, a determination module 4552, a selection module 4553, and a response module 4554. These modules are logically linked and can therefore be arbitrarily combined or further separated according to the functions they implement. The functions of each module will be described below.

[0077] In other embodiments, the data processing apparatus provided in this application can be implemented in hardware. As an example, the data processing apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the data processing method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0078] In some embodiments, the terminal or server can implement the data processing method provided in this application by running a computer program or computer-executable instructions. For example, the computer program can be a native program in the operating system (e.g., a dedicated data processing program) or a software module, such as a data processing module that can be embedded in any program (e.g., an instant messaging client, a photo album program, an electronic map client, a navigation client); or it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run. In summary, the above-mentioned computer program can be any form of application, module, or plugin.

[0079] The data processing method provided in this application will be described in conjunction with exemplary applications and implementations of the server or terminal provided in the embodiments of this application.

[0080] See Figure 3 , Figure 3 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 1 , will combine Figure 3 Steps 101 to 105 are described below. The data processing method provided in this application embodiment can be implemented by the server or the terminal alone, or by the server and the terminal working together. The following description will take the implementation by the server alone as an example.

[0081] In step 101, in response to a data processing request, initial parameter values ​​for each of the multiple operating environment parameters of the electronic device are determined.

[0082] In some embodiments, the request information included in the data processing request includes the amount of target data to be processed by the data processing request, the file size of the data file where the target data is located, and a preset information value corresponding to the data access type corresponding to the data processing request.

[0083] In some embodiments, the operating status of an electronic device includes the resource usage ratio of an application in the electronic device, the memory usage of an application in the electronic device, the load value of the electronic device, and the network transmission speed value of the electronic device.

[0084] In some embodiments, a data processing request is received from an application running on an electronic device. This request may include various types of data operations, such as reading, writing, updating, or deleting data. The data volume of the target data (i.e., the size of the data to be processed), the file size of the data file (if the data is stored in a file, the file size is also an important indicator), and preset information values ​​corresponding to the data access type (different types of access (e.g., frequent reading, frequent writing) may have different preset values, which can help the system determine how to optimize processing).

[0085] In some embodiments, the operating status of an electronic device is monitored to ensure that processing requests does not negatively impact device performance. According to the provided embodiments, the operating status includes: application resource usage percentages, such as CPU utilization and I / O latency; application memory usage, i.e., the amount of memory currently used by the application; electronic device load, a comprehensive indicator reflecting the overall workload of the device; and the electronic device's network transmission speed, which is particularly important for requests requiring data transmission over a network. After processing is complete, feedback information, such as processing time and resource usage, is collected, and future processing strategies are adjusted based on this information.

[0086] In some embodiments, the request information includes: The amount of target data: This refers to the amount of data requested for processing in the data processing request. It can be the number of data entries, bytes, or other units of measurement, depending on the data type and storage method. The file size of the data file: If the target data is stored in a file, this information refers to the file size. File size is important for assessing the complexity and time required for data processing, especially when processing large files. Preset information values ​​corresponding to the data access type: These are information values ​​pre-set according to the data access type (e.g., read, write, update, delete). These values ​​may include access frequency, priority, resource requirements, etc., to guide the system on how to optimize request processing. Operating status includes: Application resource usage ratio: This refers to the proportion of system resources used by the application on the electronic device, such as CPU utilization, memory utilization, disk I / O, etc. High resource usage may indicate that device performance is strained, requiring careful handling of new data requests. Application memory usage: This refers to the amount of memory currently used by the application. Memory usage is crucial for assessing application performance and stability, as high memory usage can lead to out-of-memory errors or system slowdown. Electronic device load value: The load value is a comprehensive indicator reflecting the overall workload of the electronic device. It typically represents the amount of work a device needs to process within a certain timeframe, and can be used to assess the device's current performance and processing capabilities. Network transmission speed of an electronic device refers to the speed at which the electronic device transmits data over a network. Network transmission speed is crucial for applications that require data exchange over a network, as it directly impacts data processing efficiency and response time. In some embodiments, the operating environment parameters are factors affecting the performance of the electronic device, and these parameters characterize the operating environment of the electronic device.

[0087] In some embodiments, the aforementioned runtime environment parameters include a first runtime environment parameter associated with the request information, a second runtime environment parameter associated with the runtime state, and a third runtime environment parameter associated with the application. These runtime environment parameters include internal runtime environment parameters and external runtime environment parameters. The first and third runtime environment parameters are external runtime environment parameters, meaning they are runtime environment parameters affected by the application running on the electronic device (external runtime environment). The second runtime environment parameter is an internal runtime environment parameter, meaning it is runtime environment parameters affected by the runtime state of the electronic device itself (internal runtime environment).

[0088] In some embodiments, runtime environment parameters are a set of indicators used to characterize and quantify various conditions and states of the operating environment of an electronic device. These parameters can affect the performance of the electronic device, including processing power, response time, and stability. Runtime environment parameters can be divided into two main categories: internal and external. Internal runtime environment parameters reflect the operating state of the electronic device itself, are related to the state of the device hardware and operating system, and are not affected by specific applications. These include, but are not limited to, CPU utilization, memory utilization, battery level, and device temperature. Internal runtime environment parameters are mainly used to detect and evaluate the health status and performance potential of electronic devices. External runtime environment parameters are affected by the applications running on the electronic device, are related to the behavior and configuration of the applications, and may vary depending on the application. These include, but are not limited to, request processing time, request data size, network latency, application version number, configuration settings, and user permissions. External runtime environment parameters are mainly used to evaluate the performance of applications on specific devices and the user experience.

[0089] In some embodiments, when evaluating the performance of an electronic device, operating environment parameters refer to variables that can affect device performance parameters. These factors can be divided into three categories: first operating environment parameters associated with the request information, second operating environment parameters associated with the operating state, and third operating environment parameters associated with the application. First operating environment parameters (associated with the request information): Data volume: The size of the data to be processed directly affects the device's processing time and resource consumption. Larger data volumes may require more computing resources and time to process. File size: If the data is stored in a file, the file size affects the efficiency of read and write operations. Larger files may require longer transmission and processing times. Data access type: Different data access types (such as read, write, update, delete) have different impacts on device performance. For example, write operations typically consume more resources than read operations.

[0090] In some embodiments, the second runtime environment parameter (associated with runtime state), resource usage ratio, refers to the application's resource usage ratio on the device, such as CPU utilization and memory utilization, which affects the device's ability to process new requests. High resource usage may limit the device's ability to process additional requests. Memory usage size, the amount of memory currently used by the application directly affects the device's available memory. High memory usage may lead to insufficient memory, affecting device performance. Load value, the device's load value reflects the current workload. High load may mean that the device is approaching its processing capacity limit, and new requests may cause performance degradation. Network transmission speed, the device's network transmission speed affects the efficiency of data upload and download. Slow network speed may delay the completion of data processing requests. The third runtime environment parameter (associated with the application), application efficiency, the efficiency and optimization level of the application's own algorithms affect its speed of processing data requests and resource consumption. Application design, whether the application's design is suitable for the current hardware environment and use case, also affects its performance. Application updates, application version updates may include performance improvements or bug fixes, which will affect its performance. Application configuration, application configuration settings, such as cache size, number of threads, etc., also affect its performance.

[0091] In some embodiments, the determination of initial parameter values ​​for each of the multiple operating environment parameters of the electronic device can be achieved as follows: For the first operating environment parameter, at least one of the following is extracted from the request information: the data volume of the target data requested for processing by the data processing request, the file size of the data file containing the target data, and a preset information value corresponding to the data access type corresponding to the data processing request, as the initial parameter value; For the second operating environment parameter, at least one of the following is extracted from the operating state: the resource usage ratio of the application in the electronic device, the memory usage of the application in the electronic device, the load value of the electronic device, and the network transmission speed of the electronic device, as the initial parameter value; For the third operating environment parameter, the application level value of the application is used as the initial parameter value.

[0092] In some embodiments, on the server side, to determine the initial parameter value for each of the multiple runtime environment parameters, for the first runtime environment parameter (associated with request information): Data volume is the amount of target data extracted from the data processing request, which can be achieved by calculating the number of data entries, bytes, or other units of measurement contained in the request. File size, if the target data is stored in a file, is extracted from the request information. This is usually information obtained from the file metadata. Preset information value corresponding to the data access type is extracted based on the data access type (e.g., read, write, update, delete). These values ​​may include access frequency, priority, resource requirements, etc., to guide the server on how to optimize request processing. For the second runtime environment parameter (associated with runtime status): Resource usage ratio is extracted from the runtime status of the electronic device, such as CPU usage, memory usage, etc. This is usually obtained through system monitoring tools or APIs. Memory usage is extracted, which helps the server assess the available memory resources of the device. Load value is extracted, which is a comprehensive indicator reflecting the overall workload of the device. Network transmission speed is extracted, which directly affects the data upload and download efficiency. For the third runtime environment parameter (associated with the application), the application's application level value is used as the parameter value. The application level may be determined based on the application's importance, priority, or system resource requirements.

[0093] As an example, in an application scenario where the data processing request is an I / O (input / output) request, a file server receives an I / O request from a client application, requesting to read a large data file. The server needs to assess the impact of this request on system performance and decide how to handle it. The first runtime environment parameter (associated with the request information): Data volume: The amount of target data extracted from the request information. For example, the request might be to read a 10GB data file, so the data volume is 10GB. File size: The size of the data file containing the target data is also 10GB. Preset information value corresponding to the data access type: The data access type of the request is read, and the preset information value may include the priority of the read operation, the estimated I / O time, etc. For example, the priority of the read operation is set to medium, and the estimated I / O time is 10 seconds. The second runtime environment parameter (associated with the running status): Resource usage ratio: Extracting the application's resource usage ratio from the running status. For example, the current application's CPU usage is 30%, and the memory usage is 40%. Memory usage: The application is currently using 2GB of memory. Load Value: The load value of the electronic device is 0.7, indicating that the device's processing capacity is being used at 70%. Network Transmission Speed: The network transmission speed of the electronic device is 100MB / s. Third Operating Environment Parameter (related to the application): The application's application level value. An application level value of 3 indicates that this is a medium-priority application.

[0094] In this way, electronic devices can accurately assess the specific impact of each data processing request on their performance. Preset information values ​​for data volume, file size, and data access type extracted from the request information provide the server with direct indicators of request complexity and resource requirements. For example, larger data volumes and file sizes typically imply higher storage and bandwidth demands, while specific data access types (such as frequent random reads and writes) may place higher demands on I / O performance. Application resource usage, memory usage, device load, and network transmission speed extracted from the running status provide the server with a real-time view of current system resources. These indicators help the server determine whether the device has sufficient resources to handle new requests or whether resource allocation needs to be adjusted to avoid performance bottlenecks. Finally, the application's application level provides the server with a priority reference, enabling it to determine the processing order based on request importance. By comprehensively considering these parameter values, the server can make more informed decisions, optimize resource allocation, improve overall system performance and response speed, thereby ensuring that critical tasks are processed in a timely manner while maintaining system stability and reliability.

[0095] In step 102, the weight of each of the operating environment parameters is determined based on the initial parameter values.

[0096] In some embodiments, see Figure 4 , Figure 4 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 2 , Figure 3 Step 102 shown can be achieved through Figure 4 Steps 1021 to 1024 shown are implemented.

[0097] In step 1021, the initial weight sequence corresponding to the data processing request is obtained.

[0098] In some embodiments, the initial weight sequence includes an initial weight for each of the runtime environment parameters.

[0099] As an example, the expression for the initial weight sequence corresponding to the above data processing request can be:

[0100] T = {t1, t2, …, t} N} (1)

[0101] Where T is used to indicate the initial weight sequence corresponding to the data processing request, t1, t2, ..., t N Used to indicate the initial weight of each runtime environment parameter.

[0102] In some embodiments, when the data processing request is the first data processing request sent by the application, the initial weight sequence corresponding to the first data processing request sent by the application can be the initial weight of each runtime environment parameter preset based on experience.

[0103] In some embodiments, when the data processing request is the j-th data processing request, j is the number of times the application sends the data processing request, and j is a positive integer greater than or equal to 2. The above step 1021 can be implemented as follows: obtaining the initial weight sequence corresponding to the (j-1)-th data processing request, wherein the initial weight sequence corresponding to the (j-1)-th data processing request includes the initial weights of each operating environment parameter determined when responding to the (j-1)-th data processing request; determining the performance parameters of the electronic device when responding to the (j-1)-th data processing request; and adjusting the initial weight sequence corresponding to the (j-1)-th data processing request based on the performance parameters to obtain the initial weight sequence corresponding to the j-th data processing request.

[0104] In some embodiments, when processing data processing requests, especially when an application sends multiple requests, the system needs to dynamically adjust weights to optimize performance. When the data processing request is the j-th request, j represents the number of times the application sends the request, and j≥2. The initial weight sequence corresponding to the (j-1)-th data processing request is obtained. First, the initial weight sequence corresponding to the previous request (the (j-1)-th request) is obtained. This sequence contains the initial weights of various runtime environment parameters determined when responding to the (j-1)-th request. These initial weights reflect the relative importance of each runtime environment parameter to system performance during the processing of the previous request. Next, the performance parameters of the electronic device when responding to the (j-1)-th request are determined. These parameters may include response time, resource utilization, throughput, etc., used to evaluate the system's performance when processing the previous request. The initial weight sequence corresponding to the (j-1)-th data processing request is adjusted to obtain the initial weight sequence corresponding to the j-th data processing request. The initial weight sequence is further adjusted based on the performance parameters of the electronic device when processing the (j-1)-th request. The purpose of this adjustment is to make the weight sequence better reflect the current system state and requirements. For example, if a certain runtime environment parameter causes a performance bottleneck when processing the (j-1)th request, the weight of that factor might be increased to give it more attention and resource allocation when processing the j-th request. The adjusted weight sequence will become the initial weight sequence when processing the j-th request, providing a basis for subsequent weight allocation and resource scheduling.

[0105] As an example, in an application scenario where data processing requests are I / O requests, suppose there is a file server that receives multiple I / O requests from client applications, requesting to read and write files of different sizes. The server needs to dynamically adjust weights to optimize performance. Assuming this is the second I / O request (j=2), the server first obtains the initial weight sequence corresponding to the first I / O request. This sequence may include initial weights for runtime environment parameters such as data volume, file size, data access type, resource usage ratio, memory usage, load value, network transmission speed, and application level. The server detects and records the performance parameters when responding to the first I / O request. For example, the response time is 5 seconds, CPU utilization is 20%, memory utilization is 30%, and network transmission speed is 80MB / s. Based on the performance parameters of the first I / O request, the server identifies which runtime environment parameters have a significant impact on performance. For example, it finds that a higher data volume and file size lead to a longer response time. The server adjusts the weight sequence accordingly, increasing the weights of runtime environment parameters such as data volume and file size to give more attention and resource allocation when processing the second I / O request. The adjusted weight sequence will become the initial weight sequence when processing the second IO request. The server can optimize resource allocation and improve overall performance based on the performance feedback from the previous IO request. If the first IO request involved a large amount of data and a large file size, resulting in a long response time, the server will assign higher weights to these runtime parameters when processing the second IO request to ensure more efficient resource allocation and reduce response time.

[0106] In this way, the electronic device can dynamically adjust the weight sequence to optimize the response performance of data processing requests. Specifically, when processing the j-th data processing request, the electronic device first obtains the initial weight sequence corresponding to the (j-1)-th request. This sequence contains the initial weights of each operating environment parameter determined when responding to the (j-1)-th request. Then, the electronic device determines its performance parameters when responding to the (j-1)-th request, such as response time and resource utilization. Based on these performance parameters, the electronic device adjusts the initial weight sequence to reflect the relative importance of each operating environment parameter to performance when processing the j-th request. This dynamic adjustment process allows the electronic device to optimize resource allocation and improve overall performance based on real-time performance feedback. For example, if a certain operating environment parameter causes a performance bottleneck when processing the (j-1)-th request, the electronic device increases the weight of that factor to give it more attention and resource allocation when processing the j-th request. The electronic device can achieve intelligent response to data processing requests, ensuring that its performance is optimal.

[0107] In some embodiments, the performance parameters include multiple sub-performance parameters, each sub-performance parameter being associated with an initial weight of at least one of the runtime environment parameters. The adjustment of the initial weight sequence corresponding to the (j-1)th data processing request based on the performance parameters to obtain the initial weight sequence corresponding to the j-th data processing request can be achieved as follows: For each sub-performance parameter, the initial weight associated with the sub-performance parameter in the initial weight sequence corresponding to the (j-1)th data processing request is adjusted to obtain the adjusted weight; the initial weights in the initial weight sequence corresponding to the (j-1)th data processing request are then replaced with the corresponding adjusted weights to obtain the initial weight sequence for the j-th data processing request of the application.

[0108] In some embodiments, the performance of an electronic device is affected by various factors when processing data. To optimize performance, the device needs to dynamically adjust the weights of these operating environment parameters. The performance parameter of the electronic device is a comprehensive indicator composed of multiple sub-performance parameters. These sub-performance parameters may include response time, resource utilization, throughput, etc., each reflecting the device's performance in a specific aspect. Each sub-performance parameter is associated with an initial weight of at least one operating environment parameter. Operating environment parameters may include data volume, resource utilization ratio, network transmission speed, etc. The initial weights reflect the relative importance of these operating environment parameters to the device's performance when processing the previous data request. When the electronic device needs to process the j-th data request, it first obtains the initial weight sequence corresponding to the (j-1)-th request. This sequence contains the initial weights of each operating environment parameter determined when processing the (j-1)-th request. The electronic device determines the performance parameters when processing the (j-1)-th request, including all relevant sub-performance parameters. For each sub-performance parameter, the device adjusts the initial weights associated with it in the initial weight sequence based on the value of that sub-performance parameter. The purpose of the adjustment is to reflect the change in the importance of the operating environment parameters in the current request. The adjusted weights replace the corresponding initial weights in the initial weight sequence, resulting in the initial weight sequence for the j-th request. This new weight sequence will be used to process the j-th data request, ensuring that the device can make more reasonable resource allocation decisions based on the performance feedback from the previous request.

[0109] As an example, in the application scenario of electronic devices handling I / O requests, suppose we have a smart camera that needs to process data streams from multiple sensors, including video, audio, and environmental data. To optimize data processing performance, the camera needs to dynamically adjust the weights of various factors affecting I / O request processing. The camera's performance parameters include sub-performance parameters such as data processing latency, CPU load, memory usage, storage I / O rate, and network bandwidth. Each sub-performance parameter is associated with an initial weight of at least one runtime environment parameter. For example, data processing latency might be associated with data volume, storage I / O rate, and network bandwidth; CPU load might be associated with the number of concurrent data streams and data processing complexity. When the camera processes the j-th I / O request, it first obtains the initial weight sequence corresponding to the (j-1)-th request. The camera then determines the performance parameters for processing the (j-1)-th request, including all relevant sub-performance parameters. For each sub-performance parameter, the camera adjusts the initial weights associated with the initial weight sequence based on the value of that sub-performance parameter. For example, if the storage I / O rate is low when processing the (j-1)th request, leading to increased data processing latency, the camera might increase the weight of the runtime environment parameters corresponding to the storage I / O rate. The adjusted weights replace the corresponding initial weights in the initial weight sequence, resulting in the initial weight sequence for the j-th request. This new weight sequence will be used to process the j-th I / O request, ensuring the camera can make better resource allocation decisions based on performance feedback from the previous request. The camera can dynamically adjust the weight sequence to optimize performance parameters and improve the processing efficiency and response speed of I / O requests. This adjustment process is based on the principle of feedback control, enabling the camera to automatically adjust resource allocation according to real-time performance to adapt to constantly changing needs.

[0110] Thus, the performance parameters consist of multiple sub-performance parameters, each associated with an initial weight of at least one runtime environment parameter. This association allows us to influence overall performance by adjusting the sub-performance parameters. When processing the (j-1)th data processing request, we first obtain its corresponding initial weight sequence. Then, for each sub-performance parameter, we precisely adjust the initial weights associated with it in the initial weight sequence based on its current performance. This adjustment process may involve increasing or decreasing weights to reflect the sub-performance parameter's contribution to overall performance. The adjusted weights reflect the change in the importance of the sub-performance parameter in the current data processing request. Next, we replace the initial weights in the initial weight sequence of the (j-1)th data processing request with the corresponding adjusted weights one by one, thereby obtaining the initial weight sequence for the j-th data processing request. This process ensures that the weight sequence reflects changes in performance parameters in real time, enabling electronic devices to optimize data processing strategies based on the latest performance data, improving processing efficiency and accuracy.

[0111] In some embodiments, the adjustment of the initial weights associated with the sub-performance parameters in the initial weight sequence corresponding to the (j-1)th data processing request based on the sub-performance parameters to obtain the adjusted weights can be achieved as follows: determine the parameter change value of the sub-performance parameters; determine the preset change value that is the same as the parameter change value among multiple preset change values ​​as the target preset change value; different preset change values ​​correspond to different adjusted weight values; add the adjusted weight value corresponding to the target preset change value to the initial weights associated with the sub-performance parameters to obtain the adjusted weights.

[0112] In some embodiments, dynamic adjustment of performance parameters is key to optimizing system performance during the processing of data requests by the electronic device. For each sub-performance parameter, the electronic device monitors its performance during the (j-1)th data request and calculates the parameter change value for that sub-performance parameter. This change value reflects the change of the sub-performance parameter relative to the previous request, and may increase, decrease, or remain unchanged. The electronic device pre-sets a series of possible parameter change values, each corresponding to an adjustment weight value. The correspondence between these preset change values ​​and weight values ​​is based on historical data and experience, aiming to guide the direction and magnitude of weight adjustment. Once the parameter change value of a sub-performance parameter is determined, the electronic device searches for the same or closest change value among the preset change values ​​and identifies it as the target preset change value. Each target preset change value corresponds to a specific adjustment weight value. This adjustment weight value indicates how the initial weight associated with the sub-performance parameter should be adjusted when the corresponding parameter changes. The adjustment weight value can be positive, negative, or zero, representing an increase, decrease, or maintenance of the initial weight, respectively. The electronic device adds the adjusted weight corresponding to the preset change value of the target to the initial weight associated with the sub-performance parameter, obtaining the adjusted weight. The electronic device then replaces the corresponding initial weight in the initial weight sequence with the adjusted weight, thus obtaining the initial weight sequence for the j-th data processing request. The new weight sequence will be used to process the j-th data request, ensuring that the electronic device can make more reasonable resource allocation decisions based on the performance feedback of the previous request. The electronic device can dynamically adjust the weight sequence to optimize performance parameters and improve data processing efficiency and response speed. This adjustment process is based on the principle of feedback control, enabling the electronic device to automatically adjust resource allocation according to real-time performance to adapt to constantly changing needs.

[0113] In some embodiments, a parameter change value refers to the amount by which a sub-performance parameter changes relative to the previous request during the processing of a data request by the electronic device. This change can be an absolute change or a percentage change, reflecting the fluctuation of the sub-performance parameter between different requests. The determination of the parameter change value is typically based on real-time monitored data, such as increases or decreases in response time, increases or decreases in resource utilization, etc. By analyzing the parameter change value, the electronic device can understand the degree of impact of the sub-performance parameter on overall performance and adjust its weight accordingly.

[0114] In some embodiments, preset variation values ​​are a series of possible parameter variation values ​​pre-set during the system design phase of the electronic device. These variation values ​​are determined based on historical data, empirical analysis, or anticipated workload conditions, and are designed to cover various possible performance variation scenarios. Each preset variation value corresponds to an adjustment weight value, which determines how the initial weight associated with that sub-performance parameter should be adjusted when a parameter variation value matches the preset variation value. The correspondence between preset variation values ​​and adjustment weight values ​​is typically determined using machine learning models, expert systems, or other optimization algorithms to ensure that weight adjustments effectively optimize system performance.

[0115] As an example, the expression for the adjusted weights above can be:

[0116] T'=T+ΔT (2)

[0117] Where T' indicates the adjusted weight, T indicates the initial weight associated with the sub-performance parameter, and ΔT indicates the adjusted weight value corresponding to the target preset change value.

[0118] Thus, when the electronic device processes the j-th data request, it first obtains the initial weight sequence corresponding to the (j-1)-th request. Then, the device monitors and calculates the parameter change value for each sub-performance parameter. Next, the electronic device searches for the same or closest change value among preset change values ​​and determines it as the target preset change value. Each target preset change value corresponds to an adjustment weight value, which reflects how the initial weight associated with the sub-performance parameter should be adjusted when the parameter changes. By adding the adjustment weight value corresponding to the target preset change value to the initial weight, the electronic device obtains the adjusted weight. This adjustment process ensures that the weight can reflect the impact of operating environment parameters on performance in real time according to the changes in sub-performance parameters. By updating the weight sequence, the electronic device can optimize resource allocation, improve data processing efficiency and response speed, thereby achieving performance optimization.

[0119] In step 1022, the decision tree corresponding to the data processing request is obtained.

[0120] In some embodiments, different operating environment parameters correspond to different levels in the decision tree.

[0121] In some embodiments, a decision tree is a supervised learning algorithm for classification and regression tasks. It divides data into different categories or predicts continuous values ​​using a series of decision rules. The structure of a decision tree resembles an inverted tree, where each internal node represents a decision rule for splitting the data, each branch represents a decision outcome, and each leaf node represents a category or a value. In a decision tree, different runtime parameters (also called features or attributes) correspond to different levels within the tree. The construction of a decision tree typically involves selecting the feature that best splits the dataset as the decision rule for the current node. This process is recursive; each child node continues to select the best feature for splitting until a stopping condition is met, such as reaching maximum depth, reaching a minimum number of samples in the node, or all samples belonging to the same category. Advantages of decision trees include ease of understanding and interpretation, the ability to handle both numerical and categorical data, and the elimination of the need for data preprocessing such as normalization. However, decision trees are also prone to overfitting, especially with large feature spaces. To reduce overfitting, pruning techniques or other regularization methods can be used. In data processing requests for electronic devices, decision trees can be used to determine resource allocation strategies based on different runtime parameters. For example, decision trees can determine the optimal allocation of CPU, memory, and storage resources based on factors such as data volume, resource utilization ratio, and network transmission speed, in order to improve data processing efficiency and response speed.

[0122] In some embodiments, when the data processing request is the first data processing request sent by the application, step 1022 above can be implemented as follows: obtain a preset judgment condition for each of the operating environment parameters, the judgment condition being used to determine whether the initial parameter value of the operating environment parameter is within a preset parameter value range; construct a decision tree corresponding to the data processing request by using the judgment condition of each of the operating environment parameters as the non-leaf node of the decision tree and multiple preset weight adjustment sequences as leaf nodes.

[0123] In some embodiments, the server first needs to define the judgment conditions for each runtime environment parameter. These judgment conditions are typically set based on historical data, experience, and business requirements to determine whether the initial parameter value of the runtime environment parameter falls within a preset parameter value range. For example, for the runtime environment parameter of data volume, the judgment conditions might be "data volume less than 10MB," "data volume between 10MB and 100MB," or "data volume greater than 100MB." The judgment conditions for each runtime environment parameter will serve as non-leaf nodes in the decision tree. These nodes represent key decision points in the decision-making process, and the server will make judgments at these nodes based on the runtime environment parameter values ​​of the current data processing request. For example, the server might first determine whether the data volume is less than 10MB; if so, it will continue the decision along the corresponding branch; otherwise, it will continue to the next condition. Leaf nodes represent the final decision result of the decision tree, i.e., the weight adjustment sequence. Each leaf node corresponds to a specific combination of runtime environment parameters, and the server will adjust the weight sequence according to these combinations. The preset weight adjustment sequence is set based on historical analysis and optimization results of system performance under different combinations of runtime environment parameters. For example, if the data volume is large and the network transmission speed is slow, the server may pre-determine an adjustment sequence that increases the weight of CPU and memory resources. The server combines the non-leaf nodes and leaf nodes mentioned above to construct a complete decision tree. This decision tree will guide the server to make a series of decisions based on the runtime environment parameter values ​​of the first data processing request, and ultimately determine a suitable weight adjustment sequence.

[0124] In some embodiments, a parameter value range refers to a series of numerical ranges predefined for each operating environment parameter. These ranges are used to classify the initial parameter values ​​of the operating environment parameters so that the decision tree can make corresponding decisions based on the range in which the parameter value falls. For example, for the operating environment parameter of network transmission speed, the parameter value range may include "below 10Mbps", "10Mbps to 100Mbps", and "above 100Mbps".

[0125] In some embodiments, in a decision tree, non-leaf nodes (also called internal nodes or decision nodes) represent a decision point in the decision-making process. Each non-leaf node contains a decision condition for splitting the dataset into different subsets based on initial parameter values ​​of the runtime environment parameters. These decision conditions are typically set based on a range of said initial parameter values. For example, a non-leaf node might contain the decision condition "whether the data size is less than 10MB".

[0126] In some embodiments, leaf nodes (also called terminal nodes or decision nodes) are the end nodes of the decision tree, representing the final result of the decision-making process. Each leaf node corresponds to a specific decision result, i.e., a preset weight adjustment sequence. When the decision tree traverses to a leaf node, the server adjusts the resource allocation strategy according to the weight adjustment sequence corresponding to that node. For example, a leaf node might correspond to the adjustment sequence of "increasing the weight of CPU and memory resources".

[0127] In some embodiments, a preset weight adjustment sequence refers to a set of weight adjustment values ​​pre-defined for each leaf node. These adjustment values ​​guide the server on how to adjust the weights of different operating environment parameters to optimize data processing performance. Preset weight adjustment sequences are typically set based on historical data, experience, and business needs, aiming to achieve optimal resource allocation under specific combinations of operating environment parameters. For example, a preset weight adjustment sequence might include "increasing the weight corresponding to data volume by 10%" or "decreasing the weight corresponding to network transmission speed by 5%."

[0128] As an example, in the application scenario of electronic devices processing I / O requests, suppose we have an intelligent storage system that needs to optimize resource allocation based on the first received data processing request. This system obtains pre-defined judgment conditions for each operating environment parameter. The storage system pre-sets several operating environment parameters and their judgment conditions, such as: Data volume: less than 1GB, 1GB to 10GB, greater than 10GB; Disk I / O rate: less than 100MB / s, 100MB / s to 500MB / s, greater than 500MB / s; Network bandwidth: less than 100Mbps, 100Mbps to 1Gbps, greater than 1Gbps. The storage system treats the judgment conditions for each operating environment parameter as non-leaf nodes in a decision tree. For example, the first decision point might be judging whether the data volume is less than 1GB. The storage system pre-sets a weight adjustment sequence for each possible combination of operating environment parameters. For example, if the data volume is less than 1GB, the disk I / O rate is less than 100MB / s, and the network bandwidth is less than 100Mbps, the pre-set weight adjustment sequence is to increase the weight of disk I / O rate and network bandwidth. If the data volume is between 1GB and 10GB, the disk I / O rate is between 100MB / s and 500MB / s, and the network bandwidth is between 100Mbps and 1Gbps, the default weight adjustment sequence is to maintain the current weights. If the data volume is greater than 10GB, the disk I / O rate is greater than 500MB / s, and the network bandwidth is greater than 1Gbps, the default weight adjustment sequence is to reduce the weights of disk I / O rate and network bandwidth. The storage system combines the above non-leaf nodes and leaf nodes to construct a complete decision tree. When a data processing request is received for the first time, the storage system traverses the decision tree based on the runtime environment parameter values ​​of the request to ultimately determine an appropriate weight adjustment sequence. The storage system can dynamically adjust its resource allocation strategy based on the specific circumstances of the first data processing request to optimize the processing efficiency and response speed of I / O requests. The decision tree provides a structured approach that allows the storage system to make informed decisions based on the initial parameter values ​​of the runtime environment, thereby improving data processing efficiency.

[0129] Thus, when an electronic device processes an application's initial data processing request, it acquires the pre-defined judgment conditions for each operating environment parameter and uses these conditions as non-leaf nodes of a decision tree. This constructs a tree structure that guides resource allocation decisions based on parameter value ranges, enabling intelligent resource management and optimization. This method is based on pre-defined weight adjustment sequences, optimized from historical data and experience, guiding the electronic device on how to adjust resource allocation under different circumstances. Through this decision tree approach, the electronic device can quickly make resource allocation decisions based on the initial parameter values ​​upon initial request processing, thereby improving system response speed and processing efficiency. This not only reduces the need for manual adjustments but also allows for continuous optimization of the decision tree as the system runs and data accumulates, achieving more intelligent and efficient resource management. Furthermore, the structured decision-making process of the decision tree enables the electronic device to better understand and interpret the resource allocation decision process, facilitating further system optimization and troubleshooting.

[0130] In some embodiments, the above-described construction of the decision tree corresponding to the data processing request, using the judgment conditions of each of the operating environment parameters as non-leaf nodes of the decision tree and multiple preset weight adjustment sequences as leaf nodes, can be achieved in the following manner: determining the order of the multiple operating environment parameters, wherein the order of the operating environment parameters corresponds to the level of the decision tree in which the operating environment parameters are located; obtaining the preset weight adjustment sequences, wherein the number of preset weight adjustment sequences is positively correlated with the number of operating environment parameters; and performing relationship fitting on the multiple operating environment parameters based on the order of the multiple operating environment parameters, the judgment conditions of each of the operating environment parameters, and the preset weight adjustment sequences to obtain the decision tree.

[0131] In some embodiments, the electronic device needs to determine the order of multiple operating environment parameters. This order determines the hierarchical position of the operating environment parameters in the decision tree, typically based on the importance and relevance of the operating environment parameters to data processing performance. For example, if the amount of data has the greatest impact on performance, then the amount of data may be placed at the top of the decision tree. The electronic device then obtains a preset weight adjustment sequence. These sequences are optimized based on historical data and experience to guide how the device adjusts resource allocation. The number of weight adjustment sequences is positively correlated with the number of operating environment parameters, meaning that each operating environment parameter has a corresponding weight adjustment strategy. The electronic device uses the order of operating environment parameters, the judgment conditions for each operating environment parameter, and the preset weight adjustment sequence to perform relationship fitting on multiple operating environment parameters. This process involves using the judgment conditions of the operating environment parameters as non-leaf nodes of the decision tree, and the weight adjustment sequence as leaf nodes. In this way, the electronic device can establish a mapping relationship from operating environment parameters to resource allocation decisions. Through the above relationship fitting process, the electronic device constructs a complete decision tree. This decision tree can guide the electronic device to make a series of decisions based on the operating environment parameter values ​​of the data processing request, ultimately determining a suitable weight adjustment sequence to optimize resource allocation and data processing performance.

[0132] In some embodiments, decision conditions are rules used in a decision tree to segment data. They determine which branch the data flows to based on whether the initial parameter values ​​of the runtime environment parameters meet specific conditions. These conditions typically involve comparison operations, such as equal to, greater than, less than, or within a certain range. The design of decision conditions aims to divide the dataset into smaller subsets based on different values ​​of the runtime environment parameters, facilitating subsequent decision-making.

[0133] In some embodiments, a weighting sequence is a set of preset weight values ​​used to guide electronic devices on how to adjust the weights of different operating environment parameters to optimize resource allocation and data processing performance. These sequences are typically set based on historical data, experience, and business needs, aiming to achieve optimal resource allocation under specific combinations of operating environment parameters. The number of weighting sequences is positively correlated with the number of operating environment parameters, meaning that each operating environment parameter has a corresponding weighting strategy.

[0134] In some embodiments, relation fitting is a key step in constructing a decision tree, which involves combining judgment conditions for operating environment parameters, weight adjustment sequences, and the ranking of operating environment parameters to form a model capable of reflecting the relationship between operating environment parameters and resource allocation decisions. This process typically involves statistical analysis, machine learning algorithms, or other optimization techniques to determine how operating environment parameters affect resource allocation decisions and how these operating environment parameters are mapped into the structure of the decision tree. The purpose of relation fitting is to create an accurate and effective decision tree that can guide an electronic device to make optimal resource allocation decisions based on different values of operating environment parameters.

[0135] In this way, the electronic device can construct a structured and efficient decision tree to optimize resource allocation for data processing requests. First, the electronic device determines the ranking of multiple operating environment parameters, which determines the hierarchical position of the operating environment parameters in the decision tree, ensuring the priority of key factors in the decision-making process. Subsequently, the electronic device obtains preset weight adjustment sequences, the number of which is positively correlated with the number of operating environment parameters, providing corresponding resource allocation strategies for each possible combination of operating environment parameters. Based on the ranking of operating environment parameters, judgment conditions, and preset weight adjustment sequences, the electronic device performs relation fitting to associate operating environment parameters with resource allocation decisions, forming a decision tree that can reflect the complex relationships between operating environment parameters. This decision tree structure not only improves the efficiency and accuracy of the electronic device in processing data requests but also makes resource allocation more intelligent and optimized. The electronic device can better understand and respond to various data processing requests, providing more efficient and reliable performance.

[0136] In some embodiments, the multiple operating environment parameters include an i-th operating environment parameter, 1<i≤N, where N is used to indicate the total number of the operating environment parameters, the number of layers of the decision tree is N+1, and the number of the adjustment sequences is 2 N , and values of sequence elements in different adjustment sequences are at least partially different.

[0137] In some embodiments, the decision tree obtained by fitting the relationship between the plurality of operating environment parameters based on the sorting of the plurality of operating environment parameters, the judgment condition of each of the operating environment parameters, and the preset weight adjustment sequence can be implemented as follows: Using the preset judgment condition of the first operating environment parameter as the first node corresponding to the first operating environment parameter, the first node is the root node of the decision tree; traversing i, the following processing is performed: using the preset judgment condition of the i-th operating environment parameter as the i-th node corresponding to the i-th operating environment parameter, for each (i-1)-th operating environment parameter corresponding to the (i-1)-th node, the two i-th nodes are respectively used as the first child node and the second child node of the (i-1)-th node; the first child node indicates that the preset judgment condition of the (i-1)-th operating environment parameter is satisfied, and the second child node indicates that the preset judgment condition of the (i-1)-th operating environment parameter is not satisfied; for each N-th node, the two weight adjustment sequences corresponding to the N-th node are used as the child nodes of the N-th node to obtain the decision tree corresponding to the data processing request.

[0138] As an example, see Figure 8 , Figure 8 This is a schematic diagram of the decision tree structure provided in the embodiments of this application. Figure 1 The decision tree is constructed by taking the preset judgment condition of the first operating environment parameter as the first node corresponding to the first operating environment parameter, and the first node is the root node of the decision tree. The decision tree is constructed by taking the preset judgment condition of the second operating environment parameter as the second node corresponding to the second operating environment parameter. For each first node corresponding to the first operating environment parameter, two second nodes are respectively taken as the first child node and the second child node of the first node. The first child node indicates that the preset judgment condition of the first operating environment parameter is met, and the second child node indicates that the preset judgment condition of the first operating environment parameter is not met. The decision tree is constructed by taking the preset judgment condition of the third operating environment parameter as the third node. For each second node corresponding to the second operating environment parameter, two third nodes are respectively taken as the first child node and the second child node of the second node. The first child node indicates that the preset judgment condition of the second operating environment parameter is met, and the second child node indicates that the preset judgment condition of the second operating environment parameter is not met. For each third node, two weight adjustment sequences corresponding to the third node are taken as child nodes of the third node to obtain the decision tree corresponding to the data processing request.

[0139] Continuing from the previous example, the weight adjustment sequence 11 can be: {1, 1, 1}; the weight adjustment sequence 12 can be: {1, 1, 0}; the weight adjustment sequence 13 can be: {1, 0, 1}; the weight adjustment sequence 14 can be: {1, 0, 0}; the weight adjustment sequence 15 can be: {0, 1, 1}; the weight adjustment sequence 16 can be: {0, 1, 0}; the weight adjustment sequence 17 can be: {0, 0, 1}; and the weight adjustment sequence 18 can be: {0, 0, 0}.

[0140] In some embodiments, multiple runtime environment parameters are numbered from runtime environment parameter 1 to runtime environment parameter N, where N represents the total number of runtime environment parameters. The number of levels in the decision tree is N+1, meaning the depth of the decision tree is N+1 levels. The number of adjustment sequences is 2^N, because each runtime environment parameter has two possible states (satisfying or not satisfying the judgment condition), so the total number of possible combinations is 2 to the power of N. The values ​​of the sequence elements in different adjustment sequences are at least partially different, meaning that each adjustment sequence is a specific weight adjustment strategy for different combinations of runtime environment parameters. The preset judgment condition of the first runtime environment parameter is taken as the first node corresponding to the first runtime environment parameter, and this first node is taken as the root node of the decision tree. The root node is the starting point of the decision tree, and it represents the first runtime environment parameter that needs to be judged. Traverse i from 2 to N, and perform the following processing: the preset judgment condition of the i-th runtime environment parameter is taken as the i-th node corresponding to the i-th runtime environment parameter. For each (i-1)-th node corresponding to the (i-1)-th runtime environment parameter, the two i-th nodes are taken as the first child node and the second child node of the (i-1)-th node, respectively. This ensures that the judgment conditions for each operating environment parameter are at the corresponding level of the decision tree, and that each judgment condition has two possible branches, corresponding to whether the condition is satisfied or not. For each Nth node, the two adjustment sequences corresponding to the Nth node are the child nodes of the Nth node. These child nodes are the leaf nodes of the decision tree, representing the endpoint of the decision process, and each leaf node corresponds to a specific weight adjustment sequence. The decision tree is constructed as a binary tree structure, where each internal node represents a judgment condition for an operating environment parameter, and each leaf node represents a weight adjustment sequence. This structure allows electronic devices to make judgments along the path of the decision tree based on the operating environment parameter values ​​of the data processing request, ultimately determining a suitable weight adjustment sequence to optimize resource allocation and data processing performance.

[0141] As an example, in an application scenario where electronic devices handle I / O requests, suppose we have an intelligent storage system that needs to optimize resource allocation based on the first received data processing request. The storage system identifies multiple operating environment parameters, such as data volume, disk I / O rate, and network bandwidth, and ranks them according to their impact on I / O performance. Assuming data volume is ranked first, disk I / O rate second, and network bandwidth third, then N = 3. The storage system pre-sets a weighting sequence for each combination of operating environment parameters. Since N = 3, the number of adjustment sequences is 2^3 = 8. Each sequence is for a specific combination of operating environment parameters, such as a combination of large data volume, high disk I / O rate, and high network bandwidth. The storage system uses the first operating environment parameter (data volume) as the root node. For example, determining whether the data volume is greater than 10GB. Traversing from i to i3, the decision tree is constructed at other levels: For the second runtime environment parameter (disk I / O rate), for each branch of the root node (data size greater than 10GB and less than 10GB), two child nodes are created, representing whether the disk I / O rate is higher than 500MB / s. For the third runtime environment parameter (network bandwidth), for each child node of the second runtime environment parameter, two child nodes are created, representing whether the network bandwidth is higher than 1Gbps. For each child node of the third runtime environment parameter (i.e., the Nth node), a preset weight adjustment sequence is used as the leaf node. For example, if the data size is greater than 10GB, the disk I / O rate is higher than 500MB / s, and the network bandwidth is higher than 1Gbps, the corresponding weight adjustment sequence might be to increase the weight of disk I / O rate and the weight of network bandwidth. The storage system constructs a three-layer decision tree that can judge along the path of the decision tree based on the runtime environment parameter values ​​of the first data processing request, and finally determine a suitable weight adjustment sequence to optimize the processing efficiency and response speed of IO requests. This method not only improves the intelligence level of the system, but also continuously optimizes the decision tree as the system operates and data accumulates, achieving more efficient and reliable resource management.

[0142] In this way, the electronic device can construct a comprehensive and efficient decision tree to optimize resource allocation for data processing requests. The decision tree has N+1 levels, ensuring that each operating environment parameter is fully considered during the decision-making process. The number of adjustment sequences is 2^N, providing sufficient flexibility to adapt to resource allocation needs under different combinations of operating environment parameters. The values ​​of sequence elements in different adjustment sequences are at least partially different, allowing the electronic device to perform precise weight adjustments for specific combinations of operating environment parameters. By using the preset judgment condition of the first operating environment parameter as the root node and traversing each operating environment parameter, using the judgment condition as a node, the electronic device can systematically construct the decision tree. The two child nodes of each node indicate whether the judgment condition is met or not, allowing the decision tree to cover all possible combinations of operating environment parameters. Finally, for each Nth node, the electronic device uses the preset adjustment sequence as child nodes, completing the construction of the decision tree. This decision tree structure not only improves the efficiency and accuracy of the electronic device in processing data requests but also makes resource allocation more intelligent and optimized. The electronic device can better understand and respond to various data processing requests, providing more efficient and reliable performance.

[0143] In some embodiments, when the data processing request is the j-th data processing request, j is the number of times the application sends the data processing request, and j is a positive integer greater than or equal to 2. The above step 1022 can be implemented as follows: obtain the decision tree corresponding to the (j-1)-th data processing request; when there is no initial weight equal to zero in the initial weight sequence corresponding to the (j-1)-th data processing request of the application, determine the decision tree corresponding to the (j-1)-th data processing request of the application as the decision tree corresponding to the j-th data processing request; when there is an initial weight equal to zero in the initial weight sequence corresponding to the (j-1)-th data processing request, adjust the decision tree corresponding to the (j-1)-th data processing request based on the initial weight sequence corresponding to the (j-1)-th data processing request to obtain the decision tree corresponding to the j-th data processing request.

[0144] In some embodiments, when the electronic device receives the j-th data processing request from the application (j is a positive integer greater than or equal to 2), the electronic device needs to decide how to optimize resource allocation based on previous processing. The electronic device first obtains the decision tree corresponding to the (j-1)-th data processing request. This decision tree is constructed based on the runtime environment parameters and weight adjustment sequence of the (j-1)-th request, reflecting the resource allocation strategy of the electronic device when processing the previous request. The electronic device checks the initial weight sequence corresponding to the (j-1)-th data processing request. The initial weight sequence is the weight value of each runtime environment parameter in the decision tree, and these weight values ​​determine the proportion of resource allocation. If there is no initial weight equal to zero in the initial weight sequence, it means that all runtime environment parameters have played a role in resource allocation, and the electronic device considers the previous resource allocation strategy to be effective. Therefore, the electronic device directly determines the decision tree corresponding to the (j-1)-th data processing request as the decision tree corresponding to the j-th data processing request and continues to use the same resource allocation strategy. If there is an initial weight equal to zero in the initial weight sequence, it means that some runtime environment parameters have not played a role in resource allocation, and the electronic device considers that the previous resource allocation strategy may need optimization. Therefore, the electronic device needs to adjust the decision tree corresponding to the (j-1)th data processing request based on the initial weight sequence of the (j-1)th data processing request to obtain the decision tree corresponding to the j-th data processing request. When the decision tree needs adjustment, the electronic device analyzes the operating environment parameters with an initial weight sequence of zero to understand why these factors did not play a role in resource allocation. Then, based on the analysis results, the electronic device makes corresponding adjustments to the decision tree, such as adjusting the judgment conditions of the operating environment parameters, the weight adjustment sequence, or the sorting of the operating environment parameters, to optimize the resource allocation strategy. The electronic device can dynamically adjust the resource allocation strategy based on the historical data processing requests of the application, improving the system's response speed and processing efficiency. This method not only reduces the need for manual adjustments but also continuously optimizes the decision tree as the system runs and data accumulates, achieving more intelligent and efficient resource management.

[0145] In some embodiments, the decision tree corresponding to the (j-1)th data processing request refers to the decision tree constructed by the electronic device based on the operating environment parameters and weight adjustment sequence at that time when processing the (j-1)th data processing request. This decision tree reflects how the electronic device adjusts its resource allocation strategy according to different operating environment parameter values ​​during the (j-1)th request. It is a model optimized based on historical data and experience, used to guide the electronic device in making decisions when processing similar requests. The decision tree corresponding to the j-th data processing request refers to the decision tree constructed or adjusted by the electronic device based on the result of the (j-1)th request and the current operating environment parameters when processing the j-th data processing request. This decision tree is optimized based on the decision tree of the (j-1)th request. If there is no initial weight equal to zero in the initial weight sequence of the (j-1)th request, then the decision tree of the j-th request will directly adopt the decision tree of the (j-1)th request. If there is an initial weight equal to zero, the electronic device will adjust the decision tree of the (j-1)th request to optimize the resource allocation strategy, thereby obtaining the decision tree of the j-th request. This process demonstrates the adaptive capabilities and optimization mechanisms of electronic devices, enabling resource allocation to continuously improve as requests change and the system learns.

[0146] As an example, in an application scenario where data processing requests are I / O requests, suppose the electronic device is an intelligent storage system that needs to optimize disk I / O performance based on I / O requests sent by the application. Assuming this is the third I / O request sent by the application (j=3), the electronic device first obtains the decision tree corresponding to the second I / O request. This decision tree is constructed based on the runtime environment parameters of the second request (such as data volume, disk I / O rate, network bandwidth, etc.) and a weight adjustment sequence, reflecting how the electronic device adjusted resource allocation based on these runtime environment parameters during the second request. The electronic device checks the initial weight sequence corresponding to the second I / O request. If all weights in the sequence are not zero, it means that all runtime environment parameters played a role in resource allocation during the second request, and the electronic device considers the previous resource allocation strategy effective. Since there are no initial weights equal to zero in the initial weight sequence of the second request, the electronic device directly determines the decision tree corresponding to the second I / O request as the decision tree corresponding to the third I / O request. This means that the electronic device will continue to use the same resource allocation strategy to handle the third I / O request. If the initial weight sequence corresponding to the second I / O request contains an initial weight equal to zero, the electronic device will adjust the decision tree corresponding to the second I / O request based on the initial weight sequence of the second request. For example, if the network bandwidth runtime parameter does not play a role in the second request (weight zero), the electronic device may adjust the decision tree to give more consideration to network bandwidth, or adjust the weights of other runtime parameters to optimize the resource allocation strategy. Intelligent storage systems can dynamically adjust resource allocation strategies based on the application's I / O request history, improving the performance and efficiency of disk I / O operations.

[0147] Thus, when the electronic device receives the j-th data processing request, it first obtains the decision tree corresponding to the (j-1)-th request. If all weights in the initial weight sequence of the (j-1)-th request are not zero, it indicates that the previous resource allocation strategy was effective, and the electronic device can directly use this decision tree for resource allocation. This ensures that effective strategies can be continuously applied in successive requests, improving the system's response speed and processing efficiency. However, if there are weights equal to zero in the initial weight sequence, it indicates that some operating environment parameters did not play a role in the previous resource allocation, and the electronic device needs to adjust the decision tree. This adjustment is based on the initial weight sequence of the (j-1)-th request. By analyzing the operating environment parameters with zero weights, the electronic device can optimize the structure and weight allocation of the decision tree to better adapt to the current request characteristics. This not only reduces the need for manual adjustments but also allows the decision tree to be continuously optimized as the system runs and data accumulates, achieving more intelligent and efficient resource management. Through this adaptive optimization process, the electronic device can better understand and respond to various data processing requests, providing more efficient and reliable performance.

[0148] In some embodiments, the above-mentioned adjustment of the decision tree corresponding to the (j-1)th data processing request based on the initial weight sequence corresponding to the (j-1)th data processing request to obtain the decision tree corresponding to the j-th data processing request can be implemented in the following way: For each initial weight in the initial weight sequence of the (j-1)th data processing request of the application, the following processing is performed to obtain the decision tree corresponding to the j-th data processing request: When the value of the initial weight is zero, the node of the level corresponding to the initial weight in the decision tree corresponding to the (j-1)th data processing request is deleted, and the nodes in the two levels adjacent to the level corresponding to the initial weight are connected.

[0149] In some embodiments, when the electronic device receives the j-th data processing request, if there are initial weights equal to zero in the initial weight sequence of the (j-1)-th request, the electronic device needs to adjust the decision tree corresponding to the (j-1)-th request to optimize the resource allocation strategy. The electronic device first analyzes the initial weight sequence of the (j-1)-th data processing request and identifies all initial weights with weights of zero. The operating environment parameters corresponding to these weights did not play a role in previous resource allocation. For each initial weight with a weight of zero, the electronic device finds the node of the level corresponding to that weight in the decision tree corresponding to the (j-1)-th request and deletes it. This is because a weight of zero means that the operating environment parameter is not important in resource allocation and does not need to be further considered in the decision tree. After deleting the node, the electronic device connects the nodes in the two levels adjacent to the level corresponding to the deleted node. This step ensures that the structure of the decision tree remains intact and is not broken due to the deletion of the node. By connecting the nodes of adjacent levels, the electronic device maintains the connectivity of the decision tree, allowing the resource allocation strategy to continue to be adjusted based on the remaining operating environment parameters. The electronic device adjusts the decision tree corresponding to the (j-1)-th request, generating the decision tree corresponding to the j-th request. This new decision tree eliminates runtime environment parameters with zero weight, focusing instead on factors that have a real impact on resource allocation, thereby improving the efficiency and accuracy of resource allocation. Electronic devices can dynamically adjust the decision tree based on the historical data processing requests of applications, optimizing resource allocation strategies. This approach not only reduces the need for manual adjustments but also continuously optimizes the decision tree as the system runs and data accumulates, achieving more intelligent and efficient resource management.

[0150] As an example, in an application scenario where data processing requests are I / O requests, suppose the electronic device is an intelligent storage system that needs to optimize disk I / O operation performance based on I / O requests sent by the application. Let's say this is the third I / O request sent by the application (j=3). The electronic device first obtains the decision tree corresponding to the second I / O request. This decision tree is constructed based on the runtime environment parameters of the second request (such as data volume, disk I / O rate, network bandwidth, etc.) and the weight adjustment sequence, reflecting how the electronic device adjusts resource allocation according to these runtime environment parameters during the second request. The electronic device analyzes the initial weight sequence of the second I / O request and finds that the weight corresponding to the runtime environment parameter of network bandwidth is zero. This means that network bandwidth has no impact on resource allocation during the second request. The electronic device finds the node at the level corresponding to network bandwidth in the decision tree corresponding to the second request and deletes it. This is because network bandwidth is not important in resource allocation and does not need to be further considered in the decision tree. After deleting the node, the electronic device connects the nodes in the two levels adjacent to the level corresponding to network bandwidth, ensuring that the structure of the decision tree remains intact and is not broken due to the deletion of the node. The electronic device adjusted the decision tree corresponding to the second request, generating a decision tree for the third request. This new decision tree excludes network bandwidth as an environmental parameter, focusing more on data volume and disk I / O rate—two factors that have a real impact on resource allocation—thereby improving the efficiency and accuracy of resource allocation.

[0151] Thus, when the electronic device receives the j-th data processing request, if there is an initial weight equal to zero in the initial weight sequence of the (j-1)-th request, the electronic device needs to adjust the decision tree corresponding to the (j-1)-th request. For each initial weight with a weight of zero, the electronic device finds the corresponding node in the decision tree and deletes it, while connecting nodes at adjacent levels to maintain the structural integrity of the decision tree. This adjustment is based on the initial weight sequence of the (j-1)-th request. By analyzing the operating environment parameters with weights of zero, the electronic device can optimize the structure and weight allocation of the decision tree to better adapt to the characteristics of the current request. This not only reduces the need for manual adjustments but also allows the decision tree to be continuously optimized as the system runs and data accumulates, achieving more intelligent and efficient resource management. Through this adaptive optimization process, the electronic device can better understand and respond to various data processing requests, providing more efficient and reliable performance.

[0152] In step 1023, a weight adjustment sequence is obtained by predicting the decision tree based on the initial parameter values ​​of each of the operating environment parameters.

[0153] In some embodiments, the weight adjustment sequence includes multiple weight adjustment coefficients for adjusting the weights of multiple operating environment parameters.

[0154] In some embodiments, a weight adjustment sequence refers to a series of weight adjustment coefficients predicted in a decision tree model based on the initial parameter values ​​of each operating environment parameter. These adjustment coefficients are used to adjust the initial weights of multiple operating environment parameters to optimize resource allocation strategies. The generation of the weight adjustment sequence is based on the decision tree's judgment and analysis of operating environment parameters. By learning from historical data and experience, the decision tree can identify which operating environment parameters have a greater influence on resource allocation, thereby assigning these factors higher weight adjustment coefficients. Each weight adjustment coefficient in the weight adjustment sequence is a numerical value representing the importance of the corresponding operating environment parameter in resource allocation. These coefficients can be positive, negative, or zero, representing the promoting, inhibiting, or no effect of the operating environment parameter on resource allocation, respectively. By adjusting these coefficients, electronic devices can dynamically optimize resource allocation strategies to adapt to different data processing requests and system environments.

[0155] In some embodiments, the nodes at each level corresponding to the operating environment parameter in the decision tree are preset judgment conditions for the operating environment parameter, and the leaf nodes of the decision tree are preset weight adjustment sequences for adjusting the initial weights. The values ​​of the weight adjustment coefficients in the preset weight adjustment sequences of different leaf nodes are at least partially different, and the weight adjustment coefficients correspond one-to-one with the operating environment parameters.

[0156] As an example, see Figure 15 The decision tree shown has nodes at the corresponding levels for the file size runtime environment parameter, which are the preset judgment conditions for the file size runtime environment parameter: whether the file size is greater than the file size threshold. Similarly, nodes at the corresponding levels for the IO size runtime environment parameter have preset judgment conditions for the IO size runtime environment parameter: whether the IO size is greater than the IO size threshold.

[0157] In some embodiments, in the decision tree model, the nodes at each level corresponding to each runtime parameter represent preset judgment conditions for that runtime parameter. These judgment conditions are set based on historical data and experience and are used to evaluate the performance of the runtime parameter under different parameter values. For example, for a runtime parameter "data volume," the judgment condition might be "whether the data volume is greater than a certain threshold." The leaf nodes of the decision tree are preset weight adjustment sequences used to adjust the initial weights. These leaf nodes represent the weight adjustment coefficients of runtime parameters on resource allocation under specific conditions. Each weight adjustment coefficient in the weight adjustment sequence corresponds one-to-one with a runtime parameter, indicating the importance of that runtime parameter in resource allocation. The values ​​of the weight adjustment coefficients in the preset weight adjustment sequences of different leaf nodes may differ. This means that the weight of runtime parameters on resource allocation may vary under different conditions. For example, in one leaf node, the runtime parameter of data volume may have a higher weight adjustment coefficient, while in another leaf node, the runtime parameter of network bandwidth may have a higher weight adjustment coefficient. The decision tree model can predict the corresponding weight adjustment sequence based on different runtime parameter values, thereby optimizing the resource allocation strategy.

[0158] In some embodiments, the above-mentioned prediction of the weight adjustment sequence based on the initial parameter value of each of the operating environment parameters through the decision tree can be achieved in the following manner: based on the initial parameter value of each of the operating environment parameters, through the decision tree corresponding to the data processing request, determine the target leaf node corresponding to the data processing request in the leaf nodes of the decision tree; and determine the preset weight adjustment sequence corresponding to the target leaf node as the weight adjustment sequence.

[0159] In some embodiments, the electronic device first collects initial parameter values ​​of the operating environment parameters related to the current data processing request. These parameter values ​​may include data volume, processing time, network bandwidth, etc. The collected data is preprocessed to ensure accuracy and consistency for subsequent analysis and prediction. The electronic device inputs the preprocessed data into a decision tree model corresponding to the current data processing request. This decision tree model is built based on historical data and experience and includes judgment conditions and weight adjustment sequences for multiple operating environment parameters. The decision tree model makes judgments along the branches of the tree based on the input operating environment parameter values, gradually narrowing down the range of possible leaf nodes. The decision tree model eventually determines a target leaf node. This leaf node corresponds to a specific combination of conditions, reflecting the characteristics of the current data processing request. The target leaf node contains a preset weight adjustment sequence, which is optimized based on historical data and experience, and is used to adjust the initial weights of the operating environment parameters. The electronic device determines the preset weight adjustment sequence corresponding to the target leaf node as the weight adjustment sequence for the current data processing request. The weight adjustment sequence contains multiple weight adjustment coefficients, each corresponding to an operating environment parameter, used to adjust the initial weights to optimize resource allocation strategies. Electronic devices can predict weight adjustment sequences using decision trees based on the initial parameter values ​​of each operating environment parameter.

[0160] As an example, based on the initial parameter values ​​of each of the aforementioned operating environment parameters, the target leaf node corresponding to the data processing request is determined from the leaf nodes of the decision tree corresponding to the data processing request. (See [reference]). Figure 15 Based on the initial parameter value of each of the operating environment parameters, the decision tree corresponding to the data processing request is used to make condition judgments layer by layer until the path is found to a leaf node, and the leaf node found is determined as the target leaf node.

[0161] As an example, see Figure 15 If the file size is greater than the file size threshold, the IO size is greater than the IO factor threshold, the IO type is sequential IO, the service quality level is high, the CPU utilization rate is greater than the CPU factor threshold, the memory utilization rate is greater than the memory factor threshold, the system load is greater than the load factor threshold, and the network speed is greater than the network speed threshold, then the leaf node corresponding to sequence 1 is determined as the target leaf node. Sequence 1 is the weight adjustment sequence: {1, 1, 1, 1, 1, 1, 1}.

[0162] As an example, see Figure 15If the file size is greater than the file size threshold, the IO size is greater than the IO factor threshold, the IO type is sequential IO, the service quality level is high, the CPU utilization rate is greater than the CPU factor threshold, the memory utilization rate is greater than the memory factor threshold, the system load is greater than the load factor threshold, and the network speed is greater than the network speed threshold, then the leaf node corresponding to sequence 1 is determined as the target leaf node. Sequence 1 is the weight adjustment sequence: {1, 1, 1, 1, 1, 1, 1}.

[0163] As an example, see Figure 15 If the file size is greater than the file size threshold, the IO size is greater than the IO factor threshold, the IO type is sequential IO, the service quality level is high, the CPU utilization rate is greater than the CPU factor threshold, the memory utilization rate is greater than the memory factor threshold, the system load is greater than the load factor threshold, and the network speed is less than the network speed threshold, then the leaf node corresponding to sequence 2 is determined as the target leaf node. Sequence 2 is the weight adjustment sequence: {1, 1, 1, 1, 1, 1, 1, 0}.

[0164] As an example, see Figure 15 If the file size is greater than the file size threshold, the IO size is greater than the IO factor threshold, the IO type is sequential IO, the service quality level is high, the CPU utilization rate is greater than the CPU factor threshold, the memory utilization rate is greater than the memory factor threshold, the system load is less than or equal to the load factor threshold, and the network speed is greater than the network speed threshold, then the leaf node corresponding to sequence 3 is determined as the target leaf node. Sequence 3 is the weight adjustment sequence: {1, 1, 1, 1, 1, 0, 1}.

[0165] As an example, see Figure 15 If the file size is greater than the file size threshold, the IO size is greater than the IO factor threshold, the IO type is sequential IO, the service quality level is high, the CPU utilization is greater than the CPU factor threshold, the memory utilization is greater than the memory factor threshold, the system load is less than or equal to the load factor threshold, and the network speed is less than the network speed threshold, then the leaf node corresponding to sequence 4 is determined as the target leaf node. Sequence 4 is the weight adjustment sequence: {1, 1, 1, 1, 1, 0, 0}.

[0166] As an example, see Figure 15If the file size is greater than the file size threshold, the IO size is greater than the IO factor threshold, the IO type is sequential IO, the service quality level is high, the CPU utilization is greater than the CPU factor threshold, the memory utilization is greater than the memory factor threshold, the memory utilization is less than the memory factor threshold, the system load is greater than the load factor threshold, and the network speed is greater than the network speed threshold, then the leaf node corresponding to sequence 5 is determined as the target leaf node. Sequence 5 is the weight adjustment sequence: {1, 1, 1, 1, 1, 0, 1, 1}.

[0167] As an example, see Figure 15 If the file size is greater than the file size threshold, the IO size is greater than the IO factor threshold, the IO type is sequential IO, the service quality level is high, the CPU utilization is greater than the CPU factor threshold, the memory utilization is greater than the memory factor threshold, the memory utilization is less than the memory factor threshold, the system load is greater than the load factor threshold, and the network speed is less than the network speed threshold, then the leaf node corresponding to sequence 6 is determined as the target leaf node. Sequence 6 is the weight adjustment sequence: {1, 1, 1, 1, 1, 0, 1, 0}.

[0168] As an example, see Figure 15 If the file size is greater than the file size threshold, the IO size is greater than the IO factor threshold, the IO type is sequential IO, the service quality level is high, the CPU utilization is greater than the CPU factor threshold, the memory utilization is greater than the memory factor threshold, the memory utilization is less than the memory factor threshold, the system load is less than the load factor threshold, and the network speed is greater than the network speed threshold, then the leaf node corresponding to sequence 7 is determined as the target leaf node. Sequence 7 is the weight adjustment sequence: {1, 1, 1, 1, 0, 0, 1}.

[0169] As an example, see Figure 15 If the file size is greater than the file size threshold, the IO size is greater than the IO factor threshold, the IO type is sequential IO, the service quality level is high, the CPU utilization is greater than the CPU factor threshold, the memory utilization is greater than the memory factor threshold, the memory utilization is less than the memory factor threshold, the system load is less than the load factor threshold, and the network speed is less than the network speed threshold, then the leaf node corresponding to sequence 8 is determined as the target leaf node. Sequence 8 is the weight adjustment sequence: {1, 1, 1, 1, 0, 0, 0}.

[0170] Thus, based on the initial parameter values ​​of each runtime environment parameter, a series of judgments and tests are performed through the decision tree corresponding to the data processing request. These judgments and tests proceed along the branches of the decision tree according to the initial parameter values ​​of the runtime environment parameters, ultimately determining the target leaf node corresponding to the data processing request. The target leaf node represents the most suitable weight adjustment strategy under the current runtime environment parameter values. Then, we determine the preset weight adjustment sequence corresponding to the target leaf node as the weight adjustment sequence. This process ensures that the weight adjustment sequence can dynamically adapt to different data processing requests according to the initial parameter values ​​of the runtime environment parameters, thereby optimizing the efficiency and accuracy of data processing.

[0171] In step 1024, the initial weights of each of the operating environment parameters are adjusted based on the weight adjustment sequence to obtain the weights of each of the operating environment parameters.

[0172] In some embodiments, step 1024 above can be implemented as follows: multiply the value of each weight adjustment coefficient in the weight adjustment sequence by the initial weight of the corresponding operating environment parameter to obtain the weight of each operating environment parameter.

[0173] In some embodiments, the electronic device first predicts a weight adjustment sequence using a decision tree model. This sequence contains multiple weight adjustment coefficients, each corresponding to an operating environment parameter, reflecting the importance of that factor in the current data processing request. The electronic device obtains the initial weight for each operating environment parameter. These initial weights are set based on historical data and experience, representing the basic importance of each operating environment parameter in resource allocation without specific adjustments. The electronic device multiplies the value of each weight adjustment coefficient in the weight adjustment sequence by the initial weight of the corresponding operating environment parameter. This multiplication operation essentially applies the weight adjustment coefficient to the initial weight to reflect the impact of the current data processing request on resource allocation. If the initial weight of a certain operating environment parameter is 0.5, and the corresponding weight adjustment coefficient is 1.2, then the adjusted weight is 0.5 * 2 = 0.6. The electronic device updates the calculated weights of each operating environment parameter to the system. These updated weights are used to guide resource allocation, ensuring that resources are optimally allocated according to the characteristics of the current data processing request. The electronic device can adjust the initial weight of each operating environment parameter based on the weight adjustment sequence to obtain the final weight of each operating environment parameter.

[0174] As an example, suppose there are three runtime environment parameters: CPU load, memory utilization, and network latency. The initial weights of the factors are: CPU load = 0.4, memory utilization = 0.3, and network latency = 0.3. Based on the current application request, the decision tree model predicts the following weight adjustment sequence: adjustment coefficient for CPU load = 1.2, adjustment coefficient for memory utilization = 0.8, and adjustment coefficient for network latency = 1.0. The electronic device multiplies the weight adjustment coefficients by the initial weights: adjusted weight for CPU load = 0.4 * 1.2 = 0.48, adjusted weight for memory utilization = 0.3 * 0.8 = 0.24, and adjusted weight for network latency = 0.3 * 1.0 = 0.3. The electronic device updates the adjusted weights to the system, with CPU load having the highest weight (0.48), followed by network latency (0.3), and finally memory utilization (0.24). The electronic device will optimize resource allocation, prioritizing the needs of higher CPU load while considering the impact of network latency and memory utilization.

[0175] In this way, electronic devices can adaptively optimize data processing requests, improving the efficiency and accuracy of resource allocation. Specifically, the electronic device first obtains the initial weight sequence and decision tree corresponding to the data processing request. Then, based on the initial parameter values ​​of each operating environment parameter, a weight adjustment sequence is predicted through the decision tree. This weight adjustment sequence reflects the importance of the operating environment parameter in the current request. Next, the electronic device adjusts the initial weights of each operating environment parameter based on the weight adjustment sequence to obtain the final weights of each operating environment parameter. This adjustment process considers the dynamic changes of operating environment parameters, making resource allocation more flexible and accurate. The electronic device can dynamically adjust its resource allocation strategy according to the characteristics of different data processing requests, improving the system's response speed and processing efficiency. Simultaneously, the adaptability and optimizability of the decision tree model enable the electronic device to continuously optimize its resource allocation strategy as the system operates and data accumulates, achieving more intelligent and efficient management.

[0176] In step 103, the target parameter value is determined based on the weight and the initial parameter value of each of the operating environment parameters.

[0177] In some embodiments, the target parameter value refers to the final parameter value obtained through weighted summation and parameter adjustment during the resource allocation optimization process.

[0178] In some embodiments, see Figure 5 , Figure 5 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 3 , Figure 3 Step 103 shown can be achieved through Figure 5Steps 1031 to 1032 shown are implemented.

[0179] In step 1031, the initial parameter values ​​of each of the operating environment parameters are weighted and summed according to their respective weights to obtain candidate parameter values.

[0180] As an example, the expression for the above candidate parameter value can be:

[0181]

[0182] Where R is used to indicate the candidate parameter value, w i k is used to indicate the weight of each runtime environment parameter. i The initial parameter value is used to indicate the initial parameter value for each runtime environment parameter, and N is used to indicate the total number of runtime environment parameters.

[0183] In step 1032, a preset parameter adjustment coefficient is obtained, and the candidate parameter value is adjusted based on the parameter adjustment coefficient to obtain the target parameter value.

[0184] In some embodiments, the above-mentioned adjustment of the candidate parameter value based on the parameter adjustment coefficient to obtain the target parameter value can be achieved in the following way: determining the difference between the parameter adjustment coefficient and the candidate parameter value, multiplying the difference by a preset coefficient to obtain a product value; and normalizing the product value by an activation function to obtain the target parameter value.

[0185] In some embodiments, the electronic device needs to determine the difference between the parameter adjustment coefficient and the candidate parameter value. The purpose of this step is to quantify the influence of the parameter adjustment coefficient on the candidate parameter value. The electronic device multiplies this difference by a preset coefficient to obtain a product value. The preset coefficient is a predetermined value used to adjust the weight of the difference on the final target parameter value. To ensure that the target parameter value is within a reasonable range, the electronic device normalizes the product value using an activation function. An activation function is a non-linear function commonly used to map input values ​​to a specific range, such as [0, 1] and [-1, 1]. Commonly used activation functions include the sigmoid function and the ReLU function. The choice of a suitable activation function depends on the specific application scenario and optimization objective. The electronic device can adjust the candidate parameter value based on the parameter adjustment coefficient to obtain a normalized target parameter value. This target parameter value will be used to guide resource allocation, ensuring that the electronic device can dynamically adjust the resource allocation strategy according to the characteristics of the current data processing request, thereby improving the system's performance and efficiency.

[0186] As an example, the expression for the above target parameter value can be:

[0187]

[0188] Where σ(R) indicates the target parameter value, R indicates the candidate parameter value, x0 indicates the parameter adjustment coefficient, k indicates the preset coefficient, and σ indicates the activation function.

[0189] Thus, the difference between the parameter adjustment coefficient and the candidate parameter value is determined, reflecting the gap between the current parameter value and the expected value. This difference is then multiplied by a preset coefficient to obtain the product value. The preset coefficient adjusts the adjustment range, ensuring the stability and controllability of the parameter adjustment process. Next, we normalize the product value using an activation function to obtain the target parameter value. The activation function maps the product value to a specific range, typically [0, 1] or [1, 1], thus ensuring the rationality of the target parameter value. This process ensures that the parameter adjustment process can adapt to different needs and scenarios based on the parameter adjustment coefficient, thereby optimizing the performance and efficiency of electronic devices.

[0190] In this way, electronic devices can adaptively optimize data processing requests, improving the efficiency and accuracy of resource allocation. Specifically, the electronic device first performs a weighted summation of the initial parameter values ​​of each operating environment parameter according to their respective weights, obtaining candidate parameter values. These candidate parameter values ​​reflect the comprehensive impact of each operating environment parameter on resource allocation. Then, the electronic device obtains a preset parameter adjustment coefficient and adjusts the candidate parameter values ​​based on this coefficient to obtain target parameter values. This target parameter value serves as the final reference value for resource allocation, guiding the electronic device in resource allocation. The electronic device can dynamically adjust its resource allocation strategy based on the weights of the operating environment parameters and the parameter adjustment coefficients, improving the system's response speed and processing efficiency. Simultaneously, the adaptability and optimizability of the decision tree model enable the electronic device to continuously optimize its resource allocation strategy as the system operates and data accumulates, achieving more intelligent and efficient management.

[0191] In step 104, based on the target parameter value, a target data processing method for responding to the data processing request is selected from multiple preset data processing methods.

[0192] In some embodiments, preset data processing methods refer to different methods or strategies predefined in an electronic device for processing data. These methods are typically designed according to different application scenarios and requirements to optimize the efficiency and performance of data processing. For example, Buffered I / O and Direct I / O are two common data processing methods. Buffered I / O is a method that optimizes data read and write operations through buffers. When an application requests to read or write data, the data is first read into a buffer, and then the actual read and write operations are performed from the buffer. This method can reduce the number of direct accesses to physical storage devices and improve the efficiency of data processing, especially when processing large amounts of small blocks of data. Direct I / O is a method that directly transfers data from the application to the physical storage device without going through the operating system's buffer. This method can reduce latency during data transmission and improve the real-time performance of data processing, especially when processing large amounts of continuous data.

[0193] In some embodiments, see Figure 6 , Figure 6 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 4 , Figure 3 Step 104 shown can be achieved through Figure 6 Steps 1041 to 1042 shown are implemented.

[0194] In step 1041, parameter value intervals corresponding to the preset data processing methods are obtained, and the target parameter value is compared with each of the parameter value intervals to determine the target parameter value interval to which the target parameter value belongs.

[0195] In some embodiments, obtaining parameter value ranges corresponding one-to-one with preset data processing methods refers to setting a range of one or more parameter values ​​for each data processing method. For each preset data processing method, the electronic device sets one or more parameter value ranges. These ranges are determined based on the performance characteristics and applicable scenarios of the data processing method. For example, for Buffered IO, a parameter value range might be set to be most suitable for scenarios with small data volumes and frequent random access; while for Direct IO, another parameter value range might be set to be more efficient for scenarios with large data volumes and primarily sequential access. The electronic device compares the calculated target parameter values ​​with the parameter value ranges corresponding to each preset data processing method. The comparison process is typically completed by determining whether the target parameter value falls within a certain parameter value range. Through comparison, the electronic device determines the target parameter value range to which the target parameter value belongs. The data processing method corresponding to the range where the target parameter value lies will be the best choice for processing the current data request. Once the target parameter value range is determined, the electronic device selects the data processing method corresponding to that range to process the current data request. This selection ensures that the data processing method matches the current system state and request characteristics, thereby optimizing the efficiency and performance of data processing. Electronic devices can dynamically select the most suitable data processing method based on target parameter values, ensuring optimal utilization of system resources and improving data processing efficiency and response speed.

[0196] In some embodiments, the parameter value range corresponding to a preset data processing method refers to a series of parameter value ranges set for each preset data processing method. These ranges are determined based on historical data, performance tests, or experience, and are used to describe under what parameter values ​​a certain data processing method is most suitable or efficient.

[0197] In step 1042, the data processing method corresponding to the target parameter value range is determined as the target data processing method.

[0198] As an example, the expression for the above target data processing method can be:

[0199]

[0200] Here, ret is used to indicate the target data processing method, σ(R) is used to indicate the target parameter value, and σ(R)≥0.5 and σ(R)<0.5 are used to indicate the parameter value range.

[0201] As an example, suppose the electronic device is a database server that needs to select the most appropriate data processing method based on the current database query request. The preset data processing methods and parameter value ranges are: Buffered IO is suitable for small-scale, random query requests, with a parameter value range of [0, 1000], indicating a small amount of data being queried. Direct IO is suitable for large-scale, sequential query requests, with a parameter value range of [1001, ∞), indicating a large amount of data being queried. Assume the target parameter value of the current database query request is 1500, calculated using the method mentioned earlier. The electronic device compares the target parameter value 1500 with the parameter value ranges of Buffered IO and Direct IO respectively. 1500 is not within the parameter value range of Buffered IO [0, 1000], but it is within the parameter value range of Direct IO [1001, ∞). Since the target parameter value 1500 belongs to the parameter value range of Direct IO, the electronic device determines Direct IO as the target data processing method for handling the current database query request. Electronic devices can dynamically select the most suitable data processing method based on the characteristics of the current database query request, thereby improving the efficiency and performance of data processing.

[0202] Thus, the electronic device first acquires parameter value ranges that correspond one-to-one with preset data processing methods. These parameter value ranges are set based on historical data, performance tests, or experience, and are used to describe under what parameter values ​​a certain data processing method is most suitable or efficient. Then, the electronic device compares the calculated target parameter value with each parameter value range to determine the target parameter value range to which the target parameter value belongs. Finally, the electronic device determines the data processing method corresponding to the target parameter value range as the target data processing method for processing the current data request. The electronic device can dynamically select the most suitable data processing method according to the characteristics of different data processing requests, improving the system's response speed and processing efficiency.

[0203] In step 105, the data processing request is responded to based on the target data processing method.

[0204] In some embodiments, see Figure 7 , Figure 7 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 5 , Figure 3 Step 105 shown can be achieved through Figure 7 Steps 1051 to 1053 shown are implemented.

[0205] In step 1051, when the target data processing method is the first data processing method, the server obtains the first data processing result for the data processing request and sends the first data processing result to the application.

[0206] In some embodiments, the first data processing method mentioned above may refer to the Direct IO data processing method. The electronic device determines the target data processing method as Direct IO, meaning the server will directly transfer data from the application to the physical storage device without going through the operating system's buffer. The server uses Direct IO to process data requests. Because Direct IO bypasses the operating system's buffer, it can reduce latency during data transmission and improve the real-time performance of data processing. It is particularly suitable for application scenarios requiring high throughput and low latency, such as queries in large data warehouses and real-time data analysis. After completing data processing, the server generates a first data processing result. This first data processing result is obtained by processing data using the Direct IO method according to the application's request. The server sends the first data processing result back to the application. The first data processing result may be a query result, a processed dataset, or a result indicating whether the data was successfully written, depending on the application's requirements. The electronic device can select the most suitable data processing method based on the characteristics of the data processing request, improving the efficiency and performance of data processing.

[0207] In step 1052, when the target data processing method is the second data processing method, based on the cache of the electronic device, data processing for the data processing request is performed to obtain a first sub-result, and the second sub-result of the data processing request from the server is obtained.

[0208] In some embodiments, the electronic device determines that the target data processing method is Buffered IO. The electronic device optimizes data read / write operations through buffering, reducing the number of direct accesses to physical storage devices. When the target data processing method is the second data processing method (i.e., Buffered IO), the electronic device utilizes its caching mechanism to optimize the data processing flow, combined with the server's processing power, to improve overall data processing efficiency and response speed. The electronic device first checks whether its cache already stores content related to the current data processing request. The data stored in the cache is usually recently or frequently accessed data, thus providing a fast response. If the required data exists in the cache, the electronic device reads the data directly from the cache, generating the first sub-result. This method avoids direct access to physical storage devices, significantly reducing data processing latency. If the required data does not exist in the cache, the electronic device initiates a read request to the physical storage device. At this time, the data is read from the physical storage device into the cache for subsequent fast access. Simultaneously, the electronic device may also perform preprocessing operations, such as data compression, decompression, or format conversion, to optimize data transmission and processing efficiency. While the electronic device processes the data in the cache, the server is also processing the data request, generating the second sub-result. Server processing may involve complex computations, data analysis, or other resource-intensive tasks. Because servers typically have higher processing power and larger storage capacity, they are capable of handling larger-scale data requests, while electronic devices are responsible for optimizing data transmission and caching. Once the electronic devices and server have generated the first and second sub-results respectively, the electronic devices are responsible for merging these two results to generate the final data processing result. The final result is then formatted and processed according to the application's needs and sent back to the application to fulfill the user's request. After data processing is complete, the electronic devices may update their cache, storing new data or processing results for future fast access. Simultaneously, the electronic devices may dynamically adjust their caching strategy based on historical data processing data and current system load to optimize system performance and response speed.

[0209] In step 1053, based on the first sub-result and the second sub-result, a second data processing result for the data processing request is determined, and the second data processing result is sent to the application.

[0210] As an example, suppose the electronic device is a high-performance database server that needs to select the appropriate data processing method based on different data processing requests. Assume the current data processing request is a large sequential read operation with a target parameter value of 2000, falling within the Direct IO parameter value range. The server uses Direct IO to read data directly from the physical storage device, bypassing the operating system's buffer. After completing the data read, the server generates the first data processing result, a result set containing a large amount of sequential data. The server sends the first data processing result back to the application to satisfy the user's query requirements. Now suppose the current data processing request is a small-scale random read operation with a target parameter value of 500, falling within the Buffered IO parameter value range. The electronic device first checks if the required data is already stored in its cache. Assuming some of the required data already exists in the cache, the electronic device reads this data from the cache, generating the first sub-result. For data not present in the cache, the server uses Buffered IO to read data from the physical storage device into the cache, then generates the second sub-result. The electronic device merges the first and second sub-results to generate the second data processing result, a result set containing all the required data. The electronic device sends the second data processing result back to the application to satisfy the user's query needs. It can be seen that the electronic device can select appropriate data processing methods based on the characteristics of different data processing requests, and effectively utilize caching mechanisms and server processing capabilities to achieve rapid response and efficient processing of data processing requests.

[0211] Thus, the electronic device first determines the target data processing method based on the target parameter values. When the target data processing method is the first data processing method (such as Direct IO), the electronic device directly obtains the first data processing result from the server in response to the data processing request and sends it to the application. This method is suitable for large-scale, sequential data processing requests and can significantly improve data processing efficiency and response speed. When the target data processing method is the second data processing method (such as Buffered IO), the electronic device first performs data processing based on its cache to obtain the first sub-result, and simultaneously obtains the second sub-result from the server in response to the data processing request. Then, these two results are merged to obtain the second data processing result, which is then sent to the application. This method effectively utilizes caching mechanisms, reduces the number of direct accesses to physical storage devices, lowers data processing latency, and improves the overall system performance and response speed.

[0212] In this way, by acquiring data processing requests, the initial parameter values ​​of multiple operating environment parameters of the electronic device are determined. By combining the weight of each operating environment parameter with its initial parameter value, a target parameter value that reflects the contribution of all operating environment parameters to performance is determined. Based on the target parameter value, the most suitable target data processing method is determined from multiple preset data processing methods. This enables the electronic device to determine the target data processing method that can achieve optimal resource allocation based on real-time data processing requests and respond to data processing requests according to the target data processing method, thereby effectively improving the data processing performance.

[0213] The following will describe an exemplary application of the embodiments of this application in a real data read and write application scenario.

[0214] Data read and write (IO) from clients are the absolute primary requests in a distributed storage system. Handling these IO requests well is essential to realizing the value of a distributed storage system. One key factor affecting IO efficiency is the decision of IO mode: Buffered IO and Direct IO.

[0215] Buffered IO writes data to the local cache first and then synchronizes it to the remote server. For reading data, it reads data directly from the local cache (if the requested data exists in the local cache) or reads data from the remote server and saves a copy locally. Direct IO does not have a local cache; data read and write requests are sent directly to the remote server.

[0216] Buffered IO and Direct IO are suited to different scenarios. Buffered IO is suitable when local caching is sufficient and the probability of the same data being modified simultaneously by multiple clients is low. It is also suitable for scenarios involving asynchronous data synchronization and sequential reads with pre-fetching of data, and scenarios where local data resource lock overhead is low. Direct IO, on the other hand, is more suitable for scenarios where the probability of data being modified by other clients is high, random reads, and scenarios with significant local resource lock overhead. Actual business observations have revealed that inappropriate IO modes can consume more resources but result in a performance drop of 30% or more.

[0217] Due to the large number of clients in distributed system services, and the fact that these clients are isolated from each other with different resource configurations and system loads, identifying and adopting appropriate I / O modes to systematically coordinate and process these requests and maximize the use of network, disk, and CPU resources in the distributed system has always been a challenge. This application systematically extracts key factors affecting data I / O performance in complex applications and combines them with the CART algorithm for deep learning to achieve real-time decision-making on I / O modes for efficient utilization of system resources, thereby meeting the complex and ever-changing data read / write requests of upper-layer applications.

[0218] The embodiments of this application can be applied to large-scale distributed AI model training scenarios. Model training requires continuous reading of training data. To ensure robustness, the selection of training data has a high degree of randomness, and most data readings during the training process are random reads. Improving the efficiency of random I / O can reduce GPU idle time, thereby improving its utilization.

[0219] The embodiments of this application can be applied to big data offline and online tasks that are a combination of sequential I / O and random I / O. Map-reduce tasks are distributed on different types of machines, such as high-performance computing machines and low-performance machines. The performance of data I / O directly affects the completion time of the task. A suitable I / O model can effectively reduce the long tail of the task, thereby shortening the overall task time and reducing costs.

[0220] In some embodiments, see Figure 9 , Figure 9 This is a schematic diagram of the data processing method provided in the embodiments of this application. Figure 1 The product implemented based on the embodiments of this application can be trained offline into a mature model and deployed as a microservice to accept requests and perform IO mode inference. It can also be used as a key component in a distributed storage system, providing IO mode decision-making while performing online training to meet real-time requirements.

[0221] In some embodiments, see Figure 10 , Figure 10 This is a schematic diagram of the data processing method provided in the embodiments of this application. Figure 2 This application embodiment consists of IO pattern request, key factor extraction, pattern reasoning and decision-making, decision model training and optimization, and real-time feedback of IO results. IO pattern request: For each IO request from the upper-layer application, request characteristics and system memory, CPU, and other resource usage information are collected and passed to subsequent key factor extraction. Key factor extraction: Data cleaning is performed on IO features and system environment information from the IO pattern request to extract key factors affecting IO decisions. From the IO request, file information, IO size, and IO type are extracted; from the application priority, the application level is extracted; and from the system environment, the CPU resources currently used by the application, memory usage, system load, and current network speed are extracted.

[0222] In some embodiments, see Figure 11 , Figure 11 This is a schematic diagram of the data processing method provided in the embodiments of this application. Figure 3The initial parameter values ​​for each key factor in the key factor column are extracted from IO requests, system environment, and application priority. The key factors (i.e., the runtime environment parameters described above) include: file information, IO size, IO type: random, sequential, application level: quality of service gold, silver, bronze, memory occupied by the current application, current system load, and current system network speed.

[0223] In some embodiments, model inference and decision-making: Based on key factors, the optimal I / O mode is inferred using the following expression to determine whether it is Buffered I / O or Direct I / O, and the result is returned to the request layer. The formula for decision calculation is:

[0224] R=w1k1+w2k2+w3k3+w4k4+w5k5+w6k6+w7k7++w8k8 (6)

[0225] The Sigmoid function is used to obtain a smooth transition, and the final result ret is dynamically adjusted according to the R value. The specific formula is as follows:

[0226]

[0227] In this context, W represents the weights in the decision calculation. The specific values ​​are obtained from the decision model (the model determines the weights, its output is the weights, and its input is the real-time values ​​of the key factors corresponding to each weight). w1, w2, ..., w8 dynamically change in real-time as the model optimizes, and satisfy W1 + W2 + ... + W8 = 1. K represents the key factors: File Information (K1): File size. IO Size (K2): Data volume of IO operations, in bytes. IO Type (K3): Random IO can be assigned a value of 1, sequential IO can be assigned a value of 0. Application Level (K4): QoS Gold can be assigned a value of 3, Silver 2, and Bronze 1. Current Application CPU Resources (K5): Percentage of CPU resources used by the application. Current Application Memory Usage (K6): Size of memory used by the application, in MB or GB. Current System Load (K7): System load value, usually a floating-point number between 0 and 1. Current System Network Speed ​​(K8): Network transmission speed, in Mbps or Gbps.

[0228] Where σ(R) is the sigmoid function, and its formula is:

[0229]

[0230] Where K is a parameter that controls the steepness of the transition (K>0). The larger K is, the steeper the transition. For example, when k=0.1, the transition is very smooth. When K=10, the transition is very steep and very close to a piecewise function. X0 is the center point of the transition. Here it is set to 100, which means that R=100 is the boundary point between DIO and BIO.

[0231] In some embodiments, see Figure 12 , Figure 12 This is a schematic diagram of the model training process provided in this application embodiment. Based on input features: file size, IO size mode, IO type, application level, CPU utilization, memory usage, system load, and network throughput, feature encoding is performed through feature engineering to obtain encoded features. Based on the encoded features, SHAP value analysis, mutual information evaluation, and recursive elimination are performed through a weight calculation engine. Then, dynamic adjustments are made through a decision model, specifically through gradient boosting trees, feature importance, and pruning coefficients. Deployment is carried out through real-time feature input, weight output, and confidence threshold.

[0232] In some embodiments, see Figure 13 , Figure 13 This is a schematic diagram illustrating the principle of weight adjustment provided in this application embodiment. It optimizes the decision tree and adjusts the weights of key factors through real-time feedback pruning. Based on the values ​​of influencing factors, the model is invoked to predict the weights of each influencing factor, obtaining the predicted weights. The predicted weights are then used to weight and sum the values ​​of each influencing factor to obtain the target value. The corresponding IO mode is then selected and executed. After execution, feedback indicators from the server side are obtained. Based on these indicators, the model is trained to obtain the trained model. The trained model is then used for the next round of weight prediction, repeating the iteration process synchronously during application. Feedback indicators include IO latency, server load, lock contention, and multi-client read / write. The weight adjustment logic includes: when latency increases, the file size weight is increased by 2; when lock contention increases, the IO type weight is decreased by 1; when load increases, the CPU weight is increased by 3; and when there are multiple clients, the network weight is decreased by 1. The initial weights for each factor can be: application level: 12%, file size: 18%, IO size: 14%, IO type: 12%, CPU usage: 10%, network speed: 9%, system load: 12%. The weighting logic is passed on, and the new weights for file size, CPU usage, memory size, and network speed are set at 22%, 13%, 9%, and 7%, respectively.

[0233] In some embodiments, see Figure 14 , Figure 14This is a schematic diagram illustrating the principle of decision tree pruning provided in this application embodiment. IO results are fed back in real time: the latency of the current IO and feedback information from the backend server are detected. The server's feedback information includes whether the file involved in the IO is accessed by multiple clients and the read / write conflicts of the client accessing that file. The current model's decision tree is pruned according to the feedback information. Key multi-client conflict information, backend server load information, and IO lock conflict information are extracted from the real-time IO results to perform reverse optimization for decision tree pruning.

[0234] In some embodiments, see Figure 15 , Figure 15 This is a schematic diagram of the decision tree structure provided in an embodiment of this application. An initial decision tree is constructed based on decision factors across multiple dimensions. Each decision factor corresponds to a level in the decision tree. See [link / reference]. Figure 15 Based on multiple decision factors (application level, file size, IO size, IO type, CPU usage, network speed, system load), the initial decision tree is constructed as follows: Figure 15As shown, the process involves obtaining the IO requests from the first round, determining the first parameter value of each influencing factor based on the IO requests from the second round, and obtaining the initial weights of each influencing factor (e.g., application level weight 12%, file size weight 18%, IO size 14%, IO type 12%, etc.). Based on the first parameter values ​​of each influencing factor, the initial decision model (the initial decision tree shown in the diagram above) is invoked to adjust the initial weights of each influencing factor, resulting in the first target weight of each influencing factor. Specifically, for the first level of the initial decision tree, the first parameter of file size is... The file size influence factor is compared with the file factor threshold. When the comparison result indicates that the first parameter value is greater than the file factor threshold, the first target weight of the file size influence factor is determined as the corresponding initial weight. When the comparison result indicates that the first parameter value is less than the file factor threshold, the first target weight of the file size influence factor is determined to be zero. Other influence shadows are shown in the figure above, and so on, to obtain the first target weight of each influence factor. Based on the first target weight and the initial parameter value of each influence factor, the target parameter value is determined. If the target adoption number is greater than or equal to 0.5, BIO is selected; otherwise, DIO is selected. The selection of the IO mode in the i-th round (involving model training, i.e., tree pruning): Taking the selection of the IO mode in the 2nd round as an example: Obtain the IO request in the 2nd round; based on the IO request in the 2nd round, determine the second parameter value of each influencing factor, obtain the initial weight of each influencing factor, and the feedback information of the IO request in the 1st round; adjust the initial weights based on the feedback information to obtain the first adjusted weights; based on the first adjusted weights, train (prune) the initial decision model (initial decision tree) to obtain the second decision model (second decision tree) (specifically, the first adjusted weight corresponds one-to-one with the influencing factor; when the first adjusted weight is zero, the corresponding level of the influencing factor in the initial decision tree is completely deleted from the initial decision tree); based on the second parameter value of each influencing factor, The second decision model is invoked to adjust the first adjustment weights of each influencing factor to obtain the second target weights. Specifically, for the first level of the first decision tree, the second parameter value of file size is compared with the file factor threshold. When the comparison result indicates that the second parameter value is greater than the file factor threshold, the second target weight of the file size influencing factor is determined as the corresponding first adjustment weight. When the comparison result indicates that the second parameter value is less than the file factor threshold, the second target weight of the file size influencing factor is set to zero. Other influencing factors are similarly calculated in the diagram above to obtain the second target weights for each influencing factor. Based on the second target weights and the initial parameter values ​​of each influencing factor, the target parameter value is determined. If the target parameter value is greater than or equal to 0.5, BIO is selected; otherwise, DIO is selected.

[0235] In some embodiments, see Figure 16 , Figure 16This is a schematic diagram illustrating the principle of weight adjustment provided in this application embodiment. Latency data is reported via feedback detection to the weight calculation engine. The engine then calculates the rate of change of the latency data and updates the weight of file size by 2% based on this rate of change. Based on the updated weight of file size, the splitting threshold is reconstructed using a decision tree, and a new decision path is returned. The adjusted weight distribution could be: file size weight 22%, IO size weight 14%, CPU usage weight 13%, etc.

[0236] In some embodiments, see Figure 17 , Figure 17 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 6 The data processing method provided in this application embodiment can be used to... Figure 17 Steps 201 to 217 shown are implemented.

[0237] In step 201, the upper-layer application initiates an IO request to the IO API interface layer.

[0238] In some embodiments, when an upper-layer application initiates an I / O request to the I / O API interface layer, it means that the application requests data read or write operations through the I / O API (Input / Output Application Programming Interface) provided by the operating system. The I / O API is a set of functions or methods that allow applications to interact with the operating system to access hardware devices such as hard drives and network interfaces. When an application needs to perform an I / O operation, it calls the corresponding I / O API function, providing necessary parameters such as file descriptors, buffer addresses, and data lengths. These requests are then passed to the operating system's I / O subsystem, which is responsible for handling these requests, including scheduling I / O operations, managing caches, and communicating with hardware devices. The role of the I / O API interface layer is to provide an abstraction layer, allowing applications to request I / O operations through standardized interfaces instead of directly interacting with hardware devices. This not only simplifies application development but also improves system portability and security.

[0239] In step 202, the IO API interface layer sends an IO mode decision request to the IO mode request.

[0240] In some embodiments, the IO API interface layer sending an IO mode decision request to the IO mode request refers to the IO API interface layer needing to determine which IO mode to use to execute the request when processing IO requests from upper-layer applications. The IO mode decision request is a request sent by the IO API interface layer to the IO mode decision module to obtain the optimal IO mode for the current IO request. IO modes typically include synchronous IO and asynchronous IO, each with its own characteristics and applicable scenarios. Synchronous IO means that the application will block after issuing an IO request until the IO operation is complete; while asynchronous IO allows the application to continue performing other tasks after issuing an IO request, with the IO operation completed in the background and the application notified of the result of the IO operation through a callback function or event.

[0241] In step 203, the IO pattern request sends a pattern inference request to the key factor extraction.

[0242] In some embodiments, sending a pattern reasoning request to the key factor extraction module means that, when deciding which I / O mode to use (synchronous I / O or asynchronous I / O), the I / O mode request needs to obtain necessary information from the key factor extraction module for pattern reasoning. The key factor extraction module is responsible for extracting key factors that influence the I / O mode selection from various system states and configurations.

[0243] In step 204, key factors are extracted.

[0244] In some embodiments, key factors include: file size, IO size, IO type, application level, CPU usage, memory usage, system load, and network speed.

[0245] In some embodiments, key factor extraction refers to screening out the key factors that have a significant impact on IO mode decisions from various factors that may influence the choice of IO mode. These key factors form the basis for IO mode reasoning and decision-making. File size affects the efficiency of IO operations. Large files typically require more IO operations to complete read and write operations, and therefore may be more suitable for asynchronous IO to improve throughput. The size of data in a single IO operation also affects the choice of IO mode. Large IO sizes generally mean higher data transfer efficiency and may be more suitable for synchronous IO; while small IO sizes may be more suitable for asynchronous IO to reduce system overhead. IO types include read and write operations. Read operations may be more suitable for synchronous IO because applications typically need to retrieve data immediately; while write operations may be more suitable for asynchronous IO because data can be written to a cache first and then to disk in the background. The importance and priority of the application also affect the choice of IO mode. High-priority applications may require synchronous IO to ensure timely response, while low-priority applications may be more suitable for asynchronous IO. CPU utilization affects the choice of IO mode. If CPU utilization is high, asynchronous IO may be more suitable to avoid further blocking of system resources. Memory usage also affects the choice of IO mode. If memory usage is high, asynchronous I / O may be necessary to reduce memory resource consumption. Network speed also affects the choice of I / O mode. If network speed is slow, asynchronous I / O may be necessary to reduce network resource consumption.

[0246] In step 205, the input parameters are reasoned to pattern reasoning and decision-making.

[0247] In some embodiments, inference input parameters to pattern inference and decision-making refers to passing key factors obtained from the key factor extraction module as input parameters to the pattern inference and decision-making module in order to make intelligent decisions on IO patterns.

[0248] In step 206, the key factor extraction sends an IO pattern inference request to pattern inference and decision-making.

[0249] In some embodiments, sending an IO pattern inference request to the pattern inference and decision-making module after key factor extraction refers to the process whereby, after the key factor extraction module has collected and processed the key factors influencing IO pattern selection, these key factors are passed as input parameters to the pattern inference and decision-making module to request IO pattern inference and decision-making. The key factor extraction module first collects key factors related to the current IO request. These factors may include file size, IO size, IO type, application level, CPU usage, memory usage, system load, and network speed. The collected key factors may need to be processed, such as cleansing, normalization, or feature engineering, to ensure they can be effectively used by the pattern inference and decision-making module. The processed key factors are encapsulated into an IO pattern inference request and sent to the pattern inference and decision-making module. This request contains all the necessary information to guide the pattern inference and decision-making process.

[0250] In step 207, the final inference result Buffer or Direct IO is returned.

[0251] In some embodiments, returning the final inference result Buffered IO or Direct IO means that after completing the IO mode inference and decision-making process, the mode inference and decision-making module will decide whether to use Buffered IO or Direct IO as the final IO mode based on the key factors analyzed and the current system state, and return this decision result.

[0252] In step 208, online training is performed.

[0253] In some embodiments, online training of a decision tree refers to the process of continuously collecting new data and feedback during system operation to update and optimize the decision tree model in real time. A decision tree is a commonly used machine learning algorithm for classification and regression tasks. It makes decisions through a tree structure, where each internal node represents a test on a feature, each branch represents a test output, and each leaf node represents a category or value. In IO mode decision-making scenarios, decision trees can be trained to predict the most suitable IO mode (Buffered IO or Direct IO) based on key factors. Online training means that the decision tree model is not trained all at once, but rather continuously learns and adjusts itself as new data is continuously added during system operation to adapt to changing environments and requirements.

[0254] In step 209, a decision result is generated: Buffer IO or Direct IO.

[0255] In some embodiments, generating a decision result: Buffer IO or Direct IO refers to the system deciding which IO mode to use to process the current data request based on the analysis results after completing key factor extraction and pattern reasoning. This decision-making process is usually based on a pre-trained decision model that can predict the most suitable IO mode based on the input key factors.

[0256] In step 210, specific IO data reading and writing adopts the IO mode after the decision.

[0257] In some embodiments, the specific IO data read and write operation adopts the decision-based IO mode, which means that after the system determines the most suitable IO mode for the current IO request through a decision-making process, the corresponding IO mode is selected for data processing according to the decision result when actually performing data read and write operations.

[0258] In step 211, the data is returned.

[0259] In some embodiments, data is returned to the upper-layer application. Data return refers to passing the read or written data back to the application that requested the operation after the I / O operation is complete. This process is the final step of the I / O operation, ensuring that the application can obtain the required data or confirm that the data has been successfully written.

[0260] In step 212, the distributed storage service provides IO feedback.

[0261] In some embodiments, distributed storage service client-side IO feedback refers to the storage service client providing feedback on the IO operation result to the client or upper-layer system after processing an IO request in a distributed storage system. This feedback mechanism is crucial for ensuring data consistency, reliability, and overall system performance.

[0262] In step 213, the IO API interface layer returns the actual data.

[0263] In some embodiments, the IO API interface layer returning actual data means that in a software system, when an application requests data through the IO API (Input / Output Application Programming Interface), the IO API interface layer is responsible for processing the request and returning the actual data to the application. This process is a crucial step in the data exchange between the application and the underlying storage device or service.

[0264] In step 214, feedback is extracted based on real-time feedback of IO results.

[0265] In some embodiments, key feedback includes: IO latency, file conflict status, server load, and IO lock conflict.

[0266] In some embodiments, feedback extraction based on real-time IO result feedback refers to extracting key feedback information from the IO results after the IO operation is completed. This information is crucial for detecting system performance, optimizing IO operations, and ensuring data consistency. Key feedback includes IO latency, file conflict status, server load, and IO lock conflicts.

[0267] In step 215, the decision tree is optimized to update the weight factors.

[0268] In some embodiments, decision tree reduction optimization and weight factor update refers to reducing the complexity of the decision tree in the decision tree model through optimization algorithms, while updating the weight factors of each feature to improve the model's generalization ability and prediction accuracy.

[0269] In step 216, key parameters are fed back.

[0270] In some embodiments, key feedback parameters refer to parameters that significantly impact system performance and I / O decisions, extracted from the results of I / O operations during system operation. These parameters are used to monitor system status in real time, evaluate the effectiveness of I / O decisions, and provide a basis for subsequent I / O decisions.

[0271] In step 217, the inference model is optimized.

[0272] Thus, the embodiments of this application automatically adapt to the current application environment and the overall system operation, optimizing decisions through real-time detection and feedback. By selecting the optimal IO mode through real-time decision-making, the system resource utilization is improved, and data transfer losses are reduced. The decision-making mode proactively optimizes itself, automatically providing real-time feedback and optimization based on each IO result.

[0273] It is understood that in the embodiments of this application, data related to data processing requests and so on are required to obtain user permission or consent when the embodiments of this application are applied to specific products or technologies, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0274] The following description continues to illustrate the exemplary structure of the data processing apparatus 455 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2As shown, the software modules stored in the data processing device 455 in the memory 450 may include: an acquisition module, configured to, in response to a data processing request, determine initial parameter values ​​for each of a plurality of operating environment parameters of the electronic device, the operating environment parameters being used to characterize the operating environment of the electronic device; a determination module, configured to, based on the initial parameter values, determine a weight for each of the operating environment parameters, and based on the weights and the initial parameter values ​​of each of the operating environment parameters, determine a target parameter value; a selection module, configured to, based on the target parameter value, select a target data processing method from a plurality of preset data processing methods for responding to the data processing request; and a response module, configured to respond to the data processing request based on the target data processing method.

[0275] In some embodiments, the determining module is further configured to: obtain an initial weight sequence corresponding to the data processing request, wherein the initial weight sequence includes an initial weight for each of the operating environment parameters; obtain a decision tree corresponding to the data processing request, wherein different operating environment parameters correspond to different levels in the decision tree; based on the initial parameter value of each of the operating environment parameters, predict a weight adjustment sequence through the decision tree, wherein the weight adjustment sequence includes multiple weight adjustment coefficients for adjusting the weights of multiple operating environment parameters; and adjust the initial weight of each of the operating environment parameters based on the weight adjustment sequence to obtain the weight of each of the operating environment parameters.

[0276] In some embodiments, the determining module is further configured to obtain a preset judgment condition for each of the operating environment parameters, the judgment condition being used to determine whether the initial parameter value of the operating environment parameter is within a preset parameter value range; and to construct a decision tree corresponding to the data processing request by using the judgment condition of each of the operating environment parameters as a non-leaf node of the decision tree and multiple preset weight adjustment sequences as leaf nodes.

[0277] In some embodiments, the determining module is further configured to determine the order of the plurality of operating environment parameters, wherein the order of the operating environment parameters corresponds to the level of the decision tree in which the operating environment parameters are located; obtain the preset weight adjustment sequence, wherein the number of the preset weight adjustment sequence is positively correlated with the number of the operating environment parameters; and perform relationship fitting on the plurality of operating environment parameters based on the order of the plurality of operating environment parameters, the judgment condition of each operating environment parameter and the preset weight adjustment sequence to obtain the decision tree.

[0278] In some embodiments, when the data processing request is the j-th data processing request, j is the number of times the application sends the data processing request, and j is a positive integer greater than or equal to 2. The determining module is further configured to obtain the initial weight sequence corresponding to the (j-1)-th data processing request, wherein the initial weight sequence corresponding to the (j-1)-th data processing request includes the initial weights of each operating environment parameter determined when responding to the (j-1)-th data processing request; determine the performance parameters of the electronic device when responding to the (j-1)-th data processing request; and adjust the initial weight sequence corresponding to the (j-1)-th data processing request based on the performance parameters to obtain the initial weight sequence corresponding to the j-th data processing request.

[0279] In some embodiments, the performance parameters include multiple sub-performance parameters, each sub-performance parameter being associated with an initial weight of at least one of the runtime environment parameters; the determining module is further configured to, for each sub-performance parameter, adjust the initial weight associated with the sub-performance parameter in the initial weight sequence corresponding to the (j-1)th data processing request, to obtain an adjusted weight; and replace the initial weights in the initial weight sequence corresponding to the (j-1)th data processing request with the corresponding adjusted weights to obtain the initial weight sequence of the j-th data processing request of the application.

[0280] In some embodiments, the determining module is further configured to determine the parameter change value of the sub-performance parameter, determine the preset change value that is the same as the parameter change value among a plurality of preset change values ​​as the target preset change value, and different preset change values ​​correspond to different adjustment weight values; add the adjustment weight value corresponding to the target preset change value to the initial weight associated with the sub-performance parameter to obtain the adjusted weight.

[0281] In some embodiments, the determining module is further configured to obtain the decision tree corresponding to the (j-1)th data processing request; when there is no initial weight equal to zero in the initial weight sequence corresponding to the (j-1)th data processing request of the application, the decision tree corresponding to the (j-1)th data processing request of the application is determined as the decision tree corresponding to the j-th data processing request; when there is an initial weight equal to zero in the initial weight sequence corresponding to the (j-1)th data processing request, the decision tree corresponding to the (j-1)th data processing request is adjusted based on the initial weight sequence corresponding to the (j-1)th data processing request to obtain the decision tree corresponding to the j-th data processing request.

[0282] In some embodiments, the determining module is further configured to perform the following processing for each initial weight in the initial weight sequence of the (j-1)th data processing request of the application, to obtain the decision tree corresponding to the j-th data processing request: when the value of the initial weight is zero, delete the node of the level corresponding to the initial weight in the decision tree corresponding to the (j-1)th data processing request, and connect the nodes in the two levels adjacent to the level corresponding to the initial weight.

[0283] In some embodiments, the nodes at each level corresponding to the operating environment parameter in the decision tree are preset judgment conditions for the operating environment parameter, and the leaf nodes of the decision tree are preset weight adjustment sequences for adjusting the initial weights. The values ​​of the weight adjustment coefficients in the preset weight adjustment sequences of different leaf nodes are at least partially different, and the weight adjustment coefficients correspond one-to-one with the operating environment parameters. The determination module is further configured to, based on the initial parameter value of each operating environment parameter, determine the target leaf node corresponding to the data processing request in the leaf nodes of the decision tree corresponding to the data processing request; determine the preset weight adjustment sequence corresponding to the target leaf node as the weight adjustment sequence; the determination module is further configured to multiply the value of each weight adjustment coefficient in the weight adjustment sequence by the initial weight of the corresponding operating environment parameter to obtain the weight of each operating environment parameter.

[0284] In some embodiments, the determining module is further configured to perform a weighted summation of the initial parameter values ​​of each of the operating environment parameters according to the weight of each of the operating environment parameters to obtain candidate parameter values; obtain a preset parameter adjustment coefficient, and adjust the candidate parameter values ​​based on the parameter adjustment coefficient to obtain the target parameter value.

[0285] In some embodiments, the determining module is further configured to determine the difference between the parameter adjustment coefficient and the candidate parameter value, multiply the difference by a preset coefficient to obtain a product value, and normalize the product value by an activation function to obtain the target parameter value.

[0286] In some embodiments, the selection module is further configured to obtain parameter value ranges that correspond one-to-one with the preset data processing methods, compare the target parameter value with each of the parameter value ranges respectively to determine the target parameter value range to which the target parameter value belongs, and determine the data processing method corresponding to the target parameter value range as the target data processing method.

[0287] In some embodiments, the response module is further configured to: when the target data processing method is a first data processing method, obtain a first data processing result from the server for the data processing request and send the first data processing result to the application; when the target data processing method is a second data processing method, perform data processing for the data processing request based on the cache of the electronic device to obtain a first sub-result and obtain a second sub-result from the server for the data processing request; determine a second data processing result for the data processing request based on the first sub-result and the second sub-result, and send the second data processing result to the application.

[0288] In some embodiments, the runtime environment parameters include a first runtime environment parameter associated with the request information, a second runtime environment parameter associated with the runtime state, and a third runtime environment parameter associated with the application. The determining module is further configured to, for the first runtime environment parameter, extract from the request information at least one of the following: the data volume of the target data requested for processing by the data processing request, the file size of the data file containing the target data, and a preset information value corresponding to the data access type corresponding to the data processing request, as the initial parameter value; for the second runtime environment parameter, extract from the runtime state at least one of the following: the resource usage ratio of the application in the electronic device, the memory usage of the application in the electronic device, the load value of the electronic device, and the network transmission speed of the electronic device, as the initial parameter value; and for the third runtime environment parameter, use the application level value of the application as the initial parameter value.

[0289] This application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the data processing method described in this application.

[0290] This application provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are executed by a processor, they cause the processor to perform the data processing method provided in this application. For example, ... Figure 3 The data processing method is shown.

[0291] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of electronic devices including one or any combination of the above-mentioned memories.

[0292] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0293] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0294] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.

[0295] In summary, the embodiments of this application have the following beneficial effects:

[0296] (1) By acquiring data processing requests, the initial parameter values ​​of multiple operating environment parameters of the electronic device are determined respectively. By combining the weight of each operating environment parameter with the initial parameter value of the operating environment parameter, the target parameter value that can reflect the contribution of all operating environment parameters to performance is determined. Through the target parameter value, the most suitable target data processing method is determined from multiple preset data processing methods. Thus, the electronic device can determine the target data processing method that can achieve optimal resource allocation according to the real-time data processing request, and respond to the data processing request according to the target data processing method, thereby effectively improving the processing performance of data processing.

[0297] (2) Electronic devices can accurately assess the specific impact of each data processing request on their performance. Preset information values ​​for data volume, file size, and data access type extracted from the request information provide the server with direct indicators of request complexity and resource requirements. For example, larger data volumes and file sizes typically imply higher storage and bandwidth demands, while specific data access types (such as frequent random read / write operations) may place higher demands on I / O performance. Application resource usage ratios, memory usage, device load, and network transmission speed extracted from the running status provide the server with a real-time view of current system resources. These indicators help the server determine whether the device has sufficient resources to handle new requests or whether resource allocation needs to be adjusted to avoid performance bottlenecks. Finally, the application's application level provides the server with a priority reference, enabling it to determine the processing order based on the importance of requests. By comprehensively considering these parameter values, the server can make more informed decisions, optimize resource allocation, improve overall system performance and response speed, thereby ensuring that critical tasks are processed in a timely manner while maintaining system stability and reliability.

[0298] (3) The electronic device can dynamically adjust the weight sequence to optimize the response performance of data processing requests. Specifically, when processing the j-th data processing request, the electronic device first obtains the initial weight sequence corresponding to the (j-1)-th request. This sequence contains the initial weights of each operating environment parameter determined when responding to the (j-1)-th request. Then, the electronic device determines the performance parameters of the electronic device when responding to the (j-1)-th request, such as response time and resource utilization. Based on these performance parameters, the electronic device adjusts the initial weight sequence to reflect the relative importance of each operating environment parameter to performance when processing the j-th request. This dynamic adjustment process enables the electronic device to optimize resource allocation and improve overall performance based on real-time performance feedback. For example, if a certain operating environment parameter causes a performance bottleneck when processing the (j-1)-th request, the electronic device will increase the weight of that factor to give more attention and resource allocation when processing the j-th request. The electronic device can achieve intelligent response to data processing requests, ensuring that the performance of the electronic device is optimal.

[0299] (4) When the electronic device processes the j-th data request, it first obtains the initial weight sequence corresponding to the (j-1)-th request. Then, the device monitors and calculates the parameter change value for each sub-performance parameter. Next, the electronic device searches for the same or closest change value among the preset change values ​​and determines it as the target preset change value. Each target preset change value corresponds to an adjustment weight value, which reflects how the initial weight associated with the sub-performance parameter should be adjusted when the parameter changes. By adding the adjustment weight value corresponding to the target preset change value to the initial weight, the electronic device obtains the adjusted weight. The adjustment process ensures that the weight can reflect the degree of influence of the operating environment parameters on performance in real time according to the changes in the sub-performance parameters. By updating the weight sequence, the electronic device can optimize resource allocation, improve data processing efficiency and response speed, thereby achieving performance optimization.

[0300] (5) When the electronic device processes the first data processing request of the application, it acquires the judgment conditions of each preset operating environment parameter and uses these conditions as non-leaf nodes of the decision tree to construct a tree structure that guides resource allocation decisions based on parameter value ranges, thereby achieving intelligent management and optimization of resources. This method is based on preset weight adjustment sequences, which are optimized based on historical data and experience, and can guide the electronic device on how to adjust resource allocation under different circumstances. Through this decision tree method, the electronic device can quickly make resource allocation decisions based on the initial parameter values ​​when processing the first request, thereby improving the system's response speed and processing efficiency. It not only reduces the need for manual adjustments, but also continuously optimizes the decision tree as the system runs and data accumulates, achieving more intelligent and efficient resource management. In addition, the structured decision-making process of the decision tree enables the electronic device to better understand and interpret the resource allocation decision process, which is helpful for further system optimization and troubleshooting.

[0301] (6) The electronic device can construct a structured and efficient decision tree to optimize resource allocation for data processing requests. First, the electronic device determines the order of multiple operating environment parameters, which determines the hierarchical position of the operating environment parameters in the decision tree, ensuring the priority of key factors in the decision-making process. Subsequently, the electronic device obtains a preset weight adjustment sequence, the number of which is positively correlated with the number of operating environment parameters, providing a corresponding resource allocation strategy for each possible combination of operating environment parameters. Based on the order of operating environment parameters, judgment conditions, and preset weight adjustment sequences, the electronic device performs relationship fitting, associating the operating environment parameters with resource allocation decisions to form a decision tree that reflects the complex relationships between operating environment parameters. This decision tree structure not only improves the efficiency and accuracy of the electronic device in processing data requests but also makes resource allocation more intelligent and optimized. The electronic device can better understand and respond to various data processing requests, providing more efficient and reliable performance.

[0302] (7) The electronic device can construct a comprehensive and efficient decision tree to optimize resource allocation for data processing requests. The decision tree has N+1 levels, ensuring that each operating environment parameter is fully considered during the decision-making process. The number of adjustment sequences is 2^N, providing sufficient flexibility to adapt to resource allocation needs under different combinations of operating environment parameters. The values ​​of sequence elements in different adjustment sequences are at least partially different, enabling the electronic device to make precise weight adjustments for specific combinations of operating environment parameters. By using the preset judgment condition of the first operating environment parameter as the root node and traversing each operating environment parameter, using the judgment condition as a node, the electronic device can systematically construct the decision tree. The two child nodes of each node indicate whether the judgment condition is met or not, enabling the decision tree to cover all possible combinations of operating environment parameters. Finally, for each Nth node, the electronic device uses the preset adjustment sequence as child nodes to complete the construction of the decision tree. This decision tree structure not only improves the efficiency and accuracy of the electronic device in processing data requests, but also makes resource allocation more intelligent and optimized. The electronic device can better understand and respond to various data processing requests, providing more efficient and reliable performance.

[0303] (8) When the electronic device receives the j-th data processing request, it first obtains the decision tree corresponding to the (j-1)-th request. If all weights in the initial weight sequence of the (j-1)-th request are not zero, it indicates that the previous resource allocation strategy was effective, and the electronic device can directly use the decision tree for resource allocation. This ensures that effective strategies can be continuously applied in consecutive requests, improving the system's response speed and processing efficiency. However, if there are weights equal to zero in the initial weight sequence, it indicates that some operating environment parameters did not play a role in the previous resource allocation, and the electronic device needs to adjust the decision tree. This adjustment is based on the initial weight sequence of the (j-1)-th request. By analyzing the operating environment parameters with zero weights, the electronic device can optimize the structure and weight allocation of the decision tree to better adapt to the current request characteristics. This not only reduces the need for manual adjustment but also allows the decision tree to be continuously optimized as the system runs and data accumulates, achieving more intelligent and efficient resource management. Through this adaptive optimization process, the electronic device can better understand and respond to various data processing requests, providing more efficient and reliable performance.

[0304] (9) When the electronic device receives the j-th data processing request, if there is an initial weight equal to zero in the initial weight sequence of the (j-1)-th request, the electronic device needs to adjust the decision tree corresponding to the (j-1)-th request. For each initial weight with a weight of zero, the electronic device finds the corresponding node in the decision tree and deletes it, while connecting nodes at adjacent levels to maintain the structural integrity of the decision tree. This adjustment is based on the initial weight sequence of the (j-1)-th request. By analyzing the operating environment parameters with weights of zero, the electronic device can optimize the structure and weight allocation of the decision tree to better adapt to the current request characteristics. This not only reduces the need for manual adjustment but also allows the decision tree to be continuously optimized as the system runs and data accumulates, achieving more intelligent and efficient resource management. Through this adaptive optimization process, the electronic device can better understand and respond to various data processing requests, providing more efficient and reliable performance.

[0305] (10) Electronic devices can adaptively optimize data processing requests, improving the efficiency and accuracy of resource allocation. Specifically, the electronic device first obtains the initial weight sequence and decision tree corresponding to the data processing request. Then, based on the initial parameter values ​​of each operating environment parameter, a weight adjustment sequence is predicted through the decision tree. This weight adjustment sequence reflects the importance of the operating environment parameter in the current request. Next, the electronic device adjusts the initial weight of each operating environment parameter based on the weight adjustment sequence to obtain the final weight of each operating environment parameter. This adjustment process considers the dynamic changes of the operating environment parameters, making resource allocation more flexible and accurate. The electronic device can dynamically adjust the resource allocation strategy according to the characteristics of different data processing requests, improving the system's response speed and processing efficiency. At the same time, the adaptability and optimizability of the decision tree model enable the electronic device to continuously optimize the resource allocation strategy as the system runs and data accumulates, achieving more intelligent and efficient management.

[0306] (11) Electronic devices can adaptively optimize data processing requests, improving the efficiency and accuracy of resource allocation. Specifically, the electronic device first performs a weighted summation of the initial parameter values ​​of each operating environment parameter according to their respective weights to obtain candidate parameter values. These candidate parameter values ​​reflect the comprehensive impact of each operating environment parameter on resource allocation. Then, the electronic device obtains a preset parameter adjustment coefficient and adjusts the candidate parameter values ​​based on this coefficient to obtain target parameter values. This target parameter value is the final reference value for resource allocation, used to guide the electronic device in resource allocation. The electronic device can dynamically adjust its resource allocation strategy according to the weights of the operating environment parameters and the parameter adjustment coefficients, improving the system's response speed and processing efficiency. At the same time, the adaptability and optimizability of the decision tree model enable the electronic device to continuously optimize its resource allocation strategy as the system operates and data accumulates, achieving more intelligent and efficient management.

[0307] (12) The electronic device first acquires parameter value ranges that correspond one-to-one with preset data processing methods. These parameter value ranges are set based on historical data, performance tests, or experience, and are used to describe under what parameter values ​​a certain data processing method is most suitable or efficient. Then, the electronic device compares the calculated target parameter value with each parameter value range to determine the target parameter value range to which the target parameter value belongs. Finally, the electronic device determines the data processing method corresponding to the target parameter value range as the target data processing method for processing the current data request. The electronic device can dynamically select the most suitable data processing method according to the characteristics of different data processing requests, thereby improving the system's response speed and processing efficiency.

[0308] (13) The electronic device first determines the target data processing method based on the target parameter value. When the target data processing method is the first data processing method (such as Direct IO), the electronic device directly obtains the first data processing result from the server in response to the data processing request and sends it to the application. This method is suitable for large-scale, sequential data processing requests and can significantly improve the efficiency and response speed of data processing. When the target data processing method is the second data processing method (such as Buffered IO), the electronic device first performs data processing based on its cache to obtain the first sub-result, and simultaneously obtains the second sub-result from the server in response to the data processing request. Then, the two results are merged to obtain the second data processing result, which is then sent to the application. This method can effectively utilize the caching mechanism, reduce the number of direct accesses to physical storage devices, reduce data processing latency, and improve the overall performance and response speed of the system.

[0309] (14) The embodiments of this application automatically adapt to the current application environment and the overall system operation, and optimize decisions through real-time detection and feedback. By selecting the optimal IO mode through real-time decision-making, the system resource utilization is improved and data transfer loss is reduced. The decision-making mode is self-optimizing and automatically performs real-time feedback optimization based on the results of each IO operation.

[0310] (15) The performance parameters consist of multiple sub-performance parameters, each of which is associated with an initial weight of at least one runtime environment parameter. This association allows us to influence the overall performance by adjusting the sub-performance parameters. When processing the (j-1)th data processing request, we first obtain its corresponding initial weight sequence. Then, for each sub-performance parameter, we precisely adjust the initial weights associated with it in the initial weight sequence based on its current performance. This adjustment process may involve increasing or decreasing the weights to reflect the contribution of the sub-performance parameter to the overall performance. The adjusted weights reflect the change in the importance of the sub-performance parameter in the current data processing request. Next, we replace the initial weights in the initial weight sequence of the (j-1)th data processing request with the corresponding adjusted weights one by one to obtain the initial weight sequence of the j-th data processing request. This process ensures that the weight sequence can reflect the changes in performance parameters in real time, enabling electronic devices to optimize data processing strategies based on the latest performance data, thereby improving processing efficiency and accuracy.

[0311] (16) Determine the difference between the parameter adjustment coefficient and the candidate parameter value, which reflects the gap between the current parameter value and the expected value. Then, multiply this difference by the preset coefficient to obtain the product value. The preset coefficient is used to adjust the adjustment range and ensure the stability and controllability of the parameter adjustment process. Next, we normalize the product value through an activation function to obtain the target parameter value. The activation function maps the product value to a specific range, usually [0, 1] or 1, 1], thereby ensuring the rationality of the target parameter value. This process ensures that the parameter adjustment process can adapt to different needs and scenarios according to the parameter adjustment coefficient, thereby optimizing the performance and efficiency of electronic devices.

[0312] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A data processing method, characterized in that, Applied to electronic devices, the method includes: In response to a data processing request, initial parameter values ​​for each of the multiple operating environment parameters of the electronic device are determined, wherein the operating environment parameters are used to characterize the operating environment of the electronic device; Based on the initial parameter values, the weight of each of the operating environment parameters is determined, and the target parameter value is determined based on the weights and the initial parameter values ​​of each of the operating environment parameters. Based on the target parameter value, a target data processing method is selected from multiple preset data processing methods to respond to the data processing request.

2. The method according to claim 1, characterized in that, The step of determining the weight of each of the operating environment parameters based on the initial parameter values ​​includes: Obtain the initial weight sequence corresponding to the data processing request, wherein the initial weight sequence includes the initial weight of each of the operating environment parameters; Obtain the decision tree corresponding to the data processing request, where different runtime environment parameters correspond to different levels in the decision tree; Based on the initial parameter value of each of the operating environment parameters, a weight adjustment sequence is obtained by prediction through the decision tree. The weight adjustment sequence includes multiple weight adjustment coefficients, which are used to adjust the weights of the multiple operating environment parameters. The initial weights of each of the operating environment parameters are adjusted based on the weight adjustment sequence to obtain the weights of each of the operating environment parameters.

3. The method according to claim 1 or 2, characterized in that, When the data processing request is the first data processing request sent by the application, obtaining the decision tree corresponding to the data processing request includes: Obtain a preset judgment condition for each of the aforementioned operating environment parameters, wherein the judgment condition is used to determine whether the initial parameter value of the operating environment parameter is within a preset parameter value range; The decision tree corresponding to the data processing request is constructed by using the judgment conditions of each of the aforementioned operating environment parameters as non-leaf nodes of the decision tree and multiple preset weight adjustment sequences as leaf nodes.

4. The method according to any one of claims 1 to 3, characterized in that, The step of constructing a decision tree corresponding to the data processing request, using the judgment conditions of each of the operating environment parameters as non-leaf nodes of the decision tree and multiple preset weight adjustment sequences as leaf nodes, includes: The order of the plurality of operating environment parameters is determined, and the order of the operating environment parameters corresponds to the level of the decision tree in which the operating environment parameters are located; Obtain the preset weight adjustment sequence, the number of which is positively correlated with the number of the operating environment parameters; Based on the sorting of the multiple operating environment parameters, the judgment conditions for each of the operating environment parameters, and the preset weight adjustment sequence, the multiple operating environment parameters are fitted to obtain the decision tree.

5. The method according to any one of claims 1 to 4, characterized in that, When the data processing request is the j-th data processing request, j is the number of times the application sends the data processing request, and j is a positive integer greater than or equal to 2. Obtaining the initial weight sequence corresponding to the data processing request includes: Obtain the initial weight sequence corresponding to the (j-1)th data processing request, wherein the initial weight sequence corresponding to the (j-1)th data processing request includes the initial weights of each operating environment parameter determined when responding to the (j-1)th data processing request. Determine the performance parameters of the electronic device when it responds to the (j-1)th data processing request; Based on the performance parameters, the initial weight sequence corresponding to the (j-1)th data processing request is adjusted to obtain the initial weight sequence corresponding to the j-th data processing request.

6. The method according to any one of claims 1 to 5, characterized in that, The performance parameters include multiple sub-performance parameters, and the sub-performance parameters are associated with the initial weight of at least one of the operating environment parameters; The step of adjusting the initial weight sequence corresponding to the (j-1)th data processing request based on the performance parameters to obtain the initial weight sequence corresponding to the j-th data processing request includes: For each of the sub-performance parameters, based on the sub-performance parameters, the initial weights associated with the sub-performance parameters in the initial weight sequence corresponding to the (j-1)th data processing request are adjusted to obtain the adjusted weights; The initial weights in the initial weight sequence corresponding to the (j-1)th data processing request are replaced with the corresponding adjusted weights to obtain the initial weight sequence of the j-th data processing request of the application.

7. The method according to any one of claims 1 to 6, characterized in that, The step of adjusting the initial weights associated with the sub-performance parameters in the initial weight sequence corresponding to the (j-1)th data processing request based on the sub-performance parameters to obtain the adjusted weights includes: The parameter change value of the sub-performance parameter is determined, and the preset change value that is the same as the parameter change value among multiple preset change values ​​is determined as the target preset change value. Different preset change values ​​correspond to different adjustment weight values. The weights after that.

8. The method according to any one of claims 1 to 5, characterized in that, The step of obtaining the decision tree corresponding to the data processing request includes: Obtain the decision tree corresponding to the (j-1)th data processing request; When there is no initial weight equal to zero in the initial weight sequence corresponding to the (j-1)th data processing request of the application, the decision tree corresponding to the (j-1)th data processing request of the application is determined as the decision tree corresponding to the j-th data processing request. When there is an initial weight equal to zero in the initial weight sequence corresponding to the (j-1)th data processing request, the decision tree corresponding to the (j-1)th data processing request is adjusted based on the initial weight sequence corresponding to the (j-1)th data processing request to obtain the decision tree corresponding to the j-th data processing request.

9. The method according to any one of claims 1 to 8, characterized in that, The step of adjusting the decision tree corresponding to the (j-1)th data processing request based on the initial weight sequence corresponding to the (j-1)th data processing request to obtain the decision tree corresponding to the j-th data processing request includes: For each initial weight in the initial weight sequence of the (j-1)th data processing request of the application, the following processing is performed to obtain the decision tree corresponding to the j-th data processing request: When the value of the initial weight is zero, the node of the level corresponding to the initial weight in the decision tree corresponding to the (j-1)th data processing request is deleted, and the nodes in the two levels adjacent to the level corresponding to the initial weight are connected.

10. The method according to any one of claims 1 to 9, characterized in that, In the decision tree, each node at the level corresponding to the operating environment parameter is a preset judgment condition for the operating environment parameter. The leaf nodes of the decision tree are preset weight adjustment sequences used to adjust the initial weights. The values ​​of the weight adjustment coefficients in the preset weight adjustment sequences of different leaf nodes are at least partially different. The weight adjustment coefficients correspond one-to-one with the operating environment parameters. The process of predicting the weight adjustment sequence using the decision tree based on the initial parameter values ​​of each of the operating environment parameters includes: Based on the initial parameter values ​​of each of the aforementioned operating environment parameters, the target leaf node corresponding to the data processing request is determined in the leaf nodes of the decision tree corresponding to the data processing request. The preset weight adjustment sequence corresponding to the target leaf node is determined as the weight adjustment sequence; The step of adjusting the initial weights of each of the operating environment parameters based on the weight adjustment sequence to obtain the weights of each of the operating environment parameters includes: The value of each weight adjustment coefficient in the weight adjustment sequence is multiplied by the initial weight of the corresponding operating environment parameter to obtain the weight of each operating environment parameter.

11. The method according to any one of claims 1 to 10, characterized in that, The determination of the target parameter value based on the weights and the initial parameter values ​​of each of the operating environment parameters includes: According to the weight of each of the operating environment parameters, the initial parameter values ​​of each of the operating environment parameters are weighted and summed to obtain candidate parameter values; Obtain a preset parameter adjustment coefficient, and adjust the candidate parameter value based on the parameter adjustment coefficient to obtain the target parameter value.

12. The method according to any one of claims 1 to 11, characterized in that, The step of adjusting the candidate parameter values ​​based on the parameter adjustment coefficient to obtain the target parameter value includes: Determine the difference between the parameter adjustment coefficient and the candidate parameter value, and multiply the difference by a preset coefficient to obtain the product value; The target parameter value is obtained by normalizing the product value using an activation function.

13. The method according to any one of claims 1 to 12, characterized in that, The step of selecting a target data processing method from multiple preset data processing methods based on the target parameter value to respond to the data processing request includes: Obtain the parameter value range that corresponds one-to-one with the preset data processing method, and compare the target parameter value with each of the parameter value ranges to determine the target parameter value range to which the target parameter value belongs; The data processing method corresponding to the target parameter value range is determined as the target data processing method.

14. The method according to any one of claims 1 to 13, characterized in that, After selecting a target data processing method from multiple preset data processing methods based on the target parameter value to respond to the data processing request, the method further includes: When the target data processing method is the first data processing method, the server obtains the first data processing result for the data processing request and sends the first data processing result to the application. When the target data processing method is the second data processing method, based on the cache of the electronic device, data processing for the data processing request is performed to obtain a first sub-result, and the second sub-result of the data processing request from the server is obtained; Based on the first sub-result and the second sub-result, a second data processing result is determined for the data processing request, and the second data processing result is sent to the application.

15. The method according to any one of claims 1 to 14, characterized in that, The runtime environment parameters include a first runtime environment parameter associated with the request information, a second runtime environment parameter associated with the running status, and a third runtime environment parameter associated with the application. The step of determining the initial parameter values ​​for each of the multiple operating environment parameters of the electronic device includes: For the first operating environment parameters, at least one of the following is extracted from the request information included in the data processing request: the data volume of the target data requested to be processed by the data processing request, the file size of the data file where the target data is located, and the preset information value corresponding to the data access type corresponding to the data processing request, as the initial parameter value; For the second operating environment parameters, at least one of the following is extracted from the operating state: the resource usage ratio of the application in the electronic device, the memory usage of the application in the electronic device, the load value of the electronic device, and the network transmission speed of the electronic device, as the initial parameter value; For the third runtime environment parameter, the application level value of the application is used as the initial parameter value.

16. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to determine the initial parameter values ​​of each of the multiple operating environment parameters of the electronic device in response to a data processing request. The operating environment parameters are used to characterize the operating environment of the electronic device. The determination module is used to determine the weight of each of the operating environment parameters based on the initial parameter values, and to determine the target parameter value based on the weights and the initial parameter values ​​of each of the operating environment parameters; The selection module is used to select a target data processing method from multiple preset data processing methods based on the target parameter value to respond to the data processing request.

17. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method according to any one of claims 1 to 15.

18. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, they implement the data processing method according to any one of claims 1 to 15.

19. A computer program product comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by a processor, the data processing method according to any one of claims 1 to 15 is implemented.