CN105574453B - Two-dimensional code processing method and mobile terminal - Google Patents

Two-dimensional code processing method and mobile terminal Download PDF

Info

Publication number
CN105574453B
CN105574453B CN201410529606.4A CN201410529606A CN105574453B CN 105574453 B CN105574453 B CN 105574453B CN 201410529606 A CN201410529606 A CN 201410529606A CN 105574453 B CN105574453 B CN 105574453B
Authority
CN
China
Prior art keywords
mobile terminal
dimensional code
condition parameter
data
range
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
CN201410529606.4A
Other languages
Chinese (zh)
Other versions
CN105574453A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410529606.4A priority Critical patent/CN105574453B/en
Publication of CN105574453A publication Critical patent/CN105574453A/en
Application granted granted Critical
Publication of CN105574453B publication Critical patent/CN105574453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A two-dimension code processing method and a mobile terminal are provided, the method comprises the following steps: analyzing the two-dimensional code obtained by scanning to obtain an effective range of condition parameters contained in the two-dimensional code; acquiring a value of a condition parameter of the mobile terminal; and determining whether the two-dimensional code is effective according to the effective range of the condition parameters and the value of the condition parameters of the mobile terminal, so that the aim of providing services for part of mobile terminals can be effectively fulfilled.

Description

Two-dimensional code processing method and mobile terminal
Technical Field
The invention relates to the field of computer application, in particular to a two-dimensional code processing method and a mobile terminal.
Background
With the rapid development of the mobile internet and the continuous popularization of smart phones, some important information is increasingly borne by the two-dimensional codes, and the two-dimensional code scanning and information reading are gradually integrated into the life of people and become an important means for information reading.
The two-dimensional code is a two-dimensional bar code symbol represented by a binary code stream after error correction coding is carried out on information such as characters, images and the like through a new coding scheme based on a traditional bar code, and data symbol information is recorded by a bar/space-alternated graph which is distributed on a screen according to a certain rule by using a certain specific geometric figure. Compared with the traditional unique code, the two-dimensional code has the characteristics of high information capacity, strong error correction capability, independence on database support and the like, and is widely applied to the aspects of certificate identification, logistics, electronic data exchange and the like at present.
In the prior art, a user can acquire data in a two-dimensional code after scanning the two-dimensional code through a mobile phone, and use the data to realize a corresponding function, no limitation is imposed on relevant conditions of the user, a function of allowing only a part of people to use the data in the two-dimensional code cannot be realized, and the use of the two-dimensional code is limited.
Disclosure of Invention
In view of this, the present invention provides a two-dimensional code processing method and a mobile terminal, which are used to solve the problem that in the prior art, a two-dimensional code cannot implement a function of allowing only a part of data in the two-dimensional code to be used.
The two-dimensional code processing method provided by the embodiment of the invention comprises the following steps:
analyzing the two-dimensional code obtained by scanning to obtain the effective range of the condition parameters contained in the two-dimensional code;
acquiring the value of the condition parameter of the mobile terminal;
and determining whether the two-dimensional code is valid according to the valid range of the condition parameter and the value of the condition parameter of the mobile terminal.
The mobile terminal provided by the embodiment of the invention comprises:
the first acquisition module is used for analyzing the two-dimensional code obtained by scanning to acquire an effective range of condition parameters contained in the two-dimensional code;
a second obtaining module, configured to obtain the value of the condition parameter of the mobile terminal after the first obtaining module obtains the valid range of the condition parameter;
and the determining module is used for determining whether the two-dimensional code is valid according to the valid range of the condition parameter and the value of the condition parameter of the mobile terminal after the second obtaining module obtains the value of the condition parameter of the mobile terminal.
The embodiment of the invention provides a two-dimensional code processing method and a mobile terminal, wherein the method comprises the following steps: the mobile terminal analyzes the two-dimensional code obtained by scanning to obtain the effective range of the condition parameters contained in the two-dimensional code, obtains the value of the condition parameters of the mobile terminal, and determines whether the two-dimensional code is effective or not according to the effective range of the condition parameters and the value of the condition parameters of the mobile terminal, so that the mobile terminal can use the two-dimensional code only under the condition that the two-dimensional code is determined to be effective, and the purpose that only the mobile terminal meeting the conditions is allowed to use the two-dimensional code can be effectively realized.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
Fig. 1 is a schematic diagram of a structure of a mobile terminal in an embodiment of the present invention;
fig. 2 is a schematic diagram of a processing method of a two-dimensional code according to an embodiment of the present invention;
fig. 3 is another schematic diagram of a two-dimensional code processing method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of the structure of a mobile terminal according to an embodiment of the present invention;
fig. 5 is another schematic diagram of the structure of the mobile terminal in the embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description of the embodiments, structures, features and effects according to the present invention will be made with reference to the accompanying drawings and preferred embodiments.
Fig. 1 is a block diagram of a mobile terminal according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal 100 includes a memory 102, a memory controller 104, one or more processors 106 (only one shown), a peripheral interface 108, a radio frequency module 110, a positioning module 112, a camera module 114, an audio module 116, a touch screen 118, and a key module 120. These components communicate with each other via one or more communication buses/signal lines 122.
It is to be understood that the configuration shown in fig. 1 is merely exemplary, and that the mobile terminal 100 may include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
The memory 102 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for processing a two-dimensional code in a mobile terminal according to the embodiments of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, so as to implement the above-mentioned method for processing a two-dimensional code in a mobile terminal.
The memory 102 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 102 may further include memory located remotely from processor 106, which may be connected to terminal device 100 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. Access to the memory 102 by the processor 106, and possibly other components, may be under the control of the memory controller 104.
Peripheral interface 108 couples various input/output devices to the CPU and memory 102. The processor 106 executes various software, instructions within the memory 102 to perform various functions of the terminal device 100 and to perform data processing.
In some embodiments, the peripheral interface 108, the processor 106, and the memory controller 104 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The rf module 110 is used for receiving and transmitting electromagnetic waves, and implementing interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The rf module 110 may include various existing circuit elements for performing these functions, such as an antenna, an rf transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The rf module 110 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols, and technologies, including, but not limited to, Global System for Mobile Communication (GSM), Enhanced Mobile Communication (Enhanced Data GSM Environment, EDGE), wideband Code division multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), bluetooth, Wireless Fidelity (WiFi) (e.g., Institute of Electrical and Electronics Engineers (IEEE) standard IEEE802.11 a, IEEE802.11 b, IEEE802.1 g, and/or IEEE802.11 n), Voice over internet protocol (VoIP), world wide mail Access (Wireless for Microwave, Mobile telecommunications), Wi-Max, and any other suitable protocols for instant messaging, and may even include those protocols that have not yet been developed.
The positioning module 112 is used for acquiring the current position of the terminal device 100. Examples of the positioning module 112 include, but are not limited to, a global positioning satellite system (GPS), a wireless local area network-based positioning technology, or a mobile communication network-based positioning technology.
The camera module 114 is used to take a picture or video. The pictures or videos taken may be stored in the memory 102 and transmitted through the radio frequency module 110.
Audio module 116 provides an audio interface to a user that may include one or more microphones, one or more speakers, and audio circuitry. The audio circuitry receives audio data from the peripheral interface 108, converts the audio data to electrical information, and transmits the electrical information to the speaker. The speaker converts the electrical information into sound waves that the human ear can hear. The audio circuitry also receives electrical information from the microphone, converts the electrical information to voice data, and transmits the voice data to the peripheral interface 108 for further processing. The audio data may be retrieved from the memory 102 or through the radio frequency module 110. In addition, the audio data may also be stored in the memory 102 or transmitted through the radio frequency module 110. In some examples, the audio module 116 may also include an earphone jack for providing an audio interface to a headset or other device.
The touch screen 118 provides both an output and an input interface between the terminal device 100 and the user. In particular, the touch screen 118 displays video output to the user, the content of which may include text, graphics, video, and any combination thereof. Some of the output results are for some of the user interface objects. The touch screen 118 also receives user inputs, such as user clicks, swipes, and other gesture operations, for the user interface objects to respond to these user inputs. The technique of detecting user input may be based on resistive, capacitive, or any other possible touch detection technique. Specific examples of touch screen 118 display units include, but are not limited to, liquid crystal displays or light emitting polymer displays.
The key module 120 also provides an interface for a user to input to the terminal device 100, and the user can press different keys to cause the terminal device 100 to perform different functions.
Referring to fig. 2, an embodiment of a two-dimensional code processing method according to an embodiment of the present invention includes:
201. analyzing the two-dimensional code obtained by scanning to obtain an effective range of condition parameters contained in the two-dimensional code;
in the embodiment of the invention, the mobile terminal can start the scanned application program, scan the two-dimensional code, and analyze the scanned two-dimensional code to obtain the effective range of the condition parameters contained in the two-dimensional code.
The condition parameter may be a limit parameter set by a two-dimensional code producer so that only a part of people can use the two-dimensional code, and for example, the condition parameter may be: geographic location information, an operator to which the mobile phone number belongs, a service opened by a customer, and the like, and it should be noted that the condition parameter may be set according to a specific situation, which is not limited herein.
In the embodiment of the present invention, the position of the effective range of the condition parameter in the two-dimensional code may be determined according to the data structure of the two-dimensional code, which is not limited herein.
202. Acquiring a value of a condition parameter of the mobile terminal;
in the embodiment of the present invention, the mobile terminal will obtain the value of the condition parameter in the mobile terminal according to the valid range of the obtained condition parameter, for example: and if the condition parameter is the geographic position information, acquiring the geographic position information of the mobile terminal, and if the condition parameter is the operator to which the mobile phone number belongs, acquiring the operator to which the mobile phone number on the mobile terminal belongs.
203. And determining whether the two-dimensional code is valid according to the valid range of the condition parameters and the value of the condition parameters of the mobile terminal.
In the embodiment of the invention, the mobile terminal can determine whether the two-dimensional code obtained by scanning is valid according to the valid range of the condition parameter and the value of the condition parameter of the mobile terminal.
Specifically, the mobile terminal will determine whether the value of the condition parameter of the mobile terminal is within the effective range of the obtained condition parameter; if so, determining that the two-dimension code is valid; if not, determining that the two-dimensional code is invalid.
If the mobile terminal determines that the scanned two-dimensional code is valid, the mobile terminal may continue to use the data included in the two-dimensional code, for example, if the two-dimensional code includes a link address of a web page, the mobile terminal opens the link address, and if the two-dimensional code includes a software upgrade package, the mobile terminal opens the software upgrade package and performs software upgrade.
If the mobile terminal determines that the two-dimensional code obtained by scanning is invalid, displaying prompt information of the invalid two-dimensional code on a display interface of the mobile terminal, and deleting the data of the two-dimensional code obtained by analysis, so that only the mobile terminal meeting the condition parameters in the two-dimensional code can normally use the two-dimensional code.
It should be noted that, the present invention describes the technical solution by taking the valid range of the condition parameter carried in the two-dimensional code as an example, in practical application, the usage of the two-dimensional code by a part of users can be limited by carrying the invalid range of the condition parameter in the two-dimensional code, so that if the value of the condition parameter of the mobile terminal is within the invalid range of the condition parameter obtained from the two-dimensional code, it is determined that the two-dimensional code is invalid, and if the value of the condition parameter of the mobile terminal is not within the invalid range of the condition parameter obtained from the two-dimensional code, it is determined that the two-dimensional code is valid. Therefore, through the technical scheme in the embodiment of the invention, the setting of the use permission of the two-dimensional code can be effectively realized.
In the embodiment of the present invention, the mobile terminal analyzes the scanned two-dimensional code to obtain the valid range of the condition parameter included in the two-dimensional code, and obtains the value of the condition parameter of the mobile terminal, determines whether the two-dimensional code is valid according to the valid range of the condition parameter and the value of the condition parameter of the mobile terminal, and determines that the two-dimensional code is valid if the value of the condition parameter of the mobile terminal is within the valid range of the condition parameter, the mobile terminal can continue to use the data included in the two-dimensional code, determines that the two-dimensional code is invalid if the value of the condition parameter of the mobile terminal is not within the valid range of the condition parameter, displays the prompt information that the two-dimensional code is invalid on the display interface of the mobile terminal, and deletes the data of the two-dimensional code obtained by analysis. Only the mobile terminal with the condition parameter value in the effective range of the condition parameter contained in the two-dimensional code can use the two-dimensional code, and the purpose of providing service for part of mobile terminals can be effectively achieved.
Referring to fig. 3, an embodiment of a method for processing a two-dimensional code according to an embodiment of the present invention is shown, where a condition parameter is geographical location information, and the method includes:
301. analyzing the two-dimensional code obtained by scanning to obtain the effective range of the geographic position contained in the two-dimensional code;
in the embodiment of the invention, a producer of the two-dimensional code can place the effective range of the geographic position served by the producer in the generated two-dimensional code, and a user can scan the two-dimensional code through the scanning function on the mobile terminal of the user and analyze the scanned two-dimensional code to obtain the effective range of the geographic position contained in the two-dimensional code.
302. Acquiring current geographical position information of the mobile terminal;
in the embodiment of the present invention, the mobile terminal further obtains the current geographic location information of the mobile terminal, wherein the mobile terminal can start a Global Positioning System (GPS) Positioning function of the mobile terminal itself to determine the current geographic location information of the mobile terminal.
303. And determining whether the two-dimensional code is valid according to the valid range of the geographic position and the current geographic position information of the mobile terminal.
In the embodiment of the invention, the mobile terminal also determines whether the two-dimensional code is valid according to the valid range of the geographic position acquired from the two-dimensional code and the current geographic position information of the mobile terminal.
Specifically, the mobile terminal judges whether the current geographic position information of the mobile terminal is contained in the effective range of the geographic position acquired from the two-dimensional code; if so, the mobile terminal determines that the two-dimension code is valid; therefore, the mobile terminal can continue to use the data contained in the two-dimensional code, if not, the two-dimensional code is determined to be invalid, prompt information of the invalidity of the two-dimensional code is displayed on a display interface of the mobile terminal, and the analyzed data of the two-dimensional code is deleted.
It should be noted that, the present invention describes the technical solution by taking the valid range of the geographic location carried in the two-dimensional code as an example, in practical application, the usage of the two-dimensional code by a part of users may also be limited by the invalid range of the geographic location carried in the two-dimensional code, so that if the current geographic location information of the mobile terminal is within the invalid range of the geographic location acquired from the two-dimensional code, it is determined that the two-dimensional code is invalid, and if the current geographic location information of the mobile terminal is not within the invalid range of the geographic location acquired from the two-dimensional code, it is determined that the two-dimensional code is valid.
It should be noted that, in the embodiment of the present invention, the valid range of the geographic location may be the geographic location represented by longitude and latitude, for example, the shenzhen continental region location is 113 ° 46 ° to 114 ° 37', and the north latitude 22 ° 27 ° to 22 ° 52', or may be the address location represented by a doorplate address, for example: shenzhen Shennan Daolu No. 1 to No. 100. And the two representations can be switched.
In the embodiment of the invention, the mobile terminal analyzes the scanned two-dimensional code to obtain the effective range of the geographic position contained in the two-dimensional code, and obtains the current geographic position information of the mobile terminal, the two-dimensional code is determined to be effective according to the effective range of the geographic position and the current geographic position information of the mobile terminal, if the current geographic position information of the mobile terminal is contained in the effective range of the geographic position, the two-dimensional code is determined to be effective, the mobile terminal can continuously use other data contained in the two-dimensional code except the effective range of the geographic position, if the current geographic position information of the mobile terminal is not contained in the effective range of the geographic position, the two-dimensional code is determined to be invalid, the prompt information that the two-dimensional code is invalid is displayed on the display interface of the mobile terminal, and the analyzed two-dimensional code data is deleted, so that only the mobile terminal with the geographic position information in the effective range of the geographic position can use the data in the two-dimensional code, and the requirement for providing services for part of mobile terminals is met.
In order to better understand the technical solution in the embodiments of the present invention, a specific application scenario will be described below.
A company provides a certain service for a smartphone client in the shanghai region, and the service is not deployed in other regions, so that the longitude and latitude of the shanghai region are included in a two-dimensional code issued by the company on the internet.
The user A scans the two-dimensional code displayed on the webpage by using the smart phone, the smart phone analyzes and scans the effective range of the geographic position contained in the two-dimensional code, the effective range is the Shanghai region, and the smart phone acquires the geographic position information of the smart phone by using the GPS positioning function of the smart phone: the xu home of Shanghai city is determined to belong to the Shanghai region, and therefore the smart phone can use the service provided by a certain company for smart phone users in the Shanghai region.
Referring to fig. 4, an embodiment of a structure of a mobile terminal according to an embodiment of the present invention includes:
a first obtaining module 401, configured to analyze the two-dimensional code obtained by scanning to obtain an effective range of a condition parameter included in the two-dimensional code;
a second obtaining module 402, configured to obtain a value of the condition parameter of the mobile terminal after the first obtaining module 401 obtains the valid range of the condition parameter;
a determining module 403, configured to determine whether the two-dimensional code is valid according to the valid range of the condition parameter and the value of the condition parameter of the mobile terminal after the second obtaining module 402 obtains the value of the condition parameter of the mobile terminal.
The condition parameter may be a limit parameter set by a two-dimensional code producer so that only a part of people can use the two-dimensional code, and for example, the condition parameter may be: geographic location information, an operator to which the mobile phone number belongs, a service opened by a customer, and the like, and it should be noted that the condition parameter may be set according to a specific situation, which is not limited herein.
In the embodiment of the present invention, the position of the effective range of the condition parameter in the two-dimensional code may be determined according to the data structure of the two-dimensional code, which is not limited herein.
It should be noted that, the present invention describes the technical solution by taking the valid range of the condition parameter carried in the two-dimensional code as an example, in practical application, the usage of the two-dimensional code by a part of users can be limited by carrying the invalid range of the condition parameter in the two-dimensional code, so that if the value of the condition parameter of the mobile terminal is within the invalid range of the condition parameter obtained from the two-dimensional code, it is determined that the two-dimensional code is invalid, and if the value of the condition parameter of the mobile terminal is not within the invalid range of the condition parameter obtained from the two-dimensional code, it is determined that the two-dimensional code is valid. Therefore, through the technical scheme in the embodiment of the invention, the setting of the use permission of the two-dimensional code can be effectively realized.
In the embodiment of the present invention, the first obtaining module 401 of the mobile terminal analyzes the two-dimensional code obtained by scanning to obtain the effective range of the condition parameter included in the two-dimensional code; and the second obtaining module 402 obtains the value of the condition parameter of the mobile terminal; finally, the determining module 403 determines whether the two-dimensional code is valid according to the valid range of the condition parameter and the value of the condition parameter of the mobile terminal.
In the embodiment of the invention, the mobile terminal analyzes the scanned two-dimensional code to obtain the effective range of the condition parameter contained in the two-dimensional code, and obtains the value of the condition parameter of the mobile terminal, and determines whether the two-dimensional code is effective according to the effective range of the condition parameter and the value of the condition parameter of the mobile terminal, so that only the mobile terminal with the value of the condition parameter in the effective range of the condition parameter contained in the two-dimensional code can use the two-dimensional code, and the aim of providing service for part of mobile terminals can be effectively fulfilled.
For better understanding of the technical solution in the embodiment of the present invention, please refer to fig. 5, which is another embodiment of the structure of the mobile terminal in the embodiment of the present invention, including:
the first obtaining module 401, the second obtaining module 402, and the determining module 403 in the embodiment shown in fig. 4 are similar to those in the embodiment shown in fig. 4, and are not described herein again.
In this embodiment of the present invention, the determining module 403 includes:
a judging module 501, configured to judge whether a value of a condition parameter of the mobile terminal is within an effective range of the condition parameter;
a first determining module 502, configured to determine that the two-dimensional code is valid if the determining module 501 determines that the value of the condition parameter of the mobile terminal is within the valid range of the condition parameter;
a second determining module 503, configured to determine that the two-dimensional code is invalid if the determining module 501 determines that the value of the condition parameter of the mobile terminal is not within the valid range of the condition parameter.
In an embodiment of the present invention, a mobile terminal includes:
the processing module 504 is configured to display a prompt message that the two-dimensional code is invalid on a display interface of the mobile terminal and delete the analyzed data of the two-dimensional code if the second determining module 503 determines that the two-dimensional code is invalid.
In the embodiment of the present invention, the first obtaining module 401 of the mobile terminal analyzes the two-dimensional code obtained by scanning to obtain the effective range of the condition parameter included in the two-dimensional code; and the second obtaining module 402 obtains the value of the condition parameter of the mobile terminal; finally, the judging module 501 in the determining module 403 judges whether the value of the condition parameter of the mobile terminal is within the effective range of the condition parameter, and if the judging module 501 determines that the value of the condition parameter of the mobile terminal is within the effective range of the condition parameter, the first determining module 502 determines that the two-dimensional code is valid; if the judging module 501 determines that the value of the condition parameter of the mobile terminal is not within the valid range of the condition parameter, the second determining module 503 determines that the two-dimensional code is invalid. And the processing module 504 displays the prompt information that the two-dimensional code is invalid on the display interface of the mobile terminal, and deletes the data of the two-dimensional code obtained by analysis.
In this embodiment of the present invention, if the condition parameter is geographical location information, the first obtaining module 401 is specifically configured to: analyzing the two-dimensional code obtained by scanning to obtain the effective range of the geographic position contained in the two-dimensional code;
the second obtaining module 402 is specifically configured to: acquiring current geographical position information of the mobile terminal;
the determining module 403 is specifically configured to: and determining whether the two-dimensional code is valid according to the valid range of the geographic position and the current geographic position information of the mobile terminal.
Therefore, the determining module 501 included in the determining module 403 is specifically configured to determine whether the current geographic location information of the mobile terminal is included in the valid range of the geographic location;
the determining module 403 includes a first determining module 502 specifically configured to: if the judging module determines that the current geographic position information of the mobile terminal is contained in the effective range of the geographic position, the two-dimensional code is determined to be effective;
the second determining module 503 included in the determining module 403 is specifically configured to: and if the judging module determines that the current geographic position information of the mobile terminal is not contained in the effective range of the geographic position, determining that the two-dimensional code is invalid.
The mobile terminal can start the GPS positioning function of the mobile terminal and determine the current geographic position information of the mobile terminal.
It should be noted that, in the embodiment of the present invention, the valid range of the geographic location may be the geographic location represented by longitude and latitude, for example, the shenzhen continental region location is 113 ° 46 ° to 114 ° 37', and the north latitude 22 ° 27 ° to 22 ° 52', or may be the address location represented by a doorplate address, for example: shenzhen Shennan Daolu No. 1 to No. 100. And the two representations can be switched.
In the embodiment of the present invention, the first obtaining module 401 of the mobile terminal analyzes the two-dimensional code obtained by scanning to obtain the effective range of the geographic position included in the two-dimensional code; a second obtaining module 402 obtains the current geographic location information of the mobile terminal; finally, a judging module 501 in the determining module 403 judges whether the current geographical location information of the mobile terminal is within the effective range of the geographical location, and if the judging module 501 determines that the current geographical location information of the mobile terminal is within the effective range of the geographical location, a first determining module 502 determines that the two-dimensional code is valid; if the judging module 501 determines that the current geographic location information of the mobile terminal is not within the valid range of the geographic location, the second determining module 503 determines that the two-dimensional code is invalid. And the processing module 504 displays the prompt information that the two-dimensional code is invalid on the display interface of the mobile terminal, and deletes the data of the two-dimensional code obtained by analysis.
In the embodiment of the invention, the mobile terminal analyzes the scanned two-dimensional code to obtain the effective range of the geographic position contained in the two-dimensional code, and obtains the current geographic position information of the mobile terminal, the two-dimensional code is determined to be effective according to the effective range of the geographic position and the current geographic position information of the mobile terminal, if the current geographic position information of the mobile terminal is contained in the effective range of the geographic position, the two-dimensional code is determined to be effective, the mobile terminal can continuously use other data contained in the two-dimensional code except the effective range of the geographic position, if the current geographic position information of the mobile terminal is not contained in the effective range of the geographic position, the two-dimensional code is determined to be invalid, the prompt information that the two-dimensional code is invalid is displayed on the display interface of the mobile terminal, and the analyzed two-dimensional code data is deleted, so that only the mobile terminal with the geographic position information in the effective range of the geographic position can use the data in the two-dimensional code, and the requirement for providing services for part of mobile terminals is met.
Although the present invention has been described with reference to the preferred embodiments, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (11)

1. A processing method of two-dimension code is used in mobile terminal, which is characterized in that,
the two-dimensional code comprises data and also comprises a valid range of the condition parameter or an invalid range of the condition parameter,
the valid range is used for representing the value range of the mobile terminal which has the permission to use the data and corresponds to the value of the condition parameter, and the invalid range is used for representing the value range of the mobile terminal which has no permission to use the data and corresponds to the value of the condition parameter;
the method comprises the following steps:
analyzing the two-dimensional code obtained by scanning to obtain the data contained in the two-dimensional code and the effective range or the ineffective range of the condition parameter;
acquiring the value of the condition parameter corresponding to the mobile terminal;
determining whether the mobile terminal has the authority to use the data in the two-dimensional code according to the effective range or the invalid range of the condition parameter and the value of the mobile terminal corresponding to the condition parameter;
when the right exists, the data in the two-dimensional code is used;
and when the two-dimensional code is not authorized, displaying the prompt information that the two-dimensional code is invalid.
2. The processing method according to claim 1, wherein the determining whether the mobile terminal has the right to use the data in the two-dimensional code according to the valid range or the invalid range of the condition parameter and according to the value of the condition parameter corresponding to the mobile terminal comprises:
when the condition parameter value corresponding to the mobile terminal is judged to be in the effective range of the condition parameter or the condition parameter value corresponding to the mobile terminal is not in the ineffective range of the condition parameter, determining that the mobile terminal has the permission to use the data in the two-dimensional code;
and when the value of the condition parameter corresponding to the mobile terminal is judged to be in the invalid range of the condition parameter or the value of the condition parameter corresponding to the mobile terminal is not in the valid range of the condition parameter, determining that the mobile terminal has no permission to use the data in the two-dimensional code.
3. The processing method of claim 2, further comprising:
and when the mobile terminal has no permission to use the data in the two-dimensional code, deleting the data of the two-dimensional code obtained by analysis on the mobile terminal.
4. The processing method according to claim 2, wherein the analyzing the two-dimensional code obtained by scanning to obtain the valid range of the condition parameter included in the two-dimensional code comprises:
analyzing the two-dimensional code obtained by scanning to obtain the effective range of the geographic position contained in the two-dimensional code;
the obtaining of the value of the condition parameter corresponding to the mobile terminal includes: the mobile terminal acquires the current geographic position information of the mobile terminal;
the determining whether the mobile terminal has the right to use the data in the two-dimensional code according to the valid range or the invalid range of the condition parameter and the value of the condition parameter corresponding to the mobile terminal comprises: and determining whether the mobile terminal has the permission to use the data in the two-dimensional code according to the effective range of the geographic position and the current geographic position information of the mobile terminal.
5. The processing method according to claim 4, wherein the determining whether the mobile terminal has the right to use the data in the two-dimensional code according to the valid range of the geographic location and the current geographic location information of the mobile terminal comprises:
when the current geographic position information of the mobile terminal is judged to be contained in the effective range of the geographic position, determining that the mobile terminal has the authority to use the data in the two-dimensional code;
and when the current geographic position information of the mobile terminal is judged not to be contained in the effective range of the geographic position, determining that the mobile terminal has no permission to use the data in the two-dimensional code, and deleting the analyzed data of the two-dimensional code on the mobile terminal.
6. A mobile terminal, comprising:
the first acquisition module is used for analyzing the two-dimensional code obtained by scanning so as to acquire data contained in the two-dimensional code and an effective range or an invalid range of a condition parameter, wherein the effective range is used for representing a value range of a mobile terminal which has permission to use the data and corresponds to a value of the condition parameter, and the invalid range is used for representing a value range of a mobile terminal which does not have permission to use the data and corresponds to a value of the condition parameter;
the second obtaining module is used for obtaining the value of the condition parameter corresponding to the mobile terminal after the first obtaining module obtains the effective range or the invalid range of the condition parameter;
a determining module, configured to determine, after the second obtaining module obtains the value of the condition parameter corresponding to the mobile terminal, whether the mobile terminal has the right to use the data in the two-dimensional code according to the effective range of the condition parameter and the value of the condition parameter of the mobile terminal; when the right exists, the data in the two-dimensional code is used; and when the two-dimensional code is not authorized, displaying the prompt information that the two-dimensional code is invalid.
7. The mobile terminal of claim 6, wherein the determining module comprises:
a first determining module, configured to determine that the mobile terminal has permission to use the data in the two-dimensional code when it is determined that the value of the condition parameter corresponding to the mobile terminal is within the valid range of the condition parameter or the value of the condition parameter corresponding to the mobile terminal is not within the invalid range of the condition parameter;
a second determining module, configured to determine that the mobile terminal does not have permission to use the data in the two-dimensional code when it is determined that the value of the condition parameter corresponding to the mobile terminal is within the invalid range of the condition parameter or the value of the condition parameter corresponding to the mobile terminal is not within the valid range of the condition parameter.
8. The mobile terminal according to claim 7, wherein the mobile terminal comprises:
and the processing module is used for deleting the analyzed data of the two-dimensional code on the mobile terminal when the mobile terminal has no permission to use the data in the two-dimensional code.
9. The mobile terminal of claim 7,
the first obtaining module is specifically configured to: analyzing the two-dimensional code obtained by scanning to obtain the effective range of the geographic position contained in the two-dimensional code;
the second obtaining module is specifically configured to: acquiring current geographical position information of the mobile terminal;
the determining module is specifically configured to: and determining whether the mobile terminal has the permission to use the data in the two-dimensional code according to the effective range of the geographic position and the current geographic position information of the mobile terminal.
10. The mobile terminal of claim 9, wherein:
the first determining module included in the determining module is specifically configured to: when the current geographic position information of the mobile terminal is judged to be contained in the effective range of the geographic position, determining that the mobile terminal has the authority to use the data in the two-dimensional code;
the second determining module included in the determining module is specifically configured to: and when the current geographic position information of the mobile terminal is judged not to be contained in the effective range of the geographic position, determining that the mobile terminal has no permission to use the data in the two-dimensional code, and deleting the analyzed data of the two-dimensional code on the mobile terminal.
11. A computer-readable storage medium, wherein the storage medium stores executable instructions, and the executable instructions are used for implementing the processing method of the two-dimensional code according to any one of claims 1 to 5 when executed.
CN201410529606.4A 2014-10-09 2014-10-09 Two-dimensional code processing method and mobile terminal Active CN105574453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410529606.4A CN105574453B (en) 2014-10-09 2014-10-09 Two-dimensional code processing method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410529606.4A CN105574453B (en) 2014-10-09 2014-10-09 Two-dimensional code processing method and mobile terminal

Publications (2)

Publication Number Publication Date
CN105574453A CN105574453A (en) 2016-05-11
CN105574453B true CN105574453B (en) 2020-02-14

Family

ID=55884564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410529606.4A Active CN105574453B (en) 2014-10-09 2014-10-09 Two-dimensional code processing method and mobile terminal

Country Status (1)

Country Link
CN (1) CN105574453B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105957176A (en) * 2016-06-30 2016-09-21 浙江中博信息工程有限公司 Two-dimensional code-based attendance registering equipment and registering method
CN108229947B (en) * 2018-02-11 2021-06-01 中国联合网络通信集团有限公司 Method and system for guaranteeing using position of two-dimensional code, code scanning device and platform end
CN110390220B (en) * 2018-04-23 2022-02-18 腾讯科技(深圳)有限公司 Identification code processing and generating method, device, terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542235A (en) * 2011-12-09 2012-07-04 河北广联信息技术有限公司 One-code multi-recognition method of two-dimensional codes
CN102567933A (en) * 2011-12-06 2012-07-11 姚唐仁 System and method for identifying illegal taxies
CN103150779A (en) * 2011-12-07 2013-06-12 上海新大陆翼码信息科技有限公司 Inspection system and inspection method
CN103248555A (en) * 2012-02-08 2013-08-14 腾讯科技(深圳)有限公司 Method and device for adding friends
CN103488528A (en) * 2013-09-05 2014-01-01 优视科技有限公司 QR code processing method and device based on mobile terminals
CN103501349A (en) * 2013-10-18 2014-01-08 南京九度网络科技有限公司 Two-dimensional code cloud service system and method capable of accurately counting access data based on release positions

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567933A (en) * 2011-12-06 2012-07-11 姚唐仁 System and method for identifying illegal taxies
CN103150779A (en) * 2011-12-07 2013-06-12 上海新大陆翼码信息科技有限公司 Inspection system and inspection method
CN102542235A (en) * 2011-12-09 2012-07-04 河北广联信息技术有限公司 One-code multi-recognition method of two-dimensional codes
CN103248555A (en) * 2012-02-08 2013-08-14 腾讯科技(深圳)有限公司 Method and device for adding friends
CN103488528A (en) * 2013-09-05 2014-01-01 优视科技有限公司 QR code processing method and device based on mobile terminals
CN103501349A (en) * 2013-10-18 2014-01-08 南京九度网络科技有限公司 Two-dimensional code cloud service system and method capable of accurately counting access data based on release positions

Also Published As

Publication number Publication date
CN105574453A (en) 2016-05-11

Similar Documents

Publication Publication Date Title
US10659587B2 (en) Incoming call management method and apparatus
CN104243517A (en) Content sharing method and device used between different terminals
CN105657479B (en) Video processing method and device
TWI559708B (en) A method for the browser loading the web page and a device using the same
US10387460B2 (en) Method and apparatus for processing text information
CN104333643B (en) Add the method for contact person, system and terminal
US10009431B2 (en) Methods and apparatuses for lawful interception through a subscription manager
CN104239317A (en) Method and device for compiling pictures in browser
CN106155468B (en) Alarm display method and terminal
CN104333530A (en) Information credibility verifying method and apparatus
CN104182419A (en) Method and device for processing character information in picture
CN105574453B (en) Two-dimensional code processing method and mobile terminal
CN105704106B (en) A kind of visualization IVR implementation method and mobile terminal
CN111479263A (en) Communication connection method, terminal and computer storage medium
CN103873251A (en) Method and equipment for establishing connection by audio frequency
CN105682083B (en) A kind of communication means of mobile terminal and duplex MODEM system
CN106503023B (en) Method and device for prompting nearby friends
CN107613099B (en) Method and device for loading emergency number
CN104426685A (en) Information management method and apparatus
CN111385798B (en) Electronic apparatus and control method thereof
CN106470215B (en) User terminal, server, and message pushing system and method for scene not concerned
CN104575548A (en) File playing positioning method and device as well as terminal
CN106294388B (en) Page display method and terminal
CN111343627B (en) Network registration method and device and terminal equipment
CN107071750B (en) Information transmission method and device, terminal equipment and storage medium

Legal Events

Date Code Title Description
C06 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