Image information acquisition method and device, equipment and medium
Through the browser, the image acquisition device of the mobile device is called automatically and the document information is obtained, which solves the problem of the cumbersome certificate information collection process in the prior art and improves the user experience and business conversion rate.
Patent Information
- Application Number
- CN202411465676.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, the process of taking photos and collecting document information is complicated, and users need to click and select multiple times, which leads to the intention of returning during the user's operations and affects the business conversion rate.
Through the browser, the image acquisition device of the mobile device is called, and the user's ID scan operation is used to obtain the video stream, intercept the image and upload it to the server for identification, realizing the automatic identification and acquisition of ID information.
It simplifies user operation processes, improves user experience and efficiency, reduces users' intention to withdraw during operation, and effectively improves business conversion rate.
Smart Images

Figure CN119484996A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image information acquisition method, device, equipment and medium. Background Art
[0002] At present, when a user creates a platform account, in order to determine the user's true identity, it is necessary to obtain the user's relevant certificate information. In the related technology, the user needs to open the system camera to take a photo of the certificate or open the system album to select the certificate photo to upload, so as to collect the valid information in the photo. However, this method of taking photos to collect certificate information is relatively cumbersome in terms of process operation. The user needs to click and select multiple times, and there are many operation steps, which may cause the user to give up during the operation, thereby affecting the business conversion rate. Summary of the invention
[0003] The present invention provides an image information acquisition method, device, computer equipment and medium to solve the technical problem that the process of collecting document information by taking photos is relatively cumbersome, the user needs to click and select multiple times, and the operation steps are large, which may cause the user to quit during the operation, thereby affecting the business conversion rate.
[0004] In a first aspect, a method for acquiring image information is provided, which is applied to a mobile terminal, wherein the mobile terminal includes an image acquisition device, and the method includes:
[0005] In response to the user's document scanning operation, the image acquisition device is called through the browser to obtain the video stream;
[0006] Capturing an image from a video stream and uploading the captured image to a server so that the server can recognize image information contained in the image;
[0007] Receive image information sent by the server.
[0008] In a second aspect, an image information acquisition device is provided, which is applied to a mobile terminal, wherein the mobile terminal includes an image acquisition device, and the device includes:
[0009] An acquisition module, for acquiring a video stream by invoking an image acquisition device through a browser in response to a user's document scanning operation;
[0010] The capture module is used to capture images in the video stream; the sending module is used to upload the captured images to the server so that the server can recognize the image information contained in the images;
[0011] The receiving module is used to receive the image information sent by the server.
[0012] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned image information acquisition method when executing the computer program.
[0013] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned image information acquisition method are implemented.
[0014] In the scheme implemented by the above-mentioned image information acquisition method, device, computer equipment and storage medium, the system camera can be called independently through the browser to create a scanning page, without relying on the APP end to call the system camera, so that the H5 page separated from the APP end can realize the scanning and recognition function. Compared with the method in the related art that requires the user to open the system camera to take a photo or open the system album to select a photo to upload the ID card for image recognition, this application uses the mobile device browser to scan the ID card to identify related information. The user only needs to point the ID card at the camera without manually uploading the picture, which not only simplifies the user operation process, but also improves the user experience and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0016] Figure 1 is a schematic diagram of an application environment of an image information acquisition method in one embodiment of the present invention;
[0017] Figure 2 is a schematic diagram of a process of an image information acquisition method in one embodiment of the present invention;
[0018] Figure 3 yes Figure 2 A schematic flow chart of a specific implementation of step S20;
[0019] Figure 4 yes Figure 3 A schematic flow chart of a specific implementation of step S23;
[0020] Figure 5 is a structural schematic diagram of an image information acquisition device in one embodiment of the present invention;
[0021] Figure 6 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0022] Figure 7 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The image information acquisition method provided by the embodiment of the present invention can be applied in Figure 1 In the application environment, the client communicates with the server through the network. The browser of the client detects that the current page has an image scanning operation, and the image acquisition device of the mobile device is called by the browser to shoot the scanned document aimed by the user to obtain a video stream. Thereafter, by intercepting the real-time picture in the video stream and uploading the intercepted real-time picture to the server, the server recognizes the information contained in the real-time picture and receives the image information fed back by the server. In the present invention, the system camera can be called by the front end alone to make a scanning page, and the system camera is not relied on to call the APP end, so that the H5 page separated from the APP end can realize the scanning and recognition function. Compared with the method in the related art that requires the user to open the system camera to take a photo or open the system album to select a photo to upload the ID card for image recognition, the present application uses the mobile device browser to scan the ID card to identify the relevant information. The user only needs to aim the ID card at the camera, without manually shooting and uploading pictures, which not only simplifies the user operation process, but also improves the user experience and efficiency, and effectively improves the business conversion rate. Among them, the client can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented with an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.
[0025] See also Figure 2 As shown, Figure 2 A flowchart of a method for acquiring image information provided by an embodiment of the present invention includes the following steps:
[0026] S10: In response to the user's ID scanning operation, the image acquisition device is called through the browser to obtain video data.
[0027] The image information acquisition method provided by the present invention is applied to a mobile terminal, and can be specifically applied to a scenario in which a user creates an account in an H5 (mobile browser) page. The user accesses the management platform through a web page, selects the "register" or "create a new account" option, and enters basic personal information. According to the prompt, the user needs to upload the certificate information. At this time, the user can align the certificate (such as an ID card) with the scanning page and click the "scan certificate" command box on the browser page. When a certificate scanning operation initiated by the user is detected, the browser calls the image acquisition device of the mobile device (such as a camera built into the mobile device) to shoot the certificate that the user is aiming at to obtain a video stream.
[0028] Optionally, before calling the mobile image acquisition device through the browser, a scanning page of the mobile browser is pre-built. Specifically, according to the screen size of different mobile devices and business requirements, the scanning page is determined to be a vertical screen page or a horizontal screen page to ensure that after the page is opened on mobile devices of different sizes, a scanning page suitable for the screen size is displayed. The scanning page constructed is a vertical screen page. When the user scans the ID card, he can directly place the ID card in the middle of the screen.
[0029] In actual application scenarios, native JavaScript code is used to utilize the API (application programming interface) provided by the browser to wake up the camera of the mobile device to take a photo of the ID photo that the user points at, so as to obtain a video stream.
[0030] S20: capturing an image from the video stream, and uploading the captured image to the server, so that the server can recognize image information contained in the image;
[0031] S30: receiving image information sent by the server.
[0032] For steps S20-S30, the real-time picture in the video stream is captured and uploaded to the server. The server performs image recognition based on the received real-time picture, determines the image information contained in the image, and feeds the recognized image information back to the mobile terminal.
[0033] Through the above method, real-time images are captured from the video stream captured by the image acquisition device, and only the captured images need to be transmitted. The required bandwidth is only a few tenths of that of transmitting the video stream, which consumes less resources.
[0034] In one embodiment of the present application, a solution for generating a captured image based on a video stream is provided. In step S20, Figure 3 As shown, that is, capturing an image in a video stream and uploading the captured image to a server so that the server can recognize image information contained in the image, including the following steps:
[0035] S21: Projecting the video stream to a target area of the browser page;
[0036] In this step, the target area is a video element in the browser, and the video stream captured by the image capture device is projected to the target area so that the user can view the real-time video stream on the browser page.
[0037] In actual application scenarios, when the user authenticates, the video stream is output by calling MediaDevices.getUserMedia(). At this time, a video tag is added to the mobile H5 page to play the real-time image captured by the image acquisition device. Afterwards, the video stream is assigned to the srcObject attribute of video so that the user can see the real-time scanning image on the screen.
[0038] In one embodiment of the present application, step S21, before projecting the video stream to the target area of the browser page, also includes: determining the width parameter and height parameter of the target area based on the document size of the document to be scanned; and creating the target area based on the width parameter and the height parameter.
[0039] In this embodiment, a target area is created to render a video frame. Specifically, based on the size of the scanned document to be scanned during identity authentication, the width parameter and height parameter of the target area are determined. For example, if the document to be scanned is an ID card, the width parameter and height parameter of the target area are the width and height of the ID card. By setting the target area according to the size of the document to be scanned, the compatibility and adaptability of the target area are ensured, and the processing focus can be placed on a specific image area, making it easier to extract valid information.
[0040] Optionally, the target area can be a video element in the browser. Create a new video element and use the video element as the target area for projecting the real-time video stream captured by the image acquisition device, so that the user can see the real-time picture captured by the image acquisition device on the browser side.
[0041] S22: intercepting an image from the video stream of the target area, and drawing the intercepted image into the image auxiliary canvas;
[0042] In this step, the image auxiliary canvas refers to a canvas used to draw a frame of image captured from the video stream at a certain moment, capture the video stream captured by the image capture device from the target area, and draw the captured image into the image auxiliary canvas to temporarily record the temporary frame captured at the current moment.
[0043] Optionally, the image auxiliary canvas can be a canvas element in a browser. Before drawing an image, an image canvas is created and initialized to capture an image captured by the camera at the current moment from the target area and draw it to the image auxiliary canvas.
[0044] Through the above method, the captured real-time picture is drawn into the image auxiliary canvas for recording. Only the drawn image needs to be analyzed, and there is no need to deploy additional services for real-time analysis of the video stream, thereby reducing resource consumption.
[0045] S23: Upload the image drawn in the image auxiliary canvas to the server, so that the server can recognize the image information in the image.
[0046] In this step, the temporary frame image recorded by the image auxiliary canvas is uploaded to the server, and the image information of the temporary frame is analyzed by the server. Thereafter, the image recognition result fed back by the server is received.
[0047] In one embodiment of the present application, an image transmission solution is provided. In step S23, Figure 4 As shown, the image drawn in the image auxiliary canvas is uploaded to the server so that the server can perform image recognition on the received image, including the following steps:
[0048] S231: Encoding the image drawn in the image auxiliary canvas according to a preset encoding format to generate encoding information;
[0049] S232: Transmitting the encoded information to the server, so that the server decodes the encoded information to obtain decoded information, and performs image recognition on the image based on the decoded information to obtain image information.
[0050] For steps S231-S232, the image recorded by the image auxiliary canvas is encoded to obtain corresponding encoding information, and the encoding information is transmitted to the server for decoding to obtain decoding information, so that the server can identify the image information of the image based on the decoding information.
[0051] Optionally, the preset encoding format may be base64 format, and the ccanvas.toDataURL() method is called to convert the canvas into base64 encoding, and the base64 encoding is transmitted to the server through an https request.
[0052] In one embodiment of the present application, in order to improve the efficiency of image recognition, step S231 encodes the image drawn in the image auxiliary canvas according to a preset encoding format, and before generating the encoding information, it also includes: obtaining the image size data of the image; comparing the preset size threshold with the image size data; if the image size data of the image is greater than the preset size threshold, compressing the image.
[0053] In this embodiment, if the uploaded image file is too large, the bandwidth consumed during the transmission process is large, and the transmission time is long, resulting in low image recognition efficiency. Therefore, before the image is transmitted, the size of the image is detected in advance to determine whether the image needs to be compressed. Specifically, the image size data of the image is obtained, and the image size data is compared with the preset size threshold, wherein the preset size threshold is a transmission size threshold that is pre-set based on business needs and application scenarios. If the image size data is less than or equal to the preset size threshold, it means that the image size is within the allowable range, that is, the image size is small and the transmission speed is fast. At this time, the image can be directly encoded and transmitted to the server; if the image size data is greater than the preset size threshold, it means that the image file is too large, and more time is required for both transmission and server processing. The longer processing time will affect the image recognition efficiency. At this time, the image needs to be compressed to meet the preset size requirements.
[0054] Optionally, based on application scenarios, business requirements, and the processing capacity and load of the server, a feasible range of image sizes is determined in advance, and a reasonable image size threshold is set to ensure that the image can be successfully uploaded to the server.
[0055] By using the above method, larger images are compressed in advance before uploading, so that the images can be transmitted to the server faster, reducing waiting time and thus improving image recognition efficiency.
[0056] In one embodiment of the present application, the step of compressing an image specifically includes: based on image size data of the image, determining a preset compression ratio corresponding to the image size data in a preset mapping relationship, wherein the preset mapping relationship includes a correspondence between the image size data and the preset compression ratio; and compressing the image according to the preset compression ratio.
[0057] In this embodiment, compression ratios are set in advance according to different image sizes, and a preset mapping relationship table is constructed based on the one-to-one correspondence between image sizes and preset compression ratios. In the preset mapping relationship table, the preset compression ratio corresponding to the image size data is retrieved, and the image is adjusted according to the preset compression ratio.
[0058] In actual application scenarios, different compression ratios are pre-set according to different image sizes, and the preset compression ratio setting range is between 0-1. After the image is drawn on the canvas, it is determined whether the acquired image size meets the image size requirements required by the background interface transmitted to the server. If not, the preset compression ratio is used. During the image drawing process, the size of the canvas is adjusted according to the preset compression ratio, and the image size is compressed to a size range that meets the background interface. Afterwards, the compressed image is sent to the background interface to obtain image information.
[0059] The image information acquisition method provided by the present application directly calls the image capture device through the browser, and renders the video stream of the image capture device to the target area of the mobile terminal H5 page. In the process of the user pointing the ID photo, the canvas is used to capture the temporary frame of the real-time picture. After capturing the real-time picture, it is sent to the server for image recognition, and the image recognition result fed back by the server is obtained, thereby obtaining the corresponding information of the ID photo uploaded by the user. Through the above method, it is realized that the front end can call the system camera alone to make a scanning page, and does not rely on the APP end to call the system camera, so that the H5 page separated from the APP end can realize the scanning and recognition function. Compared with the method in the related art that requires the user to open the system camera to take a photo or open the system album to select photos to upload the ID card for image recognition, this application uses the mobile device browser to scan the ID card to identify related information. The user only needs to point the ID card at the camera, without manually uploading the picture, which not only simplifies the user operation process, but also improves the user experience and efficiency.
[0060] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0061] In one embodiment, an image information acquisition device is provided, and the image information acquisition device corresponds one-to-one to the image information acquisition method in the above embodiment. Figure 5 As shown, the image information acquisition device includes: an acquisition module 101, an interception module 102, a sending module 103 and a receiving module 104. The detailed description of each functional module is as follows:
[0062] The acquisition module 101 is used to acquire a video stream by calling an image acquisition device through a browser in response to a user's ID scanning operation;
[0063] The capture module 102 is used to capture images in the video stream; the sending module 103 is used to upload the captured images to the server so that the server can recognize the image information contained in the images;
[0064] The receiving module 104 is used to receive image information sent by the server.
[0065] In one embodiment, the interception module 102 is specifically configured to:
[0066] Project the video stream to the target area of the browser page;
[0067] Capture an image from the video stream of the target area, and draw the captured image into the image auxiliary canvas.
[0068] In one embodiment, the sending module 103 is specifically configured to:
[0069] The image drawn in the image auxiliary canvas is uploaded to the server so that the server can recognize the image information in the image.
[0070] In one embodiment, the device further comprises:
[0071] A determination module, used for determining width parameters and height parameters of a target area based on the document size of the document to be scanned;
[0072] The creation module is used to create a target area based on width and height parameters.
[0073] In one embodiment, the sending module 103 is specifically configured to:
[0074] Encode the image drawn in the image auxiliary canvas according to a preset encoding format to generate encoding information;
[0075] The encoded information is transmitted to the server, so that the server decodes the encoded information to obtain decoded information, and performs image recognition on the image based on the decoded information to obtain image information.
[0076] In one embodiment, the acquisition module 101 is further used to: acquire image size data of the image.
[0077] In one embodiment, the device further comprises:
[0078] A comparison module, used for comparing a preset size threshold with the image size data;
[0079] The compression module is used to compress the image if the image size data of the image is greater than a preset size threshold.
[0080] In one embodiment, the compression module is specifically configured to:
[0081] Based on the image size data of the image, determining a preset compression ratio corresponding to the image size data in a preset mapping relationship table, wherein the preset mapping relationship table includes a correspondence between the image size data and the preset compression ratio;
[0082] Compress the image according to the preset compression ratio.
[0083] In one embodiment, the target area may be a video element in a browser; and the image auxiliary canvas may be a canvas element in a browser.
[0084] The present invention provides an image information acquisition device, which directly calls an image capture device through a browser, and renders the video stream of the image capture device to a target area of a mobile H5 page. In the process of the user pointing the ID photo, a canvas is used to capture a temporary frame of the real-time picture. After the real-time picture is captured, it is sent to the server for image recognition, and the image recognition result fed back by the server is obtained, thereby obtaining the corresponding information of the ID photo uploaded by the user. Through the above method, it is realized that the front end can call the system camera alone to make a scanning page, and does not rely on the APP end to call the system camera, so that the H5 page separated from the APP end can realize the scanning and recognition function. Compared with the method in the related art that requires the user to open the system camera to take a photo or open the system album to select a photo to upload the ID card for image recognition, this application uses a mobile device browser to scan the ID card to identify related information. The user only needs to point the ID card at the camera, and there is no need to manually upload the picture, which not only simplifies the user operation process, but also improves the user experience and efficiency.
[0085] For the specific definition of the image information acquisition device, please refer to the definition of the image information acquisition method above, which will not be repeated here. Each module in the above-mentioned image information acquisition device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0086] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a service-side of an image information acquisition method.
[0087] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, the functions or steps on the client side of an image information acquisition method are implemented.
[0088] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0089] In response to the user's document scanning operation, the image acquisition device is called through the browser to obtain the video stream;
[0090] Capturing an image from a video stream and uploading the captured image to a server so that the server can recognize image information contained in the image;
[0091] Receive image information sent by the server.
[0092] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0093] In response to the user's document scanning operation, the image acquisition device is called through the browser to obtain the video stream;
[0094] Capturing an image from a video stream and uploading the captured image to a server so that the server can recognize image information contained in the image;
[0095] Receive image information sent by the server.
[0096] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0097] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0098] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0099] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for acquiring image information, characterized in that: Applied to a mobile terminal, wherein the mobile terminal includes an image acquisition device, and the method includes: In response to the user's document scanning operation, the image acquisition device is called through the browser to obtain the video stream; Intercepting an image from the video stream, and uploading the intercepted image to a server, so that the server can recognize image information contained in the image; Receive the image information sent by the server.
2. The method according to claim 1, characterized in that The step of intercepting an image from the video stream and uploading the intercepted image to the server so that the server can identify the image information contained in the image specifically includes: Projecting the video stream to a target area of a browser page; Intercepting an image from the video stream of the target area, and drawing the intercepted image into an image auxiliary canvas; The image drawn in the image auxiliary canvas is uploaded to the server so that the server can recognize image information in the image.
3. The method according to claim 2, characterized in that Before projecting the video stream to the target area of the browser page, the method further includes: Determining width and height parameters of the target area based on the size of the document to be scanned; Based on the width parameter and the height parameter, the target area is created.
4. The method according to claim 2, characterized in that: The step of uploading the image drawn in the image auxiliary canvas to the server so that the server recognizes the image information in the image specifically includes: Encoding the image drawn in the image auxiliary canvas according to a preset encoding format to generate encoding information; The encoded information is transmitted to the server, so that the server decodes the encoded information to obtain decoded information, and performs image recognition on the image based on the decoded information to obtain the image information.
5. The method according to claim 4, characterized in that The step of encoding the image drawn in the image auxiliary canvas according to a preset encoding format and generating encoding information further includes: Acquire image size data of the image; Comparing a preset size threshold with the image size data; If the image size data of the image is greater than the preset size threshold, the image is compressed.
6. The method according to claim 5, characterized in that The step of compressing the image specifically comprises: Based on the image size data of the image, determining a preset compression ratio corresponding to the image size data in a preset mapping relationship table, wherein the preset mapping relationship table includes a correspondence between image size data and preset compression ratios; The image is compressed according to the preset compression ratio.
7. The method according to any one of claims 1 to 6, characterized in that The target area can be a video element in the browser; The image auxiliary canvas can be a canvas element in the browser.
8. An image information acquisition device, characterized in that: Applied to a mobile terminal, wherein the mobile terminal includes an image acquisition device, and the device includes: An acquisition module, configured to acquire a video stream by calling the image acquisition device through a browser in response to a user's document scanning operation; A capture module, used to capture images from the video stream; a sending module, used to upload the captured images to a server, so that the server can recognize image information contained in the images; A receiving module is used to receive the image information sent by the server.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the image information acquisition method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the image information acquisition method according to any one of claims 1 to 7 are implemented.