Data processing method, device, electronic device and computer readable medium
By completing data processing, format conversion and model inference on the GPU in intelligent driving scenarios, the time-consuming problem caused by data copying between the CPU and the GPU is solved, efficient data processing is achieved and GPU utilization is improved.
Patent Information
- Application Number
- CN202210213115.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-03-04
AI Technical Summary
In smart driving scenarios, data copying between the CPU and the GPU results in an increase in data processing time.
By receiving data processing requests during intelligent driving, the GPU receives data processing requests, determines device identification and data post-processing types, acquires pending data and performs pre-processing, enters a prediction model to output prediction probability and confidence, calls corresponding data post-processing components based on these probabilities and confidences to determine the target prediction probability, and processes the to be processed based on this probability call strategy. All data processing, format conversion and model inference are done on the GPU, involving only one copy of the data.
It realizes the reduction of the number of data copies between the CPU and GPU in intelligent driving scenarios, improves the efficiency of data processing, reduces the time-consuming of the entire link, and improves the utilization rate of the GPU.
Smart Images

Figure CN114579054B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, electronic device and computer-readable medium. Background Art
[0002] At present, in existing intelligent driving scenarios, the use of graphics processing units (GPUs) is mostly limited to the deep learning model inference stage. At the same time, in the intelligent driving system, there may be a small amount of data processing and other operations using GPUs. The GPU utilization rate is low, and before the GPU operation, the data to be processed later needs to be transferred from the memory of the central processing unit (CPU) to the GPU's video memory. After the processing is completed, it needs to be copied back to the CPU, resulting in excessive additional data copying time and increased time consumption.
[0003] In the process of implementing this application, the inventors found that there are at least the following problems in the prior art:
[0004] In intelligent driving scenarios, when processing data, the CPU and GPU copy data to each other, which increases the time consumption of data processing. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a data processing method, device, electronic device and computer-readable medium, which can solve the problem of increased time consumption for data processing due to data copying between the CPU and GPU during data processing in the existing intelligent driving scenario.
[0006] To achieve the above objective, according to one aspect of an embodiment of the present application, a data processing method is provided, including:
[0007] Receive a data processing request and determine the corresponding device identification;
[0008] Determine the data post-processing type based on the device identification;
[0009] Obtaining the data to be processed corresponding to the data processing request, pre-processing the data to be processed, and obtaining the pre-processed data features;
[0010] Input the pre-processed data features into the corresponding prediction model to output the corresponding prediction probability and confidence;
[0011] Based on each prediction probability and confidence, the data post-processing component corresponding to the data post-processing type is called to determine the target prediction probability, and then the corresponding strategy is called based on the target prediction probability to process the data to be processed.
[0012] Optionally, determine the type of data post-processing, including:
[0013] Determine the number of devices and the number of corresponding prediction models corresponding to the device identifier;
[0014] Based on the number of devices and the number of prediction models, the data processing process is determined, and then the corresponding data post-processing type is determined based on the data processing process.
[0015] Optionally, obtaining the data to be processed corresponding to the data processing request includes:
[0016] Determine the data storage address in the data processing request;
[0017] Based on the data storage address, the corresponding data to be processed is copied from the CPU.
[0018] Optionally, pre-processing is performed on the data to be processed to obtain pre-processed data features, including:
[0019] Divide the data to be processed into stages based on preset conditions to obtain stage division data;
[0020] Fuse the data divided in each stage to generate fused data;
[0021] Perform feature extraction on the fused data to obtain pre-processed data features.
[0022] Optionally, before outputting the corresponding predicted probability and confidence, the method further includes:
[0023] The prediction service of each corresponding prediction model is called to call the common model data processing component to perform probability prediction on the data to be processed from the same data source and determine the confidence corresponding to the predicted probability.
[0024] Optionally, determining a target prediction probability includes:
[0025] In response to determining that the confidence level is greater than a first preset threshold, the predicted probability corresponding to the confidence level is determined as the target predicted probability.
[0026] Optionally, a corresponding strategy is called based on the target prediction probability to process the data to be processed, including:
[0027] In response to determining that the target prediction probability is greater than a second preset threshold, an exception handling strategy is called to execute a corresponding exception handling process on the data to be processed.
[0028] In addition, the present application also provides a data processing device, including:
[0029] A receiving unit, configured to receive a data processing request and determine a corresponding device identification;
[0030] A type determination unit, configured to determine a data post-processing type based on a device identifier;
[0031] A pre-processing unit is configured to obtain the data to be processed corresponding to the data processing request, pre-process the data to be processed, and obtain pre-processed data features;
[0032] A prediction unit configured to input the pre-processed data features into a corresponding prediction model to output a corresponding prediction probability and confidence;
[0033] The data processing unit is configured to call the data post-processing component corresponding to the data post-processing type based on each prediction probability and confidence level to determine the target prediction probability, and then call the corresponding strategy based on the target prediction probability to process the data to be processed.
[0034] Optionally, the type determination unit is further configured to:
[0035] Determine the number of devices and the number of corresponding prediction models corresponding to the device identifier;
[0036] Based on the number of devices and the number of prediction models, the data processing process is determined, and then the corresponding data post-processing type is determined based on the data processing process.
[0037] Optionally, the pre-processing unit is further configured to:
[0038] Determine the data storage address in the data processing request;
[0039] Based on the data storage address, the corresponding data to be processed is copied from the CPU.
[0040] Optionally, the pre-processing unit is further configured to:
[0041] Divide the data to be processed into stages based on preset conditions to obtain stage division data;
[0042] Fuse the data divided in each stage to generate fused data;
[0043] Perform feature extraction on the fused data to obtain pre-processed data features.
[0044] Optionally, the prediction unit is further configured to:
[0045] The prediction service of each corresponding prediction model is called to call the common model data processing component to perform probability prediction on the data to be processed from the same data source and determine the confidence corresponding to the predicted probability.
[0046] Optionally, the data processing unit is further configured to:
[0047] In response to determining that the confidence level is greater than a first preset threshold, the predicted probability corresponding to the confidence level is determined as the target predicted probability.
[0048] Optionally, the data processing unit is further configured to:
[0049] In response to determining that the target prediction probability is greater than a second preset threshold, an exception handling strategy is called to execute a corresponding exception handling process on the data to be processed.
[0050] In addition, the present application also provides a data processing electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the data processing method as described above.
[0051] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the data processing method as described above is implemented.
[0052] One embodiment of the above invention has the following advantages or beneficial effects: In this application, during intelligent driving, the GPU receives a data processing request and determines the corresponding device identification; based on the device identification, determines the data post-processing type; obtains the to-be-processed data corresponding to the data processing request from the CPU, pre-processes the to-be-processed data, and obtains the pre-processing data features; inputs the pre-processing data features into the corresponding prediction model to output the corresponding prediction probability and confidence; based on each prediction probability and confidence, calls the data post-processing component corresponding to the data post-processing type to determine the target prediction probability, and then calls the corresponding strategy based on the target prediction probability to process the to-be-processed data. All data processing, format conversion, and model reasoning are completed (accelerated) on the GPU, and only involve one data copy. The full-link optimization is completed by using the GPU: no additional data copy operations are required in the full link; the pre- and post-processing operations are accelerated geometrically, which reduces the time consumption of the full link and increases the utilization of the GPU.
[0053] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.
[0055] Figure 1 is a flow chart of a data processing method according to an optional embodiment of the present application (I);
[0056] Figure 2 is a system schematic diagram according to an optional embodiment of the present application;
[0057] Figure 3 is a flow chart (II) of a data processing method according to an optional embodiment of the present application;
[0058] Figure 4 is a schematic diagram of an application scenario of a data processing method according to an optional embodiment of the present application;
[0059] Figure 5 is a schematic diagram of a data processing device according to an optional embodiment of the present application;
[0060] Figure 6 is an exemplary system architecture diagram to which the optional embodiments of the present application may be applied;
[0061] Figure 7 It is a structural diagram of a computer system of a terminal device or a server suitable for implementing an optional embodiment of the present application. DETAILED DESCRIPTION
[0062] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0063] Figure 1 is a flow chart of a data processing method according to an optional embodiment of the present application (I), such as Figure 1 As shown, the data processing method includes:
[0064] Step S101, receiving a data processing request and determining a corresponding device identification.
[0065] In this embodiment, the execution subject of the data processing method (for example, it can be a GPU) can receive a data processing request through a wired connection or a wireless connection. The data processing request can be, for example, a request to identify obstacles in an intelligent driving scenario. After receiving the data processing request, the execution subject can obtain the device identification carried in the data processing request. The device identification can be JGLD or SXT, which represent a laser radar and a camera, respectively. The specific content of the device identification is not limited in this embodiment of the application.
[0066] Step S102: determining the data post-processing type based on the device identification.
[0067] The execution subject may determine the number of different device identifiers and determine the data post-processing type based on the number of different device identifiers. For example, Figure 2The system schematic diagram shown in the figure shows that when the number of different device identifiers is 1, the data post-processing type can be used. Figure 2 When the number of different device identifiers is greater than 1, the data post-processing type can only be selected Figure 2 The structure b in .
[0068] Step S103, obtaining the data to be processed corresponding to the data processing request, performing pre-processing on the data to be processed, and obtaining pre-processing data features.
[0069] Specifically, obtaining the data to be processed corresponding to the data processing request includes:
[0070] Determine a data storage address in the data processing request; and copy corresponding data to be processed from the CPU based on the data storage address.
[0071] Specifically, the data to be processed is pre-processed to obtain pre-processed data features, including:
[0072] The data to be processed is divided into stages based on preset conditions to obtain stage-divided data. Specifically, the preset conditions may be preset conditions for decoding, sampling, correction, enhancement, screening, fusion, and feature extraction. The stage-divided data may be data obtained in a decoding stage, a sampling stage, a correction stage, an enhancement stage, a screening stage, a fusion stage, and a feature extraction stage.
[0073] The data divided at each stage are integrated to generate integrated data. The data divided at each stage are integrated by using data fusion technology to generate integrated data. Data fusion technology includes the collection, transmission, integration, filtering, correlation and synthesis of useful information given by various information sources, so as to assist in situation / environment judgment, planning, detection, verification and diagnosis.
[0074] Perform feature extraction on the fused data to obtain pre-processed data features. The execution subject calls the feature extraction model to extract corresponding features to obtain pre-processed data features after pre-processing.
[0075] In the pre-treatment process, Figure 2 There are three structures a, b, and c in the above. For post-processing, considering that a stable prediction result output is usually required in time and space, the result will have multiple data sources (prediction result of model reasoning, post-processing result of the previous moment). At this time, post-processing can only use the above structure b. If post-processing has no consistency requirements in time and space, structure a can still be used.
[0076] Step S104, input the pre-processed data features into the corresponding prediction model to output the corresponding prediction probability and confidence.
[0077] Confidence, also known as reliability, confidence level, or confidence coefficient, means that when sampling is used to estimate the overall parameter, the conclusion is always uncertain due to the randomness of the sample. Therefore, a probability statement method is used, which is the interval estimation method in mathematical statistics, that is, the corresponding probability that the estimated value and the overall parameter are within a certain allowable error range. This corresponding probability is called confidence.
[0078] Specifically, before outputting the corresponding prediction probability and confidence, the method further includes:
[0079] The prediction service of each corresponding prediction model is called to call the common model data processing component to perform probability prediction on the data to be processed from the same data source and determine the confidence corresponding to the predicted probability.
[0080] For example, in the scenario of intelligent driving, due to the complexity of the task, different inference services may need to be deployed for different tasks. However, due to the limited number of sensors on the vehicle side, different model inferences may use the same data source and their processing methods may be the same, such as Figure 2 In the “pre-processing” - “c”, different models can share a component with the same basic processing operation (i.e., the common model data processing component) to perform probability prediction on the data to be processed from the same data source and determine the confidence level corresponding to the predicted probability, thereby saving computing power and accelerating calculations.
[0081] Step S105, based on each prediction probability and confidence, call the data post-processing component corresponding to the data post-processing type to determine the target prediction probability, and then call the corresponding strategy based on the target prediction probability to process the data to be processed.
[0082] Specifically, determining the target prediction probability includes:
[0083] In response to determining that the confidence level is greater than a first preset threshold, the predicted probability corresponding to the confidence level is determined as the target predicted probability.
[0084] The first preset threshold is a threshold for evaluating the confidence level. The embodiment of the present application does not specifically limit the first preset threshold and can be determined based on actual conditions.
[0085] When the execution entity determines that the confidence level of the prediction probability output by the prediction model is greater than a first preset threshold, it can be determined that the prediction probability is a credible prediction probability, and the prediction probability can be determined as the target prediction probability.
[0086] Specifically, based on the target prediction probability, the corresponding strategy is called to process the data to be processed, including:
[0087] In response to determining that the target prediction probability is greater than a second preset threshold, an exception handling strategy is called to execute a corresponding exception handling process on the data to be processed.
[0088] The second preset threshold is a threshold for evaluating the prediction probability. The target prediction probability, for example, can be the probability that an object encountered during intelligent driving is an obstacle. When the target prediction probability is greater than the second preset threshold, that is, the probability that an object encountered during intelligent driving is an obstacle is greater than the second preset threshold, it indicates that the object encountered during intelligent driving is likely to be an obstacle to a certain extent, and it can be determined that the object is an obstacle. Then the execution subject can call the strategy for handling obstacles to execute abnormal processing processes such as replanning the driving route.
[0089] In this embodiment, during intelligent driving, the GPU receives a data processing request and determines the corresponding device identifier; based on the device identifier, determines the data post-processing type; obtains the to-be-processed data corresponding to the data processing request from the CPU, pre-processes the to-be-processed data, and obtains the pre-processing data features; inputs the pre-processing data features into the corresponding prediction model to output the corresponding prediction probability and confidence; based on each prediction probability and confidence, calls the data post-processing component corresponding to the data post-processing type to determine the target prediction probability, and then calls the corresponding strategy based on the target prediction probability to process the to-be-processed data. All data processing, format conversion, and model reasoning are completed (accelerated) on the GPU, and only involve one data copy. The full-link optimization is completed by using the GPU: no additional data copy operations are required in the full link; the pre- and post-processing operations are accelerated geometrically, which reduces the time consumption of the full link and increases the utilization of the GPU.
[0090] Figure 3 is a flow chart (II) of a data processing method according to an optional embodiment of the present application, such as Figure 3 As shown, the data processing method includes:
[0091] Step S301, receiving a data processing request and determining a corresponding device identifier.
[0092] Step S302, determining the number of devices and the number of corresponding prediction models corresponding to the device identifier.
[0093] Step S303, based on the number of devices and the number of prediction models, determine the data processing flow, and then determine the corresponding data post-processing type based on the data processing flow.
[0094] The execution subject may respond to the determination that the number of devices corresponding to the device identifier is 1 and the number of corresponding prediction models is 1, and then the data processing flow may be determined as follows: Figure 2The structure a shown in the figure, the structure corresponding to the corresponding data post-processing type is also structure a. The execution subject can respond to determining that the number of devices corresponding to the device identifier is greater than 1, and the number of corresponding prediction models is greater than 1, and then determine that the data processing flow is as follows Figure 2 The structure b shown in the figure, the structure corresponding to the data post-processing type is also structure b. The execution subject can respond to the determination that the number of devices corresponding to the device identifier is 1, and the number of corresponding prediction models is greater than 1, and then determine that the data processing flow is as follows Figure 2 The structure c shown in the figure has the same structure as the data post-processing type, thus achieving full-link GPU channel acceleration.
[0095] Step S304, obtaining the data to be processed corresponding to the data processing request, performing pre-processing on the data to be processed, and obtaining pre-processing data features.
[0096] Step S305, input the pre-processed data features into the corresponding prediction model to output the corresponding prediction probability and confidence.
[0097] Step S306, based on each prediction probability and confidence, call the data post-processing component corresponding to the data post-processing type to determine the target prediction probability, and then call the corresponding strategy based on the target prediction probability to process the data to be processed.
[0098] The principles of steps S304 to S306 are similar to those of steps S103 to S105 and will not be described in detail here.
[0099] Figure 4 Schematic diagram of an application scenario of a data processing method according to an optional embodiment of the present application. The data processing method of the embodiment of the present application can be applied to data processing scenarios in the process of intelligent driving. Figure 4 As shown, an embodiment of the present application provides a full-link optimization method. The data pre-processing and post-processing processes serving the model reasoning can be migrated to the GPU to run, so as to release CPU resources and speed up the full-link speed of model reasoning. And by establishing a GPU data channel, the data transmission between CPU and GPU is reduced to further speed up the speed of the whole link of reasoning. A series of randomly combined GPU-optimized components for data processing (including TensorRT format conversion) are provided. Mobile devices can be used and combined at will in different environments, and the execution performance is not affected. Specifically, the full link of reasoning mainly includes three parts: pre-processing, model reasoning and post-processing. Among them, such as Figure 2 and Figure 4As shown in Figure 1, pre-processing mainly includes but is not limited to: decoding, sampling, correction, enhancement, screening, fusion, feature extraction, etc. of input data (images, lidar) obtained from the CPU. Model reasoning mainly includes: running machine learning, deep learning and other models on different input data (single and multiple data), and making predictions based on the current input. Post-processing (e.g. T0, ..., T t-1 , T t ) mainly includes: by fusing predictions at different times and spaces, and according to the confidence of each prediction result, a more robust prediction result is given, which can have (temporal and spatial continuity).
[0100] Specifically, the GPU acceleration process of pre- and post-processing: To build a full-link GPU high-speed channel and avoid frequent data copying from the CPU to the GPU. All data processing operations involved in the entire process of the full link need to be optimized and accelerated on the GPU. At the same time, in order to increase the scalability of pre- and post-processing, a series of basic data processing components (including TensorRT format conversion) are implemented. At the same time, 3 different data processing processes are provided, such as Figure 2 In the "pre-processing" shown, each circle represents a basic data processing component, and each component is executed on the GPU. In the case of a single data source and a single model inference, as shown in the "pre-processing"-"a" in the figure above, the input data passes through multiple different basic data processing components to finally achieve complex pre-processing operations. For intelligent driving, mobile devices usually have multiple input devices (cameras, radars, millimeter waves, etc.), and the processing methods of each data signal source are different. Therefore, in the case of multiple data sources and a single model inference, as shown in the "pre-processing"-"b" in the figure above, by processing different decentralized input data and then fusing / unifying them in stages, a structured / integrated data source can be finally obtained for model inference. In the scenario of intelligent driving, due to the complexity of the task, different inference services may need to be deployed for different tasks, but due to the limited sensors on the vehicle side, different model inferences may use the same data source and their processing methods may be the same, as shown in the "pre-processing"-"c" in the figure above. Different models can share a component with the same basic processing operation, thereby saving computing power and accelerating calculations.
[0101] In the pre-processing process, the above three structures a, b, and c can be used; for post-processing, considering that usually a stable prediction result output is required in time and space, the result will have multiple data sources (prediction results of model reasoning, post-processing results of the previous moment), and at this time, post-processing can only use the above structure b. If post-processing has no consistency requirements for time and space, structure a can still be used.
[0102] Full-link GPU channel acceleration: By integrating all fragmented operations of the entire link (including: pre-processing, model inference, and post-processing) on the GPU, the entire link no longer contains any CPU operations, so there is no need to copy data from the GPU to the CPU during the entire link process. All data sources and intermediate data are stored in the GPU data channel. At the same time, in common data processing operations, the time for copying data from the CPU to the GPU and from the GPU to the CPU is much longer than the time it takes for the GPU to perform operations. After the integration of the entire link, not only the pre- and post-processing are accelerated, but also the time consumption of the entire link will be greatly shortened because data copying is eliminated.
[0103] The entire link is optimized by using GPU: no additional data copy operations are required in the entire link; the pre- and post-processing operations are accelerated geometrically, reducing the time consumption of the entire link and increasing the utilization of the GPU.
[0104] Figure 5 Schematic diagram of a data processing device according to an optional embodiment of the present application. Figure 5 As shown, the data processing device includes a receiving unit 501, a type determination unit 502, a pre-processing unit 503, a prediction unit 504 and a data processing unit 505.
[0105] The receiving unit 501 is configured to receive a data processing request and determine a corresponding device identification.
[0106] The type determination unit 502 is configured to determine the data post-processing type based on the device identification.
[0107] The pre-processing unit 503 is configured to obtain the data to be processed corresponding to the data processing request, perform pre-processing on the data to be processed, and obtain pre-processing data features.
[0108] The prediction unit 504 is configured to input the pre-processed data features into the corresponding prediction model to output the corresponding prediction probability and confidence.
[0109] The data processing unit 505 is configured to call the data post-processing component corresponding to the data post-processing type based on each prediction probability and confidence level to determine the target prediction probability, and then call the corresponding strategy based on the target prediction probability to process the data to be processed.
[0110] In some embodiments, the type determination unit 502 is further configured to: determine the number of devices corresponding to the device identification and the corresponding number of prediction models; determine the data processing flow based on the number of devices and the number of prediction models, and then determine the corresponding data post-processing type based on the data processing flow.
[0111] In some embodiments, the pre-processing unit 503 is further configured to: determine a data storage address in a data processing request; and copy corresponding to-be-processed data from the CPU based on the data storage address.
[0112] In some embodiments, the pre-processing unit 503 is further configured to: divide the data to be processed into stages based on preset conditions to obtain stage-divided data; fuse the stage-divided data to generate fused data; and extract features from the fused data to obtain pre-processed data features.
[0113] In some embodiments, the prediction unit 504 is further configured to: call the prediction service of each corresponding prediction model to call the common model data processing component to perform probability prediction on the data to be processed from the same data source and determine the confidence corresponding to the predicted probability.
[0114] In some embodiments, the data processing unit 505 is further configured to: in response to determining that the confidence level is greater than a first preset threshold, determine the predicted probability corresponding to the confidence level as the target predicted probability.
[0115] In some embodiments, the data processing unit 505 is further configured to: in response to determining that the target prediction probability is greater than a second preset threshold, call an exception handling strategy to execute a corresponding exception handling process on the data to be processed.
[0116] It should be noted that the data processing method and the data processing device in the present application have a corresponding relationship in terms of specific implementation content, so the repeated content will not be described again.
[0117] Figure 6 An exemplary system architecture 600 is shown to which a data processing method or a data processing device according to an optional embodiment of the present application can be applied.
[0118] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0119] Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0120] The terminal devices 601 , 602 , and 603 may be various electronic devices having a data processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0121] Server 605 can be a server that provides various services, such as a background management server that provides support for data processing requests submitted by users using terminal devices 601, 602, and 603 (only as an example). The GPU of the background management server can receive data processing requests and determine the corresponding device identification; based on the device identification, determine the data post-processing type; obtain the data to be processed corresponding to the data processing request from the CPU, pre-process the data to be processed, and obtain the pre-processing data features; input the pre-processing data features into the corresponding prediction model to output the corresponding prediction probability and confidence; based on each prediction probability and confidence, call the data post-processing component corresponding to the data post-processing type to determine the target prediction probability, and then call the corresponding strategy based on the target prediction probability to process the data to be processed. All data processing, format conversion, and model reasoning are completed (accelerated) on the GPU and only involve one data copy. The full link is optimized by using the GPU: no additional data copy operations are required in the full link; the pre- and post-processing operations are accelerated geometrically, which reduces the time consumption of the full link and increases the utilization of the GPU.
[0122] It should be noted that the data processing method provided in the embodiment of the present application is generally executed by the server 605 , and accordingly, the data processing device is generally set in the server 605 .
[0123] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0124] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an optional embodiment of the present application. Figure 7 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0125] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the computer system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0126] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0127] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present application are executed.
[0128] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0129] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0130] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a receiving unit, a type determination unit, a pre-processing unit, a prediction unit, and a data processing unit. The names of these units do not constitute limitations on the units themselves in some cases.
[0131] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the GPU of the device receives a data processing request and determines the corresponding device identification; based on the device identification, the data post-processing type is determined; the to-be-processed data corresponding to the data processing request is obtained from the CPU, and the to-be-processed data is pre-processed to obtain the pre-processed data features; the pre-processed data features are input into the corresponding prediction model to output the corresponding prediction probability and confidence; based on each prediction probability and confidence, the data post-processing component corresponding to the data post-processing type is called to determine the target prediction probability, and then the corresponding strategy is called based on the target prediction probability to process the to-be-processed data.
[0132] According to the technical solution of the embodiment of the present application, all data processing, format conversion, and model reasoning are completed (accelerated) on the GPU, and only one data copy is involved. The full link optimization is completed by using the GPU: no additional data copy operation is required in the full link; the pre- and post-processing operations are accelerated geometrically, which reduces the time consumption of the full link and increases the utilization rate of the GPU.
[0133] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A data processing method, characterized in that: include: The GPU receives the data processing request and determines the corresponding device identification; Based on the device identification, determining a data post-processing type; Copying the to-be-processed data corresponding to the data processing request from the CPU once, pre-processing the to-be-processed data, and obtaining pre-processed data features; Inputting the pre-processed data features into the corresponding prediction model to output the corresponding prediction probability and confidence; Based on each of the prediction probabilities and confidence levels, the data post-processing component corresponding to the data post-processing type is called to determine the target prediction probability, and then the corresponding strategy is called based on the target prediction probability to process the data to be processed.
2. The method according to claim 1, characterized in that The determining of the data post-processing type includes: Determine the number of devices and the number of corresponding prediction models corresponding to the device identifier; Based on the number of devices and the number of prediction models, a data processing flow is determined, and then based on the data processing flow, a corresponding data post-processing type is determined.
3. The method according to claim 1, characterized in that: The obtaining of the to-be-processed data corresponding to the data processing request includes: Determine the data storage address in the data processing request; Based on the data storage address, the corresponding data to be processed is copied from the CPU.
4. The method according to claim 1, characterized in that The pre-processing of the data to be processed to obtain pre-processed data features includes: Dividing the data to be processed into stages based on preset conditions to obtain stage-divided data; Fusing the data divided in each stage to generate fused data; Feature extraction is performed on the fused data to obtain pre-processed data features.
5. The method according to claim 1, characterized in that Before outputting the corresponding predicted probability and confidence, the method further includes: The prediction service of each corresponding prediction model is called to call the common model data processing component to perform probability prediction on the data to be processed from the same data source and determine the confidence corresponding to the predicted probability.
6. The method according to claim 1, characterized in that Determining the target prediction probability includes: In response to determining that the confidence level is greater than a first preset threshold, the predicted probability corresponding to the confidence level is determined as the target predicted probability.
7. The method according to any one of claims 1 to 6, characterized in that: The calling of a corresponding strategy based on the target prediction probability to process the data to be processed includes: In response to determining that the target prediction probability is greater than a second preset threshold, an exception handling strategy is called to execute a corresponding exception handling process on the data to be processed.
8. A data processing device, characterized in that: include: A receiving unit, configured to receive a data processing request from the GPU and determine a corresponding device identifier; a type determination unit, configured to determine a data post-processing type based on the device identification; A pre-processing unit is configured to copy the to-be-processed data corresponding to the data processing request from the CPU once, perform pre-processing on the to-be-processed data, and obtain pre-processing data features; A prediction unit, configured to input the pre-processed data features into a corresponding prediction model to output a corresponding prediction probability and confidence; The data processing unit is configured to call the data post-processing component corresponding to the data post-processing type based on each of the prediction probabilities and confidences to determine the target prediction probability, and then call the corresponding strategy based on the target prediction probability to process the data to be processed.
9. The device according to claim 8, characterized in that The type determination unit is further configured to: Determine the number of devices and the number of corresponding prediction models corresponding to the device identifier; Based on the number of devices and the number of prediction models, a data processing flow is determined, and then based on the data processing flow, a corresponding data post-processing type is determined.
10. The device according to claim 8, characterized in that The pre-processing unit is further configured to: Determine the data storage address in the data processing request; Based on the data storage address, the corresponding data to be processed is copied from the CPU.
11. A data processing electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
12. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Model reasoning method and device based on graphic rendering pipeline and storage medium
CN112348732A
Traffic incident detection method and device, roadside equipment and cloud control platform
CN113052048A