Transaction data processing method and device and server
By detecting and processing motion blur images, and using segmented linear models and optimization functions for iterative solutions, the high processing cost and inefficiency problems caused by image blur in financial business scenarios are solved, and efficient transaction data processing is achieved.
Patent Information
- Application Number
- CN202410920334.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-11-08
AI Technical Summary
In financial business scenarios, the blur problem caused by motion during image acquisition leads to high cost and low efficiency in image processing, and the existing technology has not effectively solved it.
By detecting whether the target image is a motion blur image, a piecewise linear model and a target optimization function are constructed, and multiple iterative solutions are used to determine the de-fuzzy image that meets the requirements, thereby realizing the target transaction data processing.
It realizes efficiently obtaining the defuzzy target image at a lower processing cost, accurately completing transaction data processing, reducing data processing costs and improving processing efficiency.
Smart Images

Figure CN118918033A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and more particularly to a transaction data processing method, device and server. Background Art
[0002] In financial business scenarios, when trading institutions handle transactions for users, they often need to collect and use relevant images.
[0003] In the process of collecting images, the collected images are often blurred due to movement and other reasons, which in turn affects the subsequent transaction data processing. Based on existing methods, most of them need to collect and use multiple images of the same object to perform image restoration to obtain a clearer image, which has problems such as high processing cost and low processing efficiency.
[0004] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0005] The present specification provides a transaction data processing method, device and server, which can efficiently obtain a deblurred target image at a relatively low processing cost, and can then accurately complete corresponding target transaction data processing based on the deblurred target image.
[0006] This specification provides a transaction data processing method, including:
[0007] receiving a target transaction processing request; wherein the target transaction processing request carries at least a target image;
[0008] Detect whether the target image is a motion blurred image;
[0009] When it is determined that the target image is a motion blurred image, a piecewise linear model of the motion blurred path in the target image and a corresponding target optimization function are constructed;
[0010] According to the preset processing rules, the piecewise linear model and the target optimization function are used to determine the deblurred target image that meets the requirements through multiple rounds of iterative solutions;
[0011] According to the deblurred target image, target business information is extracted;
[0012] According to the target business information, corresponding target transaction data processing is carried out.
[0013] In one embodiment, detecting whether a target image is a motion blurred image includes:
[0014] Detect and segment the target object image area and the background image area in the target image;
[0015] Respectively detecting whether the fuzzy evaluation values of the target object image area and the background image area are greater than a preset fuzzy evaluation threshold;
[0016] When it is determined that the blur evaluation value of the target object image area is greater than a preset blur evaluation threshold and the blur evaluation value of the background image area is less than or equal to the preset blur evaluation threshold, the target image is determined to be a motion blurred image.
[0017] In one embodiment, constructing a piecewise linear model of the motion blur path in the target image includes:
[0018] Identify and determine the key identification points of the target object in the target image;
[0019] Determining a plurality of control points in the target image according to the key identification points;
[0020] According to the multiple control points, a segmented path model between two adjacent control points is constructed;
[0021] The segmented path models are combined to obtain a segmented linear model of the motion blur path in the target image.
[0022] In one embodiment, constructing a segmented path model between two adjacent control points based on a plurality of control points includes:
[0023] According to the following formula, a segmented path model between two adjacent control points is constructed:
[0024]
[0025] in, represents the path between the control point numbered q and the control point numbered q+1, represents the path of the control point numbered q, represents the path of the control point numbered q+1, t represents the time, t q Indicates the time corresponding to the control point numbered q, represents the number of control points in the control point set Q, and g(t) represents the gate function.
[0026] In one embodiment, constructing a target optimization function for the target image includes:
[0027] According to the piecewise linear model, constructing a path change penalty term for the motion blur path;
[0028] Based on the convolution kernel of the blurred motion path in the frequency domain inverse filtering, a gradient penalty term for the deblurred image is constructed;
[0029] The path change penalty term and the gradient penalty term are used together to construct a target optimization function for the target image.
[0030] In one embodiment, the path change penalty term and the gradient penalty term are used together to construct a target optimization function for the target image, including:
[0031] According to the following formula, construct the target optimization function for the target image:
[0032] M=R α,β (Q)+R ▽ (f)
[0033] Among them, M represents the function value of the target optimization function, R α,β (Q) represents the path change penalty term, R ▽ (f) represents the gradient penalty term, Q represents the control point set, α represents the unit normal vector at the control point, β represents the unit tangent vector at the control point, and f represents the deblurred image.
[0034] In one embodiment, according to a preset processing rule, the piecewise linear model and the target optimization function are used to determine a deblurred target image that meets the requirements through multiple rounds of iterative solutions, including:
[0035] Perform the iterative solution for the current round in the following manner:
[0036] Get the motion blur path of the previous round and the deblurred image of the previous round;
[0037] According to the motion blur path of the previous round, the auxiliary deblurred image of the current round is determined;
[0038] Using the auxiliary deblurred image of the current round, the control point set of the current round is determined by solving the minimum value of the target optimization function;
[0039] Determine the motion blur path of the current wheel according to the piecewise linear model and the control point set of the current wheel;
[0040] The deblurred image of the current round is determined by using the control point set of the current round and solving the minimum value of the target optimization function.
[0041] In one embodiment, determining the auxiliary deblurred image of the current round according to the motion blur path of the previous round includes:
[0042] According to the motion blur path of the previous round, the motion blur convolution kernel of the previous round is synthesized;
[0043] Perform fast Fourier transform on the motion blur convolution kernel of the previous round to obtain the motion blur convolution kernel after transformation based on the frequency domain;
[0044] The target image is subjected to frequency domain inverse filtering using the transformed motion blur convolution kernel to obtain an auxiliary deblurred image of the current round.
[0045] In one embodiment, the method further comprises:
[0046] According to the control point set of the current round, check whether the preset iteration end condition is met;
[0047] When it is determined that the preset iteration end condition is met, the iterative solution is terminated; and the deblurred image of the current round is determined as the deblurred target image that meets the requirements.
[0048] In one embodiment, the target image includes at least one of the following: an image containing a target user's face, an image containing a target user's action, and an image containing a target certificate.
[0049] This specification also provides an image processing method, including:
[0050] Acquire a target image with motion blur;
[0051] Constructing a piecewise linear model of the motion blur path in the target image and a corresponding target optimization function;
[0052] According to the preset processing rules, the piecewise linear model and the target optimization function are used to determine a deblurred target image that meets the requirements through multiple rounds of iterative solutions.
[0053] This specification also provides a transaction data processing device, including:
[0054] A receiving module, configured to receive a target transaction processing request; wherein the target transaction processing request at least carries a target image;
[0055] A detection module, used to detect whether a target image is a motion blurred image;
[0056] A construction module, for constructing a piecewise linear model of a motion blur path in the target image and a corresponding target optimization function when determining that the target image is a motion blurred image;
[0057] An iterative solution module, used to determine a deblurred target image that meets the requirements through multiple rounds of iterative solutions using the piecewise linear model and the target optimization function according to preset processing rules;
[0058] An extraction module, used to extract target business information based on the deblurred target image;
[0059] The processing module is used to perform corresponding target transaction data processing according to the target business information.
[0060] The present specification also provides a server, comprising a processor and a memory for storing processor executable instructions, wherein the processor implements the relevant steps of the transaction data processing method when executing the instructions.
[0061] The present specification also provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the relevant steps of the transaction data processing method are implemented.
[0062] The present specification also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the relevant steps of the transaction data processing method are implemented.
[0063] Based on the transaction data processing method, device and server provided in this specification, when it is detected that the target image carried by the target transaction processing request is a motion blurred image, a piecewise linear model of the motion blurred path in the target image and a corresponding target optimization function can be first constructed; then, according to the preset processing rules, the piecewise linear model and the target optimization function are used to determine the deblurred target image that meets the requirements through multiple rounds of iterative solutions; then, based on the deblurred target image, the target business information is extracted; and according to the target business information, the corresponding target transaction data processing is performed. Therefore, only one image, the target image, needs to be used to efficiently obtain the deblurred target image at a low processing cost, and then the corresponding target transaction data processing can be accurately completed based on the above deblurred target image. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0065] Figure 1 is a flowchart of a transaction data processing method provided by an embodiment of this specification;
[0066] Figure 2 It is a schematic diagram of an embodiment of a transaction data processing method provided by an embodiment of this specification, in a scenario example;
[0067] Figure 3 It is a schematic diagram of an embodiment of a transaction data processing method provided by an embodiment of this specification, in a scenario example;
[0068] Figure 4It is a schematic diagram of an embodiment of a transaction data processing method provided by an embodiment of this specification, in a scenario example;
[0069] Figure 5 It is a schematic diagram of an embodiment of a transaction data processing method provided by an embodiment of this specification, in a scenario example;
[0070] Figure 6 It is a schematic diagram of an embodiment of a transaction data processing method provided by an embodiment of this specification, in a scenario example;
[0071] Figure 7 It is a schematic diagram of the structure of a server provided by an embodiment of this specification;
[0072] Figure 8 It is a schematic diagram of the structural composition of a transaction data processing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0073] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0074] It should be noted that the user-related information and data involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by relevant parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users or relevant parties to choose to authorize or refuse.
[0075] It should also be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0076] See also Figure 1 As shown, the embodiment of this specification provides a transaction data processing method. Among them, the method is specifically applied to the server side. When implemented specifically, the method may include the following contents:
[0077] S101: receiving a target transaction processing request; wherein the target transaction processing request at least carries a target image;
[0078] S102: Detect whether the target image is a motion blurred image;
[0079] S103: when it is determined that the target image is a motion blurred image, construct a piecewise linear model of the motion blurred path in the target image and a corresponding target optimization function;
[0080] S104: according to the preset processing rules, using the piecewise linear model and the target optimization function, through multiple rounds of iterative solutions, determine a deblurred target image that meets the requirements;
[0081] S105: extracting target business information according to the deblurred target image;
[0082] S106: Perform corresponding target transaction data processing according to the target business information.
[0083] Based on the above embodiment, it is possible to automatically detect and determine whether the target image carried by the target transaction processing request is a motion blurred image; and when it is determined that the target image is a motion blurred image, it is possible to determine a deblurred target image that meets the requirements by performing multiple rounds of iterative solutions based on the preset processing rules by using the piecewise linear model and the target optimization function. In this way, there is no need to obtain and use multiple images, only the target image is needed, and a relatively clear and high-precision deblurred target image can be efficiently restored at a lower data processing cost; and then the required target business information can be accurately extracted based on the above deblurred target image; and then the corresponding target transaction data can be accurately completed based on the target business information.
[0084] In some embodiments, the transaction data processing method described above can be specifically applied to the server side.
[0085] The server may specifically include a background server applied to the trading institution side and capable of realizing functions such as data transmission and data processing. Specifically, the server may be, for example, an electronic device with data calculation, storage and network interaction functions. Alternatively, the server may also be a software program running in the electronic device to provide support for data processing, storage and network interaction. In this embodiment, the number of the servers is not specifically limited. The server may specifically be one server, or several servers, or a server cluster formed by several servers.
[0086] In specific implementation, when the target user wants to handle the target transaction business, he can obtain the target image containing the target business information required to handle the target transaction business (for example, an image containing the target user's face, etc.) through the user terminal; then use the user terminal to generate a target transaction processing request carrying at least the target image; and send the target transaction processing request to the server.
[0087] The user terminal may include a front end applied to the user side and capable of realizing functions such as data collection and data transmission. Specifically, the user terminal may be, for example, a desktop computer, a tablet computer, a laptop computer, a smart phone, an ATM machine or other electronic device. Alternatively, the user terminal may also be a software application that can run in the above electronic device.
[0088] In specific implementation, after receiving the target transaction processing request, the server can first parse and obtain the corresponding target image; and detect the image quality of the target image to determine whether the target image has problems such as image blur; when it is determined that image blur exists, it can further detect whether the target image is a motion blurred image; when it is determined that the target image is a motion blurred image, a piecewise linear model of the corresponding motion blur path and a corresponding target optimization function can be first constructed; then, according to the preset processing rules, the piecewise linear model and the target optimization function are used to determine a deblurred target image that meets the requirements through multiple rounds of iterative solutions; then, based on the deblurred target image, the target business information can be extracted; and then, based on the target business information, the corresponding target transaction data processing is performed.
[0089] In some embodiments, the target transaction processing request may specifically be a bill payment request, a transaction account opening request, a transaction account login request, and the like.
[0090] Of course, it should be noted that the target transaction processing request listed above is only an illustrative description. In specific implementation, according to specific business scenarios and processing needs, the target transaction processing request may also include other types of requests. This specification does not limit this.
[0091] Specifically, the target transaction processing request at least carries a target image, wherein the target image contains target business information related to target transaction data processing.
[0092] In a specific implementation, the target image may include at least one of the following: an image containing a target user's face, an image containing a target user's action, an image containing a target ID, etc.
[0093] Of course, it should be noted that the target images listed above are only schematic illustrations. In specific implementation, according to specific business scenarios and processing requirements, the target images may also be images containing other content objects. This specification does not limit this.
[0094] Accordingly, for target images in different business scenarios, the target business information that needs to be extracted and used will also be different. For example, in the trading account login scenario, the target image is an image containing the target user's face; accordingly, the target business information can be the target user's facial features, etc. For another example, in the trading account opening scenario, the target image is an image containing the target certificate; accordingly, the target business information can be the certificate number, certificate photo, etc. of the target certificate. Furthermore, by extracting and using different target business information contained in the target image, a variety of different target transaction data processing based on different business scenarios can be performed.
[0095] Based on the above embodiments, it can be well applied to various business scenarios, and various target transaction data processing can be realized by using corresponding target images.
[0096] In some embodiments, after receiving a target transaction processing request, the target image may be first processed using a target blurred image detection model to determine whether the target image is a blurred image.
[0097] Among them, the above-mentioned target blurred image detection model can be specifically understood as a neural network model that is pre-trained for the target business scenario and can automatically detect and determine whether the image is blurred and affects the extraction of business information based on the input image.
[0098] In specific implementation, the target transaction processing request can be first determined to determine the corresponding target business scenario; then a preset fuzzy image detection model matching the target business scenario is determined from the preset model library as the target fuzzy image detection model. The preset model library can store multiple preset fuzzy image detection models, and each preset fuzzy image detection model corresponds to at least one business scenario.
[0099] Before specific implementation, a large number of sample images can be obtained; then, according to business scenarios, the sample images are divided into multiple different sample sets; in combination with the business information required by different business scenarios and the specific requirements for image quality, the multiple sample sets are labeled respectively to obtain multiple labeled sample sets; a number of initial detection models equal to the number of labeled sample sets are constructed; multiple initial detection models are trained respectively using the multiple labeled sample sets to obtain a corresponding number of preset fuzzy image detection models; and the multiple preset fuzzy image detection models are stored in a preset model library.
[0100] During specific implementation, when it is determined that the target image is a blurred image, it may be further detected whether the target image is a motion blurred image.
[0101] The motion blurred image can be specifically understood as a blurred image caused by the movement of the content object (for example, the face of the target user, or the target document, etc.) during the image acquisition process.
[0102] In some embodiments, see Figure 2 As shown, the above detection of whether the target image is a motion blurred image may include the following contents during specific implementation:
[0103] S1: Detect and segment the target object image area and the background image area in the target image;
[0104] S2: respectively detecting whether the fuzzy evaluation values of the target object image area and the background image area are greater than a preset fuzzy evaluation threshold;
[0105] S3: When it is determined that the blur evaluation value of the target object image area is greater than a preset blur evaluation threshold and the blur evaluation value of the background image area is less than or equal to the preset blur evaluation threshold, determine that the target image is a motion blurred image.
[0106] Based on the above embodiments, it is possible to more accurately detect and determine whether a target image is a motion blurred image.
[0107] Among them, the above-mentioned preset blur evaluation threshold can be determined in the following manner: collect multiple sample motion blurred images; calculate the blur evaluation value of each sample motion blurred image according to the corresponding evaluation algorithm; perform statistics on the blur evaluation values of multiple sample motion blurred images, and determine the preset blur evaluation threshold according to the corresponding statistical distribution results.
[0108] In specific implementation, a relatively simple and rough detection and recognition may be performed on the target image according to the target business scenario to which the target image belongs, so as to determine and segment the target object area and the background image area in the target image.
[0109] The target object image area is specifically understood as a local image area of the target image that contains a content object that matches the target business scene. The background image area is specifically understood as a local image area of the target image that does not contain a content object that matches the target business scene but contains a fixed background object that matches the target business scene.
[0110] The content object may be a target user's face, a target ID, or a target user's hand. The fixed background object may be a fixed door, a fixed sign, or a fixed window in a trading institution.
[0111] During specific implementation, a target fuzzy image detection model matching the target business scenario can be used to process the target object image area and the background image area respectively; and the intermediate scores generated by the model during the processing can be exported through the corresponding data interface as the corresponding fuzzy evaluation value of the target object image area and the fuzzy evaluation value of the background image area; and then the fuzzy evaluation value of the target object image area and the fuzzy evaluation value of the background image area are compared with the preset fuzzy evaluation value to obtain the corresponding comparison results.
[0112] According to the comparison result, when it is determined that the blur evaluation value of the target object image area is greater than the preset blur evaluation threshold, and the blur evaluation value of the background image area is less than or equal to the preset blur evaluation threshold, the target image can be determined to be a motion blurred image. Then, the relevant method provided in this specification can be applied to perform subsequent image data processing on the target image.
[0113] Otherwise, the target image can be determined to be a non-motion blurred image, and then the blur type of the target image can be determined. Then, a method matching the blur type of the target image can be selected and used to perform subsequent image data processing on the target image.
[0114] In some embodiments, see Figure 3 As shown, the above-mentioned piecewise linear model of the motion blur path in the target image may include the following contents during specific implementation:
[0115] S1: Identify and determine the key identification points of the target object in the target image;
[0116] S2: determining a plurality of control points in the target image according to the key identification points;
[0117] S3: construct a segmented path model between two adjacent control points based on multiple control points;
[0118] S4: Combine the segmented path models to obtain a segmented linear model of the motion blur path in the target image.
[0119] Based on the above embodiments, a piecewise linear model of the motion blur path in the target image can be fitted more accurately by constructing and combining multiple piecewise path simulations.
[0120] In specific implementation, matching construction rules can be determined according to the target business scenario; then, according to the matching construction rules, corresponding pixel points can be identified and determined in the target image as key identification points for characterizing the target object.
[0121] For example, in a trading account login scenario, the target image is an image containing the target user's face; the corresponding key identification point of the target object may be the target user's eyes.
[0122] Accordingly, in specific implementation, the target image can be first converted into a grayscale image according to the construction rules matching the target business scenario; then, based on the grayscale value, multiple pixel points representing the eyes of the target user are detected and identified as key identification points of the target object. Further, multiple points (for example, at least two points) can be selected from the above multiple key identification points as control points to construct a control point set; then, based on the multiple control points, a segmented path model between two adjacent control points is constructed respectively, and then combined and spliced to obtain the corresponding piecewise linear model.
[0123] In some embodiments, the above-mentioned construction of a segmented path model between two adjacent control points based on multiple control points may include:
[0124] According to the following formula, a segmented path model between two adjacent control points is constructed:
[0125]
[0126] in, represents the path between the control point numbered q and the control point numbered q+1, represents the path of the control point numbered q, represents the path of the control point numbered q+1, t represents the time, t q Indicates the time corresponding to the control point numbered q, represents the number of control points in the control point set Q, and g(t) represents the gate function.
[0127] Specifically, the above g(t) is only q ≤t<t q+1 At the same time, the value is 1; at other times, the value is 0.
[0128] Based on the above embodiments, a relatively refined segmented path model can be constructed, so that a relatively accurate piecewise linear model can be obtained by subsequently combining the above segmented path models.
[0129] In some embodiments, it is assumed that the motion blur path in the target image can be expressed as Where 0≤t<T. Where T is the sampling duration (for example, the exposure duration when acquiring the target image). Specifically, it can be 1 second. The above motion blur path can reflect the moving trajectory of the target object within the sampling duration.
[0130] Correspondingly, the deblurred target image (or the estimate of the synthetic potential image) obtained by inpainting the motion blur path can be expressed as follows: Within the sampling time, the displacement (or relative path) at any time t relative to the initial time can be expressed as follows:
[0131] In the specific implementation, we can first determine and establish the control point set Q = {q i |i=0,1,...}. The time corresponding to the control point q can be expressed as t q Specifically, the control point concentration control point may be a point that can be sampled evenly over the sampling duration.
[0132] Then, by using the control point set and constructing a segmented path model between two adjacent control points, the relative path of the corresponding control points is obtained, namely:
[0133] When constructing a segmented path model between two adjacent control points, the following formula can be constructed as the corresponding segmented path model by performing linear interpolation between the two adjacent control points:
[0134] Furthermore, the relative paths of each control point can be According to the number of the control points in the control point set, they are spliced in order to obtain the corresponding motion blur path
[0135] In some embodiments, see Figure 4 As shown, the above construction of the target optimization function for the target image may include the following contents when implemented specifically:
[0136] S1: constructing a path change penalty term for the motion blur path according to the piecewise linear model;
[0137] S2: Based on the convolution kernel of the blurred motion path in the frequency domain inverse filtering, a gradient penalty term for the deblurred image is constructed;
[0138] S3: The path change penalty term and the gradient penalty term are used together to construct a target optimization function for the target image.
[0139] Among them, the above-mentioned target optimization function can be specifically understood as an optimization function based on two different dimensions of a piecewise linear model and a fuzzy motion path convolution kernel, and at least including a path change penalty term and a gradient penalty term.
[0140] Among them, the above-mentioned path change penalty term is used to make the piecewise linear model obey the prior law that the motion blur path is as short and smooth as possible, so as to guide and find the path with the shortest relative length and the slowest change as the final motion blur path in the subsequent iterative solution.
[0141] Specifically, based on the above path change penalty term, corresponding regularization terms can be introduced to penalize drastic changes in direction and speed in the subsequent iterative solution process.
[0142] The above gradient penalty term is based on the synthesis mechanism of the convolution kernel of the motion blur path in the frequency domain inverse filtering. In the subsequent iterative solution, the deblurred image is solved. It complies with the corresponding gradient prior law.
[0143] Among them, the above-mentioned synthesis mechanism of the motion blur path convolution kernel can specifically include: superimposing multiple short straight line motion blur convolution kernels based on the linear and space-invariant properties of the imaging system.
[0144] Based on the above embodiment, two different penalty terms are first constructed based on two different dimensions, namely, the piecewise linear model and the fuzzy motion path convolution kernel; and then, by jointly using these two different penalty terms, a target optimization function with relatively good effect and faster convergence is constructed.
[0145] In some embodiments, the above-mentioned combined use of the path change penalty term and the gradient penalty term to construct a target optimization function for the target image may include:
[0146] According to the following formula, construct the target optimization function for the target image:
[0147] M=R α,β (Q)+R ▽ (f)
[0148] Among them, M represents the function value of the target optimization function, R α,β (Q) represents the path change penalty term, R ▽ (f) represents the gradient penalty term, Q represents the control point set, α represents the unit normal vector at the control point, β represents the unit tangent vector at the control point, and f represents the deblurred image.
[0149] Based on the above embodiments, a target optimization function for a target image can be constructed accurately and efficiently.
[0150] In some embodiments, when constructing the path change penalty term, it can be constructed according to the following formula:
[0151]
[0152] in, represents the unit normal vector at the control point q, represents the unit tangent vector at the control point q.
[0153] Calculate the above When , it can be obtained by central difference calculation using at least three adjacent control points including the control point q.
[0154] When constructing the gradient penalty term, it can be constructed according to the following formula:
[0155]
[0156] Among them, λ1 is the first hyperparameter, λ2 is the second hyperparameter, x is the lateral displacement in the image, and y is the longitudinal displacement in the image.
[0157] In some embodiments, the above-mentioned processing rules are based on the preset processing rules, and the piecewise linear model and the target optimization function are used to perform multiple rounds of iterative solutions to determine the deblurred target image that meets the requirements. When it is specifically implemented, refer to Figure 5 As shown, the iterative solution of the current round can be performed in the following way:
[0158] S1: Get the motion blur path and deblurred image of the previous round;
[0159] S2: Determine the auxiliary deblurred image of the current round according to the motion blur path of the previous round;
[0160] S3: using the auxiliary deblurred image of the current round, by solving the minimum value of the target optimization function, determine the control point set of the current round;
[0161] S4: determining the motion blur path of the current round according to the piecewise linear model and the control point set of the current round;
[0162] S5: using the control point set of the current round, by solving the minimum value of the target optimization function, the deblurred image of the current round is determined.
[0163] Specifically, when executing S3, the deblurred image in the target optimization function can be fixed as the auxiliary deblurred image of the current round, and then the target optimization function can be optimized and solved to find the control point set that minimizes the function value of the current target optimization function, and use it as the control point set of the current round to achieve iterative update of the control point set.
[0164] Specifically, when executing S5, the control point set in the target optimization function can be fixed as the control point set of the current round (that is, the motion blur path is fixed), and then the target optimization function is optimized and solved to find the deblurred image that minimizes the function value of the current target optimization function, and use it as the deblurred image of the current round to achieve iterative update of the deblurred image.
[0165] Based on the above embodiment, the current round of iterative solution can be completed automatically and accurately, efficiently, and then the above method can be repeated to automatically and accurately complete multiple rounds of iterative solution, so as to finally obtain a deblurred target image that meets the requirements.
[0166] In some embodiments, see Figure 6 As shown, the auxiliary deblurred image of the current round is determined according to the motion blur path of the previous round. In specific implementation, the auxiliary deblurred image of the current round can be determined according to the motion blur path of the previous round in the following manner:
[0167] S1: According to the motion blur path of the previous round, the motion blur convolution kernel of the previous round is synthesized;
[0168] S2: Perform fast Fourier transform on the motion blur convolution kernel of the previous round to obtain the motion blur convolution kernel after transformation based on the frequency domain;
[0169] S3: Perform frequency domain inverse filtering on the target image using the transformed motion blur convolution kernel to obtain an auxiliary deblurred image of the current round.
[0170] Based on the above embodiment, the motion blur path of the previous round can be used to efficiently obtain the corresponding auxiliary deblurred image of the current round through inverse filtering based on the frequency domain.
[0171] In some embodiments, during specific implementation, the motion blur convolution kernel of the previous round can be synthesized according to the motion blur path of the previous round according to the following formula:
[0172] In specific implementation, the motion blur convolution kernel of the previous round can be subjected to fast Fourier transform according to the following formula to obtain the motion blur convolution kernel after transformation based on the frequency domain:
[0173]
[0174]
[0175] In some embodiments, when performing multiple rounds of iterative solutions, the initial round of iterative solutions may be performed in the following manner:
[0176] S1: According to the target business scenario, determine a matching target iterative solution reference solution from a preset iterative solution reference solution set; wherein the preset iterative solution reference solution set includes multiple preset iterative solution reference solutions, and each preset iterative solution reference solution corresponds to at least one business scenario;
[0177] S2: Determine the initial number of control points according to the target iterative solution reference scheme; then, based on the initial number of control points, select a corresponding number of points with the same or similar interval distances from the key identification points in the target image to construct an initial control point set;
[0178] S3: construct the initial round of motion blur path based on the initial control point set;
[0179] S4: Determine an initial round of auxiliary deblurred image according to the initial round of motion blur path.
[0180] Before specific implementation, a preset iterative solution reference solution set can also be constructed in the following manner: collect a large number of historical iterative solution solution records; and select from the historical iterative solution solution records those with accurate solution results and fewer solution rounds as sample iterative solution solution records; according to the business scenarios to which they belong, the sample iterative solution solution records are divided into multiple solution record groups; wherein one solution record group corresponds to at least one business scenario; clustering is performed on the multiple solution record groups respectively to extract common features when iterative solutions are performed for the same business scenario (for example, the number of control points used in the initial round of iterative solution, the reference value of the end number of rounds of iterative solution, the reference value of the end number of control points of iterative solution, etc.) and combine them to obtain multiple preset iterative solution solutions for different business scenarios; and multiple preset iterative solution solutions are combined to obtain a preset iterative solution solution set.
[0181] In some embodiments, the method may further include the following when implemented:
[0182] S1: According to the control point set of the current round, check whether the preset iteration end condition is met;
[0183] S2: When it is determined that the preset iteration end condition is met, the iterative solution is terminated; and the deblurred image of the current round is determined as a deblurred target image that meets the requirements.
[0184] On the contrary, when it is determined that the preset iteration termination condition is not met, the above process can be repeated to continue the next round of iterative solution.
[0185] Based on the above embodiment, it is possible to control the iterative solution process by detecting whether a preset iteration end condition is met, so as to obtain a deblurred target image that meets the requirements.
[0186] In some embodiments, during specific implementation, it can be determined whether a preset iteration end condition is met by detecting whether the number of control points in the current round of control point set is greater than or equal to a reference value of the number of control points for ending the iterative solution based on the current round of control point set.
[0187] Specifically, if the number of control points in the control point set of the current round is greater than or equal to a reference value of the number of control points at the end of the iterative solution, it is determined that the preset iteration end condition is met.
[0188] On the contrary, if the number of control points in the control point set of the current round is less than the reference value of the number of control points for ending the iterative solution, it is determined that the preset iteration ending condition is not met.
[0189] In specific implementation, the Levenberg-Marquardt algorithm can be used to efficiently and accurately achieve multiple rounds of iterative solutions.
[0190] In some embodiments, when the number of control points does not reach the threshold given by the user (or the reference value of the number of control points at the end of the iterative solution), it is still necessary to perform a refinement operation on the control points. The sampling frequency is doubled, that is, the number of control points in the control point set is doubled. Then the control points and the deblurred image are iteratively solved again.
[0191] If the number of control points has reached the threshold given by the user (or the reference value of the number of control points at the end of the iterative solution), the main loop ends and the final deblurred image and motion blur path are output, that is, the deblurred target image and target motion blur path that meet the requirements are obtained at the same time.
[0192] In specific implementation, the above target motion blur path can also be used to perform reliability verification on the obtained deblurred target image. If it is determined that the reliability verification passes, it can be determined that the deblurred target image meets the requirements.
[0193] On the contrary, when it is determined that the reliability fails, it can be determined that the deblurred target image does not meet the requirements, and an iterative solution can be performed again.
[0194] In some embodiments, when the target image is an image containing a target user's face, the target service information includes facial features of the target user;
[0195] Accordingly, the target transaction data is processed according to the target business information. The specific implementation may include the following contents:
[0196] S1: Verify the identity of the target user based on the target user’s facial features;
[0197] S2: When it is determined that the identity of the target user has been verified, obtain the user information of the target user;
[0198] S3: Log into the target user's transaction account according to the target user's user information; and perform corresponding target transaction data processing based on the target user's transaction account number.
[0199] Based on the above embodiments, target transaction data processing in relatively complex transaction business scenarios can be achieved more safely and efficiently.
[0200] As can be seen from the above, the transaction data processing method provided by the embodiment of this specification, when detecting that the target image carried by the target transaction processing request is a motion blurred image, can first construct a piecewise linear model of the motion blurred path in the target image, and a corresponding target optimization function; then, according to the preset processing rules, the piecewise linear model and the target optimization function are used to determine the deblurred target image that meets the requirements through multiple rounds of iterative solutions; then, based on the deblurred target image, the target business information is extracted; and according to the target business information, the corresponding target transaction data processing is performed. Therefore, only one image, the target image, needs to be used to efficiently obtain the deblurred target image at a lower processing cost, and then the corresponding target transaction data processing can be accurately completed based on the above deblurred target image.
[0201] This specification also provides an image processing method, which may include the following contents during specific implementation:
[0202] S1: Acquire a target image with motion blur;
[0203] S2: constructing a piecewise linear model of the motion blur path in the target image and a corresponding target optimization function;
[0204] S3: According to the preset processing rules, using the piecewise linear model and the target optimization function, through multiple rounds of iterative solving, determine a deblurred target image that meets the requirements.
[0205] Based on the above embodiment, a deblurred target image that meets the requirements can be efficiently and accurately restored by using only one image, namely, the target image with motion blur, thereby effectively reducing the cost of processing related image data.
[0206] This specification embodiment provides a server, referring to Figure 7 The server includes a network communication port 701, a processor 702 and a memory 703, and the above structures are connected through internal cables so that each structure can perform specific data interaction.
[0207] The network communication port 701 may be specifically used to receive a target transaction processing request; wherein the target transaction processing request at least carries a target image.
[0208] The processor 702 can be specifically used to detect whether the target image is a motion blurred image; when it is determined that the target image is a motion blurred image, construct a piecewise linear model of the motion blur path in the target image and a corresponding target optimization function; according to preset processing rules, using the piecewise linear model and the target optimization function, through multiple rounds of iterative solutions, determine a deblurred target image that meets the requirements; based on the deblurred target image, extract target business information; based on the target business information, perform corresponding target transaction data processing.
[0209] The memory 703 can be specifically used to store corresponding instruction programs, as well as target transaction processing requests, piecewise linear models, target optimization functions, target business information and other data.
[0210] Based on the above method, the relevant structural performance of the server can be effectively utilized, the data processing speed of the electronic device can be improved, and the relevant transaction data processing can be efficiently realized.
[0211] In this embodiment, the network communication port 701 can be a virtual port that is bound to different communication protocols so that different data can be sent or received. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. In addition, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.
[0212] In this embodiment, the processor 702 may be implemented in any appropriate manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.
[0213] In this embodiment, the memory 703 may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function that has no physical form is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.
[0214] The embodiments of this specification also provide a computer-readable storage medium based on the above-mentioned transaction data processing method, wherein the computer-readable storage medium stores computer program instructions, which, when executed, implement the following: receiving a target transaction processing request; wherein the target transaction processing request carries at least a target image; detecting whether the target image is a motion blurred image; when it is determined that the target image is a motion blurred image, constructing a piecewise linear model of the motion blur path in the target image, and a corresponding target optimization function; according to preset processing rules, using the piecewise linear model and the target optimization function, through multiple rounds of iterative solutions, determine a deblurred target image that meets the requirements; based on the deblurred target image, extracting target business information; and performing corresponding target transaction data processing based on the target business information.
[0215] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.
[0216] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer-readable storage medium can be explained in comparison with other implementations and will not be described in detail here.
[0217] The embodiments of the present specification also provide a computer program product, which at least includes a computer program, and when the computer program is executed by a processor, it implements the following method steps: receiving a target transaction processing request; wherein the target transaction processing request at least carries a target image; detecting whether the target image is a motion blurred image; when it is determined that the target image is a motion blurred image, constructing a piecewise linear model of the motion blur path in the target image, and a corresponding target optimization function; according to preset processing rules, using the piecewise linear model and the target optimization function, through multiple rounds of iterative solutions, determining a deblurred target image that meets the requirements; based on the deblurred target image, extracting target business information; and performing corresponding target transaction data processing based on the target business information.
[0218] See also Figure 8 As shown, the embodiment of this specification also provides a transaction data processing device, which may specifically include the following structural modules:
[0219] The receiving module 801 may be specifically configured to receive a target transaction processing request; wherein the target transaction processing request at least carries a target image;
[0220] The detection module 802 may be specifically used to detect whether the target image is a motion blurred image;
[0221] The construction module 803 may be specifically used to construct a piecewise linear model of a motion blur path in the target image and a corresponding target optimization function when it is determined that the target image is a motion blurred image;
[0222] The iterative solution module 804 may be specifically used to determine a deblurred target image that meets the requirements through multiple rounds of iterative solutions using the piecewise linear model and the target optimization function according to a preset processing rule;
[0223] The extraction module 805 may be specifically used to extract target business information according to the deblurred target image;
[0224] The processing module 806 may be specifically configured to perform corresponding target transaction data processing according to the target business information.
[0225] In some embodiments, when the above-mentioned detection module 802 is implemented, it can detect whether the target image is a motion blurred image in the following manner: detect and segment the target object image area and the background image area in the target image; respectively detect whether the blur evaluation values of the target object image area and the background image area are greater than a preset blur evaluation threshold; when it is determined that the blur evaluation value of the target object image area is greater than the preset blur evaluation threshold, and the blur evaluation value of the background image area is less than or equal to the preset blur evaluation threshold, determine that the target image is a motion blurred image.
[0226] In some embodiments, when the above-mentioned construction module 803 is implemented, a piecewise linear model of the motion blur path in the target image can be constructed in the following manner: identifying and determining key identification points of the target object in the target image; determining multiple control points in the target image based on the key identification points; constructing a segmented path model between two adjacent control points based on the multiple control points; and combining the segmented path models to obtain a piecewise linear model of the motion blur path in the target image.
[0227] In some embodiments, when the construction module 803 is implemented, a segmented path model between two adjacent control points may be constructed according to the following formula:
[0228]
[0229] in, represents the path between the control point numbered q and the control point numbered q+1, represents the path of the control point numbered q, represents the path of the control point numbered q+1, t represents the time, t q Indicates the time corresponding to the control point numbered q, represents the number of control points in the control point set Q, and g(t) represents the gate function.
[0230] In some embodiments, when the above-mentioned construction module 803 is implemented, the target optimization function for the target image can be constructed in the following manner: based on the piecewise linear model, a path change penalty term for the motion blur path is constructed; based on the blurred motion path convolution kernel in the frequency domain inverse filtering, a gradient penalty term for the deblurred image is constructed; and the path change penalty term and the gradient penalty term are used together to construct the target optimization function for the target image.
[0231] In some embodiments, when the construction module 803 is implemented, the path change penalty term and the gradient penalty term may be used together according to the following formula to construct a target optimization function for the target image:
[0232] M=Rα,β (Q)+R ▽ (f)
[0233] Among them, M represents the function value of the target optimization function, R α,β (Q) represents the path change penalty term, R ▽ (f) represents the gradient penalty term, Q represents the control point set, α represents the unit normal vector at the control point, β represents the unit tangent vector at the control point, and f represents the deblurred image.
[0234] In some embodiments, when the above-mentioned iterative solution module 804 is specifically implemented, the iterative solution of the current round can be performed in the following manner: obtain the motion blur path of the previous round and the deblurred image of the previous round; determine the auxiliary deblurred image of the current round based on the motion blur path of the previous round; use the auxiliary deblurred image of the current round to determine the control point set of the current round by solving the minimum value of the target optimization function; determine the motion blur path of the current round based on the piecewise linear model and the control point set of the current round; use the control point set of the current round to determine the deblurred image of the current round by solving the minimum value of the target optimization function.
[0235] In some embodiments, when the above-mentioned iterative solution module 804 is implemented, the auxiliary deblurred image of the current round can be determined according to the motion blur path of the previous round in the following manner: synthesize the motion blur convolution kernel of the previous round according to the motion blur path of the previous round; perform fast Fourier transform on the motion blur convolution kernel of the previous round to obtain the motion blur convolution kernel after transformation based on the frequency domain; use the transformed motion blur convolution kernel to perform frequency domain inverse filtering on the target image to obtain the auxiliary deblurred image of the current round.
[0236] In some embodiments, when the above-mentioned iterative solution module 804 is implemented, it can also be used to detect whether a preset iteration end condition is met based on the control point set of the current round; when it is determined that the preset iteration end condition is met, the iterative solution is ended; and the deblurred image of the current round is determined as a deblurred target image that meets the requirements.
[0237] In some embodiments, the target image may specifically include at least one of the following: an image containing a target user's face, an image containing a target user's action, an image containing a target certificate, etc.
[0238] This specification also provides an image processing device, which may specifically include the following structural modules:
[0239] An acquisition module, which can be specifically used to acquire a target image with motion blur;
[0240] A construction module, which can be used to construct a piecewise linear model of the motion blur path in the target image and a corresponding target optimization function;
[0241] The iterative solution module can be specifically used to determine a deblurred target image that meets the requirements through multiple rounds of iterative solutions based on preset processing rules, using the piecewise linear model and the target optimization function.
[0242] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0243] It can be seen from the above that the transaction data processing device provided in the embodiment of this specification only needs to use one image, the target image, to efficiently obtain the deblurred target image at a lower processing cost, and then can accurately complete the corresponding target transaction data processing based on the above deblurred target image.
[0244] In a specific scenario example, the transaction data processing method provided in this specification can be applied to achieve single image motion blur recovery. For the specific implementation process, please refer to the following content.
[0245] In this scenario example, for banking scenarios, images can record important information in various scenarios, but motion blur poses a challenge to image quality. In scenarios such as transaction monitoring and terminal operation recording, image blur caused by motion affects the recognition and accuracy of key information. Blurred images bring bottlenecks to transaction records, identity recognition, etc., increase the risk of misjudgment, and reduce the reliability of the monitoring system. Automatic teller machines (ATMs) are an important part of banking services and a key area of bank security management. Limited by the shooting environment and shooting costs, and the fact that ATM operators often do not stand still, the security cameras equipped with ATMs are prone to capture images affected by motion blur. The use of image motion blur recovery technology helps to recover valuable information from these image materials.
[0246] In view of this technical problem, it is necessary to provide an innovative single-image motion blur recovery method. This method requires the use of advanced image processing algorithms to correct the blur caused by motion to improve image clarity and detail fidelity. In the application scenario of ATM operation records, the necessity of this technology is obvious. This method only requires the use of a single image itself for recovery, allowing banks to record ATM transaction activities with a longer history at a smaller storage space cost, and provide longer-term evidence information in special scenarios such as supervision. By solving the problem of motion blur, monitoring accuracy can be improved, false alarms can be reduced, and the security, efficiency and customer trust level of ATM service business can be improved, providing more reliable support for financial transactions.
[0247] In this scenario example, a single image motion blur recovery method and system is used to solve the problem that motion blurred images bring misjudgment risks to ATM transaction records, identity recognition, etc. Irregular paths (e.g., motion blurred paths) can be approximated by a piecewise linear model, and it can optimize the model step by step from coarse to fine. In application scenarios such as ATM security cameras, the proposed motion blur recovery method can reduce the adverse effects of image degradation and approximately restore the original image, thereby reducing the risk of misjudgment. Based on this solution, it can effectively solve technical problems such as poor shooting environment and image quality degradation encountered in applications such as customer archives and face recognition, improve image clarity and detail fidelity, and ensure the safety of bank equipment and users. The specific implementation may include the following steps.
[0248] S1: Acquire a single image to be restored (for example, a target image), such as a customer profile, a face recognition image, etc., which is called a blurred image; an image that is not motion blurred is called a latent image, and an estimate of the latent image obtained by a motion blur recovery method is called a deblurred image.
[0249] Assume the motion blur path in the image plane is Where 0≤t<1 represents the moving trajectory of any photographed object in the field of view during the exposure time. At other times, the displacement of the object relative to the initial time The motion blur convolution kernel is: The general method of implementing motion blur recovery in this patent is: through multi-level iteration from coarse to fine, the motion blur convolution kernel is estimated, and the image is inversely filtered in the frequency domain.
[0250] S2: Use piecewise linear models to approximate the relative path of motion blur The model includes several control points The control points are uniformly sampled on t∈[0,1) between two adjacent control points. is linear interpolation. That is:
[0251] Where g(t) is the gate function, only t q ≤t<t q+1 The value is 1 at the time, and 0 at other times.
[0252] S3: This piecewise linear model obeys the prior that the motion blur path is as short and smooth as possible, and introduces a regularization term to penalize drastic changes in direction and rate (for example, a path change penalty term):
[0253]
[0254] in:
[0255]
[0256] The reason for adding the penalty term is that the same motion blurred image may be formed by an infinite number of motion blurred paths, and only the shortest and most gently changing ones are selected; if there is no penalty term in the subsequent numerical optimization process, some control points may not converge.
[0257] are the unit normal vector and unit tangent vector at the control point, respectively, which are calculated by central difference. The second-order derivative is calculated by central difference using three adjacent control points. The specific calculation can refer to the following second-order central difference formula:
[0258]
[0259] The above numerical differentiation calculation uses the control point Finish.
[0260] S4: The motion blur convolution kernel is synthesized using the motion blur path approximately represented by the above model, and the frequency domain representation of the motion blur convolution kernel is obtained by fast Fourier transform calculation:
[0261]
[0262] S5: Synthesize an estimate of the latent image by inverse filtering in the frequency domain Subject to the gradient prior, the gradient penalty term is:
[0263]
[0264] Among them, λ1 and λ2 are hyperparameters.
[0265] S6: Manually give the initial motion blur path, which is the roughest linear model, that is, there are only two control points, and the motion blur is a uniform straight line. The initial motion blur path is input into the main loop to start iterative optimization (or iterative solution).
[0266] S7: In one round of iteration, the control points and the deblurred image need to be processed separately. Perform iterative optimization:
[0267] Q = argmin Q (R ▽ (f)+R α,β (Q)
[0268] f = argmin f (R ▽ (f)+R α,β (Q)).
[0269] During the specific iterative optimization, there are no specific constraints on numerical optimization, and the Levenberg-Marquardt algorithm can be used.
[0270] During specific iterative optimization, you can also use the Coarse-to-fine strategy to avoid falling into the wrong local minimum.
[0271] S8: When the number of control points does not reach the threshold given by the user, it is still necessary to perform fine operations on the control points. The sampling frequency is doubled to double the number of control points. Then the control points and deblurred image are iteratively optimized again.
[0272] If the number of control points has reached a threshold given by the user, the main loop ends and the final deblurred image (eg, the deblurred target image) and the motion blur path are output.
[0273] Through the above scenario examples, the transaction data processing method provided in this manual is verified. The motion blur estimation algorithm based on the control point is added with a control point penalty term to constrain the estimation result. The original image is restored based on a single motion blurred image. In application scenarios such as ATM security cameras, a single image itself is used to eliminate motion blur and restore effective information, providing more reliable support in special scenarios such as case investigation.
[0274] Although the present specification provides method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent a unique execution order. When the device or client product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. The first, second, etc. words are used to represent the name, and do not represent any particular order.
[0275] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.
[0276] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer-readable storage media including storage devices.
[0277] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that the present specification can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can essentially be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.
[0278] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. This specification can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.
[0279] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.
Claims
1. A transaction data processing method, It is characterized in that include: receiving a target transaction processing request; wherein the target transaction processing request carries at least a target image; Detect whether the target image is a motion blurred image; When it is determined that the target image is a motion blurred image, a piecewise linear model of the motion blurred path in the target image and a corresponding target optimization function are constructed; According to the preset processing rules, the piecewise linear model and the target optimization function are used to determine the deblurred target image that meets the requirements through multiple rounds of iterative solutions; According to the deblurred target image, target business information is extracted; According to the target business information, corresponding target transaction data processing is carried out.
2. The method according to claim 1, It is characterized in that Detect whether the target image is a motion blurred image, including: Detect and segment the target object image area and the background image area in the target image; Respectively detecting whether the fuzzy evaluation values of the target object image area and the background image area are greater than a preset fuzzy evaluation threshold; When it is determined that the blur evaluation value of the target object image area is greater than a preset blur evaluation threshold and the blur evaluation value of the background image area is less than or equal to the preset blur evaluation threshold, the target image is determined to be a motion blurred image.
3. The method according to claim 1, It is characterized in that Construct a piecewise linear model of the motion blur path in the target image, including: Identify and determine the key identification points of the target object in the target image; Determining a plurality of control points in the target image according to the key identification points; According to the multiple control points, a segmented path model between two adjacent control points is constructed; The segmented path models are combined to obtain a segmented linear model of the motion blur path in the target image.
4. The method according to claim 3, It is characterized in that According to multiple control points, a segmented path model between two adjacent control points is constructed, including: According to the following formula, a segmented path model between two adjacent control points is constructed: in, represents the path between the control point numbered q and the control point numbered q+1, represents the path of the control point numbered q, x q+1 represents the path of the control point numbered q+1, t represents the time, t q represents the time corresponding to the control point numbered q, Q represents the number of control points in the control point set Q, and g(t) represents the gate function.
5. The method according to claim 4, It is characterized in that Construct a target optimization function for the target image, including: According to the piecewise linear model, constructing a path change penalty term for the motion blur path; Based on the convolution kernel of the blurred motion path in the frequency domain inverse filtering, a gradient penalty term for the deblurred image is constructed; The path change penalty term and the gradient penalty term are used together to construct a target optimization function for the target image.
6. The method according to claim 5, It is characterized in that The path change penalty term and the gradient penalty term are used together to construct a target optimization function for the target image, including: According to the following formula, construct the target optimization function for the target image: M=R α,β (Q)+R ▽ (f) Among them, M represents the function value of the target optimization function, R α,β (Q) represents the path change penalty term, R ▽ (f) represents the gradient penalty term, Q represents the control point set, α represents the unit normal vector at the control point, β represents the unit tangent vector at the control point, and f represents the deblurred image.
7. The method according to claim 1, It is characterized in that According to the preset processing rules, the piecewise linear model and the target optimization function are used to determine the deblurred target image that meets the requirements through multiple rounds of iterative solutions, including: The iterative solution of the current round is performed in the following manner: Get the motion blur path of the previous round and the deblurred image of the previous round; According to the motion blur path of the previous round, the auxiliary deblurred image of the current round is determined; Using the auxiliary deblurred image of the current round, the control point set of the current round is determined by solving the minimum value of the target optimization function; Determine the motion blur path of the current wheel according to the piecewise linear model and the control point set of the current wheel; The deblurred image of the current round is determined by using the control point set of the current round and solving the minimum value of the target optimization function.
8. The method according to claim 7, It is characterized in that According to the motion blur path of the previous round, the auxiliary deblurred image of the current round is determined, including: According to the motion blur path of the previous round, the motion blur convolution kernel of the previous round is synthesized; Perform fast Fourier transform on the motion blur convolution kernel of the previous round to obtain the motion blur convolution kernel after transformation based on the frequency domain; The target image is subjected to frequency domain inverse filtering using the transformed motion blur convolution kernel to obtain an auxiliary deblurred image of the current round.
9. The method according to claim 7, It is characterized in that The method further comprises: According to the control point set of the current round, check whether the preset iteration end condition is met; When it is determined that the preset iteration end condition is met, the iterative solution is terminated; and the deblurred image of the current round is determined as the deblurred target image that meets the requirements.
10. The method according to claim 1, It is characterized in that The target image includes at least one of the following: an image containing a target user's face, an image containing a target user's action, and an image containing a target certificate.
11. An image processing method, It is characterized in that include: Acquire a target image with motion blur; Constructing a piecewise linear model of the motion blur path in the target image and a corresponding target optimization function; According to the preset processing rules, the piecewise linear model and the target optimization function are used to determine a deblurred target image that meets the requirements through multiple rounds of iterative solutions.
12. A transaction data processing device, It is characterized in that include: A receiving module, configured to receive a target transaction processing request; wherein the target transaction processing request at least carries a target image; A detection module, used to detect whether a target image is a motion blurred image; A construction module, for constructing a piecewise linear model of a motion blur path in the target image and a corresponding target optimization function when determining that the target image is a motion blurred image; An iterative solution module, used to determine a deblurred target image that meets the requirements through multiple rounds of iterative solutions using the piecewise linear model and the target optimization function according to preset processing rules; An extraction module, used to extract target business information based on the deblurred target image; The processing module is used to perform corresponding target transaction data processing according to the target business information.
13. A server, It is characterized in that The method comprises a processor and a memory for storing processor-executable instructions, wherein the processor implements the steps of the method according to any one of claims 1 to 11 when executing the instructions.
14. A computer-readable storage medium, It is characterized in that Computer instructions are stored thereon, and when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product, It is characterized in that The invention comprises a computer program, which implements the steps of the method according to any one of claims 1 to 11 when being executed by a processor.
Citation Information
Patent Citations
Model training method and device, image processing method and device, electronic device and computer readable storage medium
CN110008817A
Image deblurring method, device, equipment, system and medium
CN117314764A
