Certificate image processing method and device, equipment, medium and product
By using a collaborative processing mechanism of character-by-character OCR and large language model, along with blockchain-based evidence storage technology, the system automatically identifies certificate types and accurately desensitizes them. This solves the problems of poor versatility and ineffective desensitization in processing sensitive information in certificate images, achieving efficient and secure certificate image processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2026-01-30
- Publication Date
- 2026-06-05
Smart Images

Figure CN122153947A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image data processing, and in particular to a method, apparatus, device, medium, and product for processing certificate images. Background Technology
[0002] In business scenarios involving user identity verification, users frequently need to upload images of various certificates, such as ID cards, passports, driver's licenses, and social security cards, to complete operations such as real-name authentication, document verification, and data collection. However, these certificate images usually contain a large amount of sensitive information, and directly storing or transmitting the original images poses a serious risk of privacy leakage.
[0003] In existing technologies, sensitive information in certificate images is typically masked using template matching-based region masking, text masking based on traditional Optical Character Recognition (OCR) and regular expressions, or manual review and masking. These solutions generally suffer from poor versatility, inadequate desensitization, lack of semantic understanding capabilities, and opaque processing, making them unsuitable for the current business needs of diverse scenarios and high compliance requirements. Summary of the Invention
[0004] This application provides a method, apparatus, device, medium, and product for processing certificate images, in order to solve the technical problems of poor versatility of sensitive information in certificate images, poor desensitization effect, lack of semantic understanding ability, low efficiency of compliance review, and high rate of missed detection.
[0005] Firstly, this application provides a method for processing certificate images, comprising:
[0006] Obtain the position information of each character in the certificate image to be processed. The position information includes the pixel-level bounding box coordinates of each character.
[0007] Based on the positional information of each character, the large language model is used to identify the certificate image to be processed, and structured data containing certificate type, field label and field value is obtained.
[0008] Based on structured data and a pre-configured desensitization strategy library, the image of the certificate to be processed is desensitized to obtain a desensitized certificate image.
[0009] Secondly, this application provides a processing apparatus for certificate images, comprising:
[0010] The acquisition module is used to acquire the position information of each character in the certificate image to be processed. The position information includes the pixel-level bounding box coordinates of each character.
[0011] The recognition module is used to recognize the image of the certificate to be processed based on the position information of each character through a large language model, and obtain structured data containing certificate type, field label and field value;
[0012] The desensitization module is used to desensitize the certificate images to be processed based on structured data and a pre-configured desensitization strategy library, so as to obtain desensitized certificate images.
[0013] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0014] The memory stores instructions that the computer executes;
[0015] The processor executes computer-executable instructions stored in memory to implement the method as described in the first aspect.
[0016] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in the first aspect.
[0017] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method as described in the first aspect.
[0018] The method, apparatus, device, medium, and product for processing certificate images provided in this application acquire the positional information of each character in the certificate image to be processed, including the pixel-level bounding box coordinates of each character; based on the positional information of each character, the certificate image to be processed is identified using a large language model to obtain structured data containing certificate type, field labels, and field values; and the certificate image to be processed is de-identified according to the structured data and a pre-configured de-identification strategy library to obtain a de-identified certificate image. The method of this application can automatically identify certificate types, intelligently extract sensitive fields, and achieve pixel-level accurate de-identification. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0020] Figure 1 A flowchart illustrating the method for processing certificate images provided in this application embodiment;
[0021] Figure 2 A flowchart illustrating a method for processing certificate images according to another embodiment of this application;
[0022] Figure 3 A flowchart illustrating a method for processing certificate images according to another embodiment of this application;
[0023] Figure 4 A schematic diagram of the structure of the certificate image processing apparatus provided in the embodiments of this application;
[0024] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.
[0025] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0027] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.
[0028] In business scenarios involving user identity verification, such as finance, government affairs, e-commerce, and healthcare, users frequently need to upload images of various certificates, such as ID cards, passports, driver's licenses, and social security cards, to complete operations such as real-name authentication, document verification, and data collection. However, these certificate images usually contain a large amount of sensitive information, such as names, ID card numbers, addresses, and bank card numbers. Directly storing or transmitting the original images poses a serious risk of privacy leakage.
[0029] For example, when processing loan applications, banks need to verify users' ID card information. If the last six digits of the ID card number are not anonymized, it may lead to the misuse of personal information. If government systems do not effectively mask citizens' identity information during the approval process, it may lead to data breaches. In addition, with the implementation of laws and regulations such as the Personal Information Protection Law and the Data Security Law, enterprises need to meet higher requirements for the compliance and traceability of the entire data processing process.
[0030] In related technologies, sensitive information in certificate images is typically masked using template matching-based region masking, text masking based on traditional Optical Character Recognition (OCR) and regular expressions, or manual review and masking. These solutions generally suffer from poor versatility, inadequate desensitization, lack of semantic understanding capabilities, and opaque processing, making them difficult to adapt to the current business needs of multiple scenarios and high compliance requirements.
[0031] Therefore, there is an urgent need for a system and method that can automatically identify certificate types, intelligently extract sensitive fields, achieve pixel-level accurate desensitization, and ensure the immutability of the processing through blockchain technology, so as to balance business efficiency, data security and compliance auditing needs.
[0032] Based on this, this application proposes an adaptive, high-precision, and auditable intelligent de-identification system for certificate images by combining a collaborative processing mechanism of character-by-character OCR and Large Language Model (LLM) with blockchain evidence storage technology.
[0033] Specifically, character-by-character OCR is chosen to obtain pixel-level coordinate information, combined with the semantic reasoning capabilities of LLM, to achieve accurate matching of field labels and values. A configurable de-identification rule base is designed, allowing business personnel to flexibly define strategies based on document type and field semantics (e.g., "masking the last four digits of the driver's license number"), avoiding the rigidity of hard-coded rules. Blockchain technology is introduced to record key information from the de-identification process on the chain, using hash calculations and encrypted storage to address single points of failure and tampering risks in centralized systems. For example, a government system uses blockchain for evidence storage to ensure that each de-identification operation generates an immutable audit certificate.
[0034] The technical solution of this application is applicable to application scenarios such as finance, government affairs, healthcare, and e-commerce that require processing user-uploaded certificate images. For example, in bank loan review scenarios, it automatically identifies sensitive fields such as ID card numbers and card numbers in ID card and bank card images, performs precise de-identification, and generates compliant review materials. In government data archiving scenarios, such as household registration and social security card information collection processes, it performs semantic structuring processing on uploaded certificate images and ensures the transparency of data processing through blockchain storage. In healthcare scenarios, during patient information registration, it automatically extracts and de-identifies private information from medical insurance cards and diagnostic certificates, while meeting the data security requirements of the Personal Information Protection Law. The system is deployed in a distributed architecture, with the front end being a certificate image upload interface and the back end including an OCR engine, LLM server, blockchain nodes, and storage system, achieving inter-module collaboration through API calls.
[0035] It should be noted that the methods, apparatus, equipment, media and products for processing certificate images provided in this application can be used in the field of data processing, or in any field other than data processing. The application fields of the methods, apparatus, equipment, media and products for processing certificate images in this application are not limited.
[0036] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0037] Figure 1 This is a flowchart illustrating the method for processing certificate images provided in an embodiment of this application. Figure 1 As shown, the image processing method for certificates and licenses in this embodiment can be executed by the aforementioned intelligent image desensitization system for certificates and licenses. Specifically, the image processing method for certificates and licenses in this embodiment may include the following steps 1100 to 1300:
[0038] Step 1100: Obtain the position information of each character in the certificate image to be processed. The position information includes the pixel-level bounding box coordinates of each character.
[0039] Step 1200: Based on the position information of each character, the large language model is used to identify the certificate image to be processed, and structured data containing certificate type, field label and field value is obtained.
[0040] Step 1300: Based on the structured data and the pre-configured desensitization strategy library, perform desensitization processing on the certificate image to be processed to obtain the desensitized certificate image.
[0041] Specifically, the certificate image to be processed acquired by the intelligent desensitization system can be in JPEG or PNG format, for example. In practical applications, the format of the certificate image to be processed can also be other image formats, and this embodiment does not specifically limit this.
[0042] After acquiring the image of the certificate to be processed, a pre-trained character recognition model is used to recognize the image and obtain the position information of each character in the image. For example, the character recognition model can be used to recognize each character in the image to obtain the position information of each character, where the position information can be the pixel-level bounding box coordinates corresponding to each character.
[0043] For example, given an input image of an ID card, the OCR engine outputs a JSON array containing characters and their coordinates. For instance, the structure of each JSON array is as follows:
[0044] {
[0045] "char": "5",
[0046] "confidence": 0.99,
[0047] "bbox": [120, 250, 135, 275] / / [x_min, y_min, x_max, y_max]
[0048] }
[0049] That is, the identified character is the number 5, with a confidence level of 0.99, indicating a high degree of certainty that the character is 5. The bounding box coordinates are: top left corner [120, 250], bottom right corner [135, 275]. This means the character occupies a rectangular area in the image that is 15 pixels wide and 25 pixels high.
[0050] Subsequently, the intelligent image desensitization system for identification documents analyzes the positional information of each character using a large language model to determine the corresponding field labels and values for each character in the image to be processed. During the analysis, the large language model determines the spatial proximity of characters based on their pixel-level bounding boxes, reconstructing discrete characters into words, phrases, and sentences, forming a rich text stream with coordinate information. Utilizing its powerful contextual reasoning capabilities, the system analyzes the reconstructed text to identify the field labels (keys) and corresponding field values (values) on the document. For example, it can identify the characters for "ID number" and recognize the nearby string "G441... a" as its field value.
[0051] Then, based on the field labels and their corresponding field values, the document type corresponding to the image to be processed is determined. For example, when fields such as "name", "address", "birth", and "citizen ID number" are identified, the large language model will determine the document type as "resident ID card" with a high probability.
[0052] The intelligent image anonymization system for identification documents encapsulates field labels, field values, and document types in a preset format to obtain structured data. For example, a JSON object containing all the structured information of the document would look like this:
[0053] {
[0054] "document_type": "Motor vehicle driver's license",
[0055] "fields": [
[0056] {
[0057] "key": "certificate number",
[0058] "key_bbox": [...],
[0059] "value": "110101200001011234",
[0060] "value_char_bboxes": [ / / Bounding boxes for each character
[0061] {"char": "1", "bbox": [...]}, ...
[0064] },
[0065] / / ... Other fields
[0067] }
[0068] It indicates that the automatically recognized document type is a motor vehicle driving license. fields: An array containing all the recognized key fields (key-value pairs) in the document. Each field contains a label (key), a value, and its precise location information. Among them, the field label is the document number, and the pixel coordinates of the words "document number", and the field value is "110101200001011234". value_char_bboxes represents the independent bounding boxes of each character in the value.
[0069] Optionally, in some other implementation methods, a smaller-scale Transformer model or graph neural network (GNN) fine-tuned in a specific field (such as document recognition) can be used to replace the general LLM. The GNN can utilize the spatial layout information of characters for structuring.
[0070] After obtaining the structured data, the desensitization process can be performed on the image of the document to be processed. Specifically, obtain the desensitization policy corresponding to the document type from the desensitization policy library. According to the desensitization policy, determine the target field labels to be masked and the corresponding target field values. Perform the desensitization process on the target field labels and target field values to obtain the desensitized document image. Among them, the desensitization process includes any one of color filling, adding mosaics, or adding a blur filter.
[0071] For example, by reading the document type in the structured data, the corresponding desensitization strategy can be found and loaded from the desensitization strategy library. This desensitization strategy library can be flexibly configured by the administrator. For example: { "Driver's License": { "License Number": "MASK_SUFFIX(4)", "Address": "MASK_ALL"}} indicates that the last four digits of the driver's license number are masked, and the address is completely masked.
[0072] Based on the matched rules, the fields to be masked (such as "certificate number") and the last four characters of the value to be manipulated are located. The bounding box coordinates of these four characters to be masked are extracted from the `value_char_bboxes` of the structured JSON. On a copy of the original certificate image to be processed, based on the obtained precise coordinates, de-identification processing is performed on the region containing each target field label and target field value, thus obtaining the de-identified certificate image. It is evident that by applying contextual reasoning from a large language model to identify field labels and associating the character-level position of values based on character coordinates, the lack of semantic understanding in traditional OCR is overcome, enabling support for complex de-identification strategies.
[0073] According to the technical solution of this embodiment, the position information of each character in the certificate image to be processed is obtained, including the pixel-level bounding box coordinates of each character; based on the position information of each character, the certificate image to be processed is identified by a large language model to obtain structured data containing certificate type, field labels, and field values; according to the structured data and a pre-configured desensitization strategy library, the certificate image to be processed is desensitized to obtain a desensitized certificate image. The method of this application can automatically identify certificate type, intelligently extract sensitive fields, and achieve pixel-level accurate desensitization.
[0074] Figure 2 This is a flowchart illustrating a method for processing certificate images according to another embodiment of this application. Figure 2 As shown, based on the above embodiments, after step 1300, the method provided in this embodiment may further include:
[0075] Step 2100: Obtain the image of the certificate to be processed, the desensitized image of the certificate, the desensitization strategy, the desensitization processing time, and the user information.
[0076] Step 2200: Package the image of the certificate to be processed, the de-identified image of the certificate, the de-identification strategy, the de-identification processing time, and the user information into blockchain transaction information.
[0077] Step 2300: Send the blockchain transaction information to the target blockchain network for storage.
[0078] Step 2400: Receive the transaction identifier information returned by the target blockchain network.
[0079] Specifically, when packaging the image of the certificate to be processed, the de-identified image of the certificate, the de-identification strategy, the de-identification processing time, and user information into blockchain transaction information, a hash algorithm can be used to calculate the hash value of the image of the certificate to be processed and the de-identified image of the certificate separately, obtaining a first hash value of the image of the certificate to be processed and a second hash value of the de-identified image of the certificate. The first hash value, the second hash value, the de-identification strategy, the de-identification processing time, and the user information are then packaged into blockchain transaction information.
[0080] In this embodiment, firstly, complete contextual information related to the anonymization of certificates and licenses is collected, including the original certificate / license image, the anonymized image, the anonymization strategy used (such as masking the ID number), the timestamp of the anonymization operation, and the user's identity information performing the operation, providing a data foundation for subsequent traceability and auditing. The aforementioned multi-dimensional information is then encapsulated according to the format requirements of blockchain transactions, packaged into a structured blockchain transaction message to ensure data integrity and immutability. This transaction message is submitted to a designated target blockchain network (such as a consortium blockchain or a private blockchain), where consensus nodes verify and write it into the distributed ledger, achieving permanent evidence storage of the operation record. After the transaction is successfully recorded on the blockchain, the system receives a unique transaction identifier (such as a transaction hash) returned by the blockchain, which can be used for subsequent querying, verification, or association with audit logs, forming a complete operational loop.
[0081] Alternatively, in practical applications, traditional, centralized log auditing systems can be used in conjunction with digital signatures and secure timestamps to record operations.
[0082] According to the technical solution of this embodiment, blockchain technology can be used to record key information of the certificate image desensitization process, which serves as an immutable credential, ensuring the credibility and traceability of the desensitization process.
[0083] Figure 3 This is a flowchart illustrating a method for processing certificate images according to another embodiment of this application. Figure 3 As shown, based on the above embodiments, the method provided in this embodiment may further include:
[0084] Step 3100: Encrypt the desensitized certificate image using a strong encryption algorithm to obtain an encrypted desensitized certificate image.
[0085] Step 3200: Store the encrypted and desensitized certificate image to the storage system.
[0086] In this embodiment, after the desensitization processing of the certificate image is completed, the system uses a high-strength encryption algorithm (such as AES-256 or the national cryptographic standard SM4) to encrypt the desensitized image, generating an encrypted desensitized certificate image, ensuring that even if the storage medium is illegally accessed, the image content cannot be restored or leaked.
[0087] Encrypted and de-identified certificate images are securely written to distributed or centralized storage systems (such as object storage, cloud storage, or private file servers) to achieve isolated storage and controlled access to sensitive data.
[0088] According to the technical solution of this embodiment, by introducing a strong encryption mechanism on the basis of desensitization, this solution achieves dual privacy protection: it eliminates the risk of plaintext exposure of the original sensitive information through desensitization, and prevents unauthorized access or reverse recovery of the desensitized image during storage through encryption, which significantly improves the security of certificate data in static storage. At the same time, the decoupled design of encryption and desensitization facilitates authorized decryption and use on demand, taking into account both data security and business availability, and effectively meeting the compliance requirements of various regulations for "de-identification + encrypted storage" of sensitive personal information.
[0089] Figure 4 This is a schematic diagram of the structure of the certificate image processing apparatus provided in an embodiment of this application. Figure 4 As shown, the certificate image processing device 400 provided in this embodiment may include: an acquisition module 410, an identification module 420, and a desensitization module 430.
[0090] The acquisition module 410 is used to acquire the position information of each character in the certificate image to be processed. The position information includes the pixel-level bounding box coordinates of each character.
[0091] The recognition module 420 is used to recognize the certificate image to be processed based on the position information of each character through a large language model, and obtain structured data containing certificate type, field label and field value.
[0092] The desensitization module 430 is used to desensitize the certificate image to be processed based on structured data and a pre-configured desensitization strategy library to obtain a desensitized certificate image.
[0093] In one feasible implementation, the acquisition module 410 can specifically be used to: acquire the image of the certificate to be processed; and to recognize the image of the certificate to be processed based on a pre-trained character recognition model to obtain the position information of each character in the image of the certificate to be processed.
[0094] In one feasible implementation, the recognition module 420 can be used to: analyze the position information of each character through a large language model to determine the field label and corresponding field value of each character in the certificate image to be processed; determine the certificate type corresponding to the certificate image to be processed based on the field label and corresponding field value; and encapsulate the field label, field value and certificate type in a preset format to obtain structured data.
[0095] In one feasible implementation, the desensitization module 430 can be used to obtain the desensitization strategy corresponding to the document type from the desensitization strategy library; determine the target field label and the corresponding target field value to be blocked according to the desensitization strategy; and perform desensitization processing on the target field label and the target field value to obtain the desensitized certificate image.
[0096] The desensitization process includes any one of the following: color filling, adding mosaic, or adding a blur filter.
[0097] In one feasible implementation, the acquisition module 410 can also be used to acquire the image of the certificate to be processed, the de-identified image of the certificate, the de-identification strategy, the de-identification processing time, and user information. The device may also include a packaging module for packaging the image of the certificate to be processed, the de-identified image of the certificate, the de-identification strategy, the de-identification processing time, and user information into blockchain transaction information; a sending module for sending the blockchain transaction information to the target blockchain network for storage; and a receiving module for receiving transaction identifier information returned by the target blockchain network.
[0098] In one feasible implementation, the packaging module can be used to perform hash calculations on the certificate image to be processed and the desensitized certificate image respectively based on a hash algorithm to obtain the first hash value of the certificate image to be processed and the second hash value of the desensitized certificate image; and package the first hash value, the second hash value, the desensitization strategy, the desensitization processing time, and the user information into blockchain transaction information.
[0099] In one feasible implementation, the device may further include an encryption module for encrypting the desensitized certificate image using a strong encryption algorithm to obtain an encrypted desensitized certificate image storage module for storing the encrypted desensitized certificate image in a storage system.
[0100] The certificate image processing device in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0101] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Figure 5As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.
[0102] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.
[0103] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0104] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0105] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0106] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0107] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0108] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0109] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0110] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0111] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0112] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0113] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0114] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0115] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0116] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0117] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0118] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0119] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for processing certificate images, characterized in that, The method includes: Obtain the position information of each character in the certificate image to be processed, the position information including the pixel-level bounding box coordinates of each character; Based on the position information of each character, the image of the certificate to be processed is identified by a large language model to obtain structured data containing certificate type, field label and field value; Based on the structured data and the pre-configured desensitization strategy library, the certificate image to be processed is desensitized to obtain a desensitized certificate image.
2. The method according to claim 1, characterized in that, The step of obtaining the position information of each character in the image of the certificate to be processed includes: Obtain the image of the certificate to be processed; The image of the certificate to be processed is identified based on a pre-trained character recognition model to obtain the position information of each character in the image of the certificate to be processed.
3. The method according to claim 1, characterized in that, Based on the position information of each character, the image of the certificate to be processed is identified using a large language model to obtain structured data containing certificate type, field labels, and field values, including: The positional information of each character is analyzed using the large language model to determine the field label and corresponding field value of each character in the certificate image to be processed. Based on the field labels and corresponding field values, the document type corresponding to the document image to be processed is determined; The field labels, field values, and document types are encapsulated in a preset format to obtain the structured data.
4. The method according to claim 3, characterized in that, The process of de-identifying the certificate image to be processed based on the structured data and a pre-configured de-identification strategy library to obtain a de-identified certificate image includes: Obtain the de-identification strategy corresponding to the document type from the de-identification strategy library; Based on the aforementioned desensitization strategy, determine the target field tags that need to be blocked and the corresponding target field values; The desensitization process is performed on the target field label and the target field value to obtain the desensitized certificate image.
5. The method according to claim 4, characterized in that, The desensitization process includes any one of the following: color filling, adding mosaic, or adding a blur filter.
6. The method according to claim 4, characterized in that, After desensitizing the certificate image to be processed based on the structured data and a pre-configured desensitization strategy library to obtain the desensitized certificate image, the method further includes: Obtain the image of the certificate to be processed, the de-identified image of the certificate, the de-identification strategy, the de-identification processing time, and user information; The image of the certificate to be processed, the de-identified image of the certificate, the de-identification strategy, the de-identification processing time, and the user information are packaged into blockchain transaction information; The blockchain transaction information is sent to the target blockchain network for storage; Receive transaction identifier information returned by the target blockchain network.
7. The method according to claim 6, characterized in that, The step of packaging the image of the certificate to be processed, the de-identified image of the certificate, the de-identification strategy, the de-identification processing time, and the user information into blockchain transaction information includes: The hash calculation is performed on the image to be processed and the de-identified image based on the hash algorithm to obtain the first hash value of the image to be processed and the second hash value of the de-identified image. The first hash value, the second hash value, the de-identification strategy, the de-identification processing time, and the user information are packaged into the blockchain transaction information.
8. The method according to claim 1, characterized in that, The method further includes: The de-identified certificate image is encrypted using a strong encryption algorithm to obtain an encrypted de-identified certificate image; The encrypted and desensitized certificate image is stored in the storage system.
9. A processing apparatus for certificate images, characterized in that, The device includes: The acquisition module is used to acquire the position information of each character in the certificate image to be processed, and the position information includes the pixel-level bounding box coordinates of each character; The recognition module is used to recognize the image of the certificate to be processed based on the position information of each character through a large language model, and obtain structured data containing certificate type, field label and field value; The desensitization module is used to desensitize the certificate image to be processed based on the structured data and a pre-configured desensitization strategy library to obtain a desensitized certificate image.
10. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.