A method and apparatus for decoding a graphic code, a storage medium, and an electronic device

By introducing a binding mechanism between the standard code scheme and the extended code scheme in the graphic code decoding system, the problems of low development efficiency and compatibility caused by the expansion of graphic code fields are solved, and an efficient and low-cost graphic code decoding process is achieved.

CN116205261BActive Publication Date: 2026-03-27ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2026-03-27

Smart Images

  • Figure CN116205261B_ABST
    Figure CN116205261B_ABST
Patent Text Reader

Abstract

The specification provides a decoding method and device of a graphic code, a storage medium and an electronic device. The method comprises: obtaining a to-be-analyzed code value obtained by a scanning terminal scanning a target graphic code, and determining a standard code scheme used for analyzing the to-be-analyzed code value; querying an extended code scheme bound to the standard code scheme; wherein the standard code scheme defines a standard field, and the extended code scheme defines an extended field different from the standard field; using the standard code scheme to analyze the to-be-analyzed code value to obtain standard data corresponding to the standard field, and calling the extended code scheme to obtain extended data corresponding to the extended field; wherein the analysis result of the to-be-analyzed code value comprises the standard data and the extended data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present specification relates to the technical field of computer, and particularly relates to a decoding method and device of a graphic code, a storage medium and an electronic device. BACKGROUND

[0002] The graphic code is a pattern for recording information by arranging a plurality of specific geometric patterns according to a certain rule. A plurality of code schemes for encoding and decoding different types of graphic codes are pre-deployed on a decoding server, each code scheme defines a field of interest of a corresponding service, and the fields corresponding to different code schemes may differ due to different service requirements. After encoding based on any code scheme to obtain a graphic code, a code scanning terminal can scan the graphic code to parse the code value contained in the graphic code, and then initiate a request to the decoding server based on the code value, so that the decoding server can obtain the data corresponding to the field defined by the code scheme after decoding the received code value based on any code scheme.

[0003] With the change of service requirements, there is a need to expand the field corresponding to the original code scheme. In related technologies, a new code scheme needs to be developed again for the field expansion requirement, and if the field expansion requirement changes, a new code scheme also needs to be developed again, resulting in low development efficiency and high cost. At the same time, after the code scheme changes, the original graphic code corresponding to the original code scheme may also be invalid, and a new graphic code corresponding to the new code scheme needs to be generated to replace the original graphic code, causing inconvenience. SUMMARY

[0004] To overcome the problems in the related art, the present specification provides a decoding method and device of a graphic code, a storage medium and an electronic device.

[0005] According to a first aspect of an embodiment of the present specification, a decoding method of a graphic code is provided, the method comprising:

[0006] obtaining a to-be-parsed code value obtained by scanning a target graphic code by a code scanning terminal, and determining a standard code scheme for parsing the to-be-parsed code value;

[0007] querying an extended code scheme bound by the standard code scheme; wherein the standard code scheme defines a standard field, and the extended code scheme defines an extended field different from the standard field;

[0008] parsing the to-be-parsed code value by using the standard code scheme to obtain standard data corresponding to the standard field, and calling the extended code scheme to obtain extended data corresponding to the extended field; wherein the parsing result of the to-be-parsed code value includes the standard data and the extended data.

[0009] According to a second aspect of the embodiments of the present specification, a decoding device of a graphic code is provided, the device comprising:

[0010] an acquisition unit configured to acquire a to-be-analyzed code value obtained by scanning a target graphic code by a code scanning terminal, and determine a standard code scheme used for analyzing the to-be-analyzed code value;

[0011] a query unit configured to query an extended code scheme bound to the standard code scheme; wherein the standard code scheme defines a standard field, and the extended code scheme defines an extended field different from the standard field;

[0012] a calling unit configured to analyze the to-be-analyzed code value by using the standard code scheme to obtain standard data corresponding to the standard field, and call the extended code scheme to obtain extended data corresponding to the extended field; wherein the analysis result of the to-be-analyzed code value comprises the standard data and the extended data.

[0013] According to a third aspect of the embodiments of the present specification, an electronic device is provided, comprising:

[0014] a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the method of the first aspect.

[0015] According to a fourth aspect of the embodiments of the present specification, a computer-readable storage medium is provided, which stores executable instructions; wherein the instructions are executed by a processor to implement the steps of the method of the first aspect.

[0016] In the embodiments of the present specification, by designing the code scheme of the graphic code as the standard code scheme and the extended code scheme bound to each other, the standard code scheme can be used to define the standard field which does not change or has a relatively low change frequency, and the extended code scheme is used to meet the field extension requirement and define the corresponding extended field. Therefore, when the field extension requirement occurs, only the new extended code scheme needs to be generated and bound to the original standard code scheme, without completely generating a new code scheme, which helps to improve the development efficiency, reduce the development cost, and has high flexibility. Correspondingly, in the decoding process, based on the binding relationship between the standard code scheme and the extended code scheme, the data corresponding to the standard field defined by the standard code scheme and the extended field defined by the extended code scheme can be ensured, which meets the data requirement in the actual business scenario. At the same time, since the standard code scheme does not change before and after the extension, the original graphic code corresponding to the standard code scheme is always valid, can be decoded by the standard code scheme, and will not be invalid due to the increase or change of the extended code scheme, which has high compatibility.

[0017] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application, as claimed. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and serve to explain the principles of the application, in which, like reference numerals designate corresponding parts throughout the several views.

[0019] Figure 1 is a schematic diagram of an architecture of a decoding system of a graphic code according to an example embodiment of the present specification;

[0020] Figure 2 is a flowchart of a decoding method of a graphic code according to an example embodiment of the present specification;

[0021] Figure 3 is a flowchart of a SPI packet binding according to an example embodiment of the present specification;

[0022] Figure 4 is a flowchart of a decoding request processing according to an example embodiment of the present specification;

[0023] Figure 5 is a flowchart of a page display method based on a graphic code according to an example embodiment of the present specification;

[0024] Figure 6 is a schematic structural diagram of an electronic device according to an example embodiment of the present specification;

[0025] Figure 7 is a block diagram of a decoding apparatus of a graphic code according to an example embodiment of the present specification. DETAILED DESCRIPTION

[0026] The example embodiments will be described in detail herein with reference to the attached drawings. The following description is made with reference to the accompanying drawings, in which like reference numerals represent like elements, and is made in the context of specific example embodiments. The example embodiments described in the following detailed description are not meant to be exhaustive or to be limited to the precise form disclosed. They are chosen and described to provide the fullest explanation of the principles of the one or more embodiments of the present specification.

[0027] It should be noted that the steps of the respective methods need not necessarily be performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods can include more or fewer steps than those described in this specification. Furthermore, individual steps described in this specification can be broken down into multiple steps in other embodiments; and multiple steps described in this specification can be combined into a single step in other embodiments. It should be understood that although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote the order in which the information is described. These terms are used only to distinguish one piece of information from another. For example, a first piece of information can also be referred to as a second piece of information, and similarly, a second piece of information can also be referred to as a first piece of information without departing from the scope of this specification. Depending on the context, the word "if' as used herein can be interpreted to mean "when" or "upon" or "in response to determining."

[0028] 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 this specification are information and data authorized by the user or authorized by all parties, and the collection, use and processing of relevant 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.

[0029] With the development of Internet technology, the application of graphic code in people's life is more and more widely. There are many types of graphic code, such as the graphic code described in this specification can be barcode, two-dimensional code (Quick Response Code, or QR Code), three-dimensional code and other forms. Taking two-dimensional code as an example, it can adopt Data Matrix, MaxiCode, Aztec, QR Code, PDF417 and other formats. Taking the more common two-dimensional code as an example, two-dimensional code is also called two-dimensional bar code (2-dimensional bar code), which is a geometric body that uses binary data corresponding graphics to represent data information.

[0030] According to the difference of application scenarios, two-dimensional codes can be divided into different types, such as person codes and object codes. Specifically, person codes can include health codes, old person codes, etc., and object codes can include commodity codes, place codes, etc. Taking the above old person code and place code as an example, the old person code corresponds to an old person code scheme, and the old person code scheme can be used for coding and decoding. The old person code scheme defines fields concerned by the old person code, for example, the old person code scheme can define fields A, B and C. Field A can be used to represent the name of the code holder, field B can be used to represent the age of the code holder, and field C can represent the ID number of the code holder. After the corresponding scanning terminal scans the old person code, it can initiate a request to the decoding server based on the corresponding code value, so that the decoding server can obtain the data corresponding to the fields defined by the above old person code scheme, for example: the name of the old person code holder is “Zhang San”, the age is “64 years old”, and the ID number is “12145212”, etc.

[0031] Similarly, the place code corresponds to a place code scheme, and the place code scheme can be used for coding and decoding. The place code scheme defines fields concerned by the place code, for example, the place code scheme can define fields A, B and C. Field A can be used to represent the name of the place, field B can be used to represent the location of the place, and field C can represent the contact information of the place. After the corresponding scanning terminal scans the place code, it can initiate a request to the decoding server based on the corresponding code value, so that the decoding server can obtain the data corresponding to the fields defined by the above place code scheme, for example: the name of the place corresponding to the place code is “Beijing A Mall”, the location is “Beijing A Street A Road 322”, and the contact phone number of the place is “010-1212546”, etc. With the change of business needs, there is a need to expand the fields corresponding to the original code scheme. For example, taking the above old person code as an example, after decoding the old person code using the old person code scheme, only the name, age and ID number of the old person code holder corresponding to fields A, B and C can be obtained.

[0032] Assuming that the business requirement changes and it is required to further obtain the vaccination status of the holder of the old person code after scanning the old person code, a new old person code scheme needs to be redeveloped. For example, the new old person code scheme can define a field A', a field B', a field C', and a field D', wherein the field A' can be used to represent the name of the code holder, the field B' can be used to represent the age of the code holder, the field C' can represent the ID number of the code holder, and the field D' can be used to represent the vaccination status of the code holder, so as to meet the corresponding business requirement. However, the above-mentioned code scheme re-development method will result in low development efficiency and high cost, and after the code scheme changes, the original graphical code corresponding to the original code scheme may not be able to be decoded by the new code scheme and become invalid, and a new graphical code corresponding to the new code scheme needs to be generated to replace the original graphical code, causing inconvenience.

[0033] Therefore, the present specification provides an improved decoding scheme of a graphical code to solve the problems in the related art, which will be described in detail below with reference to the accompanying drawings.

[0034] Figure 1 is a schematic diagram of the architecture of a decoding system of a graphical code provided by an exemplary embodiment of the present specification, which can include a network 10, a server 11, and a plurality of electronic devices such as a mobile phone 12, a mobile phone 13, and a mobile phone 14, etc.

[0035] The server 11 can be a physical server of a standalone host, or the server 11 can be a virtual server (such as a cloud server) carried by a host cluster. The server 11 can support decoding of a graphical code to serve as a decoding server as described above. In some cases, the server 11 can also support code generation of a graphical code, i.e., as a code generation server; of course, the code generation server and the decoding server can also be deployed on different servers, and the present specification does not limit this. Specifically, in the decoding process, the server 11 can obtain a code value to be parsed obtained by a code scanning terminal (such as the mobile phone 13) scanning a target graphical code and determine a standard code scheme for parsing the code value to be parsed, so that the server 11 can query an extended code scheme bound to the standard code scheme, and parse the code value to be parsed through the standard code scheme and the extended code scheme respectively, to obtain standard data corresponding to a standard field and extended data corresponding to an extended field. The binding relationship of the extended code scheme is used to realize the acquisition of the extended data, so that the developer does not need to redevelop the standard code scheme for field extension requirements, but only needs to generate a new extended code scheme and bind it to the original standard code scheme, which helps to improve the development efficiency, reduce the development cost, and has high flexibility.

[0036] The mobile phone 12-14 is only one type of electronic device that a user can use. In fact, the user can obviously also use electronic devices such as a tablet, a notebook computer, a personal digital assistant (PDA), a wearable device (such as smart glasses, a smart watch, etc.), a virtual reality (VR) device, an augmented reality (AR) device, or a code scanning gun specially used for scanning a two-dimensional code, and the like, and the one or more embodiments of the present specification do not limit this. The mobile phone 12-14 can be a code scanning terminal, and a user corresponding to the code scanning terminal can scan a graphic code through the code scanning terminal and send a to-be-analyzed code value scanned to a server 11 for analysis, so as to obtain an analysis result returned by the server 11, and can also implement other functions or services based on the analysis result. It can be understood that the code scanning terminal can be equipped with or externally connected with a camera, a camera module, or the like for image acquisition, so as to realize scanning of a graphic code, for example, the mobile phone 13 can scan a two-dimensional code QR1, and the mobile phone 14 can scan a two-dimensional code QR2, and the like, and will not be described in detail. The network 10 can include various types of wired or wireless networks.

[0037] Figure 2 FIG. 1 is a flowchart of a decoding method of a graphic code provided by an exemplary embodiment of the present specification, which can be applied to a decoding server and can specifically include the following steps:

[0038] In step 202, a to-be-analyzed code value obtained by scanning a target graphic code by a code scanning terminal is acquired, and a standard code scheme used for analyzing the to-be-analyzed code value is determined.

[0039] The code scanning terminal can scan a graphic code and obtain a corresponding to-be-analyzed code value by running a code scanning program, which can include an application program (APP), a mini program, and the like, and the present specification does not limit this. Correspondingly, a server program corresponding to any one or more of the above code scanning programs can be deployed on the decoding server, and the server program can be used for decoding according to a code scheme, so as to decode a to-be-analyzed code value corresponding to a graphic code. For example, a code scanning program of a public transportation code is run in a code scanning device of a bus, and a code scanning program (such as an application program, a mini program, and the like) of a health code, an old person code, a place code, and the like is run in a mobile phone of a user. The user can scan a target graphic code by using a certain code scanning program run in the code scanning terminal to obtain a corresponding code value, which can be a string in a binary or hexadecimal format, and the like. The code value needs to be further analyzed by the decoding server before being used by the code scanning terminal, and therefore can be referred to as a to-be-analyzed code value.

[0040] The code scanning terminal can send the to-be-analyzed code value to the decoding server after obtaining the to-be-analyzed code value, so that the decoding server obtains the to-be-analyzed code value obtained by the code scanning terminal scanning the target graphical code, and determines a standard code scheme for analyzing the to-be-analyzed code value. The code scanning terminal can directly send the to-be-analyzed code value to the decoding server, or can send the to-be-analyzed code value to a function server corresponding to the code scanning terminal, and further send the to-be-analyzed code value to the decoding server by the function server. This mode can be regarded as that the function server calls the decoding function provided by the decoding server.

[0041] As described above, the standard code scheme or the extended code scheme can be used to analyze the code value corresponding to the graphical code. The standard code scheme can define a standard field, so that the decoding server can analyze the corresponding graphical code based on the standard field. For example, taking the old man code as an example, the standard code scheme (old man code scheme) corresponding to the old man code can define a standard field A for representing “name”, a standard field B for representing “age”, and a standard field C for representing “ID number”. Based on the standard fields defined in the standard code scheme, the decoding server can obtain the standard data corresponding to the standard fields from the corresponding data maintenance party based on the user identifier, for example, the name of the holder of the old man code is “Li Si”, the age is “53”, and the ID number is “123456789”. Of course, the data maintenance party can also maintain the data in the decoding server, so that the decoding server can directly return to the code scanning terminal based on the locally maintained data when decoding. It can be understood that, assuming that the decoding server only maintains a unique standard code scheme, the decoding server can directly analyze based on the unique standard code scheme after receiving the to-be-analyzed code value, without the need to determine which standard code scheme to use by means such as querying or matching.

[0042] In an embodiment, the decoding server can determine the target standard code scheme for parsing the to-be-parsed code value from the plurality of standard code schemes maintained by the decoding server in various manners. For example, the decoding server can receive a code scheme identifier associated with the to-be-parsed code value uploaded by the scanning terminal, and determine the code scheme represented by the code scheme identifier as the target standard code scheme for parsing the to-be-parsed code value. In other words, the scanning terminal can maintain a scheme identifier of a code scheme, and the scanning terminal can determine the scheme identifier corresponding to the standard code scheme to be used, and inform the decoding server to select the appropriate standard code scheme. Specifically, each scanning program can be pre-defined with a corresponding standard code scheme, so that the scanning terminal can determine the standard code scheme corresponding to the scanning program currently used by the scanning terminal as the target standard code scheme to be used. Alternatively, the scanning terminal can actively select the standard code scheme to be used after enabling a scanning program, so that the scanning terminal can determine the standard code scheme selected by the user as the target standard code scheme to be used.

[0043] Accordingly, the decoding server can determine the standard code scheme for parsing the to-be-parsed code value according to the code scheme identifier associated with the to-be-parsed code value uploaded by the scanning terminal. In this way, the scanning terminal can directly specify the target standard code scheme to the decoding server, which helps to reduce the data maintenance and calculation of the decoding server, and improve the efficiency of the decoding server in determining the standard code scheme. For another example, the decoding server can maintain a mapping relationship between code values and code schemes. In the mapping relationship, all code values corresponding to any code scheme are recorded. Based on this, the decoding server can query the code scheme corresponding to the to-be-parsed code value according to the mapping relationship, to serve as the standard code scheme for generating the target graphic code. In this way, the decoding server can accurately and reliably determine the standard code scheme corresponding to the to-be-parsed code value.

[0044] In an embodiment, any code scheme can comply with a code standard defined based on a code protocol, such as an identification of a code standard that the code scheme can comply with can be recorded in the code scheme. For example, any code scheme can be a set of identifications, such as ID, name, etc., of code types, code standards, and code scripts. The code standard has a corresponding code script, i.e., an encoding script and a decoding script, the encoding script is used to generate a graphical code corresponding to the any code scheme according to the code standard, and the decoding script is used to parse the code value scanned from the corresponding graphical code according to the code standard. Through the code script, automatic and batch coding and decoding processes can be realized, thereby greatly improving the coding and decoding efficiency.

[0045] Step 204, querying the extended code scheme bound to the standard code scheme in the decoding server; wherein the standard code scheme defines a standard field, and the extended code scheme defines an extended field different from the standard field.

[0046] In an embodiment, the extended code scheme can define an extended field different from the standard field, so that the decoding server can obtain the corresponding extended data from the corresponding data maintainer after determining the extended field defined by the extended code scheme. For example, the extended code scheme defines an extended field D, and the extended field D can be used to represent the "medical insurance balance situation" of the code holder. After the decoding server calls the extended code scheme, it can obtain the medical insurance balance of the code holder based on the extended field D, which is 2300 yuan. It is not difficult to find that in the related art, the code scanning terminal can only obtain the corresponding standard data (such as the name, age, and ID number mentioned above) after scanning the old person code of the user, and after the standard code scheme is bound to the extended code scheme, the corresponding extended data (such as the medical insurance balance of the old person) can be obtained in addition to the above standard data, and the standard code scheme does not need to be rewritten. For another example, the extended code scheme can define an extended field E, and the extended field E can be used to represent "geographic location information". Then the decoding server can obtain the geographic location data corresponding to the extended field E, such as "Beijing", through the data maintainer, so that the code scanning terminal can obtain the corresponding extended data (the geographic location is Beijing), which is equivalent to realizing the function of the place code with the old person code. By binding the standard code scheme to the extended code scheme, the user's data acquisition demand in different scenarios can be met without generating a new code scheme, which helps to improve the development efficiency.

[0047] In some cases, the scheme for encoding and decoding can be collectively referred to as a code scheme. Specifically, when the code scheme is used for encoding, a corresponding graphical code can be generated, and when the code scheme is used for decoding, the code value obtained by scanning the graphical code can be decoded. At this time, it can be considered that the code scheme used to generate a certain graphical code is also used to decode the code value of the graphical code, or the code scheme used to decode the code value of a certain graphical code is also used to generate the graphical code. In other cases, the code scheme can also be specifically divided, such as a code scheme for encoding, a code scheme for decoding, and a code scheme that takes into account both encoding and decoding. Of course, even if the code scheme 1 for encoding and the code scheme 2 for decoding are independent of each other, the code scheme 1 and the code scheme 2 can correspond to the same graphical code or its code value, so it can be considered that there is a corresponding association between the code scheme used to generate a certain graphical code and the code scheme used to decode its code value. The association can be that the code scheme for encoding and the code scheme for decoding are the same code scheme, or the code scheme for encoding and the code scheme for decoding correspond to the same graphical code or its code value.

[0048] In the technical solutions of the present specification, since the field expansion requirement is met by expanding the code scheme, the standard code scheme used to parse the to-be-parsed code value will not change due to the field expansion requirement, so the increase, decrease, etc. of the extended code scheme will not affect the standard code scheme itself, so that the graphical code generated by the standard code scheme at any time is always valid and will not be invalid due to the increase or change of the extended code scheme, which has very high compatibility.

[0049] In the technical solutions of the present specification, the standard code scheme and the extended code scheme can be developed and maintained by ISVs (Independent Software Vendors). Alternatively, the ISVs can be used only for developing and maintaining part of the code schemes, such as the extended code scheme. Different ISVs can maintain different extended code schemes. Of course, the present specification does not limit the subject of developing and maintaining these code schemes. Taking the ISVs as an example, there can be a field extension requirement based on the standard code scheme, and there can be a further extension requirement for the existing field extension requirement. For example, the existing old person code scheme only defines three standard fields (name, age, and ID number), and an ISV maintains user vaccination information. The ISV wants to add extended data (such as the vaccination information of the old person) based on the above-mentioned old person code, so that the scanning terminal can obtain the extended data after scanning. Therefore, the ISV has a field extension requirement based on the standard code scheme; for another example, the ISV also maintains user medical insurance balance data, and after adding the above-mentioned extended field (vaccination information of the old person), the ISV also wants to add a field corresponding to the medical insurance balance of the code holder, so that the ISV has a further extension requirement for the existing field extension requirement.

[0050] As described above, the extended code scheme described in the present specification can be created and provided by an ISV (extended code scheme provider). Correspondingly, the decoding server can receive a binding request initiated by the extended code scheme provider for any standard code scheme, the binding request being used to indicate that at least one extended code scheme is bound to the any standard code scheme; and in response to the binding request, the at least one extended code scheme is bound to the any standard code scheme; taking the above-mentioned old person code as an example, when the extended data (such as the vaccination information of the old person) needs to be obtained, the corresponding extended code scheme can be developed by a third party that maintains the vaccination information of the old person. After the ISV develops it, the corresponding binding request can be sent to the decoding server, so as to be bound to the corresponding standard code scheme, such as the extended code scheme developed by the third party that maintains the vaccination information of the old person being bound to the code scheme corresponding to the old person code, so that the scanning terminal can not only obtain the standard data (such as the name, age, etc. of the holder of the old person code), but also obtain the extended data (such as the vaccination information of the holder of the old person code).

[0051] The ISV can unbind the extension code scheme that has been bound to the standard code scheme previously. Correspondingly, the decoding server receives an unbinding request initiated by the extension code scheme provider for the bound standard code scheme, the unbinding request being used to indicate unbinding of one or more extension code schemes that have been bound to the standard code scheme; and, in response to the unbinding request, unbinds the one or more extension code schemes from the standard code scheme; still taking the old person code as an example, in the case where the old person code scheme is bound to an extension code scheme, the ISV can initiate a corresponding unbinding request, so as to unbind the old person code scheme from the extension code scheme.

[0052] The ISV can rebind the extension code scheme that has been bound to the standard code scheme previously. Correspondingly, the decoding server receives a rebind request initiated by the extension code scheme provider for any standard code scheme, the rebind request being used to indicate unbinding of one or more extension code schemes that have been bound to the any standard code scheme, and binding at least one extension code scheme to the any standard code scheme; and, in response to the rebind request, unbinds the one or more extension code schemes from the any standard code scheme, and binds the at least one extension code scheme to the any standard code scheme. It is not difficult to understand that the rebind request can make the decoding server unbind the original bound extension code scheme, and bind the corresponding extension code scheme, so that the unbind request and the bind request can be sent separately to replace the above-mentioned rebind request. For example, the ISV binds the extension code scheme A to the standard code scheme, the extension field defined by the extension code scheme A can make the decoding server return the vaccination status of the old person, and then the ISV can send a rebind request to the decoding server, so that the decoding server can unbind the extension code scheme A from the old person code scheme, and bind the extension code scheme B to the old person code scheme, the extension field defined by the extension code scheme B can make the decoding server return the medical insurance balance of the corresponding user.

[0053] It should be noted that in the technical solutions of the present specification, any one or more of the above-mentioned binding, unbinding, and rebind schemes can be supported simultaneously, such as supporting only one of the schemes, or supporting two of the schemes simultaneously, or supporting all three of the schemes, and the present specification does not limit this.

[0054] As described above, the extended code scheme can be developed by the ISV and embedded with corresponding decoding logic. In order to ensure that the extended code scheme provided by the ISV meets the unified specification and requirements, and to avoid errors or exceptions in the subsequent business application process, the decoding server can provide a standard sample to the extended code scheme provider, which defines the creation rules for the extended code scheme, so that the extended code scheme provider generates a corresponding extended code scheme that meets the creation rules based on the standard sample. By providing a unified engineering sample to the ISV, the ISV can strictly embed decoding logic according to the creation rules specified in the engineering sample, ensuring that the final extended code scheme meets the specifications and ensures normal operation of the service. Of course, in order to further ensure the smooth binding and calling of the extended code scheme, the decoding server can also audit at least one extended code scheme provided by the ISV; in the case of passing the audit, the at least one extended code scheme is bound to the any standard code scheme. Based on the above feasibility verification, the normal operation of the service can be effectively ensured.

[0055] The extended code scheme described in the specification can be bound to the standard code scheme in the form of a data packet. For example, the data packet used to implement the extended code scheme can be an SPI (Service Provider Interface) packet. The SPI mechanism is a service provider discovery mechanism that can be used to enable framework extension and replace components, and is provided by a third party to implement specific methods and configuration files. In Java, binding an SPI packet can be considered as loading a corresponding Jar packet, and for Jar packets, there is a problem of Jar packet conflict, which can be divided into two categories. The first category is that the same Jar packet dependent on the application has multiple different versions, and the wrong version is selected, resulting in that the JVM (Java Virtual Machine) cannot load the required class or loads the wrong version of the class. The second category is that the same class (the fully qualified name of the class is exactly the same) appears in multiple different dependent Jar packets, that is, the class has multiple versions, and due to the loading order of the Jar packet, the JVM loads the wrong version of the class. Therefore, in order to solve the above problems of Jar packet and class conflict, the maven-shade plug-in can be called to ensure that the name of each Jar packet and class is unique by renaming, effectively avoiding the above problems of Jar packet and class conflict.

[0056] In order to better illustrate the SPI packet binding process, please refer to Figure 3 , Figure 3 is a flowchart of an SPI packet binding provided by an exemplary embodiment of the specification, which can include the following steps:

[0057] Step 302, propose decoding extension information appeal.

[0058] The decoding extension information can be proposed by an extension data provider, or can be proposed by an official organization such as a citizen code issuer, and the present specification does not limit this.

[0059] Step 304, the decoding server solves the Jar package and class conflicts by using the Maven-shade plug-in.

[0060] As described above, in Java, there are two main types of Jar package conflicts, and in order to solve this problem, the maven-shade plug-in can be called to ensure that the name of each Jar package and class is unique, thereby avoiding the above-mentioned Jar package conflict problem.

[0061] Step 306, the decoding server provides project examples.

[0062] The decoding server can provide corresponding project examples to the ISV, and the project examples can define the filling rules for the extension data package, so that the ISV generates a corresponding SPI package that meets the filling rules based on the standard example. By providing uniform project examples to the ISV, the ISV can strictly embed the decoding logic according to the filling rules specified in the project example, ensuring that the final decoding server obtains a SPI package that meets the requirements.

[0063] Step 308, decode the extension SPI access specification.

[0064] Step 310, the ISV provides a decoding extension SPI package.

[0065] The ISV can generate a corresponding SPI package based on the project example provided by the decoding server, and provide the SPI package to the decoding server.

[0066] Step 312, the decoding server performs feasibility verification.

[0067] The decoding server can audit the extension data package to verify the feasibility, and dynamically load the corresponding SPI package in the JVM if the audit is passed.

[0068] Step 314, the decoding server dynamically loads the SPI package.

[0069] Step 316, the decoding server dynamically binds the SPI package.

[0070] The binding of the SPI package described in the specification can be dynamic. For example, assuming that the old code needs to obtain corresponding extended data about the vaccination situation, the old code can bind the SPI package developed by the extended data provider maintaining the vaccination situation; assuming that the health code needs to obtain corresponding extended data about the vaccination situation, the health code can bind the SPI package developed by the extended data provider maintaining the vaccination situation, that is, the same SPI package can be dynamically bound to multiple different code schemes. Of course, for the same code scheme, it can also bind multiple SPI packages.

[0071] Step 206, parsing the to-be-parsed code value using the standard code scheme to obtain standard data corresponding to the standard field, and calling the extended code scheme to obtain extended data corresponding to the extended field; wherein the parsing result of the to-be-parsed code value includes the standard data and the extended data.

[0072] After parsing the to-be-parsed code value through the standard code scheme, the corresponding standard data can be obtained. Taking the old code as an example as described above: after parsing through the standard code scheme, the name, age and ID number corresponding to the holder of the old code can be obtained. At the same time, because the standard code scheme corresponding to the old code is bound with an SPI package, the SPI package can be called to obtain the corresponding extended data, such as the vaccination situation corresponding to the holder of the old code, so that the decoding server can return the parsing result containing the information of name, age, ID number and vaccination situation to the code scanning terminal.

[0073] In order to better understand the decoding extension described in the specification, the following will be described in detail in combination with the accompanying drawings. Figure 4 Figure 4 is a flowchart of a decoding request processing provided by an exemplary embodiment of the specification, which can include the following steps:

[0074] Step 402, the code scanning terminal initiates a decoding request.

[0075] After scanning the corresponding target graphical code, the code scanning terminal can initiate a decoding request to the corresponding decoding server. Correspondingly, the decoding request can contain a to-be-parsed code value and a code scheme identifier, so that the decoding server can determine the corresponding standard code scheme after receiving the to-be-parsed code value and the code scheme identifier.

[0076] Step 404, the decoding server performs standard decoding.

[0077] After determining the corresponding standard code scheme, the decoding server can use the standard code scheme to perform standard decoding on the to-be-parsed code value, so as to obtain standard data (BaseData).

[0078] ​Step 406, the decoding server decodes the extension SPI packet call.

[0079] The decoding server can query the SPI packet bound for a determined standard code scheme, thereby calling the SPI packet to obtain corresponding extension data.

[0080] Step 408, the decoding server returns the standard data (BaseData) and the extension data (ExtData).

[0081] Step 410, application layer service assembly.

[0082] After obtaining the standard data and the extension data, the decoding server can return them to the application layer for data concatenation, thereby enabling the user to obtain the concatenated standard data and extension data.

[0083] After the SPI package is bound to the corresponding code scheme, there can be a need to modify the corresponding binding for the update of user needs, so as to adjust the SPI package. Therefore, in an embodiment, the decoding server can respond to an extension data update request for an extended code scheme bound to any code scheme, unbind the original extension code scheme corresponding to the standard code scheme indicated by the extension data update request, and bind the extension code scheme contained in the extension data update request to the standard code scheme if the extension code scheme passes the audit. For example, taking the SPI package as an example, the code scheme A is originally bound to the SPI-A package, so that the extension data such as the vaccination status of the old code holder can be fed back to the user. However, it is now needed to feed back the medical insurance balance status of the code holder, so the decoding server can be sent a corresponding extension data update request at this time. The request can indicate that the SPI-A package corresponding to the code scheme A is unbound, and the SPI-B package contained in the extension data update request is bound to the code scheme A if the SPI-B package passes the audit, so as to feed back the medical insurance balance status of the old code holder, and realize the update of the extension data. Alternatively, the decoding server can respond to an unbinding request for an extension data package bound to any code scheme, and unbind the original extension data package corresponding to the code scheme indicated by the unbinding request. For example, the code scheme A is bound to the SPI-A package, and the decoding server receives an unbinding request indicating that the SPI-A package bound to the code scheme A is unbound, so the decoding server can unbind the SPI-A package bound to the code scheme A. Alternatively, the decoding server responds to an increase binding request for any code scheme that has bound an extension data package, audits the extension data package contained in the increase binding request, and binds the extension data package to the code scheme indicated by the increase binding request if the extension data package passes the audit. That is, the same code scheme can be bound to multiple SPI packages, so as to feed back multiple extension data, and realize the diversity of the extension data. For example, the code scheme A corresponding to the old code is originally bound to the SPI-A package, so as to feed back the vaccination status of the code holder to the code scanning terminal. Then, the decoding server can bind the SPI-B package on this basis in response to an increase binding request, and the extension field corresponding to the SPI-B package is used to represent the corresponding geographical location information. Therefore, based on the above bound two SPI packages, the same graphic code (such as the above old code) can return the above two extension data (vaccination status and geographical location), and the geographical location information can actually correspond to the function of the place code. Not only can the old code obtain additional extension data (vaccination status) on the basis of the original old code, but also can obtain the corresponding geographical location information, which is equivalent to realizing the combination of the old code and the place code.

[0084] As described previously, each applet or code scanning app, etc. can serve as a code scanning approach for users to scan codes by running the corresponding applet or code scanning app, etc. on the device. In the related art, different code scanning approaches can correspond to different decoding servers respectively, and different code schemes are deployed on these decoding servers respectively, so that when users face a graphic code, they need to select the appropriate code scanning approach to scan the code, so as to ensure that the code value obtained by scanning the code can be decoded by the appropriate code scheme after being uploaded to the corresponding decoding server, otherwise it may face the situation of incorrect decoding. For example, the code scanning machine on the bus will upload the code value obtained after scanning the graphic code to the corresponding decoding server, and if the decoding server only has the standard code scheme corresponding to the bus code, it can only parse the code value corresponding to the bus code, and cannot parse the code value of other types of graphic codes. Therefore, passengers can only show the bus code to the code scanning machine to complete online payment and take the bus smoothly, and if they show other types of graphic codes, they cannot take the bus smoothly. For another example, for the graphic code published by a specific type of applet, only the decoding server corresponding to the applet maintains the corresponding standard code scheme, and other applets or any type of code scanning program corresponding to the decoding server does not maintain the standard code scheme, so that if users want to scan the graphic code to access the service page through the mobile phone, they can only use the applet running in the mobile phone to scan, and cannot use other types of code scanning programs to scan or scan the code, and cannot jump to the expected service page due to the failure of the corresponding decoding server to correctly decode (because the decoding server does not maintain the corresponding standard code scheme). In some cases, different code scanning approaches can also correspond to the same decoding server, so that the decoding server correspondingly maintains multiple code schemes, but these code schemes are isolated from each other and are only used for the corresponding code scanning approach. Specifically, if code scanning is performed based on a code scanning approach A, the code value obtained is uploaded to the decoding server, and the decoding server only decodes through the code scheme corresponding to the code scanning approach A. Then, if the user uses the wrong code scanning approach, the decoding server will still fail to decode.

[0085] In view of this, the present specification proposes deploying multiple code schemes at the decoding server end and establishing a binding relationship between the code schemes. Take a certain code scheme as a standard code scheme, then the standard code scheme can bind the associated code scheme. For the target graphical code generated based on the associated code scheme, even if the target graphical code is scanned by a scanning program corresponding to the standard code scheme and the code value is uploaded to the decoding server, the decoding server can also use the associated code scheme to parse the scanned code value, thereby avoiding decoding failure caused by only using the standard code scheme. For example, if code scheme B is bound to code scheme A, for the graphical code S generated based on code scheme B, the scanning terminal scans the graphical code S through the scanning path corresponding to code scheme A to obtain a code value to be parsed. At this time, code scheme A can be determined as the standard code scheme according to the scanning path, and code scheme B can be determined as the corresponding associated code scheme, so that code scheme B can be used to parse the code value to be parsed, thereby realizing the uniform decoding effect of the standard code scheme and the associated code scheme. For example, in the scene of binding the old code scheme to the bus code scheme, the passenger shows his "old code" to the scanning machine on the bus through his own mobile phone. The bus code scheme can be determined as the standard code scheme, and the associated old code scheme can be determined as the corresponding associated code scheme. At this time, the old code scheme can be used to decode the code value to be parsed, so that the passenger can successfully scan and take the bus. As can be seen, by using the above method, the passenger can not only use the bus code to scan and take the bus, but also use the old code to scan and take the bus, thereby realizing the "multi-code fusion" scanning effect, significantly improving the flexibility and convenience in the use of graphical codes, and helping to improve the use efficiency of graphical codes.

[0086] On the basis of the above-mentioned "multi-code fusion", the relevant technologies of the extended code scheme described in the foregoing embodiments can be combined. For example, the associated code scheme can also have field extension requirements, so that the associated code scheme can be bound to the corresponding associated extended code scheme, which corresponds to the above-mentioned field extension requirements. Then, while decoding using the associated code scheme, the corresponding associated extended data can also be obtained by invoking the associated extended code scheme. That is, after the decoding server determines the standard code scheme, because the standard code scheme is bound to the associated code scheme, the decoding server can further query the associated extended code scheme bound by the associated code scheme; wherein the associated code scheme defines an associated standard field, and the associated extended code scheme defines an associated extended field that is different from the associated standard field; the decoding server can parse the to-be-parsed code value using the associated code scheme to obtain the corresponding associated standard data corresponding to the associated standard field, and invoke the associated extended data packet to obtain the associated extended data corresponding to the associated extended field; wherein the parsing result of the to-be-parsed code value includes the associated standard data and the associated extended data, for example, the associated extended field corresponding to the associated extended code scheme can represent the vaccination situation, geographical location information, and the like as described above.

[0087] In an embodiment, after determining the standard code scheme corresponding to the target code scanning path, the decoding server can directly parse the to-be-parsed code value through the standard code scheme, wherein the parsing process here essentially belongs to the process of "attempting to parse", so this time of parsing can be successful or failed. If the to-be-parsed code value is successfully parsed through the standard code scheme, it means that the target graphical code is indeed generated according to the standard code scheme, so there is no need to parse the standard code scheme using the associated code scheme, and the preset service for the code scanning terminal can be started to be triggered. On the contrary, if the to-be-parsed code value fails to be parsed through the standard code scheme, the associated code scheme bound to the standard code scheme can be determined from the plurality of code schemes deployed, and the to-be-parsed code value can be further parsed using the associated code scheme.

[0088] In another embodiment, after determining the standard code scheme corresponding to the target code scanning path, the decoding server can also determine the associated code scheme bound to the standard code scheme among the multiple code schemes deployed. If the associated code scheme is not determined (e.g., the standard code scheme does not have an associated code scheme, or the determination process fails, etc.), the decoding server can directly parse the to-be-parsed code value through the standard code scheme. Conversely, if the associated code scheme is determined, the to-be-parsed code value can be parsed using the associated code scheme. Similarly, the parsing process here is essentially a "try to parse" process, so this parsing may also succeed or fail. If the to-be-parsed code value is successfully parsed through the associated code scheme, it means that the target graphical code is generated according to the associated code scheme, and there is no need to parse the to-be-parsed code value using the standard code scheme. Conversely, if the to-be-parsed code value fails to be parsed through the associated code scheme, the to-be-parsed code value can be parsed through the standard code scheme. In this way, various cases of parsing success and failure can be taken into account, so as to be applicable to more business scenarios.

[0089] As can be seen from the above embodiments, in the case where the standard code scheme corresponding to the target code scanning path and the associated code scheme bound to the standard code scheme are determined, the decoding server can first (try to) parse the to-be-parsed code value using the standard code scheme, and then (try to) parse the to-be-parsed code value using the associated code scheme in the case of parsing failure. Alternatively, the decoding server can first parse the to-be-parsed code value using the associated code scheme, and then parse the to-be-parsed code value using the standard code scheme in the case of parsing failure. In other words, the decoding order of the standard code scheme and the associated code scheme is not fixed, and the decoding server can use a suitable decoding order according to the specific application scenario. It can be understood that, for the parsing process of the to-be-parsed code value, the sooner the to-be-parsed code value is tried to be parsed through the code scheme of the published target graphical code, the shorter the parsing time (the time required from starting parsing to successfully parsing) of the code value will be (because the number of times of trying to parse is less), and the shorter the waiting time of the user corresponding to the code scanning terminal will be.

[0090] For example, based on a certain old version code scheme and its corresponding new version code scheme, an old graphical code and a new graphical code can be respectively issued. In order to realize the compatibility of the new version code scheme to the old version code scheme in the decoding process, the new version code scheme can be bound to the old version code scheme as an associated code scheme of the old version code scheme. In the early stage of the issuance of the new graphical code, compared with the old graphical code, the new graphical code can have a smaller distribution area and a smaller number of code scanning people. Therefore, in all code values to be parsed obtained by the decoding server through the target code scanning approach, the number of code values of the new graphical code (hereinafter referred to as new code values) is usually less than the number of code values of the old graphical code (hereinafter referred to as old code values). With the gradual increase of the distribution area of the new graphical code and the gradual increase of the number of code scanning people, in the later stage of the issuance of the new graphical code, the number of new code values obtained by the decoding server through the target code scanning approach is usually gradually close to or even more than the number of old code values.

[0091] Based on this rule, the following strategy can be used for parsing: in the early stage of the issuance of the new graphical code, the standard code scheme can be used for parsing first (in the case of parsing failure, the associated code scheme can be used for parsing); and in the middle or later stage of the issuance of the new graphical code, the associated code scheme can be used for parsing first (in the case of parsing failure, the standard code scheme can be used for parsing). In this way, for a large number of code values to be parsed including new code values and old code values, the proportion of code values that are successfully parsed for the first time can be improved. Since the parsing time of these code values to be parsed is usually short, the average parsing efficiency of the decoding server for the large number of code values to be parsed can be shortened, the decoding compatibility is realized, and the decoding efficiency is improved.

[0092] Among them, for each code value to be parsed taking the old version code scheme as the standard code scheme, the decoding server can count the proportion of code values that are successfully parsed for the first time, and adjust the above strategy according to the proportion. For example, in the case of using the parsing strategy of “first using the standard code scheme for parsing (in the case of parsing failure, using the associated code scheme for parsing)”, if the above proportion is gradually reduced from 100% to equal to or less than 50% (indicating that the number of new graphical codes scanned at this time is equal to or more than the number of old graphical codes), the parsing strategy can be adjusted to “first using the associated code scheme for parsing (in the case of parsing failure, using the standard code scheme for parsing)”, so as to keep the code values that are successfully parsed for the first time as the majority.

[0093] For example, assume that the code scanning device is a code scanning device on a bus, the standard code scheme is a bus code scheme, and the associated code scheme is an old person code scheme. In this scenario, the decoding server determines the standard code scheme according to the target route, which is the bus code scheme. If the bus route passes through many residential areas for the elderly, the number of old person code values is usually greater than the number of bus code values in all the code values received by the decoding server through the target code scanning route. Therefore, the decoding server can first use the associated code scheme to analyze the code values (in the case of a failed analysis, the decoding server can then use the standard code scheme to analyze the code values). Alternatively, if the bus route passes through many office areas (where young people are the majority), the number of bus code values is usually greater than the number of old person code values in all the code values received by the decoding server through the target code scanning route. Therefore, the decoding server can first use the standard code scheme to analyze the code values (in the case of a failed analysis, the decoding server can then use the associated code scheme to analyze the code values). In this way, the first analysis of the graphical code can be successful in most cases, thereby minimizing the waiting time of most passengers after code scanning.

[0094] Further, for each code value to be analyzed using the bus code scheme as the standard code scheme, the decoding server can determine the proportion of code values that are successfully analyzed for the first time, and adjust the above strategy according to the proportion. For example, for a bus with a large proportion of code values that are successfully analyzed for the first time using the old person code scheme (e.g., a bus that passes through many residential areas for the elderly), the decoding server can use the strategy of first using the associated code scheme to analyze the code values (in the case of a failed analysis, the decoding server can then use the standard code scheme to analyze the code values). For a bus with a large proportion of code values that are successfully analyzed for the first time using the bus code scheme (e.g., a bus that passes through many office areas), the decoding server can use the strategy of first using the standard code scheme to analyze the code values (in the case of a failed analysis, the decoding server can then use the associated code scheme to analyze the code values). In this way, different buses on different routes can use different analysis strategies, thereby minimizing the overall analysis time for all code values uploaded by each bus and reducing the average waiting time of passengers after code scanning.

[0095] In practice, the above scheme is based on the complete route of a bus. In some other embodiments, the decoding server can also perform the above statistics on code values uploaded by each bus stop and code values uploaded by any bus stop at different time periods, thereby adjusting the analysis strategy for corresponding code values in smaller dimensions such as bus stops and time, to more effectively shorten the waiting time of each passenger after code scanning and further improve the code scanning experience of users.

[0096] At present, a code scanning terminal can jump to a page by scanning a graphic code. For example, different users can jump to the page associated with the same two-dimensional code after scanning the same two-dimensional code using different mobile phones. In this way, each page needs to be associated with a different graphic code, and thus a large number of graphic codes need to be generated. In the case of a large number of pages or small differences between different pages, the management burden of the graphic codes can be too heavy and resources can be wasted, which is not conducive to efficient use of the graphic codes.

[0097] In response to a page jump request triggered by a code scanning event in which a code scanning terminal scans a target graphic code, the decoding server can obtain code scanning related data corresponding to the code scanning event. The target graphic code corresponds to a plurality of pages, and each page is respectively created with a corresponding page matching rule. The decoding server can query a target page matching rule that matches the code scanning related data in each page matching rule, and trigger the code scanning terminal to display a target page corresponding to the target page matching rule. It can be understood that the code scanning related data corresponding to different code scanning events (such as user identity, type of code scanning terminal, location of target graphic code, time of scanning, etc.) are usually not exactly the same. Therefore, for different code scanning events, the solution can trigger the code scanning terminal to display different pages according to different code scanning related data: for example, different users can jump to different pages by scanning the same graphic code using different code scanning terminals, and the same user can jump to different pages by scanning two-dimensional codes located in different positions at different times using the same code scanning terminal. It can be seen that, compared with the related technology in which different code scanning terminals scanning the same graphic code jump to the same page, the code scanning terminal in the solution can present a “one code, thousands of faces” page jump effect when scanning a graphic code. It can be understood that the plurality of pages in the solution can be associated with the same graphic code (i.e., the target graphic code), thereby realizing the reuse of the plurality of pages for the same graphic code, saving graphic code resources, reducing the management burden of the graphic codes, and improving the use efficiency of the graphic code. That is, the method described in the specification can further include the following steps (as shown in Figure 5

[0098] In response to a page jump request triggered by a code scanning event in which a code scanning terminal scans a target graphic code, the decoding server can obtain code scanning related data corresponding to the code scanning event. The target graphic code corresponds to a plurality of pages, and each page is respectively created with a corresponding page matching rule.

[0099] ​The decoding server in the embodiments of the present specification can be used to manage and maintain a graphic code, and specifically, a plurality of pages can be configured (i.e., bound) to any graphic code. In an embodiment, a manager of any graphic code (e.g., a publisher of the graphic code or an administrator of a code management platform to which the graphic code belongs, etc.) can access the decoding server through a code management terminal to manage (create, associate, adjust a working state, etc.) the graphic code maintained by the decoding server. Thus, the manager can initiate code identification information of any graphic code and page identification information of each page in the plurality of pages to the decoding server through the code management terminal. The code identification information is used to uniquely identify the any graphic code, which can be a code value of the graphic code or a preset (globally unique) code number, etc. The page identification information of any page is used to uniquely identify the any page, which can be an access address of the page, such as a complete URL (Uniform Resource Locator, Uniform Resource Locator) or a short chain generated based on the complete URL, etc.

[0100] The manager of any graphic code can configure a plurality of pages to be bound to the graphic code in the page configuration interface. For example, for any page in the plurality of pages, the address information of the page can be configured in the page configuration interface, and in addition, the type (mini-program page, H5 page, etc.) and / or source (to which application program the page belongs, etc.) of the page and other basic information can also be configured. Based on the above basic information configured for any page, the decoding server can obtain the page identification information of the page, so as to accurately know which page should be bound to the any graphic code. In addition, any page bound to any graphic code can be temporarily created in the decoding server by the manager of the graphic code, or can also be created in advance by the decoding server or other platforms, and the present specification does not limit this.

[0101] Based on the obtained code identifier information and page identifier information, the decoding server can configure multiple pages for any one of the graphic codes in various ways (i.e., bind the multiple pages to the any one of the graphic codes). For example, a mapping relationship can be established between the code identifier information and each page identifier information, and thereafter the mapping relationship can be queried to determine which pages are configured for the any one of the graphic codes. For another example, each page identifier information can be recorded as related information of the any one of the graphic codes, and thereafter the related information can be read to determine which pages are configured for the any one of the graphic codes. It can be understood that after the above binding is completed, each page that is bound becomes an associated page of the any one of the graphic codes, and after a scan code event is generated by scanning the graphic code, the scan code terminal can jump to a certain one of the multiple pages. Of course, which page to jump to needs to be determined by the decoding server according to a matching relationship between scan code related data corresponding to the scan code event and page matching rules corresponding to each page.

[0102] It should be noted that any one of the graphic codes can be bound with multiple pages, and any one of the pages can be bound to one or more graphic codes. The specific binding relationship between the graphic codes and the pages can be reasonably set according to the application scenarios such as page content, number of graphic codes, display position of the graphic codes, and the like, and the present specification does not limit this. In addition, for any one of the graphic codes maintained by the decoding server, it can be bound (or configured) with multiple pages in the above manner, or it can be bound with only one page, or it can not be bound with any page. Therefore, the multiple graphic codes maintained by the decoding server can be all bound with multiple pages, or only some of them can be bound with multiple pages. The target graphic code described in the present specification is any one of the graphic codes configured with multiple pages.

[0103] In addition, the multiple pages bound by any one of the graphic codes are respectively created with corresponding page matching rules. For example, the administrator of the any one of the graphic codes can create corresponding page matching rules for each page bound to the graphic code in the rule configuration interface corresponding to the graphic code. It should be noted that the page matching rules of the multiple pages are mutually exclusive, that is, for the page matching rules corresponding to any two pages of the multiple pages, the scan code related data corresponding to the scan code event obtained by the decoding server matches at most one of the two rules, and does not match both of the two rules at the same time. It can be seen that for the multiple page matching rules corresponding to the multiple pages, at most only one of the page matching rules matches all the scan code related data corresponding to the scan code event, and multiple rules do not match the scan code related data at the same time, so as to ensure that the decoding server can accurately trigger the scan code terminal to display a certain determined page (i.e., the target page), thereby avoiding confusion of the scan code terminal in displaying the pages.

[0104] In an embodiment, a default page can also be configured for any graphic code in response to a target graphic code or a page configuration instruction issued by an administrator of the decoding server. The page can not be configured with a corresponding page matching rule, so that in the case that the page matching rule of each of the foregoing pages does not match the scan code related data corresponding to the scan code event, the scan code terminal can be triggered to jump to the default page without displaying an error message, thereby improving the user experience. It can be understood that the default page is different from each of the foregoing pages. The content displayed on the default page can be determined according to the application scenario of the present scheme. For example, the page can be a function home page, a login page, a recommended information display page, and the like, which will not be described in detail.

[0105] In an embodiment, after the page matching rule corresponding to any page is configured, it can also be updated appropriately. For example, a rule update instruction for any page can be initiated to the decoding server. Correspondingly, the decoding server can update the page matching rule corresponding to the any page in response to the instruction. At least one data feature recorded in the any page matching rule can be updated, such as adding, modifying and / or deleting at least one data feature. For example, the type of the scan code terminal can be updated from "mobile phone" to "mobile phone or tablet computer", and the age of the user can be updated from "18-50 years old" to "18-35 years old". The data feature of "place type" can also be deleted or the data feature of "model" of the scan code terminal can be added, and the like, which will not be described in detail.

[0106] It can be understood that the page matching rule created for any page is used to match the scan code related data corresponding to the scan code event in the subsequent steps. Specifically, for any page, the corresponding scan code related data can be acquired according to the data features recorded in the page matching rule of the page, and then the acquired (actual) scan code related data is compared with the data features recorded in the page matching rule one by one to determine whether each scan code related data matches the rule.

[0107] In an embodiment, the decoding server can acquire a plurality of scan code related data corresponding to the scan code event, and the plurality of scan code related data can belong to at least one data dimension. In the case that the plurality of scan code related data belongs to a plurality of data dimensions, any scan code related data belongs to one data dimension, and there can be one or more scan code related data under any data dimension. For example, the at least one data dimension can include at least one of the foregoing terminal, person, place and time. Of course, there can also be other data dimensions, which will not be described one by one.

[0108] Step 504: Query the target page matching rule that matches the scan-related data in each of the page matching rules, and trigger the scanning terminal to display the target page corresponding to the target page matching rule.

[0109] After acquiring the QR code-related data, the decoding server can compare the data with the data features recorded in each page matching rule to determine the target page matching rule that matches the QR code-related data. Specifically, if multiple data features are recorded in any page matching rule, and all data features match the corresponding QR code-related data, then the page matching rule is determined to match the QR code-related data, and the rule is identified as the target QR code-related data. The page corresponding to this rule becomes the target page. At this point, the scanning terminal can be triggered to display the page. Alternatively, if at least one data feature does not match the corresponding QR code-related data, then the page matching rule is determined not to match the QR code-related data, and the page corresponding to this rule will not be identified as the target page. Furthermore, the matching degree between each page matching rule and the QR code-related data can be calculated based on the data features contained in the page matching rule, and the page corresponding to the page with the highest matching degree is identified as the target page. This method ensures that the scanning terminal redirects to the page with the highest degree of matching between the scanning data and the scanning event, thereby minimizing the number of times the target page cannot be determined and improving the user experience to some extent.

[0110] In addition, during the process of calculating the matching degree between any page matching rule and the scan-related data, if the page matching rule contains multiple data features, the weight values ​​of each data feature do not have to be completely equal. For example, different weight values ​​can be set for each data feature according to indicators such as importance and timeliness, so as to minimize the probability that the matching degree between two page matching rules and the scan-related data is equal, thereby improving the probability of determining the target page and the accuracy of the target page.

[0111] pass Figure 5 As shown in the embodiment, the scanning terminal in this solution can present a "one code, a thousand faces" page navigation effect when scanning a graphic code. It is understood that multiple pages in this solution can be associated with the same graphic code (i.e., the target graphic code), thereby enabling multiple pages to reuse the same graphic code. This not only saves graphic code resources and helps reduce the management burden of graphic codes, but also improves the efficiency of using the graphic code.

[0112] Based on the above embodiments, by designing the code scheme of the graphic code as the mutually bound standard code scheme and the extended code scheme, the standard code scheme can be used to define the standard field that does not change or has a relatively low change frequency, and the extended code scheme is used to meet the field extension requirement and define the corresponding extended field. Therefore, when the field extension requirement occurs, only the new extended code scheme needs to be generated and bound to the original standard code scheme, without completely generating a new code scheme, which helps to improve the development efficiency, reduce the development cost, and has high flexibility. Correspondingly, in the decoding process, based on the binding relationship between the standard code scheme and the extended code scheme, the data corresponding to the standard field defined by the standard code scheme and the extended field defined by the extended code scheme can be ensured, so as to meet the data requirement in the actual business scenario. At the same time, since the standard code scheme does not change before and after the extension, the graphic code generated by the standard code scheme is always valid and will not be invalid due to the increase or change of the extended code scheme, which has high compatibility.

[0113] Corresponding to the embodiments of the foregoing method, the specification also provides embodiments of an apparatus, an electronic device, and a storage medium.

[0114] Figure 6 FIG. 1 is a schematic structural diagram of an electronic device provided by an example embodiment. Please refer to Figure 6 At the hardware level, the device includes a processor 601, a network interface 602, a memory 603, a non-volatile memory 604, and an internal bus 605, and of course can also include other hardware required by the business. One or more embodiments of the specification can be implemented in a software manner, such as reading the corresponding computer program from the non-volatile memory 604 into the memory 603 by the processor 601 and then running. Of course, in addition to the software implementation, one or more embodiments of the specification do not exclude other implementation manners, such as logic devices 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.

[0115] Figure 7 FIG. 2 is a block diagram of a decoding apparatus of a graphic code provided by an example embodiment. Please refer to Figure 7 The apparatus can be applied to a decoding server, and the apparatus includes:

[0116] An acquisition unit 702 is configured to acquire a to-be-analyzed code value obtained by scanning a target graphic code by a code scanning terminal, and determine a standard code scheme used to analyze the to-be-analyzed code value;

[0117] A query unit 704 is configured to query an extended code scheme bound to the standard code scheme; wherein the standard code scheme defines a standard field, and the extended code scheme defines an extended field different from the standard field.

[0118] The calling unit 706 is configured to parse the to-be-parsed code value by using the standard code scheme to obtain standard data corresponding to the standard field, and call the extended code scheme to obtain extended data corresponding to the extended field; wherein the parsing result of the to-be-parsed code value includes the standard data and the extended data.

[0119] Optionally, the obtaining unit 702 is specifically configured to: receive the code scheme identifier uploaded by the scanning terminal and associated with the to-be-parsed code value, and determine the code scheme represented by the code scheme identifier as the standard code scheme used for parsing the to-be-parsed code value; or,

[0120] In a case where the mapping relationship between the code value and the code scheme is maintained, the code scheme corresponding to the to-be-parsed code value is queried according to the mapping relationship, so as to be used as the standard code scheme for parsing the to-be-parsed code value.

[0121] Optionally, the apparatus further includes:

[0122] The sample providing unit 708 is configured to provide a standard sample to an extended data provider, wherein the standard sample is defined with a creation rule for the extended code scheme, so that the extended code scheme provider generates a corresponding extended code scheme conforming to the creation rule based on the standard sample.

[0123] Optionally, the apparatus further includes:

[0124] The receiving unit 710 is configured to receive a binding request initiated by the extended code scheme provider for any standard code scheme, wherein the binding request is used to indicate that at least one extended code scheme is bound to the any standard code scheme; and in response to the binding request, bind the at least one extended code scheme to the any standard code scheme; and / or

[0125] The receiving unit 710 is configured to receive a binding request initiated by the extended code scheme provider for any standard code scheme, wherein the binding request is used to indicate that at least one extended code scheme is bound to the any standard code scheme; and in response to the binding request, bind the at least one extended code scheme to the any standard code scheme; and / or

[0126] Optionally, the receiving unit 710 is specifically configured to: audit the at least one extended code scheme;

[0127] In a case where the audit is passed, the at least one extended code scheme is bound to the any standard code scheme.

[0128] Optionally, the apparatus further includes:

[0129] The returning unit 712 is configured to return the parsing result to the code scanning terminal.

[0130] Optionally, the apparatus further includes:

[0131] Optionally, the standard code scheme is bound with an associated code scheme; and the apparatus further includes:

[0132] The associated calling unit 714 is configured to query an associated extended code scheme bound with the associated code scheme; wherein the associated code scheme defines an associated standard field, and the associated extended code scheme defines an associated extended field different from the associated standard field; the associated standard data corresponding to the associated standard field is obtained by parsing the code value to be parsed by using the associated code scheme, and the associated extended data corresponding to the associated extended field is obtained by calling the associated extended code scheme; wherein the parsing result of the code value to be parsed includes the associated standard data and the associated extended data.

[0133] Optionally, the associated calling unit 714 is specifically configured to: if the code value to be parsed fails to be parsed by using the standard code scheme, parse the code value to be parsed by using the associated code scheme to obtain the associated standard data.

[0134] Optionally, the apparatus further includes:

[0135] The parsing unit 716 is configured to: if the code value to be parsed fails to be parsed by using the associated code scheme, parse the code value to be parsed by using the standard code scheme.

[0136] Optionally, the apparatus further includes:

[0137] The display unit 718 is configured to: in response to a page jump request triggered by a code scanning event in which a target graphic code is scanned by a code scanning terminal, obtain code scanning related data corresponding to the code scanning event, the target graphic code corresponding to a plurality of pages, and each page being respectively created with a corresponding page matching rule.

[0138] The display unit 718 is configured to: in response to a page jump request triggered by a code scanning event in which a target graphic code is scanned by a code scanning terminal, obtain code scanning related data corresponding to the code scanning event, the target graphic code corresponding to a plurality of pages, and each page being respectively created with a corresponding page matching rule.

[0139] Optionally, the display unit 718 is specifically configured to: obtain a plurality of code scanning related data corresponding to the code scanning event, the plurality of code scanning related data belonging to at least one data dimension.

[0140] For apparatus embodiments, since they basically correspond to the method embodiments, the relevant parts are referred to the part of the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the modules described as separate components can or can not be physically separated, and the components shown as modules can or can not be physical modules, i.e., can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected to achieve the purposes of the present specification according to actual needs. Those skilled in the art can understand and implement without creative effort.

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

[0142] The memory can include non-persistent memory in computer readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), etc. The memory is an example of computer readable media.

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

[0144] It should also be noted that the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed, or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of additional identical elements in the process, method, article or device including the element.

[0145] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The description of the exemplary embodiments is intended to apply to various alternative embodiments as well. It is to be understood that features illustrated or described as part of one embodiment can be provided with one or more of the other embodiments as well. Variations to embodiments can be made and would be obvious to those having the benefit of this disclosure. Accordingly, the attached drawings are to be regarded as illustrative and not restrictive.

[0146] The terminology used in this specification has been chosen as merely representative of certain embodiments and is not intended to limit the specification. As used in this specification and the appended claims, the singular forms "a," "an" and "the" include plural referents unless the content clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0147] It should be understood that although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a particular order or hierarchy. These terms are used merely to distinguish one from another. For example, a first information can be termed a second information, and, similarly, a second information can be termed a first information, without departing from the scope of the present disclosure. As used herein, the term "if' can be interpreted to mean "when" or "upon" or "in response to determining" taking into account the context in which the term is used.

[0148] The foregoing is merely illustrative of the principles of this disclosure and the specification and should not be used to limit the scope of the disclosure. The disclosure is intended to encompass any and all variations that become apparent during prosecution of the claims now claimed or subsequently filed.

Claims

1. A method for decoding a graphic code, the method comprising: Obtain the code value to be parsed obtained by scanning the target graphic code with a barcode scanning terminal, and determine the standard code scheme used to parse the code value to be parsed; The target graphic code is generated using the standard code scheme; Query the extended code scheme bound to the standard code scheme; wherein, the standard code scheme defines a standard field, and the extended code scheme defines an extended field that is different from the standard field; The standard code scheme is used to parse the code value to be parsed to obtain standard data corresponding to the standard field, and the extended code scheme is called to obtain extended data corresponding to the extended field; wherein, the parsing result of the code value to be parsed includes the standard data and the extended data.

2. The method according to claim 1, wherein determining the standard code scheme for parsing the code value to be parsed comprises: The system receives a code scheme identifier uploaded by the scanning terminal that is associated with the code value to be parsed, and determines the code scheme represented by the code scheme identifier as the standard code scheme for parsing the code value to be parsed. or, While maintaining the mapping relationship between code values ​​and code schemes, the code scheme corresponding to the code value to be parsed is queried according to the mapping relationship, so as to serve as the standard code scheme for parsing the code value to be parsed.

3. The method according to claim 1, further comprising: Provide standard samples to expansion code scheme providers, the standard samples defining creation rules for the expansion code schemes, so that the expansion code scheme providers can generate expansion code schemes that conform to the creation rules based on the standard samples.

4. The method according to claim 1, further comprising: Receive a binding request initiated by an extension code scheme provider for any standard code scheme, the binding request being used to indicate binding at least one extension code scheme to the any standard code scheme; And, in response to the binding request, the at least one extension code scheme is bound to any one of the standard code schemes; and / or Receive an unbinding request initiated by the extension code scheme provider for the bound standard code scheme, the unbinding request being used to instruct the unbinding of one or more extension code schemes that are bound to the standard code scheme; In addition, in response to the unbinding request, the one or more extension code schemes are unbound from the standard code scheme.

5. The method according to claim 4, wherein binding at least one extended code scheme to any one of the standard code schemes comprises: The at least one extension code scheme shall be reviewed; If the review is approved, the at least one extension code scheme will be bound to any one of the standard code schemes.

6. The method according to claim 1, further comprising: The parsing result is returned to the scanning terminal.

7. The method according to claim 1, wherein the standard code scheme is bound to an associated code scheme, and the method further includes: Query the associated extended code scheme bound to the associated code scheme; wherein, the associated code scheme defines an associated standard field, and the associated extended code scheme defines an associated extended field that is different from the associated standard field; The association code scheme is used to parse the code value to be parsed to obtain the association standard data corresponding to the association standard field, and the association extension code scheme is called to obtain the association extension data corresponding to the association extension field; wherein, the parsing result of the code value to be parsed includes the association standard data and the association extension data.

8. The method according to claim 7, wherein parsing the code value to be parsed using the association code scheme to obtain the association standard data comprises: If the code value to be parsed fails to be parsed using the standard code scheme, the associated code scheme is used to parse the code value to be parsed to obtain the associated standard data corresponding to the associated standard field. The method further includes: If the associated code scheme fails to parse the code value to be parsed, then the standard code scheme is used to parse the code value to be parsed.

9. The method according to claim 1, further comprising: In response to a page redirection request triggered by a scanning event of a scanning terminal scanning a target graphic code, the scanning-related data corresponding to the scanning event is obtained. The target graphic code corresponds to multiple pages, and each page has a corresponding page matching rule. The system queries the page matching rules to find the target page matching rule that matches the scan-related data, and triggers the scanning terminal to display the target page corresponding to the target page matching rule.

10. The method according to claim 9, wherein obtaining the scan-related data corresponding to the scan event includes: Obtain multiple scan-related data corresponding to the scan event, wherein the multiple scan-related data belong to at least one data dimension.

11. A decoding device for graphic codes, the device comprising: The acquisition unit is used to acquire the code value to be parsed obtained by the scanning terminal scanning the target graphic code, and to determine the standard code scheme used to parse the code value to be parsed. The target graphic code is generated using the standard code scheme; The query unit is used to query the extended code scheme bound to the standard code scheme; wherein the standard code scheme defines a standard field, and the extended code scheme defines an extended field that is different from the standard field; The calling unit is used to parse the code value to be parsed using the standard code scheme to obtain standard data corresponding to the standard field, and to call the extended code scheme to obtain extended data corresponding to the extended field; wherein, the parsing result of the code value to be parsed includes the standard data and the extended data.

12. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method as claimed in any one of claims 1 to 10.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • One-code multi-purpose method and device based on two-dimensional code automatic identification jump

    CN113486265A

  • Decoding method and device based on code engine service component, equipment and storage medium

    CN115150626A

  • Graphic code management method, device and system, computing equipment and storage medium

    CN115170042A