CN112069850B - Method, device, equipment and storage medium for providing service based on QR code - Google Patents

Method, device, equipment and storage medium for providing service based on QR code Download PDF

Info

Publication number
CN112069850B
CN112069850B CN202010919305.8A CN202010919305A CN112069850B CN 112069850 B CN112069850 B CN 112069850B CN 202010919305 A CN202010919305 A CN 202010919305A CN 112069850 B CN112069850 B CN 112069850B
Authority
CN
China
Prior art keywords
secret
dimensional code
terminal
pseudo
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010919305.8A
Other languages
Chinese (zh)
Other versions
CN112069850A (en
Inventor
杨周龙
徐如山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongpu Software Co Ltd
Original Assignee
Dongpu Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongpu Software Co Ltd filed Critical Dongpu Software Co Ltd
Priority to CN202010919305.8A priority Critical patent/CN112069850B/en
Publication of CN112069850A publication Critical patent/CN112069850A/en
Application granted granted Critical
Publication of CN112069850B publication Critical patent/CN112069850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Electromagnetism (AREA)
  • Computer Security & Cryptography (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Hardware Design (AREA)
  • Development Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Storage Device Security (AREA)

Abstract

本发明涉及信息技术领域,公开了一种基于二维码的服务提供方法、装置、设备以及存储介质,用于根据不同账户类型和终端提供不同服务,包括:扫描识别快递面单上的载密二维码,提取其中携带的运单号;识别进行扫描动作的终端是否存在用户唯一标识;若存在,则确定用户唯一标识的账户类型,根据账户类型与服务之间的关联关系和运单号,获取第一服务,并提供给终端;若不存在,则根据终端的设备类型和运单号,从服务器中获取第二服务,并提供给终端。本方法通过将运单号信息隐藏在快递面单中的载密二维码中,使不同用户扫描载密二维码时能得到不同信息,能够根据获得运单号的用户的用户唯一标识和设备类型,提供不同的服务,实现服务多样化。

The present invention relates to the field of information technology, and discloses a service provision method, device, equipment and storage medium based on a QR code, which is used to provide different services according to different account types and terminals, including: scanning and identifying the secret QR code on the express delivery bill, and extracting the waybill number carried therein; identifying whether the terminal performing the scanning action has a user unique identifier; if so, determining the account type of the user unique identifier, and obtaining a first service based on the association between the account type and the service and the waybill number, and providing it to the terminal; if not, obtaining a second service from a server based on the device type and waybill number of the terminal, and providing it to the terminal. This method hides the waybill number information in the secret QR code on the express delivery bill, so that different users can obtain different information when scanning the secret QR code, and can provide different services based on the user unique identifier and device type of the user who obtains the waybill number, thereby realizing service diversification.

Description

Service providing method, device, equipment and storage medium based on two-dimension code
Technical Field
The present invention relates to the field of information technologies, and in particular, to a service providing method, device, equipment and storage medium based on two-dimensional codes.
Background
Along with the increasing rise of online shopping, the logistics industry also rapidly develops, but the current logistics industry adopts bar code express delivery face sheets to ensure continuous data output of the express delivery industry, so that the management is convenient, paper used for the current express delivery face sheets is generally multi-connected carbonless copy paper and the like, the conventional size is 217 x 127, 230 x 140, 240 x 150 and the like, one express delivery face sheet lacks an integrated two-dimensional code capable of facing multiple roles, a user group cannot show information to be checked by the integrated two-dimensional code scanning, and the size of the express delivery face sheet is preset, the space area is limited, and the placement of multiple two-dimensional codes is impractical.
Disclosure of Invention
The application mainly aims to solve the technical problem that information acquired by a single two-dimensional code on the existing express bill cannot provide different services.
The first aspect of the invention provides a service providing method based on two-dimension codes, comprising the following steps:
Scanning and identifying a secret two-dimensional code on an express delivery bill, and extracting a bill number carried in the secret two-dimensional code, wherein the secret two-dimensional code is a two-dimensional code generated by hiding the bill number in original information;
Identifying whether a user unique identifier exists at a terminal where a scanning action is performed;
If yes, determining the account type of the unique identifier of the user, acquiring a first service corresponding to the account type from a server according to the association relation between the preset account type and the service and the waybill number, and providing the first service to the terminal;
If the equipment type does not exist, determining the equipment type of the terminal performing the scanning action, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal.
Optionally, in a first implementation manner of the first aspect of the present invention, before the scanning and identifying the secret two-dimensional code on the express delivery side sheet and extracting the waybill number carried in the secret two-dimensional code, the method further includes:
Acquiring original information, a waybill number and an embedded key;
performing data coding and error correction coding on the original information to obtain a data codeword, and calculating the maximum concealable information quantity of the data codeword;
Encoding the waybill number to obtain a formatted secret sequence, and calculating the hidden information quantity of the secret sequence;
judging whether the hidden information amount is larger than the maximum hidden information amount or not;
if yes, outputting alarm information to prompt that the hidden information quantity is too large;
If not, initializing a preset pseudo-random generator according to the embedded key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence;
According to the embedding position, replacing the original sequence in the data code word with the secret sequence, and adding an ending symbol after the replaced digital code word to obtain the encrypted data;
And generating the secret two-dimensional code according to the secret data.
Optionally, in a second implementation manner of the first aspect of the present invention, the performing data encoding processing and error correction encoding processing on the original information to obtain a data codeword includes:
Selecting the version and the error correction code level of the encrypted two-dimension code to be generated according to the length and the type of the original information;
according to the version, carrying out data coding on the original information to obtain a coded character string;
generating an error correction character string according to the error correction code level and the original information;
and adding the error correction code character string to the code character string to obtain a data codeword.
Optionally, in a third implementation manner of the first aspect of the present invention, the embedded key includes a first key and a second key, initializing a preset pseudo-random generator according to the embedded key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence includes:
Initializing the pseudo-random generator to generate a first pseudo-random sequence according to the first secret key;
Randomly selecting at least one character from the data codeword according to the pseudo-random sequence, and generating a continuous bit stream according to the character;
initializing the pseudo-random generator to generate a second pseudo-random sequence according to the second secret key, and determining the embedding position of the secret sequence on the bit stream according to the second pseudo-random sequence.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the scanning and identifying the secret two-dimensional code on the express delivery side sheet, and extracting the freight note number carried in the secret two-dimensional code includes:
scanning the encrypted two-dimensional code and acquiring the embedded key;
Identifying and analyzing the encrypted two-dimensional code to obtain encrypted data of the encrypted two-dimensional code;
Initializing a preset pseudo-random generator according to the embedded secret key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence;
Acquiring a secret sequence in the secret-carrying data according to the embedded position;
The secret sequence is converted into a bill number.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the determining the account type uniquely identified by the user, according to a preset association relationship between the account type and a service and the waybill number, obtaining a first service corresponding to the account type from a server, and providing the first service to the terminal includes:
Judging the account type of the unique identifier of the user;
If the account type is a sender, inquiring the freight charge of the corresponding express according to the freight bill number, and displaying the freight charge on the corresponding terminal so as to prompt the sender to pay the freight charge;
if the account type is an express delivery person, inquiring order information and logistics information of the corresponding express according to the freight bill number and displaying the order information and the logistics information on the corresponding terminal;
and if the account type is a member user, inquiring and displaying the logistics information of the corresponding express mail according to the waybill number.
Optionally, in a sixth implementation manner of the first aspect of the present invention, determining a device type of the terminal performing the scanning action, according to the device type and the waybill number, acquiring a second service corresponding to the device type from the server, and providing the second service to the terminal includes:
Judging the equipment type of the terminal;
And if the equipment type of the terminal is a pipeline terminal, generating a corresponding scanning record according to the waybill number, and uploading the scanning record.
And if the equipment type of the terminal is a user terminal, inquiring and displaying the logistics information of the corresponding express according to the waybill number.
The second aspect of the present invention provides a service providing apparatus based on a two-dimensional code, including:
The scanning module is used for scanning and identifying the carrying two-dimensional code on the express bill and extracting the freight bill number carried in the carrying two-dimensional code;
The identification module is used for identifying whether a user unique identifier exists in the terminal where the scanning action is performed;
The first service providing module is used for determining the account type of the unique user identifier when the unique user identifier exists in the terminal, acquiring a first service corresponding to the account type from a server according to the association relationship between the preset account type and the service and the waybill number, and providing the first service to the terminal;
And the second service providing module is used for determining the equipment type of the terminal performing the scanning action when the unique user identifier does not exist in the terminal, acquiring the second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal.
Optionally, in a first implementation manner of the second aspect of the present invention, the service providing device based on a two-dimensional code further includes a two-dimensional code generating module, where the two-dimensional code generating module includes:
the acquisition unit is used for acquiring the original information, the waybill number and the embedded secret key;
The information coding unit is used for carrying out data coding processing and error correction coding processing on the original information to obtain data code words and calculating the maximum concealable information quantity of the data code words;
The waybill coding unit is used for coding the waybill number to obtain a formatted secret sequence and calculating the hidden information quantity of the secret sequence;
A judging unit configured to judge whether the hidden information amount is greater than the maximum hidden information amount;
The alarm unit is used for outputting alarm information when the hidden information quantity is larger than the maximum hidden information quantity so as to prompt that the hidden information quantity is overlarge;
the determining unit is used for initializing a preset pseudo-random generator according to the embedded secret key to generate a pseudo-random sequence when the hidden information quantity is not more than the maximum hidden information quantity, and determining an embedded position according to the pseudo-random sequence;
The embedding unit is used for replacing the original sequence in the data code word with the secret sequence according to the embedding position, and adding an ending symbol after the replaced digital code word to obtain the encrypted data;
And the generating unit is used for generating the secret two-dimensional code according to the secret data.
Optionally, in a second implementation manner of the second aspect of the present invention, the information encoding unit is specifically configured to:
Selecting the version and the error correction code level of the encrypted two-dimension code to be generated according to the length and the type of the original information;
according to the version, carrying out data coding on the original information to obtain a coded character string;
generating an error correction character string according to the error correction code level and the original information;
and adding the error correction code character string to the code character string to obtain a data codeword.
Optionally, in a third implementation manner of the second aspect of the present invention, the determining unit is specifically configured to:
Initializing the pseudo-random generator to generate a first pseudo-random sequence according to the first secret key;
Randomly selecting at least one character from the data codeword according to the pseudo-random sequence, and generating a continuous bit stream according to the character;
initializing the pseudo-random generator to generate a second pseudo-random sequence according to the second secret key, and determining the embedding position of the secret sequence on the bit stream according to the second pseudo-random sequence.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the scanning module is specifically configured to:
scanning the encrypted two-dimensional code and acquiring the embedded key;
Identifying and analyzing the encrypted two-dimensional code to obtain encrypted data of the encrypted two-dimensional code;
Initializing a preset pseudo-random generator according to the embedded secret key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence;
Acquiring a secret sequence in the secret-carrying data according to the embedded position;
The secret sequence is converted into a bill number.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the first service module is specifically configured to:
Judging the account type of the unique identifier of the user;
If the account type is a sender, inquiring the freight charge of the corresponding express according to the freight bill number, and displaying the freight charge on the corresponding terminal so as to prompt the sender to pay the freight charge;
if the account type is an express delivery person, inquiring order information and logistics information of the corresponding express according to the freight bill number and displaying the order information and the logistics information on the corresponding terminal;
and if the account type is a member user, inquiring and displaying the logistics information of the corresponding express mail according to the waybill number.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the second service module is specifically configured to:
Judging the equipment type of the terminal;
And if the equipment type of the terminal is a pipeline terminal, generating a corresponding scanning record according to the waybill number, and uploading the scanning record.
And if the equipment type of the terminal is a user terminal, inquiring and displaying the logistics information of the corresponding express according to the waybill number.
A third aspect of the present invention provides a service providing apparatus based on a two-dimensional code, including: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the two-dimensional code-based service providing apparatus to execute the two-dimensional code-based service providing method described above.
A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the above-described two-dimensional code-based service providing method.
According to the technical scheme, the secret two-dimensional code on the express delivery face bill is scanned and identified, and the freight bill number carried in the secret two-dimensional code is extracted; identifying whether a user unique identifier exists at a terminal where a scanning action is performed; if yes, determining the account type of the unique identifier of the user, acquiring a first service corresponding to the account type from a server according to the association relation between the preset account type and the service and the waybill number, and providing the first service to the terminal; if the equipment type does not exist, determining the equipment type of the terminal performing the scanning action, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal. According to the method, the freight bill number information is hidden in the secret two-dimensional code in the express delivery face bill, so that different users can obtain different information when scanning the secret two-dimensional code, the users who obtain the freight bill number can provide different types of services according to own unique user identification and the equipment type of scanning the secret two-dimensional code, one-to-one service on one express delivery face is realized through the combination of the two modes, one area fixed on the express delivery face bill is provided with the secret two-dimensional code, and different users can scan and display different effects, so that service diversification is realized.
Drawings
Fig. 1 is a schematic diagram of a first embodiment of a service providing method based on two-dimensional codes according to an embodiment of the present invention;
Fig. 2 is a schematic diagram of a second embodiment of a service providing method based on two-dimensional codes according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a third embodiment of a service providing method based on two-dimensional codes according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a fourth embodiment of a service providing method based on two-dimensional codes according to an embodiment of the present invention;
Fig. 5 is a schematic diagram of a fifth embodiment of a service providing method based on two-dimensional codes according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an embodiment of a two-dimensional code-based service providing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic diagram of another embodiment of a service providing apparatus based on two-dimensional codes according to an embodiment of the present invention;
fig. 8 is a schematic diagram of an embodiment of a service providing device based on two-dimensional codes in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a service providing method, device, equipment and storage medium based on two-dimension codes, and in the technical scheme of the invention, the encrypted two-dimension codes on an express delivery face bill are scanned and identified, and the freight bill number carried in the encrypted two-dimension codes is extracted; identifying whether a user unique identifier exists at a terminal where a scanning action is performed; if yes, determining the account type of the unique identifier of the user, acquiring a first service corresponding to the account type from a server according to the association relation between the preset account type and the service and the waybill number, and providing the first service to the terminal; if the equipment type does not exist, determining the equipment type of the terminal performing the scanning action, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal. According to the method, the freight bill number information is hidden in the secret two-dimensional code in the express delivery face list, so that different users can obtain different information when scanning the secret two-dimensional code, the users who obtain the freight bill number can provide different types of services according to own unique user identification and the equipment type of scanning the secret two-dimensional code, one-to-one service on one express delivery face is realized through the combination of the two modes, one area fixed on the express delivery face list is provided with the secret two-dimensional code, and different users can scan and display different effects, so that service diversification is realized.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For easy understanding, the following describes a specific flow of an embodiment of the present invention, referring to fig. 1, and a first embodiment of a service providing method based on two-dimensional codes in the embodiment of the present invention includes:
101. Scanning and identifying a carrier secret two-dimensional code on the express delivery face bill, and extracting a waybill number carried in the carrier secret two-dimensional code;
It can be understood that the execution subject of the present invention may be a service providing device based on two-dimensional code, and may also be a terminal or a server, which is not limited herein. The embodiment of the invention is described by taking a server as an execution main body as an example.
In practical application, a barcode or a two-dimensional code is arranged on an express bill of a part of express, wherein the two-dimensional code is a coding mode which is superpopular on mobile equipment in recent years, more information can be stored than a traditional barcode, more data types can be represented, generally, the barcode is arranged on the express bill, the two-dimensional code is less arranged, the bill number of the express can be identified through the barcode, different operation processes and services are realized through the bill number, and the two-dimensional code on the arranged bill is generally an advertisement of an express company, so that the popularization effect is achieved.
In practical application, the two-dimensional code is generally a graph which is distributed on a plane (in a two-dimensional direction) according to a certain rule by using a certain specific geometric figure, is alternately black and white, and records data symbol information; the concept of 0 and 1 bit streams forming the internal logic foundation of a computer is skillfully utilized in code programming, a plurality of geometric shapes corresponding to binary are used for representing literal numerical information, and the literal numerical information is automatically read through an image input device or an optoelectronic scanning device to realize automatic information processing: it has some commonalities in barcode technology: each code has its specific character set; each character occupies a certain width; has a certain checking function and the like. Generally, one coding mode only stores one type of data, meanwhile, the two-dimensional codes and the bar codes can enlarge the occupied area of the express delivery face bill, the space area of the face bill is limited, and meanwhile, the arrangement of a plurality of bar codes and the two-dimensional codes is impractical, in practical application, a face bill number or other types of data can be hidden in the data originally carried by the two-dimensional codes through a two-dimensional code information hiding technology, under the condition that original information is not influenced, multiple information is carried on one two-dimensional code, a secret two-dimensional code is generated, and different service types are provided by scanning the face bill number obtained by the secret two-dimensional code by different people in the logistics process.
102. Identifying whether a user unique identifier exists at a terminal where a scanning action is performed;
In this embodiment, through some two-dimension code information hiding technologies, the freight list number and other information can be hidden in the secret two-dimension code, different logistics processes can scan the secret two-dimension code by different scanning devices, for example, in the stage of sending a mail, after obtaining a to-be-transported express mail, a post prints the express mail face list for the express mail, at this time, the sender does not pay, after the secret two-dimension code on the scanned express mail face list is scanned, the system inquires the freight system to display that the express mail is not paid, so that the character freight is displayed on the user page of the sender, if the inquiry is made to pay the freight, the current logistics information of the express mail is displayed, in this embodiment, the unique user identifier is the user ID registered by the system when the user uses the system running the method, the account type of the user can be identified by the user ID, and different services can be provided according to different account types.
103. If the service exists, determining an account type of the unique identifier of the user, acquiring a first service corresponding to the account type from a server according to a preset association relationship between the account type and the service and a waybill number, and providing the first service to a terminal;
in this embodiment, after identifying that the terminal device where the scanning action is located has the unique user identifier, different services can be provided according to the account type of the unique user identifier, where the relationship between the unique user identifier and the account type may be that when the user is registered in the system, the system allocates to the user according to different registration processes of the user, for example, when the user registers and selects a sender, the system marks the unique user identifier as the account type of the sender, or separates the registration processes of different users through different registration systems, marks the unique user identifier registered in the sender system as the account type of the sender, marks the unique user identifier registered in the courier system as the courier, and realizes service diversification through different unique user identifiers.
104. If the service type does not exist, determining the equipment type of the terminal performing the scanning action, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal.
In this embodiment, there may be a case that the code scanning device does not have a unique identifier of a user, for example, when a express mail is in a stage of pipeline sorting, a sorter uses the sorting device to scan a secret two-dimensional code on an express bill, generally in a sorting process, a scan record of the express mail is irrelevant to the identity of a sorter, the secret two-dimensional code on the express mail is scanned to generate a scan record of the express mail, and the scan record has no information about the sorter, so that in a sorting stage of the express mail, the user ID does not need to be allocated to the sorter. By means of different equipment types of the scanning terminal, on the premise of no unique user identification, various different services can be provided, and service diversity is achieved.
In the embodiment, a carrying two-dimensional code on an express delivery face sheet is scanned and identified, and a freight sheet number carried in the carrying two-dimensional code is extracted; identifying whether a user unique identifier exists at a terminal where a scanning action is performed; if yes, determining the account type of the unique identifier of the user, acquiring a first service corresponding to the account type from a server according to the association relation between the preset account type and the service and the waybill number, and providing the first service to the terminal; if the equipment type does not exist, determining the equipment type of the terminal performing the scanning action, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal. According to the method, the freight bill number information is hidden in the secret two-dimensional code in the express delivery face bill, so that different users can obtain different information when scanning the secret two-dimensional code, the users who obtain the freight bill number can provide different types of services according to own unique user identification and the equipment type of scanning the secret two-dimensional code, one-to-one service on one express delivery face is realized through the combination of the two modes, one area fixed on the express delivery face bill is provided with the secret two-dimensional code, and different users can scan and display different effects, so that service diversification is realized.
Referring to fig. 2, a second embodiment of a service providing method based on two-dimensional codes in an embodiment of the present invention includes:
201. acquiring original information, a waybill number and an embedded key;
in this embodiment, the original information is information that generates the encrypted two-dimensional code, and generally, the information included in the two-dimensional code on the express bill is some propaganda contents of the express company, for example, may be a official network, public number, and the like of the express company.
In this embodiment, the function of the embedded key is mainly to determine the location of the data generated by the waybill number embedded in the data of the original information.
202. Selecting the version and the error correction code level of the encrypted two-dimension code to be generated according to the length and the type of the original information;
203. according to the version, carrying out data coding on the original information to obtain a coded character string;
204. generating an error correction character string according to the error correction code level and the original information;
In practical application, the generation of the two-dimensional code requires selecting the version and the error correction code level of the two-dimensional code, and in this embodiment, the original information is taken as the company's official network as an example, and the original information is "http: the operation list number is 123044162062, version is defined as two-dimensional code Version, t is BCH error correction bit number, s is binary character string converted by operation list number, and t is binary character string with BCH error correction code added by operation list number.
According to the length of original information carried by the two-dimensional code in general, the Version of the two-dimensional code is selected to be version=3, the two-dimensional code matrix 29×29 can accommodate 70 code words in total, for four error correction levels L, M, Q, H, the original single number is converted into character strings s= 1110010100110000000001110101000001110, the length is 37 bits, s are divided into two groups due to the fact that the total error correction 4 bit selection is needed, each of the two groups is subjected to BCH coding, namely t=2, the original BCH (31, 21) code is selected according to the BCH coding principle, namely the character strings of 21-bit effective information are generated to be 10 as BCH error correction codes, and therefore, the binary information containing the BCH error correction codes which needs to be embedded finally needs to have 62 bits, and the selected error correction level is Q in consideration of error correction capacity of each error correction level.
205. Adding the error correction code character string to the code character string to obtain a data codeword, and calculating the maximum concealable information quantity of the data codeword;
In this embodiment, the maximum amount of concealable information of a digital codeword can be obtained by:
0<k<n<2m+2;
Where k is the number of encoded data symbols, n is the number of encoded symbols in the encoded block, 1 symbol consists of m bits, and the maximum concealable information quantity r of the digital codeword is:
r=n-k;
The data of the waybill code is embedded into redundancy of the maximum concealable information quantity of the N-dimension code data, so that information carried by the two-dimension code cannot be influenced.
206. Coding the waybill number to obtain a formatted secret sequence, and calculating the hidden information quantity of the secret sequence;
207. Judging whether the hidden information amount is larger than the maximum hidden information amount or not;
208. if yes, outputting alarm information to prompt that the hidden information amount is too large;
209. if not, initializing a preset pseudo-random generator according to the embedded secret key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence;
210. according to the embedding position, replacing the original sequence in the data code word with the secret sequence, and adding an ending symbol after the replaced digital code word to obtain the encrypted data;
211. Generating a secret two-dimensional code according to the secret data;
212. scanning and identifying a carrier secret two-dimensional code on the express delivery face bill, and extracting a waybill number carried in the carrier secret two-dimensional code;
213. identifying whether a user unique identifier exists at a terminal where a scanning action is performed;
214. If the service exists, determining an account type of the unique identifier of the user, acquiring a first service corresponding to the account type from a server according to a preset association relationship between the account type and the service and a waybill number, and providing the first service to a terminal;
215. If the service type does not exist, determining the equipment type of the terminal performing the scanning action, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal.
Steps 212 to 215 in this embodiment are similar to steps 101 to 104 in the first embodiment, and will not be described here.
The present embodiment describes in detail, based on the previous embodiment, a process of generating an encrypted two-dimensional code and obtaining a digital codeword contained in the encrypted two-dimensional code, by obtaining original information, a bill number, and an embedded key; performing data coding and error correction coding on the original information to obtain data code words, and calculating the maximum concealable information quantity of the data code words; coding the waybill number to obtain a formatted secret sequence, calculating the hidden information quantity of the secret sequence, and judging whether the hidden information quantity is larger than the maximum hidden information quantity or not; if yes, outputting alarm information to prompt that the hidden information amount is too large; if not, initializing a preset pseudo-random generator according to the embedded secret key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence; according to the embedding position, replacing the original sequence in the data code word with the secret sequence, and adding an ending symbol after the replaced digital code word to obtain the encrypted data; generating a secret two-dimensional code according to secret data, wherein the original information is subjected to data coding and error correction coding to obtain a data codeword, and selecting a version and an error correction code level of the secret two-dimensional code to be generated according to the length and the type of the original information; according to the version, carrying out data coding on the original information to obtain a coded character string; generating an error correction character string according to the error correction code level and the original information; and adding the error correction code character string to the code character string to obtain a data codeword. By the encrypted two-dimensional code generated in the above way, the waybill number can be hidden in the original information,
Referring to fig. 3, a third embodiment of a service providing method based on two-dimensional codes in an embodiment of the present invention includes:
301. Acquiring original information, a waybill number and an embedded key;
302. performing data coding and error correction coding on the original information to obtain data code words, and calculating the maximum concealable information quantity of the data code words;
303. coding the waybill number to obtain a formatted secret sequence, and calculating the hidden information quantity of the secret sequence;
304. judging whether the hidden information amount is larger than the maximum hidden information amount or not;
305. if yes, outputting alarm information to prompt that the hidden information amount is too large;
306. If not, initializing a pseudo-random generator to generate a first pseudo-random sequence according to a first key embedded with the key;
307. Randomly selecting at least one character from the data codeword according to the pseudo-random sequence, and generating a continuous bit stream according to the character;
308. initializing a pseudo-random generator to generate a second pseudo-random sequence according to a second key of the embedded key, and determining the embedded position of the secret sequence on the bit stream according to the second pseudo-random sequence;
309. According to the embedding position, replacing the original sequence in the data code word with the secret sequence, and adding an ending symbol after the replaced digital code word to obtain the encrypted data;
In this embodiment, it is assumed that one data block B of the two-dimensional code contains N symbols, where K check symbols, with embedded information m= { M i i i e {0,l }, i=1, 2,3 … … l }, where, The embedded keys are K1 and K2 respectively, and for each block, the detailed embedding algorithm is as follows:
step 1: the first embedded key K1 initializes the pseudorandom number generator G1 to generate a set of random sequences r1= { R1 i i R1 i∈{1,2,……,N-1,N},r1i≠r1j, i, j=1, 2, … … [ K/2] };
Step 2: randomly selecting from a block B of data containing N symbols, K/2 symbols according to a random sequence R1, the selected symbols constituting a logically continuous bit stream
Step 3: the second embedded key K2 initializes the pseudo-random number generator G2 to generate a set of random sequences
Step 4: determining the embedding position of the information M to be embedded in the bit stream S according to the random sequence R2 ifThenAnd the reverse is carried out, otherwise, the method is unchanged.
310. Generating a secret two-dimensional code according to the secret data;
311. scanning and identifying a carrier secret two-dimensional code on the express delivery face bill, and extracting a waybill number carried in the carrier secret two-dimensional code;
312. Identifying whether a user unique identifier exists at a terminal where a scanning action is performed;
313. If the service exists, determining an account type of the unique identifier of the user, acquiring a first service corresponding to the account type from a server according to a preset association relationship between the account type and the service and a waybill number, and providing the first service to a terminal;
314. if the service type does not exist, determining the equipment type of the terminal performing the scanning action, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal.
Steps 211 to 214 in this embodiment are similar to steps 101 to 104 in the first embodiment, and will not be described here.
The present embodiment describes in detail the process of embedding the waybill number into the original information based on the previous embodiment, and initializes the pseudo random generator to generate a first pseudo random sequence according to the first key; randomly selecting at least one character from the data codeword according to the pseudo-random sequence, and generating a continuous bit stream according to the character; according to the second secret key, initializing the pseudo-random generator to generate a second pseudo-random sequence, and determining the embedding position of the secret sequence on the bit stream according to the second pseudo-random sequence.
Referring to fig. 4, a fourth embodiment of a service providing method based on two-dimensional codes in an embodiment of the present invention includes:
401. Scanning the encrypted two-dimensional code and acquiring an embedded secret key;
402. identifying and analyzing the encrypted two-dimensional code to obtain encrypted data of the encrypted two-dimensional code;
In this embodiment, there are three kinds of methods for scanning and identifying the encrypted two-dimensional code, which are respectively linear CCD, linear image type, laser reader with grating, image type and image type. The technical scheme adopts an optimized two-dimensional code decoding algorithm which mainly comprises five steps of: image preprocessing, positioning correction, data reading and error correction decoding. The positioning purpose in the positioning correction is to find the accurate position of the two-dimensional code pattern in the image, and obtain part of information of the two-dimensional code, such as the size, the coverage area and the edge. The two-dimensional code is usually rectangular, so the positioning is to acquire the positions of four vertexes of the rectangle. Two directions are mainly used for researching a two-dimensional code positioning algorithm: the first direction is to locate through the structural features of the two-dimensional code, for example, by searching for an image finding pattern of the two-dimensional code, and determining the position of the two-dimensional code by using the image finding pattern: the second direction is that the two-dimensional code is shaped like a rectangle, edges of the two-dimensional code can be recognized first, and then the accurate position of the two-dimensional code can be calculated according to the edges. If the image is only changed in angle and position, the image can be corrected by only carrying out translation or rotation operation on the image. However, in practical practice, the conditions of the image sampling angle and the unevenness of the two-dimensional code are complex, which can lead to distortion of the sampled image, so that more correction operations are needed to face the problems.
403. Initializing a preset pseudo-random generator according to the embedded secret key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence;
404. Acquiring a secret sequence in the secret data according to the embedding position;
405. converting the secret sequence into a bill number;
in this embodiment, the hidden waybill number is extracted by an extraction algorithm opposite to the embedding algorithm, which includes the following steps:
step 1: the first embedded key K1 initializes the pseudorandom number generator G1 to generate a set of random sequences r1= { R1 i i R1 i∈{1,2,……,N-1,N},r1i≠r1j, i, j=1, 2, … … [ K/2] };
Step 2: constructing a logically continuous bit stream from a data block containing N symbols according to a random sequence R1, the same as the embedding process
Step 3: the second embedded key K2 initializes the pseudo-random number generator G2 to generate a set of random sequences
Step 4: and determining the embedding position of the bill number in the bit stream S according to the random sequence R2 and extracting.
406. Identifying whether a user unique identifier exists at a terminal where a scanning action is performed;
407. If the service exists, determining an account type of the unique identifier of the user, acquiring a first service corresponding to the account type from a server according to a preset association relationship between the account type and the service and a waybill number, and providing the first service to a terminal;
408. If the service type does not exist, determining the equipment type of the terminal performing the scanning action, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal.
The embodiment describes the process of scanning and identifying the secret two-dimensional code on the express bill on the basis of the previous embodiment, extracting the waybill number carried in the secret two-dimensional code, scanning the secret two-dimensional code and acquiring the embedded key; identifying and analyzing the encrypted two-dimensional code to obtain encrypted data of the encrypted two-dimensional code; initializing a preset pseudo-random generator according to the embedded secret key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence; acquiring a secret sequence in the secret-carrying data according to the embedded position; the secret sequence is converted into a bill number.
Referring to fig. 5, a fifth embodiment of a service providing method based on two-dimensional codes in an embodiment of the present invention includes:
501. Scanning and identifying a carrier secret two-dimensional code on the express delivery face bill, and extracting a waybill number carried in the carrier secret two-dimensional code;
502. identifying whether a user unique identifier exists at a terminal where a scanning action is performed;
503. If yes, judging the account type of the unique identifier of the user;
504. If the account type is a sender, inquiring the freight rate of the corresponding express according to the freight bill number, and displaying the freight rate on the corresponding terminal so as to prompt the sender to pay the freight rate;
505. If the account type is the courier, inquiring order information and logistics information of the corresponding express according to the freight bill number and displaying the order information and the logistics information on the corresponding terminal;
506. if the account type is a member user, inquiring and displaying the logistics information of the corresponding express according to the waybill number;
507. if the equipment type of the terminal does not exist, judging the equipment type of the terminal;
508. If the equipment type of the terminal is a pipeline terminal, generating a corresponding scanning record according to the waybill number, and uploading the scanning record;
509. if the equipment type of the terminal is the user terminal, inquiring and displaying the logistics information of the corresponding express according to the waybill number.
The embodiment describes in detail the process of providing different services to different users and different terminal devices on the basis of the previous embodiment, after the user scans the encrypted two-dimension code, different services are provided by identifying whether the terminal where the scanning action is located has a unique user identifier and the type of the unique user identifier, and when the user terminal does not have the unique user identifier, different types of services are provided according to the device type of the terminal, so that the diversity of the services provided by the two-dimension code hidden waybill numbers is realized.
The two-dimensional code based service providing method in the embodiment of the present invention is described above, and the two-dimensional code based service providing device in the embodiment of the present invention is described below, referring to fig. 6, one embodiment of the two-dimensional code based service providing device in the embodiment of the present invention includes:
the scanning module 601 is used for scanning and identifying a carrier two-dimensional code on an express delivery face sheet and extracting a waybill number carried in the carrier two-dimensional code;
The identifying module 602 is configured to identify whether a unique user identifier exists in a terminal where the scanning action is performed;
The first service providing module 603 is configured to determine an account type of the unique user identifier when the unique user identifier exists in the terminal, obtain a first service corresponding to the account type from a server according to an association relationship between a preset account type and a service and the waybill number, and provide the first service to the terminal;
and the second service providing module 604 is configured to determine a device type of the terminal performing the scanning action when the unique user identifier does not exist in the terminal, obtain a second service corresponding to the device type from the server according to the device type and the waybill number, and provide the second service to the terminal.
In the embodiment of the invention, the service providing device based on the two-dimensional code operates the service providing method based on the two-dimensional code, scans and identifies the secret two-dimensional code on the express delivery face bill, and extracts the freight bill number carried in the secret two-dimensional code; identifying whether a user unique identifier exists at a terminal where a scanning action is performed; if yes, determining the account type of the unique identifier of the user, acquiring a first service corresponding to the account type from a server according to the association relation between the preset account type and the service and the waybill number, and providing the first service to the terminal; if the equipment type does not exist, determining the equipment type of the terminal performing the scanning action, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal. According to the method, the freight bill number information is hidden in the secret two-dimensional code in the express delivery face bill, so that different users can obtain different information when scanning the secret two-dimensional code, the users who obtain the freight bill number can provide different types of services according to own unique user identification and the equipment type of scanning the secret two-dimensional code, one-to-one service on one express delivery face is realized through the combination of the two modes, one area fixed on the express delivery face bill is provided with the secret two-dimensional code, and different users can scan and display different effects, so that service diversification is realized.
Referring to fig. 7, a second embodiment of a service providing apparatus based on two-dimensional codes in an embodiment of the present invention includes:
the scanning module 601 is used for scanning and identifying a carrier two-dimensional code on an express delivery face sheet and extracting a waybill number carried in the carrier two-dimensional code;
The identifying module 602 is configured to identify whether a unique user identifier exists in a terminal where the scanning action is performed;
The first service providing module 603 is configured to determine an account type of the unique user identifier when the unique user identifier exists in the terminal, obtain a first service corresponding to the account type from a server according to an association relationship between a preset account type and a service and the waybill number, and provide the first service to the terminal;
and the second service providing module 604 is configured to determine a device type of the terminal performing the scanning action when the unique user identifier does not exist in the terminal, obtain a second service corresponding to the device type from the server according to the device type and the waybill number, and provide the second service to the terminal.
Wherein, the service providing device based on the two-dimensional code further comprises a two-dimensional code generating module 605, and the two-dimensional code generating module 605 comprises:
an acquisition unit 6051 for acquiring original information, a waybill number, and an embedded key;
An information encoding unit 6052, configured to perform data encoding processing and error correction encoding processing on the original information, obtain a data codeword, and calculate a maximum concealable information amount of the data codeword;
a waybill encoding unit 6053, configured to encode the waybill number to obtain a formatted secret sequence, and calculate the hidden information amount of the secret sequence;
a judging unit 6054 for judging whether the hidden information amount is larger than the maximum hidden information amount;
an alarm unit 6055 for outputting alarm information to prompt that the amount of hidden information is too large when the amount of hidden information is greater than the maximum amount of hidden information;
A determining unit 6056, configured to initialize a preset pseudo-random generator according to the embedding key when the hidden information amount is not greater than the maximum hidden information amount, generate a pseudo-random sequence, and determine an embedding position according to the pseudo-random sequence;
An embedding unit 6057 for replacing the secret sequence with the original sequence in the data codeword according to the embedding position, and adding an ending symbol after the replaced digital codeword to obtain the encrypted data;
and the generating unit 6058 is used for generating the secret two-dimensional code according to the secret data.
Wherein, the information encoding unit 6052 specifically is configured to:
Selecting the version and the error correction code level of the encrypted two-dimension code to be generated according to the length and the type of the original information;
according to the version, carrying out data coding on the original information to obtain a coded character string;
generating an error correction character string according to the error correction code level and the original information;
and adding the error correction code character string to the code character string to obtain a data codeword.
Optionally, the determining unit 6056 is specifically configured to:
Initializing the pseudo-random generator to generate a first pseudo-random sequence according to the first secret key;
Randomly selecting at least one character from the data codeword according to the pseudo-random sequence, and generating a continuous bit stream according to the character;
initializing the pseudo-random generator to generate a second pseudo-random sequence according to the second secret key, and determining the embedding position of the secret sequence on the bit stream according to the second pseudo-random sequence.
Optionally, the scanning module 601 is specifically configured to:
scanning the encrypted two-dimensional code and acquiring the embedded key;
Identifying and analyzing the encrypted two-dimensional code to obtain encrypted data of the encrypted two-dimensional code;
Initializing a preset pseudo-random generator according to the embedded secret key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence;
Acquiring a secret sequence in the secret-carrying data according to the embedded position;
The secret sequence is converted into a bill number.
Optionally, the first service module 603 is specifically configured to:
Judging the account type of the unique identifier of the user;
If the account type is a sender, inquiring the freight charge of the corresponding express according to the freight bill number, and displaying the freight charge on the corresponding terminal so as to prompt the sender to pay the freight charge;
if the account type is an express delivery person, inquiring order information and logistics information of the corresponding express according to the freight bill number and displaying the order information and the logistics information on the corresponding terminal;
and if the account type is a member user, inquiring and displaying the logistics information of the corresponding express mail according to the waybill number.
Optionally, the second service module 604 is specifically configured to:
Judging the equipment type of the terminal;
And if the equipment type of the terminal is a pipeline terminal, generating a corresponding scanning record according to the waybill number, and uploading the scanning record.
And if the equipment type of the terminal is a user terminal, inquiring and displaying the logistics information of the corresponding express according to the waybill number.
The embodiment adds a two-dimension code generating module based on the previous embodiment, and simultaneously describes the unit structure of the two-dimension code generating module in detail, including an acquisition unit, an information encoding unit, a waybill encoding unit, a judging unit, an alarm unit, a determining unit, an embedding unit and a generating unit, wherein the waybill number is stored in original information of originally generated two-dimension codes through the units, and the function realization process of part of the modules is described in detail, and different service types are provided for different account types and different terminal devices through two service modules, namely a first service module and a second service module, so as to realize service diversification.
Fig. 6 and fig. 7 above describe the two-dimensional code-based service providing apparatus in the embodiment of the present invention in detail from the point of view of a modularized functional entity, and the two-dimensional code-based service providing device in the embodiment of the present invention is described in detail from the point of view of hardware processing.
Fig. 8 is a schematic structural diagram of a two-dimensional code-based service providing apparatus according to an embodiment of the present invention, where the two-dimensional code-based service providing apparatus 800 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 810 (e.g., one or more processors) and a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) storing application programs 833 or data 832. Wherein memory 820 and storage medium 830 can be transitory or persistent. The program stored in the storage medium 830 may include one or more modules (not shown), each of which may include a series of instruction operations on the two-dimensional code-based service providing apparatus 800. Still further, the processor 810 may be configured to communicate with the storage medium 830, and execute a series of instruction operations in the storage medium 830 on the two-dimensional code based service providing apparatus 800 to implement the steps of the two-dimensional code based service providing method described above.
The two-dimensional code based service providing apparatus 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input/output interfaces 860, and/or one or more operating systems 831, such as Windows Serve, mac OS X, unix, linux, freeBSD, and the like. It will be appreciated by those skilled in the art that the two-dimensional code based service providing apparatus structure shown in fig. 8 does not constitute a limitation of the two-dimensional code based service providing apparatus provided by the present application, and may include more or less components than those illustrated, or may combine some components, or may be a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and may also be a volatile computer readable storage medium, where instructions are stored in the computer readable storage medium, when the instructions are executed on a computer, cause the computer to perform the steps of the two-dimensional code based service providing method.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system or apparatus and unit described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. The service providing method based on the two-dimensional code is characterized by comprising the following steps of:
Scanning and identifying a secret two-dimensional code on an express delivery face bill, and extracting a bill number carried in the secret two-dimensional code, wherein the secret two-dimensional code is a two-dimensional code generated by hiding the bill number or other types of data in original information, and the secret two-dimensional code carries various information;
Identifying whether a user unique identifier exists at a terminal where a scanning action is performed;
If yes, determining the account type of the unique identifier of the user, acquiring a first service corresponding to the account type from a server according to the association relation between the preset account type and the service and the waybill number, and providing the first service to the terminal;
If the equipment type does not exist, determining the equipment type of the terminal for performing the scanning action, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal;
Before the secret two-dimensional code is scanned and identified and the waybill number carried in the secret two-dimensional code is extracted, the method further comprises the steps of:
Acquiring original information, a waybill number and an embedded key;
performing data coding and error correction coding on the original information to obtain a data codeword, and calculating the maximum concealable information quantity of the data codeword;
Encoding the waybill number to obtain a formatted secret sequence, and calculating the hidden information quantity of the secret sequence;
judging whether the hidden information amount is larger than the maximum hidden information amount or not;
if yes, outputting alarm information to prompt that the hidden information quantity is too large;
If not, initializing a preset pseudo-random generator according to the embedded key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence;
According to the embedding position, replacing the original sequence in the data code word with the secret sequence, and adding an ending symbol after the replaced digital code word to obtain the encrypted data;
generating a secret two-dimensional code according to the secret data;
The embedded key comprises a first key and a second key, the initializing a preset pseudo-random generator according to the embedded key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence comprises:
Initializing the pseudo-random generator to generate a first pseudo-random sequence according to the first secret key;
Randomly selecting at least one character from the data codeword according to the pseudo-random sequence, and generating a continuous bit stream according to the character;
initializing the pseudo-random generator to generate a second pseudo-random sequence according to the second secret key, and determining the embedding position of the secret sequence on the bit stream according to the second pseudo-random sequence.
2. The two-dimensional code based service providing method according to claim 1, wherein the performing data encoding processing and error correction encoding processing on the original information to obtain a data codeword includes:
Selecting the version and the error correction code level of the encrypted two-dimension code to be generated according to the length and the type of the original information;
according to the version, carrying out data coding on the original information to obtain a coded character string;
generating an error correction character string according to the error correction code level and the original information;
and adding the error correction code character string to the code character string to obtain a data codeword.
3. The service providing method based on two-dimension codes according to claim 1, wherein the scanning and identifying the encrypted two-dimension codes on the express delivery face sheets, and extracting the waybill numbers carried in the encrypted two-dimension codes comprises:
scanning the encrypted two-dimensional code and acquiring the embedded key;
Identifying and analyzing the encrypted two-dimensional code to obtain encrypted data of the encrypted two-dimensional code;
Initializing a preset pseudo-random generator according to the embedded secret key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence;
Acquiring a secret sequence in the secret-carrying data according to the embedded position;
The secret sequence is converted into a bill number.
4. The two-dimensional code based service providing method according to any one of claims 1 to 3, wherein the determining the account type uniquely identified by the user, according to the association relationship between a preset account type and a service and the waybill number, obtaining a first service corresponding to the account type from a server, and providing the first service to the terminal includes:
Judging the account type of the unique identifier of the user;
If the account type is a sender, inquiring the freight charge of the corresponding express according to the freight bill number, and displaying the freight charge on the corresponding terminal so as to prompt the sender to pay the freight charge;
if the account type is an express delivery person, inquiring order information and logistics information of the corresponding express according to the freight bill number and displaying the order information and the logistics information on the corresponding terminal;
and if the account type is a member user, inquiring and displaying the logistics information of the corresponding express mail according to the waybill number.
5. The two-dimensional code-based service providing method according to any one of claims 1 to 3, wherein the determining the device type of the terminal performing the scanning operation, acquiring the second service corresponding to the device type from the server according to the device type and the waybill number, and providing the second service to the terminal comprises:
Judging the equipment type of the terminal;
if the equipment type of the terminal is a pipeline terminal, generating a corresponding scanning record according to the waybill number, and uploading the scanning record;
and if the equipment type of the terminal is a user terminal, inquiring and displaying the logistics information of the corresponding express according to the waybill number.
6. A service providing device based on two-dimensional code, characterized in that the service providing device based on two-dimensional code includes:
The system comprises a scanning module, a storage module and a storage module, wherein the scanning module is used for scanning and identifying a secret two-dimensional code on an express bill, extracting a bill number carried in the secret two-dimensional code, wherein the secret two-dimensional code is a two-dimensional code generated by hiding the bill number or other types of data in original information, and the secret two-dimensional code carries various information;
The identification module is used for identifying whether a user unique identifier exists in the terminal where the scanning action is performed;
The first service providing module is used for determining the account type of the unique user identifier when the unique user identifier exists in the terminal, acquiring a first service corresponding to the account type from a server according to the association relationship between the preset account type and the service and the waybill number, and providing the first service to the terminal;
The second service providing module is used for determining the equipment type of the terminal performing the scanning action when the unique user identifier does not exist in the terminal, acquiring a second service corresponding to the equipment type from the server according to the equipment type and the waybill number, and providing the second service to the terminal;
The acquisition module is used for acquiring the original information, the waybill number and the embedded secret key; performing data coding and error correction coding on the original information to obtain a data codeword, and calculating the maximum concealable information quantity of the data codeword; encoding the waybill number to obtain a formatted secret sequence, and calculating the hidden information quantity of the secret sequence; judging whether the hidden information amount is larger than the maximum hidden information amount or not; if yes, outputting alarm information to prompt that the hidden information quantity is too large; if not, initializing a preset pseudo-random generator according to the embedded key, generating a pseudo-random sequence, and determining an embedded position according to the pseudo-random sequence; according to the embedding position, replacing the original sequence in the data code word with the secret sequence, and adding an ending symbol after the replaced digital code word to obtain the encrypted data; generating a secret two-dimensional code according to the secret data;
The acquisition module is also used for initializing the pseudo-random generator to generate a first pseudo-random sequence according to the first secret key; randomly selecting at least one character from the data codeword according to the pseudo-random sequence, and generating a continuous bit stream according to the character; initializing the pseudo-random generator to generate a second pseudo-random sequence according to a second key, and determining the embedding position of the secret sequence on the bit stream according to the second pseudo-random sequence.
7. A two-dimensional code-based service providing apparatus, characterized by comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
The at least one processor invokes the instructions in the memory to cause the two-dimensional code based service providing apparatus to perform the two-dimensional code based service providing method of any one of claims 1-5.
8. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the two-dimensional code based service providing method according to any one of claims 1 to 5.
CN202010919305.8A 2020-09-04 2020-09-04 Method, device, equipment and storage medium for providing service based on QR code Active CN112069850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010919305.8A CN112069850B (en) 2020-09-04 2020-09-04 Method, device, equipment and storage medium for providing service based on QR code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010919305.8A CN112069850B (en) 2020-09-04 2020-09-04 Method, device, equipment and storage medium for providing service based on QR code

Publications (2)

Publication Number Publication Date
CN112069850A CN112069850A (en) 2020-12-11
CN112069850B true CN112069850B (en) 2024-06-11

Family

ID=73666406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010919305.8A Active CN112069850B (en) 2020-09-04 2020-09-04 Method, device, equipment and storage medium for providing service based on QR code

Country Status (1)

Country Link
CN (1) CN112069850B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114860179A (en) * 2021-02-03 2022-08-05 深圳顺丰快运科技有限公司 Waybill display method, device and system, electronic equipment and storage medium
CN113344160B (en) * 2021-06-10 2024-08-02 闪电快车软件(北京)有限公司 Order processing method and device, electronic equipment and storage medium
CN113344159B (en) * 2021-06-10 2024-11-19 闪电快车软件(北京)有限公司 Information processing method, device, electronic device and storage medium
CN113515738A (en) * 2021-06-29 2021-10-19 新华三大数据技术有限公司 Two-dimensional code-based security authentication method, device and storage medium
CN115293687B (en) * 2022-07-26 2025-10-28 上海东普信息科技有限公司 Method, device, equipment and storage medium for generating express delivery label

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815544A (en) * 2017-01-16 2017-06-09 武汉大学 A kind of information concealing method based on Quick Response Code
CN108647925A (en) * 2018-05-15 2018-10-12 佛山市衣香蒂丝服装设计有限公司 A kind of logistics information interactive system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3153993B1 (en) * 2015-10-08 2021-07-28 Surys Method of securing a 2d barcode
CN105825257B (en) * 2016-03-09 2018-05-29 东北大学 Information hiding and hiding information extracting method and system based on two-dimensional bar code
CN106650869B (en) * 2016-10-18 2020-02-07 重庆文理学院 Information hiding method based on two-dimensional code

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815544A (en) * 2017-01-16 2017-06-09 武汉大学 A kind of information concealing method based on Quick Response Code
CN108647925A (en) * 2018-05-15 2018-10-12 佛山市衣香蒂丝服装设计有限公司 A kind of logistics information interactive system

Also Published As

Publication number Publication date
CN112069850A (en) 2020-12-11

Similar Documents

Publication Publication Date Title
CN112069850B (en) Method, device, equipment and storage medium for providing service based on QR code
US9406010B2 (en) Producing, capturing and using visual identification tags for moving objects
US8379908B2 (en) Embedding and reading codes on objects
US6807634B1 (en) Watermarks for customer identification
US11216627B2 (en) Method and device for providing and verifying two-dimensional code
US7044395B1 (en) Embedding and reading imperceptible codes on objects
JP5090369B2 (en) Automated processing using remotely stored templates (method for processing forms, apparatus for processing forms)
CN105825257B (en) Information hiding and hiding information extracting method and system based on two-dimensional bar code
Kato et al. Pervasive 2D barcodes for camera phone applications
CN102930192B (en) Security information generates and acquisition methods and relevant apparatus
CN1670761B (en) Systems and methods for encoding randomly distributed features in an object
CN100369059C (en) Matrix type two-dimensional bar code and its encoding and decoding method
CN102034127A (en) Novel high-capacity two-dimensional barcode and system, encoding and decoding methods and applications thereof
CN111539502A (en) Anti-counterfeiting two-dimensional code generation method and device, server and storage medium
CN102044010A (en) Method for realizing temporary vehicle number plate information data transmission by utilizing two-dimensional bar codes
US7849317B2 (en) Method for mail address block image information encoding, protection and recovery in postal payment applications
CN113962348B (en) Electronic seal identification code and its generation and verification method
Sahu et al. Encryption in QR code using stegnography
CN1665182B (en) Coding and decoding method for high-speed recognition matrix code
Erlangga et al. Increasing secret data hiding capacity in QR code using subcells
US8857711B2 (en) Tracking customer loyalty information using an incremental information object
CN114463426B (en) Parallelogram point cloud code design and identification method and system based on triangle segmentation
Zhou et al. A QR data hiding method based on redundant region and BCH
CN113591503A (en) Information providing method, device and equipment based on QR two-dimensional code and storage medium
Yeh et al. A system for a new two-dimensional code: Secure 2D code

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant