CN107172259B - Terminal and information interaction method and storage device based on two-dimensional code - Google Patents

Terminal and information interaction method and storage device based on two-dimensional code Download PDF

Info

Publication number
CN107172259B
CN107172259B CN201710233782.7A CN201710233782A CN107172259B CN 107172259 B CN107172259 B CN 107172259B CN 201710233782 A CN201710233782 A CN 201710233782A CN 107172259 B CN107172259 B CN 107172259B
Authority
CN
China
Prior art keywords
newly added
picture
terminal
dimensional code
picture library
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
CN201710233782.7A
Other languages
Chinese (zh)
Other versions
CN107172259A (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.)
TCL Mobile Communication Technology Ningbo Ltd
Original Assignee
TCL Mobile Communication Technology Ningbo 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 TCL Mobile Communication Technology Ningbo Ltd filed Critical TCL Mobile Communication Technology Ningbo Ltd
Priority to CN201710233782.7A priority Critical patent/CN107172259B/en
Publication of CN107172259A publication Critical patent/CN107172259A/en
Application granted granted Critical
Publication of CN107172259B publication Critical patent/CN107172259B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/26Devices for calling a subscriber
    • H04M1/27Devices whereby a plurality of signals may be stored simultaneously
    • H04M1/274Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc
    • H04M1/2745Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips
    • H04M1/2753Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips providing data content
    • H04M1/2757Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips providing data content by data transmission, e.g. downloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72406User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading

Abstract

The invention provides a terminal and an information interaction method and a storage device thereof based on a two-dimensional code. The method and the device send the two-dimension code corresponding to the contact information through the application program for transmitting the bitmap file, detect whether the newly added picture contains the two-dimension code when the newly added picture in the system picture library is monitored, and scan the two-dimension code to acquire the contact information if the newly added picture contains the two-dimension code. Based on the method and the device, the contact information can be quickly shared, user operation is reduced, and the method and the device are not limited by geographical positions.

Description

Terminal and information interaction method and storage device based on two-dimensional code
Technical Field
The invention relates to the technical field of information interaction, in particular to a terminal, and an information interaction method and a storage device based on a two-dimensional code.
Background
In the social society, the interaction of contact information is an important way for self-publicizing and identifying others, and the current interaction of contact information by using electronic terminals such as mobile phones gradually replaces paper business cards, which becomes a trend in the social circle. The existing mobile phone generally performs interaction of contact information in a text form and a two-dimensional code form. However, the text form cannot support quick sharing of the contact information, and the two-dimensional code mode not only requires the manual operation terminal of the opposite party to scan the two-dimensional code and add the contact information, but also is limited by the geographical position.
Disclosure of Invention
In view of this, the invention provides a terminal, an information interaction method based on a two-dimensional code and a storage device thereof, which can realize quick sharing of contact information, reduce user operations, and are not limited by geographical positions.
The information interaction method based on the two-dimensional code comprises the following steps:
the method comprises the steps that a first terminal calls contact person information and generates a two-dimensional code corresponding to the contact person information;
the first terminal screens out an application program capable of transmitting the bitmap file, and sends the two-dimensional code to the second terminal through the application program;
the second terminal receives the two-dimension code and stores the two-dimension code in a system picture library;
the second terminal monitors whether a system picture library has a newly added picture or not;
when the fact that a newly added picture exists in the system picture library is monitored, the second terminal detects whether the newly added picture contains the two-dimensional code;
and if so, scanning the two-dimensional code by the second terminal to acquire corresponding contact information.
The terminal for information interaction based on the two-dimensional code of the embodiment of the invention comprises a processor, a memory and a transceiver which are connected with the processor, wherein,
the transceiver is used for receiving the two-dimension code and storing the two-dimension code in a system picture library;
the processor is used for monitoring whether the system picture library has a newly added picture or not and detecting whether the newly added picture contains the two-dimensional code or not when the system picture library has the newly added picture; if so, the processor is used for scanning the two-dimensional code to acquire corresponding contact information;
the memory is used for storing contact information.
The storage device of an embodiment of the invention stores program data, and the program data can be executed to realize the information interaction method based on the two-dimensional code.
Has the advantages that: according to the invention, the contact information is sent and received through the two-dimensional code, so that the contact information can be quickly shared, and the opposite side does not need to scan the two-dimensional code on the spot or in a short distance by means of sending the two-dimensional code through the application program for transmitting the bitmap file, so that the user operation can be reduced, and the limitation of the geographical position is avoided.
Drawings
Fig. 1 is a schematic flowchart of a two-dimensional code-based information interaction method according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for sharing a two-dimensional code by an application according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for monitoring whether there are additional pictures in a picture library of a system according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for detecting whether a newly added picture includes a two-dimensional code according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of an information interaction method based on two-dimensional codes according to a second embodiment of the present invention;
fig. 6 is a flowchart illustrating a method for detecting whether a newly added picture includes a two-dimensional code according to another embodiment of the present invention;
fig. 7 is a schematic flowchart of an information interaction method based on two-dimensional codes according to a third embodiment of the present invention;
fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions of the exemplary embodiments provided in the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. The various embodiments described below and the features of the embodiments can be combined with each other without conflict.
Fig. 1 shows an information interaction method based on two-dimensional codes according to an embodiment of the present invention. The information interaction method may include steps S11-S16.
S11: the first terminal calls the contact information and generates a two-dimensional code corresponding to the contact information.
The first terminal may call contact information in a vCard (Personal Data exchange) format, where the contact information includes, but is not limited to, information such as a mobile phone number, an address, and an avatar of a contact in the address list. The vCard format field records the contact information through the identifier, that is, the identifiers with different values have a mapping relation with different contact information. Since the value of the identifier of the vCard format field is limited, in order to add more contact information, in this embodiment, an enumeration type may be used to record a mapping relationship between the identifier of the vCard format field and the contact information, that is, in this embodiment, all possible values of the identifier of the vCard format field are listed one by one, and a mapping relationship is established between the identifier of the vCard format field and the contact information.
The first terminal can select partial information of a certain designated contact according to a user instruction and generate the two-dimensional code. Specifically, after receiving the user instruction, the system of the first terminal may acquire a specified field in the vCard format field through a Content Provider component. Of course, other embodiments of the present invention may also default to retrieve all information of a certain designated contact and generate a corresponding two-dimensional code when a user instruction is not received.
In this embodiment, a ZXing (open source project) source code may be used to encode the vCard format field, and after encoding, a Bit Matrix object is returned, and finally the Bit Matrix object is used to draw the two-dimensional code. The drawn two-dimensional code comprises an image finding graph, a positioning graph, data coding content and an error correction information code. The image finding graph and the positioning graph are represented as three 'return' font areas of the two-dimensional code and used for determining the position of the two-dimensional code and providing coordinate reference. The coded content of the data, namely the vCard format field, is converted into a bar code according to a certain preset coding algorithm. The error correction information code is used to specify the fault tolerance rate of the two-dimensional code to ensure the fault tolerance of the data, and the error correction information code may be an RS code (Reed Solomon code). The higher the fault tolerance of the two-dimensional code is, the more error correction information codes are contained in the two-dimensional code, and the repairability of the two-dimensional code is higher.
Further, in this embodiment, an add Logo (labeling identifier) method may be adopted to add a contact photo in the middle of the two-dimensional code. Specifically, the system of the first terminal synthesizes and draws two pictures, namely the two-dimensional code and the contact head portrait, according to a certain proportion by adopting a Canvas (overlay) algorithm. In the process of composite rendering, data in the middle of the original two-dimensional code (the two-dimensional code before composite rendering) is covered and lost, so that the fault tolerance of the original two-dimensional code needs to be high.
S12: the first terminal screens out an application program capable of transmitting the bitmap file, and sends the two-dimensional code to the second terminal through the application program.
The two-dimensional code is essentially a bitmap file (bitmap), so that the way of sharing one two-dimensional code is the same as the way of sharing one picture. Based on this, referring to fig. 2, first, the system of the first terminal sets the action of the Intent component to SEND, i.e., Intent. Then, the information of all the applications having "image/jpeg" or "image/" installed in the first terminal can be acquired by the get Package Info function of the Package Manager component. If the Intent component specifies that the two-dimensional code needs to be shared by using a specific application program, the first terminal can acquire a List (List) of Result Info (Result information) through the Package Manager component, and determine the target application program by comparing the Package Name of the Result Info with the Package Name of the target application program. And finally, the system takes the component of the target application program as the component of the Intent component, and calls a startActivity function to send the two-dimensional code out, so that the two-dimensional code is shared by the target application program.
S13: and the second terminal receives the two-dimension code and stores the two-dimension code in a system picture library.
After the second terminal successfully acquires the two-dimensional code transmitted by the first terminal, the system picture library of the second terminal changes, and a new two-dimensional code is added into the system picture library.
S14: and the second terminal monitors whether the system picture library has a newly added picture or not.
Taking the Android system as an example, the system of the second terminal may use a Content Observer component to monitor data changes in the system picture library. When data in the system picture library changes, the Content Observer component can return data before and after the change through an onChange () function (to-be-changed function), so as to acquire a newly added picture.
In order to increase the monitoring duration of the system picture library, i.e. to keep the monitoring status as macro as possible, the present embodiment may perform the monitoring in one of three ways as shown in fig. 3.
Firstly, the priority of the background process of the monitoring system picture library is improved, so that the background process is changed into a Service process (Intent Service), and whether a newly added picture exists in the system picture library is monitored through the Service process. Specifically, a priority value of the background process is set in an Android Manifest (list), for example, the highest value is 1000. Then, calling the onStartCommand function returns a START _ stimkt (continuous) command. Based on the above, the service process may be finished running when the system resources are in shortage, but when the system resources are recovered, the service process is restarted, so as to continuously monitor whether the system picture library has new pictures.
Secondly, the running priority of the background process of the monitoring system picture library in the foreground is improved, and then whether the system picture library has newly added pictures or not is monitored through the background process. Specifically, the system of the second terminal sets the receiverjboot _ COMPLETED component to permission to separate the activity process and the service process. The service process receives a power-on signal through a BR (Broadcast Receiver) and starts the service process. The service process then calls the start Foreground function. after the activity Process is started, the activity Process is bound with the service Process, and the activity Process and the service Process are communicated in an IPC (Inter-Process Communication) mode, so that whether a notification item of a newly added picture exists or not can be displayed in a menu notification bar of the second terminal. and when the activity process exits, the activity process and the service process are unbound.
And thirdly, alternately monitoring whether the system picture library has new pictures or not by using the service process and the daemon process. The service process and the daemon process keep a parent-child relationship, and if the child process is finished, the parent process recreates the child process; if the parent process is finished, the child process restarts the parent process using an AM (Activity Manager) command. Namely, the service process monitors the running state of the daemon process, and if the daemon process is finished, the service process calls the daemon process again; and the daemon monitors the running state of the service process, and if the service process is finished, the daemon calls the service process again.
Of course, other embodiments of the present invention may determine whether there is a new picture by monitoring the identifier of the picture in the picture library of the system. Specifically, the monitoring service is attached to some specific software, and when the software is opened and run by a user, the background service process can perform traversal search on identifiers of pictures in the system picture library so as to screen out newly added pictures. Wherein, the identifier can use bit type, if the picture is monitored, its identifier is modified to 1, otherwise null. In this way, when the system picture library has a large number of pictures, even if the system picture library is traversed once, the loss in time and resources can be reduced.
If the system picture library is monitored to have new pictures, executing steps S15-S16. If no new picture in the system picture library is detected, the step S14 is continued until a new picture in the system picture library is detected, and the steps S15 to S16 are not executed.
S15: and the second terminal detects whether the newly added picture contains the two-dimensional code.
As shown in fig. 4, in the present embodiment, the size of the focus frame of the two-dimensional code scan may be modified by a getframemergerclect () function (rectangular frame function) in the ZXing (open source entry) source code, that is, the size of the focus frame is not limited to 5/8 of the size of the picture (screen), and then the conversion from the screen resolution of the second terminal to the camera resolution is completed by the getframemergerclectnpreview () function (rectangular frame preview function), so that the entire size of the picture can be displayed in the focus frame. Then, scanning the picture through the focusing frame, judging whether the picture has three hui-shaped identifiers, if so, judging that the newly added picture contains the two-dimensional code, and executing the step S16; if not, it is determined that the newly added picture does not include the two-dimensional code, and the subsequent scanning process is not performed on the picture, so that the process may continue to execute step S14. In the embodiment, whether the picture contains three 'hui' font identifiers or not is detected by scanning, and the picture does not need to be scanned in a full disc and all contents of the two-dimensional code are analyzed.
S16: and the second terminal scans the two-dimensional code to acquire corresponding contact information.
The embodiment can call decode () function (decoding function) of QRCode Reader (two-dimensional code reading) component in the ZXing source code to automatically scan the two-dimensional code.
Based on the above, in the embodiment, the current universal two-dimensional code is used for sharing and interacting the contact information, so that the defect that the user needs to manually add the information in the traditional text or accessory sharing mode is overcome, and meanwhile, certain data confidentiality is achieved. In addition, compared with the prior art that only two-dimensional codes can be generated for the contact information in the address list, the embodiment can allow the two-dimensional codes to carry more contact information.
In addition, the two-dimensional code of the contact information is sent through the application program capable of transmitting the bitmap file, the embodiment can share the contact information in multiple channels, for example, a user can transmit the contact information through the application programs such as multimedia messages, WeChat and mails, so that the opposite side does not need to scan the two-dimensional code in the same plane or in a close range, the user operation can be reduced, and the limitation of geographical positions is avoided.
And moreover, the background service process automatically detects whether the newly added picture contains the two-dimensional code and identifies the information in the newly added picture, so that the traditional two-dimensional code scanning mode of scanning the picture library of the system, namely 'opening a scanner, opening the picture library of the system, selecting the picture in the picture library of the system and scanning the two-dimensional code' is changed, and the user operation can be greatly simplified.
Please refer to fig. 5, which illustrates an information interaction method based on two-dimensional codes according to another embodiment of the present invention. The information interaction method may include steps S51-S56.
S51: the first terminal calls the contact information and generates a two-dimensional code corresponding to the contact information.
S52: the first terminal screens out an application program capable of transmitting the bitmap file, and sends the two-dimensional code to the second terminal through the application program.
S53: and the second terminal receives the two-dimension code and stores the two-dimension code in a system picture library.
S54: the second terminal device monitors whether the system picture library has a plurality of newly added pictures within the preset time.
When it is detected that there are a plurality of new pictures in the system picture library within the predetermined time, the embodiment executes steps S55 and S56. When it is detected that there is only one newly added picture in the system picture library within the predetermined time, the present embodiment directly performs step S56.
S55: and the second terminal acquires the pictures containing the two-dimensional codes in the newly added pictures and displays the pictures to the user, and scans the two-dimensional codes according to the user instruction.
S56: and the second terminal scans the two-dimensional code to acquire corresponding contact information.
Based on the foregoing description of the embodiment, but different from the foregoing description, the system of the second terminal in this embodiment performs a delay operation for a predetermined time (e.g. 2 seconds) to distinguish the purpose of the user operation. When only one newly added picture is imported in the preset time period, the picture is intentionally added by the user, scanning is needed with a high probability, the system detects whether the newly added picture contains the two-dimensional code after the time delay is finished, and if the newly added picture contains the two-dimensional code, the newly added picture is directly scanned, corresponding contact information is obtained and stored. If a plurality of newly added pictures are imported in the preset period of time, the purpose that the user needs to automatically scan the two-dimensional code is not strong, and therefore, the newly added pictures only need to be detected whether to contain the two-dimensional code or not after the time delay is finished.
When a plurality of newly added pictures are imported within the predetermined period of time, the embodiment may add URIs (Uniform Resource identifiers) of the plurality of newly added pictures into the queue to be processed, without caching the newly added pictures. Only when the user operates the pictures in the queue to be processed, the embodiment caches the newly added pictures according to the URI, displays the pictures containing the two-dimensional code to the user, and gives the user a choice whether to scan or not.
For a terminal with extremely limited CPU and Memory resources, a large amount of system resources are easily occupied in the process of loading and processing pictures, which causes system congestion and affects the performance of the whole system, and an Out of Memory (Out of Memory) phenomenon may occur in a serious case. Based on this, when it is monitored that there are multiple newly added pictures in the system picture library within the predetermined time, this embodiment may add the multiple newly added pictures to the blocking queue in sequence, establish a thread pool, and detect whether the multiple newly added pictures in the blocking queue include the two-dimensional code by using multiple working threads established by the thread pool.
Referring to fig. 6, the maximum number of openable work threads of the task is set to be N by using the thread pool, and the thread pool itself has no work thread when being created. And the thread pool manager sequentially adds a plurality of newly-added pictures acquired within preset time into a blocking queue, and the blocking queue can ensure that the processing process is orderly carried out. And the blocking queue can block the current working thread, if the blocking queue is empty, the current working thread can be blocked until a new picture is added in the blocking queue, and then the blocked working thread can be awakened. And the awakened working thread judges whether the newly added picture contains the two-dimensional code or not, and adds the judgment result into a result queue. And the thread pool manager acquires the pictures containing the two-dimensional codes from the plurality of newly added pictures from the result queue. By means of blocking the queue and the thread pool, the embodiment can effectively manage and dispatch the working thread to identify whether a plurality of newly-added pictures contain the two-dimensional code, and excessive system resource consumption is avoided.
Fig. 7 shows an embodiment of an information interaction method based on two-dimensional codes according to the present invention. This embodiment implements the entire process of the foregoing embodiment of the present invention, which is not described herein again.
It should be understood that the above embodiments can be combined with each other, and the above functions, if implemented in the form of software functions and sold or used as a standalone product, can be stored in a storage medium readable by an electronic device, i.e., the present invention also provides a storage device storing program data, which can be executed to implement the method of the above embodiments, and the storage device can be, for example, a usb disk, an optical disk, a server, etc. That is, the embodiments of the present invention may be embodied in the form of a software product including instructions for causing an intelligent terminal to perform all or part of the steps of the methods described in the embodiments.
Fig. 8 shows a terminal for performing information interaction based on two-dimensional codes according to an embodiment of the present invention. The terminal 80 may include a processor 81, a memory 82, a transceiver 83, a display 84, and a communication bus 85, the processor 81 being coupled to the memory 82, the transceiver 83, and the display 84 via the communication bus 85.
The transceiver 83 is used for receiving the two-dimensional code and storing the two-dimensional code in the system picture library.
The processor 81 is configured to monitor whether there is a new picture in the system picture library, and detect whether the new picture includes a two-dimensional code when it is monitored that there is a new picture in the system picture library. If yes, the processor 81 is configured to scan the two-dimensional code to obtain corresponding contact information.
The memory 82 is used to store contact information.
In order to increase the monitoring duration of the system picture library, i.e., maintain the monitoring state as macroscopically as much as possible, the processor 81 may increase the priority of the background process of the monitoring system picture library, so that the background process becomes a service process, and monitor whether the system picture library has a newly added picture through the service process, or increase the priority of the background process of the monitoring system picture library running on the foreground, and then monitor whether the system picture library has a newly added picture through the background process; or, the service process and the daemon process are used for alternately monitoring whether the system picture library has new pictures.
When the processor 81 monitors that a plurality of newly added pictures exist in the system picture library within a preset time, the display 84 of the terminal 80 is used for displaying the pictures containing the two-dimensional codes in the plurality of newly added pictures to the user, the transceiver 83 is used for receiving a user instruction, and the processor 81 is used for scanning the two-dimensional codes according to the user instruction received by the transceiver 83.
When it is monitored that there are multiple newly added pictures in the system picture library within the predetermined time, the processor 81 is configured to sequentially add the multiple newly added pictures into the blocking queue, establish a thread pool, and detect whether the multiple newly added pictures in the blocking queue include the two-dimensional code by using multiple working threads established by the thread pool.
The above structural elements of the terminal 80 of the present embodiment correspondingly implement the two-dimensional code based information interaction method of each of the above embodiments, and have the same technical effects.
The terminals (including the first terminal and the second terminal) in the full text of the invention can be mobile terminals such as smart phones, Personal Digital Assistants (PDAs) or tablet computers, and can also be wearable devices with contact information interactive display function, which are worn on limbs or embedded in clothes, ornaments and accessories.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent structures or equivalent flow transformations made by using the contents of the specification and the drawings, such as the mutual combination of technical features between various embodiments, or the direct or indirect application to other related technical fields, are included in the scope of the present invention.

Claims (3)

1. An information interaction method based on two-dimensional codes is characterized by comprising the following steps:
the method comprises the steps that a first terminal calls contact person information and generates a two-dimensional code corresponding to the contact person information;
the first terminal screens out an application program capable of transmitting the bitmap file, and sends the two-dimensional code to a second terminal through the application program;
the second terminal receives the two-dimension code and stores the two-dimension code in a system picture library;
the second terminal monitors whether the system picture library has a newly added picture or not;
when monitoring that the system picture library has a newly added picture, the second terminal detects whether the newly added picture contains a two-dimensional code;
if so, the second terminal scans the two-dimensional code to acquire corresponding contact information;
the two-dimensional code comprises a contact person head portrait, the contact person head portrait is arranged in the two-dimensional code according to a certain proportion, and the proportion meets the requirement that contact person information can be obtained when the two-dimensional code is scanned; the first terminal calls the contact information by adopting a vCard format and records the mapping relation between the identifier of a vCard format field and the contact information by adopting an enumeration type; the second terminal monitors the identifier of the picture in the picture library of the system to judge whether a newly added picture exists, wherein the identifier of the picture is of a byte type, when the picture is monitored to be outdated, the identifier of the picture is modified to be 1, and otherwise, the identifier of the picture is null;
the second terminal monitors whether the system picture library has newly added pictures or not, and the method comprises the following steps: the method comprises the steps of improving the priority of a background process of a monitoring system picture library to enable the background process to be changed into a service process, and monitoring whether a system picture library has a newly added picture or not through the service process; or, the priority of the background process of the monitoring system picture library running in the foreground is improved, and then whether the system picture library has a newly added picture or not is monitored through the background process; or, the service process and the daemon process are used for alternately monitoring whether the system picture library has newly added pictures or not;
the second terminal monitors whether the system picture library has newly added pictures or not, and the method comprises the following steps: the second terminal monitors whether the system picture library has a plurality of newly added pictures within preset time;
when monitoring that the system picture library has a plurality of newly added pictures within the preset time, the scanning of the two-dimensional code by the second terminal comprises the following steps: the second terminal acquires and displays the pictures containing the two-dimensional codes in the newly added pictures to the user, and scans the two-dimensional codes according to the user instruction; when only one newly added picture is monitored in the preset time of the system picture library, the scanning of the two-dimensional code by the second terminal comprises the following steps: the second terminal directly scans the two-dimensional code to obtain corresponding contact information;
when monitoring that the system picture library has a plurality of newly added pictures within the preset time, the second terminal detects whether the newly added pictures contain two-dimensional codes, and the method comprises the following steps: adding a plurality of newly added pictures into a blocking queue in sequence; and establishing a thread pool, and detecting whether a plurality of newly-added pictures in the blocking queue contain two-dimensional codes or not by utilizing a plurality of working threads established by the thread pool.
2. A terminal for information interaction based on two-dimension codes, which is characterized in that the terminal comprises a processor, a memory and a transceiver connected with the processor, wherein,
the transceiver is used for receiving the two-dimension code and storing the two-dimension code in a system picture library;
the processor is used for monitoring whether the system picture library has a newly added picture or not, and detecting whether the newly added picture contains a two-dimensional code or not when the system picture library has the newly added picture; if yes, the processor is used for scanning the two-dimensional code to obtain corresponding contact person information;
the memory is used for storing contact person information;
the two-dimensional code comprises a contact person head portrait, the contact person head portrait is arranged in the two-dimensional code according to a certain proportion, and the proportion meets the requirement that contact person information can be obtained when the two-dimensional code is scanned; the first terminal calls the contact information by adopting a vCard format and records the mapping relation between the identifier of a vCard format field and the contact information by adopting an enumeration type; the second terminal monitors the identifier of the picture in the picture library of the system to judge whether a newly added picture exists, wherein the identifier of the picture is of a byte type, when the picture is monitored to be outdated, the identifier of the picture is modified to be 1, and otherwise, the identifier of the picture is null;
the processor is also used for improving the priority of a background process of the monitoring system picture library, so that the background process is changed into a service process, and monitoring whether the system picture library has a newly added picture or not through the service process; or, the priority of the background process of the monitoring system picture library running in the foreground is improved, and then whether the system picture library has a newly added picture or not is monitored through the background process; or, the service process and the daemon process are used for alternately monitoring whether the system picture library has newly added pictures or not;
the terminal further comprises a display, when the processor monitors that a plurality of newly added pictures exist in the system picture library within a preset time, the display is used for displaying the pictures containing the two-dimensional codes in the newly added pictures to a user, the transceiver is used for receiving a user instruction, and the processor is used for scanning the two-dimensional codes according to the user instruction received by the transceiver; when the processor monitors that only one newly added picture exists in the system picture library within preset time, the processor directly scans the two-dimensional code to acquire corresponding contact information;
when a plurality of newly added pictures in the system picture library within the preset time are monitored, the processor is used for sequentially adding the newly added pictures into a blocking queue, establishing a thread pool, and detecting whether the newly added pictures in the blocking queue contain two-dimensional codes or not by utilizing a plurality of working threads established by the thread pool.
3. An electronic device-readable storage medium storing program data executable to implement the method of claim 1.
CN201710233782.7A 2017-04-11 2017-04-11 Terminal and information interaction method and storage device based on two-dimensional code Active CN107172259B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710233782.7A CN107172259B (en) 2017-04-11 2017-04-11 Terminal and information interaction method and storage device based on two-dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710233782.7A CN107172259B (en) 2017-04-11 2017-04-11 Terminal and information interaction method and storage device based on two-dimensional code

Publications (2)

Publication Number Publication Date
CN107172259A CN107172259A (en) 2017-09-15
CN107172259B true CN107172259B (en) 2020-09-25

Family

ID=59849208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710233782.7A Active CN107172259B (en) 2017-04-11 2017-04-11 Terminal and information interaction method and storage device based on two-dimensional code

Country Status (1)

Country Link
CN (1) CN107172259B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446579B (en) * 2018-03-15 2020-07-28 维沃移动通信有限公司 Method and terminal for identifying graphic code
CN108984315B (en) * 2018-06-14 2022-04-15 深圳市轱辘车联数据技术有限公司 Application data processing method and device, terminal and readable medium
CN111091016B (en) * 2018-10-23 2023-06-16 北京鼎九信息工程研究院有限公司 Tripod nine-code reading method and device and mobile terminal
CN111340165A (en) * 2020-04-17 2020-06-26 支付宝(杭州)信息技术有限公司 Data interaction method, device and equipment

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5136302B2 (en) * 2008-03-27 2013-02-06 株式会社デンソーウェーブ Two-dimensional code, two-dimensional code generation method, computer-readable program for displaying two-dimensional code, authentication method using two-dimensional code, and information providing method using two-dimensional code
CN103854006A (en) * 2012-12-06 2014-06-11 腾讯科技(深圳)有限公司 Image recognition method and device
US9999013B2 (en) * 2013-01-22 2018-06-12 Mimio, Llc Two-dimensional code-driven method and system for synchronizing wireless devices with a computing device
CN103279730B (en) * 2013-06-05 2016-09-28 北京奇虎科技有限公司 Mobile terminal processes the method and apparatus of visual graphic code
CN104144197B (en) * 2013-09-26 2018-02-23 腾讯科技(深圳)有限公司 A kind of information processing method, device, terminal device and system
CN104573597B (en) * 2013-10-10 2018-12-11 腾讯科技(深圳)有限公司 A kind of two-dimensional code identification method and device
CN105373557A (en) * 2014-08-26 2016-03-02 腾讯科技(深圳)有限公司 Content synchronization method and device
CN105046186B (en) * 2015-08-27 2018-06-29 北京恒华伟业科技股份有限公司 A kind of recognition methods of Quick Response Code and device
CN105677748A (en) * 2015-12-29 2016-06-15 北京金山安全软件有限公司 Picture display method and device and electronic equipment
CN105718979B (en) * 2016-01-14 2019-06-25 厦门纳纬信息技术有限公司 A method of generating two-dimension code image
CN108573186A (en) * 2016-03-31 2018-09-25 青岛海信移动通信技术股份有限公司 Two-dimension code image recognition methods and device
CN106022426A (en) * 2016-05-16 2016-10-12 微位(上海)网络科技有限公司 Method and system for generating two-dimensional code with color pattern
CN106453846B (en) * 2016-09-14 2020-01-14 北京小米移动软件有限公司 Display method and device of two-dimensional code business card

Also Published As

Publication number Publication date
CN107172259A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
CN107172259B (en) Terminal and information interaction method and storage device based on two-dimensional code
TWI747911B (en) Two-dimensional code information query method, server, client and system
KR101541263B1 (en) Method and apparatus for executing user action commands
US9122377B2 (en) Method and system for interworking plurality of applications
US8955739B2 (en) Barcode scanner on webpage
KR101693563B1 (en) Method and apparatus for taking screenshot of screen of application in mobile terminal
US20160125214A1 (en) Method and device for processing visual graphic codes of mobile terminal
CN107818023B (en) Thread-based message processing method, intelligent device and storage medium
AU2017435234B2 (en) Image processing method and device
CN116095222A (en) Incoming call reminding method and terminal
EP3061214B1 (en) Method and apparatus for displaying image
CN108933947B (en) Bullet screen display method and device
CN108573185B (en) Two-dimensional code picture identification method and device
CN111726605A (en) Resolving power determining method and device, terminal equipment and storage medium
CN116720533A (en) Code scanning method, electronic equipment and readable storage medium
CN115525453B (en) Multi-screen collaborative interrupt processing method and electronic equipment
US9134930B2 (en) Delayed content production
CN110704157B (en) Application starting method, related device and medium
CN115357818A (en) Information display method and device
CN115981576B (en) Method for sharing data, electronic device and storage medium
CN115061758B (en) Application display method, terminal, electronic device and storage medium
CN116719466A (en) Method for displaying multi-task interface, electronic equipment and storage medium
CN117332799A (en) Method and system for carrying out data transmission based on scan head calling interface method
CN116881537A (en) Webpage development method, device, terminal equipment and medium
CN117850918A (en) Method, device and equipment for realizing applet image recognition based on Taro framework

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200907

Address after: 315000 10 / F, No. 5, Lane 999, Yangfan Road, hi tech Zone, Ningbo City, Zhejiang Province

Applicant after: TCL mobile communication technology (Ningbo) Co.,Ltd.

Address before: 518063 Guangdong city of Shenzhen province Nanshan District ten South Road West High Technology South Road North Tower B 16 floor TCL

Applicant before: Jiekai communication (Shenzhen) Co.,Ltd.