CN110555175A - Two-dimensional code analyzing and generating method and equipment - Google Patents
Two-dimensional code analyzing and generating method and equipment Download PDFInfo
- Publication number
- CN110555175A CN110555175A CN201810276387.1A CN201810276387A CN110555175A CN 110555175 A CN110555175 A CN 110555175A CN 201810276387 A CN201810276387 A CN 201810276387A CN 110555175 A CN110555175 A CN 110555175A
- Authority
- CN
- China
- Prior art keywords
- url
- character string
- string
- dimensional code
- network
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 230000015654 memory Effects 0.000 claims description 22
- 238000004590 computer program Methods 0.000 claims description 16
- 238000012790 confirmation Methods 0.000 claims description 4
- 239000000284 extract Substances 0.000 claims description 4
- 238000009434 installation Methods 0.000 claims description 4
- 238000004891 communication Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 description 12
- 230000005291 magnetic effect Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000013475 authorization Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 238000000060 site-specific infrared dichroism spectroscopy Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The application provides a two-dimension code analyzing and generating method and equipment, which can encode access information used for connecting a network and display the encoded access information to a user in a two-dimension code mode, the user can decode the encoded access information only through a mobile terminal provided with corresponding authorized application to obtain the access information, and tries to connect the network according to the access information, and the mobile terminal not provided with the authorized application cannot decode the encoded access information obtained by scanning the two-dimension code, so that the network cannot be accessed, and the access security of the network is improved.
Description
Technical Field
The application relates to the technical field of information, in particular to a two-dimensional code analyzing and generating method and equipment.
Background
a URI (Uniform Resource Identifier) is used to identify a Resource name on the internet, which can identify each available Resource on the internet, such as an HTML document, an image, a video, a program, etc., and a user performs interactive processing on the identified internet Resource through the URI, such as performing a reading operation, an updating operation, etc. URIs generally consist of three parts: the host name indicates the name of the host storing the resource and is indicated by a path, the identifier indicates a fragment inside the resource, and the path relative to the URI generally points to the resource on the same machine. A URL is a subset of URIs (Uniform Resource locators) that describe the location and access method of a Resource available on the internet. The URL includes the following components: protocol (or service mode), host address where the resource is stored, and the specific path of the resource on the host.
Due to the development history and the use habit of the URL, the URL is mainly used in various occasions needing to access Internet resources at present and is difficult to be applied to other occasions.
content of application
An object of the present application is to provide a two-dimensional code parsing and generating method and device.
To achieve the above object, some embodiments of the present application provide a method for parsing a two-dimensional code in a mobile terminal, where the method includes:
Starting a scanning unit to scan the two-dimensional code;
Analyzing the two-dimensional code to obtain an encoded URL character string;
If the scanning unit belongs to a first target application, the first target application decodes the coded URL character string and extracts access information for connecting a network from a URL parameter character string contained in the decoded URL character string;
and attempting to connect to the network according to the access information.
In addition, some embodiments of the present application further provide a method for generating a two-dimensional code at a device side, where the method includes:
Acquiring a URL prefix character string and a URL parameter character string, wherein the URL parameter character string comprises access information for connecting a network;
generating a URL character string according to the URL prefix character string and the URL parameter character string;
encoding the URL character string to obtain an encoded URL character string;
and generating a two-dimensional code related to the URL according to the coded URL character string.
some embodiments of the present application also provide a mobile terminal, the apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform the aforementioned method of parsing a two-dimensional code at the mobile terminal.
furthermore, some embodiments of the present application also provide an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform the aforementioned method for generating a two-dimensional code at the apparatus end.
Some embodiments of the present application also provide a computer readable medium, on which computer readable instructions are stored, where the computer readable instructions are executable by a processor to implement the foregoing method for parsing a two-dimensional code at a mobile terminal and the method for generating a two-dimensional code at a device side.
Compared with the prior art, the scheme provided by the application can encode the access information used for connecting the network and display the encoded access information to the user in the form of the two-dimensional code, the user can decode the encoded access information through the mobile terminal provided with the corresponding authorized application to obtain the access information and try to connect the network according to the access information, and the mobile terminal not provided with the authorized application cannot decode the encoded access information obtained by scanning the two-dimensional code, so that the network cannot be accessed, and the access security of the network is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
Fig. 1 is a flowchart of a method for generating a two-dimensional code at a device end according to an embodiment of the present application.
Fig. 2 is a preferred two-dimensional code image generated according to URL resource information according to an embodiment of the present application.
fig. 3 is a flowchart of a method for analyzing a two-dimensional code at a mobile terminal according to an embodiment of the present application.
Detailed Description
the present application is described in further detail below with reference to the attached figures.
In a typical configuration of the present application, the mobile terminal, the network device each include one or more processors (CPUs), input/output interfaces, network interfaces, and memories.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
Some embodiments of the present application provide a method for generating a two-dimensional code at a device side. The device side may comprise a network device side or a mobile terminal. Network devices may include, but are not limited to, service devices such as centralized servers or distributed servers; the mobile terminal includes, but is not limited to, a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, etc. As shown in fig. 1, the method specifically includes the following steps:
Step S101, obtaining a URL prefix character string and a URL parameter character string, wherein the URL parameter character string comprises access information for connecting a network;
step S102, generating a URL character string according to the URL prefix character string and the URL parameter character string;
Step S103, encoding the URL character string to obtain the encoded URL character string;
And step S104, generating a two-dimensional code related to the URL according to the coded URL character string.
if the two-dimensional code related to the URL is generated by the network device, the network device may send the two-dimensional code related to the URL to a terminal, such as a mobile terminal or a fixed terminal, after generating the two-dimensional code, so that the terminal may display the two-dimensional code. If the two-dimensional code related to the URL is generated by the mobile terminal, the mobile terminal may directly display the two-dimensional code related to the URL or send the two-dimensional code related to the URL to other devices for processing, such as printing, storing, and the like. The network device may obtain the information it needs by accessing its database or communicating with the device providing the wireless access point, etc. The mobile terminal may obtain the information it needs by accessing its database, or communicating with a network device or device providing a wireless access point, etc.
the scheme is particularly suitable for occasions needing access protection on network resources shared through two-dimensional codes, the URL character strings can be generated according to the URL prefix character strings and the URL parameter character strings of the network resources, the URL character strings are subjected to coding conversion, the coded URL character strings are used for generating corresponding two-dimensional codes through a two-dimensional code generating tool, and users needing to access the network resources can obtain the coded URLs through scanning the two-dimensional codes. The generated two-dimensional code can be displayed in various ways, such as being printed on paper, being displayed by a mobile terminal through a screen after being distributed to the mobile terminal by a network device generating the two-dimensional code, being displayed by the mobile terminal generating the two-dimensional code through the screen, and the like.
In some embodiments, the URL prefix string may contain three parts: a character string for specifying a network access protocol (hereinafter simply referred to as a "network access protocol character string"), a character string for specifying an address of a server where a network resource is located (hereinafter simply referred to as a "server address character string"), and a character string for specifying a storage path of the network resource on the server (hereinafter simply referred to as a "storage path character string").
The net access Protocol string is used to indicate the mode of accessing network resources, and many kinds of net access protocols are currently used on the internet, and the most commonly used net access Protocol is HTTP (Hypertext Transfer Protocol), for example, the net access Protocol string used in the scene of accessing website content is "HTTP://".
The server address character string is used for indicating an internet access address corresponding to a server storing network resources, and comprises two parts: an IP Address (Internet Protocol Address) and a port number. Each network access protocol has a default port number corresponding to itself, and if only the network access protocol and the IP address are indicated, the port number used by the network access is indicated as the default port number corresponding to the network access protocol. For example, the default port number for the network access protocol HTTP is 80, and the front portion of the URL prefix string is "HTTP:// 202.114.35.24", which indicates that 80 ports of servers with IP addresses "202.114.35.24" are to be accessed via the HTTP protocol. Because the digital form of the IP address is only convenient for reading by a machine and is not beneficial to understanding and memorizing of people, the Internet develops a domain name technology, the domain name and the IP address are mutually mapped, a user can conveniently access the Internet, the address of the current Internet server is basically represented in the form of the domain name, and the domain name is converted into the IP address through DNS service. For example, the front part of the URL prefix string is "FTP:// www.xxx.com: 8080", and the IP address obtained by domain name resolution is "202.114.35.24" for the domain name "www.xxx.com", which indicates that the 8080 port of the server with the IP address "202.114.35.24" is accessed by the FTP protocol.
In addition, the server address string may also contain user account and password information for providing login information to network resources that require further authentication. For example, the URL prefix string may be preceded by "HTTP:// gust: 123456@ www.xxx.com: 8080" indicating that the 8080 port of the server with domain name "www.xxx.com" is accessed by the HTTP protocol with user account "gust" and account password "123456".
The storage path character string is used for locating the path of the network resource, namely the storage position of the network resource such as an HTML file, a picture, a video or an application program and the like on the server. When the storage position of the network resource on the server is expressed, two ways of display or implicit expression can be used. The display mode clearly indicates the directory and the file name of the network resource to be accessed, and is expressed in the form of directory + file name, for example, the storage path character string is "/w/z/n" in one scene, which indicates that the network resource to be accessed is the file "n" in the server directory "/w/z/".
Implicit is to only indicate the directory of the network resource to be accessed, and the expression is in the form of only directory, where the directory ends with "/", for example, the storage path character string is "/w/z/n/", and the network resource actually accessed at this time is a default file under the server directory "/w/z/n/", and this default file is usually index. For example, the network resource actually accessed when the storage path string is expressed as "/w/z/n/" is the network resource accessed when the storage path string is expressed as "/w/z/n/index. html" or "/w/z/n/default. htm". Implicit methods can be used to simplify the representation of the memory path string.
in some embodiments, a URL parameter string may be used to indicate the relevant resource parameter. In this embodiment, the resource parameter may include access information of a wireless access point (i.e., a wifi hotspot) corresponding to the URL parameter string, and may also include other parameters related to configuration and parameters related to service functions. In some embodiments, the access information of the wireless access point may include a wireless access point name, such as an ssid (service Set identifier), and an access password, such as an access identity, for providing necessary authentication information to the wireless access point. Other configuration parameters for the wireless access point may also include, but are not limited to: the router MAC address, the encryption mode of the wireless access point, the signal intensity and the communication channel of the wireless access point and the like; the communication channel may be, for example, a data signal transmission channel using a wireless signal as a transmission medium, i.e., a wireless "frequency band". Parameters related to the service function include, but are not limited to, the following parameters: sharing a user, a client version number and a source channel; the sharing user indicates which user carries out information sharing; the source channel indicates the source channel of the user, e.g., from which partner or provider the user came from, etc.
As a preferred embodiment, in step S101, the following processing steps may be specifically adopted when acquiring the URL parameter character string: resource parameters are first obtained for a URL and then assembled into a URL parameter string in the form of a URL key-value pair. For example, there are two resource parameters p and s for a URL, the corresponding parameter values are "gst" and "ft", respectively, the resource parameters are assembled into a URL key-value pair format, and the generated URL parameter character string is "p ═ gst & s ═ ft".
Taking a scene of sharing a wifi password among users as an example, one user wants to share the password of one wifi hotspot to another user through a mobile terminal, wherein the user sharing the password of the wifi hotspot, namely the sharing user, has installed an application with an information sharing function on the mobile terminal, and has already obtained the SSID and the password of the wifi hotspot through the application, and the mobile terminal of another user has installed the application or an application of a partner of the application. Here, the partner refers to a third-party vendor that has a cooperative agreement with the application, and the third-party vendor can know technical information such as an external interface and an internal mechanism provided by the application through the cooperative agreement.
The sharing user generates a corresponding two-dimensional code by using the function of generating the wifi hotspot information in the application, and the two-dimensional code is scanned and acquired by another user. Here, the application may retrieve a URL prefix string from a built-in database, such as a retrieved URL prefix string like "http:// www.wifi.com/w/z/n". The resource parameters for the URL may come from multiple channels. For example, a partial URL parameter character string assembled by applying partial parameters acquired from a built-in database, for example, "ssid ═ wifi123456& pass ═ 123456& mac ═ 0c729c229d29& encryption ═ wpa-psk". And the application also dynamically acquires another part of parameters from the connected wifi hotspot to assemble another part of URL parameter character string, for example, "signal 45& channel 10". Finally, the two URL parameter character strings are assembled into a URL parameter character string of "ssid" 123456& pass & mac & 456& mac & 0c729c229d29& encryption & wpa-psk & signal & 45& channel & 10 ".
in some embodiments, the URL parameter string may also contain service function parameters related to the URL, which may be obtained by the application from the application information; for example, the application assembles a character string "shareurer & user1& version & 2.0.8& source & basic" according to the obtained service function parameters about the URL, and assembles the three character strings into a URL parameter character string "ssid & wifi123456& pass & 123456& mac & 0c729c229d29& encryption & wpa-psk & signal & 45& channel & 10& shareurer & user1& version & 2.0.8& source & basic".
for example, the connector may be "?". for example, in an embodiment where the URL prefix string is "HTTP:// www.xxx.com/w/z/n" and the URL parameter string is "p ═ gst & s ═ ft", the URL prefix string and the URL parameter string are connected by the connector "?" to obtain a string of "HTTP:// www.xxx.com/w/z/n? p ═ gst & s ═ ft", the URL prefix string is "www.xxx.com/w/z/n" and the URL parameter string is a final string of the URL obtained in the aforementioned embodiment where the URL parameter string is shared among users, the URL parameter string is a final string of the URL shared by the users
“http://www.wifi.com/w/z/n?ssid=wifi123456&pass=123456&mac=0c729c229d29&encryption=wpa-psk&signal=45&channel=10&shareuser=user1&version=2.0.8&source=baidu”。
The obtained URL character string is a complete network resource URL, and any user can access the corresponding network resource after obtaining the URL character string. Under the scene that network resource access needs to be protected, it is not feasible to directly provide URL character strings for resource access users, because it cannot be guaranteed that the users accessing the resources are permitted; therefore, a mechanism is needed to protect the URL string, so that only the user with access permission can obtain the URL string and perform resource access.
In some embodiments of the present application, the generated URL string, i.e. the URL in the form of plaintext, is converted into another string, i.e. the URL in the form of ciphertext, by a transcoding method; the user who obtains the access permission can simultaneously know the method for restoring the URL in the form of the ciphertext into the URL character string, namely the URL in the form of the plaintext, and accesses the corresponding network resource through the URL in the form of the plaintext; a user who cannot get access permission cannot get a URL in a plain text form, and thus cannot access a corresponding resource.
Here, there are various rules for transcoding a character string. In some embodiments, the string of characters may be encoded using an encoding algorithm or encrypted using an encryption algorithm. The encoding algorithm is used to convert the string into an unreadable encoded form, using a more extensive encoding algorithm such as the Base64 encoding algorithm. In the foregoing embodiment of sharing wifi hotspot cipher among users, the result string obtained after encoding the URL string using Base64 encoding algorithm may be, for example, "aHR 0cDovL3d3dy53 awzpplmvnvbs 93L3ovbj9zc2 lkpxzckxmjm 0NTYmcGFzcz0 xmjwfwfjptbji 5 yziiaqysqyszlbnnxb 0aW9 udys 1wc2smc2 lnbfsptq 1 jmnnoyw 5uZWw9MTAmc2 hcmc 2 hccmvc 1 vzvzvzxxjnznncnnpb 249 4 wjgcc 291 cmnlpwwr 1Cg ═ zhahawr".
the symmetric encryption algorithm uses a key pair consisting of two different keys, one key is used in encryption, the other key in the key pair is used in decryption, the keys in the key pair are called a public key and a private key, the public key can be disclosed to the outside, the private key must be kept secret, the symmetric encryption algorithm has a fast encryption speed, but one difficulty in using the symmetric encryption algorithm in a network environment is the transmission of the keys, the keys are likely to be leaked by eavesdropping in a clear text form, the asymmetric encryption algorithm can avoid the difficult problem of transmission of the symmetric encryption algorithm in the network environment because data encrypted by the public key can only be decrypted by the private key, even if the public key cannot decrypt data encrypted by the public key, the sender encrypts data encrypted by using the public key provided by the receiver, the receiver decrypts data by using the private key held by the receiver, the symmetric encryption algorithm can not decrypt data encrypted by the private key provided by the public key provided by the receiver, the receiver data encrypted by the private key can not be decrypted by the secret key provided by the symmetric encryption algorithm, such as HTTP key 357, the URL 3, the symmetric encryption algorithm can decrypt data transmitted by the encrypted by the URL 35, the URL 3, the symmetric encryption algorithm can not only can be decrypted by the secret key p3, the secret key p3 can be decrypted by the secret key 35, the secret key p3, the secret key can be used in the symmetric encryption algorithm, the URL 3 can be decrypted by the secret key 35, the secret key of the URL 3, the symmetric encryption algorithm, the URL 3 can be decrypted by the secret key, the secret key of the URL 3 can be ensured by the secret key of the secret key 3, the secret key of the secret.
In addition, in order to facilitate the resource access user to obtain the coded or encrypted character string, a simple way of acquiring the character string to the mobile terminal can be provided for the user, and a way of manually typing the coded or encrypted character string word by the resource access user is not preferable. In some embodiments of the application, a two-dimensional code mode is adopted to obtain the encrypted URL character string, and the two-dimensional code is used as a simple, convenient and easy-to-use information encoding mode, and can be used for information sharing among resource access users or for the resource access users to obtain various scenes such as information services provided by a public service provider.
Specifically, the encoded or encrypted URL character string is generated into a two-dimensional code related to the URL, and this step requires a two-dimensional code generation tool to encode and convert the obtained encoded or encrypted URL character string, so as to finally obtain an image expressed according to a certain rule. For example, a two-dimensional code image generated by the two-dimensional code generation tool through the encoded URL character string obtained in the embodiment in which the users share the wifi password is shown in fig. 2.
the embodiment of the present application further provides a method for analyzing a two-dimensional code at a mobile terminal, as shown in fig. 3, the method specifically includes the following steps:
Step S201, starting a scanning unit to scan the two-dimensional code;
step S202, analyzing the two-dimensional code to obtain an encoded URL character string;
step S203, if the scanning unit belongs to a first target application, the first target application decodes the coded URL character string and extracts access information for connecting a network from a URL parameter character string contained in the decoded URL character string;
And step S204, trying to connect the network according to the access information.
The scheme is used for analyzing and decoding the two-dimensional code about the URL generated in the scheme to obtain access information, and then connecting a network according to the access information. One object of the present application is to avoid accessing the network through an unauthorized application, and therefore, a character string about a URL obtained by scanning a two-dimensional code by a user is an encoded URL character string, i.e., a ciphertext character string, and cannot be directly accessed to the network through the ciphertext character string, and the user can decode the ciphertext character string only by scanning the two-dimensional code using the authorized application to obtain the URL character string in a plaintext form and access the corresponding network through the URL character string.
The scheme firstly needs to scan the two-dimensional code generated by the scheme and related to the URL. In step S201, the scanning device for scanning the two-dimensional code may include a camera, a scanning gun, and other devices that facilitate image recognition, the scanning unit is a component in an application, the component obtains the two-dimensional code image from the scanning device and transfers the two-dimensional code image to the application, and the application is an application program running in the mobile terminal, and the function of the scanning device may be used through the scanning unit component. After the scanning unit transmits the two-dimensional code image to the application, the application analyzes the two-dimensional code image, and the two-dimensional code is analyzed through format information carried in the two-dimensional code image to obtain the coded URL character string.
After the encoded URL character string is obtained, the encoded URL character string must be decoded to obtain a decoded URL character string, access information for connecting a network can be obtained from the decoded URL character string, and then network connection is attempted by using the access information, wherein the decoded URL character string comprises a URL parameter character string, and the access information is located in the URL parameter character string. In step S203, the first target application refers to a mobile terminal application that obtains a full authorization, where the full authorization includes: decoding the URL string also enables extraction of access information from the decoded URL string, for example, the provider of the first target application is the provider of the two-dimensional code, the provider generates the two-dimensional code of its own home and also provides the first target application for decoding the two-dimensional code of its own home, and the first target application can directly decode and extract the access information from the URL string. The first target application comprises a scanning unit used for obtaining a two-dimensional code image.
in addition, the two-dimensional code may be scanned by using a second target application, where the second target application refers to a partially authorized mobile terminal application, for example, a provider of the second target application may be a partner of the provider of the two-dimensional code, and a decoding method for obtaining the URL string from the provider of the two-dimensional code is obtained, but a method for extracting the access information from the decoded URL string is not obtained. After the two-dimensional code is scanned by using the scanning unit of the second target application to obtain the encoded URL character string, the second target application can decode the encoded URL character string to obtain the decoded URL character string, but access information for connecting a network cannot be obtained from the decoded URL character string, so that the URL character string decoded by the second target application can only be used for downloading the first target application and cannot be used for direct networking. Meanwhile, the second target application is not limited to one application, and may be a plurality of applications, for example, a mobile terminal application with a two-dimensional code scanning function provided by each of a plurality of partners of the provider of the two-dimensional code. The decoded URL string obtained by the second target application contains the network resource for obtaining the first target application, and the first target application is downloaded in the second application through the network resource, and usually access confirmation of the user needs to be obtained, so that prompt information can be presented to the user to inform the user that access confirmation of the user accessing the network resource needs to be obtained, and after the confirmation operation of the prompt information by the user is obtained, the mobile terminal accesses the network resource indicated by the decoded URL string. Here, the network resource may be an installation package of the first target application, the user may access the network resource to download the installation package of the first target application, and after the first target application is downloaded and installed, the user may scan the two-dimensional code through the first target application to obtain access information for connecting to a network, and attempt to connect to the network according to the access information.
In addition to scanning the two-dimensional code by using the first target application and the second target application, other mobile terminal applications with a two-dimensional code scanning function can also scan the two-dimensional code, but these applications can only obtain the encoded URL character string and do not know the corresponding decoding method, so that the decoded URL character string cannot be obtained, and therefore, the network resource indicating the download position of the installation package of the first target application cannot be obtained, not to mention that the access information of the connected network is obtained. Therefore, the user who installs the corresponding authorized application can directly or indirectly obtain the access information of the connection network from the two-dimensional code and try to connect the network, the connection of the user who does not install the authorized application to the network is avoided, the access control of the network connection user is realized, and the access safety of the network is improved.
some embodiments of the present application also provide a mobile terminal comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the terminal to perform the aforementioned method of parsing a two-dimensional code at the mobile terminal.
Some embodiments of the present application also provide an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform the aforementioned method of generating a two-dimensional code at the device side.
Some embodiments of the present application also provide a computer readable medium, on which computer readable instructions are stored, where the computer readable instructions are executable by a processor to implement the foregoing method for parsing a two-dimensional code at a mobile terminal and the method for generating a two-dimensional code at a device side.
To sum up, the scheme provided by some embodiments of the present application can encode access information for connecting a network and display the encoded access information to a user in the form of a two-dimensional code, the user can decode the encoded access information only through a mobile terminal installed with a corresponding authorized application to obtain the access information, and tries to connect the network according to the access information, and a mobile terminal not installed with an authorized application cannot decode the encoded access information obtained by scanning the two-dimensional code, so that the network cannot be accessed, thereby improving the access security of the network.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the present application comprises a device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or a solution according to the aforementioned embodiments of the present application.
it will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware.
Claims (14)
1. A method for analyzing a two-dimensional code at a mobile terminal comprises the following steps:
Starting a scanning unit to scan the two-dimensional code;
Analyzing the two-dimensional code to obtain an encoded URL character string;
If the scanning unit belongs to a first target application, the first target application decodes the coded URL character string and extracts access information for connecting a network from a URL parameter character string contained in the decoded URL character string;
And attempting to connect to the network according to the access information.
2. The method of claim 1, wherein the method further comprises:
if the scanning unit belongs to a second target application, the second target application decodes the coded URL character string to obtain a decoded URL character string;
And presenting prompt information to the user to prompt the user to access the network resource indicated by the URL.
3. The method of claim 2, wherein the method further comprises:
and responding to the confirmation operation of the user on the prompt message, and accessing the network resource indicated by the URL character string.
4. the method of claim 3, wherein the network resource indicated by the URL string comprises an installation package of the first target application.
5. a method for generating a two-dimensional code at a device side comprises the following steps:
Acquiring a URL prefix character string and a URL parameter character string, wherein the URL parameter character string comprises access information for connecting a network;
generating a URL character string according to the URL prefix character string and the URL parameter character string;
encoding the URL character string to obtain an encoded URL character string;
and generating a two-dimensional code related to the URL according to the coded URL character string.
6. The method of claim 5, wherein generating a URL string from a URL prefix string and a URL parameter string comprises:
And connecting the URL prefix character string and the URL parameter character string by a connector in sequence to generate the URL character string.
7. the method of claim 5, wherein obtaining a URL parameter string comprises:
Resource parameters about a URL are obtained, and the resource parameters are assembled into a URL parameter character string in the form of a URL key-value pair.
8. The method of claim 7, wherein the resource parameters for the URL include at least access information of a wireless access point.
9. The method of claim 8, wherein the resource parameters for a URL further include one or more of the following information: router MAC address, router encryption mode, router signal strength, communication channel, sharing user, client version number and source channel.
10. The method of claim 5, wherein transcoding the URL string to obtain an encoded URL string comprises:
Acquiring the URL character string;
And coding the URL character string according to a preset coding rule to obtain the coded URL character string.
11. The method of claim 5, wherein the preset encoding rule comprises a symmetric encryption algorithm and/or an asymmetric encryption algorithm.
12. A mobile terminal comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the mobile terminal to perform the method of any of claims 1 to 4.
13. An apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform the method of any of claims 5 to 11.
14. A computer readable medium having computer readable instructions stored thereon which are executable by a processor to implement the method of any one of claims 1 to 13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810276387.1A CN110555175A (en) | 2018-03-30 | 2018-03-30 | Two-dimensional code analyzing and generating method and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810276387.1A CN110555175A (en) | 2018-03-30 | 2018-03-30 | Two-dimensional code analyzing and generating method and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110555175A true CN110555175A (en) | 2019-12-10 |
Family
ID=68733757
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810276387.1A Pending CN110555175A (en) | 2018-03-30 | 2018-03-30 | Two-dimensional code analyzing and generating method and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110555175A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111130958A (en) * | 2019-12-18 | 2020-05-08 | 广东美的厨房电器制造有限公司 | Data transmission method and device, electronic equipment and storage medium |
CN115348593A (en) * | 2022-10-13 | 2022-11-15 | 深圳市华曦达科技股份有限公司 | Router configuration method, device and system |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102724668A (en) * | 2012-06-15 | 2012-10-10 | 惠州Tcl移动通信有限公司 | Method and system for sharing WIFI (wireless fidelity) network information on basis of two-dimensional code graphs |
CN103415012A (en) * | 2013-08-15 | 2013-11-27 | 惠州Tcl移动通信有限公司 | Authentication method and authentication device of wireless router |
US20140018105A1 (en) * | 2012-07-12 | 2014-01-16 | Brian K. O'Neil | Method and System for Logic-Based Uniform Resource Locator Resolution |
US20140115708A1 (en) * | 2012-10-18 | 2014-04-24 | Dell Products L.P. | Secure information handling system matrix bar code |
CN104202745A (en) * | 2014-09-16 | 2014-12-10 | 腾讯科技(深圳)有限公司 | Wireless network configuration information sharing method, terminal and communication system |
CN105025486A (en) * | 2014-04-28 | 2015-11-04 | 腾讯科技(深圳)有限公司 | Network connection method and user equipment |
CN105165069A (en) * | 2013-11-19 | 2015-12-16 | 华为终端有限公司 | Method for accessing Wi-Fi hotspot device, Wi-Fi hotspot device, and user equipment |
CN105472694A (en) * | 2014-09-05 | 2016-04-06 | 腾讯科技(深圳)有限公司 | Method and device for accessing WiFi through scanning two-dimensional code |
CN105516170A (en) * | 2015-12-24 | 2016-04-20 | 北京金山安全软件有限公司 | Wi-Fi hotspot information sharing and connecting method and device and electronic equipment |
CN106301777A (en) * | 2016-08-03 | 2017-01-04 | 国家计算机网络应急技术处理协调中心 | Quick Response Code encrypted transmission method and system |
CN107231602A (en) * | 2016-03-24 | 2017-10-03 | 佳能株式会社 | Communicator and its control method |
-
2018
- 2018-03-30 CN CN201810276387.1A patent/CN110555175A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102724668A (en) * | 2012-06-15 | 2012-10-10 | 惠州Tcl移动通信有限公司 | Method and system for sharing WIFI (wireless fidelity) network information on basis of two-dimensional code graphs |
US20140018105A1 (en) * | 2012-07-12 | 2014-01-16 | Brian K. O'Neil | Method and System for Logic-Based Uniform Resource Locator Resolution |
US20140115708A1 (en) * | 2012-10-18 | 2014-04-24 | Dell Products L.P. | Secure information handling system matrix bar code |
CN103415012A (en) * | 2013-08-15 | 2013-11-27 | 惠州Tcl移动通信有限公司 | Authentication method and authentication device of wireless router |
CN105165069A (en) * | 2013-11-19 | 2015-12-16 | 华为终端有限公司 | Method for accessing Wi-Fi hotspot device, Wi-Fi hotspot device, and user equipment |
CN105025486A (en) * | 2014-04-28 | 2015-11-04 | 腾讯科技(深圳)有限公司 | Network connection method and user equipment |
CN105472694A (en) * | 2014-09-05 | 2016-04-06 | 腾讯科技(深圳)有限公司 | Method and device for accessing WiFi through scanning two-dimensional code |
CN104202745A (en) * | 2014-09-16 | 2014-12-10 | 腾讯科技(深圳)有限公司 | Wireless network configuration information sharing method, terminal and communication system |
CN105516170A (en) * | 2015-12-24 | 2016-04-20 | 北京金山安全软件有限公司 | Wi-Fi hotspot information sharing and connecting method and device and electronic equipment |
CN107231602A (en) * | 2016-03-24 | 2017-10-03 | 佳能株式会社 | Communicator and its control method |
CN106301777A (en) * | 2016-08-03 | 2017-01-04 | 国家计算机网络应急技术处理协调中心 | Quick Response Code encrypted transmission method and system |
Non-Patent Citations (1)
Title |
---|
戴晟晖: "《微信公众平台搭建,开发与实践指南》", 30 November 2014 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111130958A (en) * | 2019-12-18 | 2020-05-08 | 广东美的厨房电器制造有限公司 | Data transmission method and device, electronic equipment and storage medium |
CN115348593A (en) * | 2022-10-13 | 2022-11-15 | 深圳市华曦达科技股份有限公司 | Router configuration method, device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10972908B2 (en) | Wireless network connection method, apparatus, and system | |
JP6384699B2 (en) | Token-based authentication and authorization information signaling and exchange for adaptive streaming | |
US10904227B2 (en) | Web form protection | |
US9979725B1 (en) | Two-way authentication using two-dimensional codes | |
CN109067739B (en) | Communication data encryption method and device | |
WO2019134303A1 (en) | Live stream room popularity processing method and apparatus, server and storage medium | |
US10708326B2 (en) | Secure media casting bypassing mobile devices | |
CN115037552B (en) | Authentication method, device, equipment and storage medium | |
CN104579657A (en) | Method and device for identity authentication | |
US20230217248A1 (en) | Account binding method, control device, and smart device | |
CN111049832B (en) | Reverse proxy method and related device | |
KR102038963B1 (en) | Method and Apparatus for Selectively Providing Protection of Screen information data | |
CN110555175A (en) | Two-dimensional code analyzing and generating method and equipment | |
CN110321498A (en) | A kind of two dimensional code generates and analyzing method and device | |
CN114978637A (en) | Message processing method and device | |
CN112040279B (en) | Audio and video playing method and storage medium for self-defined DRM (digital rights management) | |
JP2023532976A (en) | Method and system for verification of user identity | |
WO2021129681A1 (en) | Scheduling method and apparatus, and medium and device | |
CN110061949B (en) | Method and device for acquiring information | |
CN109274765B (en) | Data transmission method, equipment and system | |
JP2006244420A (en) | Identification information generation management device, and its system and program | |
CN104994078A (en) | Information sending method, information acquisition method, information sending device, information acquisition device, and information processing system in local area network | |
KR100704701B1 (en) | Method and Apparatus for editing music source using DRM in PC | |
Bressoud et al. | Authentication and Authorization | |
KR20110085384A (en) | Method for leading web site connection for emergency when dos/ddos generate |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191210 |
|
RJ01 | Rejection of invention patent application after publication |