CN117194027A - Service-based data processing method, device, equipment and medium - Google Patents
Service-based data processing method, device, equipment and medium Download PDFInfo
- Publication number
- CN117194027A CN117194027A CN202311167322.0A CN202311167322A CN117194027A CN 117194027 A CN117194027 A CN 117194027A CN 202311167322 A CN202311167322 A CN 202311167322A CN 117194027 A CN117194027 A CN 117194027A
- Authority
- CN
- China
- Prior art keywords
- processing module
- data
- processing
- path
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title abstract description 20
- 238000012545 processing Methods 0.000 claims abstract description 504
- 238000000034 method Methods 0.000 claims description 32
- 230000004044 response Effects 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 16
- 230000005540 biological transmission Effects 0.000 claims description 8
- 238000010923 batch production Methods 0.000 claims 2
- 238000013473 artificial intelligence Methods 0.000 abstract description 16
- 238000005516 engineering process Methods 0.000 abstract description 14
- 238000013135 deep learning Methods 0.000 abstract description 3
- 238000005457 optimization Methods 0.000 description 14
- 238000004891 communication Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 238000003058 natural language processing Methods 0.000 description 7
- 238000012015 optical character recognition Methods 0.000 description 6
- 230000001133 acceleration Effects 0.000 description 4
- 238000010801 machine learning Methods 0.000 description 4
- 238000007781 pre-processing Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000013459 approach Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000001413 cellular effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000008451 emotion Effects 0.000 description 2
- 238000009432 framing Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 238000011144 upstream manufacturing Methods 0.000 description 2
- 125000002015 acyclic group Chemical group 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000010267 cellular communication Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003924 mental process Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
Abstract
The disclosure provides a data processing method, device, equipment and medium based on service, relates to the technical field of artificial intelligence, and particularly relates to the field of deep learning technology and computer vision. The implementation scheme is as follows: acquiring configuration information and performance parameters of each of a plurality of processing modules under the current configuration; determining a first processing duration for each of the plurality of data processing paths; among the plurality of data processing paths, determining a first path with the longest first processing duration; determining a target processing module on the first path based on the performance parameters of each processing module on the first path; and responding to the condition that the equipment resource occupation condition of the first equipment meets a first preset condition, and executing a first configuration updating operation on the target processing module so as to perform data processing based on the service after the configuration updating.
Description
Technical Field
The present disclosure relates to the field of artificial intelligence technology, and in particular, to the field of deep learning technology and computer vision, and more particularly, to a service-based data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product.
Background
Artificial intelligence (Artificial Intelligence, AI) is the discipline of studying the process of making a computer to simulate certain mental processes and intelligent behaviors of a person (e.g., learning, reasoning, thinking, planning, etc.), both hardware-level and software-level techniques. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology and the like.
Along with the continuous progress of machine learning technology and continuous improvement of computing power and storage of an AI acceleration chip, a plurality of machine learning models are increasingly combined in an actual application scene to solve the reality problem. For example, AI video understanding services need to be composed of models such as video framing, image recognition, face recognition, scene recognition, motion recognition, optical character recognition (Optical Character Recognition, OCR), object recognition, speech recognition, and text recognition based on natural language processing (Natural Language Processing, NLP).
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, the problems mentioned in this section should not be considered as having been recognized in any prior art unless otherwise indicated.
Disclosure of Invention
The present disclosure provides a service-based data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product.
According to an aspect of the present disclosure, there is provided a service-based data processing method, a service including a plurality of processing modules, the method comprising: acquiring configuration information and performance parameters of each of a plurality of processing modules in a current configuration, wherein the configuration information comprises the number of threads for executing the corresponding processing module, the performance parameters are used for indicating the data processing efficiency of the corresponding processing module in the current configuration, and the plurality of processing modules form a plurality of data processing paths for communicating a data input end and a data output end of a service based on data dependency relations among the plurality of processing modules; determining a first processing duration for each of the plurality of data processing paths, the first processing duration indicating a total time consumption for the respective data processing path to perform data processing and data transmission; among the plurality of data processing paths, determining a first path with the longest first processing duration; determining a target processing module on the first path based on the performance parameters of each processing module on the first path; and responding to the condition that the equipment resource occupation condition of the first equipment accords with a first preset condition, executing a first configuration updating operation on the target processing module to perform data processing based on the service after configuration updating, wherein the first equipment is at least used for running the target processing module, the first preset condition comprises that the CPU memory, the graphics processor memory and the equipment utilization rate of the first equipment do not exceed respective upper limits, and the first configuration updating operation comprises that the thread number of the target processing module is increased according to a first preset number.
According to another aspect of the present disclosure, there is provided a service-based data processing apparatus, a service including a plurality of processing modules, the apparatus comprising: a first obtaining unit configured to obtain configuration information and performance parameters of each of a plurality of processing modules in a current configuration, the configuration information including a number of threads for executing the corresponding processing module, the performance parameters indicating data processing efficiency of the corresponding processing module in the current configuration, the plurality of processing modules constituting a plurality of data processing paths based on data dependency relationships among the plurality of processing modules; a first determining unit configured to determine a first processing duration of each of the plurality of data processing paths, the first processing duration indicating a total time consumption of the respective data processing path for data processing and data transmission; a second determining unit configured to determine a first path having a longest first processing duration among the plurality of data processing paths; a third determining unit configured to determine a target processing module on the first path based on the performance parameter of each processing module on the first path; and a first updating unit configured to execute a first configuration updating operation on the target processing module in response to the device resource occupation condition of the first device conforming to a first preset condition, so as to perform data processing based on the service after the configuration updating, where the first device is at least used to run the target processing module, the first preset condition includes that a central processor memory, a graphics processor memory and a device usage rate of the first device do not exceed respective upper limits, and the first configuration updating operation includes increasing the number of threads of the target processing module according to a first preset number.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the service-based data processing method described above.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the above-described service-based data processing method.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the above-described service-based data processing method.
According to one or more embodiments of the present disclosure, a plurality of data processing paths can be acquired through data dependencies between processing modules; the processing time required by each path under the current configuration is tested and counted, so that a critical path which restricts the overall execution efficiency of the service is determined, and the processing module with the lowest performance in the critical path is optimized (for example, the number of threads is increased), so that the overall execution efficiency of the service can be adjusted and optimized more pertinently, and the optimization efficiency is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The accompanying drawings illustrate exemplary embodiments and, together with the description, serve to explain exemplary implementations of the embodiments. The illustrated embodiments are for exemplary purposes only and do not limit the scope of the claims. Throughout the drawings, identical reference numerals designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, in accordance with an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of a service-based data processing method according to an embodiment of the present disclosure;
FIG. 3 shows a schematic diagram of a directed acyclic graph of an AI video understanding service in accordance with an exemplary embodiment of the disclosure;
FIG. 4 illustrates a flow chart of a service-based data processing method according to an embodiment of the present disclosure;
FIG. 5 illustrates a flow diagram of a service performance optimization method according to an exemplary embodiment of the present disclosure;
FIG. 6 shows a block diagram of a service-based data processing apparatus according to an embodiment of the present disclosure;
fig. 7 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, the use of the terms "first," "second," and the like to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of the elements, unless otherwise indicated, and such terms are merely used to distinguish one element from another element. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, they may also refer to different instances based on the description of the context.
The terminology used in the description of the various illustrated examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, the elements may be one or more if the number of the elements is not specifically limited. Furthermore, the term "and/or" as used in this disclosure encompasses any and all possible combinations of the listed items.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented, in accordance with an embodiment of the present disclosure. Referring to fig. 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. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In embodiments of the present disclosure, the server 120 may run one or more services or software applications that enable the execution of the service-based data processing methods described above.
In some embodiments, server 120 may also provide other services or software applications, which may include non-virtual environments and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof that are executable by one or more processors. A user operating client devices 101, 102, 103, 104, 105, and/or 106 may in turn utilize one or more client applications to interact with server 120 to utilize the services provided by these components. It should be appreciated that a variety of different system configurations are possible, which may differ from system 100. Accordingly, FIG. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
The user may request a service using client devices 101, 102, 103, 104, 105, and/or 106. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that the present disclosure may support any number of client devices.
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 laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, 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 (e.g., GOOGLE Chrome OS); or include various mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, windows Phone, android. Portable handheld devices may include cellular telephones, smart phones, tablet computers, personal Digital Assistants (PDAs), and the like. Wearable devices may include head mounted displays (such as smart glasses) and other devices. The gaming system may include various handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a number of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. For 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.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture that involves virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain virtual storage devices of the server). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in 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. 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, etc.
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/or 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and/or 106.
In some implementations, the server 120 may be a server of a distributed system or a server that incorporates a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The cloud server is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and virtual private server (VPS, virtual Private Server) service.
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 databases 130 may be used to store information such as audio files and video files. Database 130 may reside in various 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 may communicate with the server 120 via a network-based or dedicated connection. Database 130 may be of different types. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve the databases and data from the databases in response to the commands.
In some embodiments, one or more of databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key value stores, object stores, or conventional stores supported by the file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
According to some embodiments, as shown in fig. 2, there is provided a service-based data processing method, a service including a plurality of processing modules, the method comprising: step S201, obtaining configuration information and performance parameters of each processing module in a plurality of processing modules in the current configuration, wherein the configuration information comprises a thread number for executing the corresponding processing module, the performance parameters are used for indicating data processing efficiency of the corresponding processing module in the current configuration, and the plurality of processing modules form a plurality of data processing paths for communicating a data input end and a data output end of a service based on data dependency relations among the plurality of processing modules; step S202, determining a first processing duration of each data processing path in a plurality of data processing paths, wherein the first processing duration indicates the total time consumption of the corresponding data processing path for data processing and data transmission; step S203, determining a first path with the longest first processing duration in a plurality of data processing paths; step S204, determining a target processing module on the first path based on the performance parameters of each processing module on the first path; and step S205, executing a first configuration updating operation on the target processing module in response to the equipment resource occupation condition of the first equipment meeting a first preset condition, so as to perform data processing based on the service after configuration updating, wherein the first equipment is at least used for running the target processing module, the first preset condition comprises that the CPU memory, the graphics processor memory and the equipment utilization rate of the first equipment do not exceed respective upper limits, and the first configuration updating operation comprises that the thread number of the target processing module is increased according to a first preset number.
Thus, a plurality of data processing paths are obtained through the data dependency relationship among the processing modules; the processing time required by each path under the current configuration is tested and counted, so that a critical path which restricts the overall execution efficiency of the service is determined, and the processing module with the lowest performance in the critical path is optimized (for example, the number of threads is increased), so that the overall execution efficiency of the service can be adjusted and optimized more pertinently, and the optimization efficiency is improved.
In some embodiments, the service is a piece of software executed in a server for providing specific functions. Some complex services may provide multiple functions, each of which is implemented by a code module. After the developer writes each code module, each code module can be deployed to the server, that is, the service is deployed to the server. The server may then provide the service to the user. Hereinafter, a code module for providing a specific function in a service is referred to as a "processing module".
For example, a video surveillance service may be deployed for intelligent traffic scenarios. The video monitoring service may include, for example, three processing modules, namely, a vehicle model recognition module, a human body detection module, and a human body posture recognition module.
In some embodiments, each processing module may also be an artificial intelligence model with specific functions. For example, AI video understanding services may be composed of models such as video framing, image recognition, face recognition, scene recognition, motion recognition, OCR recognition, object recognition, speech recognition, NLP text recognition, etc., based on certain data dependencies.
In some embodiments, the plurality of processing modules may constitute a plurality of data processing paths that communicate data inputs and data outputs of the service based on data dependencies between the plurality of processing modules.
The data dependency relationship among the plurality of processing modules is used for representing the execution sequence and the data flow of the plurality of processing modules. According to some embodiments, data dependencies between multiple processing modules may be represented by a directed acyclic graph (Directed Acyclic Graph, DAG). The directed acyclic graph is a directed graph without loops. Directed acyclic graphs are an effective tool for describing workflows. The directed acyclic graph is adopted to represent the data dependency relationship among the plurality of processing modules, so that the configuration and analysis of the data dependency relationship among the processing modules can be facilitated. For example, a directed acyclic graph can be utilized to analyze whether a service composed of processing modules can be successfully executed, estimate an overall response time of the service, and so forth.
In some embodiments, multiple data processing paths in the service may be constructed based on the data dependencies between the multiple processing modules.
Fig. 3 shows a schematic diagram of a directed acyclic graph of an AI video understanding service, according to an example embodiment of the disclosure.
In some exemplary embodiments, as shown in fig. 3, the service 300 includes a pre-processing module 301, a video frame extraction module 302, an audio recognition module 303, a face recognition module 304, a scene recognition module 305, an action recognition module 306, an object recognition module 307, an NLP text recognition module 308, an OCR text recognition module 309, an emotion classification module 310, and a scoring module 311. The data dependency relationship between the processing modules is represented by edges in the directed acyclic graph, each edge is connected to a sender and a receiver of data, and an arrow thereof indicates a direction of data transmission.
As shown in fig. 3, when a processing request is received, data to be processed (for example, a video segment) is first sent to the pre-processing module 301, after the pre-processing module 301 performs pre-processing, the processed data is distributed to the video frame extraction module 302 and the audio recognition module 303, the video frame extraction module 302 further sends the processed data to the face recognition module 304, the scene recognition module 305, the action recognition module 306 and the object recognition module 307 respectively, so as to perform different processing respectively, and the audio recognition module 303 also further sends the processed data to the NLP text recognition module 308, the OCR text recognition module 309 and the emotion classification module 310 respectively, so as to perform different processing respectively. Finally, the scoring module 311 receives the processing results from each module upstream thereof, and performs comprehensive scoring after receiving the processing results of all modules, so as to output a final result.
In some embodiments, a node path connecting the data input and the data output of the service may be referred to as a data processing path.
As shown in fig. 3, the service 300 includes 7 processing paths, namely, path 31, path 32, path 33, path 34, path 35, path 36 and path 37.
In some embodiments, for more complex services of processing logic, such as one or more intermediate nodes in its directed acyclic graph, each of which requires data processing based on processing results of a plurality of upstream modules, the intermediate node may also be considered a data output, and its corresponding data processing path may be determined for the intermediate node based on the data output for subsequent configuration update operations.
In some embodiments, for such more complex services as described above, the following configuration update operations may be performed first for the plurality of data processing paths of the respective intermediate nodes as described above; after the update is completed, the following configuration update operation may be continued based on the plurality of data processing paths of the overall service. Therefore, the adjustment and optimization can be carried out more specifically on the key paths and key nodes which influence the overall performance of the service, and the efficiency of the optimization operation is further improved while the optimization effect is ensured.
In some embodiments, multiple processing modules in the service may be deployed in the same device. In some embodiments, the plurality of processing modules in the service may be deployed on a plurality of device nodes on a distributed cluster.
In some embodiments, the configuration information for each processing module may include a number of threads for executing the corresponding processing module. Wherein the number of threads may be the number of threads comprised by the thread pool for executing the respective processing module.
In some embodiments, the initialization operation of the configuration information may be performed on one service, for example, the initial thread number of each processing module is set to 1. In some embodiments, a configured service may be obtained, and its existing configuration information may be obtained, and subsequent adjustment optimization may be performed again.
In some embodiments, the performance parameters may include parameters indicating the data processing efficiency of the respective processing module in the current configuration.
In some embodiments, the performance parameter may be an average response time of a single request when the corresponding processing module is executed by a single thread. In some embodiments, the performance parameter may be the amount of processing requested per unit time when the corresponding processing module is executed by a single thread, i.e., the absolute throughput described below.
When configured differently, the above-described performance parameters are also different for each processing module. In some embodiments, the performance parameters of each processing module under different configuration parameters may be obtained through pre-experiments, or may be obtained through real-time testing, which is not limited herein.
In some embodiments, the first processing time period may be a total time period consumed for data processing and data transmission on each of the data processing paths described above.
In some embodiments, a first processing duration of each data processing path in the current configuration may be obtained, and the data processing path in which the first processing duration is longest is determined as the first path, that is, a critical path affecting overall performance of the service in the current configuration.
In some embodiments, after determining the critical path, the target processing module on the path, i.e., the critical node in the current configuration that affects the processing efficiency of the path, may be determined further based on the performance parameters of each processing module on the path.
In some exemplary embodiments, the processing module with the longest average response time in the first path may be regarded as the target processing module.
In some exemplary embodiments, a processing module with the smallest absolute throughput in the first path may be regarded as the target processing module.
It will be appreciated that the skilled artisan may evaluate the processing efficiency based on other performance parameters and make the determination of the target processing module without limitation.
In some embodiments, after determining the target processing module, it is first determined whether the device resource occupation condition of the first device for executing the target processing module meets a first preset condition, that is, whether the central processor memory, the graphics processor memory, and the device utilization rate do not exceed respective upper limits.
In some embodiments, the upper limit may be, for example, 100%. It will be appreciated that the relevant technicians may set their respective upper limits for cpu memory, graphics processor memory, and device utilization by themselves based on actual needs, and are not limited herein.
In some embodiments, the device usage may be at least one of a central processor usage and a graphics processor usage.
In some embodiments, when the first device meets the first preset condition, a first configuration update operation may be performed on the target processing module, that is, the number of threads of the target processing module is increased according to the first preset number.
In some embodiments, the first preset number may be 1. It is understood that the related art may set the first preset number by himself based on actual needs, which is not limited herein.
Therefore, the processing efficiency of each data processing path of the service updated by the method can be more balanced, and the processing efficiency on the key path can be improved, so that the optimization of the overall processing performance of the service can be realized, and the data processing efficiency based on the service can be improved.
In some embodiments, as shown in fig. 4, the service-based data processing method may further include: step S401, repeating the following first operations until it is detected that the central processor memory and the graphics processor memory of the first device corresponding to the current target processing module exceed their respective upper limits, or the device usage rate of the first device corresponding to the current target processing module exceeds the device usage rate upper limit, before executing the first configuration update operation on the current target processing module, where the first operation includes: step S4011, updating the performance parameter of the target processing module and the first processing duration of each of the plurality of data processing paths for the service after updating the configuration; step S4012, redetermining a first path of the first processing duration based on the updated first processing duration of each data processing path; step S4013, redefining a target processing module on the first path based on the updated performance parameter of each processing module on the first path; step S4014, executing a first configuration update operation on the current target processing module in response to the device resource occupation condition of the first device corresponding to the current target processing module conforming to the first preset condition; and step S405, performing data processing based on the service after the configuration update.
Therefore, the first path and the target processing module are repeatedly determined, and the target processing module is subjected to performance optimization by increasing the number of threads, so that the overall performance of the service can be further optimized by performing iterative optimization in a targeted manner.
In some embodiments, after the configuration update is performed, the performance parameters of each processing module may be updated accordingly, and a new round of the first path and the target processing unit determination thereof, the corresponding checking of the device resource occupation condition of the first device, and the configuration update of the target processing unit are performed, and the above operations are repeated until the central processor memory and the graphics processor memory of the first device exceed their respective upper limits, or the device usage rate exceeds the device usage rate upper limit.
In some embodiments, when the device cpu memory and the graphics processor memory are detected to exceed their respective upper limits, or the device usage exceeds the device usage upper limit, the configuration update operation may be stopped and the current configuration information may be recorded for the case where the entire service is deployed on the same device.
In some embodiments, the plurality of processing modules in the service are deployed on a plurality of device nodes in the distributed cluster, respectively, and the service-based data processing method may further include: responding to that the CPU memory and the graphics processor memory of the first device corresponding to the current target processing module exceed respective upper limits, or the device utilization rate of the first device corresponding to the current target processing module exceeds the upper limit of the device utilization rate, and the current first path also comprises other processing modules, traversing the other processing modules one by one according to the performance parameters of each processing module from low to high until a second processing module capable of performing the first configuration updating operation or the second configuration updating operation is obtained, or determining that each processing module on the current first path cannot perform the configuration updating operation; and responding to the acquired second processing module, and executing corresponding configuration updating operation on the second processing module so as to perform data processing based on the service after the configuration updating.
In some embodiments, for the case that multiple processing modules in service are deployed on different device nodes in the distributed cluster, a processing module with the lowest data processing efficiency in other processing modules on the current first path may be further used as a target processing module, where the device resource occupation condition check and the configuration update of the target processing unit are performed until the configuration information of a certain processing module on the first path is updated, or it is detected that each processing module on the first path cannot perform configuration update, the configuration update operation may be stopped, and the current configuration information is recorded.
Therefore, different processing modules in the service are respectively deployed on different equipment nodes in the distributed cluster, so that the data processing capacity of the service can be further improved, and when the current target processing module on the first path cannot be subjected to thread adjustment, the performance of the path is optimized by adjusting other processing modules on the path, and the overall performance of the service is further optimized.
In practice, some processing modules may perform batch data processing. For example, some artificial intelligence models, in the training phase, have training data that is input in batches, and are processed in batches through the model and the results output.
For the model capable of performing batch data processing, when a plurality of data are combined into one data batch, the data are input into the processing module in batches to perform batch processing on the data, and the data processing performance of the processing module can be improved to a certain extent.
In some embodiments, the improvement in data processing performance described above may be manifested in particular as an absolute throughput improvement of the processing module, or a reduction in its average to average response time per data.
In some embodiments, based on the findings in the above experiments, the number of data batches may be taken as another configuration information, and the configuration information is further updated to optimize the processing efficiency of the processing module. The data batch numbers are used for enabling the corresponding processing modules to merge input data according to the data batch numbers so as to conduct batch processing on the merged input data.
In some embodiments, the first operation may further include: and responding to the condition that the equipment resource occupation condition of the first equipment corresponding to the current target processing module accords with a second preset condition, and executing a second configuration updating operation on the current target processing module, wherein the second configuration updating operation comprises updating the data batch number of the current target processing module according to a preset strategy, the second preset condition comprises that one of the CPU memory and the graphics processor memory of the first equipment corresponding to the current target processing module does not exceed an upper limit, the equipment utilization rate does not exceed the upper limit, and the current target processing module supports batch processing of data.
Therefore, when the performance of the processing module cannot be optimized by increasing the number of threads, the number of data batches processed in batches is adjusted, so that the overall performance of the service can be further improved by jointly adjusting the number of threads and the number of data batches.
In some embodiments, when the adjustment of the number of threads cannot be performed on the target processing module, it may be further detected whether the device resource occupation situation of the first device meets the second preset condition. When the second preset condition is met, the data batch number of the current target processing module can be further updated according to a preset strategy.
In some embodiments, a preset value (e.g., 1) may be added to the current number of data batches to update the number of data batches.
In some embodiments, the updated lot number may also be determined based on the current lot number. For example, the number of batches of data may be set to an index of 2, and when the current number of batches is acquired to be 1, the number of batches may be updated to be 2; when the current batch number acquired is 4, the batch number may be updated to 8, and so on.
In some embodiments, due to the different data processing logic of the processing modules, for individual processing modules, an inverse acceleration ratio may be generated when the number of batches is increased, i.e., when the number of batches is increased, the average response time to each data may instead be increased.
In some embodiments, experiments may be performed in advance to determine if each processing module will produce a positive acceleration ratio when performing different lot number updates. On the basis, when judging that a certain target processing module needs to update the data batch number, firstly judging whether the target processing module generates a forward acceleration ratio after the target processing module is updated, and if so, updating the data batch number of the target processing module; otherwise, the processing module is not updated, and detection and updating operations of other processing modules of the first path are performed. Thereby, the effect of service performance optimization can be further ensured.
In some embodiments, updating the number of data batches of the current target processing module according to the preset policy may include: determining a first data batch number based on the current data batch number of the target processing module; judging whether the overall processing time of the updated service exceeds a preset processing time threshold value after the current data batch number of the target processing module is updated to be the first data batch number; and in response to the overall processing time not exceeding the preset processing time threshold, updating the current data batch number of the target processing module to the first data batch number.
In practice, when the processing module performs data batch processing, since data is batch input and batch output, this also often results in that the response time of the batch data is reduced on average to each data, but the total latency of batch data from input to output is increased compared to the processing time of a single data. In this case, although the overall performance of the service can be improved, the waiting time of a part of users is also increased.
Thus, to ensure the user experience, a maximum waiting duration (i.e., a preset processing time threshold described below) of the service as a whole may be set as a constraint of another dimension. When it is judged that a certain target processing module needs to update the data batch number, it can be firstly judged whether the total waiting time of the whole service exceeds the preset processing time threshold after the target processing module is updated, if the total waiting time does not exceed the preset processing time threshold, the target processing module is updated the data batch number; otherwise, the processing module is not updated, and detection and updating operations of other processing modules of the first path are performed.
Therefore, the excessively long waiting time of a single user due to the optimization of the overall performance can be avoided by setting the preset processing time threshold, and the overall performance is improved, and meanwhile, the processing time of the single request and the experience of each user are considered.
In some embodiments, updating the data batch number of the current target processing module according to the preset policy may further include: responding to the condition that the overall processing time exceeds a preset processing time threshold value, and the current first path further comprises other processing modules, traversing the other processing modules one by one according to the performance parameters of each processing module from low to high until the first processing module capable of updating the data batch number is obtained, or determining that each processing module on the current first path cannot update the data batch number; and in response to obtaining the first processing module, updating the data batch number of the first processing module to a second data batch number, wherein the second data batch number is determined based on the pre-update data batch number of the first processing module.
Therefore, the current target processing unit cannot adjust the batch number, and the performance of the path can be further optimized by adjusting other processing modules on the first path, so that the overall performance of the service is optimized.
In some embodiments, when multiple processing modules of the service are all deployed on the same device, it may be directly determined whether other processing modules on the first path are capable of further batch number adjustment.
In some embodiments, when the plurality of processing modules of the service are deployed on different device nodes in the distributed cluster, after determining that the current target processing module cannot adjust the batch number, it may be determined whether a module with the lowest processing efficiency in other processing modules on the first path can adjust the number of threads, and if not, it may be further determined whether it can adjust the number of data batches.
In some embodiments, when it is determined that each processing module on the current first path cannot perform any configuration update operation, the configuration update operation may be stopped, and current configuration information is recorded.
In some embodiments, the service may be deployed online according to the recorded configuration information, so that the performance of the service can be optimized based on the optimal configuration of the service.
Fig. 5 shows a flow diagram of a service performance optimization method according to an exemplary embodiment of the present disclosure.
In some exemplary embodiments, as shown in fig. 5, the service performance optimization method may include: step S501, determining a target processing module; step S502, detecting whether the CPU memory of the first device corresponding to the target processing module does not exceed the upper limit; step S503, detecting whether the graphics processor memory of the first device does not exceed the upper limit; step S504, detecting whether the device usage rate of the first device does not exceed the upper limit; step S505, updating the number of threads of the target processing module in response to the CPU memory, the graphics processor memory and the device utilization of the first device not exceeding the respective upper limits; step S506, updating the data batch number of the target processing module in response to one of the CPU memory and the graphics processor memory of the first device not exceeding the upper limit and the device utilization not exceeding the upper limit; step S507, in response to the configuration information of the target processing module being updated, updating the performance parameter ranking of each processing module and the equipment resource occupation condition of each equipment node; step S508, repeating the above operations until the CPU memory and the graphics processor memory of the first device exceed the upper limit, or the device utilization rate exceeds the upper limit, ending the above operations, and recording the configuration information of each current processing module.
In some embodiments, as shown in fig. 6, there is provided a service-based data processing apparatus 600, the service including a plurality of processing modules, the apparatus 600 comprising:
a first obtaining unit 610 configured to obtain configuration information and performance parameters of each of a plurality of processing modules in a current configuration, the configuration information including a number of threads for executing the corresponding processing module, the performance parameters indicating data processing efficiency of the corresponding processing module in the current configuration, the plurality of processing modules constituting a plurality of data processing paths based on data dependency relationships among the plurality of processing modules;
a first determining unit 620 configured to determine a first processing duration of each of the plurality of data processing paths, the first processing duration indicating a total time consumption of the respective data processing path for data processing and data transmission;
a second determining unit 630 configured to determine a first path having a longest first processing duration among the plurality of data processing paths;
a third determining unit 640 configured to determine a target processing module on the first path based on the performance parameter of each processing module on the first path; and
and a first updating unit 650 configured to perform a first configuration updating operation on the target processing module in response to the device resource occupation situation of the first device meeting a first preset condition, where the first preset condition includes that the central processor memory, the graphics processor memory, and the device usage rate of the first device do not exceed respective upper limits, and the first configuration updating operation includes increasing the number of threads of the target processing module according to a first preset number, so as to perform data processing based on the service after the configuration updating.
The operations performed by the units 610 to 650 in the service-based data processing apparatus 600 are similar to the operations performed by the steps S201 to S205 of the service-based data processing method, and are not described herein.
In some embodiments, the data processing apparatus of the service may further include: the first execution unit is configured to repeatedly execute the first operation of the following sub-units until the central processor memory and the graphics processor memory of the first device corresponding to the current target processing module are detected to exceed respective upper limits before the first configuration updating operation is executed on the current target processing module, or the device usage rate of the first device corresponding to the current target processing module exceeds the upper limit of the device usage rate, and the first execution unit includes: a first updating subunit configured to update, for the service after the updating configuration, the performance parameter of the target processing module and the first processing duration of each of the plurality of data processing paths; a first determining subunit configured to re-determine the first path of the first processing duration based on the updated first processing duration of each data processing path; a second determination subunit configured to re-determine a target processing module on the first path based on the updated performance parameter of each processing module on the first path; the second updating subunit is configured to execute a first configuration updating operation on the current target processing module in response to the condition that the device resource occupation condition of the first device corresponding to the current target processing module meets a first preset condition; and a data processing unit configured to perform data processing based on the service after the configuration update.
In some embodiments, the configuration information further includes a data batch number, the data batch number is used to enable the corresponding processing module to merge input data according to the data batch number to perform batch processing on the merged input data, and the first execution unit may further include: and the third updating subunit is configured to respond to the condition that the equipment resource occupation condition of the first equipment corresponding to the current target processing module accords with a second preset condition, and execute a second configuration updating operation on the current target processing module, wherein the second configuration updating operation comprises updating the data batch number of the current target processing module according to a preset strategy, the second preset condition comprises that one of the central processor memory and the graphics processor memory of the first equipment corresponding to the current target processing module does not exceed an upper limit, the equipment utilization rate does not exceed the upper limit, and the current target processing module supports batch processing of data.
In some embodiments, updating the number of data batches of the current target processing module according to the preset policy may include: determining a first data batch number based on the current data batch number of the target processing module; judging whether the overall processing time of the updated service exceeds a preset processing time threshold value after the current data batch number of the target processing module is updated to be the first data batch number; and in response to the overall processing time not exceeding the preset processing time threshold, updating the current data batch number of the target processing module to the first data batch number.
In some embodiments, updating the data batch number of the current target processing module according to the preset policy may further include: responding to the condition that the overall processing time exceeds a preset processing time threshold value, and the current first path further comprises other processing modules, traversing the other processing modules one by one according to the performance parameters of each processing module from low to high until the first processing module capable of updating the data batch number is obtained, or determining that each processing module on the current first path cannot update the data batch number; and in response to obtaining the first processing module, updating the data batch number of the first processing module to a second data batch number, wherein the second data batch number is determined based on the pre-update data batch number of the first processing module.
In some embodiments, the plurality of processing modules in the service may be deployed on a plurality of device nodes in the distributed cluster, respectively, and the service-based data processing apparatus may further include: the second obtaining unit is configured to respond to that the CPU memory and the graphics processor memory of the first device corresponding to the current target processing module exceed the respective upper limits, or the device utilization rate of the first device corresponding to the current target processing module exceeds the upper limit of the device utilization rate, and the current first path also comprises other processing modules, and the other processing modules are traversed one by one according to the performance parameters of each processing module from low to high until a second processing module capable of performing the first configuration updating operation or the second configuration updating operation is obtained, or it is determined that each processing module on the current first path cannot perform the configuration updating operation; and a second updating unit configured to perform a corresponding configuration updating operation on the second processing module in response to the acquisition of the second processing module, so as to perform data processing based on the service after the configuration updating.
According to embodiments of the present disclosure, there is also provided an electronic device, a readable storage medium and a computer program product.
Referring to fig. 7, a block diagram of an electronic device 700 that may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the electronic device 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the electronic device 700 are connected to the I/O interface 705, including: an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 may be any type of device capable of inputting information to the electronic device 700, the input unit 706 may receive input numeric or character information and generate key signal inputs related to user settings and/or function control of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and/or a remote control. The output unit 707 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 708 may include, but is not limited to, magnetic disks, optical disks. The communication unit 709 allows the electronic device 700 to exchange information/data with other devices through computer networks, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth devices, 802.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 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 701 performs the various methods and processes described above, such as the service-based data processing methods described above. For example, in some embodiments, the service-based data processing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 700 via the ROM 702 and/or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of a service-based data processing method may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the service-based data processing method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The 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 a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, 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: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the foregoing methods, systems, and apparatus are merely exemplary embodiments or examples, and that the scope of the present invention is not limited by these embodiments or examples but only by the claims following the grant and their equivalents. Various elements of the embodiments or examples may be omitted or replaced with equivalent elements thereof. Furthermore, the steps may be performed in a different order than described in the present disclosure. Further, various elements of 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 disclosure.
Claims (15)
1. A method of service-based data processing, the service comprising a plurality of processing modules, the method comprising:
Acquiring configuration information and performance parameters of each processing module in the plurality of processing modules in the current configuration, wherein the configuration information comprises the number of threads for executing the corresponding processing module, the performance parameters are used for indicating the data processing efficiency of the corresponding processing module in the current configuration, and the plurality of processing modules form a plurality of data processing paths for communicating a data input end and a data output end of the service based on the data dependency relationship among the plurality of processing modules;
determining a first processing duration of each of the plurality of data processing paths, the first processing duration indicating a total time consumption of the respective data processing path for data processing and data transmission;
among the plurality of data processing paths, determining a first path with the longest first processing duration;
determining a target processing module on the first path based on performance parameters of each processing module on the first path; and
and executing a first configuration updating operation on the target processing module to perform data processing based on the service after configuration updating in response to the equipment resource occupation condition of the first equipment meeting a first preset condition, wherein the first preset condition comprises that the CPU memory, the graphics processor memory and the equipment utilization rate of the first equipment do not exceed respective upper limits, and the first configuration updating operation comprises that the number of threads of the target processing module is increased according to a first preset number.
2. The method of claim 1, further comprising:
repeating the following first operations until the first configuration updating operation is performed on the current target processing module, and before detecting that the central processor memory and the graphics processor memory of the first device corresponding to the current target processing module exceed respective upper limits, or that the device usage rate of the first device corresponding to the current target processing module exceeds the upper limit of the device usage rate, where the first operations include:
updating the performance parameters of the target processing module and the first processing duration of each of the plurality of data processing paths for the service after the configuration is updated;
re-determining a first path of the first processing duration based on the updated first processing duration of each data processing path;
redetermining a target processing module on the first path based on the updated performance parameters of each processing module on the first path; and
responding to the condition that the equipment resource occupation condition of the first equipment corresponding to the current target processing module accords with the first preset condition, and executing the first configuration updating operation on the current target processing module; and
And carrying out data processing based on the service after configuration updating.
3. The method of claim 2, wherein the configuration information further includes a data batch number for causing the respective processing modules to merge input data by the data batch number to batch process the merged input data, and wherein the first operation further comprises:
and responding to the condition that the equipment resource occupation condition of the first equipment corresponding to the current target processing module accords with a second preset condition, and executing a second configuration updating operation on the current target processing module, wherein the second configuration updating operation comprises updating the data batch number of the current target processing module according to a preset strategy, the second preset condition comprises that one of a central processor memory and a graphic processor memory of the first equipment corresponding to the current target processing module does not exceed an upper limit, the equipment utilization rate does not exceed an upper limit, and the current target processing module supports batch processing of data.
4. The method of claim 3, wherein the updating the number of data batches for the current target processing module according to the preset policy comprises:
determining a first data batch number based on the current data batch number of the target processing module;
Judging whether the overall processing time of the updated service exceeds a preset processing time threshold value after the current data batch number of the target processing module is updated to the first data batch number; and
and in response to the overall processing time not exceeding the preset processing time threshold, updating the current data batch number of the target processing module to the first data batch number.
5. The method of claim 4, wherein updating the number of data batches for the current target processing module according to the preset policy further comprises:
responding to the condition that the overall processing time exceeds the preset processing time threshold, and the current first path further comprises other processing modules, traversing the other processing modules one by one according to the performance parameters of each processing module from low to high until a first processing module capable of updating the data batch number is obtained, or determining that each processing module on the current first path cannot update the data batch number; and
and in response to acquiring the first processing module, updating the data batch number of the first processing module into a second data batch number, wherein the second data batch number is determined based on the data batch number before updating of the first processing module.
6. The method of any of claims 3-5, wherein a plurality of processing modules in the service are deployed on a plurality of device nodes in a distributed cluster, respectively, the method further comprising:
responding to that the CPU memory and the graphics processor memory of the first device corresponding to the current target processing module exceed respective upper limits, or the device utilization rate of the first device corresponding to the current target processing module exceeds the upper limit of the device utilization rate, and the current first path also comprises other processing modules, traversing the other processing modules one by one according to the performance parameters of each processing module from low to high until a second processing module capable of performing the first configuration updating operation or the second configuration updating operation is obtained, or determining that each processing module on the current first path cannot perform the configuration updating operation; and
and responding to the second processing module, and executing corresponding configuration updating operation on the second processing module so as to perform data processing based on the service after configuration updating.
7. A service-based data processing apparatus, the service comprising a plurality of processing modules, the apparatus comprising:
A first obtaining unit configured to obtain configuration information and performance parameters of each of the plurality of processing modules in a current configuration, the configuration information including a number of threads for executing the corresponding processing module, the performance parameters being for indicating data processing efficiency of the corresponding processing module in the current configuration, the plurality of processing modules constituting a plurality of data processing paths based on data dependency relationships among the plurality of processing modules;
a first determining unit configured to determine a first processing duration of each of the plurality of data processing paths, the first processing duration indicating a total time consumption of the respective data processing path for data processing and data transmission;
a second determining unit configured to determine a first path having a longest first processing duration among the plurality of data processing paths;
a third determining unit configured to determine a target processing module on the first path based on a performance parameter of each processing module on the first path; and
the first updating unit is configured to respond to the condition that the equipment resource occupation condition of the first equipment meets a first preset condition, execute a first configuration updating operation on the target processing module to perform data processing based on the service after configuration updating, wherein the first equipment is at least used for running the target processing module, the first preset condition comprises that the CPU memory, the graphics processor memory and the equipment utilization rate of the first equipment do not exceed respective upper limits, and the first configuration updating operation comprises that the thread number of the target processing module is increased according to a first preset number.
8. The apparatus of claim 7, further comprising:
a first execution unit configured to repeatedly execute the first operation of the following sub-unit until it is detected that, before the first configuration update operation is executed on the current target processing module, both the cpu memory and the graphics processor memory of the first device corresponding to the current target processing module exceed their respective upper limits, or the device usage rate of the first device corresponding to the current target processing module exceeds the device usage rate upper limit, where the first execution unit includes:
a first updating subunit configured to update, for the service after updating the configuration, the performance parameter of the target processing module and a first processing duration of each of the plurality of data processing paths;
a first determining subunit configured to re-determine the first path of the first processing duration based on the updated first processing duration of each data processing path;
a second determination subunit configured to re-determine a target processing module on the first path based on the updated performance parameter of each processing module on the first path; and
The second updating subunit is configured to execute the first configuration updating operation on the current target processing module in response to the condition that the device resource occupation condition of the first device corresponding to the current target processing module meets the first preset condition; and
and the data processing unit is configured to perform data processing based on the service after the configuration update.
9. The apparatus of claim 8, wherein the configuration information further comprises a data batch number for causing the respective processing modules to merge input data according to the data batch number to batch process the merged input data, and wherein the first execution unit further comprises:
and the third updating subunit is configured to respond to the condition that the equipment resource occupation condition of the first equipment corresponding to the current target processing module meets a second preset condition, and execute a second configuration updating operation on the current target processing module, wherein the second configuration updating operation comprises updating the data batch number of the current target processing module according to a preset strategy, the second preset condition comprises that one of the central processor memory and the graphics processor memory of the first equipment corresponding to the current target processing module does not exceed an upper limit, the equipment utilization rate does not exceed the upper limit, and the current target processing module supports batch processing of data.
10. The apparatus of claim 9, wherein the updating the number of data batches for the current target processing module according to the preset policy comprises:
determining a first data batch number based on the current data batch number of the target processing module;
judging whether the overall processing time of the updated service exceeds a preset processing time threshold value after the current data batch number of the target processing module is updated to the first data batch number; and
and in response to the overall processing time not exceeding the preset processing time threshold, updating the current data batch number of the target processing module to the first data batch number.
11. The apparatus of claim 10, wherein the updating the number of data batches for the current target processing module according to the preset policy further comprises:
responding to the condition that the overall processing time exceeds the preset processing time threshold, and the current first path further comprises other processing modules, traversing the other processing modules one by one according to the performance parameters of each processing module from low to high until a first processing module capable of updating the data batch number is obtained, or determining that each processing module on the current first path cannot update the data batch number; and
And in response to acquiring the first processing module, updating the data batch number of the first processing module into a second data batch number, wherein the second data batch number is determined based on the data batch number before updating of the first processing module.
12. The apparatus of any of claims 9 to 11, wherein a plurality of processing modules in the service are deployed on a plurality of device nodes in a distributed cluster, respectively, the apparatus further comprising:
the second obtaining unit is configured to respond to that the CPU memory and the graphics processor memory of the first device corresponding to the current target processing module exceed the respective upper limits, or the device utilization rate of the first device corresponding to the current target processing module exceeds the upper limit of the device utilization rate, and the current first path also comprises other processing modules, and the other processing modules are traversed one by one according to the performance parameters of each processing module from low to high until a second processing module capable of performing the first configuration updating operation or the second configuration updating operation is obtained, or it is determined that each processing module on the current first path cannot perform the configuration updating operation; and
And the second updating unit is configured to respond to the second processing module, and execute corresponding configuration updating operation on the second processing module so as to perform data processing based on the service after configuration updating.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the method comprises the steps of
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-6.
15. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311167322.0A CN117194027A (en) | 2023-09-11 | 2023-09-11 | Service-based data processing method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311167322.0A CN117194027A (en) | 2023-09-11 | 2023-09-11 | Service-based data processing method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117194027A true CN117194027A (en) | 2023-12-08 |
Family
ID=88997447
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311167322.0A Pending CN117194027A (en) | 2023-09-11 | 2023-09-11 | Service-based data processing method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117194027A (en) |
-
2023
- 2023-09-11 CN CN202311167322.0A patent/CN117194027A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112749685B (en) | Video classification method, apparatus and medium | |
CN114861910B (en) | Compression method, device, equipment and medium of neural network model | |
CN112559721B (en) | Method, device, equipment, medium and program product for adjusting man-machine dialogue system | |
CN114445667A (en) | Image detection method and method for training image detection model | |
CN115511779B (en) | Image detection method, device, electronic equipment and storage medium | |
CN112784985A (en) | Training method and device of neural network model, and image recognition method and device | |
CN116205819B (en) | Character image generation method, training method and device of deep learning model | |
CN115600646B (en) | Language model training method, device, medium and equipment | |
CN114881170B (en) | Training method for neural network of dialogue task and dialogue task processing method | |
CN116450944A (en) | Resource recommendation method and device based on recommendation model, electronic equipment and medium | |
CN114140852B (en) | Image detection method and device | |
CN113722594B (en) | Training method and device of recommendation model, electronic equipment and medium | |
CN114494797A (en) | Method and apparatus for training image detection model | |
CN117194027A (en) | Service-based data processing method, device, equipment and medium | |
CN112784912A (en) | Image recognition method and device, and training method and device of neural network model | |
CN114140851B (en) | Image detection method and method for training image detection model | |
CN114117046B (en) | Data processing method, device, electronic equipment and medium | |
CN115334159B (en) | Method, apparatus, device and medium for processing stream data | |
CN116842156B (en) | Data generation method, device, equipment and medium | |
CN116881485B (en) | Method and device for generating image retrieval index, electronic equipment and medium | |
CN114120420B (en) | Image detection method and device | |
CN114842474B (en) | Character recognition method, device, electronic equipment and medium | |
CN115713071B (en) | Training method for neural network for processing text and method for processing text | |
CN116070711B (en) | Data processing method, device, electronic equipment and storage medium | |
CN112667196B (en) | Information display method and device, electronic equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: CW District, 4th floor, building 1, No. 10, Shangdi 10th Street, Haidian District, Beijing 100101 Applicant after: Kunlun core (Beijing) Technology Co.,Ltd. Address before: Baidu building, No. 10, Shangdi 10th Street, Haidian District, Beijing 100086 Applicant before: Kunlun core (Beijing) Technology Co.,Ltd. |