CN114513583A - Compression uploading method, device, equipment and medium of image data - Google Patents

Compression uploading method, device, equipment and medium of image data Download PDF

Info

Publication number
CN114513583A
CN114513583A CN202210135318.5A CN202210135318A CN114513583A CN 114513583 A CN114513583 A CN 114513583A CN 202210135318 A CN202210135318 A CN 202210135318A CN 114513583 A CN114513583 A CN 114513583A
Authority
CN
China
Prior art keywords
target
image data
compression algorithm
data
uploading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210135318.5A
Other languages
Chinese (zh)
Other versions
CN114513583B (en
Inventor
林蓬捷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202210135318.5A priority Critical patent/CN114513583B/en
Publication of CN114513583A publication Critical patent/CN114513583A/en
Application granted granted Critical
Publication of CN114513583B publication Critical patent/CN114513583B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00127Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture
    • H04N1/00204Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture with a digital computer or a digital computer system, e.g. an internet server
    • H04N1/00209Transmitting or receiving image data, e.g. facsimile data, via a computer, e.g. using e-mail, a computer network, the internet, I-fax
    • H04N1/00222Transmitting or receiving image data, e.g. facsimile data, via a computer, e.g. using e-mail, a computer network, the internet, I-fax details of image data generation or reproduction, e.g. scan-to-email or network printing
    • H04N1/00228Image push arrangements, e.g. from an image reading device to a specific network destination
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00127Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture
    • H04N1/00204Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture with a digital computer or a digital computer system, e.g. an internet server
    • H04N1/00244Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture with a digital computer or a digital computer system, e.g. an internet server with a server, e.g. an internet server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/04Scanning arrangements, i.e. arrangements for the displacement of active reading or reproducing elements relative to the original or reproducing medium, or vice versa
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/21Intermediate information storage
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/41Bandwidth or redundancy reduction

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for compressing and uploading image data. The method is executed by an application end and comprises the steps that a scanning tool carries out electronic scanning on target data to obtain image data matched with the target data; determining a target compression algorithm adapted to the image data in the alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application end; compressing the image data by adopting a target compression algorithm to obtain target compressed image data; and uploading the target compressed image data to a server corresponding to the application terminal. The technical scheme of the embodiment of the invention provides a new technology for determining the optimal algorithm in the alternative compression algorithms and ensuring the performance of the whole compression uploading process to be optimal.

Description

Compression uploading method, device, equipment and medium of image data
Technical Field
The present invention relates to computer technologies, and in particular, to a method, an apparatus, a device, and a medium for compressing and uploading image data.
Background
In each business service field, image data collection and supplement are necessary steps, not only for verifying the authenticity of information of a client, but also for better guaranteeing the rights and interests of the client.
Generally, after acquiring client data, for example, an identification document of a user, or various data filled by the user, service personnel needs to scan the client data, compress a scanning result, and upload the compressed result to a matched backend server for subsequent core service processing. At present, a compression algorithm is determined by business personnel according to experience or a random selection mode, and a scanning result of client data is compressed based on the compression algorithm.
The operation terminals and operation systems used by different business personnel are different, the network environment is also different, how to determine the optimal algorithm in the alternative compression algorithms and ensure that the performance of the whole compression uploading process reaches the best compromise of effectiveness and reliability is an important problem to be solved at present.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for compressing and uploading image data, and provides a new technology for determining an optimal algorithm in alternative compression algorithms and ensuring that the performance of the whole compression and uploading process is optimal.
In a first aspect, an embodiment of the present invention provides a method for compressing and uploading image data, which is executed by an application end, where the method includes:
carrying out electronic scanning on target data through a scanning tool to obtain image data matched with the target data;
determining a target compression algorithm adapted to the image data in an alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application terminal;
compressing the image data by adopting the target compression algorithm to obtain target compressed image data;
and uploading the target compressed image data to a server corresponding to the application terminal.
In a second aspect, an embodiment of the present invention further provides an apparatus for compressing and uploading image data, where the apparatus is executed by an application, and the apparatus includes:
the image data acquisition module is used for electronically scanning target data through a scanning tool to acquire image data matched with the target data;
a compression algorithm determining module, configured to determine, in an alternative compression algorithm set, a target compression algorithm to which the image data is adapted according to a data type of the target data and at least one item of configuration description information of the application terminal;
the compressed image data acquisition module is used for compressing the image data by adopting the target compression algorithm to obtain target compressed image data;
and the compressed image data uploading module is used for uploading the target compressed image data to a server corresponding to the application terminal.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
storage means for storing one or more computer programs;
when the one or more computer programs are executed by the one or more processors, the one or more processors implement the method for compressing and uploading image data according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for compressing and uploading image data according to any embodiment of the present invention.
The embodiment of the invention carries out electronic scanning on target data through a scanning tool to obtain image data matched with the target data; determining a target compression algorithm adapted to the image data in the alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application end; compressing the image data by adopting a target compression algorithm to obtain target compressed image data; the method and the device have the advantages that the target compressed image data are uploaded to the server corresponding to the application end, the problem that in the prior art, due to the fact that operation terminals and operation systems used by different business personnel are different, and network environments are different, the optimal algorithm is not easy to determine in alternative compression algorithms is solved, the novel technology for determining the optimal algorithm in the alternative compression algorithms is provided, and the performance of the whole compression uploading process is guaranteed to be optimal.
Drawings
Fig. 1 is a flowchart illustrating a method for compressing and uploading image data according to an embodiment of the present invention;
fig. 2A is a flowchart of another method for compressing and uploading image data according to a second embodiment of the present invention;
fig. 2B is a schematic view of a specific application scenario of a method for compressing and uploading image data according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a compression uploading apparatus of image data according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a method for compressing and uploading image data according to an embodiment of the present invention, which is applicable to the case of compressing and uploading different image data through different platforms, and the method can be executed by an application. The method can be executed by a device for compressing and uploading image data, the device can be implemented by software and/or hardware, and can be generally integrated in a client or a server, and the method specifically comprises the following steps:
s110, carrying out electronic scanning on target data through a scanning tool to obtain image data matched with the target data.
The application may refer to a service application installed on a terminal device (e.g., a mobile phone, a tablet computer, or a desktop computer) used by a service staff, where the service application is used to implement a set service function.
Taking the service as an insurance service as an example, correspondingly, the application terminal may be an insurance service application program for providing insurance service functions, such as disease insurance, vehicle insurance, accident insurance, and the like. Or, the application terminal may also be a functional plug-in installed in the service application program, and is used to implement the function of compressing and uploading image data in a centralized manner.
The scanning tool refers to a hardware scanning tool for forming a paper document into an electronic image, for example, a scanner or a high-precision camera. The application end establishes communication connection with the scanning tool, and can convert the target data of the paper edition into image data in an electronic image form.
The target data can refer to any form of paper data. The image data may be electronic data obtained by converting paper-based target data by a scanning tool.
In this embodiment, the target data may be scanned by a scanning tool to obtain image data in electronic form, which is matched with the target data.
S120, determining a target compression algorithm adapted to the image data in an alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application terminal.
The alternative compression algorithm set may be a pre-constructed algorithm set including a plurality of alternative compression algorithms, and each alternative compression algorithm may achieve different compression results, for example, different alternative compression algorithms may have different compression rates (data amount after image data compression divided by data amount before compression).
The target compression algorithm may be a compression algorithm selected from a set of alternative compression algorithms that is adapted to the currently processed image data.
The profile types of the target profile may include: identity cards, driver's licenses, medical bills, various auxiliary certification documents and the like. It will be appreciated that different types of material require different image clarity requirements, for example identification documents such as identification cards or driver licenses require sufficient clarity in both the head image and the ID number, whereas some auxiliary documents may require only a clear signature portion. Therefore, when determining the target compression algorithm, the data type of the target data is used as a reference factor, and a target compression algorithm with a suitable compression rate is selected for the target data.
The data type of the target data may be manually entered by a user of the application end to enable the application end to know the data type, or after the application end scans image data matched with the target data, text content in the target data may be identified through an Optical Character Recognition (OCR) technique, and the data type of the target data is determined according to an identification result.
The configuration description information of the application end may include: software configuration information, hardware configuration information, and network environment information.
More specifically, the software configuration information may be information such as the type and version of the application and the type and version of an operating system adapted to the terminal device that installs the service application.
The hardware configuration information may be information such as a model of a scanning tool, a model of a terminal device in which the service application terminal is installed, a memory, and CPU performance. As mentioned above, the lower the compression rate of a compression algorithm is, the higher the configuration requirement for the terminal device or the application terminal is, so that when selecting the target compression algorithm, the software configuration information and the hardware configuration information can be simultaneously used as an important reference to reasonably determine the target compression algorithm on the basis of reasonably utilizing various configuration information of the terminal device or the application terminal.
The network environment information may be information of network speed, bandwidth, packet loss rate, and the like of a network to which the application terminal is currently connected. It can be understood that, when the network environment is good, for example, the network speed or bandwidth is sufficient, an algorithm with a higher compression rate may be selected to compress the image data, so as to ensure that the backend server receives a better quality electronic image; on the contrary, when the network environment is poor, an algorithm with a low compression rate can be selected to compress the image data, so that unnecessary occupation of limited network resources is reduced.
Optionally, after the image data of the target data of the paper edition is acquired by the scanning tool, the target compression algorithm adapted to the image data may be determined from the alternative compression algorithm set according to the data type of the target data and by combining the configuration description information of the application terminal.
Generally, in order to ensure image details to the maximum extent, a scanning tool generally adopts high-definition scanning, and then the image data obtained by scanning generally has a large data volume, which is not beneficial to direct storage and transmission. Therefore, before uploading the video data to the backend server for core service processing, the video data needs to be subjected to image compression processing first.
Accordingly, in the present embodiment, a new way for determining a target compression algorithm adapted to the image data according to a data type of target data and at least one configuration description information of the application is creatively proposed, so that the image data can be transmitted with a minimum data size on the premise of ensuring a minimum definition requirement for the image data.
In this embodiment, a candidate compression algorithm set may be built in the application end, where the candidate compression algorithm set includes multiple candidate compression algorithms, and different candidate compression algorithms have different compression rates.
Wherein, each alternative compression algorithm included in the alternative compression algorithm set may include: a huffman coding based compression algorithm, a predictive coding based compression algorithm, a string table compression algorithm, an algorithm coding based compression algorithm, a transform coding based compression algorithm, etc., which are not limited in this embodiment.
Specifically, when the same electronic image is compressed, the lower the compression rate of one compression algorithm, the smaller the data amount of the compressed result obtained after compression, and accordingly, the higher the compression difficulty of the compression algorithm, or the higher the requirements on software and hardware may be.
In this embodiment, different adaptive compression algorithm sets may be set in advance for different data types and different configuration description information, and further, by comparing the adaptive compression algorithm sets corresponding to the data types and the configuration description information of the image data, a compression algorithm with the largest occurrence number is screened out as the target compression algorithm.
For example, if it is determined that the data type of the image data is "identification card", the set of adaptive compression algorithms corresponding to the "identification card" is: "alternative compression algorithm 1, alternative compression algorithm 2, and alternative compression algorithm 3"; in addition, the set of adaptive compression algorithms corresponding to configuration description information 1 is: "alternative compression algorithm 2, alternative compression algorithm 3, and alternative compression algorithm 4" and the set of adaptive compression algorithms corresponding to the configuration description information 2 are: "alternative compression algorithm 1 and alternative compression algorithm 3".
By performing intersection processing on the three adaptive compression algorithm sets, the alternative compression algorithm 3 can be determined as the target compression algorithm.
In an optional implementation manner of this embodiment, determining, in the alternative compression algorithm set, a target compression algorithm to which the image data is adapted according to the material type of the target material and the at least one item of configuration description information of the application end may include: and determining a target compression algorithm adapted to the image data according to the data type of the target data, at least one item of configuration description information of the application end and a labeled sample set obtained by pre-labeling.
Wherein, each labeled sample of the labeled sample set comprises: the standard data type, at least one item of standard configuration description information and a matched standard compression algorithm, wherein the standard compression algorithm is one compression algorithm in the alternative compression algorithm set. The labeled sample set may refer to a target data sample set labeled with an adaptive compression algorithm. The standard material type may refer to a predetermined type of target material. The standard configuration description information may refer to configuration description information (which may include software configuration information, hardware configuration information, network environment information, and the like) adapted to the target material. The standard compression algorithm may refer to an optimal compression algorithm that is adapted to the target material.
And S130, compressing the image data by adopting the target compression algorithm to obtain target compressed image data.
The target compressed image data may be image data obtained by compressing image data by a selected target compression algorithm.
Specifically, the acquired image data may be compressed according to a selected target compression algorithm, and the compressed image data may be determined as target compressed image data.
And S140, uploading the target compressed image data to a server corresponding to the application terminal.
The server may refer to a terminal server that stores target compressed image data obtained by scanning initial target data, and the server is generally matched with a plurality of application terminals of different service types, and on the server, key processing, such as identification or authentication, matched with an actual service type may be performed on the target compressed image data.
In this embodiment, the application end may directly upload the target compressed image data to the server in a synchronous upload mode after generating the target compressed image data, and may also upload the target compressed image data to the server by using an asynchronous upload method when meeting a data upload condition, which is not limited in this embodiment.
Accordingly, in an optional implementation manner of this embodiment, uploading the target compressed image data to a server corresponding to the application end may include:
the target compressed image data is cached locally at the application end, and the target compressed image data is asynchronously uploaded to the server when the uploading time interval matched with the application end is met; the server configures different uploading time intervals for application terminals providing different business services in advance.
The uploading time interval may be a time interval for the application terminals of different business services to upload the compressed image data, which is configured in advance by the server.
Optionally, when the target compressed image data is acquired and uploaded to the server, whether the uploading time interval configured by the server is met or not can be judged; if the time interval meets the uploading time interval, the target compressed image data is uploaded to the server.
Taking insurance service as an example, since insurance service includes multiple business services, if multiple application terminals of each business service can upload compressed image data to the server without limitation, there is a high probability of causing sudden peak bandwidth occupation, and further, problems such as short uploading failure or rapid decrease in uploading speed may occur. Based on this, the server may configure different upload time intervals for different business services, for example, the server may configure the upload time interval of the property insurance business to be 9: 00 to 11: 00, the uploading time interval of the personal insurance service is 13: 00 to 15: 00, etc.
The method has the advantages that the working pressure of the server can be relieved, so that different types of application terminals for providing different business services can upload target compressed image data obtained by compression to the server in different time intervals.
According to the technical scheme of the embodiment, the target data are electronically scanned through a scanning tool, and image data matched with the target data are acquired; determining a target compression algorithm adapted to the image data in the alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application end; compressing the image data by adopting a target compression algorithm to obtain target compressed image data; the method and the device have the advantages that the target compressed image data are uploaded to the server corresponding to the application end, the problem that in the prior art, due to the fact that operation terminals and operation systems used by different business personnel are different, and network environments are different, the optimal algorithm is not easy to determine in alternative compression algorithms is solved, the novel technology for determining the optimal algorithm in the alternative compression algorithms is provided, and the performance of the whole compression uploading process is guaranteed to be optimal.
Optionally, in addition to the data type of the target data and the configuration description information of the application terminal, a target compression algorithm adapted to the image data may be determined from the alternative compression algorithm set by combining a pre-labeled sample set.
Correspondingly, on the basis of the foregoing embodiments, determining a target compression algorithm adapted to the image data according to the data type of the target data, at least one item of configuration description information of the application end, and a labeled sample set obtained by labeling in advance may include:
inputting the data type of the target data and at least one item of configuration description information of the application end into a pre-trained compression algorithm recognition model, and acquiring the target compression algorithm output by the compression algorithm recognition model.
And the compression algorithm recognition model is obtained by using the labeled sample set for training in advance.
In this embodiment, a compression algorithm recognition model may be obtained by pre-training according to a labeled sample labeled with a relationship among the data type, the at least one item of configuration description information, and the matched compression algorithm, and a target compression algorithm adapted to the image data may be obtained by inputting the data type of the target data and the at least one item of configuration description information of the application terminal into the compression algorithm recognition model.
In this embodiment, each labeled sample set may be trained in advance to obtain a compression algorithm recognition model, and based on the compression algorithm recognition model, a target compression algorithm adapted to the image data is determined.
Or, the labeled samples can be classified according to the standard compression algorithm labeled in each labeled sample, and the same type of labeled sample corresponds to the same standard compression algorithm.
Furthermore, the common characteristics of each standard data type and at least one item of standard configuration description information in the same type of labeled sample can be abstracted and used as the standard sample characteristics of each type of labeled sample.
Furthermore, by calculating the similarity between the data type of the target data, the at least one item of configuration description information of the application end and the standard sample feature of each type of labeled sample, the standard compression algorithm corresponding to the standard sample feature with the maximum similarity can be selected as the target compression algorithm.
Example two
Fig. 2A is a flowchart of another method for compressing and uploading image data according to a second embodiment of the present invention. On the basis of the foregoing embodiments, the present embodiment preferably further refines the operation of determining the target compression algorithm adapted to the image data in an alternative compression algorithm set according to the material type of the target material and at least one item of configuration description information of the application end, and specifically includes the following steps:
s210, carrying out electronic scanning on target data through a scanning tool to obtain image data matched with the target data.
In an optional implementation manner of this embodiment, the electronically scanning the target data by the scanning tool to obtain the image data matched with the target data may include:
responding to a compression uploading application request, and acquiring a software environment of a target terminal adapted to the application terminal; in a standardized compatible plug-in, acquiring a connecting component matched with the software environment, and establishing communication connection with the scanning tool by using the connecting component; after the communication connection is finished, triggering the scanning tool to carry out electronic scanning on target data, and acquiring image data matched with the target data; and in the standardized compatible plug-in, acquiring a rendering component matched with the software environment, and rendering the image data to a display screen of the target terminal for display by using the rendering component.
The compressed uploading application request may be a request for uploading compressed target data to a server. The target terminal may be a terminal device according to the application, for example, an electronic device such as a mobile phone or a tablet. The software environment may refer to a software running environment of the target terminal, for example, an operating system (e.g., an android operating system, or an iOS operating system, etc.) installed in the target terminal, or some functional plug-ins need to be run jointly when the application runs on the target terminal. The standardized compatible plug-ins may refer to some programs necessary for the scanning tool to establish a communication connection with the application terminal, and may include connection plug-ins and rendering components suitable for various software environments (e.g., android system, ios system, Windows system, and the like). The connection component may be a program, such as a driver, for enabling communication between the application and the scan tool. The rendering component may refer to a component that generates the imagery data into an image that may be presented in a display screen of the target terminal.
Specifically, when the application terminal receives a compressed uploading application request, the application terminal responds to the request to acquire a software environment of a target terminal adapted to the application terminal; and selecting a connecting component matched with the software environment of the target terminal from the standardized compatible plug-ins, so that the communication connection between the application terminal and the scanning tool can be established through the connecting component. After the communication connection is successfully established, scanning the target data through a scanning tool to obtain image data, further selecting a rendering component matched with the software environment of the target terminal from the standardized compatible plug-in, and displaying the image data in a display screen of the target terminal by using the rendering component.
For different application terminals, when collecting client data, because a plurality of platforms exist, and each insurance system realizes the difference of programming languages. The compatibility of each platform, how the video is compressed to occupy the minimum bandwidth, and the requirement of high availability of the video system are important.
S220, identifying at least one item of key business information in the image data according to the data type of the target data.
The key service information of the image data may refer to information included in the image data that can clearly indicate the content of the target material, and taking the material type of the image data as an "identity card" as an example, the key service information that needs to be identified in the image data may include: face image, ID card number and issuing authority.
Optionally, after the image data is acquired by the scanning tool, whether the key service information in the image data is clear and complete may be firstly identified. Specifically, according to the data type of the target data, the key business information of the scanned image data is identified.
S230, if all the key service information is identified, determining a target compression algorithm adapted to the image data in an alternative compression algorithm set according to the material type of the target material and at least one item of configuration description information of the application terminal.
Specifically, if all the key service information can be identified from the image data, the target compression algorithm adapted to the image data can be determined in the alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application terminal, so as to compress the image data.
Correspondingly, if it is determined that all key business information cannot be identified, business personnel using the application end need to perform electronic scanning on the target data again in a scene more suitable for image scanning, or a user requiring insurance business provides clearer target data again.
The method has the advantages that the result of the scanned target data is checked in time, and the subsequent compression work can be guaranteed to be carried out smoothly.
S240, compressing the image data by adopting the target compression algorithm to obtain target compressed image data.
And S250, uploading the target compressed image data to a server corresponding to the application terminal.
In an optional implementation manner of this embodiment, uploading the target compressed image data to a server corresponding to the application end may include:
identifying at least one item of key business information in the target compressed image data according to the data type of the target data; if all key business information is identified, uploading the target compressed image data to a server corresponding to the application end; if all key service information cannot be identified, screening a high-quality compression algorithm set with a compression ratio higher than that of the target compression algorithm in the alternative compression algorithm set; sequentially acquiring target high-quality compression algorithms from the high-quality compression algorithm set according to the sequence of compression ratios from low to high; and compressing the image data by adopting the target high-quality compression algorithm, updating the compression result into the current target compressed image data, and returning to execute the operation of identifying at least one item of key service information in the target compressed image data until the successful uploading of the current target compressed image data is completed.
The key service information of the target compressed image data may refer to information contained in the target compressed image data, such as portrait information in an identification card or identification number information in the identification card, which may explicitly indicate content of target data. The high-quality compression algorithm set may refer to a set of compression algorithms having a compression rate higher than that of a target compression algorithm corresponding to the current target compressed image data. The set of high quality compression algorithms may be a subset of the alternative compression algorithms. The target high-quality compression algorithm may be an algorithm selected from a high-quality compression set to compress the image data again.
Optionally, after the target compressed image data is obtained, it is further required to check whether the key information in the compressed initial image data is clear and complete. Key business information in the corresponding target compressed image data can be identified according to the type of the target data; if it is determined that all critical information corresponding to the target profile matches can be identified from the target compressed image data, the target compressed image data can be uploaded to a server for storage.
Correspondingly, if all the key service information cannot be identified, the compression algorithm can be reselected to compress the image data. Specifically, a high-quality compression algorithm set can be obtained by screening from the alternative compression algorithm set by using a compression ratio higher than a currently used target compression algorithm as a standard, and algorithms are sequentially obtained from the high-quality compression algorithm set as the target high-quality compression algorithm according to the sequence from low to high of the compression ratio; and then, according to the target high-quality compression algorithm, carrying out compression processing on the current image data again, updating the compression result into the current target compressed image data, and returning to execute key service information identification operation again until the result of the compressed current image data is successfully uploaded to the server.
The image data compression method has the advantages that the image data compression method is matched with the key business information identification operation on the image data, the complete definition degree of the compressed target data can be ensured, the target data information can be stored in a higher-quality and more real-time mode, and the data of the target data becomes more complete.
In this embodiment, the compression algorithm recognition model is built in the application terminal, wherein the initialized compression algorithm recognition model is obtained by training of a uniform background server and then is issued to the application terminals of business personnel of different businesses.
Correspondingly, after each application end finally finishes the successful uploading of the target compressed image data, if the currently uploaded target compressed image data is determined to be obtained by compressing a target high-quality compression algorithm, a new training sample can be constructed according to the target high-quality compression algorithm, the data type of the target data and at least one item of configuration description information of the application end, and the compression algorithm identification models in the matched application ends are finely adjusted, so that each compression algorithm identification model can be accurately matched with the application end, and the compression service of the image data is accurately and efficiently provided.
According to the technical scheme of the embodiment, target data are electronically scanned through a scanning tool, and image data matched with the target data are acquired; identifying at least one item of key business information in the image data according to the data type of the target data; if all the key business information is identified, determining a target compression algorithm adapted to the image data in the alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application end; compressing the image data by adopting a target compression algorithm to obtain target compressed image data; the method and the device have the advantages that the target compressed image data are uploaded to the server corresponding to the application end, the problem that in the prior art, due to the fact that operation terminals and operation systems used by different business personnel are different, and network environments are different, the optimal algorithm is not easy to determine in alternative compression algorithms is solved, the novel technology for determining the optimal algorithm in the alternative compression algorithms is provided, and the performance of the whole compression uploading process is guaranteed to be optimal.
Fig. 2B is a schematic view of a specific application scenario of a method for compressing and uploading image data according to a second embodiment of the present invention.
Image scanning: the business personnel scan the paper target data through a scanning tool to obtain image data;
data acquisition: acquiring the operating system and network bandwidth data of the used application end in real time in advance, and storing the data into a local cache;
sample data extraction: cleaning the operating system and the network bandwidth data by utilizing machine learning and feature extraction technologies, then performing random sampling analysis to obtain sample data, and simultaneously supporting the distributed support of an intranet environment and locally performing data sharing;
modeling a compression algorithm: performing algorithm modeling by using machine learning algorithms such as a decision tree and a random forest to generate a compression algorithm recognition model;
image processing: when a compression algorithm of the image data is determined through a compression algorithm identification model, fuzzy verification (namely key business information identification) is carried out on the image data, if the image data is fuzzy, business personnel are informed in real time, and a user is informed; if all key business information of the image data is clear and complete, determining a target compression algorithm for compressing the image data according to the compression algorithm identification model, and compressing the image data;
uploading a compressed image: the compressed image data (i.e., the target compressed image data) is uploaded to a core system (i.e., a server) in an asynchronous uploading manner.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a compression uploading apparatus of image data according to a third embodiment of the present invention. Executed by an application, the apparatus comprising: an image data acquisition module 310, a compression algorithm determination module 320, a compressed image data acquisition module 330, and a compressed image data upload module 340. Wherein:
an image data acquiring module 310, configured to perform electronic scanning on target data through a scanning tool, and acquire image data matched with the target data;
a compression algorithm determining module 320, configured to determine, in an alternative compression algorithm set, a target compression algorithm adapted to the image data according to the data type of the target data and at least one item of configuration description information of the application end;
a compressed image data obtaining module 330, configured to perform compression processing on the image data by using the target compression algorithm to obtain target compressed image data;
the compressed image data uploading module 340 is configured to upload the target compressed image data to a server corresponding to the application terminal.
According to the technical scheme of the embodiment, the target data are electronically scanned through a scanning tool, and image data matched with the target data are acquired; determining a target compression algorithm adapted to the image data in the alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application end; compressing the image data by adopting a target compression algorithm to obtain target compressed image data; the method and the device have the advantages that the target compressed image data are uploaded to the server corresponding to the application end, the problem that in the prior art, due to the fact that operation terminals and operation systems used by different business personnel are different, and network environments are different, the optimal algorithm is not easy to determine in alternative compression algorithms is solved, the novel technology for determining the optimal algorithm in the alternative compression algorithms is provided, and the performance of the whole compression uploading process is guaranteed to be optimal.
In the foregoing apparatus, optionally, the compression algorithm determining module 320 may include:
a compression algorithm determining subunit, configured to determine a target compression algorithm adapted to the image data according to a data type of the target data, at least one item of configuration description information of the application end, and a labeled sample set obtained by pre-labeling;
wherein, each labeled sample of the labeled sample set comprises: the standard data type, at least one item of standard configuration description information and a matched standard compression algorithm, wherein the standard compression algorithm is one compression algorithm in the alternative compression algorithm set.
In the above apparatus, optionally, the compression algorithm determining subunit may be specifically configured to:
inputting the data type of the target data and at least one item of configuration description information of the application end into a pre-trained compression algorithm recognition model, and acquiring the target compression algorithm output by the compression algorithm recognition model;
and the compression algorithm recognition model is obtained by using the labeled sample set for training in advance.
In the above apparatus, optionally, the compression algorithm determining module 320 may be further specifically configured to:
identifying at least one item of key business information in the image data according to the data type of the target data;
and if all the key service information is determined to be identified, determining a target compression algorithm adapted to the image data in an alternative compression algorithm set according to the material type of the target material and at least one item of configuration description information of the application terminal.
In the above apparatus, optionally, the compressed image data uploading module 330 may be specifically configured to:
identifying at least one item of key business information in the target compressed image data according to the data type of the target data;
if all key service information is determined to be identified, uploading the target compressed image data to a server corresponding to the application end;
if all key service information cannot be identified, screening a high-quality compression algorithm set with a compression ratio higher than that of the target compression algorithm in the alternative compression algorithm set;
sequentially acquiring target high-quality compression algorithms from the high-quality compression algorithm set according to the sequence of compression ratios from low to high;
and compressing the image data by adopting the target high-quality compression algorithm, updating the compression result into the current target compressed image data, and returning to execute the operation of identifying at least one item of key service information in the target compressed image data until the successful uploading of the current target compressed image data is completed.
In the above apparatus, optionally, the compressed image data uploading module 330 may be further specifically configured to:
the target compressed image data is cached locally at the application end, and the target compressed image data is asynchronously uploaded to the server when the uploading time interval matched with the application end is met;
the server configures different uploading time intervals for application terminals providing different business services in advance.
In the above apparatus, optionally, the image data obtaining module 310 may be specifically configured to:
responding to a compression uploading application request, and acquiring a software environment of a target terminal adapted to the application terminal;
in a standardized compatible plug-in, acquiring a connecting component matched with the software environment, and establishing communication connection with the scanning tool by using the connecting component;
after the communication connection is finished, triggering the scanning tool to carry out electronic scanning on target data, and acquiring image data matched with the target data;
and in the standardized compatible plug-in, acquiring a rendering component matched with the software environment, and rendering the image data to a display screen of the target terminal for display by using the rendering component.
The image data compression and uploading device provided by the embodiment of the invention can execute the image data compression and uploading method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of an electronic apparatus according to a fourth embodiment of the present invention, as shown in fig. 4, the electronic apparatus includes a processor 410, a storage device 420, an input device 430, and an output device 440; the number of processors 410 in the device may be one or more, and one processor 410 is taken as an example in fig. 4; the processor 410, the storage 420, the input 430 and the output 440 of the apparatus may be connected by a bus or other means, as exemplified by the bus connection in fig. 4.
The storage device 420 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the method for compressing and uploading image data according to the embodiments of the present invention (for example, the image data obtaining module 310, the compression algorithm determining module 320, the compressed image data obtaining module 330, and the compressed image data uploading module 340 in the device for compressing and uploading image data). The processor 410 executes software programs, instructions and modules stored in the storage device 420 to execute various functional applications and data processing of the device, that is, to implement the above-mentioned method for compressing and uploading image data, where the method is executed by an application end and may include:
carrying out electronic scanning on target data through a scanning tool to obtain image data matched with the target data;
determining a target compression algorithm adapted to the image data in an alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application terminal;
compressing the image data by adopting the target compression algorithm to obtain target compressed image data;
and uploading the target compressed image data to a server corresponding to the application terminal.
The storage device 420 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 420 may further include memory located remotely from the processor 410, which may be connected to the appliance over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the apparatus. The output device 440 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to execute a method for compressing and uploading image data, where the method is executed by an application, and the method may include:
carrying out electronic scanning on target data through a scanning tool to obtain image data matched with the target data;
determining a target compression algorithm adapted to the image data in an alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application terminal;
compressing the image data by adopting the target compression algorithm to obtain target compressed image data;
and uploading the target compressed image data to a server corresponding to the application terminal.
Of course, the computer program of the computer-readable storage medium provided in the embodiment of the present invention is not limited to the method operations described above, and may also perform related operations in the method for compressing and uploading image data provided in any embodiment of the present invention, where the method is performed by an application, and the method may include:
carrying out electronic scanning on target data through a scanning tool to obtain image data matched with the target data;
determining a target compression algorithm adapted to the image data in an alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application terminal;
compressing the image data by adopting the target compression algorithm to obtain target compressed image data;
and uploading the target compressed image data to a server corresponding to the application terminal.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, an application device, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the apparatus for compressing and uploading image data, the units and modules included in the apparatus are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for compressing and uploading image data, which is executed by an application terminal, is characterized by comprising the following steps:
carrying out electronic scanning on target data through a scanning tool to obtain image data matched with the target data;
determining a target compression algorithm adapted to the image data in an alternative compression algorithm set according to the data type of the target data and at least one item of configuration description information of the application terminal;
compressing the image data by adopting the target compression algorithm to obtain target compressed image data;
and uploading the target compressed image data to a server corresponding to the application terminal.
2. The method of claim 1, wherein determining a target compression algorithm to which the image data is adapted in an alternative compression algorithm set according to a material type of the target material and at least one configuration description information of the application comprises:
determining a target compression algorithm adapted to the image data according to the data type of the target data, at least one item of configuration description information of the application end and a labeled sample set obtained by pre-labeling;
wherein, each labeled sample of the labeled sample set comprises: the standard data type, at least one item of standard configuration description information and a matched standard compression algorithm, wherein the standard compression algorithm is one compression algorithm in the alternative compression algorithm set.
3. The method of claim 2, wherein determining the target compression algorithm adapted to the image data according to the data type of the target data, the at least one item of configuration description information of the application end, and a labeled sample set obtained by labeling in advance comprises:
inputting the data type of the target data and at least one item of configuration description information of the application end into a pre-trained compression algorithm recognition model, and acquiring the target compression algorithm output by the compression algorithm recognition model;
and the compression algorithm recognition model is obtained by using the labeled sample set for training in advance.
4. The method of claim 1, wherein determining a target compression algorithm to which the image data is adapted in an alternative compression algorithm set according to a material type of the target material and at least one configuration description information of the application comprises:
identifying at least one item of key business information in the image data according to the data type of the target data;
and if all the key service information is determined to be identified, determining a target compression algorithm adapted to the image data in an alternative compression algorithm set according to the material type of the target material and at least one item of configuration description information of the application terminal.
5. The method of claim 4, wherein uploading the target compressed image data to a server corresponding to the application terminal comprises:
identifying at least one item of key business information in the target compressed image data according to the data type of the target data;
if all key business information is identified, uploading the target compressed image data to a server corresponding to the application end;
if all key service information cannot be identified, screening a high-quality compression algorithm set with a compression ratio higher than that of the target compression algorithm in the alternative compression algorithm set;
sequentially acquiring target high-quality compression algorithms from the high-quality compression algorithm set according to the sequence of compression ratios from low to high;
and compressing the image data by adopting the target high-quality compression algorithm, updating the compression result into the current target compressed image data, and returning to execute the operation of identifying at least one item of key service information in the target compressed image data until the successful uploading of the current target compressed image data is completed.
6. The method of claim 1, wherein uploading the target compressed image data to a server corresponding to the application comprises:
the target compressed image data is cached locally at the application end, and the target compressed image data is asynchronously uploaded to the server when the uploading time interval matched with the application end is met;
the server configures different uploading time intervals for application terminals providing different business services in advance.
7. The method of claim 1, wherein electronically scanning a target material with a scanning tool to obtain image data matching the target material comprises:
responding to a compression uploading application request, and acquiring a software environment of a target terminal adapted to the application terminal;
in a standardized compatible plug-in, acquiring a connecting component matched with the software environment, and establishing communication connection with the scanning tool by using the connecting component;
after the communication connection is finished, triggering the scanning tool to carry out electronic scanning on target data, and acquiring image data matched with the target data;
and in the standardized compatible plug-in, acquiring a rendering component matched with the software environment, and rendering the image data to a display screen of the target terminal for display by using the rendering component.
8. An apparatus for compressing and uploading image data, executed by an application, the apparatus comprising:
the image data acquisition module is used for electronically scanning target data through a scanning tool to acquire image data matched with the target data;
a compression algorithm determining module, configured to determine, in an alternative compression algorithm set, a target compression algorithm to which the image data is adapted according to a data type of the target data and at least one item of configuration description information of the application terminal;
the compressed image data acquisition module is used for compressing the image data by adopting the target compression algorithm to obtain target compressed image data;
and the compressed image data uploading module is used for uploading the target compressed image data to a server corresponding to the application terminal.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
storage means for storing one or more computer programs;
when executed by the one or more processors, cause the one or more processors to implement the method for compressed uploading of image data according to any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the method for compressing and uploading image data according to any one of claims 1 to 7.
CN202210135318.5A 2022-02-14 2022-02-14 Compression uploading method, device, equipment and medium for image data Active CN114513583B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210135318.5A CN114513583B (en) 2022-02-14 2022-02-14 Compression uploading method, device, equipment and medium for image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210135318.5A CN114513583B (en) 2022-02-14 2022-02-14 Compression uploading method, device, equipment and medium for image data

Publications (2)

Publication Number Publication Date
CN114513583A true CN114513583A (en) 2022-05-17
CN114513583B CN114513583B (en) 2023-12-19

Family

ID=81552492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210135318.5A Active CN114513583B (en) 2022-02-14 2022-02-14 Compression uploading method, device, equipment and medium for image data

Country Status (1)

Country Link
CN (1) CN114513583B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050175249A1 (en) * 2004-02-06 2005-08-11 Ferlitsch Andrew R. Systems and methods for mixed raster conversion in direct printing
CN1984330A (en) * 2005-06-25 2007-06-20 通用电气公司 Adaptive video compression of graphical user interfaces using application metadata
US20190026555A1 (en) * 2017-07-18 2019-01-24 Facebook, Inc. Image compression using content categories
KR20190029800A (en) * 2017-08-28 2019-03-21 에스케이텔레콤 주식회사 Terminal device, server and system for image recognition capable of protecting personal information
US20200320745A1 (en) * 2019-04-02 2020-10-08 Christoph Clausen Image compression using image acquisition device characteristics

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050175249A1 (en) * 2004-02-06 2005-08-11 Ferlitsch Andrew R. Systems and methods for mixed raster conversion in direct printing
CN1984330A (en) * 2005-06-25 2007-06-20 通用电气公司 Adaptive video compression of graphical user interfaces using application metadata
US20190026555A1 (en) * 2017-07-18 2019-01-24 Facebook, Inc. Image compression using content categories
KR20190029800A (en) * 2017-08-28 2019-03-21 에스케이텔레콤 주식회사 Terminal device, server and system for image recognition capable of protecting personal information
US20200320745A1 (en) * 2019-04-02 2020-10-08 Christoph Clausen Image compression using image acquisition device characteristics

Also Published As

Publication number Publication date
CN114513583B (en) 2023-12-19

Similar Documents

Publication Publication Date Title
CN108256591B (en) Method and apparatus for outputting information
US11270099B2 (en) Method and apparatus for generating facial feature
US10282627B2 (en) Method and apparatus for processing handwriting data
US20170103397A1 (en) Video identification method and computer program product thereof
CN112200697B (en) Remote video room watching method, device, equipment and computer storage medium
CN104079587A (en) Certificate identification device and certificate check system
CN110336791B (en) Method, device and equipment for transmitting breakpoint data and computer storage medium
US11019225B2 (en) Dynamic image capture device control system
CN108683901B (en) Data processing method, MEC server and computer readable storage medium
CN110765869B (en) Lip language living body detection method, system and computer equipment for collecting data by channels
CN108513034A (en) Method, electronic device and the computer readable storage medium of long-range shooting picture
CN114513583B (en) Compression uploading method, device, equipment and medium for image data
CN111047657A (en) Picture compression method, device, medium and electronic equipment
CN112036323B (en) Signature handwriting authentication method, client and server
CN110096478A (en) Document index generation method and equipment
EP4113371A1 (en) Image data processing method and apparatus, device, storage medium, and product
CN112911003B (en) Electronic data extraction method, computer device, and storage medium
US11317005B2 (en) System and method for determining compression rates for images comprising text
CN114677700A (en) Identification method and device of identity, storage medium and electronic equipment
CN112165594A (en) Service handling method and device based on video communication and computer equipment
CN113065619A (en) Data processing method, data processing device, computer readable storage medium and equipment
CN112115836A (en) Information verification method and device, computer readable storage medium and electronic equipment
CN113298074B (en) Image recognition method and device, computer readable storage medium and processor
CN112767348B (en) Method and device for determining detection information
CN112800948A (en) Image recognition-based step-by-step verification method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant