Card surface generation method and device of bank card, electronic equipment and storage medium

By obtaining the text information and target images input by the user, detecting prohibited elements, and determining the distribution location information of card surface materials, the problem of low efficiency in bank card surface generation in the prior art is solved, and efficient and personalized card surface generation is achieved.

CN119762611APending Publication Date: 2025-04-04INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411929403.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The lack of effective mechanisms in the existing technology allows customers to obtain personalized bank card pages that meet the standards through simple operations, resulting in compliant and inefficient generation of personalized bank card pages.

Method used

By obtaining the text information and target image input by the user, detecting whether there are prohibited elements in the target image, determining the card surface material, and converting it into Gaussian noise information to determine the distributed location information, and finally generating the bank card surface.

Benefits of technology

It realizes automatic detection and avoids the use of non-compliant materials, and intelligently generates personalized and compliant bank card boards, greatly improving the efficiency and quality of card board generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762611A_ABST
    Figure CN119762611A_ABST
Patent Text Reader

Abstract

The invention discloses a bank card surface generation method and device, electronic equipment and a storage medium, and relates to the field of financial science and technology and the field of artificial intelligence. The method comprises the steps of obtaining text information and a target image input by a user; detecting whether elements forbidden to be used exist in the target image or not; determining N card surface materials according to the text information and the target image when it is detected that no element prohibited from being used exists in the target image; converting the information of each card surface material into Gaussian noise information, and determining distribution position information of each card surface material according to the Gaussian noise information; and generating the card surface of the bank card according to the N card surface materials and the distribution position information of each card surface material. According to the method and the device, the technical problem of low generation efficiency of the card surface of the compliant and personalized bank card due to the fact that an effective mechanism is lacked to enable a customer to obtain the personalized card surface meeting the specification through simple operation in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of financial technology and artificial intelligence, and specifically, to a method, device, electronic device and storage medium for generating a bank card face. Background Art

[0002] At present, there are many regulatory requirements for bank card printing and membership card making. If customers want to customize personalized credit cards, they often lack relevant professional knowledge, resulting in non-compliant self-made card designs. In addition, if banks want to customize credit cards for customers, they cannot fully match the personal preferences and needs of each customer.

[0003] It can be seen that the existing technology lacks an effective mechanism that allows customers to obtain a personalized card face that complies with the specifications through simple operations, which leads to a technical problem of low generation efficiency when generating compliant and personalized bank card faces.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a method, device, electronic device and storage medium for generating a bank card face, so as to at least solve the technical problem in the prior art of low efficiency in generating a compliant and personalized bank card face due to the lack of an effective mechanism for customers to obtain a personalized card face that complies with the specifications through simple operations.

[0006] According to one aspect of an embodiment of the present application, a method for generating a bank card face is provided, comprising: obtaining text information and a target image input by a user; detecting whether the target image contains prohibited elements; when detecting that the target image does not contain prohibited elements, determining N card face materials based on the text information and the target image, wherein N is an integer greater than 1, and the N card face materials include at least one first type material and at least one second type material, the first type material is a material that must exist in the card face of the bank card, and the second type material is a material that does not necessarily exist in the card face of the bank card; converting information of each card face material into Gaussian noise information, and determining distribution position information of each card face material based on the Gaussian noise information; generating a bank card face based on the N card face materials and the distribution position information of each card face material.

[0007] Optionally, detecting whether a target image contains prohibited elements includes: dividing the target image into M pixels through an image verification model, wherein M is an integer greater than 1; extracting image features of each of the M pixels, wherein the image features of each pixel include position features and color features of the pixel; determining a negative sample pixel corresponding to each pixel based on the position features of the pixel, wherein the negative sample pixel belongs to a pixel corresponding to the prohibited element, and the negative sample pixel corresponds to the same position coordinate as the pixel; calculating the color feature similarity between the negative sample pixel corresponding to each pixel and the pixel; and determining whether a prohibited element exists in the target image based on the color feature similarity.

[0008] Optionally, determining whether there are prohibited elements in the target image based on color feature similarity includes: when the color feature similarity between the negative sample pixel corresponding to the ith pixel in the target image and the ith pixel is greater than a preset similarity, determining the ith pixel as a first pixel, wherein the ith pixel is any one of the M pixels; when the color feature similarity between the negative sample pixel corresponding to the ith pixel and the ith pixel is less than or equal to a preset similarity, determining the ith pixel as a second pixel; calculating the number of first pixels and the number of second pixels in the target image; and determining whether there are prohibited elements in the target image based on the number of first pixels and the number of second pixels, wherein the probability of the prohibited elements in the target image being present is positively correlated with the number of first pixels, and the probability of the prohibited elements in the target image being present is negatively correlated with the number of second pixels.

[0009] Optionally, the training process of the image verification model includes the following steps: obtaining a training image, wherein the training image includes prohibited elements; performing multiple training operations on the first encoder and the first decoder using the training image, wherein each training operation includes: performing dimensionality reduction processing and feature encoding processing on the training image by the first encoder, wherein the dimensionality reduction processing is used to compress the training image into an image of a target dimension; the feature encoding processing is used to extract image features from the training image, and encode the extracted image features into a feature vector; generating a predicted image by the first decoder based on the feature vector output by the first encoder; after detecting that the first encoder and the first decoder have reached a convergence state after multiple training operations, stopping the training, and forming the first encoder and the first decoder that have reached a convergence state into an image verification model, wherein the first decoder in a converged state, after receiving the feature vector output by the first encoder in a converged state, generates a predicted image whose similarity with the training image exceeds a preset threshold.

[0010] Optionally, N card surface materials are determined based on the text information and the target image, including: decomposing the target image into L first materials to be selected, where L is a positive integer less than or equal to N; converting the text information into a text feature vector, where the text feature vector is used to characterize text features about the image material in the text information; determining K second materials to be selected based on the text feature vector through the prior knowledge learned by the material model in the model training stage, where K is a positive integer less than or equal to N, the training data of the material model is historical text provided by historical users, and the training label of the material model is the card surface material actually selected by the historical users; filtering the materials in the L first materials to be selected that are repeated in the K second materials to be selected, and determining the remaining first materials to be selected and second materials to be selected as N card surface materials.

[0011] Optionally, the information of each card surface material is converted into Gaussian noise information, and the distribution position information of each card surface material is determined based on the Gaussian noise information, including: determining a Gaussian distribution function according to the size of the card surface of the bank card; converting the information of N card surface materials into a Gaussian noise map based on the Gaussian distribution function, wherein the generation process of the Gaussian noise map includes T steps, each of the T steps is used to add part of the noise information, and T is an integer greater than or equal to 1; the Gaussian noise map represents the Gaussian noise information of each card surface material in the form of an image; and determining the distribution position information of each card surface material based on the noise data corresponding to each card surface material in the Gaussian noise map and the position of the noise data.

[0012] Optionally, the distribution position information of each card surface material is determined based on the noise data corresponding to each card surface material in the Gaussian noise map and the position of the noise data, including: detecting whether there is corresponding position prompt information for each card surface material, wherein the position prompt information is used to characterize the user's expected position of the card surface material; when it is detected that at least one card surface material has corresponding position prompt information, the distribution position information of each card surface material is determined based on the position prompt information, the noise data corresponding to each card surface material in the Gaussian noise map and the position of the noise data.

[0013] Optionally, according to the Gaussian distribution function, the information of N card surface materials is converted into a Gaussian noise map, including: inputting the Gaussian distribution function and the N card surface materials into a noise predictor, and converting the N card surface materials into a Gaussian noise map that satisfies the Gaussian distribution function through the noise predictor, wherein the noise predictor is a neural network model.

[0014] Optionally, the training process of the noise predictor includes the following steps: obtaining a sample image, wherein the sample image includes at least one image material; performing a target processing operation on the sample image through a neural network, wherein the target processing operation includes: converting the sample image into an initial Gaussian noise map through at least one forward processing, wherein the forward processing is used to add noise data to the sample image; restoring the initial Gaussian noise map to a target image through at least one backward processing, wherein the backward processing is used to filter noise data from the initial Gaussian noise map; iteratively training the neural network according to the image similarity between the target image and the sample image obtained after each target processing operation, until the neural network completes S consecutive target processing operations on the sample image, and the image similarity between the target image and the sample image generated each time is less than the target threshold, determining that the neural network training is completed, and obtaining the noise predictor, wherein S is an integer greater than or equal to 1.

[0015] According to another aspect of an embodiment of the present application, a device for generating a bank card face is provided, which includes: an acquisition unit, which is used to acquire text information and a target image input by a user; a detection unit, which is used to detect whether there are prohibited elements in the target image; a first determination unit, which is used to determine N card face materials based on the text information and the target image when it is detected that there are no prohibited elements in the target image, wherein N is an integer greater than 1, and the N card face materials include at least one first type of material and at least one second type of material, the first type of material is a material that must exist in the card face of the bank card, and the second type of material is a material that does not necessarily exist in the card face of the bank card; a second determination unit, which is used to convert the information of each card face material into Gaussian noise information, and determine the distribution position information of each card face material based on the Gaussian noise information; a generation unit, which is used to generate the card face of the bank card based on the N card face materials and the distribution position information of each card face material.

[0016] Optionally, the detection unit includes: a first processing subunit, a second processing subunit, a third processing subunit, a fourth processing subunit, and a first determination subunit. The first processing subunit is used to segment the target image into M pixels through an image verification model, wherein M is an integer greater than 1; the second processing subunit is used to extract the image features of each pixel in the M pixels, wherein the image features of each pixel include the position features and color features of the pixel; the third processing subunit is used to determine the negative sample pixel corresponding to each pixel according to the position features of the pixel, wherein the negative sample pixel belongs to the pixel corresponding to the prohibited element, and the negative sample pixel corresponds to the same position coordinate as the pixel; the fourth processing subunit is used to calculate the color feature similarity between the negative sample pixel corresponding to each pixel and the pixel; the first determination subunit is used to determine whether there is a prohibited element in the target image according to the color feature similarity.

[0017] Optionally, the first determination subunit includes: a first determination module, a second determination module, a calculation module, and a third determination module. The first determination module is used to determine the i-th pixel as the first pixel when the color feature similarity between the negative sample pixel corresponding to the i-th pixel in the target image and the i-th pixel is greater than a preset similarity, wherein the i-th pixel is any one of the M pixels; the second determination module is used to determine the i-th pixel as the second pixel when the color feature similarity between the negative sample pixel corresponding to the i-th pixel and the i-th pixel is less than or equal to a preset similarity; the calculation module is used to calculate the number of the first pixel and the number of the second pixel in the target image; the third determination module is used to determine whether there is a prohibited element in the target image according to the number of the first pixel and the number of the second pixel, wherein the probability of the prohibited element existing in the target image is positively correlated with the number of the first pixel, and the probability of the prohibited element existing in the target image is negatively correlated with the number of the second pixel.

[0018] Optionally, the bank card face generation device further includes: a first acquisition unit, a first training unit, and a first processing unit. The first acquisition unit is used to acquire a training image, wherein the training image includes prohibited elements; the first training unit is used to perform multiple training operations on the first encoder and the first decoder using the training image, wherein each training operation includes: performing dimensionality reduction processing and feature encoding processing on the training image by the first encoder, wherein the dimensionality reduction processing is used to compress the training image into an image of a target dimension; the feature encoding processing is used to extract image features from the training image and encode the extracted image features into a feature vector; and generating a predicted image by the first decoder according to the feature vector output by the first encoder; the first processing unit is used to stop training after detecting that the first encoder and the first decoder reach a convergence state after multiple training operations, and form an image verification model with the first encoder and the first decoder that reach a convergence state, wherein the first decoder in a converged state generates a predicted image whose similarity with the training image exceeds a preset threshold after receiving the feature vector output by the first encoder in a converged state.

[0019] Optionally, the first determination unit includes: a decomposition subunit, a conversion subunit, a second determination subunit, and a third determination subunit. The decomposition subunit is used to decompose the target image into L first materials to be selected, where L is a positive integer less than or equal to N; the conversion subunit is used to convert text information into a text feature vector, where the text feature vector is used to characterize the text features of the image material in the text information; the second determination subunit is used to determine K second materials to be selected based on the text feature vector by using the prior knowledge learned by the material model in the model training stage, where K is a positive integer less than or equal to N, the training data of the material model is the historical text provided by the historical user, and the training label of the material model is the card surface material actually selected by the historical user; the third determination subunit is used to filter the materials in the L first materials to be selected that are repeated in the K second materials to be selected, and determine the remaining first materials to be selected and the second materials to be selected as N card surface materials.

[0020] Optionally, the second determination unit includes: a fourth determination subunit, a fifth determination subunit and a sixth determination subunit. The fourth determination subunit is used to determine the Gaussian distribution function according to the size of the card face of the bank card; the fifth determination subunit is used to convert the information of N card face materials into a Gaussian noise map according to the Gaussian distribution function, wherein the generation process of the Gaussian noise map includes T steps, each of the T steps is used to add part of the noise information, and T is an integer greater than or equal to 1; the Gaussian noise map represents the Gaussian noise information of each card face material in the form of an image; the sixth determination subunit is used to determine the distribution position information of each card face material according to the noise data corresponding to each card face material in the Gaussian noise map and the position of the noise data.

[0021] Optionally, the sixth determination subunit includes: a first detection module and a fourth determination module. The first detection module is used to detect whether there is corresponding position prompt information for each card surface material, wherein the position prompt information is used to represent the user's expected position for the card surface material; the fourth determination module is used to determine the distribution position information of each card surface material according to the position prompt information, the noise data corresponding to each card surface material in the Gaussian noise map, and the position of the noise data when detecting that there is corresponding position prompt information for at least one card surface material.

[0022] Optionally, the fifth determination subunit includes: a conversion module, used to input the Gaussian distribution function and N card surface materials into a noise predictor, and convert the N card surface materials into a Gaussian noise map that satisfies the Gaussian distribution function through the noise predictor, wherein the noise predictor is a neural network model.

[0023] Optionally, the bank card face generation device further includes: a second acquisition unit, a first execution unit, and a target training unit. The second acquisition unit is used to acquire a sample image, wherein the sample image includes at least one image material; the first execution unit is used to perform a target processing operation on the sample image through a neural network, wherein the target processing operation includes: converting the sample image into an initial Gaussian noise image through at least one forward processing, wherein the forward processing is used to add noise data to the sample image; restoring the initial Gaussian noise image to a target image through at least one backward processing, wherein the backward processing is used to filter noise data from the initial Gaussian noise image; the target training unit is used to iteratively train the neural network according to the image similarity between the target image and the sample image obtained after each target processing operation, until the neural network completes S consecutive target processing operations on the sample image, and the image similarity between the target image and the sample image generated each time is less than the target threshold, and the neural network training is determined to be completed, and a noise predictor is obtained, wherein S is an integer greater than or equal to 1.

[0024] According to another aspect of an embodiment of the present application, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned bank card card face generation method.

[0025] According to another aspect of an embodiment of the present application, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned method for generating a card face of a bank card.

[0026] According to another aspect of an embodiment of the present application, a computer program product is also provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, the steps of the above-mentioned method for generating a card face of a bank card are implemented.

[0027] It can be seen from the above content that the bank card face generation method and device of the present application, by introducing an image verification model and a material model, can automatically detect whether the target image provided by the user meets the specifications of the bank card face design, avoiding the use of non-compliant materials, and intelligently generating personalized and compliant bank card faces according to the text information and target image input by the user, greatly improving the efficiency and quality of card face generation. In addition, by converting the card face material into Gaussian noise information and determining the distribution position information of the card face material based on the Gaussian noise information, the intelligent layout of the card face material on the card face can be achieved, further improving the personalization and aesthetics of the card face design. In practical applications, this solution can significantly improve customer experience and promote interaction between banks and customers. At the same time, it also provides banks with more efficient and compliant personalized card face design services, with significant economic and social benefits.

[0028] It can be seen that the technical solution of the present application solves the technical problem of low efficiency in generating compliant and personalized bank card faces due to the lack of an effective mechanism in the prior art that allows customers to obtain personalized card faces that comply with regulations through simple operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0030] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for generating a bank card face is shown;

[0031] Figure 2is a flow chart of an optional method for generating a bank card face according to an embodiment of the present application;

[0032] Figure 3 is a schematic diagram of an optional method of using an image verification model to detect a target image according to an embodiment of the present application;

[0033] Figure 4 is a schematic diagram of a training process of an optional image inspection model according to an embodiment of the present application;

[0034] Figure 5 is a schematic diagram of an optional conversion process of Gaussian noise information according to an embodiment of the present application;

[0035] Figure 6 is a schematic diagram of an optional forward process according to an embodiment of the present application;

[0036] Figure 7 A schematic diagram of an optional noise predictor is shown;

[0037] Figure 8 An optional flow chart of generating a bank card face using a noise predictor is shown;

[0038] Fig. 9 is a schematic diagram of an optional device for generating a bank card face according to an embodiment of the present application;

[0039] Fig.10 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application 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 data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising 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.

[0042] It should also be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with relevant laws, regulations and standards, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.

[0043] According to an embodiment of the present application, an embodiment of a method for generating a card face of a bank card is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0044] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for generating a bank card face is shown. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0045] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0046] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the card face generation method of the bank card in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the card face generation method of the bank card described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0047] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0048] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0049] Under the above operating environment, this application provides Figure 2 The method for generating the card face of the bank card shown. Figure 2 FIG. 1 is a flow chart of an optional method for generating a bank card face according to an embodiment of the present application. Figure 2 As shown, the following steps are included:

[0050] Step S201, obtaining text information and a target image input by a user.

[0051] In an optional embodiment, a bank card face generation system can be used as the execution subject of the bank card face generation method of the embodiment of the present application. The bank card face generation system can be a software system or an embedded system combining software and hardware. In addition, in addition to using the bank card face generation system as the execution subject, any other type of equipment, device, system can also be used as the execution subject of the bank card face generation method of the embodiment of the present application. It can be understood by those skilled in the art that the present application does not specifically limit the form of the execution subject.

[0052] Optionally, the text information input by the user may include the user's keywords regarding the fixed-value personalized bank card. For example, the text information records the user's name, the user's motto, and the text the user wants to be printed on the bank card, such as "ancient poetry".

[0053] Optionally, the target image may be an image that the user wants to be printed on the card surface of the bank card, for example, a selfie of the user, a photo of the user's pet, and so on.

[0054] Step S202: Detect whether the target image contains any prohibited elements.

[0055] Optionally, in order to ensure the compliance of the bank card face, it is necessary to detect whether there are prohibited elements in the target image, wherein the prohibited elements include but are not limited to elements that are likely to cause discomfort to others, etc. It should be noted that the prohibited elements can be customized in the bank card face generation system.

[0056] Step S203: when it is detected that there are no prohibited elements in the target image, N card surface materials are determined according to the text information and the target image.

[0057] In step S203, N is an integer greater than 1, and the N card surface materials include at least one first type material and at least one second type material. The first type material is a material that must exist on the card surface of the bank card, and the second type material is a material that does not necessarily exist on the card surface of the bank card.

[0058] Optionally, the bank card face generation system may determine at least one card face material based on the target image, for example, by decomposing the target image to directly obtain at least one card face material, or searching a database for a material having a high similarity to the card face material in the target image.

[0059] Optionally, the bank card card face generation system may also determine at least one card face material based on the text information, for example, by extracting keywords from the text information and then searching a database for card face materials associated with the keywords.

[0060] It should be noted that the N card surface materials include at least one first type material and at least one second type material, the first type material is a material that must exist on the card surface of the bank card, and the second type material is a material that does not necessarily exist on the card surface of the bank card. For example, the first type material can be a bank card number, the name of the issuing bank, the bank card number, etc. The second type material can be a personalized pattern, text, etc. of the bank card.

[0061] Step S204: convert the information of each card surface material into Gaussian noise information, and determine the distribution position information of each card surface material according to the Gaussian noise information.

[0062] Optionally, in order to adapt to the size of the bank card, the bank card face generation system can convert the information of each card face material into Gaussian noise information, and then use the Gaussian noise information to complete the adaptation of N card face materials to the bank card, ensuring that the N materials can be reasonably distributed on the bank card face, especially without blocking the display of the first type of material.

[0063] Step S205: Generate a bank card face according to the N card face materials and the distribution position information of each card face material.

[0064] Optionally, after determining the distribution position information of each card face material, N card face materials can be laid out according to their corresponding distribution position information. By utilizing the image printing function of the bank card making equipment, N card face materials can be printed on the card face of a blank bank card, thereby obtaining a bank card that is compliant and meets the user's personalized needs.

[0065] It can be seen from the above content that the bank card face generation method and device of the present application, by introducing an image verification model and a material model, can automatically detect whether the target image provided by the user meets the specifications of the bank card face design, avoiding the use of non-compliant materials, and intelligently generating personalized and compliant bank card faces according to the text information and target image input by the user, greatly improving the efficiency and quality of card face generation. In addition, by converting the card face material into Gaussian noise information and determining the distribution position information of the card face material based on the Gaussian noise information, the intelligent layout of the card face material on the card face can be achieved, further improving the personalization and aesthetics of the card face design. In practical applications, this solution can significantly improve customer experience and promote interaction between banks and customers. At the same time, it also provides banks with more efficient and compliant personalized card face design services, with significant economic and social benefits.

[0066] It can be seen that the technical solution of the present application solves the technical problem of low efficiency in generating compliant and personalized bank card faces due to the lack of an effective mechanism in the prior art that allows customers to obtain personalized card faces that comply with regulations through simple operations.

[0067] In an optional embodiment, in order to detect whether there are prohibited elements in the target image, the card surface generation system of the bank card can divide the target image into M pixels through an image verification model, where M is an integer greater than 1. Then extract the image features of each pixel in the M pixels, wherein the image features of each pixel include the position features and color features of the pixel. Subsequently, the card surface generation system of the bank card determines the negative sample pixel corresponding to the pixel according to the position features of each pixel, wherein the negative sample pixel belongs to the pixel corresponding to the prohibited element, and the negative sample pixel corresponds to the same position coordinates as the pixel. Finally, the card surface generation system of the bank card calculates the color feature similarity between the negative sample pixel corresponding to each pixel and the pixel, and determines whether there are prohibited elements in the target image according to the color feature similarity.

[0068] Optionally, Figure 3 is a schematic diagram of an optional method of using an image inspection model to detect a target image according to an embodiment of the present application, such as Figure 3As shown, first, the target image uploaded by the user is input into the image verification model, wherein the training data of the image verification model is the non-compliant image (i.e., the image including the prohibited elements) entered in the background. Then, the image verification model can extract the image features of the target image, and then the image verification model can also output the image features of the non-compliant image. Finally, the card face generation system of the bank card detects the feature similarity between the image features of the target image and the non-compliant image through the image verification module, and determines whether there are prohibited elements in the target image based on the feature similarity obtained by the detection.

[0069] Optionally, the bank card face generation system first divides the target image uploaded by the user into several pixels (corresponding to the M pixels mentioned above), and then obtains the image features of each pixel. The bank card face generation system can also divide the non-compliant image uploaded by the bank backend into several pixels, and obtain the image features of each pixel.

[0070] For example, assume that A is the feature set of the non-compliant image submitted by the bank, A1 is the position feature of a pixel point of the non-compliant image (including X1 horizontal coordinate and Y1 vertical coordinate); A2 is the color feature of a pixel point of the non-compliant image (chromaticity 0-255), for example, including the information: Zr1-red primary color, Zy1-yellow primary color, Zg1-green primary color.

[0071] Assume that B is the feature set of the target image uploaded by the user, B1 is the position feature of a pixel point of the target image (including X2 horizontal coordinate and Y2 vertical coordinate); B2 is the color feature of a pixel point of the target image (chromaticity 0-255), for example, including the following information: Zr2-red primary color, Zy2-yellow primary color, Zg2-green primary color.

[0072] Assume that the horizontal coordinate X1 = the horizontal coordinate X2; the vertical coordinate Y1 = the vertical coordinate Y2, the pixel point corresponding to A1 is pixel point "1", and the pixel point corresponding to B1 is pixel point "2", which means that pixel point "1" belongs to the negative sample pixel point corresponding to pixel point "2".

[0073] Optionally, the color feature similarity between pixel point "1" and pixel point "2" can be calculated using the following formula (1).

[0074] COS<X,Y> =(Zr1*Zr2+Zy1*Zy2+Zg1*Zg2) / (Zr12+Zy12+Zg12)*(Zr22+Zy22+Zg22)(1)

[0075] Among them, the calculated COS<X,Y> It is between 0 and 1. The closer it is to 1, the more similar the two pixels are.

[0076] Optionally, the similarity between the target image and the non-compliant feature may be further calculated by referring to formula (2).

[0077] XS<Am,Bn> = COS<Xm,Yn> *(Xm-Xn)(Ym-Yn) (2)

[0078] Among them, m and n represent the coordinate range of the card surface to be checked, and the purpose is to calculate the similarity of the pixels within the coordinate range of the card surface.<Am,Bn> The closer<Xm,Yn> The higher the similarity of the card faces within the range, the higher the inspection threshold and inspection range can be designed according to the different situations of non-compliant card faces to confirm whether the card faces are compliant.

[0079] The above-mentioned precise pixel-level detection method can effectively avoid the appearance of non-compliant elements on the card surface, ensuring the compliance of the card surface design. Especially when processing complex image materials, it can accurately identify prohibited elements and avoid potential risks in the design process.

[0080] In an optional embodiment, determining whether there are prohibited elements in the target image based on color feature similarity includes: the card surface generation system of the bank card can determine the i-th pixel as the first pixel when the color feature similarity between the negative sample pixel corresponding to the i-th pixel in the target image and the i-th pixel is greater than a preset similarity, wherein the i-th pixel is any one of the M pixels; and determining the i-th pixel as the second pixel when the color feature similarity between the negative sample pixel corresponding to the i-th pixel and the i-th pixel is less than or equal to the preset similarity. Subsequently, the card surface generation system of the bank card can calculate the number of the first pixel and the number of the second pixel in the target image, and finally, the card surface generation system of the bank card determines whether there are prohibited elements in the target image based on the number of the first pixel and the number of the second pixel, wherein the probability of the prohibited elements in the target image is positively correlated with the number of the first pixel, and the probability of the prohibited elements in the target image is negatively correlated with the number of the second pixel.

[0081] Optionally, since there may be a large number of non-compliant images uploaded by the bank's backend, it is certain that negative sample pixels corresponding to each pixel in the target image can be found. Based on the above method, by calculating the color feature similarity between each pixel in the target image and the corresponding negative sample pixel, the pixels in the target image can be divided into first pixels and second pixels. Finally, based on the number of first pixels and the number of second pixels, it is determined whether there are prohibited elements in the target image. For example, the ratio of the data of the first pixel to the number of the second pixel can be calculated. The larger the ratio, the greater the probability that there are prohibited elements in the target image. If the ratio is greater than the set threshold, it is determined that there are prohibited elements in the target image.

[0082] It should be noted that this judgment method based on the number of pixels can more accurately evaluate the overall compliance of the image. For designers, they can clearly understand which areas need to be adjusted, thereby improving design efficiency. Especially when dealing with large-area image materials, this method can quickly locate problem areas and avoid repeated design modifications.

[0083] In an optional embodiment, the training process of the image verification model includes the following steps:

[0084] Obtaining a training image, wherein the training image includes prohibited elements;

[0085] The first encoder and the first decoder are trained multiple times using the training image, wherein each training operation includes: performing dimensionality reduction processing and feature encoding processing on the training image by the first encoder, wherein the dimensionality reduction processing is used to compress the training image into an image of a target dimension; the feature encoding processing is used to extract image features from the training image, and encode the extracted image features into a feature vector; and generating a predicted image by the first decoder according to the feature vector output by the first encoder;

[0086] After detecting that the first encoder and the first decoder reach a convergence state after multiple training operations, the training is stopped, and the first encoder and the first decoder that have reached a convergence state are combined into an image verification model, wherein, after the first decoder in the convergence state receives the feature vector output by the first encoder in the convergence state, the similarity between the predicted image generated by the first decoder and the training image exceeds a preset threshold.

[0087] Optionally, Figure 4 is a schematic diagram of a training process of an optional image inspection model according to an embodiment of the present application, such as Figure 4 As shown, in an embodiment of the present application, the training data of the image verification model are non-compliant images (for example, images containing prohibited elements) prepared in advance by the bank, wherein the non-compliant images are the above-mentioned training images.

[0088] The neural network used in the training may be an AutoEncoder neural network, wherein the AutoEncoder neural network is a neural network for unsupervised learning, such as Figure 4 As shown, in the embodiment of the present application, the AutoEncoder neural network includes:

[0089] The first encoder (Encoder) is used to compress the input data (i.e., the training image) into a lower dimensional representation (called encoding). This process is similar to data compression, and its purpose is to extract the most important features of the input data. In the present application, after the training image can be compressed into an image of the target dimension by the first encoder, the image of the target dimension can also be feature encoded to obtain a feature vector (also called encoding Code). It should be noted that the encoding Code is usually a vector that is much smaller than the dimension of the input data, and the encoding Code captures the core features of the input data.

[0090] The first decoder (Decoder) is used to reconstruct the original input data from the code. This process can be regarded as decompression of the code. Ideally, the output of the decoder should be as similar as possible to the original input data. In an embodiment of the present application, the first decoder is connected to the first encoder. After receiving the feature vector output by the first encoder, the first decoder performs image restoration based on the feature vector to obtain a predicted image.

[0091] It should be noted that the training goal of the AutoEncoder neural network is: after the first decoder receives the feature vector output by the first encoder, the similarity between the predicted image generated by the first decoder based on the feature vector and the training image can exceed a preset threshold. After completing this training goal, it means that the first decoder has been trained to accurately extract image features.

[0092] It should also be noted that a loss function is designed for the above training objectives. Specifically, during the training process of the autoencoder, a loss function is needed to measure the difference between the decoder's output information and the original input. Common loss functions include mean square error (MSE) and others. By minimizing the function value of this loss function, the neural network can learn how to encode and decode data effectively. The model trained in this way can reduce the dimension and extract image features for non-compliant images sent by the bank's backend and target images uploaded by customers themselves.

[0093] It should be noted that training the image inspection model through deep learning can enable it to have more powerful image feature recognition capabilities. For designers, this means that even the slightest design violations can be captured by the model, thereby ensuring the high quality of the card design. Especially when processing a large number of image materials uploaded by users, it can quickly and accurately screen out compliant materials, thereby improving the efficiency and accuracy of the design.

[0094] In an optional embodiment, in the process of determining N card face materials according to the text information and the target image, the card face generation system of the bank card can decompose the target image into L first materials to be selected, where L is a positive integer less than or equal to N. Then, the text information is converted into a text feature vector, where the text feature vector is used to characterize the text features of the image material in the text information. Subsequently, the card face generation system of the bank card determines K second materials to be selected according to the text feature vector based on the prior knowledge learned by the material model in the model training stage, where K is a positive integer less than or equal to N, the training data of the material model is the historical text provided by the historical user, and the training label of the material model is the card face material actually selected by the historical user. Finally, the card face generation system of the bank card filters the materials repeated in the L first materials to be selected and the K second materials to be selected, and determines the remaining first materials to be selected and the second materials to be selected as N card face materials.

[0095] Optionally, based on the target image provided by the user, the bank card face generation system can decompose the target image into L first materials to be selected, for example, identify L patterns or texts included in the target image, and then use the identified L patterns or texts as L first materials to be selected.

[0096] Optionally, based on the text information provided by the user, the bank card face generation system can first convert the text information into a text feature vector, and then input the text feature vector into the material model. Since the material model is a neural network model trained in advance based on the historical texts provided by historical users and the card face materials actually selected by historical users, the material model can be used to determine the material with a strong correlation with the text feature vector from the database as the second candidate material based on the text feature vector. For example, if the text feature vector represents "the user wants an image about basketball", the pattern about "basketball" in the database can be selected as the second candidate material.

[0097] It should be noted that there may be repeated materials among the L first materials to be selected and the K second materials to be selected. In order to improve subsequent calculation efficiency, the repeated materials may be filtered.

[0098] It should also be noted that the above process can intelligently combine the text information and image materials provided by the user to generate a card material combination that meets the user's personalized needs. For designers, this means being able to respond to user needs more quickly and provide more personalized and accurate design solutions, especially when dealing with a large number of user customization requests, which can significantly improve design efficiency and satisfaction.

[0099] In an optional embodiment, the information of each card surface material is converted into Gaussian noise information, and the distribution position information of each card surface material is determined based on the Gaussian noise information, including: first, the card surface generation system of the bank card determines the Gaussian distribution function according to the size of the card surface of the bank card, and then according to the Gaussian distribution function, the information of N card surface materials is converted into a Gaussian noise map, wherein the generation process of the Gaussian noise map includes T steps, each of the T steps is used to add part of the noise information, and T is an integer greater than or equal to 1; the Gaussian noise map represents the Gaussian noise information of each card surface material in the form of an image. Finally, the card surface generation system of the bank card determines the distribution position information of each card surface material according to the noise data corresponding to each card surface material in the Gaussian noise map and the location of the noise data.

[0100] Optionally, assuming that the card surface of a bank card can be subdivided into X*Y pixels, Zr, Zg, and Zb represent the three primary color combination of each pixel. First, the three primary colors 0-255 are mapped to (-1, 1) through normalization processing, referring to formulas (3)-(5):

[0101] r = Zr / (Zr+Zg+Zb) (3)

[0102] g = Zg / (Zr+Zg+Zb) (4)

[0103] b = Zb / (Zr+Zg+Zb) (5)

[0104] Optionally, Figure 5 is a schematic diagram of an optional conversion process of Gaussian noise information according to an embodiment of the present application, such as Figure 5 As shown, a histogram of X*Y*3 pixels on the card surface of the bank card can be statistically analyzed, and its shape is close to a Gaussian distribution, so a Gaussian distribution function can be fitted.

[0105] By using Gaussian noise information to determine the distribution of card materials, the intelligent and automated card design can be achieved. For designers, this means that they can generate a more rapid card design with a reasonable layout and beautiful appearance. Especially when dealing with complex multi-material layouts, this method can avoid the subjectivity and inconsistency of manual layout and improve the standardization and aesthetics of the design.

[0106] In an optional embodiment, the distribution position information of each card surface material is determined according to the noise data corresponding to each card surface material in the Gaussian noise map and the position of the noise data, including: firstly detecting whether there is corresponding position prompt information for each card surface material, wherein the position prompt information is used to represent the user's expected position for the card surface material. Then, in the case of detecting that at least one card surface material has corresponding position prompt information, the distribution position information of each card surface material is determined according to the position prompt information, the noise data corresponding to each card surface material in the Gaussian noise map and the position of the noise data.

[0107] Optionally, corresponding position prompt information can also be set for certain specific card surface materials. For example, the position prompt information corresponding to material "s" indicates that the user expects to display the material in the exact center of the card surface of the bank card. On this basis, the bank card surface generation system can determine the distribution position information of each card surface material based on the position prompt information corresponding to material "s", the noise data corresponding to each card surface material in the Gaussian noise map, and the position of the noise data, wherein material "s" is distributed in the center of the card surface of the bank card.

[0108] Through the above operations, the user's design wishes can be fully respected. For designers, this means that they can understand user needs more accurately and provide design solutions that are closer to user expectations. Especially when dealing with situations where users have specific layout requirements, it can ensure that the design results are both beautiful and meet the user's personalized needs, thereby improving design satisfaction and user experience.

[0109] In an optional embodiment, information of N card surface materials is converted into a Gaussian noise map based on a Gaussian distribution function, including: inputting the Gaussian distribution function and the N card surface materials into a noise predictor, and converting the N card surface materials into a Gaussian noise map that satisfies the Gaussian distribution function through the noise predictor, wherein the noise predictor is a neural network model.

[0110] By using a neural network model to predict the Gaussian noise map, the layout of card materials can be intelligent and automated. For designers, this means that they can generate a card design with a reasonable layout and beautiful appearance more quickly. Especially when dealing with complex multi-material layouts, this method can avoid the subjectivity and inconsistency of manual layout, improve the standardization and aesthetics of the design, and also reduce design costs and improve design efficiency.

[0111] Optionally, the training process of the noise predictor includes the following steps:

[0112] Acquire a sample image, wherein the sample image includes at least one image material;

[0113] Perform object processing operations on the sample image through a neural network. Among them, the object processing operations include: through at least one forward processing, convert the sample image into an initial Gaussian noise map, where the forward processing is used to add noise data to the sample image; through at least one backward processing, restore the initial Gaussian noise map to the target image, where the backward processing is used to filter the noise data of the initial Gaussian noise map.

[0114] According to the image similarity between the target image obtained after each object processing operation and the sample image, perform iterative training on the neural network until, after the neural network continuously completes S object processing operations for the sample image, the image similarity between the target image and the sample image generated each time is less than the target threshold, determine that the training of the neural network ends, and obtain a noise predictor, where S is an integer greater than or equal to 1.

[0115] Optionally, the process of converting the sample image into an initial Gaussian noise map can be divided into t steps, where t is an integer greater than or equal to 1. Assume the initial Gaussian noise map is Xt and the sample image is X0. The t-step noise addition process from X0 to Xt is the forward process (corresponding to the above-mentioned forward processing process), and vice versa, the process of denoising and restoring Xt to X0 is the reverse process (corresponding to the above-mentioned backward processing process).

[0116] Optionally, Figure 6 is a schematic diagram of an optional forward process according to an embodiment of the present application. As Figure 6 shown, X0 is the original image data distribution (i.e., the sample image), Xt is the initial Gaussian distribution noise map, and the forward noise addition process from X0 to Xt, the principle of each step of which refers to formula (6):

[0117]

[0118] Among them, in formula (6), G is a preset hyperparameter, satisfying 0 < G1 < G2 <.... < Gt < 1, εt-1 is the Gaussian noise sampled from the multivariate standard normal distribution, that is, εt-1 belongs to N(0, I)). Thus, a neural network P is trained. The prediction form from Xt to Xt-1 is P(Xt-1|Xt) = N(Xt-1; υθ(Xt, t), Εθ(Xt, t)). Thus, the input of the neural network is Xt, and the output is the probability distribution parameters υθ, Εθ in the state of Xt-1.

[0119] Optionally, the forward process is a process of gradually adding noise to the original image, and finally making the original image become a Gaussian noise image. The reverse process is opposite to the forward process, gradually removing noise from the noise image, and finally obtaining the original image. Therefore, the final result of the reverse process is the training target: generating a natural image from the noise image.

[0120] Specifically, from P(Xt-1|Xt)=N(Xt-1;υθ(Xt,t),Εθ(Xt,t)), the neural network can predict the mean υθ and variance Εθ of the previous moment Xt-1 based on the current moment Xt.

[0121] In addition, if you want to train a neural network, you need to define an objective function, that is, to what extent the neural network must learn to meet the requirements. Back to the problem that the generative model needs to solve: fit the distribution of training data, and sample data from the data distribution to generate new samples. The goal is to adjust the model parameters and obtain the optimal parameters so that the probability of the training data appearing is maximized.

[0122] In order to keep the necessary icons and other elements on the bank card face undisturbed, two models can be trained: the bank card face icon distribution model and the material picture model.

[0123] Among them, due to the different distribution of the necessary icon information on the bank card surface, such as the card number is fixed, the bank logo can be in different positions, etc., a large number of background-free icon combinations are needed for diffusion training to obtain the noise predictor of the card surface icon distribution model, such as Figure 7 A schematic diagram of an optional noise predictor is shown, which can convert each material on the image into noise data.

[0124] Optionally, the material image model is similar to the noise predictor of the distribution model, which relies on the card face material with text information provided by the bank backend and the card face material submitted by the customer after compliance inspection, and obtains the noise predictor of the card face bottom plate through diffusion training.

[0125] If the customer does not provide the basic material card face, then it is necessary to generate the card face based on the text. The specific implementation requires a text encoder. Here, the transformer language model can be used directly. This model can be used to receive text prompts and generate vector information. When training the material image model, the text is used as part of the input, and the previous bank card face icon distribution model and material image model training model are combined.

[0126] The above training process enables the noise predictor to have powerful image processing capabilities. For designers, it means that they can generate card designs with reasonable layouts and beautiful appearance more quickly. Especially when dealing with complex multi-material layouts, this method can avoid the subjectivity and inconsistency of manual layouts, improve the standardization and aesthetics of the design, and also reduce design costs and improve design efficiency.

[0127] like Figure 8The invention shows an optional flow chart of generating a bank card face by using a noise predictor. First, the text information input by the user is obtained, and then the text information is converted into a text vector. If the text vector records the icon display position expected by the user, the corresponding icon material is determined according to the icon display position expected by the user, and the position prompt information corresponding to the icon material is set; if the text vector also records the material content expected by the user, the bank card face material is determined according to the material content expected by the user. Finally, the bank card face is generated by the noise predictor according to the determined bank card face material, icon material, and the position prompt information corresponding to the material.

[0128] It can be seen from the above content that the bank card face generation method and device of the present application, by introducing an image verification model and a material model, can automatically detect whether the target image provided by the user meets the specifications of the bank card face design, avoiding the use of non-compliant materials, and intelligently generating personalized and compliant bank card faces according to the text information and target image input by the user, greatly improving the efficiency and quality of card face generation. In addition, by converting the card face material into Gaussian noise information and determining the distribution position information of the card face material based on the Gaussian noise information, the intelligent layout of the card face material on the card face can be achieved, further improving the personalization and aesthetics of the card face design. In practical applications, this solution can significantly improve customer experience and promote interaction between banks and customers. At the same time, it also provides banks with more efficient and compliant personalized card face design services, with significant economic and social benefits.

[0129] According to another aspect of the present application, a device for generating a bank card face is also provided, wherein: Fig. 9 is a schematic diagram of an optional bank card card face generation device according to an embodiment of the present application, such as Fig. 9 As shown, it includes: an acquisition unit 901, a detection unit 902, a first determination unit 903, a second determination unit 904 and a third determination unit 905.

[0130] Optionally, an acquisition unit 901 is used to acquire text information and a target image input by a user; a detection unit 902 is used to detect whether there are prohibited elements in the target image; a first determination unit 903 is used to determine N card surface materials based on the text information and the target image when it is detected that there are no prohibited elements in the target image, wherein N is an integer greater than 1, and the N card surface materials include at least one first type of material and at least one second type of material, the first type of material is a material that must exist on the card surface of a bank card, and the second type of material is a material that does not necessarily exist on the card surface of a bank card; a second determination unit 904 is used to convert the information of each card surface material into Gaussian noise information, and determine the distribution position information of each card surface material based on the Gaussian noise information; a generation unit 905 is used to generate the card surface of a bank card based on the N card surface materials and the distribution position information of each card surface material.

[0131] Optionally, the detection unit 902 includes: a first processing subunit, a second processing subunit, a third processing subunit, a fourth processing subunit, and a first determination subunit. The first processing subunit is used to segment the target image into M pixels through an image verification model, where M is an integer greater than 1; the second processing subunit is used to extract the image features of each pixel in the M pixels, where the image features of each pixel include the position features and color features of the pixel; the third processing subunit is used to determine the negative sample pixel corresponding to each pixel according to the position features of the pixel, where the negative sample pixel belongs to the pixel corresponding to the prohibited element, and the negative sample pixel corresponds to the same position coordinate as the pixel; the fourth processing subunit is used to calculate the color feature similarity between the negative sample pixel corresponding to each pixel and the pixel; the first determination subunit is used to determine whether there is a prohibited element in the target image according to the color feature similarity.

[0132] Optionally, the first determination subunit includes: a first determination module, a second determination module, a calculation module, and a third determination module. The first determination module is used to determine the i-th pixel as the first pixel when the color feature similarity between the negative sample pixel corresponding to the i-th pixel in the target image and the i-th pixel is greater than a preset similarity, wherein the i-th pixel is any one of the M pixels; the second determination module is used to determine the i-th pixel as the second pixel when the color feature similarity between the negative sample pixel corresponding to the i-th pixel and the i-th pixel is less than or equal to a preset similarity; the calculation module is used to calculate the number of the first pixel and the number of the second pixel in the target image; the third determination module is used to determine whether there is a prohibited element in the target image according to the number of the first pixel and the number of the second pixel, wherein the probability of the prohibited element existing in the target image is positively correlated with the number of the first pixel, and the probability of the prohibited element existing in the target image is negatively correlated with the number of the second pixel.

[0133] Optionally, the bank card face generation device further includes: a first acquisition unit, a first training unit, and a first processing unit. The first acquisition unit is used to acquire a training image, wherein the training image includes prohibited elements; the first training unit is used to perform multiple training operations on the first encoder and the first decoder using the training image, wherein each training operation includes: performing dimensionality reduction processing and feature encoding processing on the training image by the first encoder, wherein the dimensionality reduction processing is used to compress the training image into an image of a target dimension; the feature encoding processing is used to extract image features from the training image and encode the extracted image features into a feature vector; and generating a predicted image by the first decoder according to the feature vector output by the first encoder; the first processing unit is used to stop training after detecting that the first encoder and the first decoder reach a convergence state after multiple training operations, and form an image verification model with the first encoder and the first decoder that reach a convergence state, wherein the first decoder in a converged state generates a predicted image whose similarity with the training image exceeds a preset threshold after receiving the feature vector output by the first encoder in a converged state.

[0134] Optionally, the first determination unit 903 includes: a decomposition subunit, a conversion subunit, a second determination subunit, and a third determination subunit. The decomposition subunit is used to decompose the target image into L first materials to be selected, where L is a positive integer less than or equal to N; the conversion subunit is used to convert text information into a text feature vector, where the text feature vector is used to characterize the text features of the image material in the text information; the second determination subunit is used to determine K second materials to be selected based on the text feature vector according to the prior knowledge learned by the material model in the model training stage, where K is a positive integer less than or equal to N, the training data of the material model is the historical text provided by the historical user, and the training label of the material model is the card surface material actually selected by the historical user; the third determination subunit is used to filter the materials repeated in the L first materials to be selected and the K second materials to be selected, and determine the remaining first materials to be selected and the second materials to be selected as N card surface materials.

[0135] Optionally, the second determination unit 904 includes: a fourth determination subunit, a fifth determination subunit, and a sixth determination subunit. The fourth determination subunit is used to determine the Gaussian distribution function according to the size of the card face of the bank card; the fifth determination subunit is used to convert the information of N card face materials into a Gaussian noise map according to the Gaussian distribution function, wherein the generation process of the Gaussian noise map includes T steps, each of the T steps is used to add part of the noise information, and T is an integer greater than or equal to 1; the Gaussian noise map represents the Gaussian noise information of each card face material in the form of an image; the sixth determination subunit is used to determine the distribution position information of each card face material according to the noise data corresponding to each card face material in the Gaussian noise map and the position of the noise data.

[0136] Optionally, the sixth determination subunit includes: a first detection module and a fourth determination module. The first detection module is used to detect whether there is corresponding position prompt information for each card surface material, wherein the position prompt information is used to represent the user's expected position for the card surface material; the fourth determination module is used to determine the distribution position information of each card surface material according to the position prompt information, the noise data corresponding to each card surface material in the Gaussian noise map, and the position of the noise data when detecting that there is corresponding position prompt information for at least one card surface material.

[0137] Optionally, the fifth determination subunit includes: a conversion module, used to input the Gaussian distribution function and N card surface materials into a noise predictor, and convert the N card surface materials into a Gaussian noise map that satisfies the Gaussian distribution function through the noise predictor, wherein the noise predictor is a neural network model.

[0138] Optionally, the bank card face generation device further includes: a second acquisition unit, a first execution unit, and a target training unit. The second acquisition unit is used to acquire a sample image, wherein the sample image includes at least one image material; the first execution unit is used to perform a target processing operation on the sample image through a neural network, wherein the target processing operation includes: converting the sample image into an initial Gaussian noise image through at least one forward processing, wherein the forward processing is used to add noise data to the sample image; restoring the initial Gaussian noise image to a target image through at least one backward processing, wherein the backward processing is used to filter noise data from the initial Gaussian noise image; the target training unit is used to iteratively train the neural network according to the image similarity between the target image and the sample image obtained after each target processing operation, until the neural network completes S consecutive target processing operations on the sample image, and the image similarity between the target image and the sample image generated each time is less than the target threshold, and the neural network training is determined to be completed, and a noise predictor is obtained, wherein S is an integer greater than or equal to 1.

[0139] An embodiment of the present application may also provide an electronic device, Fig.10 is a structural block diagram of an electronic device according to an embodiment of the present application. Fig.10 As shown, the electronic device may include: one or more ( Fig.10 Only one is shown) a processor, a memory, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display.

[0140] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned bank card card face generation method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0141] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the text information and target image input by the user; detect whether there are prohibited elements in the target image; when it is detected that there are no prohibited elements in the target image, determine N card surface materials according to the text information and the target image, wherein N is an integer greater than 1, and the N card surface materials include at least one first type of material and at least one second type of material, the first type of material is a material that must exist in the card surface of the bank card, and the second type of material is a material that does not necessarily exist in the card surface of the bank card; convert the information of each card surface material into Gaussian noise information, and determine the distribution position information of each card surface material based on the Gaussian noise information; generate the card surface of the bank card according to the N card surface materials and the distribution position information of each card surface material.

[0142] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: divide the target image into M pixels through the image inspection model, where M is an integer greater than 1; extract the image features of each pixel in the M pixels, where the image features of each pixel include the position features and color features of the pixel; determine the negative sample pixel corresponding to each pixel according to the position features of the pixel, where the negative sample pixel belongs to the pixel corresponding to the prohibited element, and the negative sample pixel corresponds to the same position coordinate as the pixel; calculate the color feature similarity between the negative sample pixel corresponding to each pixel and the pixel; determine whether there is a prohibited element in the target image according to the color feature similarity.

[0143] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: when the color feature similarity between the negative sample pixel corresponding to the i-th pixel in the target image and the i-th pixel is greater than the preset similarity, determine the i-th pixel as the first pixel, wherein the i-th pixel is any one of the M pixels; when the color feature similarity between the negative sample pixel corresponding to the i-th pixel and the i-th pixel is less than or equal to the preset similarity, determine the i-th pixel as the second pixel; calculate the number of first pixels and the number of second pixels in the target image; determine whether there are prohibited elements in the target image based on the number of first pixels and the number of second pixels, wherein the probability of the prohibited elements in the target image is positively correlated with the number of first pixels, and the probability of the prohibited elements in the target image is negatively correlated with the number of second pixels.

[0144] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain a training image, wherein the training image includes prohibited elements; use the training image to perform multiple training operations on the first encoder and the first decoder, wherein each training operation includes: using the first encoder to perform dimensionality reduction processing and feature encoding processing on the training image, wherein the dimensionality reduction processing is used to compress the training image into an image of a target dimension; the feature encoding processing is used to extract image features from the training image, and encode the extracted image features into a feature vector; using the first decoder to generate a predicted image based on the feature vector output by the first encoder; after detecting that the first encoder and the first decoder have reached a convergence state after multiple training operations, stop the training, and form an image verification model with the first encoder and the first decoder that have reached a convergence state, wherein the first decoder in the converged state, after receiving the feature vector output by the first encoder in the converged state, generates a predicted image whose similarity with the training image exceeds a preset threshold.

[0145] The processor can call the information and application program stored in the memory through the transmission device to perform the following steps: decompose the target image into L first materials to be selected, where L is a positive integer less than or equal to N; convert the text information into a text feature vector, where the text feature vector is used to characterize the text features about the image material in the text information; determine K second materials to be selected based on the text feature vector through the prior knowledge learned by the material model in the model training stage, where K is a positive integer less than or equal to N, the training data of the material model is the historical text provided by the historical user, and the training label of the material model is the card surface material actually selected by the historical user; filter the materials in the L first materials to be selected that are repeated in the K second materials to be selected, and determine the remaining first materials to be selected and second materials to be selected as N card surface materials.

[0146] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: determine the Gaussian distribution function according to the size of the card surface of the bank card; based on the Gaussian distribution function, convert the information of N card surface materials into a Gaussian noise map, wherein the generation process of the Gaussian noise map includes T steps, each of the T steps is used to add part of the noise information, and T is an integer greater than or equal to 1; the Gaussian noise map represents the Gaussian noise information of each card surface material in the form of an image; and determine the distribution position information of each card surface material according to the noise data corresponding to each card surface material in the Gaussian noise map and the position of the noise data.

[0147] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: detect whether there is corresponding location prompt information for each card surface material, wherein the location prompt information is used to represent the user's expected position for the card surface material; when it is detected that at least one card surface material has corresponding location prompt information, determine the distribution position information of each card surface material based on the location prompt information, the corresponding noise data of each card surface material in the Gaussian noise map, and the position of the noise data.

[0148] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: input the Gaussian distribution function and N card surface materials into the noise predictor, and convert the N card surface materials into a Gaussian noise map that satisfies the Gaussian distribution function through the noise predictor, wherein the noise predictor is a neural network model.

[0149] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain a sample image, wherein the sample image includes at least one image material; perform a target processing operation on the sample image through a neural network, wherein the target processing operation includes: converting the sample image into an initial Gaussian noise image through at least one forward processing, wherein the forward processing is used to add noise data to the sample image; restoring the initial Gaussian noise image to a target image through at least one backward processing, wherein the backward processing is used to filter noise data from the initial Gaussian noise image; iteratively training the neural network according to the image similarity between the target image and the sample image obtained after each target processing operation, until the neural network completes S consecutive target processing operations on the sample image, and the image similarity between the target image and the sample image generated each time is less than the target threshold, determining that the neural network training is completed, and obtaining a noise predictor, wherein S is an integer greater than or equal to 1.

[0150] It can be understood by those skilled in the art that Fig.10 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.10 The structure of the electronic device is not limited. Fig.10 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.10 Different configurations are shown.

[0151] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0152] According to another aspect of the present application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the above-mentioned bank card card face generation method.

[0153] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0154] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0155] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, 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 units or modules, which can be electrical or other forms.

[0156] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0157] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0158] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0159] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for generating a bank card face, characterized in that: include: Get the text information and target image input by the user; Detecting whether the target image contains prohibited elements; In the case where it is detected that there is no prohibited element in the target image, determining N card surface materials according to the text information and the target image, wherein N is an integer greater than 1, and the N card surface materials include at least one first type of material and at least one second type of material, the first type of material is a material that must exist on the card surface of the bank card, and the second type of material is a material that does not necessarily exist on the card surface of the bank card; Converting the information of each card surface material into Gaussian noise information, and determining the distribution position information of each card surface material according to the Gaussian noise information; The card face of the bank card is generated according to the N card face materials and the distribution position information of each card face material.

2. The method for generating a bank card face according to claim 1, characterized in that: Detecting whether the target image contains prohibited elements, including: Segmenting the target image into M pixels using an image inspection model, where M is an integer greater than 1; Extracting image features of each pixel among the M pixels, wherein the image features of each pixel include position features and color features of the pixel; Determine a negative sample pixel point corresponding to each pixel point according to the position feature of each pixel point, wherein the negative sample pixel point belongs to the pixel point corresponding to the prohibited element, and the negative sample pixel point corresponds to the same position coordinate as the pixel point; Calculate the color feature similarity between the negative sample pixel corresponding to each pixel and the pixel; It is determined whether the prohibited element exists in the target image according to the color feature similarity.

3. The method for generating a bank card face according to claim 2, characterized in that: Determining whether the prohibited element exists in the target image according to the color feature similarity includes: When the color feature similarity between the negative sample pixel corresponding to the i-th pixel in the target image and the i-th pixel is greater than a preset similarity, the i-th pixel is determined as a first pixel, wherein the i-th pixel is any one of the M pixels; In a case where the color feature similarity between the negative sample pixel corresponding to the i-th pixel and the i-th pixel is less than or equal to the preset similarity, determining the i-th pixel as the second pixel; Calculating the number of first pixel points and the number of second pixel points in the target image; Based on the number of the first pixel points and the number of the second pixel points, determine whether the prohibited element exists in the target image, wherein the probability of the prohibited element existing in the target image is positively correlated with the number of the first pixel points, and the probability of the prohibited element existing in the target image is negatively correlated with the number of the second pixel points.

4. The method for generating a bank card face according to claim 2, characterized in that: The training process of the image inspection model includes the following steps: Acquire a training image, wherein the training image includes prohibited elements; The first encoder and the first decoder are trained multiple times using the training image, wherein each training operation includes: performing dimensionality reduction processing and feature encoding processing on the training image by the first encoder, wherein the dimensionality reduction processing is used to compress the training image into an image of a target dimension; the feature encoding processing is used to extract image features from the training image and encode the extracted image features into a feature vector; and generating a predicted image by the first decoder according to the feature vector output by the first encoder; After detecting that the first encoder and the first decoder reach a convergence state after the multiple training operations, the training is stopped, and the first encoder and the first decoder that have reached a convergence state are combined into the image verification model, wherein the first decoder in the convergence state, after receiving the feature vector output by the first encoder in the convergence state, generates a predicted image whose similarity with the training image exceeds a preset threshold.

5. The method for generating a bank card face according to claim 1, characterized in that: Determining N card surface materials according to the text information and the target image includes: Decomposing the target image into L first materials to be selected, where L is a positive integer less than or equal to N; Converting the text information into a text feature vector, wherein the text feature vector is used to characterize text features about the image material in the text information; Determine K second materials to be selected based on the text feature vector by using the prior knowledge learned by the material model in the model training phase, wherein K is a positive integer less than or equal to N, the training data of the material model is the historical text provided by the historical user, and the training label of the material model is the card surface material actually selected by the historical user; The materials repeated in the L first materials to be selected and in the K second materials to be selected are filtered, and the remaining first materials to be selected and the second materials to be selected are determined as the N card surface materials.

6. The method for generating a bank card face according to claim 1, characterized in that: Converting the information of each card surface material into Gaussian noise information, and determining the distribution position information of each card surface material according to the Gaussian noise information, including: Determine the Gaussian distribution function according to the size of the card face of the bank card; According to the Gaussian distribution function, the information of the N card surface materials is converted into a Gaussian noise map, wherein the generation process of the Gaussian noise map includes T steps, each of the T steps is used to add part of the noise information, and T is an integer greater than or equal to 1; the Gaussian noise map represents the Gaussian noise information of each card surface material in the form of an image; The distribution position information of each card surface material is determined according to the noise data corresponding to each card surface material in the Gaussian noise map and the position of the noise data.

7. The method for generating a bank card face according to claim 6, characterized in that: Determining the distribution position information of each card surface material according to the noise data corresponding to each card surface material in the Gaussian noise map and the position of the noise data, including: Detecting whether there is corresponding position prompt information for each card surface material, wherein the position prompt information is used to represent the user's expected position for the card surface material; When it is detected that at least one card surface material has corresponding position prompt information, the distribution position information of each card surface material is determined according to the position prompt information, the noise data corresponding to each card surface material in the Gaussian noise map, and the position of the noise data.

8. The method for generating a bank card face according to claim 6, characterized in that: According to the Gaussian distribution function, the information of the N card surface materials is converted into a Gaussian noise map, including: The Gaussian distribution function and the N card surface materials are input into a noise predictor, and the N card surface materials are converted into a Gaussian noise map satisfying the Gaussian distribution function by the noise predictor, wherein the noise predictor is a neural network model.

9. The method for generating a bank card face according to claim 8, characterized in that: The training process of the noise predictor comprises the following steps: Acquire a sample image, wherein the sample image includes at least one image material; Performing a target processing operation on the sample image through a neural network, wherein the target processing operation includes: converting the sample image into an initial Gaussian noise map through at least one forward processing, wherein the forward processing is used to add noise data to the sample image; restoring the initial Gaussian noise map to a target image through at least one backward processing, wherein the backward processing is used to filter noise data from the initial Gaussian noise map; According to the image similarity between the target image obtained after each target processing operation and the sample image, the neural network is iteratively trained until the image similarity between the target image and the sample image generated each time after the neural network completes S consecutive target processing operations on the sample image is less than a target threshold, and it is determined that the neural network training is completed, and the noise predictor is obtained, wherein S is an integer greater than or equal to 1.

10. A device for generating a bank card face, characterized in that: include: An acquisition unit, used for acquiring text information and a target image input by a user; A detection unit, used to detect whether the target image contains prohibited elements; a first determining unit, configured to determine, when detecting that no prohibited elements exist in the target image, N card surface materials according to the text information and the target image, wherein N is an integer greater than 1, and the N card surface materials include at least one first type material and at least one second type material, the first type material being a material that must exist on the card surface of the bank card, and the second type material being a material that does not necessarily exist on the card surface of the bank card; A second determining unit, configured to convert information of each card surface material into Gaussian noise information, and determine distribution position information of each card surface material according to the Gaussian noise information; A generating unit is used to generate the card face of the bank card according to the N card face materials and the distribution position information of each card face material.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the computer-readable storage medium is located is controlled to execute the bank card face generation method according to any one of claims 1 to 9.

12. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the bank card face generation method as described in any one of claims 1 to 9.

13. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by the processor, the steps of the method for generating the bank card face as described in any one of claims 1 to 9 are implemented.