[go: up one dir, main page]

CN109190726B - Communication method and system - Google Patents

Communication method and system Download PDF

Info

Publication number
CN109190726B
CN109190726B CN201810864123.8A CN201810864123A CN109190726B CN 109190726 B CN109190726 B CN 109190726B CN 201810864123 A CN201810864123 A CN 201810864123A CN 109190726 B CN109190726 B CN 109190726B
Authority
CN
China
Prior art keywords
data
bar code
host
channels
code reader
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
CN201810864123.8A
Other languages
Chinese (zh)
Other versions
CN109190726A (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.)
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo Technology Co Ltd
Original Assignee
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo 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 Shanghai Sunmi Technology Group Co Ltd, Shenzhen Michelangelo Technology Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN201810864123.8A priority Critical patent/CN109190726B/en
Publication of CN109190726A publication Critical patent/CN109190726A/en
Application granted granted Critical
Publication of CN109190726B publication Critical patent/CN109190726B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • G06K7/10821Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Electromagnetism (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

The application discloses a communication method and a communication system. Wherein, the method comprises the following steps: determining a plurality of data channels between the bar code reader and the host, wherein the plurality of data channels occupy the same physical channel, and at least comprise a keyboard wedge KBW channel and a human-computer interaction device HID channel; and when the data to be transmitted is detected, at least one of the data channels is adopted to carry out data interaction between the bar code reader and the host. The method and the device solve the technical problems that in the related art, when the bar code reader interacts with the host computer for different types of data, the related graphic code needs to be scanned, the operation is complex, and the working efficiency of the bar code reader is low.

Description

Communication method and system
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communication method and system.
Background
The physical interfaces of the barcode readers on the market at present are in the forms of PS/2(Personal System/2), COM (Serial Communication Port), USB (Universal Serial Bus), and the like, and when the barcode reader needs to be set or receives other HID data sent by a host, the barcode reader needs to scan a related graphic code and send the graphic code to the host. After acquiring the graphic code sent by the bar code reader, the host sends a control instruction, wherein the control instruction can be virtual resource information or an instruction for setting the bar code reader. The sound size of the bar code reader, the on-off state of the indicator light and the like can be set. After the barcode reader scans the commodity code or the payment code, the scanned barcode information is transmitted to a USB interface of the host through a KBW (Keyboard Wedge) mode, the host needs to identify a working mode of the barcode reader before receiving the barcode information sent by the barcode reader, and if the barcode reader is in a USB KBW mode, the host receives the barcode information from the barcode reader. If the bar code reader is in the USB HID mode, the host computer can send configuration information to the bar code reader. The bar code reader can only be in one mode at the same time, and when the bar code reader needs to switch the mode of the bar code reader, the corresponding graphic code needs to be scanned. For example, when a merchant scans a graphic code by using a barcode reader, the barcode reader is in a USBKBW mode, if the barcode reader needs to be set or receives HID data issued by a host, the barcode reader needs to scan the graphic code corresponding to the relevant setting to switch the barcode reader to a USB HID mode, and after the barcode reader is switched to the USB HID mode, the barcode reader can receive a control instruction from the host or receive other HID data sent by the host.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a communication method and a communication system, which at least solve the technical problems that in the related art, when a bar code reader interacts with a host computer with different types of data, the related graphic code needs to be scanned, the operation is complex, and the working efficiency of the bar code reader is low.
According to an aspect of an embodiment of the present application, there is provided a communication method, including: determining a plurality of data channels between the bar code reader and the host, wherein the plurality of data channels occupy the same physical channel, and at least comprise a keyboard wedge KBW channel and a human-computer interaction device HID channel; and when the data to be transmitted is detected, at least one of the data channels is adopted to carry out data interaction between the bar code reader and the host.
Optionally, the data to be transmitted includes: a first type of data and a second type of data; data interaction between a barcode reader and a host using at least one of a plurality of data channels includes: the bar code reader receives first type data issued by the host through an HID channel; the host receives the second type data sent by the bar code reader through the KBW channel.
Optionally, the first type of data includes: a control instruction sent by the host computer or virtual resource information corresponding to the bar code information; the second type of data includes bar code information scanned by a bar code reader.
Optionally, after the barcode reader receives the first type of data sent by the host through the HID channel, the method further includes: and controlling a screen of the bar code reader to display the virtual resource information, and/or controlling the bar code reader to output the virtual resource information in a voice broadcast mode.
Optionally, the type of data transmitted by each of the plurality of data channels is different.
According to an aspect of the embodiments of the present application, there is also provided a communication method, including: detecting a plurality of data types of data to be transmitted between the bar code reader and the host, wherein the plurality of data types at least comprise KBW data and HID data; when multiple data types are detected, corresponding data are transmitted by adopting multiple data channels corresponding to the multiple data types, wherein the multiple data channels occupy the same physical channel.
Optionally, the transmitting the corresponding data by using a plurality of data channels corresponding to a plurality of data types includes: transmitting data of various data types in corresponding data channels simultaneously; or, the data of multiple data types are transmitted in the corresponding data channels successively.
According to an aspect of the embodiments of the present application, there is also provided a communication system, including: the bar code reader is used for determining a plurality of data channels between the bar code reader and the host, wherein the plurality of data channels occupy the same physical channel, and the plurality of data channels at least comprise KBW channels and HID channels; and upon detecting the transmission data, sending the data over the KBW channel and/or receiving the data over the HID channel; and the host is used for receiving data through the KBW channel and/or sending data through the HID channel when the bar code reader detects the transmitted data.
According to an aspect of the embodiments of the present application, there is also provided a communication system, including: the host computer is used for determining a plurality of data channels between the bar code reader and the host computer, wherein the plurality of data channels occupy the same physical channel, and the plurality of data channels at least comprise KBW channels and HID channels; and receiving data through the KBW channel and/or issuing data through the HID channel when detecting the transmission data; a barcode reader for sending data over the KBW channel and/or receiving data over the HID channel upon detection of transmitted data.
According to still another aspect of an embodiment of the present application, there is provided a storage medium including a stored program, wherein the apparatus on which the storage medium is located is controlled to perform the above communication method when the program is executed.
According to still another aspect of the embodiments of the present application, there is provided a processor for executing a program, wherein the program executes the above communication method.
In the embodiment of the application, a plurality of data channels between a bar code reader and a host are determined, wherein the plurality of data channels occupy the same physical channel, and the plurality of data channels at least comprise KBW channels and HID channels; and when the data to be transmitted is detected, at least one of the data channels is adopted to carry out data interaction between the bar code reader and the host. Therefore, the mode switching is not needed when the bar code reader needs to receive the HID data after sending KBW data. The method and the device have the advantages that the operation of the bar code reader is simplified, the time of merchants and consumers is saved, the technical effect of the use efficiency of the bar code reader is improved, and the technical problems that in the related technology, when the bar code reader interacts with a host computer for different types of data, related graphic codes need to be scanned, the operation is complex, and the working efficiency of the bar code reader is low are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram of a communication system according to an embodiment of the present application;
fig. 2 is a schematic diagram of another communication system according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a communication method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a communication method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For a better understanding of the above embodiments, the meanings of technical terms referred to in the embodiments of the present application are explained below:
KBW: either a software program or an embedded hardware device that translates digital signals from a bar code reader or disk reader into computer recognizable keyboard stroke codes. The software form of keyboardwelder intercepts digital signals as they arrive at the computer from the reader and translates them into keyboard-entered code words. The hardware version of the keypad wedge would insert a translation device between the reader and the keyboard. The data sent through the web will appear to be typed into the computer while the keyboard itself is still fully functional. Because the computer using the keyboard wedge cannot distinguish between data entering the computer from the scanning device and data entered into the computer from the keyboard, the wedge can incorporate a bar code identification function into an existing computer without modifying the software application.
HID: HID devices are devices that interact directly with humans, such as keyboards, mice, joysticks, etc. However, the HID device does not necessarily need to be human interface, as long as the devices complying with the HID class specification are HID devices. The exchanged data is stored in a structure called report (report) and the firmware of the device must support the format of the HID report. The host sends and requests the report in control and interrupt transmission to send and receive data. The format of the report is very flexible and can process any kind of data.
USB: for handling the interconnection of the electrical layer and the protocol layer. The USB bus interface is realized by a main controller, and the main controller is responsible for the transmission of data flow between the host and the USB equipment. These transmission data are treated as a continuous bit stream. Each USB device provides one or more interfaces that can communicate with the client, each interface consisting of 0 or more pipes that independently transfer data between the client and a particular terminal of the device. The USB driver establishes an interface and a pipeline for the real requirements of the host software, and when a configuration request is made, the main controller provides services according to the parameters provided by the host software. One USB interface can theoretically support 127 external devices. The USB device connected to the host may also include other USB interfaces in addition to the HID interface. For example, an image display device may use an HID interface for software control of brightness, contrast, and refresh rate, while using a conventional image interface for transmitting data to be displayed. The USB microphone may use real-time transmission to play voice while using the HID interface to control volume, oscillation, bass, etc.
In the related art, when the barcode reader communicates with the host through the USB interface on the host, the barcode reader is in a single mode, i.e., a USB KBW mode or a USB HID mode, and the barcode reader needs to scan a corresponding graphic code when the mode is switched. For example, when the barcode reader needs to be set, the barcode reader needs to scan the configuration code to switch to the USB HID mode, and when the host identifies that the barcode reader is in the USB HID mode, the host may issue the setting information to the barcode reader. The host computer can open and close the setting etc. to the strip code reader pronunciation size, the lamp of instruction. When the host computer issues the setting information to the bar code reader, the bar code reader is in a USB HID mode, cannot scan the commodity code or the payment code, and cannot send HBW data to the host computer. After the host computer finishes setting the bar code reader, the bar code reader needs to scan the switching code again to switch back to the USB KWB mode, and the commodity code can be continuously scanned and sent to the host computer, so that the host computer can carry out checkout work. Or after the barcode reader sends the KWB data to the host, if other HID data needs to be received from the host, the corresponding graphic code also needs to be scanned, so that the barcode reader is switched to the USB HID mode, which is tedious in operation, wastes much time, and has low working efficiency.
In order to solve the above problems, embodiments of the present application provide corresponding solutions, which are described in detail below.
An embodiment of the present application further provides a communication system, fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application, and as shown in fig. 1, the system includes:
the bar code reader 12 is used for determining a plurality of data channels between the bar code reader 12 and the host 14, wherein the plurality of data channels occupy the same physical channel, and the plurality of data channels at least comprise KBW channels and HID channels; and upon detecting the transmission data, sending the data over the KBW channel and/or receiving the data over the HID channel;
in an alternative embodiment, the protocol for transmitting KBW data and HID data may be embedded in the barcode reader 12, and the barcode reader 12 is linked to the USB interface of the host 14 via a data line. The barcode reader 12 is used for transmitting KBW data to the host 14 and receiving HID data sent by the host 14.
And the host 14 is used for receiving data through the KBW channel and/or sending data down through the HID channel when the bar code reader 12 detects the transmitted data.
The host 14 is used for receiving KBW data sent by the barcode reader 12 and sending HID data to the barcode reader 12. Wherein, KBW data refers to: scanning the obtained bar code information by a bar code reader; the HID data refer to: control commands or virtual resource information sent by the host.
An embodiment of the present application further provides a communication system, fig. 2 is a schematic structural diagram of a communication system according to an embodiment of the present application, and as shown in fig. 2, the system includes:
the host 22 is used for determining a plurality of data channels between the bar code reader 24 and the host 22, wherein the plurality of data channels occupy the same physical channel, and the plurality of data channels at least comprise KBW channels and HID channels; and receiving data through the KBW channel and/or issuing data through the HID channel when detecting the transmission data;
in an alternative embodiment, the protocol for transmitting KBW data and HID data may be embedded in the barcode reader 24, and the barcode reader 24 is linked to the USB interface of the host 22 via a data line. The host 22 is used for receiving KBW data sent by the barcode reader 24 and sending HID data to the barcode reader 24. Wherein, KBW data refers to: scanning the obtained bar code information by a bar code reader; the HID data refer to: control commands or virtual resource information issued by the host 22.
A barcode reader 24 for sending data over the KBW channel and/or receiving data over the HID channel upon detection of transmitted data.
The barcode reader 24 is used to send KBW data to the host 22 and to receive HID data sent by the host 22.
An embodiment of the present application further provides a communication method, and fig. 3 is a schematic flowchart of a communication method according to an embodiment of the present application, and as shown in fig. 3, the method includes:
step S302, determining a plurality of data channels between the bar code reader and the host;
a plurality of data channels are distributed in the bar code reader, and the plurality of data channels at least comprise KBW channels and HID channels; the KBW channel is used to transmit KBW data and the HID channel is used to transmit HID data. Wherein, a plurality of data channels occupy the same physical channel. Wherein the data type transmitted by each data channel in the plurality of data channels is different. I.e. different data channels carry different types of data.
And step S304, when the data to be transmitted is detected, performing data interaction between the bar code reader and the host computer by adopting at least one of the plurality of data channels.
Based on the above steps, in the embodiment of the present application, the triggering condition for triggering data interaction by using one or more channels of the multiple data channels is to detect data to be transmitted, and the scan switching code is not used as the triggering condition for data interaction by using the multiple data channels in the related art, so that parallel transmission of KBW data and HID data can be realized.
In some embodiments of the present application, the data to be transmitted includes: a first type of data and a second type of data. The first type of data includes: control instructions sent by the host computer or virtual resource information corresponding to the bar code information, such as the amount of money; the second type of data includes: and the bar code reader scans the obtained bar code information. The host and the bar code reader are internally provided with a driver corresponding to the data types transmitted by the plurality of data channels.
Data interaction between a barcode reader and a host using at least one of a plurality of data channels includes: the bar code reader receives first type data issued by the host through an HID channel; the host receives the second type data sent by the bar code reader through the KBW channel.
When the data to be transmitted is detected to be the first type of data, the control host sends the first type of data to the bar code reader through the HID channel, and the bar code reader receives the first type of data sent by the host through the HID channel.
And when the data to be transmitted is detected to be the second type data, controlling the bar code reader to send the second type data to the host through the KBW channel, and receiving the second type data sent by the bar code reader through the KBW channel by the host.
After the bar code reader receives the first type of data issued by the host through the HID channel, the bar code reader itself, or the host, or other control equipment can control the screen of the bar code reader to display the virtual resource information, and/or control the bar code reader to output the virtual resource information in a voice broadcast mode.
In an optional embodiment, the barcode reader is used in a mobile payment scenario, and the virtual resource information is money amount information. After the consumer presents the payment code, the barcode reader scans the payment code presented by the consumer. At this time, the data to be transmitted is detected by the detection device to be KBW data, and the detection device may be a barcode reader, a host, or a third-party device. And after detecting that the data to be transmitted is KBW data, the barcode reader sends the KBW data to a host through a KBW channel, the host comprises application software related to checkout, the transaction amount is displayed in a text box of the application software, and a transaction ending instruction is called to complete the transaction. However, the transaction amount in the host, and the associated transaction completion notification, is only visible to the merchant, and the host generates amount information in order to make the consumer aware of the transaction progress, and the payment amount. At the moment, the detection equipment detects that the data to be transmitted is HID data, and after the data to be transmitted is detected to be the HID data, the host sends the HID data, namely the money amount information to the bar code reader through the HID channel. After the bar code reader receives the amount information, the bar code reader can be controlled to display the amount information on a screen of the bar code reader, and/or the bar code reader is controlled to output the amount information in a voice broadcasting mode. The screen of the bar code reader displays the amount information and/or the bar code reader outputs the amount information in a voice broadcasting mode, and the amount information can also be controlled by the host.
In an alternative embodiment, the host computer is used to set up the barcode reader. If the bar code reader comprises a prompt tone in the working process, the prompt tone can be used for prompting a prompt 'tic' after the bar code reader scans a commodity code, and when the host computer sets the size of the prompt tone of the equipment of the bar code reader, the host computer can directly send a control instruction corresponding to the prompt tone setting to the bar code reader to set the prompt tone of the bar code reader no matter whether the host computer receives the graphic code data sent by the bar code reader, namely KBW data; for example: the prompt tone is turned off, the prompt volume is reduced, the prompt volume is increased, and the like. The bar code reader may also include an indicator light that is illuminated to indicate to the user that the payment was successful after the user successfully paid. When the host sets the color or brightness of the indicator light of the bar code reader, no matter whether the host receives the graphic code data sent by the bar code reader, namely KBW data, the host can directly send a control instruction corresponding to the setting of the indicator light to the bar code reader so as to set the indicator light of the bar code reader; for example: turn off the indicator light, change color of the indicator light, turn on the indicator light, turn off the indicator light, and the like.
In the embodiment of the application, a plurality of data channels between a bar code reader and a host are determined, wherein the plurality of data channels occupy the same physical channel, and the plurality of data channels at least comprise KBW channels and HID channels; and when the data to be transmitted is detected, at least one of the data channels is adopted to carry out data interaction between the bar code reader and the host. Therefore, the mode switching is not needed when the bar code reader needs to receive the HID data after sending KBW data. The technical effects of simplifying the operation of the bar code reader, saving the time of merchants and consumers and improving the service efficiency of the bar code reader are achieved, and the technical problems that in the related technology, when the bar code reader interacts with a host computer with different types of data, the related graphic codes need to be scanned, the operation is complex and the working efficiency of the bar code reader is low are further solved.
An embodiment of the present application further provides another communication method, fig. 4 is a schematic flowchart of a communication method according to an embodiment of the present application, and as shown in fig. 4, the method includes:
step S402, detecting a plurality of data types of data to be transmitted between the bar code reader and the host, wherein the plurality of data types at least comprise KBW data and HID data;
step S404, when multiple data types are detected, multiple data channels corresponding to the multiple data types are adopted to transmit corresponding data, wherein the multiple data channels occupy the same physical channel.
Step S404 may be implemented by various processing manners, for example, data of various data types are simultaneously transmitted in corresponding data channels. For another example, data of multiple data types are transmitted in corresponding data channels one after another. A plurality of data channels are distributed in the bar code reader, and the plurality of data channels at least comprise KBW channels and HID channels; the KBW channel is used to transmit KBW data and the HID channel is used to transmit HID data. Wherein, a plurality of data channels occupy the same physical channel. Wherein the data type transmitted by each data channel in the plurality of data channels is different.
In an optional embodiment, the data type of the data to be transmitted between the barcode reader and the host may be detected by a detection device, where the detection device may be a barcode reader, a host, or a third-party device. The types of data to be transmitted include: a first type of data and a second type of data. The first type of data includes: control instructions issued by the host computer or virtual resource information corresponding to the bar code information; the second type of data includes: and the bar code reader scans the obtained bar code information. The host and the bar code reader are internally provided with a driver corresponding to the data types transmitted by the plurality of data channels.
As an alternative embodiment of the present application, step S404 may be expressed as the following implementation: the bar code reader receives first type data issued by the host through an HID channel; the host receives the second type data sent by the bar code reader through the KBW channel.
When the data to be transmitted is detected to be the first type of data, the control host sends the first type of data to the bar code reader through the HID channel, and the bar code reader receives the first type of data sent by the host through the HID channel.
And when the data to be transmitted is detected to be the second type data, controlling the bar code reader to send the second type data to the host through the KBW channel, and receiving the second type data sent by the bar code reader through the KBW channel by the host.
After the bar code reader receives the first type of data issued by the host through the HID channel, the bar code reader itself, or the host, or other control equipment can control the screen of the bar code reader to display the virtual resource information, and/or control the bar code reader to output the virtual resource information in a voice broadcast mode.
The data of the multiple data types can be transmitted in the corresponding data channels in sequence. Wherein the meaning of "sequentially" includes but is not limited to: after one kind of data is transmitted, transmitting another kind of data; alternatively, the time points at which the multiple types of data start to be transmitted are different, and the multiple types of data may be transmitted non-simultaneously but in parallel.
For example: when KBW data and HID data are detected, rather than waiting KBW for the HID data to be transmitted after the data transmission is complete, both data can be transmitted as desired by the user. In an optional embodiment, when the host receives KBW data sent by the barcode reader through the KBW channel, if the merchant needs to set the barcode reader, the host can directly generate a control instruction of a relevant HID data type, and when the detection device detects that the host has the control instruction of the HID data type, the host can be directly controlled to issue the control instruction to the barcode reader through the HID channel.
In an optional embodiment, the barcode reader is used in a mobile payment scenario, and the virtual resource information is money amount information. After the consumer presents the payment code, the barcode reader scans the payment code presented by the consumer. At this time, the data to be transmitted is detected by the detection device to be KBW data, and the detection device may be a barcode reader, a host, or a third-party device. And after detecting that the data to be transmitted is KBW data, the barcode reader sends the KBW data to a host through a KBW channel, the host comprises application software related to checkout, the transaction amount is displayed in a text box of the application software, and a transaction ending instruction is called to complete the transaction. However, the transaction amount in the host, and the associated transaction completion notification, is only visible to the merchant, and the host generates amount information in order to make the consumer aware of the transaction progress, and the payment amount. At the moment, the detection equipment detects that the data to be transmitted is HID data, and after the data to be transmitted is detected to be the HID data, the host sends the HID data, namely the money amount information to the bar code reader through the HID channel. After the bar code reader receives the amount information, the bar code reader can be controlled to display the amount information on a screen of the bar code reader, and/or the bar code reader is controlled to output the amount information in a voice broadcasting mode. The screen of the bar code reader displays the amount information and/or the bar code reader outputs the amount information in a voice broadcasting mode, and the amount information can also be controlled by the host.
In another alternative embodiment, the host computer is used to set up the barcode reader. If the bar code reader comprises a prompt tone in the working process, the prompt tone can be used for prompting a prompt 'tic' after the bar code reader scans a commodity code, and when the host computer sets the size of the prompt tone of the equipment of the bar code reader, the host computer can directly send a control instruction corresponding to the prompt tone setting to the bar code reader to set the prompt tone of the bar code reader no matter whether the host computer receives the graphic code data sent by the bar code reader, namely KBW data; for example: the prompt tone is turned off, the prompt volume is reduced, the prompt volume is increased, and the like. The bar code reader may also include an indicator light that is illuminated to indicate to the user that the payment was successful after the user successfully paid. When the host sets the color or brightness of the indicator light of the bar code reader, no matter whether the host receives the graphic code data sent by the bar code reader, namely KBW data, the host can directly send a control instruction corresponding to the setting of the indicator light to the bar code reader so as to set the indicator light of the bar code reader; for example: turn off the indicator light, change color of the indicator light, turn on the indicator light, turn off the indicator light, and the like.
In the embodiment of the application, a plurality of data types of data to be transmitted between a bar code reader and a host are detected, wherein the plurality of data types at least comprise KBW data and HID data; when multiple data types are detected, corresponding data are transmitted by adopting multiple data channels corresponding to the multiple data types, wherein the multiple data channels occupy the same physical channel. Therefore, the effect that KBW data and HID data can be transmitted between the bar code reader and the host computer at the same time is achieved. The technical effects of simplifying the operation of the bar code reader, saving the time of merchants and consumers and improving the service efficiency of the bar code reader are achieved, and the technical problems that in the related technology, when the bar code reader interacts with a host computer with different types of data, the related graphic codes need to be scanned, the operation is complex and the working efficiency of the bar code reader is low are further solved.
The application also provides a storage medium, which comprises a stored program, wherein when the program runs, the device where the storage medium is located is controlled to execute the communication method.
It should be noted that, reference may be made to the description related to fig. 3 and fig. 4 for a preferred implementation of the foregoing embodiment, and details are not described here again.
The application also provides a processor, wherein the processor is used for running the program, and the communication method is executed when the program runs.
It should be noted that, for the preferred implementation of the above embodiment, reference may be made to the description related to fig. 4 in fig. 3, and details are not described here again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit may be a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or may not be executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (11)

1. A method of communication, comprising:
determining a plurality of data channels between a bar code reader and a host, wherein the plurality of data channels occupy the same physical channel, and the plurality of data channels at least comprise a keyboard wedge KBW channel and a human-computer interaction device HID channel;
when data to be transmitted are detected, data interaction is carried out between the bar code reader and the host by adopting at least one of the data channels;
wherein, the data types transmitted by the plurality of data channels are different;
the data to be transmitted includes: a first type of data, the first type of data comprising: the control instruction sent by the host computer or the virtual resource information corresponding to the bar code information; adopting at least one of the plurality of data channels to perform data interaction between the barcode reader and the host, comprising: and the bar code reader receives the first type of data issued by the host through the HID channel.
2. The method of claim 1, wherein the data to be transmitted comprises: a second type of data; adopting at least one of the plurality of data channels to perform data interaction between the barcode reader and the host, comprising:
and the host receives the second type of data sent by the bar code reader through the KBW channel.
3. The method of claim 2, wherein the second type of data includes barcode information scanned by the barcode reader.
4. The method of claim 3, wherein after the barcode reader receives the first type of data sent by the host through the HID channel, the method further comprises:
and controlling a screen of the bar code reader to display the virtual resource information, and/or controlling the bar code reader to output the virtual resource information in a voice broadcasting mode.
5. The method according to any one of claims 1 to 4, wherein the type of data transmitted by each of the plurality of data channels is different.
6. A method of communication, comprising:
detecting a plurality of data types of data to be transmitted between the bar code reader and the host, wherein the plurality of data types at least comprise KBW data and HID data;
when the multiple data types are detected, adopting a plurality of data channels corresponding to the multiple data types to transmit corresponding data, wherein the data channels occupy the same physical channel;
wherein, the data types transmitted by the plurality of data channels are different;
the data to be transmitted includes: a first type of data, the first type of data comprising: the control instruction sent by the host computer or the virtual resource information corresponding to the bar code information; adopting at least one of the plurality of data channels to perform data interaction between the barcode reader and the host, comprising: and the bar code reader receives the first type of data issued by the host through the HID data channel.
7. The method of claim 6, wherein transmitting the corresponding data using a plurality of data lanes corresponding to the plurality of data types comprises: transmitting the data of the multiple data types in corresponding data channels simultaneously; or, the data of the multiple data types are transmitted in the corresponding data channels successively.
8. A communication system, comprising:
the system comprises a bar code reader, a host and a plurality of data channels, wherein the bar code reader is used for determining the plurality of data channels between the bar code reader and the host, the plurality of data channels occupy the same physical channel, and the plurality of data channels at least comprise KBW channels and HID channels; and upon detecting the transmission data, sending data over the KBW channel and/or receiving data over the HID channel;
the host is used for receiving data through the KBW channel and/or issuing data through the HID channel when the bar code reader detects the transmission data;
wherein, the data types transmitted by the plurality of data channels are different;
the transmission data comprises: a first type of data, the first type of data comprising: the control instruction sent by the host computer or the virtual resource information corresponding to the bar code information; adopting at least one of the plurality of data channels to perform data interaction between the barcode reader and the host, comprising: and the bar code reader receives the first type of data issued by the host through the HID channel.
9. A communication system, comprising:
the system comprises a host computer and a plurality of data channels, wherein the host computer is used for determining a plurality of data channels between a bar code reader and the host computer, the data channels occupy the same physical channel, and the data channels at least comprise KBW channels and HID channels; and receiving data through the KBW channel and/or issuing data through the HID channel when detecting the transmission data;
the bar code reader is used for sending data through the KBW channel and/or receiving data through the HID channel when the transmission data are detected;
wherein, the data types transmitted by the plurality of data channels are different;
the transmission data comprises: a first type of data, the first type of data comprising: the control instruction sent by the host computer or the virtual resource information corresponding to the bar code information; adopting at least one of the plurality of data channels to perform data interaction between the barcode reader and the host, comprising: and the bar code reader receives the first type of data issued by the host through the HID channel.
10. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, the device where the storage medium is located is controlled to execute the communication method according to any one of claims 1 to 5, or execute the communication method according to any one of claims 6 to 7.
11. A processor, characterized in that the processor is configured to execute a program, wherein the program executes the communication method according to any one of claims 1 to 5 or the communication method according to any one of claims 6 to 7.
CN201810864123.8A 2018-08-01 2018-08-01 Communication method and system Active CN109190726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810864123.8A CN109190726B (en) 2018-08-01 2018-08-01 Communication method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810864123.8A CN109190726B (en) 2018-08-01 2018-08-01 Communication method and system

Publications (2)

Publication Number Publication Date
CN109190726A CN109190726A (en) 2019-01-11
CN109190726B true CN109190726B (en) 2022-02-25

Family

ID=64920277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810864123.8A Active CN109190726B (en) 2018-08-01 2018-08-01 Communication method and system

Country Status (1)

Country Link
CN (1) CN109190726B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163591B (en) * 2019-04-17 2024-02-06 深圳蚂里奥技术有限公司 Method, system and computer readable storage medium for obtaining payment result of self-service payment
CN112215020B (en) * 2019-07-09 2024-07-16 深圳迈瑞生物医疗电子股份有限公司 Sample analysis device, information input method and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6536666B1 (en) * 1999-07-16 2003-03-25 Metrologic Instruments, Inc. Techniques for interfacing a bar code scanner to a PC using a message-based and/or character-based keyboard inhibit
CN206147861U (en) * 2016-10-25 2017-05-03 深圳盒子支付信息技术有限公司 Portable collection of money terminal
CN107451500A (en) * 2016-06-01 2017-12-08 曾平桂 Bar code scanning method and system
CN108108645A (en) * 2017-12-30 2018-06-01 广州逊镭电子科技有限公司 A kind of hand held tape screen scanner

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6213399B1 (en) * 1991-07-25 2001-04-10 Symbol Technologies, Inc. Multi-channel signal processing in an optical reader
CN1096651C (en) * 1991-12-24 2002-12-18 欧林巴斯光学工业股份有限公司 Optical systems for bar code scanners

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6536666B1 (en) * 1999-07-16 2003-03-25 Metrologic Instruments, Inc. Techniques for interfacing a bar code scanner to a PC using a message-based and/or character-based keyboard inhibit
CN107451500A (en) * 2016-06-01 2017-12-08 曾平桂 Bar code scanning method and system
CN206147861U (en) * 2016-10-25 2017-05-03 深圳盒子支付信息技术有限公司 Portable collection of money terminal
CN108108645A (en) * 2017-12-30 2018-06-01 广州逊镭电子科技有限公司 A kind of hand held tape screen scanner

Also Published As

Publication number Publication date
CN109190726A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN110139161B (en) Information processing method and device in live broadcast, storage medium, processor and mobile terminal
US10114603B2 (en) Data interaction display system and method
US20110154450A1 (en) Remote operation program, method and terminal apparatus
CN111629239B (en) Screen projection processing method, device, equipment and computer readable storage medium
CN109002269B (en) Method, client and system for controlling multiple terminals by single-key mouse
EP2287746B1 (en) Communication control method, control program, and communication control system
CN106373249A (en) Multi-channel queuing method and system for number calling devices and bank outlets
US20190012005A1 (en) Method and device for asynchronous touch and asynchronous display on dual-screen and computer readable storage medium
CN109190726B (en) Communication method and system
WO2018090722A1 (en) Method and apparatus for realizing wired screen delivery
US20190212962A1 (en) Display device and display system
CN107948567A (en) USB wired screen transmission method and device
CN108351845A (en) Information system
CN103377093A (en) Multimedia synchronizing method for multiple-system device and electronic device
WO2025124073A1 (en) Remote screen switching method and apparatus, and client terminal and storage medium
CN108769261B (en) A multi-screen interactive system, method and interactive screen device
CN101707652B (en) Mobile phone capable of realizing digital certificate application
CN112491973A (en) Equipment control method and device and nonvolatile storage medium
CN110580785B (en) Cash register system, cash register device and cash register method applied to cash register system
CN112613870B (en) Payment processing method, device, self-service equipment, payment terminal, system and medium
CN109582253A (en) A kind of connection method of blue-tooth printer, device, printer and storage medium
KR20150006647A (en) Method for guidance service and apparatus applied to the same
TWI220489B (en) Switching device of universal serial bus for computer peripheral devices
CN116156234B (en) Reverse control method, device and wireless screen projection system based on wireless screen projection
US10915753B2 (en) Operation assistance apparatus, operation assistance method, and computer readable recording medium

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: Room 505, 388 Songhu Road, Yangpu District, Shanghai, 2003

Applicant after: SHANGHAI SHANGMI SCIENCE AND TECHNOLOGY GROUP CO., LTD.

Applicant after: Shenzhen Michelangelo Technology Co., Ltd.

Address before: Room 505, 388 Songhu Road, Yangpu District, Shanghai, 2003

Applicant before: Shanghai traders Technology Co., Ltd.

Applicant before: Shenzhen Michelangelo Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant