A data processing method and related device
By using multiple reference computing cards in the data processing system, and dynamically allocating tasks based on their decoding and decision parameter information, the problem of low utilization of computing cards is solved and more efficient data processing is achieved.
Patent Information
- Application Number
- CN202510132773.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-02-06
AI Technical Summary
In the prior art, the utilization rate of computing cards is low, resulting in waste of hardware resources. How to improve the performance and efficiency of computing cards has become an urgent problem.
By introducing multiple reference computing cards into the data processing system, obtaining the to-process data and determining the most suitable computing card to perform decoding and decision-making tasks based on the decoding and decision parameter information of each reference computing card, thereby improving the utilization rate of the computing card and data processing efficiency.
The utilization rate of each reference computing card in the data processing system is improved, and the efficiency of processing data to be processed is significantly improved, avoiding the waste of hardware resources.
Smart Images

Figure CN119557666B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method and related devices. Background Art
[0002] With the continuous development of data processing technology, the efficiency of data processing has received widespread attention. For example, the processing of image data is inseparable from the use of smart computing cards. The performance of different computing cards varies, and thus the throughput of image data processing solutions on different computing cards also varies. In order to meet the computing requirements of the solution, the computing power, memory, CPU performance, etc. of the selected computing card are generally greater than the solution requirements, which easily leads to low utilization of the computing card and waste of hardware resources.
[0003] In view of this, how to improve the performance and efficiency of computing cards has become an urgent problem to be solved. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a data processing method and related devices, which can improve the processing efficiency of the data processing system.
[0005] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a data processing method applied to a data processing system, the data processing system includes multiple reference computing cards, including: obtaining data to be processed; wherein the data to be processed is matched with a decoding task and a decision task; based on the decoding parameter information of each of the reference computing cards, determining a first computing card from all the reference computing cards, and using the first computing card to execute the decoding task to obtain a decoding result matching the data to be processed; wherein the decoding parameter information at least includes the decoding time and decoding throughput within a historical time period; based on the decision parameter information of each of the reference computing cards, determining a second computing card from all the reference computing cards, and using the second computing card to execute the decision task to obtain a target decision result matching the decoding result; wherein the decision parameter information at least includes the decision time and decision throughput within a historical time period.
[0006] To solve the above technical problems, a technical solution adopted in the present application is: to provide an electronic device, comprising a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the method mentioned in the above technical solution.
[0007] In order to solve the above technical problems, another technical solution adopted in the present application is: providing a computer-readable storage medium storing program instructions that can be executed by a processor, wherein the program instructions are used to implement the method mentioned in the above technical solution.
[0008] The beneficial effect of the present application is that, different from the prior art, the data processing method proposed in the present application is implemented by relying on a data processing system including multiple reference computing cards. For the acquired data to be processed, reference computing cards with higher processing efficiency are selected from the data processing system to perform decoding tasks and decision tasks for matching the data to be processed, thereby improving the utilization rate of each reference computing card in the data processing system and also improving the efficiency of processing the data to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0010] Figure 1 It is a flowchart of an implementation method of the data processing method of the present application;
[0011] Figure 2 It is a flowchart of an implementation method of a decoding scheduling model and a decision scheduling model training process;
[0012] Figure 3 yes Figure 2 Step S204 corresponds to a flow chart of another implementation method;
[0013] Figure 4 yes Figure 2 Step S205 corresponds to a flow chart of another implementation method;
[0014] Figure 5 It is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0015] Figure 6 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments, and different embodiments can be adaptively combined. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0017] See also Figure 1 , Figure 1It is a flow chart of an implementation method of the data processing method of the present application. The data processing method is applied to a data processing system. The data processing system includes multiple reference computing cards. The specific implementation process of the data processing method includes:
[0018] S101: Acquire data to be processed; wherein the data to be processed is matched with a decoding task and a decision task.
[0019] In one embodiment, the data to be processed is obtained, the data to be processed is an image, and is matched with corresponding decoding tasks and decision tasks. The above decoding tasks and decision tasks are used to prompt the corresponding reference computing card to decode and make decisions on the data to be processed, so as to finally obtain the corresponding target decision result.
[0020] In one implementation scenario, in response to the data to be processed being an image, the decision-making task may be target recognition, target detection, target object behavior analysis or target segmentation, etc., which is determined according to the actual application scenario.
[0021] In addition, it should be noted that the above-mentioned data processing system may include different types of reference computing cards, that is, different types of reference computing cards differ in deployment cost, computing power, memory and power consumption, and can be deployed according to actual conditions.
[0022] In another embodiment, the data to be processed may also be a plurality of continuous image frames obtained from a captured video stream.
[0023] S102: Based on the decoding parameter information of each reference computing card, determine a first computing card from all reference computing cards, and use the first computing card to perform a decoding task to obtain a decoding result matching the data to be processed; wherein the decoding parameter information at least includes a decoding time consumption and a decoding throughput rate in a historical time period.
[0024] In one embodiment, in response to the data processing system including multiple reference computing cards, after obtaining the data to be processed, the current decoding parameter information of each reference computing card is determined, and the decoding parameter information at least includes the decoding time consumption and decoding throughput rate of the corresponding reference computing card in the historical time period. The above decoding time consumption is used to characterize the time consumed by the corresponding reference computing card to decode the data in the historical time period, and the decoding throughput rate is used to characterize the number of decoding tasks that can be completed or the number of decoding results output by the corresponding reference computing card in the historical time period; and the shorter the decoding time consumption or the higher the decoding throughput rate, the higher the efficiency of the corresponding reference computing card in performing the decoding task.
[0025] Specifically, the time period between the above historical moment and the moment of obtaining the data to be processed, and the specific length of the historical time period can be set according to actual needs.
[0026] Further, according to the decoding parameter information of each reference computing card, a reference computing card with higher decoding efficiency is determined from all reference computing cards to serve as a first computing card. The first computing card is used to perform a decoding task on the data to be processed to obtain a corresponding decoding result.
[0027] In one implementation scenario, for all reference computing cards in the data processing system, the reference computing card with the shortest decoding time is used as the first computing card, and the decoding result corresponding to the data to be processed is obtained by using the first computing card. Alternatively, for all reference computing cards in the data processing system, the reference computing card with the highest decoding throughput is used as the first computing card, and the decoding result corresponding to the data to be processed is obtained by using the first computing card.
[0028] In another embodiment, in addition to the decoding time and decoding throughput in the historical time period, the decoding parameter information also includes first performance information of the corresponding reference computing card when performing the decoding task, and the first performance information includes at least one of the hardware parameters of the reference computing card, decoding queue information of the to-be-processed data on the corresponding reference computing card, and type information of the reference computing card. The hardware parameters include at least one of the CPU main frequency, the number of CPU cores, the computing power of the neural network hardware processor, the main frequency of the neural network hardware processor, and the double data rate memory of the corresponding reference computing card.
[0029] And, the above decoding queue information includes the maximum length of the decoding input queue, the real-time length of the decoding input queue, the maximum length of the decoding output queue and the real-time length of the decoding output queue determined after the data to be processed is deployed to the corresponding reference computing card. Among them, the maximum length of the decoding input queue is the maximum amount of data that the decoding input queue of the corresponding reference computing card can accommodate, the real-time length of the decoding input queue is the actual amount of data in the decoding input queue, the maximum length of the decoding output queue is the maximum amount of data that the decoding output queue of the corresponding reference computing card can accommodate, and the real-time length of the decoding output queue is the actual amount of data in the decoding output queue.
[0030] Furthermore, the above-mentioned type information includes at least one of the computing power, memory and power consumption of the corresponding reference computing card.
[0031] S103: Based on the decision parameter information of each reference computing card, determine a second computing card from all reference computing cards, and use the second computing card to execute a decision task to obtain a target decision result that matches the decoding result; wherein the decision parameter information at least includes the decision time and decision throughput rate in a historical time period.
[0032] In one embodiment, after obtaining the decoding result corresponding to the data to be processed, the current decision parameter information of each reference computing card is determined, and the decision parameter information includes the decision time and decision throughput of the corresponding reference computing card in the historical time period. The above-mentioned decision time is used to characterize the time consumed by the corresponding reference computing card to make decisions on the data in the historical time period, and the decision throughput is used to characterize the number of decision tasks that can be completed or the number of decision results output by the corresponding reference computing card in the historical time period.
[0033] Further, according to the decision parameter information of each reference computing card, a reference computing card with higher decision efficiency is determined from all reference computing cards to serve as a second computing card. The second computing card is used to perform a decision task on the decoding result corresponding to the processed data to obtain a corresponding target decision result.
[0034] In one implementation scenario, for all reference computing cards in the data processing system, the reference computing card with the shortest decision-making time is used as the second computing card, and the target decision result corresponding to the data to be processed is obtained by using the second computing card. Alternatively, for all reference computing cards in the data processing system, the reference computing card with the highest decision throughput is used as the second computing card, and the target decision result corresponding to the data to be processed is obtained by using the second computing card.
[0035] In another embodiment, in addition to the decision time and decision throughput in the historical time period, the above-mentioned decision parameter information also includes the second performance information of the corresponding reference computing card when executing the decision task, and the above-mentioned second performance information includes at least one of the hardware parameters of the reference computing card, the decision queue information on the reference computing card, and the type information of the reference computing card. The above-mentioned decision queue information includes the maximum length of the decision input queue, the real-time length of the decision input queue, the maximum length of the decision output queue, and the real-time length of the decision output queue determined according to the corresponding reference computing card executing the corresponding decision task on the decoding results in the historical time period. Among them, the above-mentioned maximum length of the decision input queue is the maximum amount of data that the decision input queue of the corresponding reference computing card can accommodate, the above-mentioned real-time length of the decision input queue is the actual amount of data in the decision input queue, the above-mentioned maximum length of the decision output queue is the maximum amount of data that the decision output queue of the corresponding reference computing card can accommodate, and the above-mentioned real-time length of the decision output queue is the actual amount of data in the decision output queue. In addition, the specific content of the hardware parameters and type information of the reference computing card can refer to the above-mentioned corresponding embodiment.
[0036] The data processing method proposed in this application is implemented by a data processing system including multiple reference computing cards. For the acquired data to be processed, reference computing cards with higher processing efficiency are selected from the data processing system to perform decoding tasks and decision tasks for matching the data to be processed, thereby improving the utilization rate of each reference computing card in the data processing system and also improving the efficiency of processing the data to be processed.
[0037] In another embodiment, the first calculation card mentioned in the above corresponding embodiment is obtained by using the trained decoding scheduling model, and the second calculation card is obtained by using the trained decision scheduling model. Based on this, Figure 1 The process of determining the first computing card in step S102 includes:
[0038] The decoding parameter information is input into the trained decoding scheduling model to obtain the first identification output by the decoding scheduling model that matches each reference computing card. Based on the first identification, the first computing card used to decode the data to be processed is determined. The specific content of the decoding parameter information can refer to the corresponding implementation method described above.
[0039] Specifically, the decoding scheduling model is used to output the first identifier that matches the data to be processed with each reference computing card according to the decoding parameter information. The first identifier is a first numerical value or a second numerical value. When the first identifier is the first numerical value, it indicates that the decoding efficiency of the corresponding reference computing card is low, and the reference computing card is not suitable for receiving the data to be processed for decoding; when the first identifier is the second numerical value, it indicates that the decoding efficiency of the corresponding reference computing card is high, and the reference computing card can receive the data to be processed for decoding. For the data processing system, one is randomly selected from the reference computing cards whose corresponding first identifier is the second numerical value as the first computing card.
[0040] In a specific application scenario, the first value is -1 and the second value is 1. Of course, in other application scenarios, the first value and the second value may also be other values.
[0041] Alternatively, in another embodiment, in order to improve the prediction accuracy of the decoding scheduling model, the trained decoding scheduling model includes multiple classification networks, each classification network is matched with a corresponding classification algorithm. For each reference computing card, the corresponding decoding parameter information is input into each of the above classification networks to obtain the first prediction identifier output by each classification network. For all first prediction identifiers, the number corresponding to the first value and the second value is counted, and the first prediction identifier corresponding to the larger value is used as the first identifier of the corresponding reference computing card. Furthermore, the first computing card is determined according to the first identifier corresponding to each reference computing card in the data processing system.
[0042] For example, the trained decoding scheduling model includes four classification networks. The corresponding decoding parameter information is input into each of the above classification networks, and the first prediction identifier output by three of the classification networks is obtained as a first value, and the first prediction identifier output by another classification network is obtained as a second value, and the first value is used as the first identifier of the corresponding reference calculation card.
[0043] Alternatively, in another embodiment, the trained decoding scheduling model includes multiple classification networks, and each classification network is matched with a corresponding decoding weight. For each reference calculation card, the corresponding decoding parameter information is input into each of the above classification networks to obtain a first prediction identifier output by each classification network. The first product of the first prediction identifier and the corresponding decoding weight is obtained, and the first identifier of the reference calculation card is determined based on the sum of all the first products corresponding to the reference calculation card.
[0044] In a specific application scenario, the first prediction identifier is 1 or -1, and the first prediction identifier output by each classification network is multiplied by the corresponding decoding weight to obtain a first product, and it is determined whether the sum of all first products corresponding to the reference calculation card is greater than 0. If it is greater, 1 is used as the first identifier of the reference calculation card; if it is less than, -1 is used as the first identifier of the reference calculation card.
[0045] as well as, Figure 1 The process of determining the second computing card in step S103 includes: inputting the decision parameter information into the trained decision scheduling model to obtain a second identifier output by the decision scheduling model that matches each reference computing card. Based on the second identifier, a second computing card for making a decision on the decoding result is determined. The specific content of the decision parameter information includes reference to the above corresponding implementation method.
[0046] Specifically, the decision scheduling model is used to output the second identifier that matches the data to be processed with each reference computing card according to the decoding parameter information. The second identifier is a third value or a fourth value. When the second identifier is the third value, it indicates that the decision efficiency of the corresponding reference computing card is low, and the reference computing card is not suitable for receiving the decoding result corresponding to the data to be processed for decision-making; when the second identifier is the fourth value, it indicates that the decision efficiency of the corresponding reference computing card is high, and the reference computing card can receive the decoding result corresponding to the data to be processed for decision-making. For the data processing system, one is randomly selected from the reference computing cards whose corresponding second identifier is the fourth value as the second computing card.
[0047] In a specific application scenario, the third value is -1, and the fourth value is 1. Alternatively, the third value and the fourth value may also be determined according to actual conditions.
[0048] Alternatively, in another embodiment, in order to improve the prediction accuracy of the decision scheduling model, the trained decision scheduling model includes a plurality of different decision analysis networks. For each reference calculation card, the corresponding decision parameter information is input into each of the above-mentioned decision analysis networks to obtain a second prediction identifier output by each decision analysis network. For all second prediction identifiers, the number corresponding to the third value and the fourth value is counted respectively, and the second prediction identifier corresponding to the larger value is used as the second identifier of the corresponding reference calculation card. Furthermore, the second calculation card is determined according to the second identifier corresponding to each reference calculation card in the data processing system. Among them, the specific implementation process can refer to the above-mentioned corresponding implementation mode, which will not be elaborated in detail here.
[0049] Alternatively, in another embodiment, the trained decision scheduling model includes multiple decision analysis networks, and each decision analysis network is matched with a corresponding decision weight. For each reference calculation card, the corresponding decision parameter information is input into each of the above-mentioned decision analysis networks to obtain a second prediction identifier output by each decision analysis network. The second product of the second prediction identifier and the corresponding decision weight is obtained, and the second identifier of the reference calculation card is determined based on the sum of all the second products corresponding to the reference calculation card.
[0050] In a specific application scenario, the second prediction identifier is 1 or -1, and the second prediction identifier output by each decision analysis network is multiplied by the corresponding decision weight to obtain a second product, and it is determined whether the sum of all second products corresponding to the reference calculation card is greater than 0. If it is greater, 1 is used as the second identifier of the reference calculation card; if it is less, -1 is used as the second identifier of the reference calculation card.
[0051] See also Figure 2 , Figure 2 1 is a flowchart of an implementation method of a decoding scheduling model and a decision scheduling model training process. Specifically, the decoding scheduling model and the decision scheduling model training process include:
[0052] S201: Acquire multiple training data.
[0053] In one embodiment, a plurality of training data are obtained, the training data are images, and the training data are matched with corresponding training decoding tasks and training decision tasks, wherein the training decision tasks may be target recognition, target detection, target object behavior analysis or target segmentation.
[0054] In another embodiment, the training data may also be a plurality of continuous image frames obtained from a training video stream.
[0055] S202: Decoding and making decisions on the training data using the reference computing card to obtain training decoding information corresponding to the decoding stage and training decision information corresponding to the decision stage.
[0056] In one embodiment, each reference computing card in the data processing system is used to perform a training decoding task on the training data to obtain training decoding information corresponding to the decoding stage. Also, the reference computing card is used to perform a decision task on the decoding result obtained in the decoding stage to obtain training decision information corresponding to the decision stage.
[0057] In one implementation scenario, for each training data, the training data and its matching training decoding task and training decision task are deployed to each reference computing card, so that each reference computing card is used to respectively perform the training decoding task and the training decision task on the training data. Wherein, due to the differences between different reference computing cards, after the training data and its matching training decoding task and training decision task are deployed to the reference computing card, the training data and its matching training decoding task and training decision task are switched to a format that can be recognized by the corresponding reference computing card.
[0058] S203: Based on the training decoding information, obtain a first training identifier that matches the training data; and based on the training decision information, obtain a second training identifier that matches the training data.
[0059] In one embodiment, the training decoding information at least includes the training decoding time and the training decoding throughput of the corresponding reference computing card. To obtain the first training identifier, the average decoding time and the average decoding throughput of the reference computing card matching are obtained.
[0060] In one implementation scenario, for each reference computing card, the training data is input into the reference computing card in sequence, and the average decoding time and the average decoding throughput of the reference computing card are determined based on the training decoding tasks performed on the input training data; that is, the average value of the decoding time when each input training data is subjected to the training decoding task is calculated to obtain the average decoding time, and the average value of the decoding throughput of the reference computing card when each input training data is subjected to the training decoding task is calculated to obtain the average decoding throughput.
[0061] Furthermore, a first training identifier is determined according to the training decoding information, average decoding time consumption and average decoding throughput rate matched by each reference computing card.
[0062] Specifically, in response to the training decoding time being greater than the average decoding time, or the training decoding throughput being less than the average decoding throughput, the first value is assigned to the corresponding reference computing card as the first training identifier. Otherwise, the second value is assigned to the corresponding reference computing card as the first training identifier. The specific determination method of the first value and the second value can refer to the corresponding implementation method described above, and will not be elaborated in detail here.
[0063] And, the training decision information at least includes the training decision time and training decision throughput of the corresponding reference computing card. To obtain the second training identifier, the average decision time and average decision throughput of the reference computing card matching are obtained.
[0064] In one implementation scenario, for each reference computing card, the average decision time and average decision throughput of the reference computing card are determined based on the training decision tasks performed on the input training data; that is, the average value of the decision time when each input training data is used to perform the training decision task is calculated to obtain the average decision time, and the average value of the decision throughput of the reference computing card when each input training data is used to perform the training decision task is calculated to obtain the average decision throughput.
[0065] Furthermore, a second training identifier is determined according to the training decision information, average decision time and average decision throughput rate matched by each reference computing card.
[0066] Specifically, in response to the training decision time being greater than the average decision time, or the training decision throughput being less than the average decision throughput, the corresponding reference computing card is assigned a third value as the second training identifier. Otherwise, the corresponding reference computing card is assigned a fourth data as the second training identifier. The specific determination method of the third value and the fourth value can refer to the above corresponding implementation method, which will not be elaborated in detail here.
[0067] In another embodiment, in order to improve the training efficiency, the determination process of the above-mentioned first training identifier can also be: obtain the average decoding time consumption matched by the reference computing card. In response to the training decoding time consumption in the training decoding information being greater than the average decoding time consumption, assign the corresponding reference computing card a first value as the first training identifier; otherwise, assign the corresponding reference computing card a second value as the first training identifier. Of course, the average decoding throughput rate matched by the reference computing card can also be obtained. In response to the training decoding throughput rate in the training decoding information being less than the average decoding throughput rate, assign the corresponding reference computing card a first value as the first training identifier; otherwise, assign the corresponding reference computing card a second value as the first training identifier.
[0068] Similarly, when determining the second training identifier, only the average decision time or the average decision throughput rate may be obtained, so that the second training identifier is determined based on the comparison result of the training decision time and the average decision time, or the comparison result of the training decision throughput rate and the average decision throughput rate. The specific implementation process may refer to the above corresponding implementation methods, which will not be described in detail here.
[0069] S204: Train the constructed decoding scheduling model using the training decoding information and the first training identifier to obtain a trained decoding scheduling model.
[0070] In one embodiment, the training decoding information also includes the first training performance information of the corresponding reference computing card when performing the training decoding task, and the above-mentioned first training performance information includes at least one of the hardware parameters of the reference computing card, the decoding queue information of the training data on the corresponding reference computing card, and the type information of the reference computing card. The specific content information of the first training performance information can refer to the first performance information in the above-mentioned corresponding embodiment. The training decoding information is input into the decoding scheduling model, and the decoding scheduling model is used to predict the corresponding first prediction identifier based on the training decoding information. According to the first prediction identifier and the first training identifier, the corresponding first training loss is calculated. The parameters of the decoding scheduling model are adjusted using the first training loss until the preset convergence condition is met to obtain the trained decoding scheduling model.
[0071] In one implementation scenario, the decoding scheduling model has data analysis and processing capabilities, and its specific structure can refer to the existing neural network structure.
[0072] S205: Train the constructed decision scheduling model using the training decision information and the second training identifier to obtain a trained decision scheduling model.
[0073] In one embodiment, the training decision information also includes the second training performance information of the corresponding reference computing card when executing the training decision task, and the second training performance information includes at least one of the hardware parameters of the reference computing card, the decision queue information on the reference computing card, and the type information of the reference computing card. The specific content information of the second training performance information can refer to the second performance information in the above corresponding embodiment. The training decision information is input into the constructed decision scheduling model, and the decision scheduling model is used to predict the corresponding second prediction identifier based on the training decision information. According to the second prediction identifier and the second training identifier, the corresponding second training loss is calculated. The parameters of the decision scheduling model are adjusted using the second training loss until the preset convergence conditions are met to obtain the trained decision scheduling model.
[0074] In one implementation scenario, the above-mentioned decision-making scheduling model has data analysis and processing capabilities, and its specific structure can refer to the existing neural network structure.
[0075] In another embodiment, in order to further improve the performance of the decode scheduling model and the decision scheduling model after training, in the process of using the training data to the decode scheduling model and the decision scheduling model, the rate of inputting the training data to each reference computing card is continuously increased until the processing state of each reference computing card meets the preset condition. The preset condition is determined based on the utilization rate of each reference computing card.
[0076] The above scheme obtains a decoding scheduling model and a decision scheduling model through training, so that in the actual application process, after obtaining the data to be processed, the decoding scheduling model and the decision scheduling model are used to select the corresponding reference computing cards from the data processing system to perform the corresponding decoding tasks and decision tasks respectively, so as to improve the efficiency of processing the data to be processed.
[0077] See also Figure 3 , Figure 3 yes Figure 2 Step S204 in the flowchart corresponds to another implementation method. Specifically, the decoding scheduling model includes multiple classification networks, each classification network is matched with a corresponding decoding weight, based on this, the implementation process of step S204 includes:
[0078] S301: Input the training decoding information into each classification network in the decoding scheduling model, obtain the first prediction identifier output by each classification network, and use the first prediction identifier and the first training identifier to adjust the parameters of the classification network.
[0079] In one embodiment, the acquired training decoding information is input into each classification network in the decoding scheduling model, and each classification network is used to classify the training decoding information to obtain a first prediction identifier output by each classification network. According to the first prediction identifier and the corresponding first training identifier, a third training loss is calculated, and the third training loss is used to adjust the parameters in the corresponding classification network until a preset convergence condition is met.
[0080] In one implementation scenario, multiple classification algorithms are predetermined, and a classification network corresponding to each classification algorithm is constructed so that the classification network predicts and outputs a first prediction identifier that matches the training decoding information using the corresponding classification algorithm. The multiple classification algorithms include at least part of a linear regression algorithm, a decision tree algorithm, a random forest algorithm, and a support vector machine algorithm.
[0081] S302: Based on the first prediction identifier, the decoding weights of each classification network matching after parameter adjustment are adjusted to obtain a trained decoding scheduling model.
[0082] In one embodiment, for the first prediction identifier of the reference calculation card output by each classification network, a first number of first prediction identifiers corresponding to the first value and a second number of first prediction identifiers corresponding to the second value are obtained. The larger value of the first number and the second number is obtained, and a weight adjustment threshold is determined based on the larger value. The weight adjustment threshold is used to adjust the decoding weights matched by each classification network until a preset stop condition is met, thereby obtaining a trained decoding scheduling model.
[0083] Specifically, in response to the first prediction identifier corresponding to the first value or the second value, a first number of first prediction identifiers whose value is the first value and a second number of first prediction identifiers whose value is the second value are counted. The first number and the second number are compared to determine the larger value of the first number and the second number. According to the preset interval in which the above larger value is located, the corresponding weight adjustment threshold is determined. For the classification network corresponding to the above larger value, the matching decoding weight is increased by the weight adjustment threshold; and for the remaining classification networks, the matching decoding weight is reduced by the weight adjustment threshold. In response to the number of adjustments reaching the number threshold, it is determined that the preset stop condition is met, and the trained decoding scheduling model is obtained.
[0084] In one implementation scenario, a first preset interval and a second preset interval are determined according to the number of classified networks, the first preset interval is matched with a first threshold, the second preset interval is matched with a second threshold, any value in the first preset interval is less than any value in the second preset interval, and the first threshold is less than the second threshold. In response to the larger value of the first number and the second number being in the first preset interval, the corresponding first threshold is used as the weight adjustment threshold; or, in response to the larger value of the first number and the second number being in the second preset interval, the corresponding second threshold is used as the weight adjustment threshold.
[0085] In a specific application scenario, the number of classification networks is , then the first preset interval is determined , the second preset interval is ; and, the first threshold corresponding to the first preset interval is 0.01, and the second threshold corresponding to the second preset interval is 0.02. In response to the first number being greater than the second number, and the first number being within the first preset interval, the decoding weight of each classification network corresponding to the first number is increased by 0.01, and the decoding weight of each classification network corresponding to the second number is decreased by 0.01.
[0086] It should be noted that, in the process of adjusting the decoding weights matched by each classification network, the decoding weights are always greater than or equal to 0.
[0087] In another embodiment, in order to save computing resources, the decoding weights of each classification network matching are adjusted every preset time period. For example, every preset time period, the decoding weights of each classification network matching are adjusted using the training data currently processed by the reference computing card.
[0088] See also Figure 4 , Figure 4 yes Figure 2Step S205 corresponds to a flowchart of another implementation method. Specifically, the decision scheduling model includes multiple decision analysis networks, each decision analysis network is matched with a corresponding decision weight, and the specific implementation process of step S205 includes:
[0089] S401: Input the training decision information into each decision analysis network in the decision scheduling model, and obtain the predicted decision results output by each decision analysis network.
[0090] In one embodiment, the training decision information is input into each decision analysis network in the decision scheduling model, and each decision analysis network is used to analyze the training decision information and output a predicted decision result.
[0091] In one implementation scenario, in response to the data to be processed including at least one image frame, the decision analysis network is a neural network model with image analysis capabilities. The specific structure can refer to the existing neural network model structure, and the performance and structure of different decision analysis networks vary.
[0092] S402: Based on the predicted decision result and the second training identifier, adjust the parameters of the corresponding decision analysis network.
[0093] In one implementation, a fourth training loss is calculated based on the predicted decision result and the second training identifier, and the fourth training loss is used to adjust the parameters of the corresponding decision analysis network until a preset convergence condition is met.
[0094] Specifically, the specific calculation formula of the fourth training loss is as follows:
[0095]
[0096] in, represents the fourth training loss, Indicates The second training identifier corresponding to the training data, Indicates The category of the second training mark corresponding to the training data, Indicates The training data corresponds to the predicted decision results. represents the total number of training data, Indicates the total number of categories corresponding to the second training mark.
[0097] S403: Inputting the training decision information into each decision analysis network after parameter adjustment, and obtaining a second prediction identifier output by each decision analysis network.
[0098] In one embodiment, the training decision information is input into each decision analysis network after reference adjustment, and each decision analysis network is used to output a second prediction identifier.
[0099] S404: Based on the second prediction identifier, the decision weights matched by each decision analysis network are adjusted to obtain a trained decision scheduling model.
[0100] In one embodiment, a third number of second prediction identifiers corresponding to a third value and a fourth number of second prediction identifiers corresponding to a fourth value are obtained. A larger value of the third number and the fourth number is obtained, a weight adjustment threshold is determined based on the larger value, and the decision weights matched by each decision analysis network are adjusted using the weight adjustment threshold until a preset stop condition is met, thereby obtaining a trained decision scheduling model.
[0101] Specifically, in response to the second prediction identifier corresponding to a third value or a fourth value, a third number of second prediction identifiers having a third value and a fourth number of second prediction identifiers having a fourth value are counted. The third number and the fourth number are compared to determine the larger value of the third number and the fourth number. According to the preset interval in which the larger value is located, the corresponding weight adjustment threshold is determined. For the decision analysis network corresponding to the larger value, the weight adjustment threshold is increased for the matching decision weight; and, for the remaining decision analysis networks, the weight adjustment threshold is reduced for the matching decision weight. In response to the number of adjustments reaching the number threshold, it is determined that the preset stop condition is met, and the trained decision scheduling model is obtained. Among them, the specific process can refer to the corresponding implementation method above.
[0102] In another embodiment, in order to save consumption of computing resources, the decision weights of each decision analysis network match are adjusted every preset time period. The specific implementation process can refer to the above corresponding embodiment.
[0103] The above solution improves the accuracy of determining the second computing card in practical applications by constructing a decision scheduling model including multiple decision analysis networks.
[0104] See also Figure 5 , Figure 51 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device comprises: a memory 10 and a processor 20 coupled to each other. The memory 10 stores program instructions, and the processor 20 is used to execute the program instructions to implement the method mentioned in any of the above embodiments. Specifically, the electronic device includes but is not limited to: a desktop computer, a laptop computer, a tablet computer, a server, etc., which are not limited here. In addition, the processor 20 can also be called a CPU (Center Processing Unit). The processor 20 may be an integrated circuit chip with signal processing capabilities. The processor 20 may also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In addition, the processor 20 may be implemented by an integrated circuit chip.
[0105] See also Figure 6 , Figure 6 The storage medium 30 stores program instructions 40 that can be executed by a processor, and when the program instructions 40 are executed by the processor, the method mentioned in any of the above embodiments is implemented.
[0106] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0107] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0108] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0109] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0110] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data processing method, characterized in that: The data processing method is applied to a data processing system, wherein the data processing system comprises a plurality of reference computing cards, including: Acquire data to be processed; wherein the data to be processed is matched with a decoding task and a decision task; Based on the decoding parameter information of each of the reference computing cards, a first computing card is determined from all the reference computing cards, and the first computing card is used to execute the decoding task to obtain a decoding result matching the data to be processed; wherein the decoding parameter information at least includes the decoding time consumption and the decoding throughput rate in a historical time period; Based on the decision parameter information of each of the reference computing cards, a second computing card is determined from all the reference computing cards, and the decision task is performed using the second computing card to obtain a target decision result that matches the decoding result; wherein the decision parameter information includes at least the decision time and decision throughput rate within a historical time period.
2. The method according to claim 1, characterized in that The first computing card is obtained by using a trained decoding scheduling model, the second computing card is obtained by using a trained decision scheduling model, and the first computing card is determined from all the reference computing cards based on the decoding parameter information of each of the reference computing cards, including: Inputting the decoding parameter information into a trained decoding scheduling model to obtain a first identifier output by the decoding scheduling model that matches each of the reference computing cards; Based on the first identifier, determining the first computing card used to decode the data to be processed; The step of determining the second computing card from all the reference computing cards based on the decision parameter information of each of the reference computing cards comprises: Inputting the decision parameter information into the trained decision scheduling model to obtain a second identifier output by the decision scheduling model that matches each of the reference computing cards; Based on the second identifier, the second computing card used to make a decision on the decoding result is determined.
3. The method according to claim 2, characterized in that The training process of the decoding scheduling model and the decision scheduling model includes: Get multiple training data; Decoding and making decisions on the training data using the reference computing card to obtain training decoding information corresponding to the decoding stage and training decision information corresponding to the decision stage; Based on the training decoding information, obtaining a first training identifier that matches the training data; and based on the training decision information, obtaining a second training identifier that matches the training data; Using the training decoding information and the first training identifier to train the constructed decoding scheduling model to obtain the trained decoding scheduling model; and, The constructed decision scheduling model is trained using the training decision information and the second training identifier to obtain the trained decision scheduling model.
4. The method according to claim 3, characterized in that The training decoding information at least includes the training decoding time consumption and the training decoding throughput rate corresponding to the reference computing card, and the obtaining, based on the training decoding information, the first training identifier matched by the training data includes: Obtaining the average decoding time consumption and average decoding throughput rate matched by the reference computing card; In response to the training decoding time being greater than the average decoding time, or the training decoding throughput being less than the average decoding throughput, assigning a first value corresponding to the reference computing card as the first training identifier; Otherwise, a second numerical value corresponding to the reference computing card is assigned as the first training identifier.
5. The method according to claim 3, characterized in that: The training decision information at least includes a training decision time consumption and a training decision throughput rate corresponding to the reference computing card, and the acquiring, based on the training decision information, a second training identifier matched by the training data includes: Obtaining the average decision-making time and average decision-making throughput of the reference computing card matching; In response to the training decision time being greater than the average decision time, or the training decision throughput being less than the average decision throughput, assigning a third value corresponding to the reference computing card as the second training identifier; Otherwise, a fourth value corresponding to the reference computing card is assigned as the second training identifier.
6. The method according to claim 3, characterized in that The decoding scheduling model includes a plurality of classification networks, each of the classification networks is matched with a corresponding decoding weight, and the constructed decoding scheduling model is trained using the training decoding information and the first training identifier to obtain the trained decoding scheduling model, including: Inputting the training decoding information into each of the classification networks in the decoding scheduling model, obtaining a first prediction identifier output by each of the classification networks, and adjusting parameters of the classification network using the first prediction identifier and the first training identifier; Based on the first prediction identifier, the decoding weights matched by each of the classification networks after parameter adjustment are adjusted to obtain the trained decoding scheduling model.
7. The method according to claim 6, characterized in that The step of adjusting the decoding weights matched by each of the classification networks after parameter adjustment based on the first prediction identifier to obtain the trained decoding scheduling model includes: Acquire a first quantity of the first prediction identifiers whose corresponding value is a first value and a second quantity of the first prediction identifiers whose corresponding value is a second value; Obtain a larger value between the first quantity and the second quantity, determine a weight adjustment threshold based on the larger value, and use the weight adjustment threshold to adjust the decoding weights matched by each classification network until a preset stop condition is met, thereby obtaining the trained decoding scheduling model.
8. The method according to claim 3, characterized in that The decision scheduling model includes a plurality of decision analysis networks, each of which is matched with a corresponding decision weight, and the decision scheduling model constructed is trained using the training decision information and the second training identifier to obtain the trained decision scheduling model, including: Inputting the training decision information into each of the decision analysis networks in the decision scheduling model, and obtaining the predicted decision results output by each of the decision analysis networks; Based on the predicted decision result and the second training identifier, adjusting the parameters corresponding to the decision analysis network; Inputting the training decision information into each of the decision analysis networks after parameter adjustment, and obtaining a second prediction identifier output by each of the decision analysis networks; Based on the second prediction identifier, the decision weights matched by each decision analysis network are adjusted to obtain the trained decision scheduling model.
9. An electronic device, characterized in that: The method comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: Program instructions that can be executed by a processor are stored, and the program instructions are used to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Heterogeneous application system video analysis task scheduling method and device, terminal and medium
CN116089043A
Scheduling method and device of computing power equipment, equipment and storage medium
CN116820714A
Task cooperative scheduling method and device, equipment and medium
CN118245184A