Method, apparatus and device for generating artistic code image, and medium

Through a generative artificial intelligence algorithm, the QR code image is processed, combined with the feature information of the promotion object, and artistic code image is generated, which solves the problems of poor aesthetics and single information of the existing QR code, and realizes information diversity and user experience improvement.

WO2025066918A1PCT designated stage expired Publication Date: 2025-04-03ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Patent Information

Application Number
PCT/CN2024/118531
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-27
Filing Date
2024-09-12
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

The existing QR codes have poor aesthetics and single information, making it difficult to carry diversified information in the QR code, affecting the user experience.

Method used

By obtaining the code image generation request generated by the user's trigger operation, the initial QR code image data is generated, and the initial QR code image data is processed based on the feature information of the promotion object to generate artistic code images.

Benefits of technology

The artistic processing of QR code images is realized, so that they not only have the original functions, but also can carry the information of the promotion object, improving user experience and information diversification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024118531_03042025_PF_FP_ABST
    Figure CN2024118531_03042025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present description are a method, apparatus and device for generating an artistic code image, and a medium. The scheme may comprise: acquiring a code image generation request that is generated on the basis of a trigger operation of a user; on the basis of the code image generation request, generating initial QR code image data; acquiring feature information corresponding to a promotion object; and using a generative artificial intelligence algorithm, and using the feature information to process the initial QR code image data, so as to obtain an artistic code image.
Need to check novelty before this filing date? Find Prior Art

Description

A method, device, equipment and medium for generating artistic code images

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 27, 2023, with application number 202311270655.6 and invention name “A method, device, apparatus and medium for generating artistic code images”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer data processing technology, and in particular to a method, device, equipment and medium for generating an artistic code image. Background Art

[0003] With the development of technology, life is becoming increasingly intelligent. Whether traveling, attending an event, or visiting a place, users can generate a corresponding QR code as a credential. By scanning the code, users can enter and exit places, board public transportation, and so on. Existing QR codes are mostly composed of multiple black and white squares arranged in an irregular pattern, which makes them less aesthetically pleasing. Furthermore, QR codes typically carry only functional information, such as ride and payment functions, and the information they carry is limited.

[0004] Therefore, how to carry more information in QR codes and improve user experience is a technical problem that needs to be solved urgently.

[0005] Summary of the Invention

[0006] The embodiments of this specification provide a method, apparatus, device, and medium for generating an artistic code image to solve the problem of existing two-dimensional codes carrying only a single piece of information.

[0007] To solve the above technical problems, the embodiments of this specification are implemented as follows:

[0008] The embodiment of this specification provides a method for generating an artistic code image, including:

[0009] Obtaining a code image generation request generated based on a user's triggering operation;

[0010] generating initial two-dimensional code image data based on the code image generation request;

[0011] Obtain feature information corresponding to the promotion object;

[0012] A generative artificial intelligence algorithm is adopted to process the initial two-dimensional code image data using the feature information to obtain an artistic code image.

[0013] An embodiment of this specification provides a device for generating an artistic code image, including:

[0014] A request acquisition module, used to acquire a code image generation request generated based on a user's trigger operation;

[0015] A code data generation module, configured to generate initial two-dimensional code image data based on the code image generation request;

[0016] Feature acquisition module, used to obtain feature information corresponding to the promotion object;

[0017] The image processing module is used to use a generative artificial intelligence algorithm to process the initial two-dimensional code image data using the feature information to obtain an artistic code image.

[0018] An embodiment of this specification provides a device for generating an artistic code image, including:

[0019] at least one processor; and,

[0020] a memory communicatively connected to the at least one processor; wherein,

[0021] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0022] Obtaining a code image generation request generated based on a user's triggering operation;

[0023] generating initial two-dimensional code image data based on the code image generation request;

[0024] Obtain feature information corresponding to the promotion object;

[0025] A generative artificial intelligence algorithm is adopted to process the initial two-dimensional code image data using the feature information to obtain an artistic code image.

[0026] An embodiment of this specification provides a computer-readable medium having computer-readable instructions stored thereon. The computer-readable instructions can be executed by a processor to implement a method for generating an artistic code image.

[0027] One embodiment of the present specification achieves the following beneficial effects: initial QR code image data is generated by obtaining a code image generation request generated based on a user's trigger operation, and based on the acquired feature information corresponding to the promotion object, the initial QR code image data is processed using a generative artificial intelligence algorithm so that the generated artistic code image can carry information about the promotion object, thereby enabling users to understand some information related to the promotion object when using or viewing the QR code. Even if the user does not read the information in a specific application, the user can still understand the promotion information while using the QR code, thereby diversifying the information carried by the QR code image and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0029] FIG1 is a schematic diagram of an application scenario of a method for generating an artistic code image provided by an embodiment of this specification;

[0030] FIG2 is a flow chart of a method for generating an artistic code image provided by an embodiment of this specification;

[0031] FIG3 is a swim-lane diagram of a method for generating an artistic code image provided by an embodiment of this specification;

[0032] FIG4 is a schematic structural diagram of an apparatus for generating an artistic code image corresponding to FIG2 provided in an embodiment of this specification;

[0033] FIG. 5 is a schematic structural diagram of a device for generating an artistic code image corresponding to FIG. 2 provided in an embodiment of this specification. DETAILED DESCRIPTION

[0034] To make the purpose, technical solutions, and advantages of one or more embodiments of this specification more clear, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of one or more embodiments of this specification.

[0035] The technical solutions provided by the embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0036] In existing technology, QR codes generated for access to certain locations, travel, and business cards are mostly black and white. For aesthetic reasons, some methods are now being developed to generate artistic QR codes. These methods often require users to select an artistic image or fill in an image description, and then generate the artistic QR code based on the selected image or description. This method requires a lot of user input and is demanding, and it doesn't allow users to simultaneously view promotional information such as sporting events and hot topics while displaying the QR code.

[0037] In order to solve the defects in the prior art, this solution provides the following embodiments:

[0038] FIG1 is a schematic diagram of an application scenario of a method for generating an artistic code image provided by an embodiment of this specification.

[0039] As shown in Figure 1, this solution primarily includes: initial QR code image data 1, server 2, and artistic code image 3. Initial QR code image data 1 can be a QR code image generated according to preset encoding rules and can carry a data sequence used to implement a specific function. This allows scanning the initial QR code image to enable the corresponding function, such as payment, collection, travel, or ticketing. After receiving initial QR code image data 1, server 2 processes the initial QR code image based on the characteristic information of the promotional object to generate an artistic code image 3 that carries the characteristics of the promotional object. This allows users to understand information about the promotional object when using or viewing the QR code, improving the user experience.

[0040] Next, a method for generating an artistic code image provided in an embodiment of the specification will be described in detail with reference to the accompanying drawings:

[0041] Figure 2 is a flow chart of a method for generating an artistic code image provided by an embodiment of this specification. From a program perspective, the execution subject of the process can be a program installed on an application server or an application client.

[0042] As shown in Figure 2, the process may include the following steps:

[0043] Step 202: Obtain a code image generation request generated based on a user's triggering operation.

[0044] In the embodiments of this specification, triggering operations may include clicking an icon that implements a corresponding function, clicking or shaking to jump to an H5 page that implements the corresponding function, or at least one other triggering operation, such as voice activation of a QR code that implements a corresponding function, or using a special gesture that activates a QR code that implements a corresponding function. A code image generation request is used to request the server to generate an artistic code image.

[0045] Step 204: Generate initial two-dimensional code image data based on the code image generation request.

[0046] The initial QR code image data in the embodiments of this specification may include a data sequence used to generate the initial QR code image, the initial QR code image, a description of the initial QR code image, a function corresponding to the initial QR code image, or a link string carried in the initial QR code image. The code image generation request may include at least one of a user identifier, user-authorized location information, a page identifier, and information related to the initial QR code image.

[0047] In practical applications, the initial QR code image corresponding to the initial QR code image data can be generated according to preset encoding rules, such as commonly used QR encoding rules or mini-program code encoding rules. The initial QR code image can be static or dynamic. To ensure security, the generated QR code image can be based on user operations and valid for a preset time period, such as 2 minutes or 5 minutes. The initial QR code image can be used in scenarios such as transactions, entering and exiting specific locations, and watching large-scale events.

[0048] Step 206: Acquire feature information corresponding to the promotion object.

[0049] The promotion object in the embodiments of this specification can be relevant information about an event, which can be about to happen, currently happening, or already happened. For example, a sports meeting currently being held in City H, or a concert about to be held in City I, etc., can be promoted by the sports meeting, concert, or other activities. The promotion object can be public welfare information or commercial information. For example, in order to raise public safety awareness, the promotion object can be some safety reminder related information, such as posters, etc. There is no specific limitation on the promotion object here.

[0050] The feature information can be able to represent the information of the promotion object, which can be an image, such as an image related to a sports meeting, an image related to a certain sports event, etc.; it can also be descriptive information about the characteristics of the promotion object, such as a description of the participants of a certain event, a description of the event venue, the time of the event, a description of the event project, etc.; it can also be a style model that can be used in combination with an image generation model so that the image generation model can generate an image containing information about the promotion object, and it can also be understood as a parameter control model, such as a lora model. It is understandable that the data format of the feature information can be a data format that can be recognized and processed by the image generation model. If the data format of the feature information does not conform to the preset input format of the model, the data format of the feature model can also be converted so that the feature information can be processed by the model.

[0051] Step 208: Using a generative artificial intelligence algorithm, the feature information is used to process the initial two-dimensional code image data to obtain an artistic code image.

[0052] The generative AI algorithm, AIGC (AI Generated Content), also known as generative AI, uses artificial intelligence to generate content. It can generate the same or different types of content from input data. In the embodiments of this specification, AIGC (AI Generated Content) can be used to artistically process feature information and the initial QR code image, allowing the feature information to be presented in the QR code image. The artistic code image can have the functions of a traditional QR code image and can also carry promotional information, allowing users to learn about the promotional information while receiving the QR code image.

[0053] In the embodiments of this specification, the artistic code image includes image features representing the promotional object. In practical applications, a correspondence can be established between each promotional object and its characteristic information. Based on this correspondence, the characteristic information corresponding to the promotional object can be fused with the initial QR code image data to produce an artistic code image that reflects the characteristics of the promotional object. The artistic code image not only fulfills the corresponding function but also displays information about the promotional object. This can present additional information to users when they view or use the QR code, further diversifying the information carried by the QR code and improving the user experience.

[0054] It should be understood that the order of some steps in the methods described in one or more embodiments of this specification can be interchanged according to actual needs, or some steps can be omitted or deleted.

[0055] The method in FIG. 2 generates initial QR code image data by obtaining a code image generation request generated based on a user's trigger operation, and processes the initial QR code image data using a generative artificial intelligence algorithm based on the obtained feature information corresponding to the promotion object so that the generated artistic code image can carry the information of the promotion object, thereby enabling users to understand some information related to the promotion object when using or viewing the QR code. Even if the user does not read the information in a specific application, the user can still understand the promotion information while using the QR code, thereby diversifying the information carried by the QR code image and improving the user experience.

[0056] Based on the method of FIG2 , the examples of this specification also provide some specific implementation plans of the method, which are described below.

[0057] In the embodiment of this specification, the characteristic information may be an image related to the promotion object, and an artistic code image may be obtained by image fusion. Optionally, the characteristic information may include an image related to the promotion object;

[0058] The adopting of a generative artificial intelligence algorithm to process the initial two-dimensional code image data using the feature information to obtain an artistic code image may specifically include:

[0059] A generative artificial intelligence algorithm is used to perform style transfer processing on the initial two-dimensional code image data based on an image related to the promotion object to obtain an artistic code image.

[0060] In the embodiments of this specification, images related to the promotional object may include images of the news page of the promotional object, iconic images of the promotional object, images of the location of the promotional object, images of the main characters of the promotional object, promotional images of the promotional object, and images of part of the content of the promotional object. Style transfer can be based on a style transfer model or an image fusion model to artistically process the initial QR code image data according to the images related to the promotional object, thereby obtaining an artistic code image containing the features in the image and used to achieve a certain function. Taking the promotional object as a popular video drama as an example, the promotional stills of the drama, a scene in the drama, or a screenshot of the drama review can be used as images corresponding to the features of the drama. An image can be selected from them and the initial QR code image can be processed using the above-mentioned image processing model to obtain an artistic code image related to the features of the drama, so that when the user views or uses the QR code, they can understand some relevant information about the drama. It is understandable that the images or features used in the embodiments of this specification are all used with authorization.

[0061] When processing based on the image and the initial QR code image data, the image can be obtained by fusing the image with the QR code image corresponding to the initial QR code image data. Specifically, during the fusion process, the image and the initial QR code image can be adjusted to the same size, and the corresponding image area in the image can be determined based on the filled area in the initial QR code image. The image area is processed, and the data sequence obtained after the processing is filled into the corresponding filled area in the initial QR code image. After filling, the style transfer model can also be used to transfer the style of the remaining image area of ​​the filled QR code image except the filled area to obtain an artistic code image, so that the artistic code image can reflect the characteristics of the promotion object without destroying the function. Some other existing known fusion methods can also be used for image fusion, which are not specifically limited here.

[0062] In practical applications, some low-rank adaptation models can be used to control the parameters of the image fusion model to improve the efficiency of image generation. Optionally, the feature information in the embodiments of this specification includes a style model corresponding to the promotion object; the style model may include a style model obtained by training a preset style model using an image related to the promotion object;

[0063] The adopting of a generative artificial intelligence algorithm to process the initial two-dimensional code image data using the feature information to obtain an artistic code image may specifically include:

[0064] The style model corresponding to the promotion object is used to control the parameters of the diffusion model, and the initial two-dimensional code image data is processed to obtain an artistic code image; the diffusion model is a model with an image generation function.

[0065] In the embodiments of this specification, different promotion objects may correspond to different style models. The style model may include a trained lora model or other model that can represent the style features of the promotion object. The lora model is a low-rank adapter (Low-Rank Adaptation). The style model can be used to control the parameters in the AIGC algorithm, perform style transfer on the initial two-dimensional code image, and obtain an artistic code image with the characteristics of the promotion object. It can be understood that the lora model, as a plug-in in the SD (Stable Diffusion) model, can use the trained lora model to control the parameters in the SD model, so that the style transfer of the initial two-dimensional code image can be performed based on the characteristics of the promotion object represented by the lora model. Here, a style model can also correspond to a type of promotion object, such as style model 1 can correspond to a promotion object of the TV series type, style model 2 can correspond to a promotion object of the sports type, style model 3 can correspond to a promotion object of the scenic spot type, etc.

[0066] In the embodiments of this specification, style models corresponding to different promotional objects may be pre-trained. This allows the user to quickly respond to a code image display request by invoking the pre-trained style model and providing the user with a code image that reflects the characteristics of the promotional object. Optionally, the method described in the embodiments of this specification may further include:

[0067] For a plurality of promotion objects, obtaining images related to each promotion object;

[0068] For any promotional object among the plurality of promotional objects, a preset style model is trained using images related to the promotional object to obtain a style model corresponding to the promotional object;

[0069] Establishing a first correspondence between the plurality of promotion objects and corresponding style models;

[0070] The acquiring of characteristic information corresponding to the promotion object may specifically include:

[0071] A style model corresponding to the promotion object is determined according to the first object relationship.

[0072] The preset model can be a model that can represent style features, such as a lora model. In the embodiments of this specification, when training the preset style model, the preset style model can be trained according to the type of promotion object to obtain the style model corresponding to each type of promotion object, and a first correspondence is established. Alternatively, the preset style model can be trained according to the specific promotion object to obtain the style model corresponding to each specific promotion object, and a first correspondence is established. For example, the preset style model can be trained according to sports activity 1 to obtain style model A, and a correspondence between sports activity 1 and model A is established; the preset style model can be trained according to scenic spot 2 to obtain style model B, and a correspondence between scenic spot 2 and model B is established.

[0073] In actual applications, a correspondence between an image or description information of the features of the promotion object and the promotion object may also be established.

[0074] In practical applications, in order to ensure that promotional information can better meet user needs and provide users with meaningful information, a promotion period for the promotion object can be set, during which a code image containing the characteristics of the promotion object can be generated for the user. Optionally, the method described in the embodiments of this specification may further include:

[0075] Get the promotion period corresponding to several promotion objects;

[0076] Determining a request time corresponding to the code image generation request;

[0077] Determining a target promotion period including the request time according to the request time and the promotion period;

[0078] The promotion objects corresponding to the target promotion period are used as the target promotion objects;

[0079] The acquiring of characteristic information corresponding to the promotion object may specifically include:

[0080] Obtain feature information corresponding to the target promotion object.

[0081] In the embodiments of this specification, the promotion period may represent the period from the promotion start time to the promotion end time. The promotion period may be determined based on the event of the promotion object and may be a period before or after the event, for example, one month before the event, one week after the event, etc. Different promotion objects may have different promotion periods, which are not specifically limited here. For example, a certain event may have a promotion period of one month before the start of the game and / or one week after the end of the game, making it easier for users to purchase tickets and learn about the honors of the participating teams.

[0082] In the embodiments of this specification, the request time can be the time when the server receives the code image generation request, or the time when the terminal sends the code image generation request. The target promotion period can be determined by comparing the request time with the promotion period to determine whether the request time falls within the promotion start and end time period. If the request time falls within the promotion start and end time period, the promotion period can be used as the target promotion period.

[0083] If there are multiple target promotion objects in the embodiments of this specification, one can be selected randomly or according to preset rules. The preset rules can be determined based on factors such as user preferences, the number of times the promotion has been made, and the weight of the promotion object. The weight of the promotion object can be set according to the degree of influence of the promotion object. The degree of influence can be determined based on the scope of influence of the event. The scope of influence of an event with a high degree of influence can be larger, and the scope of influence of a time with a low degree of influence can be smaller. For example, if the existing promotion objects are a certain international sports meeting and a youth football cup of a certain province or city, the weight value of the certain international sports meeting can be set to be greater than the weight value of the youth football cup of a certain province or city. It is also possible to set a default weight for all promotion objects, and adjust the weight as the number of subsequent promotions is made. For example, if the promotion object is a certain scenic spot, the weight value of each promotional scenic spot can be set to the same value when the scenic spot is selected for the first time, and then the weight of the scenic spot that has generated an artistic code image can be reduced. This can avoid being used to generate artistic code images multiple times in a row, causing aesthetic fatigue to the user, or the information the user understands is too single, which may affect the user experience. Regarding the case of selecting artistic code promotion targets based on user preferences, continuing with the above example, if a user likes a certain sport, the relevant information of the sport can be used as the promotion target, the corresponding feature information can be obtained, and the corresponding artistic code image can be generated and displayed to the user.

[0084] As an implementation manner, optionally, the method described in the embodiments of this specification may further include:

[0085] Obtain the event time of the target promotion object;

[0086] Determine whether the requested time is within the event time;

[0087] The obtaining of characteristic information corresponding to the promotion object specifically includes:

[0088] If the request time is within the event time, characteristic information corresponding to the target promotion object is obtained.

[0089] The holding time can be understood as the time period for holding a certain event. In order to enable users to understand some currently occurring events, in the embodiments of this specification, the currently occurring events can be used as promotion objects.

[0090] In actual applications, the above-mentioned promotion period may include the time period indicated by the holding time, or may not include the time period indicated by the holding time. In the embodiments of this specification, if the request time is not within the holding time, the above-mentioned promotion period may be used as a judgment condition for judgment. If neither of them is within the holding time, the characteristic information corresponding to the promotion object may not be obtained. For promotion objects currently being held, the holding time or broadcast time of the promotion object may also be used as the promotion period. For example, if the competition time of a sports event is from 8:00 to 18:00 every day from May 10 to July 1 this year, the corresponding promotion period may be from 8:00 to 18:00 every day from May 10 to July 1 this year. This allows other promotion objects to be carried through artistic code images during other time periods, allowing users to learn more information and achieve diversified information display.

[0091] As an implementation method, the event in the area where the user is located can be processed as a promotion object based on the user's location information. Optionally, the method described in the embodiment of this specification can also include:

[0092] Obtaining the user's location information;

[0093] Determining, based on the location information, promotion targets in the geographical area where the location information is located;

[0094] The acquiring of characteristic information corresponding to the promotion object may specifically include:

[0095] Acquire characteristic information corresponding to the promotion object in the geographical area where the location information is located.

[0096] The location information in the embodiments of this specification is the location information that the user has authorized. The geographical area where each promotion object is located can be determined based on the location of the venue where it is held, and a second correspondence can be established between the characteristic information of the promotion object in each geographical area and the geographical area, so that the QR code image of the user located in the geographical area can be processed based on the characteristic information in the second correspondence, so that the user can learn more about the information in the area where he is located, which can better meet the user's needs and improve the user's sense of belonging. For example, if the user is in area A, and the promotion objects in area A include basketball games, drama performances, etc., one of them can be selected as the target promotion object according to the preset rules, and its characteristic information can be obtained, and the characteristic information of the concert in area B will not be obtained.

[0097] As an implementation method, the QR code image can also be generated in combination with the style information of the geographical area. Optionally, the method described in the embodiment of this specification can also include:

[0098] Acquire regional characteristic information of the geographical area; the regional characteristic information is style information related to the characteristics of the geographical area;

[0099] The adopting of a generative artificial intelligence algorithm to process the initial two-dimensional code image data using the feature information to obtain an artistic code image may specifically include:

[0100] A generative artificial intelligence algorithm is adopted to process the initial two-dimensional code image data using the feature information and the regional feature information to obtain an artistic code image.

[0101] In the embodiments of this specification, style information can represent the characteristics or features of the region's architecture, culture, natural landscape, technology, and activities undertaken. The style information corresponding to the geographic region can be combined with the characteristic information of the promotion target to process the initial QR code image data. For example, if the user is in Area C, which has the style of a Jiangnan water town, and the promotion target is a certain sports event, an artistic code image containing the sports event or game logo in the style of a Jiangnan water town can be generated. Different regions can have the same style. Regional styles can include ancient pavilions, ancient gardens, Jiangnan water towns, artistic styles, technological styles, and modern styles.

[0102] In practical applications, characteristic information of the promotional object and the region can be input into a generative AI algorithm to generate a processed image. This input feature information can be textual descriptions, such as "volleyball," "sports meet," "Jiangnan," or "water village." It can also be an image of the promotional object, an image representing the characteristics of the region, or a style model trained using images of the promotional object or characteristic images of the geographic region. The specific form of the feature information is not limited here; it can be sufficient to meet practical needs.

[0103] In practical applications, the promotion objects can be various objects that need to be promoted, such as humanities, safety tips, activities, hot news, etc. Optionally, the promotion objects described in the embodiments of this specification can include at least one of large-scale activities, IP images, and news events.

[0104] In the embodiments of this specification, a large-scale event may refer to an event with more than a preset number of participants. An IP image may refer to an image in intellectual property such as literature, film and television dramas, animation, and games, or may refer to an image designed by a company based on its own philosophy or brand style, etc. A news event may be an event that occurred within a preset time period, or news information about an event with a relatively high number of visits and a relatively high degree of attention within a preset time period. Specifically, it may be a person or object involved in the news, or an image of the event, or a manuscript of the report, etc. Promotion objects may also include scenic spots, city landmarks, etc. Promotion objects can be set according to actual needs and are not specifically limited here.

[0105] In practical applications, in order to provide users with information that may be of interest to them and improve user experience, as an implementation method, the promotion targets can also be determined based on the tickets or other documents purchased by the users. Optionally, the method described in the embodiments of this specification may further include:

[0106] Get the ticket information of the viewing ticket purchased by the user;

[0107] The acquiring of characteristic information corresponding to the promotion object may specifically include:

[0108] Acquire characteristic information related to the viewing object corresponding to the ticket information.

[0109] The ticket information obtained in actual applications may be obtained by the server after the user authorizes the acquisition. The ticket information may include information such as the validity period of the ticket, the place of use of the ticket, the name of the activity corresponding to the ticket, etc. The viewing object corresponding to the ticket information may include competitive events; such as game competitions, sports competitions, calligraphy competitions, etc. The corresponding characteristic information may include at least one of the characteristic information related to the event, such as characteristic information representing competitive events, characteristic information representing competitive events in competitive events, characteristic information representing the results of competitive events, and characteristic information representing the results of competitive events in competitive events. Taking a sports meeting as an example, for example, the ticket is a ticket for entering the venue of the sports meeting and watching the sports meeting. The characteristic information related to the viewing object may be information related to the events in the sports meeting, the results of the competition, the number of medals, etc. If a ticket is valid for multiple events, the characteristics of the promotional target carried by the ticket's QR code can be updated as each event progresses. For example, if a badminton match is held from 8:00 AM to 11:00 AM, the promotional target for the ticket during that time period can be updated to characteristics related to badminton. If a swimming match is held from 2:00 PM to 6:00 PM, the promotional target for the ticket during that time period can be updated to characteristics related to swimming. This means that during the time period of a particular event, a corresponding artistic code image is generated based on the characteristics of that event.

[0110] As an implementation manner, optionally, the viewing ticket described in the embodiments of this specification may include at least one of a sports event ticket, a drama ticket, a movie ticket, a concert ticket, a tourist attraction ticket, and an amusement park ticket.

[0111] In the embodiments of this specification, sports events may include esports, ball games, track and field events, and other events. Drama tickets may include tickets for viewing stage performances of plays, operas, stage plays, Peking opera, and the like. Concert tickets may include concerts, music performances, and music competitions. Tourist attraction tickets may include tickets for visiting museums, historic buildings, and scenic spots. Tickets may also include tickets for viewing live audience members at a particular show. In actual applications, if the requested time does not correspond to any promotional target, the user terminal may directly display the initial QR code image, or the promotional target may be determined randomly or based on event popularity, user preferences, and the like.

[0112] As an implementation manner, optionally, in the embodiments of this specification, if the viewing ticket is a ticket for a sports event, the method may further include:

[0113] Determining, based on the sports event ticket purchased by the user, the event corresponding to the sports event ticket;

[0114] The acquiring of characteristic information corresponding to the promotion object may specifically include:

[0115] Obtain characteristic information corresponding to the competition item.

[0116] In the embodiments of this specification, feature information corresponding to the event associated with the ticket can be determined based on the event. For example, if a user purchases a ticket for the opening ceremony of an event, feature information corresponding to the event can be obtained, an artistic code image can be generated, and displayed to the user. If another user purchases a ticket for the basketball event, feature information corresponding to the basketball event can be obtained, an artistic code image can be generated, and displayed to the user. This can improve the user experience and serve as a reminder to the user, preventing them from forgetting to use their purchased ticket.

[0117] In actual applications, the promotion object can also be the promotion object provided by the promotion demander. For example, in order to increase the promotion of a certain IP image, the promotion demander can select the promotion scope, or determine the promotion scope based on the number of resources provided by the promotion demander. The promotion scope may include the promotion time, promotion area, promotion application type, etc. In actual applications, it is possible to determine whether the user is within the promotion scope based on the user's location. If the user is within the promotion scope, a code image containing the characteristics of the promotion object can be displayed to the user. If the user is no longer within the promotion scope, the code image containing the characteristics of the promotion object can be not displayed to the user, or the relevant characteristics of other promotion objects can be selected to generate a code image. For example, books, art, calligraphy and other humanities information, hot event information, entertainment information, travel-related information, etc. can be promoted as promotion objects. The promotion scope can be a geographical scope, which type of application, which code is used to implement which function, etc. The promotion scope can be positively correlated with the number of resources provided by the promotion user demander.

[0118] To more clearly illustrate the method for generating an artistic code image provided in the embodiments of this specification, FIG3 is a swim-lane diagram of the method for generating an artistic code image provided in the embodiments of this specification. As shown in FIG3 , the method may include a correspondence generation phase, a data processing phase, and a code generation phase, and may specifically include:

[0119] Step 302: The server obtains characteristic information representing several promotion objects.

[0120] In the embodiments of this specification, feature information may include an image representing the features of the promotion object, feature description information, or a trained style model, such as a LoRa model. The image representing the features of the promotion object may be an image related to factors such as the participants of the promotion object and the nature of the event. Feature description information may be information used to describe the various features in the feature image, such as the name, attributes, style, etc. of the promotion object. The trained style model may be obtained by training a preset style model based on the feature image corresponding to the promotion object.

[0121] Step 304: The server establishes a correspondence between the characteristic information of each promotion object and the corresponding promotion object.

[0122] In the embodiments of this specification, the feature information is an image or feature description information containing the features of the promotion object, and a correspondence between the image or feature description information and the promotion object can be established. If the feature information is a trained style model, a correspondence between the trained style model and the promotion object can be established.

[0123] Step 306: The terminal generates a code image generation request based on the user's triggering operation.

[0124] In the embodiments of this specification, the user's triggering action can be a click, a shake of the terminal, or other actions. The code image generation request can include information about the triggering page, allowing the server to generate a code image corresponding to that page. For example, clicking the "Ride Code" control can send a request to generate a ride code. This request can include user account information and an identifier indicating the ride function, allowing the server to generate the requested ride code.

[0125] Step 308: The server generates initial two-dimensional code image data based on the code image generation request.

[0126] The initial QR code image data in the embodiments of this specification may be a QR code image, or information related to the QR code image, such as link information carried in the QR code image, a data sequence used to generate the QR code image, and the like.

[0127] Step 310: The server determines the target promotion object according to the request time of the code image generation request.

[0128] In the embodiment of the present specification, whether the promotion object is promotable can be determined based on the comparison between the promotion period of the promotion object and the request time.

[0129] Step 312: The server determines the target feature information corresponding to the target promotion object based on the above pre-established correspondence.

[0130] The target feature information in the embodiments of this specification may be obtained based on the feature information corresponding to the promotion object in the corresponding relationship, and may be an image, feature description information, or a trained style model.

[0131] Step 314: The server performs artistic processing on the target feature information and the initial two-dimensional code image data based on the AIGC algorithm to obtain an artistic code image.

[0132] In the embodiments of this specification, the server can use the AIGC algorithm to artistically process the target feature information and the initial QR code image data. This can be understood as integrating the target feature information on the basis of the initial QR code image data. While retaining the function of the QR code image, it also has the characteristics of the target promotion object, displays diversified information to users, and brings users a better user experience.

[0133] Step 316: The terminal displays the artistic code image to the user.

[0134] In the embodiments of this specification, the artistic code images can be generated based on multiple different feature information belonging to the same promotion object. Alternatively, multiple artistic code images can be generated based on the same feature information, and the artistic code image with better usability can be selected for display.

[0135] Multiple artistic code images can be generated by fusing multiple different versions of QR code images with the same feature information. Each artistic code image can then be scored according to a preset scoring rule, with the highest-scoring artistic code image being sent to the terminal. The preset scoring rule may include comparing features in the artistic code image with features contained in the feature information, determining the number or proportion of features in each artistic code image that match the features contained in the feature information, and displaying the artistic code image with the highest number or proportion of features that match. The preset scoring rule may also include a trained scoring model. The code images can also be evaluated based on factors such as the proportion of abnormal data in each artistic code image to determine the recognition rate. Code images with a recognition rate exceeding a preset threshold can be sent to the user; alternatively, the code image with the highest recognition rate can be sent to the user. Abnormal data can refer to data in the artistic code image that is inconsistent with the data used to generate the artistic code image. For example, if the data corresponding to a code element in the artistic code image is 1, while the data corresponding to the code element when the artistic code image was generated is 0, this data can be determined as abnormal data. The above-mentioned different versions of initial QR code images may include QR code images generated according to different template versions, different masks, etc., and may also include QR code images obtained by mirroring, rotating, etc. the QR code images.

[0136] Through the above method, the characteristic information of the promotion object and the initial QR code image data can be processed so that the obtained QR code image can retain the original function while also carrying the characteristics of the promotion object, making the information carried by the QR code image more diversified, so that users can understand some other information when viewing or using the QR code, thereby improving the user experience.

[0137] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 4 is a structural diagram of a device for generating an artistic code image corresponding to Figure 2 provided in the embodiments of this specification. As shown in Figure 4, the device may include:

[0138] A request acquisition module 402 is configured to acquire a code image generation request generated based on a user's triggering operation;

[0139] A code data generation module 404 is configured to generate initial two-dimensional code image data based on the code image generation request;

[0140] Feature acquisition module 406, used to acquire feature information corresponding to the promotion object;

[0141] The image processing module 408 is configured to process the initial two-dimensional code image data using the feature information using a generative artificial intelligence algorithm to obtain an artistic code image.

[0142] Based on the same idea, the embodiments of this specification also provide devices corresponding to the above methods.

[0143] FIG5 is a schematic diagram of the structure of a device for generating an artistic code image according to an embodiment of this specification, corresponding to FIG2 . As shown in FIG5 , the device 500 may include:

[0144] at least one processor 510; and,

[0145] A memory 530 in communication with the at least one processor; wherein,

[0146] The memory 530 stores instructions 520 executable by the at least one processor 510. The instructions are executed by the at least one processor 510 to enable the at least one processor 510 to:

[0147] Obtaining a code image generation request generated based on a user's triggering operation;

[0148] generating initial two-dimensional code image data based on the code image generation request;

[0149] Obtain feature information corresponding to the promotion object;

[0150] A generative artificial intelligence algorithm is adopted to process the initial two-dimensional code image data using the feature information to obtain an artistic code image.

[0151] Based on the same idea, the embodiments of this specification also provide a computer-readable medium corresponding to the above method. The computer-readable medium stores computer-readable instructions, which can be executed by a processor to implement the above method of generating an artistic code image:

[0152] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device shown in FIG5 is generally similar to the method embodiment, so the description is relatively simple. For relevant parts, refer to the description of the method embodiment.

[0153] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly performed using "logic compiler" software. This is similar to the software compiler used during program development. Before compilation, the original code must be written in a specific programming language, called a hardware description language (HDL). There are many types of HDL, including ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also appreciate that simply by programming the method flow in one of these hardware description languages ​​and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0154] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.

[0155] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0156] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0157] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0158] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0159] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0161] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0162] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0163] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0164] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0165] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0166] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0167] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A method for generating an artistic code image, comprising: Obtaining a code image generation request generated based on a user's trigger operation; Based on the code image generation request, generate initial two-dimensional code image data; Obtain feature information corresponding to the promotion object; A generative artificial intelligence algorithm is adopted to process the initial two-dimensional code image data using the feature information to obtain an artistic code image.

2. The method according to claim 1, wherein the feature information includes an image related to the promotion object; The adopting of the generative artificial intelligence algorithm and utilizing the feature information to process the initial two-dimensional code image data to obtain an artistic code image specifically includes: A generative artificial intelligence algorithm is used to perform style transfer processing on the initial two-dimensional code image data based on images related to the promotion object to obtain an artistic code image.

3. According to the method of claim 1, the feature information includes a style model corresponding to the promotion object; the style model includes a style model obtained by training a preset style model using an image related to the promotion object; The adopting of the generative artificial intelligence algorithm and utilizing the feature information to process the initial two-dimensional code image data to obtain an artistic code image specifically includes: Using the style model corresponding to the promotion object to control the parameters of the diffusion model, the initial two-dimensional code image data is processed to obtain an artistic code image; The diffusion model is a model with an image generation function.

4. The method according to claim 3, further comprising: For a number of promotion objects, obtaining images related to each promotion object; For any promotion object among the plurality of promotion objects, a preset style model is trained using an image related to the any promotion object to obtain a style model corresponding to the any promotion object; Establishing a first correspondence between the plurality of promotion objects and corresponding style models; The obtaining of characteristic information corresponding to the promotion object specifically includes: A style model corresponding to the promotion object is determined according to the first object relationship.

5. The method according to claim 1, further comprising: Get the promotion period corresponding to several promotion objects; Determining a request time corresponding to the code image generation request; Determine, according to the request time and the promotion period, a target promotion period including the request time; The promotion objects corresponding to the target promotion period are taken as the target promotion objects; The obtaining of characteristic information corresponding to the promotion object specifically includes: Obtain feature information corresponding to the target promotion object.

6. The method according to claim 5, further comprising: Obtain the time of the target promotion object; Determine whether the requested time is within the event time; The obtaining of characteristic information corresponding to the promotion object specifically includes: If the request time is within the holding time, characteristic information corresponding to the target promotion object is obtained.

7. The method according to claim 1, further comprising: Obtaining location information of the user; Determine, based on the location information, a promotion target in the geographical area where the location information is located; The obtaining of characteristic information corresponding to the promotion object specifically includes: Acquire characteristic information corresponding to the promotion object in the geographical area where the location information is located.

8. The method according to claim 7, further comprising: Acquiring regional characteristic information of the geographical area; The regional characteristic information is style information related to the characteristics of the geographical area; The adopting of the generative artificial intelligence algorithm and utilizing the feature information to process the initial two-dimensional code image data to obtain an artistic code image specifically includes: A generative artificial intelligence algorithm is adopted to process the initial two-dimensional code image data using the feature information and the regional feature information to obtain an artistic code image.

9. According to the method according to any one of claims 1-8, the promotion object includes at least one of large-scale activities, IP images, and news events.

10. The method according to claim 1, further comprising: Get the ticket information of the viewing ticket that the user has purchased; The obtaining of characteristic information corresponding to the promotion object specifically includes: Acquire characteristic information related to the viewing object corresponding to the ticket information.

11. The method according to claim 10, wherein the viewing ticket comprises at least one of a ticket for a sports event, a theater ticket, a movie ticket, a concert ticket, a tourist attraction ticket, and an amusement park ticket.

12. The method according to claim 10, if the viewing ticket is a ticket for a sports event, the method further comprises: Determining, based on the sports event ticket purchased by the user, the game event corresponding to the sports event ticket; The obtaining of characteristic information corresponding to the promotion object specifically includes: Acquire characteristic information corresponding to the competition item.

13. A device for generating an artistic code image, comprising: A request acquisition module, used to acquire a code image generation request generated based on a user's trigger operation; A code data generation module, used to generate initial two-dimensional code image data based on the code image generation request; A feature acquisition module is used to acquire feature information corresponding to the promotion object; The image processing module is used to use a generative artificial intelligence algorithm to process the initial two-dimensional code image data using the feature information to obtain an artistic code image.

14. A device for generating an artistic code image, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtaining a code image generation request generated based on a user's trigger operation; Based on the code image generation request, generate initial two-dimensional code image data; Obtain feature information corresponding to the promotion object; A generative artificial intelligence algorithm is adopted to process the initial two-dimensional code image data using the feature information to obtain an artistic code image.

15. A computer-readable medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the method for generating an artistic code image according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method and device for generating artistic code image, equipment and medium

    CN117333566A

  • Two-dimensional code generation method and device

    CN109376830A

  • Two-dimensional code generation method and a computer readable storage medium

    CN109492735A

  • Synthetic image generation method and device

    CN110490960A

  • Method and device for generating artistic code image, equipment and medium

    CN117115293A

Cited By

  • High-quality art two-dimensional code generation method and system based on intelligent area positioning

    CN121503519A