Two-dimensional code generation method and device, computer device and storage medium

By extracting scenario type information and performing legality verification after receiving a QR code generation request, and generating the target QR code based on the template configured with business parameter data, the problem of low QR code generation efficiency in different business scenarios is solved, and efficient and intelligent QR code generation is achieved.

CN115564000BActive Publication Date: 2025-11-25CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211160211.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2025-11-25
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

Existing technologies require significant manpower and resources to generate QR codes in different business scenarios, resulting in low efficiency and potential resource waste.

Method used

By receiving a user's QR code generation request, extracting scenario type information and performing legality verification, processing the configuration template based on business parameter data, generating target configuration information, and finally generating a target QR code corresponding to the business scenario.

Benefits of technology

It improves the efficiency and intelligence of QR code generation, reduces resource waste in different business scenarios, and achieves fast and accurate QR code generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115564000B_ABST
    Figure CN115564000B_ABST
Patent Text Reader

Abstract

The embodiment of the application belongs to the field of big data, and relates to a two-dimensional code generation method, comprising the following steps: receiving a two-dimensional code generation request corresponding to a preset business scenario triggered by a user through a client; wherein the two-dimensional code generation request carries scene type information corresponding to the business scenario and business parameter data; extracting the scene type information from the two-dimensional code generation request; performing legality verification on the scene type information, and determining whether the verification is passed; if the verification is passed, extracting the business parameter data from the two-dimensional code generation request; performing parameter configuration processing on a preset configuration template based on the business parameter data to obtain target configuration information; and generating a target two-dimensional code corresponding to the business scenario based on the target configuration information. The application also provides a two-dimensional code generation device, a computer device and a storage medium. In addition, the application also relates to blockchain technology, and the target two-dimensional code can be stored in the blockchain. The application improves the generation efficiency and intelligence of the two-dimensional code.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of big data, and particularly relates to a two-dimensional code generation method and device, computer equipment and a storage medium. BACKGROUND

[0002] With the rapid development of mobile internet technology, more and more financial products and electronic payment businesses carry and display business information in the form of two-dimensional codes. However, the two-dimensional codes used in various business scenarios usually have different two-dimensional code data structures. When there is a need to generate relevant two-dimensional codes in different business scenarios, the existing method is to generate two-dimensional codes for each business scenario according to the respective two-dimensional code data structure. If the number of business scenarios is large, the above-mentioned two-dimensional code generation method for different business scenarios requires a lot of manpower and resources, and the generation efficiency of two-dimensional codes is low, which easily causes resource waste. SUMMARY

[0003] The embodiments of the present application aim to provide a two-dimensional code generation method, device, computer equipment and storage medium to solve the technical problem that the existing two-dimensional code generation method for different business scenarios requires a lot of manpower and resources, and the generation efficiency of two-dimensional codes is low, which easily causes resource waste.

[0004] To solve the above technical problem, the embodiments of the present application provide a two-dimensional code generation method, which adopts the following technical solution:

[0005] Receiving a two-dimensional code generation request triggered by a user through a client and corresponding to a preset business scenario; wherein the two-dimensional code generation request carries scene type information corresponding to the business scenario and business parameter data;

[0006] Extracting the scene type information from the two-dimensional code generation request;

[0007] Carrying out legality verification on the scene type information and determining whether the verification is passed;

[0008] If the verification is passed, extracting the business parameter data from the two-dimensional code generation request;

[0009] Performing parameter configuration processing on a preset configuration template based on the business parameter data to obtain target configuration information;

[0010] Generating a target two-dimensional code corresponding to the business scenario based on the target configuration information.

[0011] Further, the step of generating a target two-dimensional code corresponding to the business scenario based on the target configuration information specifically includes:

[0012] acquire an encryption key corresponding to the scene type information;

[0013] determine an assembly manner;

[0014] assemble the target configuration information and the encryption key based on the assembly manner to generate the target two-dimensional code.

[0015] Further, the step of performing parameter configuration processing on a preset configuration template based on the service parameter data to obtain target configuration information specifically includes:

[0016] acquiring a parameter field matched with the service parameter data from the configuration template;

[0017] acquiring an original parameter corresponding to the parameter field;

[0018] replacing the original parameter with the service parameter data to obtain the target configuration information.

[0019] Further, the step of performing legality verification on the scene type information and determining whether the verification is passed specifically includes:

[0020] acquiring a data format of the scene type information;

[0021] determining whether the data format conforms to a standard data format;

[0022] if the standard data format is met, calling a preset scene information database;

[0023] determining whether the scene information database stores a target scene type information same as the scene type information;

[0024] if the target scene type information is stored, it is determined that the verification is passed, otherwise, it is determined that the verification is not passed.

[0025] Further, after the step of generating a target two-dimensional code corresponding to the business scene based on the target configuration information, the method further includes:

[0026] determining whether a two-dimensional code acquisition request corresponding to the business scene sent by the user through the client is received;

[0027] if yes, acquiring the target two-dimensional code corresponding to the business scene;

[0028] sending the target two-dimensional code to the client.

[0029] Further, the step of sending the target two-dimensional code to the client specifically includes:

[0030] acquire identification information corresponding to the client;

[0031] establish a preset connection with the client based on the identification information;

[0032] send the target two-dimensional code to the client based on the preset connection.

[0033] Further, before the step of performing parameter configuration processing on a preset configuration template based on the service parameter data to obtain target configuration information, the method further comprises:

[0034] determining whether a template configuration request corresponding to a two-dimensional code triggered by a target user is received;

[0035] if yes, displaying a preset configuration interface;

[0036] receiving configuration data input by the target user in the configuration interface;

[0037] generating the configuration template based on the configuration data;

[0038] storing the configuration template in a preset configuration file.

[0039] To solve the above technical problems, the embodiment of the application further provides a two-dimensional code generation device, which adopts the technical scheme as follows:

[0040] a first receiving module configured to receive a two-dimensional code generation request corresponding to a preset service scenario triggered by a user through a client; wherein the two-dimensional code generation request carries scene type information corresponding to the service scenario and service parameter data;

[0041] a first extraction module configured to extract the scene type information from the two-dimensional code generation request;

[0042] a verification module configured to perform legality verification on the scene type information and determine whether the verification is passed;

[0043] a second extraction module configured to extract the service parameter data from the two-dimensional code generation request if the verification is passed;

[0044] a configuration module configured to perform parameter configuration processing on a preset configuration template based on the service parameter data to obtain target configuration information;

[0045] a first generation module configured to generate a target two-dimensional code corresponding to the service scenario based on the target configuration information.

[0046] To solve the above technical problems, the embodiment of the application further provides a computer device, which adopts the technical scheme as follows:

[0047] receive a two-dimensional code generation request triggered by a user through a client and corresponding to a preset business scenario; the two-dimensional code generation request carries scene type information corresponding to the business scenario and business parameter data;

[0048] extract the scene type information from the two-dimensional code generation request;

[0049] perform legality verification on the scene type information and determine whether the verification is passed;

[0050] if the verification is passed, extract the business parameter data from the two-dimensional code generation request;

[0051] perform parameter configuration processing on a preset configuration template based on the business parameter data to obtain target configuration information;

[0052] generate a target two-dimensional code corresponding to the business scenario based on the target configuration information.

[0053] To solve the above technical problems, the embodiment of the application also provides a computer readable storage medium, which adopts the technical scheme as follows:

[0054] receive a two-dimensional code generation request triggered by a user through a client and corresponding to a preset business scenario; the two-dimensional code generation request carries scene type information corresponding to the business scenario and business parameter data;

[0055] extract the scene type information from the two-dimensional code generation request;

[0056] perform legality verification on the scene type information and determine whether the verification is passed;

[0057] if the verification is passed, extract the business parameter data from the two-dimensional code generation request;

[0058] perform parameter configuration processing on a preset configuration template based on the business parameter data to obtain target configuration information;

[0059] generate a target two-dimensional code corresponding to the business scenario based on the target configuration information.

[0060] Compared with the prior art, the embodiment of the application has the following beneficial effects:

[0061] After receiving a two-dimensional code generation request corresponding to a preset business scenario triggered by a user through a client, an embodiment of the present application first extracts scenario type information from the two-dimensional code generation request, then performs legality verification on the scenario type information, and determines whether the verification is passed. If the verification is passed, the business parameter data is extracted from the two-dimensional code generation request, and subsequent parameter configuration processing is performed on the preset configuration template based on the business parameter data to obtain target configuration information. Finally, the target two-dimensional code corresponding to the business scenario is generated based on the target configuration information. The embodiment of the present application can perform configuration processing on the configuration template based on the business parameter data, and then quickly and accurately generate the target two-dimensional code corresponding to the business scenario based on the target configuration information, thereby reducing the manpower and material resources required for two-dimensional code generation under different business scenarios, effectively improving the generation efficiency of the two-dimensional code, reducing the waste of resources, and improving the intelligence of the two-dimensional code generation. BRIEF DESCRIPTION OF DRAWINGS

[0062] In order to more clearly illustrate the schemes in the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0063] Figure 1 is an exemplary system architecture diagram to which the present application can be applied;

[0064] Figure 2 Flowchart of an embodiment of the two-dimensional code generation method according to the present application;

[0065] Figure 3 is a structural schematic diagram of an embodiment of the two-dimensional code generation device according to the present application;

[0066] Figure 4 is a structural schematic diagram of an embodiment of the computer device according to the present application. DETAILED DESCRIPTION

[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs; the terms used in the specification of the application are only for the purpose of describing specific embodiments and are not intended to limit the present application; the specification, claims and above description of drawings of the present application The terms "include" and "have" and any variations thereof in the specification and the above description of drawings are intended to cover non-exclusive inclusion. The terms "first", "second" and the like in the specification and claims of the present application or the above description of drawings are used to distinguish different objects, not to describe a particular order.

[0068] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0069] 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 with reference to the accompanying drawings.

[0070] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0071] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0072] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.

[0073] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0074] It should be noted that the QR code generation method provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the QR code generation device is generally set in the server / terminal device.

[0075] It should be understood that Figure 1The number of terminal devices, networks and servers in the system is only illustrative. Any number of terminal devices, networks and servers can be provided according to implementation needs.

[0076] With reference to the accompanying drawings still, Figure 2 , a flowchart of one embodiment of a two-dimensional code generation method according to the present application is shown. The two-dimensional code generation method includes the following steps:

[0077] Step S201, receiving a two-dimensional code generation request triggered by a user through a client corresponding to a preset business scenario; wherein the two-dimensional code generation request carries scene type information corresponding to the business scenario and business parameter data.

[0078] In this embodiment, the electronic device (for example Figure 1 The server / terminal device shown) on which the two-dimensional code generation method runs can obtain the two-dimensional code generation request through a wired connection mode or a wireless connection mode. It should be noted that the above-mentioned wireless connection mode can include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other now known or future developed wireless connection modes. Among them, the above-mentioned scene type information is the label information of the type corresponding to the above-mentioned business scenario, for example, scene A, scene B, scene C, etc. The above-mentioned business parameter data is the parameter data corresponding to the parameters required for configuring the generation of the two-dimensional code input by the user according to the actual business use demand. The above-mentioned parameters required for configuring the generation of the two-dimensional code can include: the unique ID of the two-dimensional code, the expiration time, the jump key, the jump mode, whether the intermediate page is required, the loading parameter interface front-end URL, the intermediate page H5 page, etc.

[0079] Step S202, extracting the scene type information from the two-dimensional code generation request.

[0080] In this embodiment, the scene type information carried in the two-dimensional code generation request is extracted by analyzing and processing the two-dimensional code generation request.

[0081] Step S203, performing legality verification on the scene type information and determining whether the verification is passed.

[0082] In this embodiment, the legality of the scene type information can be verified based on the data format of the scene type information and the preset scene information database. The specific implementation process of the legality verification will be further described in detail in the subsequent specific embodiments, and will not be described here.

[0083] Step S204, if the verification passes, extracting the service parameter data from the two-dimensional code generation request.

[0084] In the embodiment, the two-dimensional code generation request is parsed to extract the service parameter data carried in the two-dimensional code generation request.

[0085] Step S205, performing parameter configuration processing on the preset configuration template based on the service parameter data to obtain target configuration information.

[0086] In the embodiment, the configuration template is a json string related to the parameter data of the generated two-dimensional code and stored in the configuration file of the electronic device in advance. The specific implementation process of performing parameter configuration processing on the preset configuration template based on the service parameter data to obtain target configuration information will be further described in detail in subsequent specific embodiments, and will not be described in detail here.

[0087] Step S206, generating a target two-dimensional code corresponding to the service scenario based on the target configuration information.

[0088] In the embodiment, the target two-dimensional code corresponding to the service scenario at least includes the target configuration information. In another embodiment, the target two-dimensional code can further include an encryption key corresponding to the scenario type information. The specific implementation process of generating a target two-dimensional code corresponding to the service scenario based on the target configuration information will be further described in detail in subsequent specific embodiments, and will not be described in detail here.

[0089] After receiving the two-dimensional code generation request corresponding to the preset service scenario triggered by the user through the client, the application first extracts the scenario type information from the two-dimensional code generation request, then performs legality verification on the scenario type information, and judges whether the verification passes. If the verification passes, the service parameter data is extracted from the two-dimensional code generation request, and the preset configuration template is subsequently configured based on the service parameter data to obtain target configuration information. Finally, a target two-dimensional code corresponding to the service scenario is generated based on the target configuration information. The application can configure the configuration template based on the service parameter data, and then quickly and accurately generate a target two-dimensional code corresponding to the service scenario based on the target configuration information, thereby reducing the manpower and material resources required for two-dimensional code generation under different service scenarios, effectively improving the generation efficiency of the two-dimensional code, reducing the waste of resources, and improving the intelligence of the two-dimensional code generation.

[0090] In some optional implementations, step S206 includes the following steps:

[0091] Obtaining an encryption key corresponding to the scenario type information.

[0092] In the embodiment, the encryption key can be provided by a user according to actual service use, or can also be obtained by an electronic device based on a random number generated by a related random number generation algorithm.

[0093] Determine an assembly manner.

[0094] In the embodiment, the assembly manner refers to a manner of generating a target two-dimensional code by assembling target configuration information and an encryption key. The assembly manner is not specifically limited, and can include target configuration information + encryption key, or encryption key + target configuration information, or can also be determined according to a preset assembly rule.

[0095] Based on the assembly manner, the target configuration information and the encryption key are assembled to generate the target two-dimensional code.

[0096] In the embodiment, the target configuration information is encrypted by using the encryption key to generate the target two-dimensional code, so that the target configuration information in the target two-dimensional code can be effectively protected from tampering.

[0097] The application obtains an encryption key corresponding to scene type information, and then assembles target configuration information and the encryption key according to a corresponding assembly manner to generate a target two-dimensional code, so that the legality of the generated target two-dimensional code is ensured, and the security of the generated target two-dimensional code is effectively improved.

[0098] In some optional implementation manners of the embodiment, step S205 includes the following steps:

[0099] Obtain a parameter field matching the service parameter data from the configuration template.

[0100] In the embodiment, the configuration template is a JSON string related to the parameter data for generating the two-dimensional code and is pre-stored in a configuration file of the electronic device. The configuration template includes at least the following fields: a unique ID of the two-dimensional code, an expiration time, a jump key, a jump mode, whether an intermediate page is needed, a loading parameter interface pre-URL, and an intermediate page H5 page. Specifically, the unique ID of the two-dimensional code is used as an identifier for the two-dimensional code, and is used for checking whether the two-dimensional code is invalid after the user frequently requests and the back-end checks the two-dimensional code after scanning. The expiration time is used as a basis for displaying the expiration time of the two-dimensional code. If the two-dimensional code reaches the expiration time, the two-dimensional code is displayed as invalid, and the front end can interact with the user for scanning according to the time. The jump key and the jump mode are used for jump after processing the intermediate page in the native. According to different jump modes, the corresponding jump key is matched, such as an H5 address for H5 jump, a URL for URL jump to an external link, a native for jump to the corresponding native interface, an intermediate page H5 for processing the intermediate page H5 after scanning, a loading parameter interface pre-URL for requesting the pre-URL of the back-end interface before jump, and obtaining the parameters of the jump page.

[0101] Obtaining an original parameter corresponding to the parameter field.

[0102] In the embodiment, for the fields included in the configuration template, a corresponding original parameter can be set for each field in advance, or the parameter value of each field is set as a null value.

[0103] Replacing the original parameter with the business parameter data to obtain the target configuration information.

[0104] In the embodiment, the original parameter is replaced with the business parameter data, that is, the original parameter is deleted, and the business parameter data is filled into the position of the original parameter to obtain the processed configuration template, that is, the target configuration information.

[0105] After obtaining the business parameter data, the application can perform parameter configuration processing on the preset configuration template based on the business parameter data to obtain the target configuration information, which is beneficial to quickly generating the target two-dimensional code corresponding to the business scenario based on the target configuration information in the subsequent process, and improves the generation efficiency and intelligence of the target two-dimensional code.

[0106] In some optional implementation manners, step S204 includes the following steps:

[0107] Obtaining a data format of the scene type information.

[0108] In the embodiment, the data format can include the field length of the scene type information.

[0109] determine whether the data format conforms to a standard data format.

[0110] In the embodiment, the standard data format refers to a field satisfying a preset length threshold. If the field length of the scene type information satisfies the preset length threshold, it is determined that the data format of the scene type information conforms to the standard data format. The value of the length threshold is not specifically limited and can be set according to actual business use requirements.

[0111] If the standard data format is met, a preset scene information database is called.

[0112] In the embodiment, the scene information database is a database pre-created and storing correct and legal scene types.

[0113] It is determined whether the scene information database stores target scene type information identical to the scene type information.

[0114] In the embodiment, based on a preset similarity algorithm, the similarity of all first scene type information in the scene information database and the scene type information can be calculated. If there is second scene type information in the first scene type information with a similarity greater than a preset similarity threshold, the second scene type information is taken as the target scene type information identical to the scene type information. The value of the similarity threshold is not specifically limited and can be set according to actual business use requirements.

[0115] If the target scene type information is stored, it is determined that the verification passes, otherwise it is determined that the verification fails.

[0116] When receiving a two-dimensional code generation request corresponding to a preset business scene triggered by a user through a client, the application intelligently extracts scene type information from the two-dimensional code generation request first, and performs legality verification on the scene type information based on the data format of the scene type information and a preset scene information database. Only when it is detected that the scene type information passes the legality verification, subsequent response processing of the two-dimensional code generation request is performed to generate a corresponding target two-dimensional code, ensuring the processing specification of the two-dimensional code generation request and improving the security of the two-dimensional code generation process.

[0117] In some optional implementations, after step S206, the electronic device can further perform the following steps:

[0118] It is determined whether a two-dimensional code acquisition request corresponding to the business scene and sent by the user through the client is received.

[0119] In the embodiment, the two-dimensional code acquisition request is a request for acquiring the generated target two-dimensional code corresponding to the business scene.

[0120] If yes, the target two-dimensional code corresponding to the business scenario is acquired.

[0121] In this embodiment, after the target two-dimensional code is generated, the target two-dimensional code can also be stored, for example, in a preset database or a block chain, so that the target two-dimensional code can be directly found from the preset database or the block chain subsequently.

[0122] The target two-dimensional code is sent to the client.

[0123] In this embodiment, the specific implementation process of sending the target two-dimensional code to the client will be further described in detail in subsequent specific embodiments, and will not be elaborated here. In addition, after the client receives the target two-dimensional code, the user can perform a scanning operation on the target two-dimensional code, and then the client parses the json string in the target two-dimensional code to obtain the corresponding page and jump link, so as to perform interaction corresponding to the target two-dimensional code according to the jump link to enter the page.

[0124] The application receives a two-dimensional code acquisition request corresponding to a business scenario sent by a user through a client, quickly acquires the target two-dimensional code corresponding to the business scenario, and sends the target two-dimensional code to the client, thereby improving the user experience.

[0125] In some optional implementations of this embodiment, the target two-dimensional code is sent to the client, including the following steps:

[0126] The identification information corresponding to the client is acquired.

[0127] In this embodiment, the identification information can refer to the ID information of the client, and the ID information of the client has a unique corresponding relationship with the client.

[0128] A preset connection is established based on the identification information and the client.

[0129] In this embodiment, the preset connection specifically refers to an SSE (Server-sent Events) connection. SSE is a lightweight alternative to WebSocket and uses the HTTP protocol. The HTTP protocol has no way to do server push, but when the server declares to the client that it will send stream information next time, the client will keep the connection open, and SSE uses this principle.

[0130] The target two-dimensional code is sent to the client based on the preset connection.

[0131] In the embodiment, since the SSE is a one-way channel from the server to the client, the method of sending the two-dimensional code using the SSE connection can save system resources such as CPU resources, bandwidth resources, or memory resources and the like in the interaction process between the server and the client.

[0132] After receiving the two-dimensional code acquisition request corresponding to the business scenario sent by the user through the client, and acquiring the target two-dimensional code corresponding to the business scenario, the application returns the target two-dimensional code to the client through the established SSE connection between the client and the electronic device, so that the client can acquire the required target two-dimensional code in time, and the problems of high resource occupancy and large consumption in the existing two-dimensional code display method can be solved, and the system resource occupancy and consumption can be effectively reduced in the process of acquiring the two-dimensional code in the client, which is beneficial to improve the system performance.

[0133] In some optional implementation modes of the embodiment, before step S205, the electronic device can further perform the following steps:

[0134] It is judged whether a template configuration request corresponding to the two-dimensional code triggered by a target user is received.

[0135] In the embodiment, the target user can be a staff related to the construction of the configuration file.

[0136] If yes, a preset configuration interface is displayed.

[0137] In the embodiment, the configuration interface is a template configuration interface related to the generation of two-dimensional codes of different business scenario types, which is created in advance according to actual business use requirements.

[0138] The configuration data input by the target user in the configuration interface is received.

[0139] In the embodiment, the configuration data can include field data required for generating two-dimensional codes of different business scenario types, which at least includes a unique ID of the two-dimensional code, an expiration time, a jump key, a jump mode, whether an intermediate page is needed, a loading parameter interface front-end URL, and an intermediate page H5 page.

[0140] The configuration template is generated based on the configuration data.

[0141] In the embodiment, all the input configuration data is integrated to obtain target configuration data after integration, and the target configuration data is stored in a preset blank file to obtain the configuration template.

[0142] The configuration template is stored in a preset configuration file.

[0143] When the application receives a template configuration request triggered by a target user and corresponding to a two-dimensional code, a corresponding configuration interface is displayed, and a configuration template is generated and stored based on configuration data input by the target user in the configuration interface, which facilitates subsequent generation of two-dimensional codes of different business scenario types based on the configuration template, effectively avoids the problem of slow two-dimensional code generation rate caused by the intervention of different business scenarios, and improves the generation intelligence and generation rate of two-dimensional codes.

[0144] It should be emphasized that, in order to further ensure the privacy and security of the target two-dimensional code, the target two-dimensional code can also be stored in a node of a block chain.

[0145] The block chain referred to in the application is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. The block chain (block chain) is essentially a decentralized database, which is a series of data blocks associated using cryptographic methods, each data block containing information of a batch of network transactions, for verifying the validity (anti-fake) of the information and generating the next block. The block chain can include a block chain underlying platform, a platform product service layer, and an application service layer.

[0146] The embodiments of the application can acquire and process related data based on artificial intelligence technology. Among them, artificial intelligence (Artificial Intelligence, AI) is the use of digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Theory, method, technology and application system.

[0147] The basic technology of artificial intelligence generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc. Several major directions.

[0148] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by computer readable instructions instructing related hardware, and the computer readable instructions can be stored in a computer readable storage medium. The program can include the processes of the above-mentioned embodiments when executed, wherein the storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0149] It should be understood that, although each step in the flowchart of the accompanying drawings is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless explicitly stated herein, the execution of these steps is not strictly limited in sequence, and they can be executed in other sequences. Moreover, at least part of the steps in the flowchart of the accompanying drawings can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be alternately executed with at least part of other steps or sub-steps or stages of other steps.

[0150] Further referring to Figure 3 , as an implementation of the method shown in the above Figure 2 , the present application provides an embodiment of a two-dimensional code generation device, which corresponds to the method embodiment shown in Figure 2 , and the device can be specifically applied to various electronic devices.

[0151] As shown in Figure 3 , the two-dimensional code generation device 300 described in the embodiment includes a first receiving module 301, a first extraction module 302, a verification module 303, a second extraction module 304, a configuration module 305, and a first generation module 306. Among them:

[0152] The first receiving module 301 is configured to receive a two-dimensional code generation request triggered by a user through a client and corresponding to a preset business scenario; wherein the two-dimensional code generation request carries scene type information and business parameter data corresponding to the business scenario;

[0153] The first extraction module 302 is configured to extract the scene type information from the two-dimensional code generation request;

[0154] The verification module 303 is configured to perform legality verification on the scene type information and determine whether the verification is passed;

[0155] The second extraction module 304 is configured to extract the business parameter data from the two-dimensional code generation request if the verification is passed;

[0156] The configuration module 305 is configured to perform parameter configuration processing on a preset configuration template based on the business parameter data to obtain target configuration information;

[0157] The first generation module 306 is configured to generate a target two-dimensional code corresponding to the business scenario based on the target configuration information.

[0158] In the embodiment, the operations performed by the modules or units described above correspond to the steps of the two-dimensional code generation method of the foregoing embodiments one by one, and thus are not described here again.

[0159] In some optional implementations of the embodiment, the first generation module 306 includes:

[0160] A first acquisition sub-module, configured to acquire an encryption key corresponding to the scene type information;

[0161] A determination sub-module, configured to determine an assembly manner;

[0162] A generation sub-module, configured to assemble the target configuration information and the encryption key based on the assembly manner to generate the target two-dimensional code.

[0163] In the embodiment, the operations performed by the modules or units described above correspond to the steps of the two-dimensional code generation method of the foregoing embodiments one by one, and thus are not described here again.

[0164] In some optional implementations of the embodiment, the configuration module 305 includes:

[0165] A second acquisition sub-module, configured to acquire a parameter field matching the service parameter data from the configuration template;

[0166] A third acquisition sub-module, configured to acquire an original parameter corresponding to the parameter field;

[0167] A processing sub-module, configured to replace the original parameter with the service parameter data to obtain the target configuration information.

[0168] In the embodiment, the operations performed by the modules or units described above correspond to the steps of the two-dimensional code generation method of the foregoing embodiments one by one, and thus are not described here again.

[0169] In some optional implementations of the embodiment, the second extraction module 304 includes:

[0170] A fourth acquisition sub-module, configured to acquire a data format of the scene type information;

[0171] A first judgment sub-module, configured to judge whether the data format conforms to a standard data format;

[0172] A calling sub-module, configured to call a preset scene information database if the data format conforms to the standard data format;

[0173] A second judgment sub-module, configured to judge whether the scene information database stores target scene type information identical to the scene type information;

[0174] A determination sub-module is configured to determine that the check passes if the target scene type information is stored, and otherwise, determine that the check fails.

[0175] In the embodiment, the modules or units are respectively configured to perform operations corresponding to the steps of the two-dimensional code generation method of the foregoing embodiments, and thus no further description is provided herein.

[0176] In some optional implementations of the embodiment, the two-dimensional code generation apparatus further includes:

[0177] A first determination module is configured to determine whether a two-dimensional code acquisition request corresponding to the business scene and sent by the user through the client is received.

[0178] A obtaining module is configured to obtain the target two-dimensional code corresponding to the business scene if the determination is positive.

[0179] A sending module is configured to send the target two-dimensional code to the client.

[0180] In the embodiment, the modules or units are respectively configured to perform operations corresponding to the steps of the two-dimensional code generation method of the foregoing embodiments, and thus no further description is provided herein.

[0181] In some optional implementations of the embodiment, the sending module includes:

[0182] A fifth obtaining sub-module is configured to obtain identification information corresponding to the client.

[0183] A establishing sub-module is configured to establish a preset connection with the client based on the identification information.

[0184] A sending sub-module is configured to send the target two-dimensional code to the client based on the preset connection.

[0185] In the embodiment, the modules or units are respectively configured to perform operations corresponding to the steps of the two-dimensional code generation method of the foregoing embodiments, and thus no further description is provided herein.

[0186] In some optional implementations of the embodiment, the two-dimensional code generation apparatus further includes:

[0187] A second determination module is configured to determine whether a template configuration request corresponding to a two-dimensional code and triggered by a target user is received.

[0188] A display module is configured to display a preset configuration interface if the determination is positive.

[0189] A second receiving module is configured to receive configuration data input by the target user in the configuration interface.

[0190] A second generation module is configured to generate the configuration template based on the configuration data.

[0191] A storage module is configured to store the configuration template in a preset configuration file.

[0192] In the embodiment, the above modules or units are respectively used to perform operations corresponding to the steps of the two-dimensional code generation method of the foregoing embodiments, and thus will not be described here.

[0193] To solve the above technical problems, the embodiment of the present application further provides a computer device. For details, please refer to Figure 4 , Figure 4 The basic structure block diagram of the computer device in the embodiment is shown in FIG. 4.

[0194] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 which are connected to each other through a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented. Among them, those skilled in the art can understand that the computer device herein is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0195] The computer device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The computer device can perform human-computer interaction with a user through a keyboard, a mouse, a remote controller, a touchpad, a voice control device, and the like.

[0196] The memory 41 includes at least one type of readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit and the external storage device of the computer device 4. In this embodiment, the memory 41 is generally used to store an operating system and various application software installed on the computer device 4, such as computer readable instructions of the two-dimensional code generation method, etc. In addition, the memory 41 can also be used to temporarily store various data that have been output or will be output.

[0197] The processor 42 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer readable instructions or process data stored in the memory 41, such as computer readable instructions of the two-dimensional code generation method.

[0198] The network interface 43 can include a wireless network interface or a wired network interface, and is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0199] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0200] In the embodiment of the present application, after receiving the two-dimensional code generation request corresponding to the preset business scenario triggered by the user through the client, the scene type information is first extracted from the two-dimensional code generation request, then the legality of the scene type information is verified, and it is determined whether the verification is passed. If the verification is passed, the business parameter data is extracted from the two-dimensional code generation request, and subsequent parameter configuration processing is performed on the preset configuration template based on the business parameter data to obtain target configuration information. Finally, the target two-dimensional code corresponding to the business scenario is generated based on the target configuration information. The embodiment of the present application can perform configuration processing on the configuration template based on the business parameter data, and then quickly and accurately generate the target two-dimensional code corresponding to the business scenario based on the target configuration information, thereby reducing the manpower and material resources required for two-dimensional code generation under different business scenarios, effectively improving the generation efficiency of the two-dimensional code, reducing the waste of resources, and improving the intelligence of the two-dimensional code generation.

[0201] The present application also provides another embodiment, that is, a computer readable storage medium storing computer readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the two-dimensional code generation method as described above.

[0202] Compared with the prior art, the embodiment of the present application has the following beneficial effects:

[0203] In the embodiment of the present application, after receiving the two-dimensional code generation request corresponding to the preset business scenario triggered by the user through the client, the scene type information is first extracted from the two-dimensional code generation request, then the legality of the scene type information is verified, and it is determined whether the verification is passed. If the verification is passed, the business parameter data is extracted from the two-dimensional code generation request, and subsequent parameter configuration processing is performed on the preset configuration template based on the business parameter data to obtain target configuration information. Finally, the target two-dimensional code corresponding to the business scenario is generated based on the target configuration information. The embodiment of the present application can perform configuration processing on the configuration template based on the business parameter data, and then quickly and accurately generate the target two-dimensional code corresponding to the business scenario based on the target configuration information, thereby reducing the manpower and material resources required for two-dimensional code generation under different business scenarios, effectively improving the generation efficiency of the two-dimensional code, reducing the waste of resources, and improving the intelligence of the two-dimensional code generation.

[0204] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the methods described in various embodiments of the present application.

[0205] Obviously, the above-described embodiments are only some of the embodiments of the present application, not all the embodiments, and the drawings show the preferred embodiments of the present application, but do not limit the patent scope of the present application. The present application can be implemented in many different forms, and conversely, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing specific embodiments, or make equivalent replacements to some of the technical features. Any equivalent structure made by using the contents of the specification and drawings, directly or indirectly applied to other related technical fields, is also within the scope of the patent protection of the present application.

Claims

1. A two-dimensional code generation method characterized by, The method comprises the following steps: receiving a two-dimensional code generation request triggered by a user through a client and corresponding to a preset business scenario; wherein the two-dimensional code generation request carries scene type information and business parameter data corresponding to the business scenario; extracting the scene type information from the two-dimensional code generation request; performing legality verification on the scene type information and determining whether the verification is passed; if the verification is passed, extracting the business parameter data from the two-dimensional code generation request; performing parameter configuration processing on a preset configuration template based on the business parameter data to obtain target configuration information; generating a target two-dimensional code corresponding to the business scenario based on the target configuration information; wherein the step of performing legality verification on the scene type information and determining whether the verification is passed comprises: obtaining the data format of the scene type information; determining whether the data format conforms to a standard data format; if the data format conforms to the standard data format, calling a preset scene information database; determining whether the scene information database stores target scene type information identical to the scene type information; if the scene information database stores the target scene type information, determining that the verification is passed, otherwise determining that the verification is not passed; wherein the data format comprises the field length of the scene type information, and the standard data format refers to a field length threshold value that is satisfied, and if the field length of the scene type information satisfies the preset length threshold value, it is determined that the data format of the scene type information conforms to the standard data format.

2. The method of claim 1, wherein The step of generating a target two-dimensional code corresponding to the business scenario based on the target configuration information comprises: obtaining an encryption key corresponding to the scene type information; determining an assembly method; based on the assembly method, assembling the target configuration information and the encryption key to generate the target two-dimensional code.

3. The method of claim 1, wherein The step of performing parameter configuration processing on a preset configuration template based on the business parameter data to obtain target configuration information comprises: obtaining a parameter field matching the business parameter data from the configuration template; obtaining an original parameter corresponding to the parameter field; using the business parameter data to replace the original parameter to obtain the target configuration information.

4. The method of claim 1, wherein After the step of generating a target two-dimensional code corresponding to the business scenario based on the target configuration information, the method further comprises: determining whether a two-dimensional code acquisition request corresponding to the business scenario is received from the user through the client; if yes, obtaining the target two-dimensional code corresponding to the business scenario; sending the target two-dimensional code to the client.

5. The method of claim 4, wherein The step of sending the target two-dimensional code to the client comprises: obtaining identification information corresponding to the client; based on the identification information, establishing a preset connection with the client; based on the preset connection, sending the target two-dimensional code to the client.

6. The method of claim 1, wherein Before the step of performing parameter configuration processing on a preset configuration template based on the business parameter data to obtain target configuration information, the method further comprises: determining whether a template configuration request corresponding to a two-dimensional code is triggered by a target user; If yes, a preset configuration interface is displayed; Receiving configuration data input by the target user in the configuration interface; Generating the configuration template based on the configuration data; Storing the configuration template in a preset configuration file.

7. A two-dimensional code generating apparatus characterized by comprising: Comprise: The first receiving module is configured to receive a two-dimensional code generation request corresponding to a preset business scenario triggered by a user through a client; wherein the two-dimensional code generation request carries scene type information and business parameter data corresponding to the business scenario; The first extraction module is configured to extract the scene type information from the two-dimensional code generation request; The verification module is configured to perform legality verification on the scene type information and determine whether the verification is passed; The second extraction module is configured to extract the business parameter data from the two-dimensional code generation request if the verification is passed; The configuration module is configured to perform parameter configuration processing on a preset configuration template based on the business parameter data to obtain target configuration information; The first generation module is configured to generate a target two-dimensional code corresponding to the business scenario based on the target configuration information; The verification module comprises: The fourth acquisition submodule is configured to acquire a data format of the scene type information; The first judgment submodule is configured to determine whether the data format conforms to a standard data format; The calling submodule is configured to call a preset scene information database if the standard data format is met; The second judgment submodule is configured to determine whether the scene information database stores target scene type information identical to the scene type information; The determination submodule is configured to determine that the verification is passed if the target scene type information is stored, otherwise, determine that the verification is not passed; The data format comprises the field length of the scene type information, and the standard data format refers to a field that meets a preset length threshold. If the field length of the scene type information meets the preset length threshold, it is determined that the data format of the scene type information conforms to the standard data format.

8. A computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and the processor executes the computer readable instructions to implement the steps of the two-dimensional code generation method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by the processor to implement the steps of the two-dimensional code generation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Two-dimensional code generating method, device and apparatus, two-dimensional code service processing method, device and apparatus and two-dimensional code

    CN108154211A