Data checking method, device, equipment and medium

By stitching and recognizing images from document pages, a target image is generated and data verification is performed, which solves the problem of inconsistent document data between the server and the terminal, and improves the accuracy and efficiency of data verification.

CN114170610BActive Publication Date: 2025-10-21BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111523162.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-10-21
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

Existing technologies cannot effectively solve the inconsistency problem when the server and terminal are not synchronized in updating document data, resulting in inconsistent display of document data on the server and terminal.

Method used

By stitching together multiple consecutive document page images to be verified, a target image is generated. Image recognition is then performed to obtain document category and quantity information. The associated second data information is then obtained for verification. If there is a discrepancy, a preset prompt message is displayed.

Benefits of technology

It improves the accuracy and efficiency of document data verification, ensuring the consistency of document data between the server and the terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114170610B_ABST
    Figure CN114170610B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data verification method, device, equipment and medium, wherein the method comprises: firstly, stitching a plurality of continuous single document page images to be verified to generate a target image; then, performing image recognition on the target image to obtain first data information, the first data information comprising: a single document category and / or a single document quantity corresponding to each single document category; obtaining second data information associated with the first data information; and finally, verifying the first data information according to the second data information, and displaying a preset prompt information if the verification result indicates that the first data information and the second data information are inconsistent. Thus, by stitching the single document page images and then performing image recognition, the efficiency and accuracy of obtaining the first data information are improved, and by displaying the preset prompt information when the first data information and the associated second data information are inconsistent, the precision and efficiency of list data verification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information processing technology, and in particular to a data verification method, apparatus, device, and medium. Background Art

[0002] At present, office automation (OA) is a new office mode that combines modern office and computer technology, which can improve office efficiency.

[0003] In the related art, the verification method for document-related data generated in the OA process can be performed by obtaining the document data stored in the server for verification, or by parsing keywords in the document object model to obtain the corresponding document data.

[0004] However, for example, when a new document data is added, the terminal does not update the display, and there is a discrepancy between the server aggregation result and the actual document quantity displayed on the terminal. The above method cannot solve the technical problem of inconsistent document data caused by the asynchronous update of the server and the terminal. Summary of the Invention

[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a data verification method, apparatus, device and medium.

[0006] The present disclosure provides a data verification method, comprising:

[0007] Splicing multiple consecutive document page images to be verified to generate a target image, wherein the target image includes: at least one document category and the number of documents corresponding to each document category;

[0008] Performing image recognition processing on the target image to obtain first data information, wherein the first data information includes: document category, and / or the number of documents corresponding to each document category;

[0009] Acquire second data information associated with the first data information;

[0010] The first data information is verified according to the second data information. If the verification result indicates that the first data information and the second data information are inconsistent, a preset prompt message is displayed.

[0011] The present disclosure also provides a data verification device, including:

[0012] A splicing generation module, configured to splice a plurality of consecutive document page images to be verified to generate a target image, wherein the target image includes: at least one document category and the number of documents corresponding to each document category;

[0013] an identification and acquisition module, configured to perform image recognition processing on the target image to acquire first data information, wherein the first data information includes: a document category, and / or a document quantity corresponding to each document category;

[0014] An associated data acquisition module, configured to acquire second data information associated with the first data information;

[0015] The verification prompt module is used to verify the first data information according to the second data information, and if the verification result indicates that the first data information and the second data information are inconsistent, a preset prompt message is displayed.

[0016] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing instructions executable by the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the data verification method provided by the embodiment of the present disclosure.

[0017] An embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the data verification method provided by the embodiment of the present disclosure.

[0018] The embodiments of the present disclosure further provide a computer program product. When the instructions in the computer program product are executed by a processor, the data verification method provided in the embodiments of the present disclosure is implemented.

[0019] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art:

[0020] The data verification solution provided by the disclosed embodiment first splices multiple consecutive document page images to be verified to generate a target image. Next, image recognition processing is performed on the target image to obtain first data information. The first data information includes: document category and / or the number of documents corresponding to each document category, and second data information associated with the first data information is obtained. Finally, the first data information is verified based on the second data information. If the verification result indicates that the first data information and the second data information are inconsistent, a preset prompt message is displayed. Thus, by performing image recognition after splicing the document page images, the efficiency and accuracy of obtaining the first data information are improved, and a preset prompt message is displayed when the first data information and the associated second data information are inconsistent, thereby improving the accuracy and efficiency of list data verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0022] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0023] Figure 1 A flowchart illustrating a data verification method according to an embodiment of the present disclosure;

[0024] Figure 2a An example diagram of image matching similar feature points provided by an embodiment of the present disclosure;

[0025] Figure 2b An example diagram of generating a target image by splicing document page images provided in an embodiment of the present disclosure;

[0026] Figure 3a An example diagram of obtaining a maximum common substring by comparing an array of character check codes provided in an embodiment of the present disclosure;

[0027] Figure 3b An example diagram of generating a target image by splicing another document page image provided in an embodiment of the present disclosure;

[0028] Figure 4 A flowchart of another data verification method provided by an embodiment of the present disclosure;

[0029] Figure 5 A schematic diagram of a target image provided by an embodiment of the present disclosure;

[0030] Figure 6 A flowchart of another data verification method provided in an embodiment of the present disclosure;

[0031] Figure 7 A schematic diagram of another target image provided by an embodiment of the present disclosure;

[0032] Figure 8 A flowchart of another data verification method provided in an embodiment of the present disclosure;

[0033] Figure 9a A schematic diagram of a document page image provided by an embodiment of the present disclosure;

[0034] Figure 9b A schematic diagram of another document page image provided by an embodiment of the present disclosure;

[0035] Figure 10 A flowchart of another data verification method provided by an embodiment of the present disclosure;

[0036] Figure 11 A schematic diagram of another target image provided by an embodiment of the present disclosure;

[0037] Figure 12 A schematic diagram of the structure of a data verification device provided in an embodiment of the present disclosure;

[0038] Figure 13 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0039] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0040] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0041] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0042] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0043] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0044] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0045] In actual applications, document data stored on the server is obtained for verification, such as whether the total number of document categories stored on the server is equal to the sum of the sub-document category data, or the corresponding document data is obtained by parsing keywords in the document object model. It is impossible to perform consistency verification of document data from the server to the terminal from the user's perspective. For example, if a document is lost, the server aggregation result will be inconsistent with the actual number of documents displayed on the terminal. In other words, it is impossible to intercept technical problems such as document data inconsistency caused by asynchronous updates between the server and the terminal.

[0046] In response to the above problems, an embodiment of the present disclosure proposes a data verification method, which generates a target image by splicing multiple consecutive document page images to be verified, wherein the target image includes: at least one document category, and the number of documents corresponding to each document category, and performs image recognition processing on the target image to obtain first data information, wherein the first data information includes: document category, and / or, the number of documents corresponding to each document category, obtains second data information associated with the first data information, and verifies the first data information based on the second data information. If the verification result indicates that the first data information and the second data information are inconsistent, a preset prompt message is displayed.

[0047] Therefore, by splicing the document page images and then performing image recognition, the accurate first data information such as the document category and the number of documents corresponding to each document category is obtained, and then verification processing is performed based on the identified first data information and the associated second data information. When the first data information and the second data information are inconsistent, the preset prompt information is displayed to improve the accuracy and efficiency of the list data verification.

[0048] Figure 1 This is a flow chart of a data verification method provided by an embodiment of the present disclosure, such as Figure 1 Shown, including:

[0049] Step 101 : splicing a plurality of consecutive document page images to be verified to generate a target image, wherein the target image includes: at least one document category and the number of documents corresponding to each document category.

[0050] In an embodiment of the present disclosure, multiple consecutive document page images to be verified refer to at least two adjacent images obtained by screenshots in the order of the document pages to be verified. For example, the document pages to be verified include document page 1 and document page 2. Document page 1 is screenshoted to obtain document page image A, and document page 2 is screenshoted to obtain document page image B. Document page image A and document page image B can be used as multiple consecutive document page images to be verified.

[0051] In the embodiments of the present disclosure, there are many ways to obtain multiple consecutive document page images to be verified, which can be selected and set according to actual application needs. In a specific embodiment of the present disclosure, the automated testing framework is triggered to connect to the terminal, and the document page to be verified on the terminal is opened, and the document page is screenshoted in page order to obtain multiple consecutive document page images to be verified.

[0052] In an embodiment of the present disclosure, there are many ways to splice multiple consecutive document page images to be verified to generate a target image. In some embodiments, the multiple consecutive document page images to be verified include at least one group of adjacent first document page images and second document page images. A target number of similar feature points between the first document page image and the second document page image are obtained as image matching data, and the first document page image and the second document page image are spliced ​​according to the image matching data to obtain the target image.

[0053] In other embodiments, the multiple consecutive document page images to be verified include at least one set of adjacent first and second document page images. A maximum common substring (consecutive identical verification code strings between the two images) between the first and second document page images is obtained as image matching data. Based on the image matching data, the first and second document page images are spliced ​​together to generate a target image. The above two methods are merely examples, and this disclosure does not impose any specific limitations on the methods for generating a target image by splicing multiple consecutive document page images to be verified.

[0054] In an embodiment of the present disclosure, the target image includes at least one document category and the number of documents corresponding to each document category, wherein the document category refers to the type of document. In different application scenarios, the document category may be different. For example, in an office automation scenario, the document category is "purchase application", "contract application", etc. The document quantity refers to the number of documents included in each document category. For example, the document category "purchase application" corresponds to a document quantity of "2".

[0055] It should be noted that a single document page image can be directly used as the target image.

[0056] Step 102: Perform image recognition processing on the target image to obtain first data information, wherein the first data information includes: document category, and / or the number of documents corresponding to each document category.

[0057] In the embodiments of the present disclosure, there are various ways to perform image recognition processing on a target image to obtain the first data information. In some embodiments, optical character recognition is performed on the target image to obtain the first data information. In other embodiments, image recognition processing is performed on the target image using an image text recognition model to obtain the first data information. The above two methods are merely examples, and this disclosure does not specifically limit the methods for performing image recognition processing on the target image to obtain the first data information.

[0058] In the embodiment of the present disclosure, the first data information refers to information such as text and numbers included in the target image, such as document category and / or the number of documents corresponding to each document category.

[0059] Step 103: Acquire second data information associated with the first data information.

[0060] Step 104: Verify the first data information according to the second data information. If the verification result indicates that the first data information and the second data information are inconsistent, display a preset prompt message.

[0061] In the embodiments of the present disclosure, different first data information will result in different second data information associated with the first data information. In some embodiments, the first data information includes a document category, and a target document category associated with the document category is obtained as the second data information based on a target interface. In other embodiments, the first data information includes the document quantity corresponding to each document category, and the target document quantity corresponding to each document category associated with the document quantity corresponding to each document category is obtained as the second data information.

[0062] In some other embodiments, the first data information includes the number of documents corresponding to each document category, and the number of document cards corresponding to each document category, which is associated with the number of documents corresponding to each document category, is obtained as the second data information. In some other embodiments, the first data information includes the number of documents corresponding to each document category, and statistics are performed based on the number of documents corresponding to each document category to obtain the total number of documents, and the total number of to-do items associated with the total number of documents is obtained as the second data information. The above four methods are merely examples, and this disclosure does not specifically limit the methods for obtaining the second data information associated with the first data information.

[0063] In the embodiments of the present disclosure, different second data information is obtained, and the verification processing of the first data information based on the second data information is also different. In some embodiments, the document category is verified according to the target document category, and if the verification result indicates that the document category and the target document category are inconsistent, a preset prompt information is displayed; in other embodiments, the document quantity corresponding to each document category is verified according to the target document quantity corresponding to each document category, and if the verification result indicates that the document quantity corresponding to each document category and the target document quantity corresponding to each document category are inconsistent, a preset prompt information is displayed.

[0064] In other embodiments, the number of documents corresponding to each document category is verified based on the number of document cards that have been counted for each document category. If the verification result indicates that the number of documents corresponding to each document category is inconsistent with the number of document cards that have been counted for each document category, a preset prompt message is displayed. In other embodiments, the number of all documents is verified based on the total number of to-do items. If the verification result indicates that the number of all documents is inconsistent with the total number of to-do items, a preset prompt message is displayed. The above four methods are merely examples. This disclosure does not impose any specific restrictions on the method of verifying first data information based on second data information and displaying a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent.

[0065] Among them, the preset prompt information can be selected and set according to the needs of the application scenario. For example, prompt information such as "The number of documents corresponding to XX document category is inconsistent", "The total number of to-do items is inconsistent with the number of all documents" can be directly displayed on the terminal interface, or prompt information such as "Document page display error" can be displayed.

[0066] In summary, the data verification method of the disclosed embodiment generates a target image by splicing multiple consecutive document page images to be verified, wherein the target image includes: at least one document category and the number of documents corresponding to each document category, performs image recognition processing on the target image to obtain first data information, wherein the first data information includes: the document category and / or the number of documents corresponding to each document category, obtains second data information associated with the first data information, verifies the first data information based on the second data information, and displays a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent. Thus, by splicing the document page images and then performing image recognition, accurate first data information including the document category and the number of documents corresponding to each document category is obtained, and then verification processing is performed based on the recognized first data information and the associated second data information. If the first data information and the second data information are inconsistent, a preset prompt message is displayed, thereby improving the accuracy and efficiency of list data verification.

[0067] Based on the description of the above embodiments, different stitching processing methods can be selected to stitch together multiple consecutive document page images to generate a target image. For multiple consecutive document page images to be verified, including at least one set of adjacent first and second document page images, the disclosed embodiments provide a method for stitching together multiple consecutive document page images to generate a target image. This is illustrated using image matching data as a target number of similar feature points between the first and second document page images. This method can be implemented by referring to steps a through d below.

[0068] Step a: extract features from the first document page image and the second document page image respectively to obtain a first feature set and a second feature set.

[0069] Step b: matching the first feature set and the second feature set to obtain a target number of similar feature points between the first document page image and the second document page image.

[0070] Step c: obtain the transformation matrix based on the target number of similar feature points.

[0071] Step d: Mapping the pixel coordinates of the first document page image to the corresponding pixel coordinates of the second document page image based on the transformation matrix to obtain a target image.

[0072] The image features in the first feature set and the second feature set may be scale-invariant feature transform (SIFT) or speeded up robust feature (SURF), etc., and the settings are selected according to the application scenario.

[0073] In an embodiment of the present disclosure, a target number of similar feature points are obtained between a first document page image and a second document page image, and a transformation matrix is ​​calculated for transforming the first document page image into the second document page image. The first document page image is transformed by the transformation matrix and placed at a corresponding position in the second document page image. This is equivalent to overlapping a predetermined target number of similar feature points in the first document page image and the second document page image, so as to achieve splicing of the first document page image and the second document page image to obtain a target image.

[0074] In the embodiment of the present disclosure, the target number of similar feature points between the first document page image and the second document page image may have similar feature points with matching errors, such as Figure 2a As shown, A1-A6 and B1-B6 are similar feature points found based on the matching features. Figure 2a C3-B3 in the figure are noise points obtained by mismatching, rather than similar feature points. Therefore, in order to further improve the accuracy of the target image, the noise points can be removed by obtaining a transformation matrix based on the target number of similar feature points.

[0075] Specifically, a preset algorithm such as a random consistent sampling algorithm is used to fit similar feature points based on the target number to obtain a transformation matrix, thereby removing noise points obtained by incorrect matching, improving the accuracy of the target image, and thus improving the accuracy of subsequent data information verification.

[0076] In the embodiment of the present disclosure, there are many ways to obtain a target image by mapping the pixel coordinates of the first document page image to the corresponding pixel coordinates of the second document page image based on the transformation matrix. In a specific embodiment, a common image is created, for example, the common image is filled with all 0s, the common image plane is determined as the central image plane, and the pixel coordinates of the first document page image are mapped to the pixel coordinates of the second document page image based on the transformation matrix on the common image to obtain the target image. As an example, Figure 2a The pixel coordinates of the first document page image in are mapped to the pixel coordinates corresponding to the second document page image to obtain the target image, such as Figure 2b shown.

[0077] Therefore, based on feature matching, a target number of similar feature points before the document page image are obtained, and then a transformation matrix is ​​obtained based on the target number of similar feature points. Finally, based on the transformation matrix, the pixel coordinates of the first document page image are mapped to the pixel coordinates corresponding to the second document page image to obtain the target image, so as to realize fast and accurate splicing of the document page images into the target image, so as to improve the accuracy of subsequent data information verification results.

[0078] It is understandable that feature-based image stitching can still be successful when there is a certain pixel displacement or deviation. However, when multiple similar feature points match in the same image, it may cause image stitching errors. Therefore, for multiple consecutive document page images to be verified, including at least one group of adjacent first document page images and second document page images, the embodiment of the present disclosure provides another implementation method for stitching multiple consecutive document page images to be verified to generate a target image. The image matching data is used as the maximum common substring between the first document page image and the second document page image for illustration, and can be implemented by referring to the following steps 1 to 3.

[0079] Step 1: Obtain a first character string verification code array and a second character string verification code array corresponding to the first document page image and the second document page image.

[0080] Step 2: Compare the first string check code array and the second string check code array to obtain the largest common substring.

[0081] Step 3: Based on the position of the largest common substring in the first character string verification code array and the second character string verification code array, the first document page image and the second document page image are spliced ​​together to obtain a target image.

[0082] In the embodiment of the present disclosure, with the upper left corner of the image as the coordinate origin, the first document page image and the second document page image have no offset in the horizontal axis direction. The first document page image and the second document page image can be converted into a string check code along the vertical axis, and then the maximum common substring of the two string check codes is directly calculated. After calculating the maximum common substring, according to the position of the maximum common substring in the two string check codes, the first document page image and the second document page image can be directly cut and spliced ​​at the corresponding positions to obtain the target image.

[0083] For example, an 800*600 document page image can be parsed into a two-dimensional single-channel pixel matrix with a length of 800 and a width of 600, or it can be understood as an 800-length pixel row array, where each pixel row contains 600 pixels, corresponding to the narrow horizontal pixel rows in the document page image. Pixel rows can be expressed as integer arrays, for example, the pixel row array is [246, 246, ..., 247, 245, 232, 192, 160, 149, 147, 145, 145, 146, 147, 153, 176, 211, 240, 248, 245, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 235, 203, 168, 133, 102, 79, 70, 77, 80, 81, 101, , 129, 146, 146, 146, 145, 145, 147, 144, 129, 97, 80, 80, 73, 70, 78, 99, 131, 158, 201, 234, 228, 165, 74, 49, 133, 214, 202, 178, 175, 177, 177, 6, 246, 246, ..., 246, 246], and then the pixel row array is converted into an integer by means of a check code. Finally, the entire document page image can be regarded as a character check code array with a length of 800.

[0084] Therefore, the character check code arrays of the first document page image and the second document page image are compared to obtain the largest common substring, such as Figure 3aAs shown in the figure, the maximum common substring is [63686, 11200, 28962, 3192, 13419, 35136, 3679, 17480, 56505]. Therefore, based on the position of the maximum common substring in the first string check code and the second string check code, the first document page image and the second document page image are spliced ​​to obtain the target image, as shown in the figure. Figure 3b shown.

[0085] In the embodiments of the present disclosure, there are many ways to obtain a character check code array. In a specific embodiment of the present disclosure, taking a cyclic redundancy check (CRC) as an example, the cyclic redundancy check is generated by a one-to-one correspondence between a code consisting of a binary bit string and a polynomial whose coefficients are only '0' and '1'. The generating polynomial of the CRC16 check code is x16+x15+x2+1.

[0086] Specifically, the first document page image and the second document page image are gray-scaled to obtain corresponding grayscale images, and then the corresponding string check code array is calculated based on the grayscale images. More specifically, in step 1, a 16-bit register is preset to hexadecimal FFFF (i.e., all 1s), and this register is called a CRC register; in step 2, the first 8-bit binary data (such as the byte corresponding to the first pixel of the first document page image) is XORed with the lower 8 bits of the 16-bit CRC register, and the result is placed in the CRC register, while the upper 8 bits remain unchanged; in step 3, the content of the CRC register is shifted right by one bit (towards the low bit direction) and the highest bit is filled with 0, and the shifted-out bit after the right shift is checked; in step 4, if the shifted-out bit is 0: repeat step 3 (shift right by one bit again); if the shifted-out bit is 1, the CRC register is XORed with the polynomial A001 (10100000 0000 0001); Step 5, repeat steps 3 and 4 until the right shift is 8 times, so that the entire 8-bit data is processed; Step 6, repeat steps 2 to 5 to process the byte corresponding to the next pixel of the image (for example, the first document page image); Step 7, after all bytes of the image (for example, the first document page image) are calculated according to the above steps, the high and low bytes of the 16-bit CRC register are swapped; Step 8, the content of the CRC register finally obtained is the cyclic redundancy check code, and the cyclic redundancy check code is used as the character check code array of the image (for example, the first document page image).

[0087] As a result, the calculation speed of the maximum common substring of the verification code is faster, thereby obtaining the target image faster. Moreover, the angle is more stable when using the content of the scenario (such as a screenshot), and no spatial transformation is required. Therefore, the target image synthesized based on the maximum common substring is more accurate, further ensuring the accuracy of the first data information obtained by subsequent image recognition processing, and ultimately ensuring the accuracy of the verification result.

[0088] In some embodiments, a first verification code corresponding to a first target area in a first document page image is obtained, a second verification code corresponding to a second target area in a second document page image is obtained, and the first verification code and the second verification code are deleted from the largest common substring.

[0089] Among them, the first target area refers to the blank area in the first document page image, that is, the area without any text, image or other information; the second target area refers to the blank area in the second document page image, that is, the area without any text, image or other information.

[0090] In the embodiment of the present disclosure, in order to further improve the accuracy of stitching, the check code corresponding to the blank area is deleted from the largest common substring. For example, the check code 18918 corresponding to the blank area is deleted from the largest common substring, thereby reducing the interference of the blank area on the stitching result during stitching and further improving the accuracy of the target image.

[0091] In some embodiments, the first contrast parameter value and the second contrast parameter value corresponding to the first document page image and the second document page image are respectively obtained, the first contrast parameter value is adjusted to the first target contrast parameter value, and the second contrast parameter value is adjusted to the second target contrast parameter value.

[0092] Among them, the first target contrast parameter value and the second target contrast parameter value are pre-set according to application needs. The first contrast parameter value refers to the contrast parameter value corresponding to the first document page image, such as 1.1, and the second contrast parameter value refers to the contrast parameter value corresponding to the second document page image, such as 1.1.

[0093] In an embodiment of the present disclosure, to avoid splicing errors caused by watermarks in images, the first contrast parameter value can be adjusted to a first target contrast parameter value, and the second contrast parameter value can be adjusted to a second target contrast parameter value. For example, the first contrast parameter value of 1.1 can be adjusted to 1.6, and the second contrast parameter value of 1.6 can be adjusted to a second target contrast parameter value of 2.1. The specific values ​​of the first target contrast parameter value and the second target contrast parameter value are set according to the needs of the scene and are not specifically limited by the present disclosure.

[0094] Therefore, by adjusting the contrast parameter value, the problem of inconsistent string verification codes caused by watermarks and the like is avoided, and the accuracy of the target image is further improved to ensure the accuracy of the first data information obtained by subsequent image recognition processing, and ultimately improve the accuracy of the early warning.

[0095] In some embodiments, to further ensure the image stitching effect, a maximum common substring is obtained by comparing from the back of the first document page image forward, and the end of the maximum common substring must be close to the end of the first string. In other words, the overlapping portion must be close to the bottom of the first document page image. For example, the string check code array is compared with the string check code after the target number of digits (such as 30). A smaller range may result in an unsuccessful match, while a larger range is prone to matching errors. The target number is set according to the needs of the specific scenario, and 28-32 is preferably used in the disclosed embodiment.

[0096] Based on the description of the above embodiment, the target image is obtained by splicing the images of consecutive document pages to be verified, and the first data information of the number of valid non-duplicate documents can be accurately counted. In addition, different splicing methods can be selected to ensure the accuracy of the target image, so as to ensure the accuracy of the first data information obtained by subsequent image recognition processing, and ultimately improve the accuracy of the early warning.

[0097] Figure 4 This is a flow chart of another data verification method provided in an embodiment of the present disclosure. Based on the above embodiment, this embodiment further optimizes the above data verification method.

[0098] like Figure 4 As shown, the method includes:

[0099] Step 201 : Obtain a first contrast parameter value and a second contrast parameter value corresponding to a first document page image and a second document page image, respectively, adjust the first contrast parameter value to a first target contrast parameter value, and adjust the second contrast parameter value to a second target contrast parameter value.

[0100] Step 202 : Obtain a first character string verification code array and a second character string verification code array corresponding to the first document page image and the second document page image, and compare the first character string verification code array and the second character string verification code array to obtain a maximum common substring.

[0101] Step 203: Obtain a first verification code corresponding to the first target area in the first document page image, obtain a second verification code corresponding to the second target area in the second document page image, and delete the first verification code and the second verification code from the largest common substring.

[0102] Step 204 : Based on the position of the largest common substring in the first string verification code array and the second string verification code array, the first document page image and the second document page image are spliced ​​together to obtain a target image. The target image includes at least one document category.

[0103] It should be noted that the specific implementation of the above steps S201 to S204 can refer to the above content and will not be repeated here.

[0104] Step 205: Perform image recognition processing on the target image to obtain the document category.

[0105] Step 206: Acquire the target document category associated with the document category based on the target interface.

[0106] Step 207: Verify the document category according to the target document category. If the verification result indicates that the document category is inconsistent with the target document category, a preset prompt message is displayed.

[0107] For example, Figure 5 A schematic diagram of a target image provided for an embodiment of the present disclosure is provided. The target image shown in the figure includes document categories "purchase application", "project application", "contract application" and "public expenditure form". Image recognition processing (such as optical character recognition) is performed on the target image to obtain four different document categories: "purchase application", "project application", "contract application" and "public expenditure form".

[0108] In the disclosed embodiment, the target interface refers to an interface with a backend server, through which the document data stored on the backend server can be obtained. Furthermore, based on the target interface, a target document category associated with a document category is obtained. The target document category refers to a document category stored on the backend server. For example, the target document categories are "Purchase Application," "Project Application," "Contract Application," and "Public Expenditures," four different document categories; another example is the target document categories are "Purchase Application," "Project Application," "Contract Application," "Public Expenditures," and "Application for Seal and License Use," five different document categories.

[0109] In the embodiment of the present disclosure, verifying the document category according to the target document category can be understood as comparing the target document category with the document category to see if they are consistent.

[0110] Continue with Figure 5For example, if the document categories are "Purchase Application", "Project Application", "Contract Application" and "Public Expenditure Order", four different document categories, and the target document categories are "Purchase Application", "Project Application", "Contract Application" and "Public Expenditure Order", four different document categories, the verification result indicates that the document category and the target document category are consistent, and the preset prompt information is not displayed.

[0111] For example, the document categories are "Purchase Application", "Project Application", "Contract Application" and "Public Expenditure Order", four different document categories, and the target document categories are "Purchase Application", "Project Application", "Contract Application", "Public Expenditure Order" and "Seal and Certificate Use Application", five different document categories. If the verification result indicates that the document category is inconsistent with the target document category, the preset prompt message will be displayed.

[0112] Therefore, by comparing the identified document category with the target document category obtained from the back-end server, the correctness of the displayed document quantity is verified, further ensuring the consistency of the document data between the server and the terminal.

[0113] Figure 6 This is a flow chart of another data verification method provided in an embodiment of the present disclosure. Based on the above embodiment, this embodiment further optimizes the above data verification method.

[0114] like Figure 6 As shown, the method includes:

[0115] Step 301 : extract features from the first document page image and the second document page image respectively to obtain a first feature set and a second feature set.

[0116] Step 302 : Matching is performed based on the first feature set and the second feature set to obtain a target number of similar feature points between the first document page image and the second document page image.

[0117] Step 303: Based on the target number of similar feature points, a transformation matrix is ​​obtained, and the pixel coordinates of the first document page image are mapped to the corresponding pixel coordinates of the second document page image based on the transformation matrix to obtain a target image; wherein the target image includes the number of documents corresponding to each document category.

[0118] It should be noted that the specific implementation of the above steps S301 to S303 can refer to the above content and will not be repeated here.

[0119] Step 304: Acquire the target document quantity corresponding to each document category that is associated with the document quantity corresponding to each document category based on the target interface.

[0120] Step 305 , verifying the document quantity corresponding to each document category according to the target document quantity corresponding to each document category. If the verification result indicates that the document quantity corresponding to each document category is inconsistent with the target document quantity corresponding to each document category, a preset prompt message is displayed.

[0121] For example, Figure 7 A schematic diagram of another target image provided by an embodiment of the present disclosure, Figure 7 The target image displayed in the figure includes the document quantity corresponding to each document category, namely "5" for "purchase application", "6" for "project application", "5" for "contract application", and "6" for "public expenditure form". Image recognition processing (such as optical character recognition) is performed on the target image to obtain the document quantity corresponding to each document category, namely "5" for "purchase application", "6" for "project application", "5" for "contract application", and "6" for "public expenditure form".

[0122] In the embodiment of the present disclosure, the target interface refers to an interface with the backend server, through which the document data stored in the backend server can be obtained. Further, based on the target interface, the target document quantity corresponding to each document category and associated with the document quantity corresponding to each document category is obtained.

[0123] In the embodiment of the present disclosure, the target document quantity corresponding to each document category refers to the document quantity corresponding to each document category stored in the back-end server, for example, the target document quantity corresponding to the document category of "purchase application" is "5", the target document quantity corresponding to the document category of "project application" is "6", the target document quantity corresponding to the document category of "contract application" is "5", and the target document quantity corresponding to the document category of "public expenditure order" is "5"; for another example, the target document quantity corresponding to the document category of "purchase application" is "5", the target document quantity corresponding to the document category of "project application" is "6", the target document quantity corresponding to the document category of "contract application" is "5", and the target document quantity corresponding to the document category of "public expenditure order" is "4".

[0124] In the embodiment of the present disclosure, verifying the document quantity corresponding to each document category according to the target document quantity corresponding to each document category can be understood as comparing the document quantity corresponding to each document category with the target document quantity corresponding to each document category to see whether they are consistent.

[0125] Continue with Figure 7For example, for each document category, the number of "Purchase Application" corresponding to "5", the number of "Project Application" corresponding to "6", the number of "Contract Application" corresponding to "5", and the number of "Public Expenditure Order" corresponding to "6" are obtained; if the target document quantity corresponding to the document category "Purchase Application" is "5", the target document quantity corresponding to the document category "Project Application" is "6", the target document quantity corresponding to the document category "Contract Application" is "5", and the target document quantity corresponding to the document category "Public Expenditure Order" is "5", the verification result indicates that the document category and the target document category are consistent, and the preset prompt information is not displayed.

[0126] For example, the target document quantity corresponding to the document category "Purchase Application" is "5", the target document quantity corresponding to the document category "Project Application" is "6", the target document quantity corresponding to the document category "Contract Application" is "5", and the target document quantity corresponding to the document category "Public Expenditure Order" is "4". The verification result indicates that the document quantity "5" corresponding to the document category "Public Expenditure Order" is inconsistent with the target document quantity "4", and the preset prompt message is displayed.

[0127] Therefore, by comparing the document quantity corresponding to each identified document category with the target document quantity corresponding to each document category obtained from the back-end server, the correctness of the displayed document quantity is verified, further ensuring the consistency of the document data between the server and the terminal.

[0128] Figure 8 This is a flow chart of another data verification method provided in an embodiment of the present disclosure. Based on the above embodiment, this embodiment further optimizes the above data verification method.

[0129] like Figure 8 As shown, the method includes:

[0130] Step 401: perform image feature recognition based on the target icons in the document page image to obtain at least one target icon, send a click operation instruction corresponding to the position coordinates of the at least one target icon to the terminal, and obtain a document page image with all documents in a folded state.

[0131] In the embodiment of the present disclosure, interactive operations on the terminal device can be implemented through the automated testing framework. More specifically, the automated testing framework is used to connect to the terminal and open the document page to be verified.

[0132] In the embodiment of the present disclosure, the document page to be verified can be set to the document category as expanded state by default, such as Figure 9a As shown, the document categories "Purchase Application" and "Contract Application" are both in the expanded state, or the document category can be in the collapsed state, for example Figure 9bAs shown, the document categories of "Purchase Application" and "Contract Application" are both in the collapsed state. It is also possible to set some document categories to the expanded state and some document categories to the collapsed state according to actual application needs. The embodiment of the present disclosure does not impose specific restrictions on the status of the document categories in the document page to be verified.

[0133] In an embodiment of the present disclosure, in the case where there is a document category in an expanded state, image feature recognition can be performed based on the expansion icon in the document page image to obtain at least one target icon, and a click operation instruction corresponding to the position coordinates of the at least one target icon is sent to the terminal to obtain a document page image with all documents in a collapsed state.

[0134] The target icon refers to the collapsible icon. More specifically, the collapsible icon and the expandable icon in the document page image are identified through the image feature library (for example, "∧" represents the collapsible icon, and "∨" represents the expandable icon). Figure 9a The image feature recognition of the corresponding document page image is performed, and two "∧"s are obtained to represent the foldable icons. A click operation instruction corresponding to the position coordinates of at least one target icon is sent to the terminal to obtain the document page image of all documents in the folded state. Figure 9b shown.

[0135] Therefore, by folding all the documents in the expanded state, the number of document pages is reduced, thereby reducing the document page images, and finally reducing the jigsaw steps or avoiding the jigsaw process, further improving the data verification efficiency.

[0136] Step 402 : splicing a plurality of consecutive document page images to be verified to generate a target image, wherein the target image includes: at least one document category and the number of documents corresponding to each document category.

[0137] In the embodiment of the present disclosure, when the document page images obtained in which all documents are in the folded state are still multiple consecutive images, it is necessary to splice the multiple consecutive document page images to be verified to generate a target image. The specific splicing implementation method can refer to the above content and will not be repeated here.

[0138] It should be noted that, when there is only a single document page image, it can be directly used as the target image.

[0139] Step 403 : Perform image recognition processing on the target image to obtain the number of documents corresponding to each document category, and perform statistics based on the number of documents corresponding to each document category to obtain the total number of documents.

[0140] Step 404: Obtain the total number of to-do items associated with the total number of documents.

[0141] Step 405: Verify the total number of documents based on the total number of to-do items. If the verification result indicates that the total number of documents is inconsistent with the total number of to-do items, a preset prompt message is displayed.

[0142] In the embodiment of the present disclosure, Figure 9b Taking this as an example, image recognition processing is performed on the target image to obtain the number of documents corresponding to each document category. For example, "Purchase Application" corresponds to "1" and "Contract Application" corresponds to "1". Based on the number of documents corresponding to each document category, statistics are performed to obtain the total number of documents as "2".

[0143] In the embodiments of the present disclosure, there are many ways to obtain the total number of to-do items associated with the total number of documents. In some embodiments, the total number of to-do items is obtained when performing image recognition processing on the target image, such as Figure 9b The "2" in the to-do item (2) shown is the total number of to-do items. In other embodiments, the total number of stored to-do items is obtained based on the interface with the backend server. The above two methods are only examples, and this disclosure does not impose specific restrictions on the method of obtaining the total number of to-do items associated with the total number of documents.

[0144] For example, when performing image recognition processing on a target image, the total number of to-do items is obtained, such as Figure 9b The "2" in the to-do list (2) shown is the total number of to-do items, which corresponds to "1" for "Purchase Application" and "1" for "Contract Application". Based on the number of documents corresponding to each document category, the total number of documents is "2" for verification. The verification result indicates that the total number of documents is consistent with the total number of to-do items, and the preset prompt information is not displayed.

[0145] For example, Figure 9b As shown, the total number of to-do items obtained is "3", which is inconsistent with the number of "Purchase Application" corresponding to "1" and the number of "Contract Application" corresponding to "1". Based on the number of documents corresponding to each document category, the total number of documents obtained is "2", and the preset prompt message is displayed.

[0146] Therefore, by comparing the number of documents corresponding to each document category with the total number of to-do items, the correctness of the displayed document quantity can be quickly verified, thereby improving the accuracy and efficiency of fault prompts.

[0147] Figure 10 This is a flow chart of another data verification method provided in an embodiment of the present disclosure. Based on the above embodiment, this embodiment further optimizes the above data verification method.

[0148] like Figure 10 As shown, the method includes:

[0149] Step 501 : extract features from the first document page image and the second document page image respectively to obtain a first feature set and a second feature set.

[0150] Step 502 : Matching is performed based on the first feature set and the second feature set to obtain a target number of similar feature points between the first document page image and the second document page image.

[0151] Step 503: Based on the target number of similar feature points, a transformation matrix is ​​obtained, and the pixel coordinates of the first document page image are mapped to the corresponding pixel coordinates of the second document page image based on the transformation matrix to obtain a target image; wherein the target image includes the number of documents corresponding to each document category.

[0152] It should be noted that the specific implementation of the above steps S501 to S503 can be referred to the above content and will not be repeated here.

[0153] Step 504: Obtain the counted number of document cards corresponding to each document category that is associated with the document quantity corresponding to each document category.

[0154] Step 505 , verify the document quantity corresponding to each document category based on the counted document card quantity corresponding to each document category. If the verification result indicates that the document quantity corresponding to each document category is inconsistent with the counted document card quantity corresponding to each document category, a preset prompt message is displayed.

[0155] In an embodiment of the present disclosure, there are many ways to obtain the number of counted document cards corresponding to each document category and associated with the number of documents corresponding to each document category. In a specific embodiment, the number of counted document cards corresponding to each document category is obtained when performing image recognition processing on the target image.

[0156] For example, Figure 11 A schematic diagram of another target image provided by an embodiment of the present disclosure is shown. Figure 11 The target image displayed in the figure includes the document quantity corresponding to each document type. "Purchase Application" corresponds to "1", indicating that there is a purchase application document, "Project Application" corresponds to "1", indicating that there is a project application document, and "Contract Application" corresponds to "2", indicating that there are two project application documents.

[0157] Furthermore, when performing image recognition processing on the target image, the number of counted document cards corresponding to each document category is obtained, such as Figure 11As shown, the number of counted document cards corresponding to "Purchase Application" is "1", the number of counted document cards corresponding to "Project Application" is "1", and the number of counted document cards corresponding to "Contract Application" is "2"; for another example, the number of counted document cards corresponding to "Purchase Application" is "1", the number of counted document cards corresponding to "Project Application" is "1", and the number of counted document cards corresponding to "Contract Application" is "1".

[0158] Therefore, the number of documents corresponding to each document category is verified based on the number of counted document cards corresponding to each document category. The number of documents corresponding to each document category is "1" for "Purchase Application", which means there is a document for purchase application, "1" for "Project Application", which means there is a document for project application, and "2" for "Contract Application", which means there are two documents for project application. This is consistent with the number of counted document cards corresponding to "Purchase Application" being "1", "Project Application" being "1", and "Contract Application" being "2", and the preset prompt information is not displayed.

[0159] For another example, the document quantity corresponding to each document category is "1" for "Purchase Application", which indicates that there is one document for purchase application, "1" for "Project Application", which indicates that there is one document for project application, and "2" for "Contract Application", which indicates that there are two documents for project application. After verification, the number of counted document cards corresponding to "Purchase Application" is "1", the number of counted document cards corresponding to "Project Application" is "1", and the number of counted document cards corresponding to "Contract Application" is "1". If the verification results are consistent, "Contract Application" indicates that there are two documents for project application but the corresponding number of counted document cards is "1", and the preset prompt information is displayed.

[0160] Therefore, by comparing the number of documents corresponding to each document category with the actual number of documents displayed, the accuracy of the preset prompt information can be further improved.

[0161] Figure 12 This is a schematic diagram of the structure of a data verification device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. Figure 12 As shown, the device includes:

[0162] The splicing generation module 601 is used to splice a plurality of consecutive document page images to be verified to generate a target image, wherein the target image includes: at least one document category and the number of documents corresponding to each document category.

[0163] The recognition and acquisition module 602 is configured to perform image recognition processing on the target image to acquire first data information, wherein the first data information includes: document category, and / or the number of documents corresponding to each document category.

[0164] The associated data acquisition module 603 is configured to acquire second data information associated with the first data information.

[0165] The verification prompt module 604 is configured to verify the first data information according to the second data information, and display a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent.

[0166] Optionally, the plurality of consecutive document page images to be verified include at least one set of adjacent first document page images and second document page images; the splicing generation module 601 is specifically configured to:

[0167] Performing feature extraction on the first document page image and the second document page image respectively to obtain a first feature set and a second feature set;

[0168] performing matching based on the first feature set and the second feature set to obtain a target number of similar feature points between the first document page image and the second document page image;

[0169] Obtaining a transformation matrix based on the target number of similar feature points;

[0170] The pixel coordinates of the first document page image are mapped to the pixel coordinates corresponding to the second document page image based on the transformation matrix to obtain the target image.

[0171] Optionally, the plurality of consecutive document page images to be verified include at least one set of adjacent first document page images and second document page images; the splicing generation module 601 is specifically configured to:

[0172] Obtaining a first character string verification code array and a second character string verification code array corresponding to the first document page image and the second document page image;

[0173] Comparing the first string check code array and the second string check code array to obtain a maximum common substring;

[0174] The first document page image and the second document page image are spliced ​​based on the position of the largest common substring in the first character string verification code array and the second character string verification code array to obtain the target image.

[0175] Optionally, the module for obtaining associated data 603 is specifically configured to:

[0176] Acquire a target document category associated with the document category based on a target interface;

[0177] The verification prompt module 604 is specifically used to:

[0178] The document category is verified according to the target document category. If the verification result indicates that the document category is inconsistent with the target document category, a preset prompt message is displayed.

[0179] Optionally, the module for obtaining associated data 603 is specifically configured to:

[0180] Acquire, based on a target interface, a target document quantity corresponding to each document category and associated with the document quantity corresponding to each document category;

[0181] The verification prompt module 604 is specifically used to:

[0182] The document quantity corresponding to each document category is verified according to the target document quantity corresponding to each document category. If the verification result indicates that the document quantity corresponding to each document category is inconsistent with the target document quantity corresponding to each document category, a preset prompt message is displayed.

[0183] Optionally, the module for obtaining associated data 603 is specifically configured to:

[0184] Get the number of document cards that have been counted for each document category and the number of documents corresponding to each document category;

[0185] The verification prompt module 604 is specifically used to:

[0186] The number of documents corresponding to each document category is verified according to the number of counted document cards corresponding to each document category. If the verification result indicates that the number of documents corresponding to each document category is inconsistent with the number of counted document cards corresponding to each document category, a preset prompt message is displayed.

[0187] Optionally, the module for obtaining associated data 603 is specifically configured to:

[0188] Counting the number of documents corresponding to each document category to obtain the total number of documents;

[0189] Get the total number of to-do items associated with the total number of documents;

[0190] The verification prompt module 604 is specifically used to:

[0191] The total number of documents is verified according to the total number of to-do items. If the verification result indicates that the total number of documents is inconsistent with the total number of to-do items, a preset prompt message is displayed.

[0192] Optionally, the device further includes:

[0193] an icon recognition module, configured to perform image feature recognition based on a target icon in the document page image to obtain at least one target icon;

[0194] The sending and obtaining module is used to send a click operation instruction of the position coordinates corresponding to the at least one target icon to the terminal, and obtain the document page image with all documents in the folded state.

[0195] Optionally, the device further includes: an acquisition and deletion module, configured to:

[0196] A first verification code corresponding to a first target area in the first document page image is obtained, a second verification code corresponding to a second target area in the second document page image is obtained, and the first verification code and the second verification code are deleted from the maximum common substring.

[0197] Optionally, the device further includes: a contrast adjustment module, configured to:

[0198] A first contrast parameter value and a second contrast parameter value corresponding to the first document page image and the second document page image are respectively obtained; the first contrast parameter value is adjusted to a first target contrast parameter value; and the second contrast parameter value is adjusted to a second target contrast parameter value.

[0199] The data verification device provided in the embodiments of the present disclosure can execute the data verification method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0200] Figure 13 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 13 , which shows a schematic structural diagram of an electronic device 700 suitable for implementing the embodiments of the present disclosure. The electronic device 700 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 13 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0201] like Figure 13 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0202] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 13 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0203] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the data verification method of the embodiment of the present disclosure are performed.

[0204] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0205] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0206] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0207] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device is enabled to: splice multiple consecutive document page images to be verified to generate a target image, wherein the target image includes: at least one document category, and the number of documents corresponding to each document category; perform image recognition processing on the target image to obtain first data information, wherein the first data information includes: document category, and / or, the number of documents corresponding to each document category; obtain second data information associated with the first data information; verify the first data information according to the second data information; if the verification result indicates that the first data information and the second data information are inconsistent, display a preset prompt information.

[0208] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0209] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0210] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.

[0211] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0212] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0213] According to one or more embodiments of the present disclosure, the present disclosure provides a data verification method, including:

[0214] Splicing multiple consecutive document page images to be verified to generate a target image, wherein the target image includes: at least one document category and the number of documents corresponding to each document category;

[0215] Performing image recognition processing on the target image to obtain first data information, wherein the first data information includes: document category, and / or the number of documents corresponding to each document category;

[0216] Acquire second data information associated with the first data information;

[0217] The first data information is verified according to the second data information. If the verification result indicates that the first data information and the second data information are inconsistent, a preset prompt message is displayed.

[0218] According to one or more embodiments of the present disclosure, the plurality of consecutive document page images to be verified include at least one set of adjacent first document page images and second document page images;

[0219] The step of splicing a plurality of consecutive document page images to be verified to generate a target image includes:

[0220] Performing feature extraction on the first document page image and the second document page image respectively to obtain a first feature set and a second feature set;

[0221] performing matching based on the first feature set and the second feature set to obtain a target number of similar feature points between the first document page image and the second document page image;

[0222] Obtaining a transformation matrix based on the target number of similar feature points;

[0223] The pixel coordinates of the first document page image are mapped to the pixel coordinates corresponding to the second document page image based on the transformation matrix to obtain the target image.

[0224] According to one or more embodiments of the present disclosure, the plurality of consecutive document page images to be verified include at least one set of adjacent first document page images and second document page images;

[0225] The step of splicing a plurality of consecutive document page images to be verified to generate a target image includes:

[0226] Obtaining a first character string verification code array and a second character string verification code array corresponding to the first document page image and the second document page image;

[0227] Comparing the first string check code array and the second string check code array to obtain a maximum common substring;

[0228] The first document page image and the second document page image are spliced ​​based on the position of the largest common substring in the first character string verification code array and the second character string verification code array to obtain the target image.

[0229] According to one or more embodiments of the present disclosure, obtaining second data information associated with the first data information includes:

[0230] Acquire a target document category associated with the document category based on a target interface;

[0231] The verifying the first data information according to the second data information, and displaying a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent, includes:

[0232] The document category is verified according to the target document category. If the verification result indicates that the document category is inconsistent with the target document category, a preset prompt message is displayed.

[0233] According to one or more embodiments of the present disclosure, obtaining second data information associated with the first data information includes:

[0234] Acquire, based on a target interface, a target document quantity corresponding to each document category and associated with the document quantity corresponding to each document category;

[0235] The verifying the first data information according to the second data information, and displaying a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent, includes:

[0236] The document quantity corresponding to each document category is verified according to the target document quantity corresponding to each document category. If the verification result indicates that the document quantity corresponding to each document category is inconsistent with the target document quantity corresponding to each document category, a preset prompt message is displayed.

[0237] According to one or more embodiments of the present disclosure, obtaining second data information associated with the first data information includes:

[0238] Get the number of document cards that have been counted for each document category and the number of documents corresponding to each document category;

[0239] The verifying the first data information according to the second data information, and displaying a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent, includes:

[0240] The number of documents corresponding to each document category is verified based on the number of counted document cards corresponding to each document category. If the verification result indicates that the number of documents corresponding to each document category is inconsistent with the number of counted document cards corresponding to each document category, a preset prompt message is displayed.

[0241] According to one or more embodiments of the present disclosure, obtaining second data information associated with the first data information includes:

[0242] Counting the number of documents corresponding to each document category to obtain the total number of documents;

[0243] Get the total number of to-do items associated with the total number of documents;

[0244] The verifying the first data information according to the second data information, and displaying a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent, includes:

[0245] The total number of documents is verified according to the total number of to-do items. If the verification result indicates that the total number of documents is inconsistent with the total number of to-do items, a preset prompt message is displayed.

[0246] According to one or more embodiments of the present disclosure, the method further includes:

[0247] performing image feature recognition based on the target icon in the document page image to obtain at least one target icon;

[0248] A click operation instruction corresponding to the position coordinates of the at least one target icon is sent to the terminal to obtain the document page image in which all documents are in a folded state.

[0249] According to one or more embodiments of the present disclosure, before the splicing processing of the first document page image and the second document page image based on the position of the largest common substring in the first character string verification code and the second character string verification code, the method further includes:

[0250] Obtaining a first verification code corresponding to a first target area in the first document page image;

[0251] Obtaining a second verification code corresponding to a second target area in the second document page image;

[0252] The first check code and the second check code are deleted from the largest common substring.

[0253] According to one or more embodiments of the present disclosure, the data verification method further includes:

[0254] respectively obtaining a first contrast parameter value and a second contrast parameter value corresponding to the first document page image and the second document page image;

[0255] adjusting the first contrast parameter value to a first target contrast parameter value;

[0256] The second contrast parameter value is adjusted to a second target contrast parameter value.

[0257] According to one or more embodiments of the present disclosure, the present disclosure provides a data verification device, including:

[0258] A splicing generation module is used to splice a plurality of consecutive document page images to be verified to generate a target image, wherein the target image includes: at least one document category and the number of documents corresponding to each document category;

[0259] an identification and acquisition module, configured to perform image recognition processing on the target image to acquire first data information, wherein the first data information includes: a document category, and / or a document quantity corresponding to each document category;

[0260] An associated data acquisition module, configured to acquire second data information associated with the first data information;

[0261] The verification prompt module is used to verify the first data information according to the second data information, and if the verification result indicates that the first data information and the second data information are inconsistent, a preset prompt message is displayed.

[0262] According to one or more embodiments of the present disclosure, the plurality of consecutive document page images to be verified include at least one set of adjacent first document page images and second document page images; the splicing generation module is specifically configured to:

[0263] Performing feature extraction on the first document page image and the second document page image respectively to obtain a first feature set and a second feature set;

[0264] performing matching based on the first feature set and the second feature set to obtain a target number of similar feature points between the first document page image and the second document page image;

[0265] Obtaining a transformation matrix based on the target number of similar feature points;

[0266] The pixel coordinates of the first document page image are mapped to the pixel coordinates corresponding to the second document page image based on the transformation matrix to obtain the target image.

[0267] According to one or more embodiments of the present disclosure, the plurality of consecutive document page images to be verified include at least one set of adjacent first document page images and second document page images; the splicing generation module is specifically configured to:

[0268] Obtaining a first character string verification code array and a second character string verification code array corresponding to the first document page image and the second document page image;

[0269] Comparing the first string check code array and the second string check code array to obtain a maximum common substring;

[0270] The first document page image and the second document page image are spliced ​​based on the position of the largest common substring in the first character string verification code array and the second character string verification code array to obtain the target image.

[0271] According to one or more embodiments of the present disclosure, the module for obtaining associated data is specifically configured to:

[0272] Acquire a target document category associated with the document category based on a target interface;

[0273] The verification prompt module is specifically used to:

[0274] The document category is verified according to the target document category. If the verification result indicates that the document category is inconsistent with the target document category, a preset prompt message is displayed.

[0275] According to one or more embodiments of the present disclosure, the module for obtaining associated data is specifically configured to:

[0276] Acquire, based on a target interface, a target document quantity corresponding to each document category and associated with the document quantity corresponding to each document category;

[0277] The verification prompt module is specifically used to:

[0278] The document quantity corresponding to each document category is verified according to the target document quantity corresponding to each document category. If the verification result indicates that the document quantity corresponding to each document category is inconsistent with the target document quantity corresponding to each document category, a preset prompt message is displayed.

[0279] According to one or more embodiments of the present disclosure, the module for obtaining associated data is specifically configured to:

[0280] Get the number of document cards that have been counted for each document category and the number of documents corresponding to each document category;

[0281] The verification prompt module is specifically used to:

[0282] The number of documents corresponding to each document category is verified according to the number of counted document cards corresponding to each document category. If the verification result indicates that the number of documents corresponding to each document category is inconsistent with the number of counted document cards corresponding to each document category, a preset prompt message is displayed.

[0283] According to one or more embodiments of the present disclosure, the module for obtaining associated data is specifically configured to:

[0284] Counting the number of documents corresponding to each document category to obtain the total number of documents;

[0285] Get the total number of to-do items associated with the total number of documents;

[0286] The verification prompt module is specifically used to:

[0287] The total number of documents is verified according to the total number of to-do items. If the verification result indicates that the total number of documents is inconsistent with the total number of to-do items, a preset prompt message is displayed.

[0288] According to one or more embodiments of the present disclosure, the apparatus further includes:

[0289] an icon recognition module, configured to perform image feature recognition based on a target icon in the document page image to obtain at least one target icon;

[0290] The sending and obtaining module is used to send a click operation instruction of the position coordinates corresponding to the at least one target icon to the terminal, and obtain the document page image with all documents in the folded state.

[0291] According to one or more embodiments of the present disclosure, the apparatus further includes: an acquisition and deletion module, configured to:

[0292] A first verification code corresponding to a first target area in the first document page image is obtained, a second verification code corresponding to a second target area in the second document page image is obtained, and the first verification code and the second verification code are deleted from the maximum common substring.

[0293] According to one or more embodiments of the present disclosure, the device further includes: a contrast adjustment module configured to:

[0294] A first contrast parameter value and a second contrast parameter value corresponding to the first document page image and the second document page image are respectively obtained; the first contrast parameter value is adjusted to a first target contrast parameter value; and the second contrast parameter value is adjusted to a second target contrast parameter value.

[0295] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0296] processor;

[0297] a memory for storing instructions executable by the processor;

[0298] The processor is configured to read the executable instructions from the memory and execute the instructions to implement any data verification method provided in the present disclosure.

[0299] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute any data verification method provided by the present disclosure.

[0300] According to one or more embodiments of the present disclosure, the present disclosure provides a computer program product. When instructions in the computer program product are executed by a processor, any data verification method provided by the present disclosure is implemented.

[0301] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0302] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0303] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A data verification method, characterized in that: include: Splicing a plurality of consecutive document page images to be verified, including at least one set of adjacent first document page images and second document page images, to generate a target image, wherein the target image includes at least one document category and the number of documents corresponding to each document category; obtaining a first character string verification code array and a second character string verification code array corresponding to the first document page image and the second document page image, comparing the first character string verification code array and the second character string verification code array to obtain a maximum common substring, and splicing the first document page image and the second document page image based on the maximum common substring to obtain the target image; Performing image recognition processing on the target image to obtain first data information, wherein the first data information includes: document category, and / or the number of documents corresponding to each document category; Acquire second data information associated with the first data information; The first data information is verified according to the second data information. If the verification result indicates that the first data information and the second data information are inconsistent, a preset prompt message is displayed.

2. The method according to claim 1, characterized in that The method further comprises: Performing feature extraction on the first document page image and the second document page image respectively to obtain a first feature set and a second feature set; performing matching based on the first feature set and the second feature set to obtain a target number of similar feature points between the first document page image and the second document page image; The step of splicing the first document page image and the second document page image according to the maximum common substring to obtain the target image includes: Obtaining a transformation matrix based on the target number of similar feature points; The pixel coordinates of the first document page image are mapped to the pixel coordinates corresponding to the second document page image based on the transformation matrix to obtain the target image.

3. The method according to claim 1, characterized in that The step of splicing the first document page image and the second document page image according to the maximum common substring to obtain the target image includes: The first document page image and the second document page image are spliced ​​based on the position of the largest common substring in the first character string verification code array and the second character string verification code array to obtain the target image.

4. The method according to claim 1, wherein The acquiring of second data information associated with the first data information includes: Acquire a target document category associated with the document category based on a target interface; The verifying the first data information according to the second data information, and displaying a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent, includes: The document category is verified according to the target document category. If the verification result indicates that the document category is inconsistent with the target document category, a preset prompt message is displayed.

5. The method according to claim 1, wherein The acquiring of second data information associated with the first data information includes: Acquire, based on a target interface, a target document quantity corresponding to each document category and associated with the document quantity corresponding to each document category; The verifying the first data information according to the second data information, and displaying a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent, includes: The document quantity corresponding to each document category is verified according to the target document quantity corresponding to each document category. If the verification result indicates that the document quantity corresponding to each document category is inconsistent with the target document quantity corresponding to each document category, a preset prompt message is displayed.

6. The method according to claim 1, characterized in that The acquiring of second data information associated with the first data information includes: Get the number of document cards that have been counted for each document category and the number of documents corresponding to each document category; The verifying the first data information according to the second data information, and displaying a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent, includes: The number of documents corresponding to each document category is verified based on the number of counted document cards corresponding to each document category. If the verification result indicates that the number of documents corresponding to each document category is inconsistent with the number of counted document cards corresponding to each document category, a preset prompt message is displayed.

7. The method according to claim 1, characterized in that The acquiring of second data information associated with the first data information includes: Counting the number of documents corresponding to each document category to obtain the total number of documents; Get the total number of to-do items associated with the total number of documents; The verifying the first data information according to the second data information, and displaying a preset prompt message if the verification result indicates that the first data information and the second data information are inconsistent, includes: The total number of documents is verified according to the total number of to-do items. If the verification result indicates that the total number of documents is inconsistent with the total number of to-do items, a preset prompt message is displayed.

8. The method according to claim 1, characterized in that Also includes: performing image feature recognition based on the target icon in the document page image to obtain at least one target icon; A click operation instruction corresponding to the position coordinates of the at least one target icon is sent to the terminal to obtain the document page image in which all documents are in a folded state.

9. The data verification method according to claim 3, wherein: Before splicing the first document page image and the second document page image based on the position of the largest common substring in the first character string verification code array and the second character string verification code array, the method further includes: Obtaining a first verification code corresponding to a first target area in the first document page image; Obtaining a second verification code corresponding to a second target area in the second document page image; The first check code and the second check code are deleted from the largest common substring.

10. The data verification method according to claim 1, wherein: Also includes: respectively obtaining a first contrast parameter value and a second contrast parameter value corresponding to the first document page image and the second document page image; adjusting the first contrast parameter value to a first target contrast parameter value; The second contrast parameter value is adjusted to a second target contrast parameter value.

11. A data verification device, characterized in that: include: a splicing generation module, configured to splice a plurality of consecutive document page images to be verified, including at least one set of adjacent first document page images and second document page images, to generate a target image, wherein the target image includes at least one document category and the number of documents corresponding to each document category; obtain a first string verification code array and a second string verification code array corresponding to the first document page image and the second document page image, compare the first string verification code array and the second string verification code array to obtain a maximum common substring, and splice the first document page image and the second document page image based on the maximum common substring to obtain the target image; an identification and acquisition module, configured to perform image recognition processing on the target image to acquire first data information, wherein the first data information includes: a document category, and / or a document quantity corresponding to each document category; An associated data acquisition module, configured to acquire second data information associated with the first data information; The verification prompt module is used to verify the first data information according to the second data information, and if the verification result indicates that the first data information and the second data information are inconsistent, a preset prompt message is displayed.

12. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the data verification method described in any one of claims 1-10.

13. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and the computer program is used to execute the data verification method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Page interaction method for information browsing of bill documents

    CN107357491A

  • Image processing method and device, storage medium and electronic equipment

    CN111311491A

  • Information verification method and device, computer readable storage medium and electronic equipment

    CN112115836A