Information processing method and device, electronic equipment and storage medium
By preprocessing the original image and extracting feature information, combined with the coding classification model and content extraction model, the problem of low recognition accuracy caused by the wide variety of credentials is solved, and efficient and accurate recognition of credential content and improved user experience are achieved.
Patent Information
- Application Number
- CN202510722752.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-12
AI Technical Summary
There are many types of credentials in the existing technology. When directly identifying them through OCR technology, they are easily affected by irrelevant content, resulting in low accuracy in credential content recognition.
By obtaining the original image for preprocessing, the feature information of the target image is determined and input into the pre-trained coding classification model, the target code is output, and the corresponding content extraction model is called for content recognition to improve the accuracy of the credential content.
It achieves fast and efficient identification of the business type of the certificate to be identified, improves the accuracy of certificate content extraction, and enhances the user experience.
Smart Images

Figure CN120635904A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an information processing method, device, electronic device and storage medium. Background Art
[0002] When managing transaction risks, the content of the voucher is usually identified to determine whether the business corresponding to the voucher content has been completed by the user.
[0003] Currently, existing technologies primarily utilize optical character recognition (OCR) technology to directly identify the content of vouchers. However, due to the wide variety of voucher types, direct OCR recognition may not accurately locate the required content within each voucher and is easily affected by irrelevant content within the voucher, resulting in low accuracy in the identified voucher content. Summary of the Invention
[0004] The present invention provides an information processing method, device, electronic device and storage medium, which accurately and efficiently realize the identification of the business type of the certificate to be identified, improve the accuracy of subsequent extraction of certificate content in the certificate to be identified, and enhance the user experience.
[0005] According to one aspect of the present invention, there is provided an information processing method, the method comprising:
[0006] Obtaining an original image corresponding to the credential to be identified, and preprocessing the original image to obtain a target image;
[0007] Determining characteristic information of the target image under at least one preset indicator;
[0008] Inputting feature information under at least one preset indicator into a pre-trained code classification model for code recognition, and outputting a target code of the original image; wherein the target code is used to represent the business type corresponding to the credential to be identified;
[0009] The content extraction model corresponding to the target code is called to perform content recognition on the target image to obtain the credential content in the credential to be recognized.
[0010] According to another aspect of the present invention, there is provided an information processing device, the device comprising:
[0011] A target image determination module is used to obtain an original image corresponding to the credential to be identified and pre-process the original image to obtain a target image;
[0012] A feature information determination module, configured to determine feature information of a target image under at least one preset indicator;
[0013] The target code recognition module is used to input feature information under at least one preset indicator into a pre-trained code classification model for code recognition and output the target code of the original image; wherein the target code is used to represent the business type corresponding to the credential to be identified;
[0014] The image content extraction module is used to call the content extraction model corresponding to the target code to perform content recognition on the target image to obtain the voucher content in the voucher to be recognized.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the information processing method of any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions, which are used to enable a processor to implement the information processing method of any embodiment of the present invention when executed.
[0020] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein the computer program implements the information processing method according to any embodiment of the present invention when executed by a processor.
[0021] The technical solution of the embodiment of the present invention obtains the original image corresponding to the credential to be identified, pre-processes the original image, and obtains the target image. By performing image pre-processing on the original image, the accuracy of subsequent image processing is guaranteed. The characteristic information of the target image under at least one preset indicator is determined, and the characteristic information under at least one preset indicator is input into a pre-trained coding classification model for coding recognition processing, and a target code corresponding to the original image is output. Based on this, the problem of low efficiency and inaccuracy in credential recognition caused by directly using OCR technology to directly identify and process credentials of various business types in the prior art is solved. By first determining the target code corresponding to the credential to be identified, the business type of the credential to be identified can be determined quickly and efficiently. The content extraction model corresponding to the business type is called to perform content recognition processing on the target image through the content extraction model to obtain the credential content in the credential to be identified. The present invention solves the problem of low accuracy in voucher content recognition in the prior art caused by the wide variety of voucher types and the direct use of OCR technology to perform voucher content recognition processing. By first determining the business type of the voucher to be identified based on a coding classification model, the business type of the voucher to be identified is accurately and efficiently recognized, and then the content extraction model corresponding to the business type is called to identify the target image corresponding to the voucher, thereby improving the accuracy of voucher content extraction in the voucher to be identified and enhancing the user experience.
[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 is a flow chart of an information processing method provided by an embodiment of the present invention;
[0025] Figure 2 is an example diagram of theoretical coding provided by an embodiment of the present invention;
[0026] Figure 3 This is an example diagram of a regional model cluster provided by an embodiment of the present invention;
[0027] Figure 4 is a flow chart of an information processing method provided by an embodiment of the present invention;
[0028] Figure 5 This is a flowchart of a coding classification model training method provided by an embodiment of the present invention;
[0029] Figure 6 is a structural diagram of an information processing device provided by an embodiment of the present invention;
[0030] Figure 7 It is a structural diagram of an electronic device for implementing the information processing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Example 1
[0034] Figure 1 This is a flowchart of an information processing method provided by the first embodiment of the present invention. This embodiment is applicable to the case where the business type of a voucher is determined and the corresponding content extraction model is retrieved according to the business type of the voucher to extract content from the voucher. The method can be executed by an information processing device, which can be implemented in the form of hardware and / or software. The information processing device can be configured in an electronic device such as a mobile phone, computer or server. Figure 1 As shown, the method includes:
[0035] S110 , obtaining an original image corresponding to the credential to be identified, and preprocessing the original image to obtain a target image.
[0036] In actual application, when a user handles a business, a corresponding business voucher is generated. The business vouchers corresponding to different business types are different. In order to accurately extract the information in the business voucher later, the business type corresponding to the current business voucher can be determined first. That is, the business voucher whose business type needs to be identified can be used as the voucher to be identified. The business voucher can be understood as a physical or electronic document used for a transaction. The business voucher records various information related to the business transaction behavior. For example, the transaction date, transaction transfer resources, and account information. The original image can be the image corresponding to the voucher to be identified. That is, the original image contains the voucher to be identified. Optionally, the original image can be an image of the voucher to be identified that was photographed or scanned and uploaded by the business processing personnel.
[0037] Preprocessing can be understood as performing image processing on the original image to facilitate subsequent accurate identification of the service type. Optionally, preprocessing can include resizing and grayscale adjustment of the original image. The target image can be the image obtained after preprocessing the original image.
[0038] Specifically, an original image corresponding to the credential to be identified is obtained. In order to facilitate the subsequent accurate determination of the business type corresponding to the credential to be identified, the original image can be resized and grayscaled, and the adjusted original image is used as the target image.
[0039] In an embodiment of the present invention, the method of preprocessing the original image can be: adjusting the size according to the actual size information and preset size information corresponding to the credential to be identified in the original image to obtain an image to be processed that is consistent with the preset size information; setting the pixel values of the pixels in the area corresponding to the preset size information in the image to be processed and outside the area corresponding to the actual size information to the preset pixel values to obtain the image to be used; and obtaining the target image by grayscale processing the image to be used.
[0040] Among them, the actual size information can be understood as the size of the credential to be identified in the original image. The preset size information can be the preset credential size information. The image to be processed can be the image after the original image is resized. It should be noted that since the original image of the credential to be identified uploaded by the user is usually a rectangular image, there may be an image orientation uncertainty problem. In order to ensure the accuracy of subsequent recognition, the original image of the credential to be identified can be adjusted to a square image with the preset size information. The pixels within the area corresponding to the preset size information and outside the area corresponding to the actual size information can be the pixels in the image to be processed that are within the preset size information and outside the actual size information. The preset pixel value can be a preset standard pixel value for the pixels that are within the preset size information and outside the actual size information. Optionally, in order to improve the intra-class similarity of subsequent credential images of the same business type and the inter-class difference of credential images of different business types, the preset pixel value can be set to 0, that is, the pixel value corresponding to black.
[0041] The image to be used can be a credential image obtained by adjusting the pixel values of pixels in the image to be processed that fall within the preset size information but outside the actual size information to the preset pixel values. To eliminate the effects of lighting when photographing the credential to be recognized, the image to be used can be grayscale processed. In other words, the target image is the credential image obtained after grayscale processing of the image to be used.
[0042] Specifically, the actual size information corresponding to the credential to be identified in the original image is resized to obtain a processed image that matches the preset size information. The pixel values within the area corresponding to the preset size information and outside the area corresponding to the actual size information in the processed image are then set to the preset pixel values to obtain the image to be used. To eliminate the effects of lighting factors in the image and ensure that the image features are optically invariant, the image to be used can be grayscale processed to obtain the target image.
[0043] For example, a preset pixel value of 0 is used for illustration. During the process of processing business for a user, a voucher is generated, i.e., the voucher to be identified. The corresponding staff member can scan or photograph the voucher to be identified, and upload the original image to the system corresponding to the embodiment of the present invention. The original image corresponding to the voucher to be identified is obtained. Because the image orientation of the original image photographed and uploaded by the staff member is uncertain, and the original image is typically rectangular, to ensure rotational invariance of subsequent images, the rectangular original image can be adjusted to a square image. Specifically, black rectangular blocks are padded at the edges of the original image to convert the original image into a square image with consistent width and height. Because the pixel values of the pixels in the padded black rectangular blocks are all preset pixel values, i.e., there is no pixel gradient between pixels, when the subsequent encoding classification model processes the feature vector corresponding to the image, the corresponding pixels in the feature vector are typically represented by a series of equal-valued numbers. This can improve the intra-class similarity of subsequent voucher images of the same business type, as well as the inter-class differentiation of voucher images of different business types.
[0044] In addition, since the original images uploaded by different staff members may have inconsistent image sizes, and the original images of the same business type uploaded by the same staff member may also have size differences, the nearest neighbor interpolation method can be used to adjust the square image with consistent width and height to a square image with consistent width and height under preset size information, that is, the image to be used, to facilitate the subsequent encoding and classification model to perform pixel-level feature recognition processing on the image.
[0045] Because the images to be recognized at different times may have been captured under different circumstances, the color images to be used can be converted to grayscale images and then smoothed to reduce the influence of noise, resulting in the target image. This ensures that the image features of the target image are optically invariant, eliminating the impact of images under different lighting conditions on classification accuracy.
[0046] S120: Determine feature information of the target image under at least one preset indicator.
[0047] The preset indicator may be a pre-set indicator for image feature extraction. Optionally, the at least one preset indicator may include at least one of a gradient direction indicator, a local binary pattern feature (LBP), a scale-invariant feature transform (SIFT), and a speeded-up robust feature (SURF).
[0048] Specifically, feature extraction is performed on the target image according to at least one preset indicator to obtain feature information under the corresponding feature indicator.
[0049] Optionally, the preset indicator includes a gradient direction indicator, and the method for determining the characteristic information of the target image under the gradient direction indicator can be to determine the pixel gradient information of any pixel point in the target image based on the pixel point and at least one pixel point adjacent to the pixel point; wherein the pixel gradient information includes at least the gradient direction; determine the gradient distribution histogram corresponding to the target image based on the gradient directions of all pixel points and a plurality of predetermined direction intervals; and use the gradient distribution histogram as the characteristic information corresponding to the gradient direction indicator.
[0050] Pixel gradient information can be understood as the pixel change value and pixel change direction between the pixel values of at least one adjacent pixel point. The pixel change value is the gradient amplitude. The pixel change direction is the gradient direction. The direction interval can be a pre-set standard direction interval corresponding to the gradient direction. For example, the preset gradient direction (0 degrees to 180 degrees) is divided into several direction intervals, for example, divided into 9 direction intervals, each covering 20 degrees.
[0051] The gradient distribution histogram can be a gradient direction histogram determined based on the gradient direction and gradient magnitude corresponding to each pixel in the target image. For example, if the target image contains 60 pixels, the direction interval to which the gradient direction of each pixel belongs can be determined, and the gradient magnitude of the pixel can be weighted to the corresponding direction interval to obtain the gradient distribution histogram. Optionally, the horizontal axis of the gradient direction histogram represents the direction interval, and the vertical axis represents the sum of the weighted gradient magnitudes.
[0052] Specifically, after determining the target image, the contrast of the target image can be adjusted to obtain the target image after the contrast is adjusted. For any pixel point in the target image after the contrast is adjusted, the gradient amplitude and gradient direction of the pixel point are determined based on the pixel point and at least one pixel point adjacent to the pixel point. The gradient amplitude and gradient direction are used as the pixel gradient information corresponding to the pixel point. According to the gradient directions corresponding to all pixels and a plurality of predetermined direction intervals, the direction interval corresponding to each pixel point is determined. According to the direction interval corresponding to each pixel point and the gradient amplitude of each pixel point, the gradient distribution histogram corresponding to the target image is determined. The gradient direction histogram is determined as the feature information under the gradient direction index.
[0053] Optionally, the target image can be divided into several local regions, each containing multiple pixels. For each local region, the gradient directions of all pixels in the local region are counted into a corresponding direction interval, and the gradient amplitudes of the pixels are weighted to the corresponding direction interval to obtain a gradient distribution histogram corresponding to the local region. Based on the gradient distribution histograms corresponding to all local regions, the gradient distribution histogram corresponding to the target image is determined.
[0054] In addition, a preset window can be set, the window size and moving step of the preset window can be determined, and a gradient direction histogram can be determined based on the gradient direction and gradient amplitude of all pixels in at least one local area within the preset window. The preset window is moved according to the moving step, and the gradient direction histogram corresponding to the preset window is repeatedly determined, so that when it is detected that the preset window has moved to a preset position, the gradient direction histogram corresponding to the target image is determined based on at least one gradient direction histogram. The preset position can be the position of the last local area of the target image that is pre-set. In other words, when the gradient amplitude and gradient direction of all pixels in the target image are detected, they are used to determine the gradient direction histogram, and the gradient direction histogram corresponding to the target image is determined based on the gradient direction histogram corresponding to at least one preset window. Determining the gradient direction histogram corresponding to the target image based on this method can enhance the locality and robustness of the feature information.
[0055] Exemplarily, gamma correction is used to normalize the color space of the target image to adjust the contrast of the target image and reduce the impact of lighting on image recognition. A gradient operator is used to calculate the gradient amplitude and gradient direction corresponding to each pixel in the target image after contrast adjustment. Generally, the gradient components in the horizontal and vertical directions can be used to calculate the gradient amplitude and direction. Since the tables and text of the credentials to be identified in the target image have large pixel-level gradient differences, determining the pixel gradient information corresponding to each pixel in the target image can facilitate the subsequent determination of the edge features of the image.
[0056] The target image is divided into several local areas. The direction interval corresponding to the gradient direction of each pixel point in each local area is determined, and the gradient amplitude of the pixel point is weighted to the corresponding direction interval to obtain a gradient distribution histogram. The gradient distribution histogram of each local area is normalized to obtain a normalized gradient distribution histogram. Based on this, the influence of factors such as illumination and shadow can be reduced, and it is no longer affected by the difference in the distribution of the numerical magnitude of the gradient histogram. Optionally, the normalization method can be L2 norm normalization. The normalized gradient distribution histograms corresponding to all local areas are spliced to obtain the gradient distribution histogram corresponding to the target image, and the gradient distribution histogram corresponding to the target image is used as the feature information corresponding to the gradient direction indicator.
[0057] Optionally, the preset indicators may also include SIFT features. The method for determining the feature information of the target image under the SIFT feature may be: performing multi-scale Gaussian blur processing on the target image to generate a Gaussian pyramid. Calculate the difference corresponding to the target image at adjacent scales and construct a Gaussian difference pyramid. In the Gaussian difference pyramid, local extreme pixel points are determined based on each pixel point in the target image and its 8 adjacent pixel values at the same scale and 18 pixel points at adjacent scales. Local extreme pixel points are positioned by fitting a three-dimensional quadratic function to remove local extreme pixel points with low contrast to obtain key pixel points. Determine the gradient amplitude and gradient direction between the key pixel point and at least one pixel point adjacent to it to determine the directional gradient histogram through multiple directional intervals. The peak value of the directional histogram is used to characterize the main direction of the key pixel point. With the key pixel as the center, the area corresponding to the pixels adjacent to the key point is divided into multiple sub-regions. The gradient histograms in 8 directions are determined for each sub-region to obtain a 128-dimensional feature vector, which is used as the feature information of the target image under the SIFT feature.
[0058] Optionally, the preset indicators may also include LBP features, and the method for determining the characteristic information of the target image under the LBP features may be: for any pixel point of the target image, based on the grayscale value (pixel value) of each pixel point and at least one of its adjacent pixels, the grayscale relationship between the pixel point and the grayscale value of at least one of its adjacent pixels is encoded and processed to determine the LBP value of the pixel point. The target image can be divided into several local areas, and each local area contains multiple pixels. For each local area, an LBP feature histogram is generated based on the LBP values of all pixels in the local area. Based on the LBP feature histogram corresponding to each local area, the LBP feature histogram corresponding to the target image is determined, and the LBP feature histogram corresponding to the target image is used as the characteristic information of the target image under the LBP feature.
[0059] S130. Input feature information under at least one preset indicator into a pre-trained coding classification model for coding recognition, and output a target code of the original image; wherein the target code is used to represent the business type corresponding to the credential to be identified.
[0060] Among them, the coding classification model can be used to determine the target code corresponding to the target image. Optionally, the coding classification model can be a support vector machine model or other machine learning model for coding classification. The input of the coding classification model is feature information under at least one preset indicator, and the output is the target code. The business type of the certificate to be identified corresponding to the target image can be determined by the target code. Optionally, the target code can be determined based on the code corresponding to the major category name of the business type and the code corresponding to the minor category name belonging to the business type. It should be noted that if there is no minor category name belonging to the business type, the corresponding code is set to 00. For example, the target code can be 12907300, where 129073 represents the code corresponding to the major category name of the business type, which indicates that the business type is a resource transfer business. The code corresponding to the minor category name is 00, which means that there is no minor category name belonging to the business type.
[0061] Specifically, the feature information corresponding to at least one preset indicator is input into a pre-trained code classification model for code recognition. The code classification model output determines the target code corresponding to the credential to be identified. The target code can be used to determine the business type of the credential to be identified, corresponding to the target image.
[0062] Optionally, before performing code recognition processing based on the pre-trained code classification model, a code classification model may be trained first. The specific training method may be: obtaining multiple training samples, wherein each training sample includes sample feature information of the sample voucher image under at least one preset indicator and the theoretical code corresponding to the sample voucher image. For example, the theoretical code may be as follows Figure 2 The business code shown. Sample feature information of the sample voucher image under at least one preset indicator is input into the code classification model to be trained to obtain an output code. A loss value is determined based on the output code and the theoretical code. Model parameters of the code classification model to be trained are modified based on the loss value to obtain a trained code classification model.
[0063] The sample voucher image may be a pre-acquired, pre-processed voucher image. The sample feature information may be feature information obtained by subjecting the sample voucher image to feature extraction processing based on at least one preset indicator. The theoretical code may be a predetermined business code corresponding to the voucher in the sample voucher image. The output code may be the code output by the code classification model to be trained. The loss value may be used to represent the degree of difference between the output code and the target code.
[0064] Specifically, multiple voucher images are obtained and image preprocessing, such as resizing and grayscale processing, is performed on each of the multiple voucher images to obtain a sample voucher image corresponding to each voucher image. A theoretical code corresponding to each sample voucher image is determined. Each sample voucher image is subjected to gamma correction and normalization to obtain each normalized sample voucher image. Feature extraction is performed on each normalized sample voucher image using at least one preset metric to obtain sample feature information for each normalized sample voucher image under the at least one preset metric. The sample feature information for each normalized sample voucher image under the at least one preset metric is input into a code classification model to be trained to obtain an output code corresponding to each sample voucher image. A loss value is determined based on the output code and the theoretical code, and model parameters of the code classification model to be trained are modified based on the loss value to obtain a trained code classification model.
[0065] When using the loss value to correct the model parameters in the coding classification model to be trained, the convergence of the loss function can be used as a training goal, such as whether the training error is less than the preset error, or whether the error change tends to be stable, or whether the current number of iterations is equal to the preset number. If the convergence condition is detected, such as the training error of the loss function is less than the preset error, or the error change trend tends to be stable, it indicates that the training of the coding classification model to be trained is completed, and the iterative training can be stopped at this time. If it is detected that the convergence condition is not currently met, other training samples can be further obtained to continue training the coding classification model to be trained until the training error of the loss function is within the preset range. When the training error of the loss function reaches convergence, the trained coding classification model can be obtained.
[0066] Optionally, when a new service is detected, model parameters of the code classification model are adjusted based on the new code corresponding to the new service and the corresponding voucher image, so as to obtain a code classification model that can recognize the voucher image.
[0067] The newly added service may be a service corresponding to a newly added service type, and the newly added code may be a service code corresponding to the newly added service type.
[0068] Specifically, when a new service is detected, the model parameters of the code classification model can be adjusted according to the new code corresponding to the new service and the corresponding voucher image to obtain a code classification model that can identify the voucher image of the new service.
[0069] Optionally, the code classification model can be applied to the business code identification processing corresponding to all businesses in a target area, where the target area includes at least one sub-area. If it is detected that the demand for business code identification in the target sub-area reaches a preset value within a preset time period, the code classification model is retrained based on the voucher images and corresponding business codes in the target sub-area within the preset time period to obtain a code classification model adapted for the target sub-area.
[0070] The target sub-area may be a sub-area within the at least one sub-area. The preset duration may be a pre-set duration. The business code recognition demand may be a detected demand for business code recognition processing on the credential image.
[0071] Optionally, a master-slave model architecture is constructed by at least one coding classification model adapted to the sub-region and a coding classification model adapted to the target region, wherein the master-slave model architecture includes a master model and at least one slave model, the master model corresponds to the coding classification model adapted to the target region, and the slave model corresponds to the coding classification model adapted to the sub-region.
[0072] For example, since different sub-areas in the target area correspond to different business types, the number of credentials to be identified corresponding to the business types is also different. Correspondingly, different sub-areas correspond to different new businesses. When the business code identification demand for new, modified or deleted businesses corresponding to a certain sub-area within a preset time reaches a preset value, the code classification model adapted to the target area can be adjusted based on the voucher image and the corresponding business code within the preset time of the sub-area to obtain a code classification model adapted to the sub-area, i.e., a slave model. For example, Figure 3 As shown in , the coding classification model is used as the support vector machine model. Through the above processing, we can obtain the A region slave model, the B region slave model, the C region slave model and the D region slave model, that is, Figure 3 Clusters of sub-regional models in .
[0073] It should be noted that if the business types and quantities in the target area change significantly, the master model can be retrained and the credential recognition traffic can be switched to the newly trained master model. Accordingly, the model parameters of the slave model can be updated to complete the iterative update of the master-slave model architecture.
[0074] By determining coding classification models that are suitable for different regions, rapid response and iteration can be achieved, promptly adapting to the business type identification needs of different regions. Furthermore, the embodiments of the present invention are not limited to a single coding classification model. Different coding classification models can be flexibly selected based on the business type identification requirements of different regions. Appropriate overfitting can also be used during training to improve the accuracy of business type identification in that region.
[0075] S140 , calling a content extraction model corresponding to the target code to perform content recognition on the target image to obtain the voucher content in the voucher to be recognized.
[0076] The content extraction model may be a pre-set model for extracting the content of the voucher in the target image. The voucher content may include text information in the voucher to be identified.
[0077] Specifically, after determining the target code corresponding to the original image, the business type corresponding to the target code is determined. A content extraction model adapted to the business type is retrieved and used to perform content recognition on the target image. The content of the voucher to be recognized is obtained, and the business transaction corresponding to the voucher to be recognized is then verified and validated based on the voucher content.
[0078] The technical solution of this embodiment obtains the original image corresponding to the credential to be identified, pre-processes the original image, and obtains the target image. By performing image pre-processing on the original image, the accuracy of subsequent image processing is guaranteed. The characteristic information of the target image under at least one preset indicator is determined, and the characteristic information under at least one preset indicator is input into the pre-trained coding classification model for coding recognition processing, and the target code corresponding to the original image is output. Based on this, the problem of low efficiency and inaccuracy in credential recognition caused by directly using OCR technology to directly identify and process credentials of various business types in the prior art is solved. By first determining the target code corresponding to the credential to be identified, the business type of the credential to be identified can be determined quickly and efficiently. The content extraction model corresponding to the business type is called to perform content recognition processing on the target image through the content extraction model to obtain the credential content in the credential to be identified. The present invention solves the problem of low accuracy in voucher content recognition in the prior art caused by the wide variety of voucher types and the direct use of OCR technology to perform voucher content recognition processing. By first determining the business type of the voucher to be identified based on a coding classification model, the business type of the voucher to be identified is accurately and efficiently recognized, and then the content extraction model corresponding to the business type is called to identify the target image corresponding to the voucher, thereby improving the accuracy of voucher content extraction in the voucher to be identified and enhancing the user experience.
[0079] Example 2
[0080] Figure 4 This is a flow chart of an information processing method provided by Example 2 of the present invention. This embodiment is a preferred embodiment of the above embodiment. Its specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same or corresponding to the above embodiment are not repeated here. Figure 4 As shown, the method includes:
[0081] S210: Acquire an original image corresponding to the credential to be identified, and pre-process the original image to obtain a target image.
[0082] S220: Determine feature information of the target image under at least one preset indicator.
[0083] S230: Input feature information under at least one preset indicator into a coding classification model, so as to map the feature information into a preset space based on a kernel function in the coding classification model to obtain features to be used.
[0084] The kernel function is used to map feature information under at least one preset metric into a high-dimensional space so that the feature information is linearly separable. Optionally, the kernel function may be a Gaussian radial basis function. The preset space may be a pre-set high-dimensional space. The features to be used may be features obtained by performing high-dimensional mapping on feature information of at least one preset dimension.
[0085] Specifically, the feature information under at least one preset indicator is input into the coding classification model, and the feature information under at least one preset indicator is subjected to high-dimensional mapping processing based on the kernel function in the coding classification model to obtain the features to be used corresponding to the preset space.
[0086] S240 , solving the features to be used based on the decision function in the coding classification model to obtain the target coding of the original image.
[0087] The decision function is determined based on Lagrange multipliers and preset vectors, which are determined based on the dual problem of solving the Lagrange function of the coding classification model. The decision function is used to perform feature solving on the features to be used. The Lagrange multipliers and preset vectors can be elements used to construct the decision function. For the purpose of illustration, assuming the coding classification model is a support vector machine model, the preset vectors are support vectors.
[0088] Specifically, during the model training process of the coding classification model, the original optimization problem can be converted into a dual problem of solving the Lagrangian function of the coding classification model through the Lagrangian multiplier method. By solving the dual problem of the Lagrangian function, the Lagrangian multiplier and the preset vector are obtained. The decision function of the coding classification model is determined using the Lagrangian multiplier and the preset vector. After receiving the to-be-used features corresponding to the original image, the to-be-used features are solved using the decision function to obtain the target code corresponding to the original image.
[0089] Optionally, during the training process of the coding classification model, the solution results of the dual problem of solving the Lagrangian function of the coding classification model can be processed based on the regularization function in the coding classification model, or the solution process of the dual problem of solving the Lagrangian function of the coding classification model can be optimized based on the regularization function in the coding classification model.
[0090] Among them, the regularization function can be used to control the model complexity of the encoding classification model to prevent the model from overfitting.
[0091] Specifically, during the training of the encoding classification model, when solving the dual problem of the SVM's Lagrangian function, the regularization function can constrain the solution (i.e., the Lagrange multiplier). Specifically, the regularization function indirectly controls the complexity and generalization ability of the encoding classification model by affecting the solution of the dual problem. Optimizing the solution process of the Lagrangian function of the encoding classification model based on the regularization function can facilitate the solution of the dual problem and indirectly optimize the solution process of the encoding classification model.
[0092] S250: Retrieve a content extraction model corresponding to the target code to perform content recognition on the target image to obtain the voucher content in the voucher to be recognized.
[0093] S260. Retrieve transaction log data based on the account information in the voucher content; and perform compliance verification on the transaction behavior corresponding to the voucher content based on the transaction log data and the transaction data in the voucher content.
[0094] Here, account information can be understood as the account for the business transaction corresponding to the credential to be identified. Transaction log data can be log data corresponding to the account information obtained from the corresponding database. Transaction log data includes all relevant information related to the business transaction corresponding to the credential to be identified. Transaction data can be the transaction information recorded in the credential to be identified. The transaction behavior corresponding to the credential content is the business transaction behavior corresponding to the credential to be identified.
[0095] Specifically, based on the account information in the voucher, the transaction log data corresponding to the account information is retrieved. The transaction log data and the transaction data corresponding to the voucher are verified to obtain a verification result. Based on the verification result, whether the transaction behavior corresponding to the voucher content is compliant is determined. Optionally, if the transaction log data matches the transaction data, the transaction behavior is determined to be compliant. Conversely, if the transaction log data does not match the transaction data, the transaction behavior is determined to be non-compliant.
[0096] The technical solution of this embodiment obtains an original image corresponding to the credential to be identified and preprocesses the original image to obtain a target image. This image preprocessing ensures the accuracy of subsequent image processing. Feature information of the target image is determined based on at least one preset metric. This feature information, based on the kernel function in the encoding classification model, is input into a coding classification model. The feature information is mapped into a preset space based on the kernel function in the coding classification model to obtain a target feature. The target feature is then processed based on the decision function in the coding classification model to obtain a target code for the original image. This solves the problem of low efficiency and inaccuracy in credential identification caused by direct OCR technology for various business types in the prior art. By first determining the target code corresponding to the credential to be identified, the business type of the credential to be identified can be determined quickly and efficiently. A content extraction model corresponding to the business type is then retrieved to perform content recognition on the target image using the content extraction model to obtain the credential content in the credential to be identified. Transaction log data is retrieved based on the account information in the credential content. Compliance verification of the transaction corresponding to the credential content is performed based on the transaction log data and the transaction data in the credential content. Based on this, it is determined whether the transaction behavior corresponding to the voucher content is compliant, which facilitates the monitoring of abnormal transaction behavior and reduces the transaction risks caused by abnormal transaction behavior. The present invention solves the problem of low accuracy of voucher content recognition caused by the wide variety of voucher types in the prior art due to the direct use of OCR technology for voucher content recognition processing. By first determining the business type of the voucher to be identified based on the coding classification model, the business type of the voucher to be identified is accurately and efficiently recognized, and then the content extraction model corresponding to the business type is called to identify the target image corresponding to the voucher, thereby improving the accuracy of voucher content extraction in the voucher to be identified and enhancing the user experience.
[0097] Example 3
[0098] Figure 5 This is a flowchart of a coding classification model training method provided by the third embodiment of the present invention. The embodiment of the present invention is an example of the above embodiment. In the embodiment of the present invention, the coding classification model is a support vector machine model. Its specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same as or corresponding to the above embodiment are not repeated here. Figure 5 As shown, the method includes:
[0099] S310: Acquire multiple training samples, wherein each training sample includes sample feature information of a sample voucher image under at least one preset indicator and a theoretical code corresponding to the sample voucher image.
[0100] The sample voucher image may be a pre-acquired, pre-processed voucher image. The sample feature information may be feature information obtained by performing feature extraction processing on the sample voucher image under at least one preset indicator. The theoretical code may be a predetermined business code corresponding to the voucher in the sample voucher image.
[0101] Specifically, multiple voucher images are obtained and image preprocessing, such as resizing and grayscale processing, is performed on each of the multiple voucher images to obtain a sample voucher image corresponding to each voucher image. A theoretical code corresponding to each sample voucher image is determined. Gamma correction and normalization are performed on each sample voucher image to obtain each normalized sample voucher image. Feature extraction is performed on each normalized sample voucher image using at least one preset metric to obtain sample feature information for each normalized sample voucher image under the at least one preset metric.
[0102] S320: Inputting the sample feature information of each normalized sample voucher image under at least one preset indicator into the support vector machine model to be trained, so as to map the sample feature information into a high-dimensional space through the Gaussian radial basis function of the support vector machine model to obtain high-dimensional features.
[0103] The Gaussian radial basis function corresponds to the kernel function mentioned in the above embodiment. High-dimensional features can be understood as features obtained by mapping sample feature information into a high-dimensional space. It should be noted that since identifying the business type of a business credential is a multi-classification task, the support vector machine model to be trained can be a classification model containing multiple classifiers based on the need to identify the business type of the business credential.
[0104] Specifically, the sample feature information of each normalized sample voucher image under at least one preset indicator is input into the support vector machine model to be trained. In order to ensure the linear separability of the sample feature information, the sample feature information can be mapped to a high-dimensional space through the Gaussian radial basis function of the support vector machine model to obtain high-dimensional features.
[0105] S330. In the process of solving the dual problem of the Lagrangian function of the support vector machine model based on high-dimensional features, the solution process is optimized by a regularization function to obtain Lagrangian multipliers and support vectors.
[0106] Specifically, in the support vector machine model, solving the optimal classification hyperplane is a convex quadratic programming problem. Directly solving the convex quadratic programming problem will face high time complexity and computational overhead when the data scale is large (especially high-dimensional feature space). Therefore, by introducing Lagrange duality, the solution of the convex quadratic programming problem can be transformed into the dual problem of solving the Lagrangian function of the support vector machine model to simplify the solution process. At the same time, in the process of solving the dual problem of the Lagrangian function of the support vector machine model, in order to avoid overfitting of the support vector machine model, some high-dimensional features can be allowed to be misclassified, and a regularization function can be introduced to balance the trade-off between interval maximization and misclassification. Based on the above, the solution is obtained, namely the Lagrange multiplier and the support vector.
[0107] S340: Construct a decision function corresponding to the support vector machine model based on the Lagrange multiplier and the support vector, and determine the trained support vector machine model based on the decision function.
[0108] Specifically, a decision function corresponding to the support vector machine model is constructed based on the Lagrange multiplier and the support vector, and the trained support vector machine model is determined by the decision function, so that after the features to be used are subsequently received, the target code corresponding to the features to be used is determined by the decision function.
[0109] The technical solution of this embodiment can improve the accuracy of identifying business types by training a support vector machine model corresponding to the business type of the credential image. At the same time, the support vector machine model is a machine learning model. Therefore, only the CPU is needed to realize the operation of the support vector machine model, which is suitable for general computers. If offline services need to be provided, it can be directly deployed and run without migration technology, and it is compatible with low-performance devices. In addition, the support vector machine model does not require a high number of training samples, and can also meet the recognition needs of sporadically added credential categories to be identified. In addition, the computing efficiency of the support vector machine model is higher than that of the deep learning model, and the development efficiency is also higher. It is suitable for business type recognition processing of credentials with rapid business development and urgent recognition needs.
[0110] Example 4
[0111] Figure 6 This is a structural diagram of an information processing device provided by the fourth embodiment of the present invention. Figure 6 As shown, the device includes: a target image determination module 410, a feature information determination module 420, a target code recognition module 430 and an image content extraction module 440.
[0112] The target image determination module 410 is used to obtain the original image corresponding to the credential to be identified, and pre-process the original image to obtain the target image; the feature information determination module 420 is used to determine the feature information of the target image under at least one preset indicator; the target code recognition module 430 is used to input the feature information under at least one preset indicator into a pre-trained code classification model for code recognition, and output the target code of the original image; wherein the target code is used to characterize the business type corresponding to the credential to be identified; the image content extraction module 440 is used to call the content extraction model corresponding to the target code to perform content recognition on the target image to obtain the credential content in the credential to be identified.
[0113] The technical solution of this embodiment obtains the original image corresponding to the credential to be identified, pre-processes the original image, and obtains the target image. By performing image pre-processing on the original image, the accuracy of subsequent image processing is guaranteed. The characteristic information of the target image under at least one preset indicator is determined, and the characteristic information under at least one preset indicator is input into the pre-trained coding classification model for coding recognition processing, and the target code corresponding to the original image is output. Based on this, the problem of low efficiency and inaccuracy in credential recognition caused by directly using OCR technology to directly identify and process credentials of various business types in the prior art is solved. By first determining the target code corresponding to the credential to be identified, the business type of the credential to be identified can be determined quickly and efficiently. The content extraction model corresponding to the business type is called to perform content recognition processing on the target image through the content extraction model to obtain the credential content in the credential to be identified. The present invention solves the problem of low accuracy in voucher content recognition in the prior art caused by the wide variety of voucher types and the direct use of OCR technology to perform voucher content recognition processing. By first determining the business type of the voucher to be identified based on a coding classification model, the business type of the voucher to be identified is accurately and efficiently recognized, and then the content extraction model corresponding to the business type is called to identify the target image corresponding to the voucher, thereby improving the accuracy of voucher content extraction in the voucher to be identified and enhancing the user experience.
[0114] On the basis of the above embodiment, optionally, the target image determination module includes an image preprocessing unit, which is used to adjust the size according to the actual size information and preset size information corresponding to the credential to be identified in the original image, so as to obtain an image to be processed that is consistent with the preset size information; set the pixel values of the pixel points in the area corresponding to the preset size information in the image to be processed and outside the area corresponding to the actual size information to preset pixel values, so as to obtain the image to be used; and obtain the target image by grayscale processing the image to be used.
[0115] Optionally, the preset indicator includes a gradient direction indicator, and the feature information determination module includes a feature information determination unit under the gradient direction indicator, which is used to determine the pixel gradient information for any pixel point in the target image based on the pixel point and at least one pixel point adjacent to the pixel point; wherein the pixel gradient information includes at least the gradient direction; based on the gradient directions of all pixel points and a plurality of predetermined direction intervals, a gradient distribution histogram corresponding to the target image is determined; and the gradient distribution histogram is used as the feature information corresponding to the gradient direction indicator.
[0116] Optionally, a target coding recognition module is used to input feature information under at least one preset indicator into a coding classification model to map the feature information to a preset space based on a kernel function in the coding classification model to obtain features to be used; and to solve the features to be used based on a decision function in the coding classification model to obtain a target coding of the original image, wherein the decision function is determined based on Lagrange multipliers and preset vectors, and the Lagrange multipliers and preset vectors are determined based on the dual problem of solving the Lagrangian function of the coding classification model.
[0117] Optionally, the device also includes: a regularization optimization module, which is used to process the solution result of the dual problem of solving the Lagrangian function of the coding classification model based on the regularization function in the coding classification model, or to optimize the solution process of the dual problem of solving the Lagrangian function of the coding classification model based on the regularization function in the coding classification model.
[0118] Optionally, the device also includes: a transaction compliance verification module, which is used to retrieve transaction log data based on the account information in the voucher content; and perform compliance verification on the transaction behavior corresponding to the voucher content based on the transaction log data and the transaction data in the voucher content.
[0119] Optionally, the device further includes: a model updating module for adjusting the model parameters of the code classification model based on the newly added code corresponding to the newly added business and the corresponding voucher image when a new business is detected, so as to obtain a code classification model that can recognize the voucher image.
[0120] The information processing device provided by the embodiment of the present invention can execute the information processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0121] Example 5
[0122] Figure 71 is a structural diagram of an electronic device provided in Example 5 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0123] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0124] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0125] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as information processing methods.
[0126] In some embodiments, the information processing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the information processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the information processing method in any other appropriate manner (e.g., by means of firmware).
[0127] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0128] Computer programs for implementing the information processing methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0129] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication unit 19, or installed from the storage unit 18, or installed from the ROM 12. When the computer program is executed by the processor 11, the above-mentioned functions defined in the method of the embodiment of the present invention are performed.
[0130] Example 6
[0131] Embodiment 6 of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a processor to execute an information processing method, the method comprising:
[0132] Acquire an original image corresponding to the credential to be identified, and preprocess the original image to obtain a target image; determine the characteristic information of the target image under at least one preset indicator; input the characteristic information under at least one preset indicator into a pre-trained coding classification model for coding recognition, and output a target code of the original image; wherein the target code is used to characterize the business type corresponding to the credential to be identified; call the content extraction model corresponding to the target code to perform content recognition on the target image to obtain the credential content in the credential to be identified.
[0133] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0134] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0135] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by 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), a blockchain network, and the Internet.
[0136] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0137] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0138] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. An information processing method, characterized in that: include: Acquire an original image corresponding to the credential to be identified, and preprocess the original image to obtain a target image; Determining characteristic information of the target image under at least one preset indicator; Inputting the feature information under the at least one preset indicator into a pre-trained code classification model for code recognition, and outputting a target code of the original image; wherein the target code is used to represent the business type corresponding to the credential to be identified; A content extraction model corresponding to the target code is retrieved to perform content recognition on the target image to obtain the credential content in the credential to be recognized.
2. The method according to claim 1, characterized in that The preprocessing of the original image to obtain the target image includes: resizing the original image according to the actual size information and the preset size information corresponding to the credential to be identified, to obtain an image to be processed consistent with the preset size information; Setting the pixel values of the pixels in the area corresponding to the preset size information and outside the area corresponding to the actual size information in the image to be processed to the preset pixel values to obtain the image to be used; The target image is obtained by grayscale processing the image to be used.
3. The method according to claim 1, characterized in that The preset indicator includes a gradient direction indicator, and determining feature information of the target image under at least one preset indicator includes: For any pixel point in the target image, determine pixel gradient information based on the pixel point and at least one pixel point adjacent to the pixel point; wherein the pixel gradient information includes at least a gradient direction; Determining a gradient distribution histogram corresponding to the target image based on the gradient directions of all pixel points and a plurality of predetermined direction intervals; The gradient distribution histogram is used as feature information corresponding to the gradient direction index.
4. The method according to claim 1, wherein The step of inputting the feature information under the at least one preset indicator into a pre-trained code classification model for code recognition and outputting the target code of the original image includes: Inputting the feature information under the at least one preset indicator into the coding classification model, mapping the feature information into a preset space based on a kernel function in the coding classification model, and obtaining features to be used; The features to be used are solved and processed based on the decision function in the coding classification model to obtain the target coding of the original image, wherein the decision function is determined based on Lagrangian multipliers and preset vectors, and the Lagrangian multipliers and the preset vectors are determined based on the dual problem of solving the Lagrangian function of the coding classification model.
5. The method according to claim 4, characterized in that The method further comprises: The solution result of the dual problem of solving the Lagrangian function of the coding classification model is processed based on the regularization function in the coding classification model, or the solution process of the dual problem of solving the Lagrangian function of the coding classification model is optimized based on the regularization function in the coding classification model.
6. The method according to claim 1, characterized in that After obtaining the credential content, the method further includes: Retrieving transaction log data based on the account information in the voucher; Based on the transaction log data and the transaction data in the voucher content, compliance verification is performed on the transaction behavior corresponding to the voucher content.
7. The method according to claim 1, characterized in that The method further comprises: When a new service is detected, model parameters of the code classification model are adjusted based on the new code corresponding to the new service and the corresponding voucher image, so as to obtain a code classification model that can recognize the voucher image.
8. An information processing device, characterized in that include: A target image determination module is used to obtain an original image corresponding to the credential to be identified and pre-process the original image to obtain a target image; A feature information determination module, configured to determine feature information of the target image under at least one preset indicator; a target code recognition module, configured to input the feature information under the at least one preset indicator into a pre-trained code classification model for code recognition, and output a target code of the original image; wherein the target code is used to represent the business type corresponding to the credential to be identified; The image content extraction module is used to call a content extraction model corresponding to the target code to perform content recognition on the target image to obtain the voucher content in the voucher to be recognized.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the information processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the information processing method according to any one of claims 1 to 7 when executed.