Certificate scanning method and device and storage medium
By using a multi-document scanning mode for document scanning methods and devices, the problem of only being able to scan one type of document at a time in existing technologies is solved, enabling simultaneous scanning and recognition of multiple documents and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHUHAI PANTUM ELECTRONICS CO LTD
- Filing Date
- 2024-11-21
- Publication Date
- 2026-05-22
AI Technical Summary
Existing document scanning methods can only scan one type of document at a time, requiring users to perform multiple operations, which increases the complexity of the operation and affects the user experience.
A document scanning method and apparatus are provided, which supports multiple document scanning modes and can simultaneously acquire and recognize multiple document images in a single operation, including steps such as displaying a multi-document scanning interface, selecting instructions, image acquisition, document recognition, and editing.
It enables simultaneous scanning and recognition of multiple documents on the same interface, simplifying user operations and improving the convenience and efficiency of document scanning.
Smart Images

Figure CN122073598A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image scanning technology, and more specifically to a document scanning method, device, and storage medium. Background Technology
[0002] With advancements in electronic device hardware and software technology, electronic devices now support document scanning. These devices typically have pre-installed applications or third-party software for document scanning, enabling the scanning and recognition of documents placed on a flat surface. However, existing document scanning methods still have certain limitations, impacting the user experience when scanning documents using electronic devices. Summary of the Invention
[0003] In view of this, this application provides a document scanning method, device and storage medium that can simultaneously scan multiple documents.
[0004] In a first aspect, embodiments of the present invention provide a document scanning method, the method comprising: Displays a document scanning interface, which includes multiple document scanning modes; In response to the instruction to select the multi-document scanning mode, the images of the multiple documents to be scanned are taken as the target objects; Scan the target object containing multiple documents; Obtain and display scanned images containing multiple documents.
[0005] In some embodiments, the document scanning interface is the main interface of an application or a third-party application; or, The document scanning interface is a sub-interface associated with the main interface of the application or a third-party application.
[0006] In some embodiments, responding to a selection instruction for the multiple document scanning mode, selecting images of the multiple documents to be scanned as the target object includes: The images of the various documents to be scanned were acquired before or after the selection instruction was detected, by means of camera capture, importing images from the album, or importing them through a third-party application.
[0007] In some embodiments, responding to a selection instruction for the multiple document scanning mode, selecting images of the multiple documents to be scanned as the target object includes: The images of the various documents to be scanned are located in the same source image, and the source image is used as the image to be processed; or, The images of the various documents to be scanned are located in multiple source images. The document objects are identified from the multiple source images and combined into a single image as the target object; or, The images of the various documents to be scanned are located in multiple source images, and these multiple source images are used as the target objects.
[0008] In some embodiments, responding to a selection instruction for the multiple document scanning mode, selecting images of the multiple documents to be scanned as the target object includes: In response to the instruction to select the multiple document scanning modes, a shooting interface is displayed, which includes a document shooting area and a template combination area; the template combination area includes several document combination methods. In response to a target document combination selected from the template combination area, a shooting frame template matching the target document combination is displayed in the document shooting area. The shooting frame template includes document template frames for each document that matches the target document combination, each document template frame is used to match a document shape, and each document template frame is used to display a document image. In response to the image acquisition command, images of various documents to be scanned are acquired as target objects according to the shooting template frame.
[0009] In some embodiments, the target object includes multiple document objects, and scanning the target object containing multiple documents includes: Identify multiple document objects and obtain the confidence level of the multiple document objects; Based on the confidence level of the multiple document objects, the types of various documents identified are output.
[0010] In some embodiments, scanning the target object containing multiple documents to obtain and display a scanned image containing multiple documents includes: The recognition result display interface includes various recognized documents and a button for confirming the recognition results. In response to a confirmation command for the recognition result, a scanned image containing multiple documents is generated and displayed.
[0011] In some embodiments, displaying scanned images containing multiple documents includes: Displays an editing interface for scanned images containing various documents, the editing interface including image editing options; In response to the triggering of the editing command for the image editing options, the scanned image is edited, and after the editing is confirmed, a scanned image containing various documents is obtained.
[0012] Secondly, embodiments of the present invention provide a document scanning device, the device comprising: The display module is used to display the document scanning interface, which includes multiple document scanning modes. The image determination module is used to select the images of the multiple documents to be scanned as the target objects in response to the selection instruction of the multiple document scanning mode; The document recognition module is used to scan the target object and generate a scanned image containing multiple documents; The display module is also used to display the scanned image containing multiple documents.
[0013] Thirdly, embodiments of the present invention provide an electronic device, including: at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor invokes the program instructions to perform the method described in the first aspect or any one of the first aspects.
[0014] Fourthly, embodiments of the present invention provide a computer-readable storage medium comprising a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the method described in the first aspect or any one of the first aspects.
[0015] The document scanning method, equipment, and storage medium provided in this application have at least the following technical advantages: The document scanning interface offers a multi-document scanning mode, which allows for the simultaneous acquisition and / or type recognition of images of multiple documents, enabling simultaneous scanning of multiple types of documents in one go. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart of a document scanning method provided in an embodiment of the present invention; Figure 2 A schematic diagram of a document scanning interface provided in an embodiment of the present invention; Figure 3 This invention provides an interface for an image acquisition method. Figure 4 A schematic diagram of a shooting interface provided in an embodiment of the present invention; Figure 5A A schematic diagram of a shooting interface provided in an embodiment of the present invention; Figure 5B A schematic diagram of a shooting interface provided in an embodiment of the present invention; Figure 6 A schematic diagram of a recognition result interface provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a document scanning device provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0018] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0019] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0020] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0021] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0022] Document scanning can be achieved through applications with scanning capabilities installed on electronic devices or through third-party applications. For ease of description, these applications or third-party applications with scanning capabilities will be referred to as applications or mini-programs below. Currently, applications or mini-programs can only scan one type of document at a time. If a user needs to scan multiple types of documents, multiple scans are required, increasing the complexity of the user operation and affecting the user experience. For example, when a user needs to scan their ID card and household registration booklet, the current application or mini-program requires the user to first trigger the scan command to scan the ID card, confirm the scan, obtain the scanned image of the ID card, and display an interface including the scanned image. Then, the user must trigger the scan command again to scan the household registration booklet, confirm the scan, obtain the scanned image of the household registration booklet, and display an interface including the scanned image of the household registration booklet. Obviously, this method can only scan one type of document at a time. If multiple documents need to be scanned, the single scan operation must be repeated, and it is not possible to scan multiple documents on the same interface. This falls far short of user needs and is inconvenient for users.
[0023] In view of the above problems, embodiments of the present invention provide a document scanning method that supports multiple document scanning modes. In multiple document scanning modes, multiple document types can be scanned / recognized simultaneously, completing the scanning of multiple types of documents in one operation.
[0024] See Figure 1 This is a flowchart of a document scanning method provided by an embodiment of the present invention. Figure 1 As shown, the processing steps of this method include: 101. Displays the document scanning interface, which includes a multi-document scanning mode. In multi-document scanning mode, images and / or type recognition of multiple documents can be achieved, allowing for the scanning of multiple document types in one operation.
[0025] 102. In response to the instruction to select a multi-document scanning mode, images of the various documents to be scanned are used as the target objects. The images of the various documents to be scanned can be located in the same source image or in multiple source images. When the images of the various documents to be scanned are located in the same source image, that source image is used as the target object. When the images of the various documents to be scanned are located in multiple source images, all of those source images can be used as the target object, or the document objects can be identified from the multiple source images and combined into a single image as the target object.
[0026] 103. Scan the target object containing multiple documents.
[0027] Specifically, scanning a target object containing multiple documents also includes simultaneously scanning the target object containing multiple documents, identifying the target object with multiple documents, and obtaining the types of multiple documents. These types of documents can include ID cards, household registration books, bank cards, social security cards, passports, driver's licenses, vehicle registration certificates, and business licenses, etc.
[0028] Specifically, in response to the instruction to select a multi-document scanning mode, the images of the multiple documents to be scanned are used as the target object. Scanning the target object containing multiple documents includes: in response to the instruction to select a multi-document scanning mode, using the images of the multiple documents to be scanned as the target object, and placing the target object containing multiple documents in the document scanning interface; further, in response to the instruction to select a multi-document scanning mode, using the images of the multiple documents to be scanned as the target object, placing the target object containing multiple documents in the document scanning interface, and scanning the target object containing multiple documents in response to an image acquisition instruction (e.g., a shooting instruction); and further, in response to the instruction to select a multi-document scanning mode, acquiring the images of the multiple documents to be processed by means of camera shooting, importing images from the album, or importing through a third-party application, using the images of the multiple documents to be processed as the target object, and scanning the target object containing multiple documents.
[0029] 104. Obtain and display scanned images containing multiple documents. These scanned images containing multiple documents are displayed on the interface of the electronic device for the user to view or download.
[0030] The method of this invention supports a multi-document scanning mode, which can realize image acquisition and / or type recognition of multiple documents, and can complete the simultaneous scanning of multiple documents.
[0031] See Figures 2-5B This is a schematic diagram of a document scanning method provided in an embodiment of the present invention. The document scanning method of the present invention will be described in detail below with reference to the accompanying drawings.
[0032] Launch the application or mini-program on the electronic device to enter its main interface. In some embodiments, the main interface of the application or mini-program is the document scanning interface. In other embodiments, the document scanning interface may also be a sub-interface associated with the main interface of the application or mini-program. Figure 2 This is a schematic diagram of a document scanning interface provided in an embodiment of the present invention. Figure 2 As shown, the document scanning interface can include multiple document scanning modes. Figure 2The given example shows that the document scanning interface also includes other document scanning modes, such as a single document scanning mode. In some other embodiments, the document scanning interface may only include a multi-document scanning mode, while other possible document scanning modes can be found in other interfaces of the application or mini-program.
[0033] like Figure 2 As shown, in the document scanning interface, a command to select multiple document scanning modes is triggered. For example, clicking on the multiple document scanning mode will trigger a selection command. Responding to this selection command will navigate to the image acquisition method interface. See also... Figure 3 This is a schematic diagram of an image acquisition method interface provided in an embodiment of the present invention. The image acquisition method interface can display the image acquisition method for the document to be scanned. For example... Figure 3 As shown, the methods for acquiring images of the documents to be scanned can include: taking photos with a camera, importing from a photo album, or importing through a third-party application.
[0034] When a user selects to import images from their photo album or through a third-party application, the image import interface is accessed. In this interface, the user can select images of the documents to be scanned. In some embodiments, if multiple document images selected by the user are in the same source image, that source image is used as the target object to be processed. In other embodiments, if multiple document images selected by the user are in multiple source images, all of those source images can be used as the target objects to be processed. Alternatively, document objects can be identified separately from the multiple source images and combined into a single image as the target object to be processed.
[0035] like Figure 3 As shown, when a user selects the camera shooting mode as the image acquisition method for the document to be scanned, the shooting interface is entered. See also Figure 4 This is a schematic diagram of a shooting interface provided in an embodiment of the present invention. Figure 4 As shown, the document scanning interface displays a document scanning frame, which can display prompts indicating the placement of the document to be scanned and the camera shooting angle. For example, the prompt could be, "Please place the document within the dotted frame and keep the document parallel to the phone." The parallel placement of the area within the dotted frame with the phone is associated with a model, and this area and placement method enable the scanning of multiple document types in one operation. In multi-document scanning mode, the user can place multiple documents to be scanned within the document scanning frame and adjust the camera shooting angle according to the prompts to ensure the documents are within the dotted frame. After the user clicks the shooting command on the shooting interface, a source image containing multiple documents is obtained. This source image is then input into the electronic device's backend for recognition and processing.
[0036] See Figure 5A This is a schematic diagram of another shooting interface provided in an embodiment of the present invention. Figure 5A As shown, the shooting interface includes a document shooting area and a template combination area. The template combination area includes several document combination methods. For example... Figure 5A As shown, document combination methods can include, for example, a combination of ID card and household registration booklet, ID card and social security card, ID card, bank card and driver's license, and other combinations can be customized as needed. The template combination area allows users to select document combination methods. When a user selects a target document combination method from the template combination area, the electronic device responds by displaying a shooting frame template matching the target document combination method in the document shooting area. The shooting frame template includes document template frames for each document matching the target document combination method. Each document template frame is used to match a document shape, and each document template frame is used to display a document image. The various documents to be scanned are placed according to the prompts of the document template frames, and the resulting image is placed in the corresponding document template frame. Optionally, the document shooting area can display prompt information to indicate the placement position of each document and the shooting angle. For example, the prompt information could be "Please place each document in the document template frame and keep the document parallel to the mobile phone." See also Figure 5B In one example, the user selects the combination of ID card and household registration booklet from several document combination options in the template combination area as the target document combination. After the user selects this combination, the document shooting area displays shooting frame templates, including templates for ID card and household registration booklet. The user places the ID card and household registration booklet according to the prompts, ensuring their images fall within the respective template frames. When the user clicks the shooting command on the shooting interface, a source image containing the images of the ID card and household registration booklet is obtained; this source image is the image to be processed. In the image to be processed, the images of the ID card and household registration booklet are arranged according to the selected target document combination. The image to be processed is then input into the electronic device's backend for recognition processing.
[0037] exist Figures 2-5B Based on the given embodiments, the present invention also provides some other embodiments. Figures 2-5B In the given embodiment, after selecting the multi-document scanning mode, the image acquisition method for the document to be scanned is selected. In some other embodiments, the image acquisition method for the document to be scanned can be selected first, followed by the multi-document scanning mode. Specifically, after launching an application or mini-program on the electronic device, the main interface of the application or mini-program is entered, which can be the image acquisition method interface. The image acquisition method interface can be... Figure 3The interface shown illustrates this. Users select an image acquisition method on the image acquisition method interface and then acquire images of various documents according to that method, subsequently entering the document scanning interface. The document scanning interface can be configured as follows: Figure 2 As shown. After the user selects the multi-document scanning mode on the document scanning interface, they will be redirected to... Figure 4 or Figure 5A or Figure 5B The interface shown. In Figure 4 or Figure 5A or Figure 5B The interface shown allows you to directly display the acquired image in the document shooting frame and input it into the electronic device's backend for recognition processing as the target object to be processed.
[0038] In some other embodiments, Figure 3 The image acquisition method shown can also be used in conjunction with... Figure 4 or Figure 5A or Figure 5B The camera shooting interface shown is combined with other methods. In some examples, after launching an application or mini-program on the electronic device, the user enters the main interface of the application or mini-program, which may be a document scanning interface, including multiple document scanning modes. When the user selects a multiple document scanning mode, they enter the shooting interface. The shooting interface includes image acquisition methods. That is, after selecting the multiple document scanning mode, the user can jump to... Figure 4 or Figure 5A or Figure 5B The interface shown is in Figure 4 or Figure 5A or Figure 5B The interface shown displays the image acquisition method for the document to be scanned.
[0039] After obtaining the target object to be processed, it can be preprocessed to obtain a preprocessed image. Preprocessing includes image enhancement and image scaling. The preprocessed image is then input into the document type recognition model to obtain the document type. Document types include ID cards, household registration books, bank cards, social security cards, passports, driver's licenses, vehicle registration certificates, and business licenses, etc.
[0040] The document type recognition model identifies document types from a preprocessed image by: identifying multiple document objects from the preprocessed image and obtaining confidence scores for each document object; and outputting the identified document types based on the confidence scores of each document object. In some embodiments, the document type recognition model may output document objects with confidence scores greater than or equal to a preset value as document types, while not outputting document objects with confidence scores less than the preset value. For example, the image to be processed contains an ID card and a household registration booklet. Due to background interference, the document type recognition model identifies an ID card and two household registration booklet objects from the preprocessed image and calculates the confidence scores for each of the three document objects. If the confidence score of one household registration booklet object is less than the preset value, while the confidence scores of the ID card and another household registration booklet object are greater than the preset values, the document type recognition model may only output the ID card and household registration booklet objects with confidence scores greater than the preset values, thereby improving the accuracy of the output results. In another implementation, obtaining the confidence level of multiple document objects may further include: the document type recognition model includes baseline image data of various types of documents; multiple document objects are identified from the preprocessed objects; the model is trained on the multiple document objects to obtain image data of the multiple document objects; the document type of the image data is determined; when the document types obtained are the same after more than a predetermined number of times (e.g., 3 times), the corresponding document object is output as the corresponding document type. In yet another implementation, obtaining the confidence level of multiple document objects may further include: the document type recognition model includes baseline image data of various types of documents; multiple document objects are identified from the preprocessed objects; the model is trained on the multiple document objects to obtain image data of the multiple document objects; the image data of the obtained multiple document objects is compared with the baseline image data to determine the similarity between the two types of image data; and document objects that meet the similarity range are output as document types.
[0041] It should be noted that the document type recognition model includes adjustments to the scanning interface parameters, enabling the interface to scan multiple documents simultaneously. These scanning interface parameters are empirical parameters, obtained through repeated training with various document types imported into the model. In other words, the scanning interface parameters are adapted to the document type recognition model. When these parameters are consistent, the model can recognize multiple document types at once. These parameters include the scanning area, document placement, and shooting angle. In multi-document scanning mode, the document placement and shooting angle indicated on the interface are adapted to the model. When multiple documents are placed at their corresponding positions with corresponding shooting angles, the resulting images are imported into the model. The model adaptively adjusts the parameters of these images, enabling it to perform subsequent training and type recognition operations more accurately. In this way, when a user places multiple document objects at corresponding positions and angles on the scanning interface based on the prompts, it is possible to complete the scanning of multiple types of documents at once and obtain scanned images of multiple types of documents on the same scanning interface.
[0042] like Figure 6 As shown, after the document type recognition model identifies multiple document types, it displays the recognition results interface. The interface includes information on the identified documents, which can be arranged according to their confidence level. The interface also includes a button for confirming the recognition results. In response to the user's confirmation command, a scanned image containing the multiple documents is generated and displayed.
[0043] like Figure 6 As shown, after the document type recognition model detects the document type in the image to be processed, it displays a document type prompt to the user on the interface and shows instructions to the user to confirm the recognition result. For example, it displays "Recognized: ID card, household registration book". When the user confirms the recognition result is correct, the "Recognized Correctly" button is triggered, and the document scanning is completed; if the user confirms the recognition result is incorrect, the "Re-recognition" button is triggered, and the original document is scanned and recognized again. In addition, in one implementation, after the document type recognition model detects the corresponding document type, the model outputs a score (this value is the confidence level), and the scanned images are arranged and displayed on the interface according to the recognition confidence level. For example, if the confidence level of the ID card is 90 and the confidence level of the household registration book is 85, then on the interface, the ID card and the household registration book are placed in the center of the A4 paper, with the ID card in the first position and the household registration book placed in the second position vertically.
[0044] In some embodiments, after the recognition results interface displays and confirms the various document types identified, a scanned image editing interface is displayed. The scanned image editing interface includes image editing options, which can trigger editing commands on the scanned image. In response to the triggering of editing commands via the image editing options, the image can be edited, and after confirmation, a scanned image containing various documents is obtained.
[0045] In some embodiments, the image editing options in the scanned image editing interface may include: original image, intelligent high definition, enhanced sharpening, shadow removal, edge removal, watermark addition, brightening, color, black and white, and filter addition.
[0046] In some embodiments, the document images in the scanned image editing interface can be moved. The position of the document images in the scanned image editing interface can be adjusted using movement commands. For example, dragging the ID card image below the household registration book image swaps the positions of the ID card and household registration book images. Alternatively, clicking on the ID card and household registration book images respectively swaps their positions.
[0047] In this embodiment of the invention, the document type recognition model described above can detect multiple document types in the image to be processed, achieving the purpose of scanning multiple documents in a single scan. The training process of the document type recognition model includes: Step A, Creating the training set: The training set uses a mixture of real and synthetic annotations.
[0048] The images with accurate annotations were taken by R&D personnel in different scenarios.
[0049] The image synthesis and annotation are done in three ways. The first is to use a GPT-based algorithm to generate composite images of various ID photos. The second is to use the GPT algorithm to generate background images for various scenes, remove abstract background images, then use web crawling to download multiple images of individual ID documents, use edge detection algorithms to crop the ID document portions, and finally use a fusion algorithm to merge the background image and the ID document image. The position and angle of the ID document image in the background image are randomly generated by the code. The third method is to directly download images containing one or more ID documents via web crawling.
[0050] Step B, Preprocessing the training set: Randomly add noise to all training images, and randomly adjust saturation and contrast, etc.
[0051] Step C, Training the document type recognition model: The YOLO (You Only Look Once, a deep learning-based object detection algorithm) model is selected for training, which is divided into three steps, including: The first stage uses real-labeled images for pre-training, and then uses synthetically labeled images for fine-tuning, saving the optimal model from this stage.
[0052] The second stage uses the best model from the first stage as a pre-trained model, then trains it using all labeled images, and saves the best model from this stage.
[0053] The optimal model from the second stage is used as the pre-trained model, and then fine-tuned using all labeled images. The optimal model is then saved. The above steps are repeated three times to train the model, and the optimal model is selected as the final model.
[0054] The document type recognition model described in this invention is obtained through training the model described above. This model can identify multiple document types from an image to be processed, achieving the effect of obtaining a scanned image containing multiple documents in a single photograph.
[0055] In related technologies, applications or mini-programs can only scan one type of document at a time. If multiple types of documents need to be scanned, multiple scans are required. The method of this invention allows scanning different types of documents on the same display interface, supporting simultaneous scanning of different document types. In a specific application scenario, a user places different types of documents, such as an ID card and a household registration booklet, on their desktop. By clicking the "Scan and Confirm" button once on the shooting interface using the method of this invention, both the ID card and the household registration booklet can be simultaneously scanned onto the same page, achieving the goal of simultaneously scanning multiple document types.
[0056] See Figure 7 This is a schematic diagram of the structure of a document scanning device provided in an embodiment of the present invention. Figure 7 As shown, the document scanning device includes: Display module 210 is used to display a document scanning interface, which includes multiple document scanning modes.
[0057] The image determination module 220 is used to select images of multiple documents to be scanned as target objects in response to a multi-document scanning mode selection instruction.
[0058] The document recognition module 230 is used to scan the target object and generate a scanned image containing multiple documents.
[0059] Display module 210 is also used to display scanned images containing various documents.
[0060] The document scanning device of this invention can execute the document scanning method of the embodiments shown above. For parts not described in detail in this embodiment, please refer to the relevant descriptions of the method embodiments. The execution process and technical effects of this technical solution are described in the embodiments shown in the method, and will not be repeated here.
[0061] See Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 8 As shown, the electronic device 300 may include a processor 301, a memory 302, and a communication unit 303. These components communicate via one or more buses. Those skilled in the art will understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of this application. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0062] The communication unit 303 is used to establish a communication channel, enabling the electronic device to communicate with other devices. It receives user data from other devices or sends user data to other devices.
[0063] Processor 301 serves as the control center of the electronic device, connecting various parts of the device via interfaces and circuits. It executes software programs, instructions, and / or modules stored in memory 302, and retrieves data stored in memory to perform various functions and / or process data. Processor 301 can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, processor 301 may include a central processing unit (CPU), a microcontroller unit (MCU), etc.
[0064] Memory 302 is used to store the execution instructions of processor 301. Memory 302 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.
[0065] When the execution instructions in memory 302 are executed by processor 301, the electronic device 300 is able to execute the document scanning method in this embodiment of the invention.
[0066] In a specific implementation, this application also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps of the document scanning method provided in this application. The storage medium in the embodiments of this invention may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0067] In a specific implementation, this application also provides a computer program product, wherein the computer program product includes executable instructions, which, when executed on a computer, cause the computer to perform some or all of the steps in the various embodiments of the document scanning method provided in this application.
[0068] This application also provides a non-transitory computer-readable storage medium that stores computer instructions that cause the computer to execute the method provided in this application.
[0069] Those skilled in the art will clearly understand that the techniques in the embodiments of this application can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application or some parts of the embodiments.
[0070] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments and terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
Claims
1. A document scanning method, characterized in that, The method includes: Displays a document scanning interface, which includes multiple document scanning modes; In response to the instruction to select the multi-document scanning mode, the images of the multiple documents to be scanned are taken as the target objects; Scan the target object containing multiple documents; Obtain and display scanned images containing multiple documents.
2. The method according to claim 1, characterized in that, The document scanning interface is the main interface of an application or a third-party application; or... The document scanning interface is a sub-interface associated with the main interface of an application or a third-party application.
3. The method according to claim 1, characterized in that, The step of responding to the instruction to select the multi-document scanning mode, and using images of the various documents to be scanned as the target objects, includes: The images of the various documents to be scanned were acquired before or after the selection instruction was detected, by means of camera capture, importing images from the album, or importing them through a third-party application.
4. The method according to claim 1, characterized in that, The step of responding to the instruction to select the multi-document scanning mode, and using images of the various documents to be scanned as the target objects, includes: The images of the various documents to be scanned are located in the same source image, and the source image is used as the target object; or, The images of the various documents to be scanned are located in multiple source images. The document objects are identified from the multiple source images and combined into a single image as the target object; or, The images of the various documents to be scanned are located in multiple source images, and these multiple source images are used as the target objects.
5. The method according to claim 1, characterized in that, The step of responding to the instruction to select the multi-document scanning mode, and using images of the various documents to be scanned as the target objects, includes: In response to the instruction to select the multiple document scanning modes, a shooting interface is displayed, which includes a document shooting area and a template combination area; the template combination area includes several document combination methods. In response to a target document combination selected from the template combination area, a shooting frame template matching the target document combination is displayed in the document shooting area. The shooting frame template includes document template frames for each document that matches the target document combination, each document template frame is used to match a document shape, and each document template frame is used to display a document image. In response to the image acquisition command, images of various documents to be scanned are acquired as target objects according to the shooting template frame.
6. The method according to claim 1, characterized in that, The target objects include multiple document objects. The scan includes the target object containing multiple types of identification documents, including: Identify multiple document objects and obtain the confidence level of the multiple document objects; Based on the confidence level of the multiple document objects, the types of various documents identified are output.
7. The method according to claim 1 or 6, characterized in that, The scanning of the target object, which contains multiple documents, to obtain and display a scanned image containing multiple documents includes: The recognition result display interface includes various recognized documents and a button for confirming the recognition results. In response to a confirmation command for the recognition result, a scanned image containing multiple documents is generated and displayed.
8. The method according to claim 7, characterized in that, The display includes scanned images of various documents, including: Displays an editing interface for scanned images containing various documents, the editing interface including image editing options; In response to the triggering of the editing command for the image editing options, the scanned image is edited, and after the editing is confirmed, a scanned image containing various documents is obtained.
9. A document scanning device, characterized in that, The device includes: The display module is used to display the document scanning interface, which includes multiple document scanning modes. The image determination module is used to select the images of the multiple documents to be scanned as the target objects in response to the selection instruction of the multiple document scanning mode; The document recognition module is used to scan the target object and generate a scanned image containing multiple documents; the display module is also used to display the scanned image containing multiple documents.
10. An electronic device, characterized in that, include: At least one processor; And at least one memory communicatively connected to the processor, wherein the memory stores program instructions executable by the processor, which invokes the program instructions to perform the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method of any one of claims 1 to 8.