OCR service data processing method and related equipment

By deploying GPU and CPU models in the GPU server and reducing the dimensionality of OCR business data, the problem of low processing speed of OCR inference deployment system is solved, and more efficient data transmission and processing speed is achieved.

CN119227807APending Publication Date: 2024-12-31PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411388427.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing OCR inference deployment system has low processing speed, especially in data preprocessing, inter-device transmission and post-processing, resulting in low overall system efficiency.

Method used

Deploy the GPU model in the GPU server and deploy the CPU model according to the GPU model to form an edge-side joint deployment model. By reducing the dimensionality of the OCR business data output by the GPU model and transmitting it to the CPU model, it reduces the GPU and CPU Data interaction between.

Benefits of technology

By jointly deploying GPU and CPU models and reducing the dimensionality of data, the processing speed of the joint deployment model on the edge side is significantly improved, and thus the overall processing speed and TPS of the OCR inference deployment system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227807A_ABST
    Figure CN119227807A_ABST
Patent Text Reader

Abstract

The embodiment of the invention belongs to the technical field of artificial intelligence and OCR, and relates to an OCR business data processing method, which comprises the following steps: deploying a GPU model in a GPU server; deploying a CPU model in the GPU server according to the GPU model to obtain an edge side joint deployment model; and when the edge-side joint deployment model processes the OCR service data, performing dimension reduction processing on the OCR service data output by the GPU model, and transmitting the dimension-reduced OCR service data to the CPU model. The invention further provides an OCR service data processing device, computer equipment and a storage medium. According to the method, the GPU model and the CPU model can be jointly deployed, GPU and CPU resources are fully utilized, dimension reduction processing is performed on the OCR service data output by the GPU model, and OCR service data interaction between the CPU and the GPU can be reduced, so that the processing speed of an edge-side joint deployment model is greatly improved, the processing speed of an OCR reasoning deployment system is further improved, and the OCR service TPS is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of artificial intelligence and OCR technology, and in particular to a method for processing OCR business data and related equipment. Background Art

[0002] As artificial intelligence technology gradually matures, the application of OCR technology in the financial industry is accelerating in breadth and depth. OCR technology can be used to quickly process massive forms for structured information extraction and storage, greatly improving the work efficiency of practitioners. This not only reduces the operating and risk costs of financial institutions, but also helps to improve customer satisfaction.

[0003] The increase in demand has also posed a higher challenge to the cost of OCR inference deployment. How to occupy less resources and how to provide higher processing speed have become the focus of industry research. Common inference acceleration frameworks for GPUs include tensorRT and TVM, and common inference acceleration frameworks for CPUs include openvino, ncnn, mnn, tflite, etc. Applying these frameworks can accelerate the single model level, but the benefits for the entire system are limited because it also involves many links such as data preprocessing, inter-device transmission, and post-processing. The current OCR inference deployment system still has the problem of low processing speed. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method for processing OCR business data and related equipment to solve the problem of low processing speed of the OCR reasoning deployment system.

[0005] In order to solve the above technical problems, the present application embodiment provides a method for processing OCR business data, which adopts the following technical solution:

[0006] Deploy GPU models in GPU servers;

[0007] Deploy a CPU model in the GPU server according to the GPU model to obtain an edge-side joint deployment model;

[0008] When the edge side joint deployment model processes the OCR business data, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, and the OCR business data after dimensionality reduction is transmitted to the CPU model.

[0009] Furthermore, the step of deploying the CPU model in the GPU server according to the GPU model to obtain the edge-side joint deployment model specifically includes:

[0010] Obtaining an initial GPU model in the GPU server;

[0011] Using a conversion operation of a preset inference acceleration framework, converting the initial GPU model into a CPU conversion model;

[0012] The CPU conversion model is deployed to obtain an edge-side joint deployment model.

[0013] Furthermore, after the step of converting the initial GPU model into a CPU conversion model by using the conversion operation of the preset inference acceleration framework, the method further includes:

[0014] Determine whether the CPU conversion model accuracy meets a first preset accuracy value;

[0015] If the accuracy of the CPU conversion model meets the first preset accuracy value, the step of deploying the CPU conversion model to obtain an edge-side joint deployment model is performed;

[0016] Furthermore, after the step of determining whether the accuracy of the CPU conversion model meets the first preset accuracy value, the method further includes:

[0017] If the accuracy of the CPU conversion model does not meet the first preset accuracy value, the size of the first preset accuracy value is adjusted, and the conversion operation using the preset inference acceleration framework is continued to be performed to convert the initial GPU model into the CPU conversion model.

[0018] Furthermore, the step of deploying the CPU conversion model to obtain an edge-side joint deployment model includes:

[0019] Quantizing the CPU conversion model by using a quantization operation of a preset inference acceleration framework to obtain a CPU quantization model;

[0020] The CPU quantization model is deployed to obtain an edge-side joint deployment model.

[0021] Furthermore, after the step of quantizing the CPU model by using the quantization operation of the preset inference acceleration framework to obtain the CPU quantization model, the method further includes:

[0022] Determine whether the CPU quantization model accuracy meets a second preset accuracy value;

[0023] If the accuracy of the CPU quantization model meets the second preset accuracy value, the step of deploying the CPU quantization model to obtain an edge-side joint deployment model is executed.

[0024] Furthermore, after the step of determining whether the accuracy of the CPU quantization model meets a second preset accuracy value, the method further includes:

[0025] If the accuracy of the CPU quantization model does not meet the second preset accuracy value, the size of the second preset accuracy value is adjusted, and the quantization operation using the preset inference acceleration framework is continued to be performed to quantize the CPU conversion model to obtain the CPU quantization model step.

[0026] In order to solve the above technical problems, the embodiment of the present application further provides an OCR business data processing device, which adopts the following technical solution:

[0027] A first deployment module is used to deploy a GPU model in a GPU server;

[0028] A second deployment module is used to deploy a CPU model in the GPU server according to the GPU model to obtain an edge-side joint deployment model;

[0029] The processing module is used to perform dimensionality reduction processing on the OCR business data output by the GPU model when the edge side joint deployment model processes the OCR business data, and transmit the reduced dimensionality OCR business data to the CPU model.

[0030] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0031] The computer device includes a memory and a processor. The memory stores computer-readable instructions. When the processor executes the computer-readable instructions, the steps of the method for processing OCR business data described in the above embodiment are implemented.

[0032] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0033] The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the method for processing OCR business data described in the above embodiment are implemented.

[0034] Compared with the prior art, the embodiment of the present application has the following beneficial effects: by deploying a GPU model in a GPU server; deploying a CPU model in the GPU server according to the GPU model, an edge-side joint deployment model is obtained; when the edge-side joint deployment model processes OCR business data, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, and the reduced-dimensional OCR business data is transmitted to the CPU model. In this way, the GPU model and the CPU model can be jointly deployed, and the GPU and CPU resources can be fully utilized. At the same time, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, which can reduce the interaction of OCR business data between the CPU and the GPU, thereby greatly improving the processing speed of the edge-side joint deployment model, thereby improving the processing speed of the OCR reasoning deployment system, and further improving the OCR business TPS. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 A flowchart of an embodiment of a method for processing OCR business data according to the present application;

[0037] Figure 2 yes Figure 1 A flowchart of a specific implementation of step S102;

[0038] Figure 3 yes Figure 2 A flowchart of a specific implementation of step S1023;

[0039] Figure 4 is a structural schematic diagram of an embodiment of an OCR business data processing device according to the present application;

[0040] Figure 5 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0042] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0043] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0044] refer to Figure 1 , shows a flow chart of an embodiment of a method for processing OCR business data according to the present application. The method for processing OCR business data is applied to a GPU server, wherein OCR (optical character recognition): optical character recognition, extracting text information from an image. TPS (times per second): the number of business requests processed per second. The method for processing OCR business data includes the following steps:

[0045] Step S101, deploying a GPU model in a GPU server.

[0046] In this embodiment, GPU (graphics processing unit), the GPU model can be deployed in the GPU server, and the GPU model can deploy the GPU version, which is used to reprocess the OCR business data after image data preprocessing, text position detection, text recognition, etc., and transmit the processed OCR business data to the CPU model.

[0047] Step S102: deploy the CPU model in the GPU server according to the GPU model to obtain an edge-side joint deployment model.

[0048] In this embodiment, the CPU (Central Processing Unit) and the CPU model can be deployed in the GPU server, and the CPU model can deploy the CPU version to assist the GPU model in processing OCR business data. The GPU model and the CPU model can be jointly deployed to obtain an edge-side joint deployment model, and the GPU model and the CPU model can switch with each other to jointly process OCR business data.

[0049] Specifically, Figure 2 As shown, step S102 includes:

[0050] Step S1021, obtaining the initial GPU model in the GPU server.

[0051] In this embodiment, after the training using the deep learning framework in the GPU server is completed, an initial GPU model in the GPU server is obtained.

[0052] Step S1022, using the conversion operation of the preset inference acceleration framework, the initial GPU model is converted into a CPU conversion model.

[0053] In this embodiment, the preset reasoning acceleration framework can be an openvino framework, which is mainly used for reasoning and deploying various models. The openvino framework provides conversion operations and quantization operations. Specifically, the conversion of the initial GPU model to the CPU conversion model can be achieved through the conversion operation provided by the preset reasoning acceleration framework. It can be expressed as cpu conversion model = mo (gpu initial model), where mo is the conversion operation provided by the preset reasoning acceleration framework. When the GPU model processes too much data, part of the data can be transferred to the CPU model for processing through conversion operations.

[0054] Step S1023, deploy the CPU conversion model to obtain the edge side joint deployment model.

[0055] In this embodiment, after completing the conversion from the initial GPU model to the CPU conversion model, a CPU conversion model is obtained, and the CPU conversion model can be deployed to obtain a corresponding edge-side joint deployment model, so that the edge-side joint deployment model can combine the GPU model and the CPU model to jointly process the data of the GPU model. In this way, when the GPU model processes a lot of data, the data can be transferred to the CPU model for processing through the conversion operation, making full use of the redundant CPU resources of the GPU server, deploying the CPU model, and thus improving the overall TPS (processing speed).

[0056] like Figure 2 As shown, after step S1022, the method for processing OCR business data further includes:

[0057] Step S1024, determining whether the CPU conversion model accuracy meets a first preset accuracy value.

[0058] Step S1025: If the CPU conversion model accuracy meets the first preset accuracy value, execute step S1023.

[0059] In the embodiment of the present invention, Figure 2 As shown, after step S1024, the method for processing OCR business data further includes:

[0060] Step S1026: If the CPU conversion model accuracy does not meet the first preset accuracy value, adjust the size of the first preset accuracy value and continue to execute step S1022.

[0061] In this embodiment, the first preset accuracy value may be a preset, adjustable accuracy threshold, such as one thousandth, etc., which can be adjusted according to any accuracy threshold required by the user. It should be noted that the accuracy of the CPU conversion model can be determined by the accuracy of the data processed by the CPU conversion model. Of course, the corresponding value of the first preset accuracy value can also be set by the accuracy rate. After the CPU conversion model is converted, the accuracy of the CPU conversion model needs to be tested. When the accuracy of the CPU conversion model meets the first preset accuracy value, it means that the obtained CPU conversion model is feasible, and the accuracy of the data processed by the CPU conversion model is reliable and meets the requirements. For example, when the accuracy of the data that can be processed by the obtained CPU conversion model is within one thousandth, it means that the accuracy of the CPU conversion model meets the first preset accuracy value. If the accuracy of the CPU conversion model does not meet the first preset accuracy value, it means that the CPU conversion model cannot meet the accuracy requirements of the user, and the CPU conversion model is not deployed. It is necessary to readjust the size of the first preset accuracy value, and re-execute step S1022 to obtain a new CPU conversion model, and then judge whether the new CPU conversion model can be deployed by the adjusted first preset accuracy value. In this way, by judging the accuracy of the CPU conversion model, it is determined whether the CPU conversion model can be deployed to obtain the edge-side joint deployment model, thereby ensuring that the obtained edge-side joint deployment model has better performance, and can combine the GPU model and the CPU model to process the GPU model data in parallel, while further ensuring the accuracy of the edge-side joint deployment model when processing data. In this embodiment, the GPU model in the edge-side joint deployment model can serve 70% of the requests and the CPU model can serve 30% of the requests, which increases the TPS by 42%.

[0062] like Figure 3 As shown, step S1023 also includes:

[0063] Step S10231, using the quantization operation of the preset inference acceleration framework, quantize the CPU conversion model to obtain a CPU quantization model.

[0064] In this embodiment, the conversion from the CPU conversion model to the CPU quantization model can be achieved through the quantization operation provided by the preset reasoning acceleration framework. It can be expressed as CPU quantization model = quan (CPU conversion model, quantized image data), where quan is the quantization operation provided by the preset reasoning acceleration framework. The quantization operation provided by the preset reasoning acceleration framework can perform quantization conversion on the CPU conversion model, thereby changing the size of the CPU conversion model to adapt to models of different size requirements. After the quantization operation, the CPU conversion model becomes smaller, occupies less space, and then releases more space, further improving the model performance.

[0065] Step S10232, deploy the CPU quantization model to obtain an edge-side joint deployment model.

[0066] In this embodiment, after completing the conversion from the CPU conversion model to the CPU quantization model, a CPU quantization model is obtained, and the CPU quantization model can be deployed to obtain a corresponding edge-side joint deployment model. This allows the quantized edge-side joint deployment model to combine the GPU model and the CPU model to jointly process the data of the GPU model. After the CPU conversion model is quantized, the processed data structure is simpler and the processing speed is faster. At the same time, the storage space occupied by data storage is smaller, and the storage space of the GPU server can be saved, thereby improving the data processing speed of the entire edge-side joint deployment model and further improving the processing speed of OCR business data.

[0067] like Figure 3 As shown, after step S10231, the method for processing OCR business data further includes:

[0068] Step S10233, determine whether the CPU quantization model accuracy meets the second preset accuracy value.

[0069] Step S10234, if the CPU quantization model accuracy meets the second preset accuracy value, execute step S10232.

[0070] In the embodiment of the present invention, Figure 3 As shown, after step 10233, the method for processing OCR business data further includes:

[0071] Step S10235, if the CPU quantization model accuracy does not meet the second preset accuracy value, adjust the size of the second preset accuracy value and continue to execute step S10231.

[0072] In this embodiment, the second preset accuracy value may be a pre-set, adjustable accuracy threshold, such as one thousandth, etc., which can be adjusted according to any accuracy threshold required by the user. It should be noted that the accuracy of the CPU quantization model can be determined by the accuracy of the data processed by the CPU quantization model. Of course, the value of the corresponding second preset accuracy value can also be set by the accuracy rate. After the CPU quantization model is converted, the accuracy of the CPU quantization model needs to be tested. When the accuracy of the CPU quantization model meets the second preset accuracy value, it means that the obtained CPU quantization model is feasible, and the accuracy of the data processed by the CPU quantization model is reliable and meets the requirements. For example, when the accuracy of the data that can be processed by the obtained CPU quantization model is within one thousandth, it means that the accuracy of the CPU quantization model meets the second preset accuracy value. If the accuracy of the CPU quantization model does not meet the second preset accuracy value, it means that the CPU conversion model cannot meet the accuracy requirements of the user, and the CPU conversion model is not deployed. It is necessary to readjust the size of the second preset accuracy value, and re-execute step S10231 to obtain a new CPU quantization model, and then judge whether the new CPU quantization model can be deployed by the adjusted second preset accuracy value. In this way, by judging the accuracy of the CPU quantization model, it is determined whether the CPU quantization model can be deployed to obtain the edge-side joint deployment model, thereby ensuring that the obtained edge-side joint deployment model has better performance, and further ensuring the accuracy of the edge-side joint deployment model when processing data, while reducing data storage space and improving the data processing speed of the edge-side joint deployment model.

[0073] Step S103, when the edge side jointly deploys the model to process the OCR business data, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, and the OCR business data after dimensionality reduction is transmitted to the CPU model.

[0074] In this embodiment, the OCR business data may be recognition result data obtained after image data preprocessing, text position detection, text recognition, and other processing. It should be noted that, generally, when the recognition result data of the OCR business data is received, it is received from the CPU model and then transmitted to the GPU model. However, in order to ensure the accuracy of the input data, the data does not need to be changed when the CPU model transmits it to the GPU. After further processing by the GPU model, the OCR business data output to the CPU model for processing needs to be processed by dimensionality reduction. While ensuring the accuracy of the OCR business data transmission, the transmission speed from the GPU model to the CPU model is improved.

[0075] Specifically, the io operation between the GPU model and the CPU model in the edge-side joint deployment model is a time-consuming operation. When the OCR business data transmission dimension between the GPU model and the CPU model is large, the OCR business data transmission speed between the GPU model and the CPU model will slow down, thereby affecting the overall data processing speed. At this time, while ensuring that the transmission data accuracy between the GPU model and the CPU model is within an acceptable range, it is necessary to reduce the OCR business data transmission between the GPU model and the CPU model. The OCR business data output by the GPU model can be reduced in dimension, and then the reduced OCR business data is transmitted to the CPU model for further processing, so as to facilitate subsequent recognition post-processing operations. This improves the data transmission speed between the GPU model and the CPU model. In turn, the data processing speed of the edge-side joint deployment model is improved. For example, if the output dimension of the OCR business data of the GPU model is m*n, and the output data type is float32, the output data volume is m*n*4 bytes, and the transmission time is: T1=m*n*4 / c, where c is the transmission bandwidth. In view of the business needs of ORC, n in the GPU output is compressible data. This link can reduce the amount of data transmitted and compress the dimension m*n to m*1. At this time, the transmission time is: T2 = m*1*4 / c. By comparing T1 and T2, it can be concluded that the transmission time is shortened to 1 / n of the original. It can be seen that by performing dimensionality reduction processing on the OCR business data output by the GPU model, the output data volume of the GPU model is reduced, and the data transmission time is reduced, thereby reducing the data interaction between the GPU model and the CPU model, thereby increasing the data transmission speed between the GPU model and the CPU model, and further increasing the processing speed of the joint deployment model on the edge side.

[0076] This application deploys a GPU model in a GPU server; deploys a CPU model in the GPU server according to the GPU model to obtain an edge-side joint deployment model; when the edge-side joint deployment model processes OCR business data, the OCR business data output by the GPU model is reduced in dimension, and the reduced-dimensional OCR business data is transmitted to the CPU model. In this way, the GPU model and the CPU model can be jointly deployed, and the GPU and CPU resources can be fully utilized. At the same time, the OCR business data output by the GPU model is reduced in dimension, which can reduce the interaction of OCR business data between the CPU and the GPU, thereby greatly improving the processing speed of the edge-side joint deployment model, thereby improving the processing speed of the OCR reasoning deployment system, and further improving the OCR business TPS.

[0077] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0078] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0079] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0080] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0081] Further references Figure 4 , as a response to the above Figure 1 The present application provides an embodiment of a device for processing OCR business data. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0082] like Figure 4As shown, an OCR business data processing device 400 of this embodiment includes: a first deployment module 401, a second deployment module 402 and a processing module 403. Among them:

[0083] A first deployment module 401 is used to deploy a GPU model in a GPU server;

[0084] The second deployment module 402 is used to deploy the CPU model in the GPU server according to the GPU model to obtain an edge-side joint deployment model;

[0085] The processing module 403 is used to perform dimensionality reduction processing on the OCR business data output by the GPU model when the model is jointly deployed on the edge side to process the OCR business data, and transmit the reduced dimensionality OCR business data to the CPU model.

[0086] In this embodiment, the operations performed by the above modules, sub-modules or units, and sub-units respectively correspond one-to-one to the steps of the OCR business data processing method in the aforementioned implementation mode, and are not described in detail here.

[0087] In this embodiment, the GPU model is deployed in the GPU server; the CPU model is deployed in the GPU server according to the GPU model to obtain the edge-side joint deployment model; when the edge-side joint deployment model processes the OCR business data, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, and the OCR business data after dimensionality reduction is transmitted to the CPU model. In this way, the GPU model and the CPU model can be jointly deployed, and the GPU and CPU resources can be fully utilized. At the same time, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, which can reduce the interaction of OCR business data between the CPU and the GPU, thereby greatly improving the processing speed of the edge-side joint deployment model, thereby improving the processing speed of the OCR reasoning deployment system, and further improving the OCR business TPS.

[0088] In some optional implementations of this embodiment, the second deployment module 402 includes:

[0089] The acquisition submodule is used to obtain the initial GPU model in the GPU server;

[0090] A conversion submodule, used to convert the initial GPU model into a CPU conversion model using a conversion operation of a preset inference acceleration framework;

[0091] The deployment submodule is used to deploy the CPU conversion model to obtain an edge-side joint deployment model.

[0092] In this embodiment, the operations performed by the above modules, sub-modules or units or sub-units respectively correspond one-to-one to the steps of the method for processing OCR business data in the aforementioned implementation mode, and are not described in detail here.

[0093] In some optional implementations of this embodiment, after the conversion submodule, the OCR business data processing device 400 further includes:

[0094] A judgment submodule, used to judge whether the CPU conversion model accuracy meets a first preset accuracy value;

[0095] The execution submodule is used to execute the step of deploying the CPU conversion model to obtain the edge-side joint deployment model if the CPU conversion model accuracy meets the first preset accuracy value.

[0096] In this embodiment, the operations performed by the above modules, sub-modules or units or sub-units respectively correspond one-to-one to the steps of the method for processing OCR business data in the aforementioned implementation mode, and are not described in detail here.

[0097] In some optional implementations of this embodiment, after the determination submodule, the OCR business data processing device 400 further includes:

[0098] The adjustment submodule is used to adjust the size of the first preset accuracy value if the CPU conversion model accuracy does not meet the first preset accuracy value, and continue to perform the conversion operation using the preset inference acceleration framework to convert the initial GPU model into the CPU conversion model.

[0099] In some optional implementations of this embodiment, the deployment submodule further includes:

[0100] A quantization unit, used to quantize the CPU conversion model using a quantization operation of a preset inference acceleration framework to obtain a CPU quantization model;

[0101] The deployment unit is used to deploy the CPU quantization model to obtain an edge-side joint deployment model.

[0102] In this embodiment, the operations performed by the above modules, sub-modules or units or sub-units respectively correspond one-to-one to the steps of the method for processing OCR business data in the aforementioned implementation mode, and are not described in detail here.

[0103] In some optional implementations of this embodiment, after the quantization unit, the OCR business data processing device 400 further includes:

[0104] A judging unit, used to judge whether the CPU quantization model accuracy meets a second preset accuracy value;

[0105] The execution unit is used to execute the step of deploying the CPU quantization model to obtain the edge-side joint deployment model if the accuracy of the CPU quantization model meets the second preset accuracy value.

[0106] In this embodiment, the operations performed by the above modules, sub-modules or units or sub-units respectively correspond one-to-one to the steps of the method for processing OCR business data in the aforementioned implementation mode, and are not described in detail here.

[0107] In some optional implementations of this embodiment, after determining the submodule, the OCR business data processing device further includes:

[0108] The adjustment unit is used to adjust the size of the second preset precision value if the accuracy of the CPU quantization model does not meet the second preset precision value, and continue to perform the quantization operation using the preset inference acceleration framework to quantize the CPU conversion model to obtain the CPU quantization model.

[0109] In this embodiment, the operations performed by the above modules, sub-modules or units or sub-units respectively correspond one-to-one to the steps of the method for processing OCR business data in the aforementioned implementation mode, and are not described in detail here.

[0110] To solve the above technical problems, the present application also provides a computer device. Figure 5 , Figure 5 This is a basic structural block diagram of the computer device in this embodiment.

[0111] The computer device 5 includes a memory 51, a processor 52, and a network interface 53 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 5 having components 51-53, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0112] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.

[0113] The memory 51 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 51 can be an internal storage unit of the computer device 5, such as a hard disk or memory of the computer device 5. In other embodiments, the memory 51 can also be an external storage device of the computer device 5, such as a plug-in hard disk equipped on the computer device 5, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 51 can also include both the internal storage unit of the computer device 5 and its external storage device. In this embodiment, the memory 51 is generally used to store the operating system and various application software installed on the computer device 5, such as computer-readable instructions of the processing method of OCR business data, etc. In addition, the memory 51 can also be used to temporarily store various types of data that have been output or are to be output.

[0114] The processor 52 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 52 is generally used to control the overall operation of the computer device 5. In this embodiment, the processor 52 is used to run computer-readable instructions stored in the memory 51 or process data, such as computer-readable instructions for running a method for processing OCR business data.

[0115] The network interface 53 may include a wireless network interface or a wired network interface, and the network interface 53 is generally used to establish a communication connection between the computer device 5 and other electronic devices.

[0116] In this embodiment, the GPU model is deployed in the GPU server; the CPU model is deployed in the GPU server according to the GPU model to obtain the edge-side joint deployment model; when the edge-side joint deployment model processes the OCR business data, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, and the OCR business data after dimensionality reduction is transmitted to the CPU model. In this way, the GPU model and the CPU model can be jointly deployed, and the GPU and CPU resources can be fully utilized. At the same time, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, which can reduce the interaction of OCR business data between the CPU and the GPU, thereby greatly improving the processing speed of the edge-side joint deployment model, thereby improving the processing speed of the OCR reasoning deployment system, and further improving the OCR business TPS.

[0117] The present application also provides another implementation, namely, providing a computer-readable storage medium, which stores computer-readable instructions. The computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the OCR business data processing method as described above.

[0118] In this embodiment, the GPU model is deployed in the GPU server; the CPU model is deployed in the GPU server according to the GPU model to obtain the edge-side joint deployment model; when the edge-side joint deployment model processes the OCR business data, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, and the OCR business data after dimensionality reduction is transmitted to the CPU model. In this way, the GPU model and the CPU model can be jointly deployed, and the GPU and CPU resources can be fully utilized. At the same time, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, which can reduce the interaction of OCR business data between the CPU and the GPU, thereby greatly improving the processing speed of the edge-side joint deployment model, thereby improving the processing speed of the OCR reasoning deployment system, and further improving the OCR business TPS.

[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0120] Obviously, the embodiments described above are only a part of the embodiments of the present application, rather than all the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific embodiments, or to replace some of the technical features therein with equivalents. All equivalent structures made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, are similarly within the scope of patent protection of this application. The non-company software tools or components that appear in the embodiments of this application are merely examples and do not represent actual use.

Claims

1. A method for processing OCR business data, characterized in that: The steps include: Deploy GPU models in GPU servers; Deploy a CPU model in the GPU server according to the GPU model to obtain an edge-side joint deployment model; When the edge side joint deployment model processes the OCR business data, the OCR business data output by the GPU model is subjected to dimensionality reduction processing, and the OCR business data after dimensionality reduction is transmitted to the CPU model.

2. The method for processing OCR business data according to claim 1, characterized in that: The step of deploying the CPU model in the GPU server according to the GPU model to obtain the edge-side joint deployment model specifically includes: Obtaining an initial GPU model in the GPU server; Using a conversion operation of a preset inference acceleration framework, converting the initial GPU model into a CPU conversion model; The CPU conversion model is deployed to obtain an edge-side joint deployment model.

3. The method for processing OCR business data according to claim 2, characterized in that: After the step of converting the initial GPU model into a CPU conversion model using the conversion operation of the preset inference acceleration framework, the method further includes: Determine whether the CPU conversion model accuracy meets a first preset accuracy value; If the accuracy of the CPU conversion model meets the first preset accuracy value, the step of deploying the CPU conversion model to obtain an edge-side joint deployment model is performed.

4. The method for processing OCR business data according to claim 3, characterized in that: After the step of determining whether the accuracy of the CPU conversion model meets the first preset accuracy value, the method further includes: If the accuracy of the CPU conversion model does not meet the first preset accuracy value, the size of the first preset accuracy value is adjusted, and the conversion operation using the preset inference acceleration framework is continued to be performed to convert the initial GPU model into the CPU conversion model.

5. The method for processing OCR business data according to claim 2, characterized in that: The step of deploying the CPU conversion model to obtain an edge-side joint deployment model includes: Quantizing the CPU conversion model by using a quantization operation of a preset inference acceleration framework to obtain a CPU quantization model; The CPU quantization model is deployed to obtain an edge-side joint deployment model.

6. The method for processing OCR business data according to claim 5, characterized in that: After the step of quantizing the CPU model by using the quantization operation of the preset inference acceleration framework to obtain the CPU quantization model, the method further includes: Determine whether the CPU quantization model accuracy meets a second preset accuracy value; If the accuracy of the CPU quantization model meets the second preset accuracy value, the step of deploying the CPU quantization model to obtain an edge-side joint deployment model is executed.

7. The method for processing OCR business data according to claim 6, characterized in that: After the step of determining whether the accuracy of the CPU quantization model meets the second preset accuracy value, the method further includes: If the accuracy of the CPU quantization model does not meet the second preset accuracy value, the size of the second preset accuracy value is adjusted, and the quantization operation using the preset inference acceleration framework is continued to be performed to quantize the CPU conversion model to obtain the CPU quantization model step.

8. A device for processing OCR business data, characterized in that: include: A first deployment module is used to deploy a GPU model in a GPU server; A second deployment module is used to deploy a CPU model in the GPU server according to the GPU model to obtain an edge-side joint deployment model; The processing module is used to perform dimensionality reduction processing on the OCR business data output by the GPU model when the edge side joint deployment model processes the OCR business data, and transmit the reduced dimensionality OCR business data to the CPU model.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the method for processing OCR business data according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the method for processing OCR business data according to any one of claims 1 to 7 are implemented.