CN112218281A - Scanning gun connection method, device, terminal and medium - Google Patents

Scanning gun connection method, device, terminal and medium Download PDF

Info

Publication number
CN112218281A
CN112218281A CN202011254386.0A CN202011254386A CN112218281A CN 112218281 A CN112218281 A CN 112218281A CN 202011254386 A CN202011254386 A CN 202011254386A CN 112218281 A CN112218281 A CN 112218281A
Authority
CN
China
Prior art keywords
gun
connection
scanning
scanning gun
scan
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.)
Granted
Application number
CN202011254386.0A
Other languages
Chinese (zh)
Other versions
CN112218281B (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.)
Netum Intelligent Guangzhou Technology Co ltd
Original Assignee
Netum Intelligent Guangzhou Technology 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 Netum Intelligent Guangzhou Technology Co ltd filed Critical Netum Intelligent Guangzhou Technology Co ltd
Priority to CN202011254386.0A priority Critical patent/CN112218281B/en
Publication of CN112218281A publication Critical patent/CN112218281A/en
Application granted granted Critical
Publication of CN112218281B publication Critical patent/CN112218281B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a scanning gun connection method, a device, a terminal and a medium, which relate to the technical field of scanning, and the scanning gun connection method comprises the following steps: displaying an input method interface, wherein the input method interface comprises an operation area; determining a scanning gun to be connected according to the connection operation received in the operation area; and establishing connection with the scanning gun according to a preset two-way communication protocol. The embodiment of the invention solves the problem that the mobile terminal in the prior art cannot pop up the soft keyboard during the process of using the scanning gun by a user, so that the user cannot input manually.

Description

Scanning gun connection method, device, terminal and medium
Technical Field
The embodiment of the invention relates to the technical field of scanning, in particular to a scanning gun connection method, a scanning gun connection device, a scanning gun connection terminal and a scanning gun connection medium.
Background
With the rapid development of scanning technology, scanning devices such as scanning guns and the like are more and more popular, and great convenience is brought to life, work and study of people.
When a user uses the scanning gun, the scanning gun is usually connected with a mobile terminal such as a mobile phone through a bluetooth mode, so that the scanning gun can transmit scanned data to the mobile terminal. At present, most scanning guns are directly connected with a mobile terminal through a Bluetooth Human Interface Device (HID) protocol. Under the HID protocol, a scanning gun can be recognized as an external keyboard by a mobile terminal such as an android mobile phone, and then a software disk of an input method can be hidden after the external keyboard is detected and recognized, so that a user cannot perform manual input through a soft keyboard of the input method of the mobile terminal when the scanning gun is scanned. If the user needs to input, the connection between the mobile terminal and the scanning gun can only be disconnected and input again, and then the scanning gun is reconnected after the input is completed, which is very inconvenient and affects the operation efficiency of the user.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, a terminal and a medium for connecting a scan gun, so as to solve the problems that a user cannot manually input and the operation efficiency is low because a soft keyboard cannot be popped up during the process of connecting the scan gun by a mobile terminal.
In a first aspect, an embodiment of the present invention provides a scan gun connection method, including:
displaying an input method interface, wherein the input method interface comprises an operation area;
determining a scanning gun to be connected according to the connection operation received in the operation area;
and establishing connection with the scanning gun according to a preset two-way communication protocol.
Optionally, the scan gun to be connected is determined according to the connection operation received in the operation area, and the scan gun comprises:
performing equipment search based on the connection operation to obtain candidate equipment;
and selecting a scanning gun from the candidate devices so as to determine the selected scanning gun as the scanning gun to be connected.
Optionally, selecting a scanning gun from the candidate devices includes:
presenting a list of candidate devices based on a scan gun included in the candidate devices;
receiving a selection operation submitted based on the candidate device list;
and taking the scanning gun corresponding to the selection operation as the selected scanning gun.
Optionally, the connecting method of the scanning gun further includes:
determining a number of scan guns in the candidate device;
if the number of the scanning guns in the candidate equipment is one, determining the scanning guns in the candidate equipment as the scanning guns to be connected;
if the number of the scanning guns in the candidate equipment is more than one, executing a step of displaying a candidate equipment list based on the scanning guns contained in the candidate equipment, wherein the candidate equipment list is used for displaying all the scanning guns contained in the candidate equipment.
Optionally, after the input method interface is displayed, the method for connecting the scanning gun further includes:
monitoring an operation area of the input method interface;
when user operation is monitored, judging whether the user operation is preset connection operation or not;
and if the user operation is a preset connection operation, executing a step of determining a scanning gun to be connected according to the connection operation received in the operation area.
Optionally, after the connection is established with the scan gun target according to a preset bidirectional communication protocol, the scan gun connection method further includes: and sending an operation command received in the operation area to the scanning gun based on the connection, wherein the operation command is used for controlling the scanning gun.
Optionally, the scan gun connection method is applied to a mobile terminal, and the operation command includes at least one of the following: the method comprises the following steps of (1) clearing data, shutting down, storing mode, common mode, data uploading and encoding format; the bidirectional communication protocol comprises a Bluetooth serial port protocol or a Bluetooth low energy consumption protocol.
In a second aspect, an embodiment of the present invention further provides a scanning gun connection apparatus, including:
the interface display module is used for displaying an input method interface, and the input method interface comprises an operation area;
the scanning gun determining module is used for determining a scanning gun to be connected according to the connection operation received in the operation area;
and the scanning gun connection module is used for establishing connection with the scanning gun according to a preset two-way communication protocol.
In a third aspect, an embodiment of the present invention further provides a mobile terminal, including: a processor and a memory; the memory has stored therein at least one instruction that, when executed by the processor, causes the mobile terminal to perform the scan gun connection method of the first aspect.
In a fourth aspect, the present invention also provides a computer-readable storage medium, where instructions of the computer-readable storage medium, when executed by a processor of a computer device, enable the computer device to perform the scan gun connection method according to the first aspect.
After the input method interface is displayed, the connection operation is received through the operation area of the input method interface, the scanning gun to be connected is determined according to the connection operation, and the connection is established with the scanning gun according to the preset two-way communication protocol, so that the scanning gun is identified as non-keyboard equipment under the two-way communication protocol, the defect that an input method soft keyboard is closed when a mobile terminal such as a mobile phone is connected with the scanning gun in the prior art is overcome, the problem that the mobile terminal cannot pop up the soft keyboard during the process that a user uses the scanning gun in the prior art, the manual input of the user cannot be achieved, the operation efficiency of the user is improved, and meanwhile, the transmission and the sending of data are achieved.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for connecting a scan gun according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of an input method interface in an example of the invention;
FIG. 3 is a flow chart illustrating steps of a method for connecting a scan gun in accordance with an alternative embodiment of the present invention;
FIG. 4 is a block diagram of a connecting device of a scanning gun according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a mobile terminal according to an example of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
One of the core concepts of the embodiments of the present invention is to provide a new scan gun connection method, which is used for connecting a scan gun according to a bidirectional communication protocol, such as a Bluetooth Serial Port Profile (SSP) protocol, a Bluetooth Low Energy (BLE) protocol, and the like, so that the scan gun is identified as a non-keyboard device under the bidirectional communication protocol, and therefore, a soft keyboard of an input method is not closed when the scan gun is connected, and a problem that a user cannot manually input due to the fact that a soft keyboard cannot be popped up when the user uses the scan gun by using a mobile terminal in the prior art is solved.
Referring to fig. 1, a flowchart illustrating steps of a scan gun connection method according to an embodiment of the present invention is shown. The scanning gun connection method provided by the embodiment can be suitable for the connection condition of the scanning gun, for example, the connection condition of a mobile terminal such as a mobile phone and the like and a wireless scanning gun, and specifically comprises the following steps:
and step 110, displaying an input method interface, wherein the input method interface comprises an operation area.
In this embodiment, the input method interface may refer to an interface displayed by the input method software, and may specifically include a keyboard region and an operation region of the input method software. For example, as shown in fig. 2, the input method interface may include a keyboard area 21 and an operation area 22; the keyboard area 21 is used as an area where the input method soft keyboard is located, so that a user can input various information through the soft keyboard in the keyboard area; the operation area 22 can be used as an area for a user to operate the scanning gun, so that the user can operate the scanning gun through the operation area, and the user can conveniently operate the scanning gun to meet the operation requirement of the user.
And step 120, determining a scanning gun to be connected according to the connection operation received in the operation area.
In a specific implementation, after the input method interface is displayed, whether a user performs an input operation in a keyboard region of the input method interface or not can be detected, and whether the user performs the operation in an operation region of the input method interface or not can also be detected, so that when the user performs the operation in the operation region of the input method interface, whether the operation performed in the operation region of the input method interface by the user is a connection operation or not can be determined; if the operation performed by the user in the operation area of the input method interface is a connection operation, the user operation may be determined as the connection operation received by the operation area, and then a device search may be performed based on the connection operation to search for a scan gun to be connected. Further, after the input method interface is displayed, the embodiment of the present invention may further include: monitoring an operation area of the input method interface; when user operation is monitored, judging whether the user operation is preset connection operation or not; and if the user operation is a preset connection operation, executing a step of determining a scanning gun to be connected according to the connection operation received in the operation area.
In the actual process, a user may submit a connection operation in an operation area, so that a mobile terminal such as a mobile phone may perform device search according to the connection operation to search out one or more devices to be connected, and further, the user may select a device to be connected from the searched devices to be connected. Therefore, after the connection operation received in the operation area is acquired, the embodiment of the present invention may perform device search based on the connection device, and may use the searched device as a candidate device, so as to select one or more scan guns from the searched candidate device as the scan guns to be connected.
Optionally, the scan gun to be connected according to the connection operation received in the operation area in the embodiment of the present invention specifically may include: performing equipment search based on the connection operation to obtain candidate equipment; and selecting a scanning gun from the candidate devices so as to determine the selected scanning gun as the scanning gun to be connected. The candidate devices may include various searched devices for selection by the user, for example, devices such as an earphone, a wireless scanning gun, a wireless keyboard, and the like, which are searched by the mobile terminal through a bluetooth manner may be included.
Specifically, after the candidate device is searched based on the connection operation, the embodiment of the present invention may provide the candidate device for the user to select, so as to determine the scanning gun selected by the user based on the selection operation submitted by the user, and further determine the selected scanning gun as the scanning gun to be connected. Further, in the embodiment of the present invention, selecting a scan gun from the candidate devices may specifically include: presenting a list of candidate devices based on a scan gun included in the candidate devices; receiving a selection operation submitted based on the candidate device list; and taking the scanning gun corresponding to the selection operation as the selected scanning gun. The scanning gun corresponding to the selection operation may be the scanning gun selected by the selection operation.
And step 130, establishing connection with the scanning gun according to a preset two-way communication protocol.
Specifically, after the scanning gun to be connected is determined, the scanning gun to be connected can be connected with the scanning gun according to a preset two-way communication protocol so as to perform two-way communication with the scanning gun according to the two-way communication protocol, so that data transmission and sending are realized, and the scanning gun is identified as other equipment which is not a keyboard under the two-way communication protocol, so that the defect that an input method soft keyboard is closed when a mobile terminal such as a mobile phone is connected with the scanning gun in the prior art can be overcome, and the problem that the mobile terminal cannot pop up the soft keyboard to cause that a user cannot input manually in the process that the user uses the scanning gun in the prior art is solved.
It should be noted that the preset bidirectional communication protocol may be preset in the mobile terminal, or may be set by the mobile terminal according to a user operation, that is, the user may set the bidirectional communication protocol used for connecting the scanning gun in the mobile terminal according to a need, which is not limited in this embodiment.
In practical processes, the scan gun connection method provided by the embodiment of the present invention may be applied to a mobile terminal, for example, an input method plugin may be defined on the basis of the scan gun connection method provided by the embodiment of the present invention, and the input method plugin may be installed in a mobile terminal such as a mobile phone, so that the mobile terminal may search for or connect a device such as a scan gun through the input plugin, for example, when a user clicks a "connect device" button in an input method operation area, the mobile terminal may determine the user operation as a connection operation received in the input method operation area, and may jump to a search page for device search according to the connection operation, and may form a candidate device list based on the searched candidate device, so that the user may select a device to which the user needs to connect, such as selecting a scan gun to which the user needs to connect, the scanning gun selected by the user can be used as the scanning gun to be connected, connection with the scanning gun is established according to a preset bidirectional communication protocol, for example, the scanning gun can be connected with the scanning gun through a Bluetooth SPP protocol or a BLE protocol, further, bidirectional communication between the scanning gun and the mobile terminal can be achieved based on the established connection, data transmission and sending are achieved, for example, the mobile terminal can send an operation command received in an operation area to the scanning gun based on the connection with the scanning gun, control over the scanning gun is achieved, namely, the scanning gun can be controlled through a plug-in, an application program developer is not needed to perform other programming, and development cost is reduced.
Further, on the basis of the above embodiment, after the connection is established between the scan gun and the scan gun target according to the preset bidirectional communication protocol, the scan gun connection method according to the embodiment of the present invention may further include: and sending an operation command received in the operation area to the scanning gun based on the connection, wherein the operation command is used for controlling the scanning gun.
Referring to fig. 3, a flowchart illustrating steps of a scan gun connection method according to an alternative embodiment of the present invention is shown. The scanning gun connection method can be applied to a mobile terminal, and specifically comprises the following steps:
step 310, displaying an input method interface, wherein the input method interface comprises an operation area.
And 320, monitoring an operation area of the input method interface.
Step 330, when the user operation is monitored, determining whether the user operation is a preset connection operation.
Specifically, after the input method interface is displayed, the operation area of the input method interface may be monitored, so that the user operation submitted by the user on the operation area may be monitored, and whether the user operation is a preset connection operation may be determined. If the user operation is a preset connection operation, step 340 may be executed to determine a scan gun to be connected according to the connection operation received in the operation area. . If the user operation is not the preset connection operation, the user operation may be ignored, or a corresponding operation command may be generated based on operation information of the user operation, such as operation position information of the user operation, so as to jump to step 370 for execution according to the operation command.
And 340, when the user operation is a preset connection operation, performing device search based on the connection operation to obtain a candidate device.
And 350, selecting a scanning gun from the candidate devices so as to determine the selected scanning gun as the scanning gun to be connected.
Specifically, in the embodiment of the present invention, when the searched candidate device includes a scan gun, the scan gun may be screened from the searched candidate device, so as to generate a candidate device list based on the screened scan gun, and the candidate device list is displayed, so that the user may select the scan gun to be connected through the displayed candidate device list, that is, the user may select the scan gun to be connected through the selection operation submitted based on the selected device list. Optionally, in the embodiment of the present invention, selecting a scanning gun from the candidate devices may specifically include the following sub-steps:
substep 3501, presenting a list of candidate devices based on the scan guns contained in the candidate devices;
sub-step 3502, receiving a selection operation submitted based on the list of candidate devices;
and a substep 3503, taking the scanning gun corresponding to the selection operation as the selected scanning gun.
Specifically, after receiving a selection operation submitted by a user based on a candidate device list, the scan gun corresponding to the selection operation may be determined based on operation information of the selection operation, such as operation position information of the selection operation, and then the scan gun corresponding to the selection operation may be determined as the scan gun selected by the user, so as to use the selected scan gun as the scan gun to be connected.
Therefore, the embodiment of the invention displays the candidate equipment list based on the scanning guns contained in the candidate equipment, so that the user can select the scanning gun to be connected through the displayed candidate equipment list, and the user can conveniently select the scanning gun to be connected. In addition, the candidate device list in this embodiment may be generated based on the screened scan guns, and may not show information of other devices except the scan guns, and may specifically be used to show information of each scan gun to be selected, thereby improving user selection efficiency.
Of course, the scan gun to be connected may also be determined in other manners in the embodiment of the present invention, for example, when the searched candidate device only includes one scan gun, the scan gun included in the candidate device may be automatically determined as the scan gun to be connected, which is not limited in the embodiment of the present invention.
Further, after the candidate device is searched out, the scan gun connection method provided by the embodiment of the present invention may further include: determining a number of scan guns in the candidate device; if the number of the scanning guns in the candidate equipment is one, determining the scanning guns in the candidate equipment as the scanning guns to be connected; if the number of the scanning guns in the candidate equipment is more than one, executing a step of displaying a candidate equipment list based on the scanning guns contained in the candidate equipment, wherein the candidate equipment list is used for displaying all the scanning guns contained in the candidate equipment. Therefore, the number of the scanning guns contained in the candidate equipment is one, namely, under the condition that the searched candidate equipment contains one scanning gun, the scanning gun can be directly determined as the scanning gun to be connected, the selection of a user is not needed, the determination efficiency of the scanning gun to be connected is further improved, and the connection efficiency of the scanning gun can be further improved.
And step 360, establishing connection with the scanning gun according to a preset two-way communication protocol.
The bidirectional communication protocol comprises a Bluetooth serial port protocol or a Bluetooth low energy consumption protocol.
Optionally, the mobile terminal may establish a connection with the scanning gun through the bluetooth serial port according to a bluetooth serial protocol. Particularly, under the condition that the mobile terminal is provided with the bluetooth serial port, the mobile terminal can be connected with the scanning gun through the bluetooth serial port according to a bluetooth serial port protocol, so that bidirectional communication can be carried out with the scanning gun based on the connection in the following process, and data transmission and sending are realized. It should be noted that the bluetooth serial port may be an apparatus interface based on the SPP protocol, which can create a serial port between bluetooth apparatuses for data transmission, and the purpose of the bluetooth serial port may be to ensure a complete communication path between applications on two different apparatuses (i.e., two communicating apparatuses).
In another optional mode, the mobile terminal may establish a connection with the scanning gun according to a bluetooth low energy protocol, so that bidirectional communication may be subsequently performed with the scanning gun based on the connection, power consumption and cost are greatly reduced while data transmission and transmission are realized, and low-latency data transmission is realized.
And step 370, based on the connection, sending an operation command received in the operation area to the scanning gun, wherein the operation command is used for controlling the scanning gun.
Wherein the operating commands may include various commands for controlling the scan gun, such as at least one of: a data clear command, a shutdown command, a storage mode command, a normal mode command, a data upload command, an encoding format command, and the like, which is not particularly limited in this embodiment.
It should be noted that the data clear command in the embodiment of the present invention may be used to control the scan gun clear data, and the data clear command may be automatically generated based on a user operation submitted by a user in the input method operation area. For example, as shown in fig. 2, when a user clicks a "data clear" button in an operation area, an input method plugin installed in the mobile terminal may automatically generate a corresponding data clear command, so that the mobile terminal may receive the data clear command, and may send the data clear command to the scanning gun through the input method plugin, so that the scanning gun executes the data clear command to clear data in the scanning gun, thereby achieving a purpose of controlling the scanning gun to clear data.
The shutdown command in the embodiment of the invention can be used for controlling the shutdown of the scanning gun, and the shutdown command can be automatically generated based on the user operation submitted by the user in the input method operation area. For example, as shown in fig. 2, when a user clicks an "immediate shutdown" button in an operation area, an input method plug-in installed in the mobile terminal may automatically generate a corresponding shutdown command, so that the mobile terminal may receive the shutdown command for controlling the scanning gun to be immediately shutdown, and may send the shutdown command to the scanning gun through the input method plug-in, so that the scanning gun executes the shutdown command to be immediately shutdown, thereby achieving the purpose of controlling the scanning gun to be shutdown.
The storage mode command in the embodiment of the invention can be used for controlling the storage mode of the scanning gun, and the storage mode command can be automatically generated based on the user operation submitted by the user in the input method operation area. For example, as shown in fig. 2, when a user clicks a "storage mode" button in an operation area, an input method plug-in installed on the mobile terminal may automatically generate a corresponding storage mode command, so that the mobile terminal may receive the storage mode command of the scanning gun, and may send the storage mode command to the scanning gun through the input method plug-in, so that the scanning gun executes the storage mode command to switch the storage mode, and performs data storage according to the switched storage mode, thereby achieving the purpose of controlling the storage mode of the scanning gun.
The normal mode command in the embodiment of the invention can be used for controlling the scanning gun to enter the normal mode for data scanning, and the normal mode command can be automatically generated based on user operation submitted by a user in an input method operation area. For example, as shown in fig. 2, when a user clicks a "normal mode" button in an operation area, an input method plug-in installed on the mobile terminal may automatically generate a corresponding normal mode command, so that the mobile terminal may receive the normal mode command of the scanning gun, and may send the normal mode command to the scanning gun through the input method plug-in, so that the scanning gun executes the normal mode command to enter a normal mode for data scanning, thereby achieving the purpose of controlling the scanning gun to scan data.
The data uploading command in the embodiment of the invention can be used for controlling the scanning gun to start or suspend data uploading, and the data uploading command can be automatically generated based on user operation submitted by a user in the input method operation area. For example, as shown in fig. 2, when a user clicks a "data upload" button in an operation area, an input method plug-in installed on the mobile terminal may automatically generate a corresponding data upload command, so that the mobile terminal may receive the data upload command, and may send the data upload command to the scanning gun through the input method plug-in, so that the scanning gun executes the data upload command, thereby achieving the purpose of controlling the scanning gun to upload data. For example, when the scanning gun does not start data uploading yet, if the user clicks a "data uploading" button, a "data uploading" command can be sent to the scanning gun through the middle input method plug-in of the mobile terminal to control the scanning gun to start data uploading; in the process of uploading data by the scanning gun, if a user clicks a data uploading button, the scanning gun can be controlled to suspend data uploading after a data uploading command is sent to the scanning gun, and the purpose of controlling the data uploading of the scanning gun is achieved.
The encoding format command in the embodiment of the present invention may be used to control an encoding format of a scanning gun, where the encoding format may be a UTF-8 encoding format, or a chinese character internal code extended specification (GBK) encoding format, and the like, and the present embodiment does not specifically limit this. For example, as shown in fig. 2, when the user clicks the "GBK code" button in the operation area, the input method plug-in installed on the mobile terminal may automatically generate a corresponding code format command, so that the mobile terminal may receive the code format command and may send the code format command to the scanning gun through the input method plug-in, so that the scanning gun executes the code format command to set the code format to the GBK code format, thereby achieving the purpose of controlling the code format of the scanning gun. For another example, when the user clicks the "UTF-8 code" button in the operation area, the input method plug-in installed on the mobile terminal may automatically generate a corresponding code format command, so that the mobile terminal may receive the code format command, and may send the code format command to the scanning gun through the input method plug-in, so that the scanning gun executes the code format command to set the code format to the UTF-8 code format, thereby achieving the purpose of controlling the code format of the scanning gun.
To sum up, after the input method interface is displayed, the embodiment of the invention can receive the connection operation through the operation area of the input method interface, determine the scanning gun to be connected according to the connection operation, and establish connection with the scanning gun according to the preset two-way communication protocol, so that the scanning gun is identified as the non-keyboard device under the two-way communication protocol, thereby overcoming the defect that the input method soft keyboard is closed when the mobile terminal such as a mobile phone and the like is connected with the scanning gun in the prior art, solving the problem that the mobile terminal cannot pop up the soft keyboard during the process of using the scanning gun by a user so as to cause the user to be incapable of manually inputting the scanning gun by the user in the prior art, simultaneously transmitting and sending data, and realizing the two-way communication between the scanning gun and the mobile terminal.
Referring to fig. 4, a block diagram of a connection device of a scan gun according to an embodiment of the present invention is shown, where the connection device of the scan gun specifically includes the following modules:
an interface display module 410, configured to display an input method interface, where the input method interface includes an operation area;
a scan gun determining module 420, configured to determine a scan gun to be connected according to the connection operation received in the operation area;
a scanning gun connection module 430, configured to establish a connection with the scanning gun according to a preset bidirectional communication protocol.
On the basis of the above embodiment, optionally, the scan gun determination module 420 may include the following sub-modules:
the searching submodule is used for searching equipment based on the connection operation to obtain candidate equipment;
and the selecting submodule is used for selecting a scanning gun from the candidate equipment so as to determine the selected scanning gun as the scanning gun to be connected.
Optionally, the selected sub-module may include the following units:
a list presentation unit configured to present a list of candidate devices based on a scan gun included in the candidate devices;
a selection operation receiving unit configured to receive a selection operation submitted based on the candidate device list;
and the selecting unit is used for taking the scanning gun corresponding to the selecting operation as the selected scanning gun.
Optionally, the scan gun determining module 420 may further include the following sub-modules:
a scanning gun number determining submodule for determining the number of scanning guns in the candidate device;
a scanning gun determining sub-module, configured to determine a scanning gun in the candidate device as a scanning gun to be connected when the number of scanning guns in the candidate device is one; and when the number of the scanning guns in the candidate equipment is more than one, triggering the list presentation unit to carry out the step of presenting the candidate equipment list based on the scanning guns contained in the candidate equipment. The list of candidate apparatuses is used to show scan guns included in the candidate apparatuses.
Optionally, the scanning gun connection device further includes the following modules:
the operation area monitoring module is used for monitoring the operation area of the input method interface;
the user operation judging module is used for judging whether the user operation is a preset connection operation or not when the user operation is monitored; and if the user operation is a preset connection operation, triggering the scanning gun determining module to execute a step of determining a scanning gun to be connected according to the connection operation received in the operation area.
For example, the operation area monitoring module monitors the operation area of the input method interface after the interface display module displays the input method interface, so that the user operation judgment module is triggered to judge whether the user operation is a preset connection operation when the user operation is monitored. If the user operation is the preset connection operation, the user operation judgment module can trigger the scanning gun determination module to execute the step of determining the scanning gun to be connected according to the connection operation received in the operation area, so that the scanning gun connection module can establish connection with the scanning gun according to the preset two-way communication protocol after the scanning gun determination module determines the scanning gun to be connected, the problem that in the prior art, a soft keyboard cannot be popped up by a mobile terminal in the process of using the scanning gun by a user, so that manual input of the user cannot be achieved, and data transmission are achieved.
Optionally, the connecting device of the scanning gun may further include:
and the scanning gun control module is used for sending an operation command received in the operation area to the scanning gun based on the connection, and the operation command is used for controlling the scanning gun.
For example, after the scan gun connection module establishes a connection with the scan gun target according to a preset bidirectional communication protocol, the scan gun control module may send an operation command received in the operation area to the scan gun based on the established connection, so as to control the scan gun and realize control of the scan gun.
Alternatively, the above-described scan gun connection apparatus may be applied to a mobile terminal. The operation command may include at least one of: a data clear command, a shutdown command, a storage mode command, a normal mode command, a data upload command, a coding format command, and the like, which is not particularly limited in this embodiment; the bidirectional communication protocol includes a bluetooth serial protocol or a bluetooth low energy protocol, and the like, which is not particularly limited in this embodiment.
It should be noted that the above-mentioned scan gun connection device can execute the scan gun connection method provided by any embodiment of the present invention, and has the corresponding functions and advantages of the execution method.
In a specific implementation, the connecting device of the scanning gun may be formed by two or more physical entities, or may be formed by one physical entity, which is not limited in this embodiment. In addition, the scan gun connection device may be integrated in a mobile terminal, and the mobile terminal may be a smart phone, a tablet computer, a Personal Digital Assistant (PDA), or the like, which is not limited in this embodiment.
Further, an embodiment of the present invention further provides a mobile terminal, including: a processor and a memory. At least one instruction is stored in the memory and executed by the processor, so that the mobile terminal executes the scan gun connection method as described in the above method embodiment.
In practical implementation, the memory may be used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the scan gun connection method according to any embodiment of the present invention (for example, the interface display module, the scan gun determination module, the scan gun connection module, and the like in the scan gun connection device). The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating device, an application program required for at least one function; the storage data area may store data created according to the use of the mobile terminal, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
The processor executes various functional applications and data processing of the mobile terminal by running software programs, instructions and modules stored in the memory, that is, the scan gun connection method described above is realized. Specifically, in the embodiment, when the processor executes one or more programs stored in the memory, the following operations are specifically implemented: displaying an input method interface, wherein the input method interface comprises an operation area; determining a scanning gun to be connected according to the connection operation received in the operation area; and establishing connection with the scanning gun according to a preset two-way communication protocol.
Referring to fig. 5, a schematic diagram of a mobile terminal according to an example of the present invention is shown. As shown in fig. 5, the mobile terminal includes a Radio Frequency (RF) circuit 510, a memory 520, an input unit 530, a display unit 540, a processor 560, an audio circuit 570, a wifi (wirelessfidelity) module 580, and a power supply 590.
The input unit 530 may be used to receive numeric or character information input by a user and generate signal inputs related to user settings and function control of the mobile terminal, among other things. Specifically, in the embodiment of the present invention, the input unit 530 may include a touch panel 531. The touch panel 531, also called a touch screen, can collect a touch operation performed by a user on or near the touch panel 531 (e.g. a user's operation performed on the touch panel 531 by using a finger, a stylus pen, or any other suitable object or accessory, and can also be a connection operation submitted by the user on an operation area, etc.), and drive a corresponding connection device according to a preset program. Alternatively, the touch panel 531 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, sends it to the processor 560, and can receive and execute commands from the processor 560. In addition, the touch panel 531 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 531, the input unit 530 may further include other input devices 532, and the other input devices 532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Among them, the display unit 540 may be used to display information input by a user or information provided to the user and various menu interfaces of the mobile terminal. The display unit 540 may include a display panel 541, and optionally, the display panel 541 may be configured in the form of an LCD or an organic light-emitting diode (OLED), or the like.
It should be noted that the touch panel 531 may cover the display panel 541 to form a touch display screen, and when the touch display screen detects a touch operation thereon or nearby, the touch display screen is transmitted to the processor 560 to determine the type of the touch event, and then the processor 560 provides a corresponding visual output on the touch display screen according to the type of the touch event.
The touch display screen comprises an application program interface display area and a common control display area. The arrangement modes of the application program interface display area and the common control display area are not limited, and can be an arrangement mode which can distinguish two display areas, such as vertical arrangement, left-right arrangement and the like. The application interface display area may be used to display an interface of an application. Each interface may contain at least one interface element such as an icon and/or widget desktop control for an application. The application interface display area may also be an empty interface that does not contain any content. The common control display area is used for displaying controls with high utilization rate, such as application icons like setting buttons, interface numbers, scroll bars, phone book icons and the like.
The processor 560 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the first memory 521 and calling data stored in the second memory 522, thereby performing overall monitoring of the mobile terminal. Optionally, processor 660 may include one or more processing units.
In the embodiment of the present invention, the processor 560 is used for each step included in the scan gun connection method described in the above embodiment of the method by calling the software program and/or module stored in the first memory 521 and/or the data stored in the second memory 522. For example, the processor 560 is configured to trigger the display unit 540 to display an input method interface, where the input method interface includes an operation area; determining a scanning gun to be connected according to the connection operation received in the operation area; and establishing connection with the scanning gun according to a preset two-way communication protocol.
Embodiments of the present invention further provide a computer-readable storage medium, where instructions of the computer-readable storage medium, when executed by a processor of a computer device, enable the computer device to perform a scan gun connection method as described in the above method embodiments. Illustratively, the scan gun attachment method includes: displaying an input method interface, wherein the input method interface comprises an operation area; determining a scanning gun to be connected according to the connection operation received in the operation area; and establishing connection with the scanning gun according to a preset two-way communication protocol.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. For the system, apparatus, and media embodiments, because they are substantially similar to the method embodiments, the description is relatively simple, and for related parts, reference may be made to some descriptions of the method embodiments.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. It should be noted that, the units and modules included in the above embodiments are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A scan gun attachment method, comprising:
displaying an input method interface, wherein the input method interface comprises an operation area;
determining a scanning gun to be connected according to the connection operation received in the operation area;
and establishing connection with the scanning gun according to a preset two-way communication protocol.
2. The scan gun connection method according to claim 1, wherein deciding a scan gun to be connected in accordance with the connection operation received at the operation area, comprises:
performing equipment search based on the connection operation to obtain candidate equipment;
and selecting a scanning gun from the candidate devices so as to determine the selected scanning gun as the scanning gun to be connected.
3. The scan gun connection method of claim 2, wherein selecting a scan gun from the candidate devices comprises:
presenting a list of candidate devices based on a scan gun included in the candidate devices;
receiving a selection operation submitted based on the candidate device list;
and taking the scanning gun corresponding to the selection operation as the selected scanning gun.
4. The scan gun connection method of claim 3, further comprising:
determining a number of scan guns in the candidate device;
if the number of the scanning guns in the candidate equipment is one, determining the scanning guns in the candidate equipment as the scanning guns to be connected;
if the number of the scanning guns in the candidate equipment is more than one, executing a step of displaying a candidate equipment list based on the scanning guns contained in the candidate equipment, wherein the candidate equipment list is used for displaying all the scanning guns contained in the candidate equipment.
5. The scan gun connection method of claim 1, further comprising, after displaying the input method interface:
monitoring an operation area of the input method interface;
when user operation is monitored, judging whether the user operation is preset connection operation or not;
and if the user operation is a preset connection operation, executing a step of determining a scanning gun to be connected according to the connection operation received in the operation area.
6. The method as claimed in any one of claims 1 to 5, further comprising, after establishing a connection with the scan gun target according to a predetermined two-way communication protocol:
and sending an operation command received in the operation area to the scanning gun based on the connection, wherein the operation command is used for controlling the scanning gun.
7. The scan gun connection method according to claim 6, wherein the scan gun connection method is applied to a mobile terminal;
the operation command includes at least one of: the method comprises the following steps of (1) clearing data, shutting down, storing mode, common mode, data uploading and encoding format;
the bidirectional communication protocol comprises a Bluetooth serial port protocol or a Bluetooth low energy consumption protocol.
8. A scanning gun attachment, comprising:
the interface display module is used for displaying an input method interface, and the input method interface comprises an operation area;
the scanning gun determining module is used for determining a scanning gun to be connected according to the connection operation received in the operation area;
and the scanning gun connection module is used for establishing connection with the scanning gun according to a preset two-way communication protocol.
9. A mobile terminal, comprising: a processor and a memory;
the memory has stored therein at least one instruction that, when executed by the processor, causes the mobile terminal to perform the scan gun connection method of any of claims 1 to 7.
10. A computer-readable storage medium, wherein instructions in the readable storage medium, when executed by a processor of a computer device, enable the computer device to perform the scan gun connection method of any of claims 1 to 7.
CN202011254386.0A 2020-11-11 2020-11-11 Scanning gun connection method, device, terminal and medium Active CN112218281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011254386.0A CN112218281B (en) 2020-11-11 2020-11-11 Scanning gun connection method, device, terminal and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011254386.0A CN112218281B (en) 2020-11-11 2020-11-11 Scanning gun connection method, device, terminal and medium

Publications (2)

Publication Number Publication Date
CN112218281A true CN112218281A (en) 2021-01-12
CN112218281B CN112218281B (en) 2023-06-27

Family

ID=74058460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011254386.0A Active CN112218281B (en) 2020-11-11 2020-11-11 Scanning gun connection method, device, terminal and medium

Country Status (1)

Country Link
CN (1) CN112218281B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112989852A (en) * 2021-02-20 2021-06-18 山东英信计算机技术有限公司 Code scanning method, system and equipment for server board card test
CN113268145A (en) * 2021-05-27 2021-08-17 青岛中科英泰商用系统股份有限公司 Physical input device input method, system, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130090106A1 (en) * 2011-10-07 2013-04-11 Neuaer, Llc Automating actions within a phone network based upon scanned wireless signals
CN106375935A (en) * 2016-08-15 2017-02-01 余意华 Rapid connection mode for Bluetooth input method and Bluetooth bar code scanner
US20180139608A1 (en) * 2011-03-24 2018-05-17 David William Wilson Authentication using application authentication element
CN108347720A (en) * 2018-02-08 2018-07-31 广东欧珀移动通信有限公司 communication connecting method, device, terminal and storage medium
CN110636477A (en) * 2018-06-21 2019-12-31 腾讯科技(深圳)有限公司 Device connection method, device, terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180139608A1 (en) * 2011-03-24 2018-05-17 David William Wilson Authentication using application authentication element
US20130090106A1 (en) * 2011-10-07 2013-04-11 Neuaer, Llc Automating actions within a phone network based upon scanned wireless signals
CN106375935A (en) * 2016-08-15 2017-02-01 余意华 Rapid connection mode for Bluetooth input method and Bluetooth bar code scanner
CN108347720A (en) * 2018-02-08 2018-07-31 广东欧珀移动通信有限公司 communication connecting method, device, terminal and storage medium
CN110636477A (en) * 2018-06-21 2019-12-31 腾讯科技(深圳)有限公司 Device connection method, device, terminal and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112989852A (en) * 2021-02-20 2021-06-18 山东英信计算机技术有限公司 Code scanning method, system and equipment for server board card test
CN113268145A (en) * 2021-05-27 2021-08-17 青岛中科英泰商用系统股份有限公司 Physical input device input method, system, electronic device and storage medium
CN113268145B (en) * 2021-05-27 2023-01-03 青岛中科英泰商用系统股份有限公司 Physical input device input method, system, electronic device and storage medium

Also Published As

Publication number Publication date
CN112218281B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
WO2021036594A1 (en) Control method applied to screen projection scenario and related device
US11054988B2 (en) Graphical user interface display method and electronic device
US11237724B2 (en) Mobile terminal and method for split screen control thereof, and computer readable storage medium
EP3098526B1 (en) Customized control method and system for air conditioner operation mode
US10725646B2 (en) Method and apparatus for switching screen interface and terminal
WO2019015404A1 (en) Method and apparatus for switching applications in split screen mode, and related device thereof
CN106383645A (en) Music playing control method and mobile terminal
JP2023510421A (en) Widget processing method and related equipment
US10423264B2 (en) Screen enabling method and apparatus, and electronic device
CN109923511B (en) Object processing method and terminal
US20120124521A1 (en) Electronic device having menu and display control method thereof
WO2020007147A1 (en) Application switching method and apparatus for split screen, storage medium, and electronic device
KR102270007B1 (en) Terminal device and method for remote control thereof
KR20100009986A (en) The method for inputing user commond and the electronic apparatus thereof
US10402148B2 (en) Multi-display control apparatus, systems, and methods
WO2021088706A1 (en) Method for controlling application program and electronic device
CN106371749A (en) Method and device for terminal control
KR20130097331A (en) Apparatus and method for selecting object in device with touch screen
CN112218281B (en) Scanning gun connection method, device, terminal and medium
US20240019987A1 (en) Icon arranging method and apparatus, and electronic device
CN113050863A (en) Page switching method and device, storage medium and electronic equipment
CN107728898B (en) Information processing method and mobile terminal
CN104951178A (en) Processing method, device and system for desktop data
US11460971B2 (en) Control method and electronic device
CN112423282B (en) Scanning gun data processing method and related equipment

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
CB02 Change of applicant information

Address after: 510000 full floor 6 and 301 floor 3, building 1, No. 51, Xiangshan Avenue, Ningxi street, Zengcheng District, Guangzhou, Guangdong

Applicant after: Xunla (Guangzhou) Intelligent Technology Co.,Ltd.

Address before: 510000 Second Floor Part of Building 137, Pacific Industrial Zone, Xintang Town, Zengcheng, Guangzhou, Guangdong Province

Applicant before: NETUM INTELLIGENT (GUANGZHOU) TECHNOLOGY CO.,LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant