Business settlement recording method and system based on digitization

By collecting image, grating and distorting paper bills, digital business settlement records are generated, and errors in the existing technology are solved, and efficient and accurate data processing and management are achieved.

CN118865425BActive Publication Date: 2025-02-25兵器装备集团财务有限责任公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410894249.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2025-02-25
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

In the prior art, the identification and storage of paper bills rely on manual labor, which is prone to problems of identification errors and improper storage, which affects the business settlement of enterprises or organizations.

Method used

By responding to the location recognition of the paper bill, the shooting unit is triggered to collect images of the paper bills, perform grating processing and distortion processing, determine and fill the frame line area, and generate digital business settlement records.

Benefits of technology

It realizes automatic image acquisition and processing of paper bills, improves the accuracy and efficiency of content acquisition, reduces manual errors, and improves data security and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118865425B_ABST
    Figure CN118865425B_ABST
Patent Text Reader

Abstract

The present invention provides a business settlement recording method based on digitization, comprising the following steps: triggering a shooting unit to collect images of the paper bill to obtain an initial bill image; determining the distortion of the initial bill image after gridding processing to obtain grid sub-images with distortion attributes, and performing distortion processing to obtain a current bill image; determining each horizontal line segment and each vertical line segment in the current bill image, and determining a horizontal frame line and a vertical frame line from each of the horizontal line segments and each vertical line segment; performing a line segment filling in a new layer based on the horizontal frame line and the vertical frame line, and performing a second line segment filling in the new layer based on the remaining horizontal line segments and each vertical line segment, to obtain a filling layer including each frame line area; in response to performing a region interaction based on an add operation on any frame line area, performing an add adjustment. The present invention at least improves the accuracy of content recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to data processing technology, and in particular to a business settlement record method and system based on digitization. Background Art

[0002] Business settlement refers to the process of settling payments between enterprises or organizations in accordance with agreed terms and methods after a transaction. In commercial activities, business settlement is a very important link, which involves aspects such as capital flow, account processing and risk management.

[0003] Business settlement involves a variety of bills. The specific type of bill used depends on the nature of the transaction, the agreement between the two parties, and the local laws and regulations. Common bills related to business settlement include: invoices, receipts, bills of exchange, shipping documents, settlement documents, etc.

[0004] In the prior art, paper-based bills are often manually identified and stored. This identification and storage method may lead to problems such as identification errors and improper storage, which may have a certain impact on the enterprise or organization. Summary of the invention

[0005] Based on the above problems, the present invention is proposed to provide a digital business settlement record method and system that overcomes the above problems or at least partially solves the above problems.

[0006] According to one aspect of the present invention, there is provided a digital-based business settlement recording method, comprising the following steps: in response to the position recognition of a paper bill, triggering a shooting unit to capture an image of the paper bill to obtain an initial bill image corresponding to the paper bill;

[0007] Determine the distortion of the initial bill image after gridding based on the distortion determination strategy to obtain each grid sub-image with distortion attributes, and perform distortion processing on each grid sub-image with distortion attributes based on the distortion processing strategy to obtain the current bill image;

[0008] Determine each horizontal line segment and each vertical line segment in the current bill image, and determine a horizontal frame line and a vertical frame line from each horizontal line segment and each vertical line segment based on the line segment characteristics corresponding to each line segment;

[0009] Performing a line segment filling in the newly created layer based on the horizontal frame line and the vertical frame line, and performing a second line segment filling in the newly created layer based on the positional relationship between the remaining horizontal line segments and the vertical line segments and the horizontal frame line and the vertical frame line, so as to obtain a filling layer including each frame line area;

[0010] In response to any terminal performing an area interaction based on an adding operation on any framed area, adding and adjusting the framed area.

[0011] Optionally, in the method according to the present invention, in response to the position recognition of the paper bill, triggering the shooting unit to capture an image of the paper bill to obtain an initial bill image corresponding to the paper bill includes:

[0012] Periodically sending a sampling update signal to the shooting unit, so that the shooting unit acquires a reference image at a preset shooting position according to an acquisition period, and acquires each reference pixel point located in the reference image;

[0013] Calculate the mean of each reference pixel value corresponding to each reference pixel point to obtain the reference pixel mean corresponding to each acquisition cycle, and construct an interval between the reference pixel mean and the retrieved pixel allowable value to obtain a floating difference interval; in response to detecting a trigger pixel point whose corresponding pixel value does not belong to the floating difference interval in the original shooting area of ​​the shooting unit, determine the relative point position of the trigger pixel point and the area center point of the original shooting area, and control the original shooting area to adjust its position based on the relative point position until the paper bill is located in the current shooting area after the position adjustment;

[0014] The shooting unit is controlled to capture an image of the paper bill based on the current shooting area to obtain an initial bill image corresponding to the paper bill.

[0015] Optionally, in the method according to the present invention, determining the relative position of the trigger pixel point and the center point of the original shooting area, and controlling the original shooting area to adjust its position based on the relative position, comprises: establishing an original coordinate system based on the original shooting area, and determining all trigger coordinate points corresponding to all trigger pixel points and a center coordinate point corresponding to the center point of the area in the original coordinate system;

[0016] Determine each edge coordinate point constituting the edge of the original shooting area based on the original coordinate system, and screen out all trigger coordinate points based on the principle of screening out those that coincide with any edge coordinate point;

[0017] Determine each remaining trigger coordinate point and the regional center point as a relative point group, and respectively determine the Euclidean distance between the trigger coordinate point and the regional center point in the same relative point group;

[0018] Determine the trigger coordinate point in the relative point group corresponding to the longest Euclidean distance as the reference coordinate point, and connect the line segments based on the relative point positions of the reference coordinate point and the center point of the area to obtain a reference connecting line;

[0019] The extension direction of the reference connection line is determined as the adjustment direction, and the shooting unit is controlled to move toward the reference connection line along the adjustment direction. During the movement, the position adjustment of the original shooting area is completed by terminating when any trigger coordinate point coincides with any edge coordinate point.

[0020] Optionally, in the method according to the present invention, the distortion of the initial bill image after gridding is determined based on the distortion determination strategy to obtain grid sub-images with distortion attributes, including:

[0021] Perform line segment determination on each grid sub-image based on the trained line segment determination model to obtain image line segments that are located in each grid sub-image and extend continuously;

[0022] Determine the direction of each line segment corresponding to each image line segment, and compare the direction of each line segment with the horizontal direction and the vertical direction to obtain a first comparison value corresponding to the horizontal direction and a second comparison value corresponding to the vertical direction;

[0023] The direction corresponding to the comparison value with a larger value is determined as the reference direction, and each image line segment is compared with the corresponding reference direction line for coincidence to obtain the corresponding coincidence value;

[0024] When the overlap value is less than the overlap threshold, the grid sub-image where the image line segment is located is determined to have a distortion attribute.

[0025] Optionally, in the method according to the present invention, determining the direction of each line segment corresponding to each image line segment, and comparing the direction of each line segment with the horizontal direction and the vertical direction, respectively, to obtain a first comparison value corresponding to the horizontal direction and a second comparison value corresponding to the vertical direction, respectively, comprises:

[0026] Acquire the first image endpoint and the second image endpoint located on both sides of each image line segment and connect the first image endpoint and the second image endpoint with a straight line to obtain an endpoint line segment, and determine the extension direction of the endpoint line segment as the line segment direction of the corresponding image line segment;

[0027] Determine a horizontal angle value between the endpoint line segment and the horizontal direction, and a vertical angle value between the endpoint line segment and the vertical direction, and determine the horizontal angle value and the vertical angle value as a first comparison value and a second comparison value, respectively;

[0028] Among them, when the first comparison value is the same as the second comparison value, the corresponding image line segment is evenly segmented, and the horizontal secondary angle value and the vertical secondary angle value between each image sub-segment and the horizontal direction and the vertical direction are determined respectively.

[0029] Optionally, in the method according to the present invention, the direction corresponding to the comparison value with a larger numerical value is determined as the reference direction, and each image line segment is compared with the corresponding reference direction line for coincidence to obtain corresponding coincidence values, including:

[0030] Establishing a corresponding image coordinate system based on the grid sub-image, and acquiring coordinate points of each line segment constituting each image line segment based on the image coordinate system;

[0031] Determine an endpoint coordinate point corresponding to the first image endpoint or the second image endpoint, and generate a reference direction line extending along the reference direction with the endpoint coordinate point as a starting point;

[0032] Acquire reference coordinate points corresponding to the reference direction line based on the image coordinate system, and determine corresponding line segment coordinate points and reference coordinate points as comparison coordinate groups based on a direction perpendicular to the reference direction, to obtain comparison coordinate groups corresponding to the image line segments;

[0033] Taking the endpoint coordinate point as a comparison starting point, and based on the comparison starting point, sequentially acquiring the Euclidean distances between the corresponding line segment coordinate points and the reference coordinate points for the remaining comparison coordinate groups along the image line segment;

[0034] When the Euclidean distance corresponding to any comparison coordinate group is greater than or equal to the distance threshold, the comparison coordinate group is marked with a first coefficient value;

[0035] When the Euclidean distance corresponding to any comparison coordinate group is less than the distance threshold, the comparison coordinate group is marked with a second coefficient value;

[0036] The average of all the first coefficient values ​​and the second coefficient values ​​is calculated to obtain the coincidence value corresponding to the image line segment.

[0037] Optionally, in the method according to the present invention, each grid sub-image having a distortion attribute is subjected to distortion processing based on a distortion processing strategy to obtain a current bill image, including:

[0038] Determine the line segment center points corresponding to each image line segment located in each grid sub-image, and segment the image line segment based on the line segment center points to obtain upper line segments and lower line segments corresponding to the line segment center points;

[0039] Based on the center point of the line segment, a processing auxiliary line parallel to the corresponding reference direction is established, and the upper line segment and the lower line segment are controlled to move toward the processing auxiliary line until each image line segment coincides with the corresponding processing auxiliary line to obtain the current bill image.

[0040] Optionally, in the method according to the present invention, image line segments corresponding to the horizontal reference direction are determined as transverse line segments, and image line segments corresponding to the vertical reference direction are determined as longitudinal line segments, to obtain transverse line segments and longitudinal line segments located in the current bill image;

[0041] Obtaining each horizontal length corresponding to each horizontal line segment, and each vertical length corresponding to each vertical line segment;

[0042] Determining the horizontal line segments of the maximum length as a horizontal frame determination group based on each horizontal length, determining the vertical line segments of the maximum length as a vertical frame determination group based on each vertical length, and determining the number of first line segments in the horizontal frame determination group and the number of second line segments in the vertical frame determination group respectively;

[0043] When the number of line segments in any frame determination group is equal to 2, all line segments in the corresponding frame determination group are determined as frame lines corresponding to the reference direction;

[0044] When the number of line segments in any border determination group is greater than 2, the positions of all line segments in the corresponding border determination group are judged to determine whether there are any other line segments on both sides of the corresponding line segments, and the line segments that have any other line segments only on one side are determined as the frame lines corresponding to the reference direction.

[0045] Optionally, in the method according to the present invention, a line segment filling is performed in a newly created layer based on the horizontal frame line and the vertical frame line, and a second line segment filling is performed in the newly created layer based on the positional relationship between the remaining horizontal line segments and the vertical line segments and the horizontal frame line and the vertical frame line, so as to obtain a filling layer including each frame line area, including: determining the frame line relative position and frame line relative size between the horizontal frame line and the vertical frame line, and determining the horizontal frame line length and the vertical frame line length corresponding to the frame line relative size based on the retrieved preset size;

[0046] Determine the horizontal frame line position and the vertical frame line position in the newly created layer based on the relative position of the frame line, and perform line segment filling based on the length of the horizontal frame line at the horizontal frame line position and perform line segment filling based on the length of the vertical frame line at the vertical frame line position;

[0047] The horizontal relative position and horizontal relative size between the remaining horizontal line segments and the horizontal frame lines, as well as the vertical relative position and vertical relative size between the remaining vertical line segments and the vertical frame lines are determined respectively, and horizontal line segments with corresponding horizontal relative sizes are established in the newly created layer based on the horizontal relative positions, and vertical line segments with corresponding vertical relative sizes are established in the newly created layer based on the vertical relative positions, so as to obtain a fill layer including each frame line area.

[0048] According to another aspect of the present invention, there is provided a digital-based business settlement record system, comprising:

[0049] A collection module is configured to trigger the shooting unit to collect images of the paper bill in response to the position recognition of the paper bill, so as to obtain an initial bill image corresponding to the paper bill;

[0050] The distortion processing module is configured to perform distortion determination on the initial bill image after gridding based on the distortion determination strategy to obtain each grid sub-image with distortion attributes, and perform distortion processing on each grid sub-image with distortion attributes based on the distortion processing strategy to obtain the current bill image;

[0051] A determination module is configured to determine each horizontal line segment and each vertical line segment in the current bill image, and determine a horizontal frame line and a vertical frame line from each horizontal line segment and each vertical line segment based on the line segment characteristics corresponding to each line segment; a filling module is configured to perform a line segment filling in a newly created layer based on the horizontal frame line and the vertical frame line, and perform a second line segment filling in the newly created layer based on the positional relationship between the remaining horizontal line segments and each vertical line segment and the horizontal frame line and the vertical frame line, so as to obtain a filling layer including each frame line area;

[0052] The adding module is configured to add and adjust any frame line area in response to any terminal performing area interaction based on an adding operation on any frame line area.

[0053] According to the method of the present invention, image acquisition of a paper bill can be triggered based on position recognition to obtain a corresponding initial bill image, and based on the gridding processing of the initial bill image, each grid sub-image is distorted to obtain each grid sub-image with distortion properties, thereby obtaining a corresponding current bill image, ensuring that the content acquisition of the paper bill is comprehensive and accurate; and in the subsequent online conversion process, the frame lines and line segments extracted from the current bill image can be used to complete the first line segment filling and the second line segment filling of the newly created layer to obtain the corresponding filled layer, so as to realize the process of transforming the paper bill from online management to online management, improve the corresponding data security, and can also perform corresponding addition operations on the filled layer based on the needs of the terminal, and can also take into account the user's customization needs, thereby improving the corresponding user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 A flowchart of a digital business settlement recording method according to an embodiment of the present invention is shown;

[0055] Figure 2A schematic diagram of a paper bill in this embodiment is shown;

[0056] Figure 3 A schematic diagram of generating a reference direction line for an image line segment with distortion properties in this embodiment is shown;

[0057] Figure 4 A schematic diagram showing the generation and processing of auxiliary lines for image line segments with distortion properties in this embodiment is shown;

[0058] Figure 5 A structural block diagram of a digital business settlement record system according to another embodiment of the present invention is shown. DETAILED DESCRIPTION

[0059] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary 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 limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0060] Business settlement refers to the process of settling payments between enterprises or organizations in accordance with agreed terms and methods after a transaction. In commercial activities, business settlement is a very important link, which involves aspects such as capital flow, account processing and risk management.

[0061] Business settlement involves a variety of bills. The specific type of bill used depends on the nature of the transaction, the agreement between the two parties, and the local laws and regulations. Common bills related to business settlement include: invoices, receipts, bills of exchange, shipping documents, settlement documents, etc.

[0062] In the prior art, paper-based bills are often manually identified and stored. This identification and storage method may lead to problems such as identification errors and improper storage, which may have a certain impact on the enterprise or organization.

[0063] To solve the problems existing in the above-mentioned prior art, the inventor proposes the solution of the present invention. An embodiment of the present invention provides a digital business settlement record method, which can be executed in a computing device, wherein the computing device can be understood as a terminal device with data processing function, such as a mobile phone, a computer, etc.

[0064] Figure 1 FIG. 1 is a flow chart showing a method for recording business settlement based on digitization according to an embodiment of the present invention. Figure 1 As shown, the method proposed in this embodiment starts from S101, wherein S101 includes the following contents:

[0065] In response to the position recognition of the paper bill, the shooting unit is triggered to capture an image of the paper bill to obtain an initial bill image corresponding to the paper bill.

[0066] For example, in this embodiment, a paper bill can be understood as a bill file corresponding to paper material, and the bill file may include invoices, receipts, bills of exchange, freight documents, settlement documents, etc. In order to be able to retain the data of paper bills online, corresponding image acquisition can be performed based on the paper bills. The specific implementation method may include setting a corresponding shooting unit such as a camera on any table, and since the shooting unit has a corresponding fixed position, the corresponding shooting area can be determined on the table based on the fixed position of the shooting unit. When the user places the paper bill in the corresponding shooting area, the shooting unit can be triggered to capture the image of the paper unit, thereby obtaining the corresponding initial bill image, thereby realizing the offline to online bill conversion.

[0067] For example, Figure 2 A bill schematic diagram of a paper bill in this embodiment is shown, which specifically corresponds to a receipt.

[0068] Furthermore, in this embodiment, the above-mentioned “in response to the position recognition of the paper bill, triggering the shooting unit to capture the image of the paper bill to obtain an initial bill image corresponding to the paper bill” may also include the following steps:

[0069] Periodically sending a sampling update signal to the shooting unit, so that the shooting unit acquires a reference image at a preset shooting position according to an acquisition period, and acquires each reference pixel point located in the reference image;

[0070] Calculate the mean of each reference pixel value corresponding to each reference pixel point to obtain the reference pixel mean corresponding to each acquisition cycle, and construct an interval between the reference pixel mean and the retrieved pixel allowable value to obtain a floating difference interval; in response to detecting a trigger pixel point whose corresponding pixel value does not belong to the floating difference interval in the original shooting area of ​​the shooting unit, determine the relative point position of the trigger pixel point and the area center point of the original shooting area, and control the original shooting area to adjust its position based on the relative point position until the paper bill is located in the current shooting area after the position adjustment;

[0071] The shooting unit is controlled to capture an image of the paper bill based on the current shooting area to obtain an initial bill image corresponding to the paper bill.

[0072] For example, in this embodiment, since the file acquisition of the paper-based bill file is based on the shooting of the shooting unit, the location identification of the paper bill needs to be realized by corresponding pixel value comparison, that is, the location of the paper bill is determined by the difference between the pixel value of the table top where the camera unit is set and the pixel value of the corresponding paper bill; however, in actual application scenarios, the table top is a consumable item, and therefore, it can be replaced at any time based on needs, which will cause the pixel value corresponding to the table top to change, thereby causing a certain reduction in the accuracy of subsequent pixel value comparisons.

[0073] Based on the occurrence of this situation, the server can be set to periodically send a corresponding sampling update signal to the shooting unit, so that the shooting unit acquires the reference image of the preset shooting position according to the acquisition cycle, and acquires each reference pixel point in the reference image. It should be noted that the reference image should be understood as the acquisition image of the countertop where no paper bills or other items are placed, and the reference pixel point is the pixel point of the corresponding countertop. In order to ensure that the reference image acquired based on each acquisition cycle is acquired based on the countertop where no paper bills or other items are placed, the corresponding image acquisition time can be set in a non-working time zone, such as 18:00 to 08:00;

[0074] After the corresponding reference image is acquired, the pixel values ​​of each reference pixel constituting the reference image can be averaged to obtain the reference pixel average corresponding to each acquisition cycle. At the same time, the corresponding pixel allowable value can be retrieved to be added to the reference pixel average to form a corresponding floating difference interval, wherein the pixel allowable value can be understood as the corresponding accuracy allowable range, that is, when any pixel value is in the floating difference interval, it indicates that the pixel point corresponding to the pixel value is the pixel point constituting the table surface; finally, after the above-mentioned floating difference interval is determined, when the shooting unit detects a trigger pixel point whose corresponding pixel value does not belong to the floating difference interval in the original shooting area, it indicates that a paper bill may appear in the original shooting area, that is, subsequent image shooting needs to be performed, therefore, the server determines the relative point position of the trigger pixel point and the area center point of the original shooting area, and adjusts the position of the original shooting area based on the relative point position until the paper bill is located in the current shooting area after the position adjustment, so as to complete the image acquisition of the paper bill and obtain the corresponding initial bill image.

[0075] Furthermore, in this embodiment, the above-mentioned “determining the relative position of the trigger pixel point and the center point of the original shooting area, and controlling the original shooting area to adjust its position based on the relative position” may include the following steps:

[0076] An original coordinate system is established based on the original shooting area, and all trigger coordinate points corresponding to all trigger pixel points and a center coordinate point corresponding to the center point of the area are determined in the original coordinate system;

[0077] Determine each edge coordinate point constituting the edge of the original shooting area based on the original coordinate system, and screen out all trigger coordinate points based on the principle of screening out those that coincide with any edge coordinate point;

[0078] Determine each remaining trigger coordinate point and the regional center point as a relative point group, and respectively determine the Euclidean distance between the trigger coordinate point and the regional center point in the same relative point group;

[0079] Determine the trigger coordinate point in the relative point group corresponding to the longest Euclidean distance as the reference coordinate point, and connect the line segments based on the relative point positions of the reference coordinate point and the center point of the area to obtain a reference connecting line;

[0080] The extension direction of the reference connection line is determined as the adjustment direction, and the shooting unit is controlled to move toward the reference connection line along the adjustment direction. During the movement, the position adjustment of the original shooting area is completed by terminating when any trigger coordinate point coincides with any edge coordinate point.

[0081] For example, in this embodiment, in order to allow the original photographing area after position adjustment to include the corresponding paper bill, the following solution may be used to implement the process:

[0082] First, an original coordinate system may be established based on the original shooting area corresponding to the shooting unit, and trigger coordinate points corresponding to all trigger pixel points and a center coordinate point corresponding to the center point of the area may be determined in the original coordinate system at the same time; then, edge coordinate points of the area edge constituting the original shooting area may be determined again in the original coordinate system, and the positional relationship between each edge coordinate point and each trigger coordinate point may be determined, and all trigger coordinate points having a coincidence relationship with the edge coordinate point may be screened out;

[0083] Then, all remaining trigger coordinate points and regional center points are determined as relative point groups, and the Euclidean distances between the trigger coordinate points and regional center points in the same relative point group are determined respectively;

[0084] Next, the trigger coordinate point in the relative point group corresponding to the longest Euclidean distance is determined as the reference coordinate point, and a line segment is connected based on the relative point position of the reference coordinate point and the center point of the area to obtain the corresponding reference connection line;

[0085] Finally, the extension direction corresponding to the reference connecting line can be determined as the adjustment direction, and the shooting unit can be controlled to move along the adjustment direction toward the reference connecting line at the same time. During the movement, the coincidence of any trigger coordinate point and any edge coordinate point is used as the termination condition to complete the position adjustment of the original shooting area, thereby ensuring that the content of the paper bill can be included in the original shooting area after the position adjustment, so that in the subsequent image shooting process, the complete content of the paper bill can be captured.

[0086] In S102, the following contents are included: based on the distortion determination strategy, the initial bill image after gridding processing is distorted to obtain each grid sub-image with distortion attributes, and based on the distortion processing strategy, each grid sub-image with distortion attributes is distorted to obtain the current bill image.

[0087] For example, in this embodiment, since the paper bill has a certain flexibility, it may be wrinkled and deformed in the process of being placed and picked up many times. In this case, the image content corresponding to the initial bill image obtained by taking the photo may be partially unclear, such as blurred fonts and overlapping fonts. In order to eliminate the distortion caused by the wrinkle shape, it is necessary to perform corresponding distortion processing on the initial bill image. In order to improve the corresponding processing efficiency, the initial bill image can be first gridded to obtain corresponding grid sub-images, and then each grid sub-image can be distorted to obtain grid sub-images with distortion attributes. At the same time, based on the corresponding distortion processing strategy, each grid sub-image with distortion attributes can be distorted to obtain the corresponding current bill image, thereby improving the recognition accuracy of paper bills.

[0088] Furthermore, in this embodiment, the above-mentioned “determining the distortion of the initial bill image after gridding based on the distortion determination strategy to obtain grid sub-images with distortion attributes” may also include the following steps:

[0089] Perform line segment determination on each grid sub-image based on the trained line segment determination model to obtain image line segments that are located in each grid sub-image and extend continuously;

[0090] Based on the line segment shapes corresponding to each image line segment, determine whether each image line segment is a multi-segment line segment, and decompose the image line segment determined to be a multi-segment line segment to obtain each image line segment as a single segment;

[0091] Determine the direction of each line segment corresponding to each image line segment, and compare the direction of each line segment with the horizontal direction and the vertical direction to obtain a first comparison value corresponding to the horizontal direction and a second comparison value corresponding to the vertical direction;

[0092] The direction corresponding to the comparison value with a larger value is determined as the reference direction, and each image line segment is compared with the corresponding reference direction line for coincidence to obtain the corresponding coincidence value;

[0093] When the overlap value is less than the overlap threshold, the grid sub-image where the image line segment is located is determined to have a distortion attribute.

[0094] For example, in this embodiment, first, a corresponding trained line segment determination model may be obtained based on a machine learning method or a neural network learning method, and the line segment determination model may be used to perform corresponding line segment determination on each grid sub-image to obtain image line segments that are located in each grid sub-image and extend continuously.

[0095] Next, after obtaining the corresponding image line segments, the directions of the line segments corresponding to the image line segments can be determined, and the directions of the line segments can be compared with the horizontal direction and the vertical direction based on the direction of each line segment to obtain a first comparison value corresponding to the horizontal direction and a second comparison value corresponding to the vertical direction;

[0096] Next, the first comparison value and the second comparison value corresponding to the same image line segment are numerically compared, and the direction of the comparison value with the larger numerical value is determined as the reference direction, and each image line segment is compared with the corresponding reference direction line for coincidence to obtain a corresponding coincidence value. Here, the reference direction line can be understood as a reference line segment generated along the corresponding horizontal direction or vertical direction;

[0097] Finally, when the coincidence value is less than the preset coincidence threshold, it indicates that the image line segment has a certain degree of distortion. At this time, the grid sub-image where the image line segment is located can be determined as having the corresponding distortion attribute.

[0098] Furthermore, in this embodiment, the above-mentioned “determining the direction of each line segment corresponding to each image line segment, and comparing the direction of each line segment with the horizontal direction and the vertical direction, respectively, to obtain a first comparison value corresponding to the horizontal direction and a second comparison value corresponding to the vertical direction” may also include the following steps:

[0099] Acquire the first image endpoint and the second image endpoint located on both sides of each image line segment and connect the first image endpoint and the second image endpoint with a straight line to obtain an endpoint line segment, and determine the extension direction of the endpoint line segment as the line segment direction of the corresponding image line segment;

[0100] Determine a horizontal angle value between the endpoint line segment and the horizontal direction, and a vertical angle value between the endpoint line segment and the vertical direction, and determine the horizontal angle value and the vertical angle value as a first comparison value and a second comparison value, respectively;

[0101] Among them, when the first comparison value is the same as the second comparison value, the corresponding image line segment is evenly segmented, and the horizontal secondary angle value and the vertical secondary angle value between each image sub-segment and the horizontal direction and the vertical direction are determined respectively.

[0102] For example, in the process of obtaining the corresponding first comparison value and the second comparison value based on each image line segment, the following method may be specifically referred to:

[0103] First, the first image endpoint and the second image endpoint at both ends of each image line segment are obtained, and a straight line is connected based on the relative position of the two to obtain the corresponding endpoint line segment, and the direction of the corresponding line segment is determined based on the extension direction of the endpoint line segment. Here, since the image line segment may have corresponding distortion properties, the obtained endpoint line segment may not completely overlap with the image line segment;

[0104] Finally, the obtained endpoint line segment is compared with the horizontal direction and the vertical direction respectively to obtain the corresponding horizontal angle value and the vertical angle value, and the corresponding first comparison value and the second comparison value are determined based on the obtained horizontal angle value and the vertical angle value; it should be noted that, from the foregoing content, it can be seen that the obtained endpoint line segment and the image line segment may not completely overlap, which can be specifically reflected in that the first image endpoint and the second image endpoint are not located at the same horizontal position or the same vertical position. When the first image endpoint and the second image endpoint are located at the same horizontal position or the same vertical position, it may indicate that the middle position of the image line segment has undergone corresponding distortion, but the end position has not. Therefore, it is necessary to evenly segment the image line segment, and compare each obtained image sub-segment with the horizontal direction and the vertical direction respectively to obtain the corresponding horizontal secondary angle value and the vertical secondary angle value, and at the same time obtain the corresponding first secondary comparison value and the second secondary comparison value.

[0105] Furthermore, in this embodiment, the above-mentioned “determining the direction corresponding to the comparison value with a larger numerical value as the reference direction, and comparing the overlap of each image line segment with the corresponding reference direction line to obtain corresponding overlap values” may include the following steps:

[0106] Establishing a corresponding image coordinate system based on the grid sub-image, and acquiring coordinate points of each line segment constituting each image line segment based on the image coordinate system;

[0107] Determine an endpoint coordinate point corresponding to the first image endpoint or the second image endpoint, and generate a reference direction line extending along the reference direction with the endpoint coordinate point as a starting point;

[0108] Acquire reference coordinate points corresponding to the reference direction line based on the image coordinate system, and determine corresponding line segment coordinate points and reference coordinate points as comparison coordinate groups based on a direction perpendicular to the reference direction, to obtain comparison coordinate groups corresponding to the image line segments;

[0109] Taking the endpoint coordinate point as a comparison starting point, and based on the comparison starting point, sequentially acquiring the Euclidean distances between the corresponding line segment coordinate points and the reference coordinate points for the remaining comparison coordinate groups along the image line segment;

[0110] When the Euclidean distance corresponding to any comparison coordinate group is greater than or equal to the distance threshold, the comparison coordinate group is marked with a first coefficient value;

[0111] When the Euclidean distance corresponding to any comparison coordinate group is less than the distance threshold, the comparison coordinate group is marked with a second coefficient value;

[0112] The average of all the first coefficient values ​​and the second coefficient values ​​is calculated to obtain the coincidence value corresponding to the image line segment.

[0113] For example, in this embodiment, in order to compare the coincidence between each image line segment and the established reference line, it can be implemented based on the following scheme:

[0114] First, a corresponding image coordinate system may be established based on each grid sub-image, and then the coordinate points of each line segment respectively constituting each image line segment in the grid sub-image may be obtained based on the established image coordinate system;

[0115] Next, based on the image coordinate system, the endpoint coordinate points corresponding to the first image endpoint and the second image endpoint are determined, and a reference direction line extending along the reference direction is generated with any endpoint coordinate point as a starting point;

[0116] Next, based on the established image coordinate system, the reference coordinate points constituting the reference direction line are obtained, and the line segment coordinate points and the reference coordinate points arranged in the same direction are determined as a comparison coordinate group based on a direction perpendicular to the reference direction, thereby obtaining the comparison coordinate groups corresponding to the image line segments;

[0117] Then, the endpoint coordinate point obtained above is used as the comparison starting point, and based on the comparison starting point, the Euclidean distances between the line segment coordinate points and the reference coordinate points are obtained for all other comparison coordinate groups along the image line segment in sequence;

[0118] Then, when the Euclidean distance corresponding to any comparison coordinate group is greater than or equal to the distance threshold, it indicates that the distortion amount at the corresponding position is large, and it is necessary to mark it with the first coefficient value; and when the Euclidean distance corresponding to any comparison coordinate group is less than the distance threshold, it indicates that the distortion amount at the corresponding position is small, and it is necessary to mark it with the second coefficient value;

[0119] Finally, the coincidence value of the corresponding image line segment is obtained by calculating the mean of the coefficient values ​​corresponding to each comparison coordinate group.

[0120] It should be noted that, here, the first coefficient value is greater than the second coefficient value.

[0121] Furthermore, in this embodiment, after determining each grid sub-image with distortion properties, corresponding distortion processing can be performed. For example, the above-mentioned "performing distortion processing on each grid sub-image with distortion properties based on the distortion processing strategy to obtain the current bill image" may include the following steps:

[0122] Determine the line segment center points corresponding to each image line segment located in each grid sub-image, and segment the image line segment based on the line segment center points to obtain upper line segments and lower line segments corresponding to the line segment center points;

[0123] Based on the center point of the line segment, a processing auxiliary line parallel to the corresponding reference direction is established, and the upper line segment and the lower line segment are controlled to move toward the processing auxiliary line until each image line segment coincides with the corresponding processing auxiliary line to obtain the current bill image.

[0124] For example, in this embodiment, when performing the corresponding distortion processing, in order to improve the speed of the distortion processing as much as possible while taking into account the distortion processing effect, the following segmented processing method can be selected for performance:

[0125] For example, first, for each grid sub-image, the line segment center points corresponding to each image line segment located therein can be determined respectively, so that the image line segment can be segmented based on the line segment center points to obtain the upper line segment and the lower line segment corresponding to the line segment center points;

[0126] Finally, after obtaining the corresponding upper line segment and lower line segment, a processing auxiliary line parallel to the corresponding reference direction can be established based on the center point of the line segment, and the upper line segment and the lower line segment can be controlled to move in the direction of the processing auxiliary line respectively until each image line segment coincides with the corresponding processing auxiliary line to obtain the corresponding current bill image, thus completing the distortion processing of each grid sub-image with distortion attributes.

[0127] It should be noted that, in this embodiment, the processing auxiliary line and the above-mentioned reference guide line are two different line segments, both of which are used for reference positioning. Among them, the reference guide line is generated based on the endpoint coordinate points, while the corresponding processing auxiliary line is generated based on the center point of the line segment. For example Figure 3 as well as Figure 4 ,in, Figure 3 and Figure 4 This is a schematic diagram of the same image line segment, and it can be clearly seen that the image line segment extending vertically on the left side has distortion properties. Figure 3 The corresponding reference line is generated based on the endpoint coordinates (in Figure 3 ), and Figure 4 The corresponding processing auxiliary line is generated based on the center point of the line segment (in Figure 4 denoted by a dotted line).

[0128] Furthermore, the corresponding upper line segment and lower line segment may also be set to have a bendable property. By controlling the upper line segment and the lower line segment to move toward the processing auxiliary line at the same time, the corresponding distortion processing effect can be improved while also improving the corresponding processing speed.

[0129] In S103, the following contents are included:

[0130] Each horizontal line segment and each vertical line segment in the current bill image is determined, and a horizontal frame line and a vertical frame line are determined from each horizontal line segment and each vertical line segment based on the line segment characteristics corresponding to each line segment.

[0131] For example, in this embodiment, after completing all distortion processing to obtain the corresponding current bill image, the corresponding data content can be extracted based on the current bill image, which specifically includes identifying each horizontal line segment and each vertical line segment located in the current bill image, and determining the horizontal frame lines and vertical frame lines used to constitute the bill border of the current bill image in each horizontal line segment and each vertical line segment, thereby completing the confirmation and extraction of the frame lines.

[0132] For example, in this embodiment, the above-mentioned "determining each horizontal line segment and each vertical line segment in the current bill image, and determining a horizontal frame line and a vertical frame line from each horizontal line segment and each vertical line segment based on the line segment characteristics corresponding to each line segment" may also include the following steps:

[0133] Determine the image line segments corresponding to the horizontal reference direction as transverse line segments, and determine the image line segments corresponding to the vertical reference direction as longitudinal line segments, to obtain the transverse line segments and longitudinal line segments in the current bill image;

[0134] Obtaining each horizontal length corresponding to each horizontal line segment, and each vertical length corresponding to each vertical line segment;

[0135] Determining the horizontal line segments of the maximum length as a horizontal frame determination group based on each horizontal length, determining the vertical line segments of the maximum length as a vertical frame determination group based on each vertical length, and determining the number of first line segments in the horizontal frame determination group and the number of second line segments in the vertical frame determination group respectively;

[0136] When the number of line segments in any frame determination group is equal to 2, all line segments in the corresponding frame determination group are determined as frame lines corresponding to the reference direction;

[0137] When the number of line segments in any border determination group is greater than 2, the positions of all line segments in the corresponding border determination group are judged to determine whether there are any other line segments on both sides of the corresponding line segments, and the line segments that have any other line segments only on one side are determined as the frame lines corresponding to the reference direction.

[0138] For example, in the present embodiment, in the process of determining the corresponding frame lines, the following scheme may be specifically adopted: first, the image line segments corresponding to the horizontal reference direction are determined as horizontal line segments, and the image line segments corresponding to the vertical reference direction are determined as vertical line segments, thereby obtaining the horizontal line segments and the vertical line segments located in the current bill image; then, because in general, the horizontal frame lines and the vertical frame lines constituting the bill frame should generally meet two conditions: 1. They are both located at the outer position, and are used to surround the corresponding bill content; 2. Among the line segments corresponding to the same direction, the corresponding length should be the longest; therefore, the corresponding line segment length should be the longest, based on this, the horizontal line lengths corresponding to the horizontal line segments and the vertical line lengths corresponding to the vertical line segments can be obtained respectively, and all the horizontal line segments corresponding to the maximum length are determined as the horizontal frame determination group, and all the vertical line segments corresponding to the maximum length are determined as the vertical frame determination group;

[0139] Next, since the acquisition of the horizontal border determination group and the vertical border determination group is based on the above condition 2, in order to satisfy the above condition 1 and condition 2 at the same time, further data screening is required, that is, determining the number of line segments in the border determination group;

[0140] Finally, since the bill border generally includes two horizontal frame lines of the same length and two vertical frame lines of the same length, if the number of line segments in any border determination group is equal to 2, it indicates that the two line segments of the border determination group should be located at the outer position. Therefore, all line segments located in the border determination group can be determined as frame lines corresponding to the reference direction; and when the number of line segments in any border determination group is greater than 2, it indicates that it includes line segments with the same length as the frame line but not belonging to the frame line. At this time, corresponding position judgment is required to determine whether there are any other line segments on both sides of the corresponding line segment, and determine the corresponding line segment that exists only on one side as the frame line of the corresponding reference direction, thereby completing the extraction of the frame line.

[0141] In S104, the following contents are included:

[0142] Based on the horizontal frame lines and the vertical frame lines, a line segment filling is performed in the newly created layer. Based on the positional relationship between the remaining horizontal line segments and the vertical line segments and the horizontal frame lines and the vertical frame lines, a secondary line segment filling is performed in the newly created layer to obtain a filled layer including each frame line area.

[0143] For example, in this embodiment, after completing the confirmation and extraction of the horizontal frame lines and the vertical frame lines, a corresponding new layer can be additionally created, and based on the relative position relationship between the horizontal frame lines and the vertical frame lines, a line segment filling is performed in the new layer to form a filled frame line in the new layer. Finally, it is necessary to complete the secondary line segment filling of the new layer based on the position relationship between the remaining horizontal line segments and the vertical line segments and the horizontal frame lines and the vertical frame lines, so as to obtain a filled layer including each frame line area; it should be noted that here, the frame line area refers to the closed area formed by the intersection of each horizontal line segment and each vertical line segment.

[0144] Further, in this embodiment, the above-mentioned "based on the horizontal frame line and the vertical frame line, a line segment filling is performed in the newly created layer, and based on the positional relationship between the remaining horizontal line segments and the vertical line segments and the horizontal frame line and the vertical frame line, a second line segment filling is performed in the newly created layer to obtain a filled layer including each frame line area", may also include the following steps:

[0145] Determine the relative position and relative size of the horizontal frame line and the vertical frame line, and determine the horizontal frame line length and the vertical frame line length corresponding to the relative size of the frame line based on the retrieved preset size;

[0146] Determine the horizontal frame line position and the vertical frame line position in the newly created layer based on the relative position of the frame line, and perform line segment filling based on the length of the horizontal frame line at the horizontal frame line position and perform line segment filling based on the length of the vertical frame line at the vertical frame line position;

[0147] The horizontal relative position and horizontal relative size between the remaining horizontal line segments and the horizontal frame lines, as well as the vertical relative position and vertical relative size between the remaining vertical line segments and the vertical frame lines are determined respectively, and horizontal line segments with corresponding horizontal relative sizes are established in the newly created layer based on the horizontal relative positions, and vertical line segments with corresponding vertical relative sizes are established in the newly created layer based on the vertical relative positions, so as to obtain a fill layer including each frame line area.

[0148] For example, in this embodiment, the above-mentioned one-time line segment filling process may specifically include: by determining the relative frame size between the horizontal frame line and the vertical frame line, and performing a product calculation based on the relative frame size and the preset size, the horizontal frame line length and the vertical frame line length of the corresponding frame line relative size can be obtained; at the same time, based on the relative frame position of the horizontal frame line and the vertical frame line in the current bill image, the corresponding horizontal frame line position and the vertical frame line position are determined in the newly created layer, and the line segment filling based on the horizontal frame line length is performed at the corresponding horizontal frame line position, and the line segment filling based on the vertical frame line length is performed at the vertical frame line position, thereby completing the one-time line segment filling process;

[0149] In addition, the above-mentioned secondary line segment filling process may specifically include:

[0150] The horizontal relative position and horizontal relative size between the remaining horizontal line segments and the horizontal frame lines, and the vertical relative position and vertical relative size between the remaining vertical line segments and the vertical frame lines are determined respectively, and horizontal line segments with corresponding horizontal relative sizes are further established in the newly created layer based on the horizontal relative positions, and main line segments with corresponding vertical relative sizes are established in the newly created layer based on the vertical relative positions, thereby completing the process of filling the secondary line segments and obtaining a filled layer including each frame line area.

[0151] In S105, the following contents are included:

[0152] In response to any terminal performing an area interaction based on an adding operation on any framed area, adding and adjusting the framed area.

[0153] For example, in this embodiment, after the online content conversion of the paper bill is completed to obtain the corresponding fill layer, users with corresponding viewing permissions such as financial personnel and management personnel can view the fill layer; and when any user is viewing, if it is considered that the content in the fill layer needs to be supplemented or adjusted, it can be further performed through interaction, and the specific steps are as follows:

[0154] First, after a terminal device with corresponding permissions obtains the corresponding fill layer, the terminal device can interact with any frame area in the fill layer for a preset time, such as a click of a duration, so as to determine the frame area as the corresponding modification area and make the modification area editable, that is, the user can use the terminal device to add or adjust the content of the modification area, thereby realizing the corresponding adding and adjusting function, and improving the user's customization needs; in addition, when the user's adding and adjusting operation is specifically to add a certain number of character contents, the modification area can also be adaptively adjusted according to the size of the character content, that is, each corresponding frame area has a corresponding adding space, when the size of the added character content exceeds the range allowed by the adding space, the corresponding modification area can be enlarged, and at the same time, in order to ensure the original size of the fill layer, while the modification area is enlarged, other frame areas will also be reduced accordingly to meet the corresponding customization needs and improve the corresponding data display effect.

[0155] To summarize, by triggering image acquisition based on the position recognition of the paper bill, the corresponding initial bill image is obtained, and based on the grid processing of the initial bill image, the distortion of each grid sub-image is determined, so that each grid sub-image with distortion attributes is distorted to obtain the corresponding current bill image, thereby ensuring that the content acquisition of the paper bill is comprehensive and accurate; and in the subsequent online conversion process, the frame lines and line segments extracted from the current bill image can be used to complete the first line segment filling and the second line segment filling of the new layer to obtain the corresponding fill layer, so as to realize the process of transforming the paper bill from online management to online management, improve the corresponding data security, and can also perform corresponding addition operations on the fill layer based on the needs of the terminal, and can also take into account the user's customization needs, thereby improving the corresponding user experience.

[0156] Another embodiment of the present invention provides a digital business settlement record system. Figure 5 As the corresponding system block diagram, the system includes:

[0157] A collection module is configured to trigger the shooting unit to collect images of the paper bill in response to the position recognition of the paper bill, so as to obtain an initial bill image corresponding to the paper bill;

[0158] The distortion processing module is configured to perform distortion determination on the initial bill image after gridding based on the distortion determination strategy to obtain each grid sub-image with distortion attributes, and perform distortion processing on each grid sub-image with distortion attributes based on the distortion processing strategy to obtain the current bill image;

[0159] A determination module is configured to determine each horizontal line segment and each vertical line segment in the current bill image, and determine a horizontal frame line and a vertical frame line from each horizontal line segment and each vertical line segment based on the line segment characteristics corresponding to each line segment; a filling module is configured to perform a line segment filling in a newly created layer based on the horizontal frame line and the vertical frame line, and perform a second line segment filling in the newly created layer based on the positional relationship between the remaining horizontal line segments and each vertical line segment and the horizontal frame line and the vertical frame line, so as to obtain a filling layer including each frame line area;

[0160] The adding module is configured to add and adjust any frame line area in response to any terminal performing area interaction based on an adding operation on any frame line area.

[0161] In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the examples of the present invention. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to implement the content of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the preferred embodiment of the present invention.

[0162] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0163] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0164] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.

[0165] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0166] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present invention and to form different embodiments.

[0167] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.

[0168] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.

[0169] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative and not restrictive with respect to the scope of the present invention, and the scope of the present invention is defined by the appended claims.

Claims

1. A digital business settlement recording method, characterized in that: The following steps are involved: In response to the position identification of the paper bill, triggering the shooting unit to capture an image of the paper bill to obtain an initial bill image corresponding to the paper bill; Determine the distortion of the initial bill image after gridding based on the distortion determination strategy to obtain each grid sub-image with distortion attributes, and perform distortion processing on each grid sub-image with distortion attributes based on the distortion processing strategy to obtain the current bill image; Determine each horizontal line segment and each vertical line segment in the current bill image, and determine a horizontal frame line and a vertical frame line from each horizontal line segment and each vertical line segment based on the line segment characteristics corresponding to each line segment; Performing a line segment filling in the newly created layer based on the horizontal frame line and the vertical frame line, and performing a second line segment filling in the newly created layer based on the positional relationship between the remaining horizontal line segments and the vertical line segments and the horizontal frame line and the vertical frame line, so as to obtain a filling layer including each frame line area; In response to any terminal performing an area interaction based on an adding operation on any framed area, adding and adjusting the framed area; In response to the position recognition of the paper bill, the shooting unit is triggered to capture an image of the paper bill to obtain an initial bill image corresponding to the paper bill, including: Periodically sending a sampling update signal to the shooting unit, so that the shooting unit acquires a reference image at a preset shooting position according to an acquisition period, and acquires each reference pixel point located in the reference image; Calculate the mean of each reference pixel value corresponding to each reference pixel point to obtain the reference pixel mean value corresponding to each acquisition cycle, and construct an interval between the reference pixel mean value and the retrieved pixel allowable value to obtain a floating difference interval; In response to detecting a trigger pixel point whose corresponding pixel value does not fall within the floating difference interval in the original shooting area of ​​the shooting unit, determining the relative position of the trigger pixel point and the center point of the original shooting area, and controlling the original shooting area to adjust its position based on the relative position until the paper bill is located in the current shooting area after the position adjustment; The shooting unit is controlled to capture an image of the paper bill based on the current shooting area to obtain an initial bill image corresponding to the paper bill.

2. The digital business settlement recording method according to claim 1, characterized in that: Determining the relative position of the trigger pixel point and the center point of the original shooting area, and controlling the original shooting area to adjust its position based on the relative position, including: An original coordinate system is established based on the original shooting area, and all trigger coordinate points corresponding to all trigger pixel points and a center coordinate point corresponding to the center point of the area are determined in the original coordinate system; Determine the edge coordinate points of the area edge constituting the original shooting area based on the original coordinate system, and screen out all trigger coordinate points based on the principle of screening out the points that coincide with any edge coordinate point; Determine each remaining trigger coordinate point and the regional center point as a relative point group, and respectively determine the Euclidean distance between the trigger coordinate point and the regional center point in the same relative point group; Determine the trigger coordinate point in the relative point group corresponding to the longest Euclidean distance as the reference coordinate point, and connect the line segments based on the relative point positions of the reference coordinate point and the center point of the area to obtain a reference connecting line; The extension direction of the reference connection line is determined as the adjustment direction, and the shooting unit is controlled to move toward the reference connection line along the adjustment direction. During the movement, the position adjustment of the original shooting area is completed by terminating when any trigger coordinate point coincides with any edge coordinate point.

3. The digital business settlement recording method according to claim 1 is characterized in that: Based on the distortion determination strategy, the distortion of the initial bill image after gridding is determined to obtain grid sub-images with distortion attributes, including: Perform line segment determination on each grid sub-image based on the trained line segment determination model to obtain image line segments that are located in each grid sub-image and extend continuously; Determine the direction of each line segment corresponding to each image line segment, and compare the direction of each line segment with the horizontal direction and the vertical direction to obtain a first comparison value corresponding to the horizontal direction and a second comparison value corresponding to the vertical direction; The direction corresponding to the comparison value with a larger value is determined as the reference direction, and each image line segment is compared with the corresponding reference direction line for coincidence to obtain the corresponding coincidence value; When the overlap value is less than the overlap threshold, the grid sub-image where the image line segment is located is determined to have a distortion attribute.

4. The digital business settlement recording method according to claim 3 is characterized in that: Determining the direction of each line segment corresponding to each image line segment, and comparing the direction of each line segment with the horizontal direction and the vertical direction, respectively, to obtain a first comparison value corresponding to the horizontal direction and a second comparison value corresponding to the vertical direction, respectively, including: Acquire the first image endpoint and the second image endpoint located on both sides of each image line segment and connect the first image endpoint and the second image endpoint with a straight line to obtain an endpoint line segment, and determine the extension direction of the endpoint line segment as the line segment direction of the corresponding image line segment; Determine a horizontal angle value between the endpoint line segment and the horizontal direction, and a vertical angle value between the endpoint line segment and the vertical direction, and determine the horizontal angle value and the vertical angle value as a first comparison value and a second comparison value, respectively; Among them, when the first comparison value is the same as the second comparison value, the corresponding image line segment is evenly segmented, and the horizontal secondary angle value and the vertical secondary angle value between each image sub-segment and the horizontal direction and the vertical direction are determined respectively.

5. The digital business settlement recording method according to claim 4 is characterized in that: The direction corresponding to the comparison value with a larger value is determined as the reference direction, and each image line segment is compared with the corresponding reference direction line for coincidence, and the corresponding coincidence values ​​are obtained, including: Establishing a corresponding image coordinate system based on the grid sub-image, and acquiring coordinate points of each line segment constituting each image line segment based on the image coordinate system; Determine an endpoint coordinate point corresponding to the first image endpoint or the second image endpoint, and generate a reference direction line extending along the reference direction with the endpoint coordinate point as a starting point; Acquire reference coordinate points corresponding to the reference direction line based on the image coordinate system, and determine corresponding line segment coordinate points and reference coordinate points as comparison coordinate groups based on a direction perpendicular to the reference direction, to obtain comparison coordinate groups corresponding to the image line segments; Taking the endpoint coordinate point as a comparison starting point, and based on the comparison starting point, sequentially acquiring the Euclidean distances between the corresponding line segment coordinate points and the reference coordinate points for the remaining comparison coordinate groups along the image line segment; When the Euclidean distance corresponding to any comparison coordinate group is greater than or equal to the distance threshold, the comparison coordinate group is marked with a first coefficient value; When the Euclidean distance corresponding to any comparison coordinate group is less than the distance threshold, the comparison coordinate group is marked with a second coefficient value; The average of all the first coefficient values ​​and the second coefficient values ​​is calculated to obtain the coincidence value corresponding to the image line segment.

6. The digital business settlement recording method according to claim 5 is characterized in that Based on the distortion processing strategy, each grid sub-image with distortion attributes is distorted to obtain the current bill image, including: Determine the line segment center points corresponding to each image line segment located in each grid sub-image, and segment the image line segment based on the line segment center points to obtain upper line segments and lower line segments corresponding to the line segment center points; Based on the center point of the line segment, a processing auxiliary line parallel to the corresponding reference direction is established, and the upper line segment and the lower line segment are controlled to move toward the processing auxiliary line until each image line segment coincides with the corresponding processing auxiliary line to obtain the current bill image.

7. The digital business settlement recording method according to claim 3 is characterized in that: Determining each horizontal line segment and each vertical line segment in the current bill image, and determining a horizontal frame line and a vertical frame line from each horizontal line segment and each vertical line segment based on the line segment characteristics corresponding to each line segment, including: Determine the image line segments corresponding to the horizontal reference direction as transverse line segments, and determine the image line segments corresponding to the vertical reference direction as longitudinal line segments, to obtain the transverse line segments and longitudinal line segments in the current bill image; Obtaining each horizontal length corresponding to each horizontal line segment, and each vertical length corresponding to each vertical line segment; Determining the horizontal line segments of the maximum length as a horizontal frame determination group based on each horizontal length, determining the vertical line segments of the maximum length as a vertical frame determination group based on each vertical length, and determining the number of first line segments in the horizontal frame determination group and the number of second line segments in the vertical frame determination group respectively; When the number of line segments in any frame determination group is equal to 2, all line segments in the corresponding frame determination group are determined as frame lines corresponding to the reference direction; When the number of line segments in any border determination group is greater than 2, the positions of all line segments in the corresponding border determination group are judged to determine whether there are any other line segments on both sides of the corresponding line segments, and the line segments that have any other line segments only on one side are determined as the frame lines corresponding to the reference direction.

8. The digital business settlement recording method according to claim 1 is characterized in that: Based on the horizontal frame line and the vertical frame line, a line segment filling is performed in the newly created layer. Based on the positional relationship between the remaining horizontal line segments and the vertical line segments and the horizontal frame line and the vertical frame line, a second line segment filling is performed in the newly created layer to obtain a filling layer including each frame line area, including: Determine the relative position and relative size of the horizontal frame line and the vertical frame line, and determine the horizontal frame line length and the vertical frame line length corresponding to the relative size of the frame line based on the retrieved preset size; Determine the horizontal frame line position and the vertical frame line position in the newly created layer based on the relative position of the frame line, and perform line segment filling based on the length of the horizontal frame line at the horizontal frame line position and perform line segment filling based on the length of the vertical frame line at the vertical frame line position; The horizontal relative position and horizontal relative size between the remaining horizontal line segments and the horizontal frame lines, as well as the vertical relative position and vertical relative size between the remaining vertical line segments and the vertical frame lines are determined respectively, and horizontal line segments with corresponding horizontal relative sizes are established in the newly created layer based on the horizontal relative positions, and vertical line segments with corresponding vertical relative sizes are established in the newly created layer based on the vertical relative positions, so as to obtain a fill layer including each frame line area.

9. A digital business settlement record system, characterized in that: include: A collection module is configured to trigger the shooting unit to collect images of the paper bill in response to the position recognition of the paper bill, so as to obtain an initial bill image corresponding to the paper bill; The distortion processing module is configured to perform distortion determination on the initial bill image after gridding based on the distortion determination strategy to obtain each grid sub-image with distortion attributes, and perform distortion processing on each grid sub-image with distortion attributes based on the distortion processing strategy to obtain the current bill image; A determination module is configured to determine each horizontal line segment and each vertical line segment in the current bill image, and determine a horizontal frame line and a vertical frame line from each horizontal line segment and each vertical line segment based on the line segment characteristics corresponding to each line segment; A filling module is configured to perform a line segment filling in a newly created layer based on the horizontal frame line and the vertical frame line, and perform a secondary line segment filling in the newly created layer based on the positional relationship between the remaining horizontal line segments and the vertical line segments and the horizontal frame line and the vertical frame line, so as to obtain a filling layer including each frame line area; An adding module, configured to add and adjust any frame line area in response to any terminal performing a region interaction based on an adding operation on any frame line area; In response to the position recognition of the paper bill, the shooting unit is triggered to capture an image of the paper bill to obtain an initial bill image corresponding to the paper bill, including: Periodically sending a sampling update signal to the shooting unit, so that the shooting unit acquires a reference image at a preset shooting position according to an acquisition period, and acquires each reference pixel point located in the reference image; Calculate the mean of each reference pixel value corresponding to each reference pixel point to obtain the reference pixel mean value corresponding to each acquisition cycle, and construct an interval between the reference pixel mean value and the retrieved pixel allowable value to obtain a floating difference interval; In response to detecting a trigger pixel point whose corresponding pixel value does not fall within the floating difference interval in the original shooting area of ​​the shooting unit, determining the relative position of the trigger pixel point and the center point of the original shooting area, and controlling the original shooting area to adjust its position based on the relative position until the paper bill is located in the current shooting area after the position adjustment; The shooting unit is controlled to capture an image of the paper bill based on the current shooting area to obtain an initial bill image corresponding to the paper bill.

Citation Information

Patent Citations

  • Table image inclination angle determination method based on support vector machine

    CN113516103A