Generation of graphic code

By dynamically updating the code scheme through the graphic code generation system, the problem of fixed graphic code schemes in existing technologies is solved, enabling flexible configuration and efficient generation of graphic codes, thus improving the user experience.

WO2026051719A1PCT designated stage Publication Date: 2026-03-12SASI DIGITAL TECHNOLOGY (BEIJING) CO LTD
View PDF -1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2026-03-12

Smart Images

  • Figure CN2025114633_12032026_PF_FP_ABST
    Figure CN2025114633_12032026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in one or more embodiments of the present disclosure are a graphic code generation method, apparatus and system. The graphic code generation method comprises: in response to an attribute update instruction sent for a target code scheme, determining, from among multiple pieces of attribute information of the target code scheme, first attribute information to be updated, and updating the first attribute information to second attribute information indicated by the attribute update instruction; and in response to a code generation request initiated for an updated target code scheme, generating a graphic code on the basis of the updated target code scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Generation of a graphic code TECHNICAL FIELD

[0001] One or more embodiments of the present disclosure relate to the technical field of image processing, and in particular to generation of a graphic code. BACKGROUND

[0002] A graphic code is a pattern in which a plurality of specific geometric figures are arranged according to a certain rule to record information, and the code generation (or code making) and decoding of the graphic code are implemented through a code scheme composed of a plurality of attribute information.

[0003] A conventional code scheme is usually a static code scheme, that is, each attribute information in the created code scheme is fixed and unchangeable, and the graphic code generated based on the code scheme also conforms to these fixed attribute information. In the case where the application scenario or use requirement of the graphic code changes, a new code scheme needs to be created and a code needs to be generated, which is inconvenient to use.

[0004] In this regard, the related art proposes a programmable graphic code scheme, that is, a user defines a code scheme and generates a graphic code by writing a code by himself / herself to meet individual application requirements. However, this scheme not only requires the user to write a code by himself / herself, but also requires the user to define the logic, algorithm and rule of the graphic code by himself / herself, so that the implementation threshold of the scheme is high and the difficulty is great. In particular, in the case where the function and interaction of the graphic code are relatively complex, the implementation difficulty is extremely high, and the user experience is poor. SUMMARY

[0005] Therefore, one or more embodiments of the present disclosure provide technical solutions as follows.

[0006] According to a first aspect of one or more embodiments of the present disclosure, a method for generating a graphic code is provided, including: in response to an attribute update instruction issued for a target code scheme, determining first attribute information to be updated from a plurality of attribute information of the target code scheme, and updating the first attribute information to second attribute information indicated by the attribute update instruction; and in response to a code generation request initiated for the updated target code scheme, generating a graphic code based on the updated target code scheme.

[0007] According to a second aspect of one or more embodiments of the present disclosure, an apparatus for generating a graphic code is provided, including: an update unit configured to, in response to an attribute update instruction issued for a target code scheme, determine first attribute information to be updated from a plurality of attribute information of the target code scheme, and update the first attribute information to second attribute information indicated by the attribute update instruction; and a code generation unit configured to, in response to a code generation request initiated for the updated target code scheme, generate a graphic code based on the updated target code scheme.

[0008] According to a third aspect of one or more embodiments of the present disclosure, a generation system of a graphical code is provided, comprising: a code management client configured to send an attribute update instruction to a code management server for a target code scheme managed by the code management server; the code management server configured to determine first attribute information to be updated from a plurality of attribute information of the target code scheme in response to the attribute update instruction, and update the first attribute information to second attribute information indicated by the attribute update instruction; a code generation client configured to send a code generation request to the code management server for the updated target code scheme; and the code management server further configured to generate a graphical code based on the updated target code scheme in response to the code generation request.

[0009] According to a fourth aspect of one or more embodiments of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor implements the steps of the method according to the first aspect by running the executable instructions.

[0010] According to a fifth aspect of one or more embodiments of the present disclosure, a computer-readable storage medium is provided, which stores computer instructions executable by a processor to implement the steps of the method according to the first aspect.

[0011] According to a sixth aspect of one or more embodiments of the present disclosure, a computer program product is provided, comprising computer program / instructions executable by a processor to implement the steps of the method according to the first aspect.

[0012] As can be seen from the above embodiments, the embodiments of the present disclosure can update a target code scheme in response to an attribute update instruction for the code scheme, i.e., update first attribute information from a plurality of attribute information of the target code scheme to second attribute information specified by the user according to the instruction, and then generate a graphical code based on the updated target code scheme.

[0013] It can be seen that the present scheme can dynamically update a target code scheme that has been created, thereby achieving the effect of dynamically configuring the code scheme, so that the user can configure / update the specific attribute information of the code scheme at any time and flexibly according to the actual code usage requirements, to generate a graphical code that can meet the above requirements. Compared with the related technical scheme of writing code by the user, the present scheme only needs the user to indicate how to update the attribute information and request code generation through interactive operation, and the code management platform can automatically generate a corresponding graphical code according to the updated target code scheme, which greatly simplifies the update operation of the code scheme and the code generation operation of the graphical code, and helps to improve the code scheme update efficiency and code generation efficiency of the user, thereby improving the user experience. BRIEF DESCRIPTION OF DRAWINGS

[0014] FIG. 1 is a schematic diagram of an architecture of a graphical code generation system according to an example embodiment.

[0015] FIG. 2 is a flowchart of a graphical code generation method according to an example embodiment.

[0016] FIG. 3 is a flowchart of a graphical code generation process according to an example embodiment.

[0017] FIG. 4 is a schematic diagram of a structure of a device according to an example embodiment.

[0018] FIG. 5 is a block diagram of a graphical code generation apparatus according to an example embodiment. DETAILED DESCRIPTION

[0019] To solve the aforementioned technical problems in the related art, the present disclosure proposes a brand-new graphical code generation scheme, i.e., allowing a user to realize dynamic code scheme updating by updating attribute information, and generating a corresponding graphical code by a graphical code generation system (or code management platform) according to the updated code scheme. The scheme will be described in detail below in combination with the drawings and embodiments.

[0020] FIG. 1 is a schematic diagram of an architecture of a graphical code generation system according to an example embodiment. As shown in FIG. 1, the system can include a network 10, a server 11, and a plurality of electronic devices, such as a PC (Personal Computer) 12, a PC 13, and a mobile phone 14, etc.

[0021] The server 11 can be a physical server containing a standalone host, or can also be a virtual server, a cloud server, etc. carried by a host cluster. In the running process, the server 11 can run a server-side program of an application to realize the related functions of the application, such as when the server 11 runs a program of a code management service, it can realize a corresponding code management server. The code management server can be built by using a micro-service architecture, under which one or more micro-service components can constitute the code management server at a logical level, at this time, the client can access each micro-service component as needed (of course, some service components need to have access rights to be accessed), thereby realizing the access to the code management server, which will not be described in detail.

[0022] In the running process, any of the above electronic devices can run a program on the client side of an application to realize the related functions of the application. For example, when the PC 12 runs the program of the code management service, it can be implemented as a client of the code management service, hereinafter referred to as a code management client; when the PC 13 runs the program of the code generation service, it can be implemented as a client of the code generation service, hereinafter referred to as a code generation client; when the mobile phone 13 runs the program of the decoding service, it can be implemented as a client of the decoding service, hereinafter referred to as a decoding client. Among them, the code management client and the code generation client can be the same client, such as an APP that integrates code management function and code generation function at the same time. The APP can be used as a code management client and a code generation client. This is explained here. Any of the above clients can adopt a suitable form, such as pre-installing an installation package (such as.exe or.ipa format) of an application program in the PC 12, so that the client of the application program can be started and run in the PC 12 (at this time, the client and the server adopt C / S architecture). Or, when using an online "client" such as HTML5 technology, the corresponding application program does not need to be installed on the electronic device, and the client can be obtained and run, such as the PC 13 accessing the server through the browser (at this time, the client and the server adopt B / S architecture), which will not be repeated here. Of course, the computer and the mobile phone are only some types of electronic devices that users can use. In fact, users can also use electronic devices such as workstations (Work Station), PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), VR (Virtual Reality) devices, AR (Augmented Reality) devices, etc. The embodiments of the present disclosure do not limit this.

[0023] In addition, the network 10 can include various types of wired or wireless networks, and the embodiments of the present disclosure do not limit this.

[0024] It should be noted that the drawing of the mobile phone 14 in FIG. 1 is only to cooperate with the following embodiment to explain the scheme, and does not limit that the graphic code generation system must contain a decoding client. In fact, the graphic code can only be composed of a code management server, a code management client and a code generation client, and does not contain a decoding client, which is explained here.

[0025] In the system shown in FIG. 1, the code management client can interact with the code management server to update the target code scheme, and the code management client or the code generation client can interact with the code management server to generate a graphical code. The generated graphical code can be displayed to the user in an appropriate manner (such as the two-dimensional code QR1 shown in FIG. 1), so that the user scans the graphical code using a decoding client, and further interacts with the code management server to realize the analysis of the graphical code (i.e., decodes the graphical code).

[0026] The present disclosure proposes a graphical code generation system, which can be used to update an already created target code scheme and generate a graphical code based on the updated target code scheme. The system can include a code management server (such as the server program running in server 11 shown in FIG. 1), a management client (such as the client program running in PC 12 shown in FIG. 1), and a code generation client (such as the client program running in PC 13 shown in FIG. 1). Among them, the code management client is used to issue an attribute update instruction to the code management server for the target code scheme managed by the code management server; the code management server is used to determine first attribute information to be updated from the multiple attribute information of the target code scheme in response to the attribute update instruction, and update the first attribute information to second attribute information indicated by the attribute update instruction; the code generation client is used to initiate a code generation request to the code management server for the updated target code scheme; and the code management server is further used to generate a graphical code based on the updated target code scheme in response to the code generation request.

[0027] In an embodiment, the code management client and the code generation client can be the same client, such as the same application program, which can be used to manage code schemes (such as creating a new code scheme or updating an already created code scheme) and generate graphical codes. Of course, the processes of managing code schemes and generating graphical codes can be realized by interacting with the code management server.

[0028] In an embodiment, after the graphical code is generated, the code management server can send the graphical code to the code generation client for display by the latter through the above-mentioned approach or to other devices for display / printing, etc. Alternatively, the code management server can directly send the graphical code to a third-party device specified by the code generation client for display / printing, etc., which will not be described again. The displayed graphical code or the printed and posted graphical code can be photographed (or scanned) and analyzed by an electronic device. The electronic device can analyze the photographed code by itself or send the photographed image to another electronic device for analysis, which is not limited in the present disclosure. The above-mentioned graphical code scanned by the electronic device can be analyzed by a client (i.e., a decoding client) running in the electronic device.

[0029] It should be noted that the graphic code described in the present disclosure can be in the form of a bar code, a two-dimensional code (Quick Response Code, or QR Code), a three-dimensional code (Visual Recognition Code, or VR Code), and the like. Taking a two-dimensional code as an example, it can adopt various formats such as Data Matrix, MaxiCode, Aztec, PDF417, and the like. After the code is generated, the graphic code generated based on the target code scheme can be published through an APP (Application), a Mini Program, a public platform, or the like; thereafter, a user can scan the published graphic code through a corresponding scanning approach. The published graphic code can be printed on a physical object, displayed on a screen, or projected on the surface of an object of any shape or in space, and the like, so as to be scanned by a scanning terminal. The code value obtained by scanning can be a string in any format such as binary, decimal, hexadecimal, or the like, and the present disclosure does not limit this.

[0030] The code scheme described in the present disclosure can be used for code generation (or code drawing, i.e., drawing a graphical code) and code decoding (i.e., analyzing a graphical code or its code value). Any code scheme can be regarded as an information set composed of various attribute information, wherein any attribute information can include one or more specific information. Taking a target code scheme to be updated as an example, the various attribute information it contains can include code category, code standard, code issuing authority identification, code application identification, code style, etc. Among them, the code category can be determined by the description object of the graphical code to be generated, such as a person code, a thing code, a place code, etc., or it can also be determined by the function / application scenario of the graphical code to be generated, which is used for government services, scenic sightseeing, park management and control, campus management and control, logistics management and control, medical credentials, intelligent transportation, digital fire fighting, etc. Any category of code scheme can include at least one field content, such as a person code which can include the person's name, ID number, permanent address, etc., and a place code which can include the type, address, opening time, entry rule, etc. of the place. Through the code category, the application scenario of the graphical code corresponding to the code scheme can be flexibly set, so as to meet the code usage needs of users as much as possible and flexibly. The code standard (or code protocol) is a series of rules that the graphical code to be generated needs to follow, and these rules can be jointly determined by standard operators and the logical relationship (such as and, or, not, numerical value judgment, content judgment, etc.) between them. Exemplarily, the code standard can be PDF417, QR Code, Code 49, Code 16K, Code One, etc., and the present disclosure does not limit this. The code issuing authority identification is used to specify the legal authority that can generate the graphical code using the code scheme. In addition to this identification, the code issuing authority can also be configured with corresponding key information (such as a public-private key pair) and the like, so as to realize the authority control of the code issuing authority and ensure the security of the published graphical code. The code application identification is used to specify the application (or service) that can legally publish / use the graphical code generated by the code scheme. This identification can be used to check the usage authority of the application to the graphical code, so as to avoid the misuse of the generated graphical code by unauthorized applications, etc. Among them, the application identification set of any code scheme can include one or more application identifications, wherein each application identification represents a legal application corresponding to the code scheme. The code style is used to specify the appearance style of the generated graphical code, such as the configuration of style parameters of the graphical code, such as layers, colors, background pictures, texts, logos, etc., which will not be described in detail.

[0031] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0032] In addition, the attribute information of any code scheme further includes code extension (such as extension / correlation data available after scanning the code, etc.), three-party code (such as other graphic codes associated with the graphic code generated by the code scheme), code SPI (accessible services associated with the graphic code generated by the code scheme, etc.), one code thousand faces (such as scanning the graphic code generated by the code scheme can jump to any pre-configured page, etc.), and the like. In addition, for example, any code scheme managed by the graphic code generation system can be a building code scheme, a personal code scheme, a health code scheme, a ride code scheme, a one-code appointment code scheme, a one-code check-in code scheme, a medical code scheme, a payment code scheme, a household code scheme, and the like, which will not be described in detail.

[0033] FIG. 2 is a flowchart of an exemplary embodiment of a graphic code generation method, which can be applied to the graphic code generation system described above, and in particular can be applied to the code management server in the system. As shown in FIG. 2, the method includes steps 202-204.

[0034] In step 202, in response to an attribute update instruction issued for a target code scheme, first attribute information to be updated is determined from a plurality of attribute information of the target code scheme, and the first attribute information is updated to second attribute information indicated by the attribute update instruction.

[0035] As an open code management platform for users, the graphic code described in the present disclosure can be used to manage at least one code scheme. Any code scheme managed by the system (such as the target code scheme described in the embodiments of the present disclosure) can be created by a user (i.e., a user managing the code scheme) on other platforms or devices, and then migrated to the platform for maintenance and management after creation; or, the code scheme can also be created by the user based on the resources provided by the system within the system, i.e., the system can also support the function of creating a code scheme.

[0036] In an embodiment, the aforementioned user can interact with the code management server through a code management client used by the user himself to create the target code scheme (of course, the code scheme is created before the code scheme is updated, so the code scheme is not known as the "target code scheme" to be updated later when the code scheme is created). For example, the code management client can initiate a code scheme generation instruction to the code management server, and the server can determine the multiple attribute information specified in the instruction in response to the code scheme generation instruction, and further generate the target code scheme based on the attribute information. Among them, the code scheme generation instruction can contain the multiple attribute information, which can be determined by the user at the code management client; or the instruction can contain the identification of the multiple attribute information, and the attribute information represented by the identification can be displayed to the user by the code management client and selected by the user. It can be understood that the user can reasonably configure the multiple attribute information according to the actual scene or demand in the process of creating the target code scheme, so as to create the target code scheme composed of these attribute information. It can be seen that through this way, the user can flexibly create different code schemes for different scenes, so as to create code schemes that adapt to the actual scene demand as much as possible.

[0037] The user can issue the aforementioned attribute update instruction for any code scheme managed by the generation system of the graphic code, so that the code scheme becomes the target code scheme of the embodiments of the present disclosure. As described above, the target code scheme includes multiple attribute information, and the attribute update instruction can be used to indicate that the first attribute information in the attribute information is updated to the corresponding second attribute information. Among them, the first attribute information can include one or more information, and in the case of including multiple information, the information can belong to one or more attribute information.

[0038] It can be understood that the "update" described in the embodiments of the present disclosure involves changes to the attribute information of the target code scheme, and the generated graphic code before and after the change will be different. Therefore, in order to avoid unrelated users from arbitrarily changing the code scheme, the code management server can perform permission verification on the initiator of the attribute update instruction (i.e. the user or the account currently logged in by the code management client used by the user), and respond to the instruction if the verification is passed. For example, any user can be allowed to update the code scheme managed or owned by himself; or the superior-subordinate relationship and / or the authority relationship between users can be determined according to the organizational structure information of the organization where the users belong, and the update permission of the code scheme managed or owned by the subordinate user can be allocated to the superior user; or the update permission of a certain code scheme can be determined according to the management role of the user, and the rest is omitted.

[0039] In an embodiment, the code management server can provide multiple candidate attribute information corresponding to the target code scheme for selection by an initiator of a scheme update request initiated for the target code scheme, and determine at least one selected candidate attribute information as the second attribute information. For example, in a case where it is determined that a target code scheme needs to be updated, a user can first initiate a scheme update request to the code management server through the code management client; accordingly, the code management server can return multiple candidate attribute information corresponding to the target code scheme to the code management client in response to the request, and display the candidate attribute information for the user to view. Further, the user can select the first attribute information to be updated according to actual scene requirements, and submit the selected first attribute information or an identifier thereof to the code management server through the code management client, to specify to the code management server which attribute information is to be used as the first attribute information. In this way, the user can accurately know which attribute information is included in the target code scheme, thereby facilitating accurate specification of the first attribute information to be updated.

[0040] In another embodiment, the attribute update instruction can carry a first attribute identifier of the first attribute information and corresponding second attribute information, so that the code management server can determine the first attribute information matching the identifier from multiple attribute information of the target code scheme according to the first attribute information, and update the first attribute information to the corresponding second attribute information carried in the instruction.

[0041] It should be noted that the second attribute information described in the embodiments of the present disclosure can be selected by the user from the candidate information provided by the code management server, or can be set by the user according to actual requirements, and the embodiments of the present disclosure do not limit this. In addition, it should be noted that the so-called "updating the first attribute information to the second attribute information" can replace each first attribute information in the locally maintained multiple attribute information with the corresponding second attribute information; or, in order to facilitate the subsequent scheme rollback (or recovery) requirements of the user, each second attribute information can be saved locally and the association between the second attribute information and the remaining attribute information (i.e., the attribute information that is not updated) can be recorded, and the association between each first attribute information and the remaining attribute information can be disconnected, and details are not described herein.

[0042] Step 204, in response to a code generation request initiated for the updated target code scheme, generating a graphical code based on the updated target code scheme.

[0043] It can be understood that after the first attribute information is updated to the corresponding second attribute information, that is, the updating process for the target code scheme is completed, the target code scheme at this time is the "updated target code scheme". In this regard, the code generation client can initiate a code generation request for the updated target code scheme to trigger the code management server to generate a graphical code based on the updated target code scheme. It should be noted that one or more graphical codes can be generated in response to one code generation request, and the specific number can be determined according to the relevant information carried in the code generation request, and the embodiments of the present disclosure do not limit this.

[0044] As can be seen from the foregoing embodiments, the present scheme can dynamically update the target code scheme that has been created and completed, thereby achieving the effect of dynamically configuring the code scheme, so that the user can configure / update the specific attribute information of the code scheme at any time and flexibly according to the actual code usage demand, to generate a graphical code that can meet the above demand. Compared with the related technical scheme of writing code by the user himself, the present scheme only needs the user to indicate how to update the attribute information and request code generation through interactive operation, and the code management platform can automatically generate the corresponding graphical code according to the updated target code scheme, which greatly simplifies the updating operation of the code scheme and the code generation operation of the graphical code, and helps to improve the code scheme updating efficiency and code generation efficiency of the user, thereby improving the user experience.

[0045] In an embodiment, in order to facilitate the management of the target code scheme, thereby avoiding information confusion and even errors in generating graphical codes, the graphical code generation system can set a corresponding version number for each code scheme it manages. For the target code scheme, the foregoing updating process can be regarded as an upgrading process of the scheme, and therefore a corresponding version number can be allocated to the updated target code scheme. For example, in the case where the target code scheme before updating has a first version number, a second version number different from the first version number can be allocated to the updated target code scheme. In order to intuitively reflect the content of this update through the version number, the information proportion of this update (such as the ratio of the number of first attribute information to the total number of attribute information of the target code scheme) can be calculated first, and the second version number can be determined according to the information proportion, so that the difference between the second version number and the first version number is positively correlated with the information proportion. In addition, when generating a graphical code based on the updated target code scheme, the second version number (or the hash value of the version number, etc.) can also be included in the code value thereof, so as to meet the possible subsequent knowledge demand of the decoding client for the version number.

[0046] In an embodiment, the target code scheme can be associated with a corresponding development interface (hereinafter referred to as a first code scheme development interface) so as to facilitate the corresponding client to call the code scheme through the interface. For example, in the foregoing embodiment, the code management client can initiate an attribute update instruction or a scheme update request for the target code scheme to the code management server through the first code scheme development interface. In this regard, after updating the target code scheme, the code management server can associate the updated target code scheme with the first code scheme development interface to replace the target code scheme before the update. This way keeps the development interface unchanged, so that the client can call the updated target code scheme according to the original development interface without changing the access configuration information, thereby avoiding access exceptions that may be caused by incompatibility or information errors after changing the access configuration information, and ensuring the stability of the interaction. Of course, the updated target code scheme can also be associated with a second code scheme development interface, which is different from the first code scheme development interface. It can be understood that this way actually allocates a new development interface for the updated target code scheme, so that the client can call the updated target code scheme according to the new second code scheme development interface, or continue to call the target code scheme before the update according to the original first code scheme development interface. The specific calling approach can be flexibly selected, so as to not only help meet the diversified code scheme calling requirements of the client, but also avoid interference or calling confusion caused by different code schemes.

[0047] As shown in FIG. 3, the third-party services such as APP1-APPn can call the code scheme i through the code scheme development interface. For example, APP1 can act as a code management client to initiate a scheme update request or send an attribute update instruction to the code management server through the interface; APP2 can act as a code generation client to initiate a code generation request to the code management server through the interface; and APPn can act as a decoding client to initiate a decoding request to the code management server through the interface.

[0048] In an embodiment, the plurality of attribute information of the target code scheme can include the code standard, and at this time, the code management server can generate a corresponding code generation script and a decoding script based on the code standard in the updated target code scheme. The code generation script is used to generate a graphical code conforming to the target code scheme, and the decoding script is used to decode the graphical code or the code value thereof. For example, when generating a graphical code based on the updated target code scheme, the code management server can generate a graphical code by executing the code generation script. In this way, the code management server automatically generates the code generation script and the decoding script by means of its code generation function, so as to facilitate subsequent execution of the scripts to complete automatic code generation and decoding without manual script writing by the user, thereby greatly reducing the code generation / decoding workload of the user and improving the script generation efficiency.

[0049] As mentioned above, the target code scheme includes a plurality of attribute information, and the first attribute information to be updated is at least part of the information, thus any attribute information of the updated target code scheme can not be updated, or can be the second attribute information after the update. Therefore, the code standard can be the original code standard that is not updated (in this case, the second attribute information does not include the code standard), or can be the new code standard after the update (in this case, the second attribute information includes the code standard). The attribute information such as code application and code style in the following embodiments is similar, and will not be described one by one.

[0050] As shown in FIG. 3, it is assumed that the code scheme i is the target code scheme, and the graphic code j can be generated based on the code scheme. It should be noted that although the code scheme i and each attribute information such as the code category below it in FIG. 3 are drawn separately, logically, these attribute information should be considered to jointly constitute the code scheme i.

[0051] In an embodiment, in the case where the second attribute information includes the code standard, the code management server can provide a plurality of candidate standard operators for the user, and determine the code standard in the second attribute information based on at least one target standard operator selected by the user from the plurality of candidate standard operators. For example, the code management server can return a plurality of candidate standard operators to the code management client in response to the scheme update request or the attribute update instruction sent by the code management client; the latter can show these candidate standard operators to the user, so that the user selects at least part of the candidate standard operators according to the actual scene demand; these candidate standard operators will be determined as target standard operators by the code management server, and the code management server can further determine the code standard based on these standard operators, to update the original code standard in the first attribute information.

[0052] In an embodiment, the graphic code can be parsed by executing the aforementioned decoding script. For example, the code management server can extract a graphic code image obtained by shooting the displayed graphic code from a first type of decoding request initiated for the graphic code, and parse the graphic code image by executing the decoding script. In this case, the graphic code image only contains the graphic code and does not contain other irrelevant content. In order to achieve this effect, the graphic code can be identified in real time during the preview process before shooting, and the graphic code image can be obtained by shooting only the graphic code after the graphic code is identified. Alternatively, a complete image can be obtained by shooting towards the graphic code, and then the part where the graphic code is located can be cut from the complete image to obtain the graphic code image. As can be seen, the first type of decoding request contains the aforementioned graphic code image, and the decoding script can not only identify the graphic code from the graphic code image, but also further parse the graphic code (i.e., convert the graphic information into a code value and then parse the code value). Alternatively, the code management server can extract a code value obtained by shooting and parsing the displayed graphic code from a second type of decoding request initiated for the graphic code, and parse the code value by executing the decoding script. As can be seen, the second type of decoding request contains the aforementioned code value, the decoding client can identify the graphic code from the image obtained by shooting the displayed graphic code and convert it into a code value, and the code management server only needs to execute the decoding script to parse the code value, i.e., the decoding script at this time is used to parse the code value of the graphic code. The above two parsing methods have different requirements for the computing power and device communication ability of the decoding client, and the appropriate method can be selected according to the actual situation during the implementation of the scheme.

[0053] In an embodiment, the plurality of attribute information of the target code scheme can include the aforementioned code standard, and in this case, the code management server can verify the identity of the initiator of the aforementioned code generation request, and in the case where the initiator is verified as a preset code generation institution represented by the code generation institution identifier, generate a graphic code based on the updated target code scheme. In this way, the legality / code generation authority of the initiator of the code generation request can be verified by the code generation institution identifier before the graphic code is generated, so as to avoid the misuse of the updated target code scheme for code generation. And / or, for the preset code generation institution represented by the code generation institution identifier, the code management server can also perform encryption processing on the generated graphic code based on the institution key of the institution, such as using the public key of the institution to encrypt the graphic code and returning the ciphertext to the institution, to ensure that even if data leakage occurs during the transmission of the graphic code, the transmitted graphic code cannot be decrypted and used by third parties (such as listeners) outside the institution.

[0054] In an embodiment, the attribute information of the target code scheme can include the aforementioned code category, and when the code management server generates a graphical code based on the updated target code scheme, the code management server can calculate the code value corresponding to the field content of the code category according to a preset rule, and generate a graphical code based on the code value. Wherein, the meaning of each field of the code category is related to the code category, and the meaning of each field of different code categories is often also different, and the specific field meaning can be selected by the user from the candidate field meaning provided by the system, or can be customized by the user. Wherein, the field content of any field can be preconfigured, or can be extracted from the aforementioned code generation request, for example, the field content of the "category" field of the bus code is the preset text "bus" or the number "1", and the field content of the "certificate number" field of the health code is the actual certificate number of the user (the certificate number can be input by the user through the code generation client and sent to the code management server in the aforementioned code generation request). The meaning of each field and the field content in the above-mentioned code category can be flexibly set by the user according to the actual demand, which helps to meet the diversified needs of different scenes.

[0055] In an embodiment, the attribute information of the target code scheme can include the aforementioned code category, and when the code management server generates a graphical code based on the updated target code scheme, the code management server can calculate the code value corresponding to the field content of the code category according to a preset rule, and generate a graphical code based on the code value. Wherein, the meaning of each field of the code category is related to the code category, and the meaning of each field of different code categories is often also different, and the specific field meaning can be selected by the user from the candidate field meaning provided by the system, or can be customized by the user. Wherein, the field content of any field can be preconfigured, or can be extracted from the aforementioned code generation request, for example, the field content of the "category" field of the bus code is the preset text "bus" or the number "1", and the field content of the "certificate number" field of the health code is the actual certificate number of the user (the certificate number can be input by the user through the code generation client and sent to the code management server in the aforementioned code generation request). The meaning of each field and the field content in the above-mentioned code category can be flexibly set by the user according to the actual demand, which helps to meet the diversified needs of different scenes.

[0056] The graphical code generated by the above-mentioned method can be published by a suitable way to show the graphical code to the user (i.e. the viewing user of the graphical code). For example, it can be shown in a page or printed and pasted on an object, so that the user can scan the code by the decoding client. As shown in FIG. 1, the mobile phone 14 can use the camera to take the displayed two-dimensional code QR1, and further initiate a decoding request for the two-dimensional code to the code management server by the decoding client running in the mobile phone. Alternatively, the graphical code can also be displayed in the page of the APP or the mini program, so that the scanning program built in the APP or the mini program scans the graphical code (such as the function of "long press to identify two-dimensional code" and the like).

[0057] In an embodiment, the multiple attribute information of the target code scheme can include the aforementioned code application identifier, and the code management server can parse the graphic code based on the updated target code scheme in response to a decoding request initiated for the graphic code, under the condition that the initiator of the decoding request is verified as a preset code application represented by the code application identifier. In the embodiment of FIG. 3, after receiving the decoding request initiated by the decoding client and containing the code value of the graphic code j, the code management server can extract the application identifier of the decoding client from the request and attempt to query the application identifier from the identifier set of the code scheme i: if the query is successful, it means that the decoding client is a legal application corresponding to the code scheme i, and the code value of the graphic code j can be parsed at this time; otherwise, the code value is refused to be parsed, and the decoding client can also be returned a corresponding decoding failure notification message. This way can ensure that the code management server only parses the graphic code in response to the decoding request of the legal application corresponding to the target code scheme, thereby avoiding the abuse of the code scheme or the graphic code generated thereby by an unauthorized application.

[0058] FIG. 4 is a schematic structural diagram of an apparatus according to an example embodiment. Referring to FIG. 4, at the hardware level, the apparatus includes a processor 402, an internal bus 404, a network interface 406, a memory 408, a non-volatile memory 410, and can further include other hardware required by functions. One or more embodiments of the present disclosure can be implemented in a software manner, such as reading a corresponding computer program from the non-volatile memory 410 into the memory 408 by the processor 402 and then running. Of course, in addition to the software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or a logic device.

[0059] Referring to FIG. 5, the present disclosure further proposes a graphic code generation apparatus, which can be applied to the apparatus shown in FIG. 4 to implement the technical solutions of the present disclosure. The apparatus can include: an updating unit 501 configured to determine first attribute information to be updated from multiple attribute information of a target code scheme in response to an attribute update instruction issued for the target code scheme, and update the first attribute information to second attribute information indicated by the attribute update instruction; and a code generation unit 502 configured to generate a graphic code based on the updated target code scheme in response to a code generation request initiated for the updated target code scheme.

[0060] Optionally, the attribute updating unit 501 is specifically configured to determine first attribute information matched with a first attribute identifier from the multiple attribute information of the target code scheme according to the first attribute identifier carried by the attribute update instruction, and update the first attribute information to second attribute information carried by the attribute update instruction.

[0061] Optionally, the apparatus further comprises an attribute information determining unit 503 configured to, in response to a scheme updating request initiated for the target code scheme, provide a plurality of candidate attribute information corresponding to the target code scheme for an initiator of the scheme updating request, and determine at least one selected candidate attribute information as the second attribute information.

[0062] Optionally, the apparatus further comprises a code scheme generating unit 504 configured to, in response to a received code scheme generating instruction, determine the plurality of attribute information specified by the code scheme generating instruction, and generate the target code scheme based on the plurality of attribute information.

[0063] Optionally, the target code scheme before updating has a first version number, and the apparatus further comprises a version number allocating unit 505 configured to allocate a second version number different from the first version number to the target code scheme after updating.

[0064] Optionally, the target code scheme before updating is associated to a first code scheme development interface, and the apparatus further comprises an interface associating unit 506 configured to associate the target code scheme after updating to the first code scheme development interface to replace the target code scheme before updating, or associate the target code scheme after updating to a second code scheme development interface different from the first code scheme development interface.

[0065] Optionally, the plurality of attribute information comprises a code standard, and the apparatus further comprises a script generating unit 507 configured to generate a corresponding code generation script and a decoding script based on the code standard in the target code scheme after updating.

[0066] Optionally, in a case where the second attribute information comprises the code standard, the apparatus further comprises a code standard determining unit 508 configured to provide a plurality of candidate standard operators for a user, and determine the code standard in the second attribute information based on at least one target standard operator selected by the user from the plurality of candidate standard operators.

[0067] Optionally, the code generation unit 502 is specifically configured to generate a graphical code by executing the code generation script.

[0068] Optionally, the apparatus further comprises a decoding unit 509 configured to, in response to a first type of decoding request initiated for the graphical code, extract a graphical code image obtained by shooting the displayed graphical code from the first type of decoding request, and parse the graphical code image by executing the decoding script; or, in response to a second type of decoding request initiated for the graphical code, extract a code value obtained by shooting and parsing the displayed graphical code from the second type of decoding request, and parse the code value by executing the decoding script.

[0069] Optionally, the multiple attribute information includes a code category, and the code generating unit 502 is specifically configured to: calculate a code value corresponding to field content of the code category according to a preset rule, and generate the graphical code based on the code value.

[0070] Optionally, the multiple attribute information includes a code style, and the code generating unit 502 is specifically configured to: render the graphical code according to a style parameter specified by the code style.

[0071] Optionally, the multiple attribute information includes an issuing institution identifier, and the code generating unit 502 is specifically configured to: in a case where it is verified that an initiator of the code generation request is a preset code issuing institution represented by the issuing institution identifier, generate the graphical code based on the updated target code scheme; and / or, the apparatus further includes an encryption unit 510 configured to: for the preset code issuing institution represented by the issuing institution identifier, perform encryption processing on the generated graphical code based on an institution key of the preset code issuing institution.

[0072] Optionally, the multiple attribute information includes a code application identifier, and the apparatus further includes an application verification unit 511 configured to: in response to a decoding request initiated for the graphical code, in a case where it is verified that an initiator of the decoding request is a preset code application represented by the code application identifier, parse the graphical code based on the updated target code scheme.

[0073] Based on the same idea as the above method, the present disclosure further provides an electronic device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor implements the steps of the method according to any one of the above embodiments by running the executable instructions.

[0074] Based on the same idea as the above method, the present disclosure further provides a computer readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of the above embodiments.

[0075] Based on the same idea as the above method, the present disclosure further provides a computer program product, comprising computer program / instructions, which, when executed by a processor, implement the steps of the method according to any one of the above embodiments.

Claims

1. A method for generating a graphical code, comprising: in response to an attribute update instruction issued for a target code scheme, determining first attribute information to be updated from a plurality of attribute information of the target code scheme, and updating the first attribute information to second attribute information indicated by the attribute update instruction; in response to a code generation request initiated for the target code scheme after the update, generating a graphical code based on the target code scheme after the update.

2. The method of claim 1, wherein, The determining first attribute information to be updated from a plurality of attribute information of the target code scheme, and updating the first attribute information to second attribute information indicated by the attribute update instruction, comprises: determining first attribute information matching a first attribute identifier carried by the attribute update instruction from the plurality of attribute information of the target code scheme, and updating the first attribute information to second attribute information carried by the attribute update instruction.

3. The method of claim 1, further comprising: in response to a scheme update request initiated for the target code scheme, providing a plurality of candidate attribute information corresponding to the target code scheme to an initiator of the scheme update request, and determining at least one selected candidate attribute information as the second attribute information.

4. The method of claim 1, further comprising: in response to a received code scheme generation instruction, determining the plurality of attribute information specified by the code scheme generation instruction, and generating the target code scheme based on the plurality of attribute information.

5. The method of claim 1, wherein, The target code scheme before the update has a first version number, and the method further comprises: allocating a second version number different from the first version number to the target code scheme after the update.

6. The method of claim 1, wherein, The target code scheme before the update is associated to a first code scheme development interface, and the method further comprises: associating the target code scheme after the update to the first code scheme development interface to replace the target code scheme before the update; or associating the target code scheme after the update to a second code scheme development interface different from the first code scheme development interface.

7. The method of claim 1, wherein, The plurality of attribute information comprises a code standard, and the method further comprises: generating a corresponding code generation script and a decoding script based on the code standard in the target code scheme after the update.

8. The method of claim 7, wherein, In a case where the second attribute information comprises the code standard, the method further comprises: providing a plurality of candidate standard operators to a user, and determining the code standard in the second attribute information based on at least one target standard operator selected by the user from the plurality of candidate standard operators.

9. The method of claim 7, wherein, The generating a graphical code based on the target code scheme after the update, comprises: generating a graphical code by executing the code generation script.

10. The method of claim 7, further comprising: in response to a first type of decoding request initiated for the graphical code, extracting a graphical code image obtained by shooting the displayed graphical code from the first type of decoding request, and analyzing the graphical code image by executing the decoding script; or In response to a second type of decoding request initiated for the graphic code, a code value of the displayed graphic code is extracted from the second type of decoding request and parsed, and the code value is parsed by executing the decoding script.

11. The method of claim 1, wherein, The multiple attribute information includes a code category, and the generating the graphic code based on the updated target code scheme includes: A code value corresponding to field content of the code category is calculated according to a preset rule, and the graphic code is generated based on the code value.

12. The method of claim 1, wherein, The multiple attribute information includes a code style, and the generating the graphic code based on the updated target code scheme includes: The graphic code is generated according to a style parameter specified by the code style.

13. The method of claim 1, wherein, The multiple attribute information includes an issuing institution identifier, The generating the graphic code based on the updated target code scheme includes: in a case where the initiator of the code generation request is verified as a preset code issuing institution represented by the issuing institution identifier, generating the graphic code based on the updated target code scheme; And / or, The method further includes: for the preset code issuing institution represented by the issuing institution identifier, performing encryption processing on the generated graphic code based on an institution key of the preset code issuing institution.

14. The method of claim 1, wherein, The multiple attribute information includes a code application identifier, and the method further includes: In response to a decoding request initiated for the graphic code, in a case where the initiator of the decoding request is verified as a preset code application represented by the code application identifier, parsing the graphic code based on the updated target code scheme.

15. A graphic code generation apparatus, comprising: an updating unit configured to, in response to an attribute updating instruction issued for a target code scheme, determine first attribute information to be updated from multiple attribute information of the target code scheme, and update the first attribute information to second attribute information indicated by the attribute updating instruction; a code generation unit configured to, in response to a code generation request initiated for the updated target code scheme, generate a graphic code based on the updated target code scheme.

16. A graphic code generation system, comprising: a code management client configured to, for a target code scheme managed by a code management server, issue an attribute updating instruction to the code management server; the code management server configured to, in response to the attribute updating instruction, determine first attribute information to be updated from multiple attribute information of the target code scheme, and update the first attribute information to second attribute information indicated by the attribute updating instruction; a code generation client configured to, for the updated target code scheme, initiate a code generation request to the code management server; the code management server further configured to, in response to the code generation request, generate a graphic code based on the updated target code scheme.

17. An electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor implements the steps of the method of any one of claims 1-14 by running the executable instructions.

18. A computer readable storage medium having stored thereon computer instructions, wherein, The instructions, when executed by the processor, implement the steps of the method of any one of claims 1-14.

19. A computer program product comprising computer programs / instructions, wherein, The computer program / instructions, when executed by the processor, implement the steps of the method of any one of claims 1-14.