Data processing method, device, equipment and medium
By iteratively adjusting the number of data processing processes to meet the performance threshold, the problem of low resource utilization in cloud computing is solved, and more efficient resource management and traffic adaptability are achieved.
Patent Information
- Application Number
- CN202411347440.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-09-25
AI Technical Summary
In the existing technology, the data processing process utilization rate of cloud computing resources is low, resulting in a waste of hardware resources and an inability to achieve flexible and efficient resource adjustment according to real-time changes in cloud request traffic.
The number of data processing processes is determined through iteration and verification steps until its performance parameters meet the preset threshold, and the number of data processing processes is dynamically adjusted to accurately match the needs of data processing requests.
It improves the utilization of hardware resources, achieves more flexible and efficient data processing process management, and adapts to traffic changes of cloud computing services.
Smart Images

Figure CN119311387B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of cloud computing technology, in particular to the field of data processing and process management technology, and specifically to a data processing method, device, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] Cloud computing refers to a technology system that provides network access to elastically scalable shared pools of physical or virtual resources. These resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on an on-demand, self-service basis. Cloud computing technology provides efficient and powerful data processing capabilities for the application of technologies such as artificial intelligence and blockchain, as well as for model training.
[0003] The traffic of cloud computing services usually changes dynamically. In order to improve the utilization of cloud computing resources, cloud computing service resources can be dynamically expanded or reduced according to the traffic changes of computing requests.
[0004] The approaches described in this section are not necessarily approaches that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any approach described in this section is prior art simply by virtue of its inclusion in this section. Similarly, unless otherwise indicated, the issues raised in this section should not be considered as having been recognized in any prior art. Summary of the Invention
[0005] The present disclosure provides a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product.
[0006] According to one aspect of the present disclosure, a data processing method is provided, comprising: determining a first number of multiple data processing requests to be processed; determining a second number; and executing the first number of data processing requests using the second number of data processing processes, wherein the second number is determined by the following steps: determining a processing performance parameter for executing the first number of data processing requests using an initial number of data processing processes, wherein the processing performance parameter includes at least one of response time, processor usage, and memory usage; in response to determining that the processing performance parameter is not greater than a parameter threshold, determining the initial number to be the second number; in response to determining that the processing performance parameter is greater than the parameter threshold, performing an iterative increase operation on the initial number based on a target step size until the processing performance parameter for executing the first number of data processing requests using the current number of data processing processes after the iteration is not greater than the parameter threshold; and determining the current number to be the second number.
[0007] According to another aspect of the present disclosure, a data processing device is provided, including: a first determination unit, configured to determine a first number of multiple data processing requests to be processed; a second determination unit, configured to determine a second number; and an execution unit, configured to execute the first number of data processing requests using the second number of data processing processes, wherein the second determination unit includes: a first determination sub-unit, configured to determine a processing performance parameter for executing the first number of data processing requests using an initial number of data processing processes, wherein the processing performance parameter includes at least one of response time, processor usage, and memory usage; a second determination sub-unit, configured to determine that the initial number is the second number in response to determining that the processing performance parameter is not greater than a parameter threshold; and an iteration sub-unit, configured to perform an iterative increase operation on the initial number based on a target step size in response to determining that the processing performance parameter is greater than the parameter threshold, until the processing performance parameter for executing the first number of data processing requests using the current number of data processing processes after iteration is not greater than the parameter threshold, wherein the second determination sub-unit is further configured to determine that the current number is the second number.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned data processing method.
[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above data processing method.
[0010] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program can implement the above data processing method when executed by a processor.
[0011] According to one or more embodiments of the present disclosure, data processing processes can be managed more efficiently and flexibly, thereby improving process utilization.
[0012] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.
[0014] Figure 1 A schematic diagram illustrating an exemplary system in which the various methods described herein may be implemented according to exemplary embodiments of the present disclosure;
[0015] Figure 2 A flow chart showing a data processing method according to an exemplary embodiment of the present disclosure is shown;
[0016] Figure 3 A schematic diagram illustrating a data processing process according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 4 A schematic diagram illustrating a data processing process according to an exemplary embodiment of the present disclosure is shown;
[0018] Figure 5 shows a structural block diagram of a data processing device according to an exemplary embodiment of the present disclosure;
[0019] Figure 6 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0020] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0021] In this disclosure, unless otherwise specified, the use of terms such as "first" and "second" to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, while in some cases, based on the context of the description, they may also refer to different instances.
[0022] The terms used in the descriptions of the various examples described in this disclosure are for the purpose of describing specific examples only and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in this disclosure encompasses any one and all possible combinations of the listed items.
[0023] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0024] Figure 1 FIG2 is a schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more applications.
[0025] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the execution of the data processing method.
[0026] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0027] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may, in turn, utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0028] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to send a data processing request. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure can support any number of client devices.
[0029] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service kiosks, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and the like. These computer devices may run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as Google Chrome OS); or various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), and the like. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices and internet-enabled gaming devices. Client devices are capable of executing a variety of different applications, such as various internet-related applications, communication applications (such as email applications), and short message service (SMS) applications, and may utilize various communication protocols.
[0030] The network 110 may be any type of network known to those skilled in the art that can support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0031] Server 120 may include one or more general-purpose computers, specialized server computers (e.g., PC (personal computer) servers, UNIX servers, midrange servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0032] The computing units in the server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
[0033] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display the data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0034] In some embodiments, server 120 may be a server in a distributed system or a server integrated with blockchain. Server 120 may also be a cloud server or an intelligent cloud computing server or intelligent cloud host equipped with artificial intelligence technology. A cloud server is a host product within the cloud computing service system that addresses the management difficulties and poor scalability of traditional physical hosts and virtual private servers (VPS) services.
[0035] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in a variety of locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.
[0036] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0037] Figure 1 The system 100 may be configured and operated in various ways to enable application of the various methods and apparatuses described in accordance with the present disclosure.
[0038] In related technologies, when container cluster management technology is applied to manage cloud computing service resources, container network orchestration technology can be applied to implement container orchestration and container scaling. In this case, each data processing instance in the cloud computing service runs a data processing process, and the HPA (Horizontal Pod Autoscaler) controller can be applied to dynamically adjust the number of data processing instances to achieve instance-level scaling. However, this approach fails to dynamically adjust the data processing process, resulting in low data processing process utilization and wasted hardware resources. Furthermore, because each step of instance adjustment is coupled with the scheduling processes of other services, which may involve shared network resources or scheduling resources, the response time of instance adjustment may be excessively long, making it impossible to achieve flexible and efficient resource adjustment based on real-time changes in cloud request traffic.
[0039] Based on this, the present disclosure provides a data processing method, which uses repeated iteration and verification steps to iterate the target number of data processing processes when determining the number of data processing requests to be processed, until the performance data corresponding to the target number of current data processing processes can meet the preset performance requirements, thereby being able to more flexibly and accurately dynamically control the number of processes occupied by the data processing process to improve the utilization of hardware resources.
[0040] Figure 2FIG. 2 shows a flow chart of a data processing method 200 according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method 200 includes:
[0041] Step S210: determining a first number of multiple data processing requests to be processed;
[0042] Step S220: determining a second quantity; and
[0043] Step S230: Execute the first number of data processing requests using the second number of data processing processes, wherein step S220 includes:
[0044] Step S221: determining processing performance parameters for executing the first number of data processing requests using the initial number of data processing processes, wherein the processing performance parameters include at least one of response time, processor usage, and memory usage;
[0045] Step S222: in response to determining that the processing performance parameter is not greater than the parameter threshold, determining the initial number to be a second number;
[0046] Step S223: in response to determining that the processing performance parameter is greater than the parameter threshold, iteratively increasing the initial number based on the target step size until the processing performance parameter of executing the first number of data processing requests using the current number of data processing processes after the iteration is no greater than the parameter threshold; and
[0047] Step S224: Determine that the current quantity is the second quantity.
[0048] By applying the above method 200, it is possible to determine the first number of data processing requests to be processed, and then repeatedly iterate and verify the number of data processing processes until the performance data corresponding to the current number of data processing processes can meet the preset performance requirements, so that the second number of data processing processes corresponding to the first number of data processing requests can be obtained more accurately and efficiently, so that the number of processes occupied by the first number of data processing requests can be accurately matched with the number of requests, so as to improve the utilization of hardware resources.
[0049] In some examples, the data processing request may be a data processing request sent by a user of a cloud computing service, such as a data processing request initiated by a user calling a network interface, or a timed data processing request initiated by a user by configuring a timed trigger mechanism.
[0050] In some examples, determining the first number of multiple data processing requests to be processed in step S210 may be determining the number of data processing requests received within a certain unit time period. As long as the traffic number characteristics of the data processing requests to be processed can be indicated, the present disclosure does not limit the specific statistical method for the first number.
[0051] According to some embodiments, the plurality of data processing requests include data processing type information, and the process type information of the second number of data processing processes is determined based on the data processing type information of the plurality of data processing requests. Thus, different types of processes can be deployed based on the data processing types of the data processing requests, thereby improving data processing capabilities.
[0052] In some examples, the data processing request may be various types of function computing requests, and various types of function computing processes may be created or called to respond to the data processing request.
[0053] According to some embodiments, method 200 is implemented by a first data processing instance, the second number is determined by a first scheduling process in the first data processing instance, and method 200 further includes: creating the second number of data processing processes in the first data processing instance using the first scheduling process. Thus, a scheduling process can be configured in each instance of a cloud computing service to manage the data processing processes in that instance, thereby improving the efficiency and flexibility of data processing process management and increasing the utilization of data processing resources.
[0054] It can be understood that the scheduling process within each data processing instance is only responsible for the scaling management of the data processing process within the current instance. The scheduling process only needs to calculate and predict the number of data processing processes and processing performance parameters, and then schedule the data processing processes within the instance. The scheduling process occupies less network resources and computing resources, thereby enabling more flexible and efficient process resource management.
[0055] According to some embodiments, method 200 further includes: creating a second data processing instance including a second scheduling process; and creating at least one data processing process in the second data processing instance using the second scheduling process, wherein in step S230, executing the first number of data processing requests using the second number of data processing processes includes: executing the first number of data processing requests using the data processing processes in the first data processing instance and the data processing processes in the second data processing instance together. Thus, instance-level scaling can be achieved to more flexibly configure hardware resources and improve resource utilization.
[0056] In some examples, the expansion or reduction of data processing instances can be achieved by applying the HPA (Horizontal Pod Autoscaler) controller, and then the dynamic resource configuration at the two levels of instance scaling and process scaling can be combined to more flexibly and efficiently manage data processing hardware resources, so that the allocation of cloud computing resources can adapt to the traffic volume characteristics of data processing requests, thereby improving the utilization of hardware resources.
[0057] According to some embodiments, the first number of data processing requests is allocated to the first data processing instance and the second data processing instance using a request routing module, and method 200 further includes: in response to determining that at least one data processing process is already included in the second data processing instance, updating the request routing module so that the updated request routing module can send the data processing request to the second data processing instance. In this way, the data processing instance can be preheated, and the information of the request routing module is updated after the data processing process has been started, ensuring that the request routing module can distribute data processing requests to the data processing instance only when the data processing instance already includes a data processing process, thereby avoiding the data processing request being distributed to an instance without a data processing process, thereby improving data processing efficiency.
[0058] Figure 3 Schematic diagram showing a data processing process according to an exemplary embodiment of the present disclosure. Figure 3 As shown, the data processing process is implemented using an instance resource pool 300. In this example, the instance resource pool 300 may include multiple data processing instances 310, and the multiple data processing instances 310 can use an instance controller 320 to dynamically adjust their number. In one example, each data processing instance can correspond to a container, enabling the application of container-based cluster management technology to manage cloud computing resources. In one example, the instance controller 320 can be implemented based on the HPA (Horizontal Pod Autoscaler) controller, enabling dynamic scaling at the instance level based on the load information (e.g., processor utilization, memory utilization) of each data processing instance.
[0059] Continue to see Figure 3 The data processing instance 310 may include a scheduling process 311 and at least one data processing process 312. As mentioned above, the scheduling process 311 can calculate and predict the number and processing performance parameters of the data processing processes in each data processing instance 310, thereby realizing dynamic expansion and contraction of the data processing processes within the instance.
[0060] Figure 4 Schematic diagram showing a data processing process according to an exemplary embodiment of the present disclosure. Figure 4As shown, after a data processing request reaches the cloud computing platform, it will be distributed by HTTP gateway 410 and request routing module 420 to each data processing instance 310 in the instance resource pool 300. It is understandable that when instance-level dynamic scaling technology is applied in the instance resource pool 300, the newly expanded data processing instance needs to implement the process of pulling processing resource packages and starting data processing processes, which will result in time loss and inability to respond to data processing requests immediately. When a data processing request is distributed to a data processing instance that has not yet started a data processing process, it will cause a delay in responding to the data processing request.
[0061] In this example, the technical means described above can be applied to update the information of the request routing module after the data processing process has been started, so as to achieve effective preheating of the data processing instance and ensure that the request routing module 420 can distribute data processing requests to the data processing instance only when the data processing instance already includes the data processing process, thereby avoiding the data processing request being distributed to the instance without the data processing process, thereby improving the data processing efficiency.
[0062] According to some embodiments, the first number of data processing requests is obtained within a target time period, and the processing performance parameter includes a response time. Determining the processing performance parameter for executing the first number of data processing requests using the initial number of data processing processes in step S221 includes: determining a target number of data processing requests that the initial number of data processing processes can process within the target time period; and determining the processing performance parameter based on the first number and the target number. Thus, the target number can be used to indicate the processing capacity of the initial number of data processing processes, and the response time of the data processing requests can be calculated based on the target number and the first number, thereby more accurately indicating the processing performance of the instance and meeting the needs of actual application scenarios.
[0063] In some examples, the processing performance parameter may also include other content, such as processor occupancy or memory occupancy. In this case, the occupancy of hardware resources by data processing requests can be predicted based on the number of data processing processes and the number of data processing requests.
[0064] According to some embodiments, determining the processing performance parameter based on the first number and the target number includes: determining the queue length of the request waiting queue based on the first number and the target number, wherein the waiting queue is used to cache data processing requests when the initial number of data processing processes are occupied; and determining the processing performance parameter based on the queue length. Thus, the response duration information can be more accurately calculated by calculating the queue length of the waiting queue. It can be understood that the queue length of the waiting queue can accurately indicate the response delay of the data processing request, thereby more accurately determining the processing time efficiency of the data processing process for the data processing request.
[0065] According to some embodiments, determining the queue length of the request waiting queue based on the first number and the target number includes: determining the occupancy probability of the initial number of data processing processes based on the first number and the target number; and determining the queue length based on the occupancy probability and the first number. Thus, by calculating the occupancy probability of the data processing process, response duration information can be more accurately calculated. It will be appreciated that the flow of data processing requests changes dynamically, and by calculating the occupancy probability, the probability of response delays in data processing requests can be more accurately indicated, thereby more accurately determining the processing performance parameters of the data processing process.
[0066] In some examples, the response time of the data processing process can be calculated based on the following formula:
[0067]
[0068] Where, is the number of data processing instances, is the number of data processing processes in the data processing instance, is the first number of data processing requests received during the target time period, The target number of data processing requests that the data processing process can handle within the target time period. is the occupancy probability of the data processing process (i.e., the probability that the data processing instance is busy), The response time for data processing requests.
[0069] Based on the above formula, the relevant parameters of the data processing instance and the data processing process can be substituted to calculate the corresponding response time, so as to determine whether the corresponding response time of the current number of data processing processes can meet the preset requirements during the iteration process.
[0070] The following example illustrates how to calculate the response time for a data processing request:
[0071] In this example, the number of data processing instances is 5, and the first number of data processing requests obtained during the target time period is 10. Each data processing instance can process 12 data processing requests during the target time period, and the occupancy probability can be calculated using the following formula: :
[0072]
[0073] In this example, is 5, is 10, is 12, and we can get It is 16.67%.
[0074] Obtaining the occupancy probability In this case, you can continue to calculate the queue length and response time of the waiting queue.
[0075] In this example, the queue length can be calculated using the following formula: :
[0076]
[0077] Getting the queue length After that, the response time can be calculated using the following formula :
[0078]
[0079] Time to get a response After that, you can determine the current response time Whether the preset response time threshold requirement can be met determines whether the number of iterations of the data processing process can be stopped.
[0080] In some examples, the following code may be used to implement iteration of the number of data processing processes to determine a second number that can satisfy a parameter threshold of a processing performance parameter:
[0081]
[0082] In the above code segment, the variable c indicates the current number of data processing processes in each iteration, maxC is the preset upper limit of the number of data processing processes, targetWaitTime indicates the preset response time threshold, maxLambda and mu correspond to the above and By executing the for loop code above, the current number of data processing processes can be iterated continuously until the response time waitTime corresponding to the current number meets the preset threshold requirement. Then, a second number of data processing processes that is compatible with the traffic characteristics of the current data processing request is determined. Based on the second number, dynamic scaling management of the data processing processes is implemented, thereby improving the utilization of data processing resources.
[0083] According to one aspect of the present disclosure, a data processing device is also provided. Figure 5 FIG. 5 shows a structural block diagram of a data processing device 500 according to an exemplary embodiment of the present disclosure. Figure 5 As shown, the apparatus 500 includes:
[0084] A first determining unit 510 is configured to determine a first number of a plurality of data processing requests to be processed;
[0085] A second determining unit 520 is configured to determine a second number; and
[0086] The execution unit 530 is configured to execute the first number of data processing requests using the second number of data processing processes, wherein the second determination unit 520 includes:
[0087] A first determining subunit 521 is configured to determine a processing performance parameter for executing the first number of data processing requests using the initial number of data processing processes, wherein the processing performance parameter includes at least one of a response time, a processor usage rate, and a memory usage rate;
[0088] A second determining subunit 522 is configured to, in response to determining that the processing performance parameter is not greater than a parameter threshold, determine that the initial number is the second number; and
[0089] an iterative subunit 523 configured to, in response to determining that the processing performance parameter is greater than the parameter threshold, iteratively increase the initial number based on a target step size until the processing performance parameter of executing the first number of data processing requests using the current number of data processing processes after iteration is no greater than the parameter threshold;
[0090] The second determining subunit 522 is further configured to determine that the current number is the second number.
[0091] According to some embodiments, the device 500 includes a first data processing instance, the second determination unit 520 includes a first scheduling process in the first data processing instance, and the second determination unit 520 is further configured to: use the first scheduling process to create the second number of data processing processes in the first data processing instance.
[0092] According to some embodiments, the device 500 also includes: a first creation unit, configured to create a second data processing instance including a second scheduling process; a second creation unit, configured to use the second scheduling process to create at least one data processing process in the second data processing example, wherein the execution unit 530 is configured to: use the data processing process in the first data processing instance and the data processing process in the second data processing instance to jointly execute the first number of data processing requests.
[0093] According to some embodiments, the device 500 also includes: a request routing module, configured to distribute the first number of data processing requests to the first data processing instance and the second data processing instance, and the device 500 also includes: an update unit, configured to update the request routing module in response to determining that at least one data processing process is included in the second data processing instance, so that the updated request routing module can send the data processing request to the second data processing instance.
[0094] According to some embodiments, the first number of data processing requests is obtained within a target time period, the processing performance parameter includes a response time, and the first determination subunit 510 includes: a first determination module, configured to determine a target number of data processing requests that the initial number of data processing processes can process within the target time period; and a second determination module, configured to determine the processing performance parameter based on the first number and the target number.
[0095] According to some embodiments, the second determination module includes: a third determination module, configured to determine the queue length of the request waiting queue based on the first number and the target number, wherein the waiting queue is used to cache data processing requests when the initial number of data processing processes are occupied; and a fourth determination module, configured to determine the processing performance parameter based on the queue length.
[0096] According to some embodiments, the third determination module includes: a fifth determination module, configured to determine the occupancy probability of the initial number of data processing processes based on the first number and the target number; and a sixth determination module, configured to determine the queue length based on the occupancy probability and the first number.
[0097] According to some embodiments, the plurality of data processing requests include data processing type information, and wherein the process type information of the second number of data processing processes is determined based on the data processing type information of the plurality of data processing requests.
[0098] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned data processing method.
[0099] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is further provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned data processing method.
[0100] According to another aspect of the present disclosure, a computer program product is further provided, comprising a computer program, wherein the computer program implements the above-mentioned data processing method when executed by a processor.
[0101] refer to Figure 6 , a block diagram of an electronic device 600 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0102] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. RAM 603 may also store various programs and data required for the operation of device 600. Computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0103] Multiple components within device 600 are connected to I / O interface 605, including an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. Input unit 606 can be any device capable of inputting information into device 600. Input unit 606 can receive input numeric or character information and generate key signal input related to user settings and / or function control of the electronic device. It can include, but is not limited to, a mouse, keyboard, touch screen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 607 can be any device capable of presenting information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. Storage unit 608 can include, but is not limited to, a magnetic disk or an optical disk. Communication unit 609 allows device 600 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks. It can include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0104] The computing unit 601 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the data processing method. For example, in some embodiments, the data processing method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed onto the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the data processing method by any other suitable means (e.g., via firmware).
[0105] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-a-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0106] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0107] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0108] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0109] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0110] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0111] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0112] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples. Various elements in the embodiments or examples may be omitted or replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A data processing method, comprising: determining a first number of a plurality of data processing requests to be processed; determining a second quantity; as well as executing the first number of data processing requests using the second number of data processing processes, The second quantity is determined by the following steps: determining processing performance parameters for executing the first number of data processing requests using the initial number of data processing processes; In response to determining that the processing performance parameter is not greater than a parameter threshold, determining the initial quantity to be the second quantity; In response to determining that the process performance parameter is greater than the parameter threshold, Iteratively increasing the initial number based on the target step size until a processing performance parameter of executing the first number of data processing requests using the current number of data processing processes after iteration is no greater than the parameter threshold; and determining the current quantity to be the second quantity, The first number of data processing requests is obtained within a target time period, the processing performance parameter includes a response time, and the processing performance parameter for determining the execution of the first number of data processing requests using an initial number of data processing processes includes: determining a target number of data processing requests that can be processed by the initial number of data processing processes within the target time period; determining an occupancy probability of the initial number of data processing processes based on the first number and the target number, the occupancy probability being determined by dividing the first number by the target number; determining a queue length of a request waiting queue based on the occupancy probability and the first number, wherein the waiting queue is used to buffer data processing requests when the initial number of data processing processes are occupied; and The response time is determined by dividing the queue length by the first number.
2. The method according to claim 1, wherein The method is implemented by a first data processing instance, the second number is determined by using a first scheduling process in the first data processing instance, and the method further includes: The second number of data processing processes is created in the first data processing instance using the first scheduling process.
3. The method of claim 2, further comprising: creating a second data processing instance including a second scheduling process; creating at least one data processing process in the second data processing instance using the second scheduling process, The executing the first number of data processing requests by using the second number of data processing processes includes: The first number of data processing requests are jointly executed by the data processing process in the first data processing instance and the data processing process in the second data processing instance.
4. The method according to claim 3, wherein: The first number of data processing requests is distributed to the first data processing instance and the second data processing instance using a request routing module, and the method further includes: In response to determining that the second data processing instance includes at least one data processing process, the request routing module is updated so that the updated request routing module can send the data processing request to the second data processing instance.
5. The method according to any one of claims 1 to 4, wherein The plurality of data processing requests include data processing type information, and wherein the process type information of the second number of data processing processes is determined based on the data processing type information of the plurality of data processing requests.
6. A data processing device comprising: a first determining unit configured to determine a first number of the plurality of data processing requests to be processed; a second determining unit configured to determine a second quantity; as well as an execution unit configured to execute the first number of data processing requests using the second number of data processing processes, The second determining unit includes: a first determining subunit, configured to determine a processing performance parameter for executing the first number of data processing requests using an initial number of data processing processes; a second determining subunit configured to, in response to determining that the processing performance parameter is not greater than a parameter threshold, determine the initial number to be the second number; and an iterative subunit, configured to, in response to determining that the processing performance parameter is greater than the parameter threshold, iteratively increase the initial number based on a target step size until the processing performance parameter of executing the first number of data processing requests using the current number of data processing processes after iteration is no greater than the parameter threshold, The second determining subunit is further configured to determine that the current quantity is the second quantity, The first number of data processing requests is obtained within a target time period, the processing performance parameter includes a response time, and the first determining subunit includes: a first determining module configured to determine a target number of data processing requests that can be processed by the initial number of data processing processes within the target time period; a fifth determining module configured to determine an occupancy probability of the initial number of data processing processes based on the first number and the target number, wherein the occupancy probability is determined by dividing the first number by the target number; a sixth determining module configured to determine a queue length of a request waiting queue based on the occupancy probability and the first number, wherein the waiting queue is used to cache data processing requests when the initial number of data processing processes are occupied; and The fourth determining module is configured to determine the response time by dividing the queue length by the first number.
7. The device according to claim 6, wherein The apparatus includes a first data processing instance, the second determining unit includes a first scheduling process in the first data processing instance, and the second determining unit is further configured to: The second number of data processing processes is created in the first data processing instance using the first scheduling process.
8. The apparatus of claim 7, further comprising: a first creating unit configured to create a second data processing instance including a second scheduling process; A second creating unit is configured to create at least one data processing process in the second data processing example using the second scheduling process, Wherein, the execution unit is configured as follows: The first number of data processing requests are jointly executed by the data processing process in the first data processing instance and the data processing process in the second data processing instance.
9. The apparatus of claim 8, further comprising: a request routing module configured to distribute the first number of data processing requests to the first data processing instance and the second data processing instance, The device further comprises: An updating unit is configured to update the request routing module in response to determining that the second data processing example includes at least one data processing process, so that the updated request routing module can send the data processing request to the second data processing instance.
10. The device according to any one of claims 6 to 9, wherein The plurality of data processing requests include data processing type information, and wherein the process type information of the second number of data processing processes is determined based on the data processing type information of the plurality of data processing requests.
11. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 5.
13. A computer program product comprising a computer program, wherein The computer program implements the method according to any one of claims 1 to 5 when executed by a processor.
Citation Information
Patent Citations
A method and system for determining the number of parallel processes for a running unit
CN109669778A
A method and a system for dynamically distributing resources for spark streaming
CN109684078A