WO2020001109A1 - Data exchange method and apparatus, electronic device and portable device - Google Patents

Data exchange method and apparatus, electronic device and portable device Download PDF

Info

Publication number
WO2020001109A1
WO2020001109A1 PCT/CN2019/080047 CN2019080047W WO2020001109A1 WO 2020001109 A1 WO2020001109 A1 WO 2020001109A1 CN 2019080047 W CN2019080047 W CN 2019080047W WO 2020001109 A1 WO2020001109 A1 WO 2020001109A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
connection
light
portable device
wireless communication
Prior art date
Application number
PCT/CN2019/080047
Other languages
French (fr)
Chinese (zh)
Inventor
韩喆
吴军
张鸿
覃瑶
孙健康
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2020001109A1 publication Critical patent/WO2020001109A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists

Definitions

  • This specification relates to the field of Internet technologies, and in particular, to methods, devices, electronic devices, and portable devices for data interaction.
  • a user can use a mobile terminal such as a smart phone to install an APP (application) with a payment function. If payment is required, the APP can display a ride code for paying the fare.
  • the ride code carries the Payment related data.
  • the payment process involves data interaction.
  • the payment device on the bus can identify the ride code through a camera or scanning device, and complete the payment by obtaining the data carried in the ride code. Based on this, it is necessary to provide a more convenient and stable data interaction scheme.
  • this specification provides a data interaction method, a device, an electronic device, and a portable device.
  • a data interaction method includes:
  • the light is detected by a light sensor.
  • the light sensor detects the light and executes it after determining that an object exists within a set distance range.
  • the method before establishing a connection with the electronic device based on the short-range wireless communication, the method further includes: determining that an object exists within a set distance range.
  • a distance sensor is used to detect whether an object exists within a set distance.
  • the target light emission frequency is different from the light emission frequency of the lighting lamp.
  • establishing a connection with an electronic device based on short-range wireless communication includes:
  • the data interacting with the electronic device includes one or more of the following information:
  • Payment voucher information Bus information, subway station information, bus ticket information or train ticket information.
  • a data interaction device including:
  • a connection module configured to establish a connection with an electronic device based on short-range wireless communication after determining that light emitted at a target emission frequency is detected
  • An interaction module is configured to perform data interaction with the electronic device after a connection is established.
  • an electronic device including:
  • a light-emitting unit for: emitting light of a target light-emitting frequency
  • a short-range wireless communication unit configured to establish a connection with a portable device, wherein the portable device is configured to establish the connection after detecting light emitted at the target light emitting frequency;
  • a processing unit configured to: perform data interaction with the portable device.
  • the housing of the electronic device has a groove, and light emitted by the light emitting unit passes through the groove.
  • the light emitting unit includes: an LED.
  • the processing unit is further configured to control the turning on or off of the light emitting unit based on whether an object exists within a set distance range.
  • the processing unit is further configured to control the activation or shutdown of the short-range wireless communication unit based on whether an object exists within a set distance range.
  • it further includes a distance sensor, configured to determine whether an object exists within a set distance.
  • the processing unit is further configured to send data sent by the portable device to a server.
  • a data interaction method including:
  • the light emitting unit is configured to: emit light of a target light emitting frequency
  • a control instruction for turning on or off is sent to a short-range wireless communication unit, which is used to establish a connection with a portable device, wherein the portable device is used after detecting the light emitted at the target light emitting frequency. Establishing the connection;
  • a portable device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the program as follows method:
  • an electronic device including a light emitting unit, a short-range wireless communication unit, a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein When the processor executes the program, the following method is implemented:
  • the light emitting unit is configured to: emit light of a target light emitting frequency
  • the short-range wireless communication unit is configured to establish a connection with a portable device, where the portable device is configured to detect a Establishing the connection after light;
  • the embodiments of this specification are based on light detection.
  • Electronic devices can emit light according to the target light emission frequency.
  • Portable devices can determine whether they are close to the electronic device. If the portable device is close to the electronic device, it can detect the light emitted by the electronic device at the target light emission frequency. It can prevent the portable device from being misconnected with other electronic devices.
  • the electronic device and the portable device can perform data interaction after the connection is established. This embodiment has no requirements on the mobile communication network. When the electronic device and the portable device are offline, the data interaction can also be implemented.
  • Fig. 1 is a scene diagram of a data interaction method according to an exemplary embodiment of the present specification.
  • Fig. 2A is a schematic diagram of data interaction according to an exemplary embodiment of the present specification.
  • Fig. 2B is a flowchart illustrating a data interaction method according to an exemplary embodiment of the present specification.
  • Fig. 3A is a hardware structural diagram of an electronic device according to an exemplary embodiment of the present specification.
  • Fig. 3B is a flowchart illustrating another data interaction method according to an exemplary embodiment of the present specification.
  • Fig. 3C is a structural diagram of an electronic device according to an exemplary embodiment of the present specification.
  • Fig. 4A is a flowchart illustrating another data interaction method according to an exemplary embodiment of the present specification.
  • Fig. 4B is a flowchart illustrating another data interaction method according to an exemplary embodiment of the present specification.
  • FIG. 5 is a hardware structural diagram of a portable device in which a data interaction device according to an embodiment of the present specification is located.
  • Fig. 6 is a block diagram of a data interaction device according to an exemplary embodiment of the present specification.
  • first, second, third, etc. may be used in this specification to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.
  • word “if” as used herein can be interpreted as “at” or "when” or "in response to determination”.
  • the payee device uses a camera to scan the payment code provided by the user, so there are certain requirements for the quality of the camera. If the quality of the camera is poor and the focus is slow, it may cause the recognition of the payment code to be slow. It may also happen that the payment code is not aligned with the camera, and users need to adjust the convenient device to better complete the payment. On the other hand, using camera recognition, data is transmitted from the user's portable device to the payee's device.
  • FIG. 1 is a scenario diagram of a data interaction method according to an exemplary embodiment of the present specification.
  • this embodiment refers to a device held by a user as a portable device.
  • the portable device may also be a device such as smart glasses or a smart watch.
  • a device that performs data interaction with a portable device is referred to as an electronic device.
  • the electronic device may be owned by various service merchants and may be deployed in a physical area where the merchant provides commercial services. For example, in the offline store scenario, the electronic device can be deployed in the commodity settlement area. In the traffic travel scenario, the electronic device can be deployed on a bus, subway entrance, train entrance, etc.
  • an optional implementation method is that both electronic devices use a network to connect to a server and transmit data through the server. This method depends on the network signal strength. However, in subway and other scenarios, the network signal is often unstable. When transmitting data through the server, the transmission speed may be very slow or even the transmission fails. The user ’s portable device may also be offline for many reasons. , And then there are cases where the user cannot complete the payment and cannot go out because of the inability to transmit data.
  • Another optional implementation is to establish a connection between the portable device and the electronic device through a short-range wireless communication technology, such as Bluetooth or near field communication.
  • a short-range wireless communication technology such as Bluetooth or near field communication.
  • Bluetooth Bluetooth
  • the electronic equipment at a certain entrance should be connected to the portable device of user A who is preparing to exit.
  • the portable device of another user B next to the user A is very close to the electronic device, the electronic device is connected to the portable device of the user B, so that the portable device of the user A cannot perform data interaction, and eventually the user A cannot exit the gate in time.
  • FIG. 2A it is a schematic diagram of data interaction according to an exemplary embodiment of the present specification.
  • the electronic device in FIG. The target emission frequency emits light.
  • the portable device can perform the steps shown in FIG. 2B:
  • step 202 after it is determined that the light emitted at the target emission frequency is detected, a connection is established with the electronic device based on the short-range wireless communication.
  • step 204 perform data interaction with the electronic device after the connection is established.
  • the portable device can determine that it is relatively close to the electronic device after detecting the light emitted at the target light emission frequency, and then establishes a connection with the electronic device based on short-range wireless communication, so the electronic device and the portable device can perform data interaction. .
  • the electronic device needs to emit light according to the target light emission frequency.
  • the hardware structure of the electronic device may be as shown in FIG. 3A.
  • the electronic device includes:
  • the light emitting unit 310 is configured to emit light at a target light emitting frequency.
  • the short-range wireless communication unit 320 is configured to establish a connection with a portable device, where the portable device is configured to establish the connection after detecting light emitted at the target light emitting frequency.
  • the processing unit 330 is configured to perform data interaction with the portable device.
  • FIG. 3A shows a schematic diagram of a hardware structure of an electronic device
  • FIG. 3A illustrates a hardware implementation of the electronic device.
  • a light-emitting unit and a short-range wireless communication unit built in the electronic device may Controlled by the processing unit, the processing process of the processing unit can be implemented by software or programmable logic devices.
  • the electronic device can perform the following steps to perform data interaction with the portable device:
  • step 302 a control instruction for turning on or off is issued to a light emitting unit, wherein the light emitting unit is configured to: emit light of a target light emitting frequency.
  • a control instruction for turning on or off is issued to a short-range wireless communication unit, which is configured to establish a connection with a portable device, wherein the portable device is configured to detect light emission with the target when detected.
  • the connection is established after the light emitted by the frequency.
  • step 306 after establishing a connection, perform data interaction with the portable device.
  • the light emitting unit may include light emitting devices such as LEDs (Light Emitting Diodes), fluorescent lamps, and the like.
  • the light emitting frequency of the light emitting device may be set as required. This embodiment is referred to as a target light emitting frequency.
  • the purpose of setting the target light emission frequency is for the portable device to determine whether it is close to the electronic device. If the portable device is close to the electronic device, the light emitted by the electronic device at the target light emission frequency can be detected, thereby preventing the portable device and other The electronic device is connected incorrectly.
  • the target luminous frequency can be flexibly configured according to actual needs.
  • the target luminous frequency can be different from the luminous frequency of the illuminating lamp, for example, it can be a luminous frequency of 120ms per cycle. Wait, during this period, the first 60ms may be turned on and the second 60ms may be turned off.
  • the light-emitting unit may be disposed on the surface of the electronic device casing, and the portable device may detect the light emitted by the electronic device after being near the electronic device.
  • the light-emitting unit may be disposed inside the electronic device.
  • the surface of the device may have a transparent area so that the light of the light emitting unit can be emitted from the inside, so that the portable device can detect the light.
  • FIG. 3C it is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present specification.
  • the housing of the electronic device may have a groove, and the light emitted by the light-emitting unit passes through the groove.
  • a groove which can restrict the way a portable device detects light.
  • the portable device needs to insert the groove before it can detect the light emitted by the electronic device, thereby reducing interference from other light sources and improving the accuracy of light detection.
  • the light-emitting unit may also be disposed in the groove, so that the light emitted by the light-emitting unit is detected by the portable device in the groove; in other examples, the light-emitting unit may be disposed inside the electronic device, and the groove may be There is a transparent area so that the light of the light emitting unit can be emitted from the inside and the portable device can detect the light after being inserted into the groove.
  • Other components of the electronic device such as the Bluetooth module, can be set in the groove as required, and other positions on the surface of the electronic device can also be set. Surface and other locations.
  • the light-emitting unit can continuously emit light.
  • the light-emitting unit can be started only when it needs to be detected by a portable device, and the light-emitting unit can be turned off without detection.
  • this embodiment provides a distance-based light-emitting unit control method.
  • the processing unit is further configured to control the light-emitting unit to be turned on or off based on whether an object exists within a set distance.
  • the set distance range can be determined through testing.
  • a smaller distance can be set to improve the accuracy of light detection by the portable device. This distance can limit the portable device to be close to the electronic device so that the portable device can detect the electronic The light emitted by the device.
  • it can be determined based on the size of the groove; for example, when the distance between the portable device and the electronic device is lower than the size of the groove, the electronic device can determine that an object has entered, and the object is The possibility of the portable device is very large, and the light emitting unit can be notified to start for the portable device to detect light.
  • the electronic device may be configured with a distance sensor, and determine whether an object exists within a set distance range based on a detection result of the distance sensor.
  • light can be detected by a light sensor.
  • the detection timing of the light sensor can also be determined based on the distance. After determining that there is an object within a set distance range, the light sensor is called to detect The light.
  • a distance sensor built in the portable device can be used to detect whether an object exists within a set distance.
  • the portable device may detect errors or the portable device may detect light with the same frequency as the target. Based on this, the method of this embodiment is based on short distances. Before establishing a connection between the wireless communication and the electronic device, the method further includes: determining that an object exists within a set distance range. This embodiment is based on the double authentication of distance and light, so that the portable device can establish a connection with the device to be connected with a high probability. For example, if the distance sensor on the portable device is blocked by other objects, but no light with the same frequency as the target is detected, there is no need to connect in this case, which can avoid misconnection.
  • the short-range wireless communication in this embodiment may include Bluetooth, Wi-Fi (Wireless Fidelity, wireless fidelity), near field communication, UWB (Ultra Wideband), or HomeRF (Home Radio Frequency).
  • Wi-Fi Wireless Fidelity, wireless fidelity
  • near field communication UWB (Ultra Wideband)
  • HomeRF Home Radio Frequency
  • the working mode of Bluetooth includes a master-slave mode, and the working modes of the electronic device and the portable device can be flexibly determined according to requirements, which is not limited in this embodiment.
  • the electronic device may work in a slave mode, and the electronic device may broadcast a connection message based on short-range wireless communication for the portable device to connect; while the portable device works in the master mode, the portable device may: Based on a connection message of short-range wireless communication, a connection is established with the electronic device according to the connection message.
  • the electronic device and the portable device may further be connected in combination with signal strength.
  • both of them can detect that the signal strength of the other party is strong, so You can also establish a connection according to the RSSI (Received Signal Strength Indication) strength.
  • RSSI Receiveived Signal Strength Indication
  • both electronic devices and portable devices have a certain ability to independently select the connection. For example, after the electronic device finds that the distance is higher than the threshold, it can be considered that no portable device is close. If there is a device to try to connect, you can stop or prevent the connection. .
  • the electronic device and the portable device can perform data interaction after the connection is established.
  • This embodiment does not require the electronic device to be configured with a higher cost device. There is no requirement on the mobile communication network. The electronic device and the portable device are offline. Next, you can also implement data interaction.
  • the interacted data may include one or more of the following information: payment voucher information, bus information, subway station information, car ticket information or train ticket information, and so on.
  • payment voucher information may include one or more of the following information: payment voucher information, bus information, subway station information, car ticket information or train ticket information, and so on.
  • bus information may include one or more of the following information: payment voucher information, bus information, subway station information, car ticket information or train ticket information, and so on.
  • subway station information subway station information
  • car ticket information or train ticket information and so on.
  • the first type of bus scenario (take fixed billing as an example)
  • the bus scenario of this embodiment is described by taking a fixed charge as an example.
  • the electronic device of this embodiment can be deployed on a bus.
  • the processing flow in the electronic device can be shown in FIG. 4A.
  • the distance sensor can continuously monitor. If the monitoring distance is higher than the threshold, it means that no mobile phone enters the groove to prepare for connection, and can continuously monitor. When the recognition distance is reduced and the distance is lower than the threshold, it can be considered that a mobile phone enters the groove and sends a command to the light emitting unit to start waking the LED light to emit light (it can be a light cycle of 120ms, the first 60ms light up during the period, and the last 60ms Off).
  • the electronic device in this embodiment includes a BLE (Bluetooth) module, which can continuously broadcast messages to wait for the BLE module on the mobile phone to connect.
  • BLE Bluetooth
  • the user's portable device (a mobile phone is taken as an example in this embodiment) may be installed with a third-party payment APP and an APP for providing a subway ride service.
  • the portable device can perform the steps of the embodiment shown in FIG. 4B.
  • the user can start an APP installed in the portable device to wake up the distance sensor built in the portable device.
  • the distance sensor built in the mobile phone recognizes that the distance is close, and the light sensor on the mobile phone starts to detect whether there is light of the target luminous frequency.
  • the mobile phone When the mobile phone recognizes the light with a periodic change of 120ms, it thinks that it is already in the electronic device, and uses the BLE module to start connecting the BLE module in the machine. Among them, the mobile phone can select the BLE module of the device with the highest RSSI strength to connect.
  • the manner of data interaction may include:
  • an Alipay APP may be installed in the portable device, the electronic device transmits data to Alipay, and Alipay may send the received data (or may also send other notification messages indicating chargeback, etc.) to the Alipay server.
  • the user After receiving the Alipay service, the user can deduct the payment account of the user, thereby completing the transaction processing of the fare by the user.
  • the portable device can send data representing a payment token (such as a user identity) to the electronic device.
  • the electronic device receives the data transmitted by the portable device, and the user's ride fee can be deducted based on the payment certificate.
  • an Alipay APP can be installed in a portable device. Alipay sends payment vouchers to the electronic device, and the electronic device sends the received payment voucher to the Alipay server (either the electronic device directly sends to the Alipay server or the electronic device) Sent to the Alipay server through other servers). After receiving the Alipay service, the user's payment account can be deducted to complete the user's payment processing of the fare.
  • the electronic device can also transmit information such as bus lines to the portable device, so that the portable device can display the above information for users to view.
  • the second type the subway scenario (take segmented billing as an example)
  • the electronic device of this embodiment may be configured at an entrance of a station, and the electronic device may be used as a device for controlling entrance and exit; a user's portable device may be installed with a third-party payment APP or an APP that provides subway ride services.
  • the user can launch the APP installed in the portable device.
  • the portable device can send data representing the payment token (such as a user identity) to the electronic device.
  • the electronic device can control the gate.
  • the release can also send the received data to the server; in other examples, the electronic device can also transmit site information to the user's portable device.
  • the portable device can transmit the received data to the server.
  • the user ’s portable device When the user needs to get out of the gate, the user ’s portable device will perform data interaction with the exported electronic device. It can be understood that the portable device can be transmitted to the electronic device or the electronic device can be transmitted to the portable device, based on the entrance site information and the exit site Information so that you can determine what the user is paying.
  • This embodiment is similar to the subway scenario, and can be used for gates at entrances and exits, but may not involve payment.
  • the user can buy a ticket in advance (such as a train ticket, subway ticket, bus ticket, or attraction ticket, etc.), and the APP can store the ticket in the form of an electronic card, electronic coupon, etc.
  • This embodiment may be called an electronic ticket.
  • the electronic ticket corresponds to inbound information, outbound information, user identity information, fee information, and so on.
  • the electronic device in this embodiment may be configured at the exit and / or entrance of the station.
  • the electronic device may be used as a device for controlling entry and exit.
  • the installation APP of the user ’s portable device stores the electronic ticket.
  • the user can launch the APP installed in the portable device.
  • the portable device can send data containing ticket information to the electronic device.
  • the electronic device can perform information verification and control the gate based on the verification result. Whether to release.
  • the electronic device can be deployed in the settlement area of the store.
  • the user's portable device can be installed with a payment app such as a third-party payment APP.
  • the user starts the APP installed in the portable device, and the portable device can send the user identity to the electronic device Data such as identifications represent payment tokens.
  • the electronic device After the electronic device receives the data transmitted by the portable device, it can send the received data to the server for the server to charge the user's payment account.
  • the data interaction between the electronic device and the portable device may involve some sensitive information.
  • the data exchanged between the electronic device and the portable device may be encrypted to form a Copies of encrypted data.
  • the embodiments of the data interaction device in this specification can be applied to portable devices, such as smart phones and smart watches.
  • the device embodiments can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by reading corresponding computer program instructions in a non-volatile memory into a memory and running the processor through a data interaction processor. In terms of hardware, as shown in FIG.
  • this is a hardware structure diagram of the portable device where the data interaction device according to the embodiment of the specification is located, except for the processor 510, the memory 530, the network interface 520, and In addition to the volatile memory 540, the portable device in which the device 531 is located in the embodiment may generally include other hardware according to the actual function of the portable device, and details are not described herein again.
  • FIG. 6 is a block diagram of a data interaction device according to an exemplary embodiment of the present specification.
  • the device includes:
  • a connection module 61 configured to establish a connection with an electronic device based on short-range wireless communication after determining that light emitted at a target emission frequency is detected;
  • the interaction module 62 is configured to perform data interaction with the electronic device after the connection is established.
  • the light is detected by a light sensor.
  • the light sensor detects the light and executes it after determining that an object exists within a set distance range.
  • connection module before the connection module establishes a connection with the electronic device based on the short-range wireless communication, the connection module further includes: determining that an object exists within a set distance range.
  • a distance sensor is used to detect whether an object exists within a set distance.
  • the target light emission frequency is different from the light emission frequency of the lighting lamp.
  • connection module is further configured to:
  • the data interacting with the electronic device includes one or more of the following information:
  • Payment voucher information Bus information, subway station information, bus ticket information or train ticket information.
  • an embodiment of the present specification further provides a portable device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the following method when executing the program:
  • an embodiment of the present specification further provides an electronic device including a light emitting unit, a short-range wireless communication unit, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor
  • the following methods are implemented when executing the program:
  • the light emitting unit is configured to: emit light of a target light emitting frequency
  • the short-range wireless communication unit is configured to establish a connection with a portable device, where the portable device is configured to detect a Establishing the connection after light;
  • the relevant part may refer to the description of the method embodiment.
  • the device embodiments described above are only schematic, and the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, may be located in One place, or can be distributed to multiple network modules. Some or all of these modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement without creative efforts.

Abstract

The description provides a data exchange method and apparatus, an electronic device and a portable device. The data exchange solution is based on light detection, the electronic device can emit light at a target light emission frequency, and the portable device can determine whether the portable device itself is close to the electronic device, and if the portable device is close to the electronic device, the light emitted by the electronic device at the target light emission frequency can be detected, thereby preventing the portable device from being erroneously connected to other electronic devices. An electronic device and a portable device can perform data exchange after a connection is established. This embodiment has no requirement for a mobile communication network, and data exchange can also be implemented where the electronic device and the portable device are in an offline state.

Description

数据交互方法、装置、电子设备及便携设备Data interaction method, device, electronic equipment and portable equipment 技术领域Technical field
本说明书涉及互联网技术领域,尤其涉及数据交互方法、装置、电子设备及便携设备。This specification relates to the field of Internet technologies, and in particular, to methods, devices, electronic devices, and portable devices for data interaction.
背景技术Background technique
随着互联网技术和终端技术的发展,在线下商店、交通出行等场景,移动支付已成为人们日常生活中的一种常见支付方式。以公交场景为例,用户可以使用智能手机等便携终端安装具有支付功能的APP(application,应用),若需要付款,APP可以展示用于支付车费的乘车码,该乘车码携带有与支付相关的数据。支付过程中涉及数据交互,公交车上的收款设备可以通过摄像头或扫描设备识别乘车码,通过获取乘车码中携带的数据,进而完成支付。基于此,需要提供一种更为便利、稳定的数据交互方案。With the development of Internet technology and terminal technology, mobile payment has become a common payment method in people's daily lives in scenarios such as offline stores and transportation. Taking the bus scenario as an example, a user can use a mobile terminal such as a smart phone to install an APP (application) with a payment function. If payment is required, the APP can display a ride code for paying the fare. The ride code carries the Payment related data. The payment process involves data interaction. The payment device on the bus can identify the ride code through a camera or scanning device, and complete the payment by obtaining the data carried in the ride code. Based on this, it is necessary to provide a more convenient and stable data interaction scheme.
发明内容Summary of the invention
为克服相关技术中存在的问题,本说明书提供了数据交互方法、装置、电子设备及便携设备。In order to overcome the problems in the related technology, this specification provides a data interaction method, a device, an electronic device, and a portable device.
根据本说明书实施例的第一方面,提供一种数据交互方法,所述方法包括:According to a first aspect of the embodiments of the present specification, a data interaction method is provided, and the method includes:
确定检测到以目标发光频率发射的光后,基于短距离无线通信与电子设备建立连接;After determining that the light emitted at the target emission frequency is detected, establish a connection with the electronic device based on short-range wireless communication;
在建立连接后,与所述电子设备进行数据交互。After establishing a connection, perform data interaction with the electronic device.
可选的,通过光线传感器检测所述光。Optionally, the light is detected by a light sensor.
可选的,所述光线传感器检测所述光,在确定设定距离范围内存在物体后执行。Optionally, the light sensor detects the light and executes it after determining that an object exists within a set distance range.
可选的,所述基于短距离无线通信与电子设备建立连接之前,还包括:确定设定距离范围内存在物体。Optionally, before establishing a connection with the electronic device based on the short-range wireless communication, the method further includes: determining that an object exists within a set distance range.
可选的,通过距离传感器检测设定距离范围内是否存在物体。Optionally, a distance sensor is used to detect whether an object exists within a set distance.
可选的,所述目标发光频率与照明灯的发光频率不同。Optionally, the target light emission frequency is different from the light emission frequency of the lighting lamp.
可选的,所述基于短距离无线通信与电子设备建立连接,包括:Optionally, establishing a connection with an electronic device based on short-range wireless communication includes:
接收电子设备广播的基于短距离无线通信的连接消息,基于所述连接消息与所述电子设备建立连接。Receiving a connection message based on short-range wireless communication broadcasted by an electronic device, and establishing a connection with the electronic device based on the connection message.
可选的,所述与所述电子设备进行交互的数据,包含如下一种或多种信息:Optionally, the data interacting with the electronic device includes one or more of the following information:
支付凭证信息、公交车信息、地铁站信息、汽车票信息或火车票信息。Payment voucher information, bus information, subway station information, bus ticket information or train ticket information.
根据本说明书实施例的第二方面,提供一种数据交互装置,包括:According to a second aspect of the embodiments of the present specification, a data interaction device is provided, including:
连接模块,用于:确定检测到以目标发光频率发射的光后,基于短距离无线通信与电子设备建立连接;A connection module configured to establish a connection with an electronic device based on short-range wireless communication after determining that light emitted at a target emission frequency is detected;
交互模块,用于:在建立连接后,与所述电子设备进行数据交互。An interaction module is configured to perform data interaction with the electronic device after a connection is established.
根据本说明书实施例的第三方面,提供一种电子设备,包括:According to a third aspect of the embodiments of the present specification, an electronic device is provided, including:
发光单元,用于:发射目标发光频率的光;A light-emitting unit for: emitting light of a target light-emitting frequency;
短距离无线通信单元,用于:与便携设备建立连接,其中,所述便携设备用于:在检测到以所述目标发光频率发射的光后建立所述连接;A short-range wireless communication unit configured to establish a connection with a portable device, wherein the portable device is configured to establish the connection after detecting light emitted at the target light emitting frequency;
处理单元,用于:与所述便携设备进行数据交互。A processing unit, configured to: perform data interaction with the portable device.
可选的,所述电子设备的壳体具有一凹槽,所述发光单元发射的光透过所述凹槽。Optionally, the housing of the electronic device has a groove, and light emitted by the light emitting unit passes through the groove.
可选的,所述发光单元包括:LED。Optionally, the light emitting unit includes: an LED.
可选的,所述处理单元,还用于:基于设定距离范围内是否存在物体,控制所述发光单元的启动或关闭。Optionally, the processing unit is further configured to control the turning on or off of the light emitting unit based on whether an object exists within a set distance range.
所述处理单元,还用于:基于设定距离范围内是否存在物体,控制所述短距离无线通信单元的启动或关闭。The processing unit is further configured to control the activation or shutdown of the short-range wireless communication unit based on whether an object exists within a set distance range.
可选的,还包括距离传感器,用于:确定设定距离范围内是否存在物体。Optionally, it further includes a distance sensor, configured to determine whether an object exists within a set distance.
可选的,所述处理单元,还用于:将所述便携设备发送的数据发送给服务端。Optionally, the processing unit is further configured to send data sent by the portable device to a server.
根据本说明书实施例的第四方面,提供一种数据交互方法,包括:According to a fourth aspect of the embodiments of the present specification, a data interaction method is provided, including:
向发光单元发出开启或关闭的控制指令,其中,所述发光单元用于:发射目标发光频率的光;Sending a control instruction for turning on or off to a light emitting unit, wherein the light emitting unit is configured to: emit light of a target light emitting frequency;
向短距离无线通信单元发出开启或关闭的控制指令,所述短距离无线通信单元用于与便携设备建立连接,其中,所述便携设备用于在检测到以所述目标发光频率发射的光 后建立所述连接;A control instruction for turning on or off is sent to a short-range wireless communication unit, which is used to establish a connection with a portable device, wherein the portable device is used after detecting the light emitted at the target light emitting frequency. Establishing the connection;
在建立连接后,与所述便携设备进行数据交互。After establishing a connection, perform data interaction with the portable device.
根据本说明书实施例的第五方面,提供一种便携设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如下方法:According to a fifth aspect of the embodiments of the present specification, a portable device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the program as follows method:
确定检测到以目标发光频率发射的光后,基于短距离无线通信与电子设备建立连接;After determining that the light emitted at the target emission frequency is detected, establish a connection with the electronic device based on short-range wireless communication;
在建立连接后,与所述电子设备进行数据交互。After establishing a connection, perform data interaction with the electronic device.
根据本说明书实施例的第六方面,提供一种电子设备,包括发光单元、短距离无线通信单元、存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如下方法:According to a sixth aspect of the embodiments of the present specification, there is provided an electronic device including a light emitting unit, a short-range wireless communication unit, a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein When the processor executes the program, the following method is implemented:
向所述发光单元发出开启或关闭的控制指令,其中,所述发光单元用于:发射目标发光频率的光;Sending a control instruction for turning on or off to the light emitting unit, wherein the light emitting unit is configured to: emit light of a target light emitting frequency;
向所述短距离无线通信单元发出开启或关闭的控制指令,所述短距离无线通信单元用于与便携设备建立连接,其中,所述便携设备用于在检测到以所述目标发光频率发射的光后建立所述连接;Sending a control instruction for turning on or off to the short-range wireless communication unit, where the short-range wireless communication unit is configured to establish a connection with a portable device, where the portable device is configured to detect a Establishing the connection after light;
在建立连接后,与所述便携设备进行数据交互。After establishing a connection, perform data interaction with the portable device.
本说明书的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present specification may include the following beneficial effects:
本说明书实施例基于光线检测,电子设备能够按照目标发光频率发光,便携设备能够确定自身是否已经靠近电子设备,若便携设备靠近电子设备,则可以检测到电子设备以目标发光频率发射的光,从而可以防止便携设备与其他电子设备误连接。电子设备和便携设备在建立连接后可以进行数据交互,本实施例对移动通信网络没有要求,在电子设备和便携设备处于离线状态情况下,也可以实现数据交互。The embodiments of this specification are based on light detection. Electronic devices can emit light according to the target light emission frequency. Portable devices can determine whether they are close to the electronic device. If the portable device is close to the electronic device, it can detect the light emitted by the electronic device at the target light emission frequency. It can prevent the portable device from being misconnected with other electronic devices. The electronic device and the portable device can perform data interaction after the connection is established. This embodiment has no requirements on the mobile communication network. When the electronic device and the portable device are offline, the data interaction can also be implemented.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本说明书。It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and should not limit the present specification.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本说明书的实施例,并与说明书一起用于解释本说明书的原理。The drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the specification, and together with the description serve to explain the principles of the specification.
图1是本说明书根据一示例性实施例示出的一种数据交互方法的场景图。Fig. 1 is a scene diagram of a data interaction method according to an exemplary embodiment of the present specification.
图2A是本说明书根据一示例性实施例示出的一种数据交互示意图。Fig. 2A is a schematic diagram of data interaction according to an exemplary embodiment of the present specification.
图2B是本说明书根据一示例性实施例示出的一种数据交互方法的流程图。Fig. 2B is a flowchart illustrating a data interaction method according to an exemplary embodiment of the present specification.
图3A是本说明书根据一示例性实施例示出的一种电子设备的硬件结构图。Fig. 3A is a hardware structural diagram of an electronic device according to an exemplary embodiment of the present specification.
图3B是本说明书根据一示例性实施例示出的另一种数据交互方法的流程图。Fig. 3B is a flowchart illustrating another data interaction method according to an exemplary embodiment of the present specification.
图3C是本说明书根据一示例性实施例示出的一种电子设备的结构示图。Fig. 3C is a structural diagram of an electronic device according to an exemplary embodiment of the present specification.
图4A是本说明书根据一示例性实施例示出的另一种数据交互方法的流程图。Fig. 4A is a flowchart illustrating another data interaction method according to an exemplary embodiment of the present specification.
图4B是本说明书根据一示例性实施例示出的另一种数据交互方法的流程图。Fig. 4B is a flowchart illustrating another data interaction method according to an exemplary embodiment of the present specification.
图5是本说明书实施例数据交互装置所在便携设备的一种硬件结构图。FIG. 5 is a hardware structural diagram of a portable device in which a data interaction device according to an embodiment of the present specification is located.
图6是本说明书根据一示例性实施例示出的一种数据交互装置的框图。Fig. 6 is a block diagram of a data interaction device according to an exemplary embodiment of the present specification.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail here, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Rather, they are merely examples of devices and methods consistent with some aspects of the specification, as detailed in the appended claims.
在本说明书使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书。在本说明书和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the specification. As used in this specification and the appended claims, the singular forms "a," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
应当理解,尽管在本说明书可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at" or "when" or "in response to determination".
在大部分移动支付场景中,收款方设备采用摄像头扫描用户提供的付款码,因此对摄像头的质量有一定的要求,若摄像头的质量较差、对焦较慢,可能会造成识别付款码较慢的情况,也可能会出现付款码与摄像头没有对准,需要用户调整便捷设备以更好地 完成支付。另一方面,采用摄像头识别的方式,数据是从用户便携设备传输至收款方设备。In most mobile payment scenarios, the payee device uses a camera to scan the payment code provided by the user, so there are certain requirements for the quality of the camera. If the quality of the camera is poor and the focus is slow, it may cause the recognition of the payment code to be slow. It may also happen that the payment code is not aligned with the camera, and users need to adjust the convenient device to better complete the payment. On the other hand, using camera recognition, data is transmitted from the user's portable device to the payee's device.
基于此,请参考图1所示,是本说明书根据一示例性实施例示出的一种数据交互方法的场景图,为了便于区分,本实施例将用户所持有的设备称为便携设备,图1中以智能手机为例,便携设备还可以是智能眼镜或智能手表等设备。将与便携设备进行数据交互的设备称为电子设备,该电子设备可能被各类服务商户拥有,其可以部署在商户提供商业服务的物理区域内。例如,在线下商店场景,电子设备可以部署于商品结算区域,在交通出行场景,电子设备可以部署于公交车上、地铁出入口、火车出入口等。Based on this, please refer to FIG. 1, which is a scenario diagram of a data interaction method according to an exemplary embodiment of the present specification. In order to facilitate the distinction, this embodiment refers to a device held by a user as a portable device. 1 takes a smart phone as an example. The portable device may also be a device such as smart glasses or a smart watch. A device that performs data interaction with a portable device is referred to as an electronic device. The electronic device may be owned by various service merchants and may be deployed in a physical area where the merchant provides commercial services. For example, in the offline store scenario, the electronic device can be deployed in the commodity settlement area. In the traffic travel scenario, the electronic device can be deployed on a bus, subway entrance, train entrance, etc.
为了实现便携设备和电子设备之间能够相互传输数据,一种可选的实现方式是两个电子设备均利用网络连接至服务端,通过服务端传输数据,此种方式依赖于网络信号强度。然而在地铁等场景中,很多时候常常出现网络信号不稳定的情况,通过服务端传输数据有可能出现传输速度非常慢、甚至出现传输失败的情况,用户的便携设备也有可能因为很多原因处于离线状态,进而出现用户因无法传输数据而无法完成支付、无法出闸等情况。In order to enable the portable device and the electronic device to transmit data to each other, an optional implementation method is that both electronic devices use a network to connect to a server and transmit data through the server. This method depends on the network signal strength. However, in subway and other scenarios, the network signal is often unstable. When transmitting data through the server, the transmission speed may be very slow or even the transmission fails. The user ’s portable device may also be offline for many reasons. , And then there are cases where the user cannot complete the payment and cannot go out because of the inability to transmit data.
另一种可选的实现方式是,便携设备和电子设备之间通过短距离无线通信技术建立连接,例如蓝牙或近场通信等。然而,在电子设备所部署区域的周边,可能会有很多其他用户,各个用户都持有电子设备,电子设备可能会与其他用户误连接。作为例子,在地铁出入口可能部署有多台能控制出入闸的电子设备,地铁出入口处可能有很多用户,某个闸口的电子设备本应该与正准备出闸的用户A的便携设备连接,然而,由于用户A旁边的另一用户B的便携设备与该电子设备很靠近,电子设备连接了用户B的便携设备,使得用户A的便携设备无法进行数据交互、最终导致用户A无法及时地出闸。Another optional implementation is to establish a connection between the portable device and the electronic device through a short-range wireless communication technology, such as Bluetooth or near field communication. However, there may be many other users around the area where the electronic equipment is deployed. Each user holds the electronic equipment, and the electronic equipment may be connected with other users by mistake. As an example, there may be multiple electronic devices at the entrance and exit of the subway that can control the entrance and exit. There may be many users at the entrance and exit of the subway. The electronic equipment at a certain entrance should be connected to the portable device of user A who is preparing to exit. However, Since the portable device of another user B next to the user A is very close to the electronic device, the electronic device is connected to the portable device of the user B, so that the portable device of the user A cannot perform data interaction, and eventually the user A cannot exit the gate in time.
基于此,本说明书实施例提出了一种基于光线检测的数据交互方案,如图2A所示,是本说明书根据一示例性实施例示出的一种数据交互示意图,图2A中的电子设备能够按照目标发光频率发光,在一个实施例中,便携设备可以执行如图2B所示的步骤:Based on this, an embodiment of the present specification proposes a data interaction scheme based on light detection. As shown in FIG. 2A, it is a schematic diagram of data interaction according to an exemplary embodiment of the present specification. The electronic device in FIG. The target emission frequency emits light. In one embodiment, the portable device can perform the steps shown in FIG. 2B:
在步骤202中,确定检测到以目标发光频率发射的光后,基于短距离无线通信与电子设备建立连接。In step 202, after it is determined that the light emitted at the target emission frequency is detected, a connection is established with the electronic device based on the short-range wireless communication.
在步骤204中,在建立连接后与所述电子设备进行数据交互。In step 204, perform data interaction with the electronic device after the connection is established.
本实施例中,便携设备在检测到以目标发光频率发射的光后,能够确定自身与电子设备较为靠近,之后基于短距离无线通信与电子设备建立连接,因此电子设备和便携设 备可以进行数据交互。其中,电子设备需要按照目标发光频率发光,在一种可选的实现方式中,电子设备的硬件结构可以如图3A所示,电子设备包括:In this embodiment, the portable device can determine that it is relatively close to the electronic device after detecting the light emitted at the target light emission frequency, and then establishes a connection with the electronic device based on short-range wireless communication, so the electronic device and the portable device can perform data interaction. . The electronic device needs to emit light according to the target light emission frequency. In an optional implementation manner, the hardware structure of the electronic device may be as shown in FIG. 3A. The electronic device includes:
发光单元310,用于:发射目标发光频率的光。The light emitting unit 310 is configured to emit light at a target light emitting frequency.
短距离无线通信单元320,用于:与便携设备建立连接,其中,所述便携设备用于:在检测到以所述目标发光频率发射的光后建立所述连接。The short-range wireless communication unit 320 is configured to establish a connection with a portable device, where the portable device is configured to establish the connection after detecting light emitted at the target light emitting frequency.
处理单元330,用于:与所述便携设备进行数据交互。The processing unit 330 is configured to perform data interaction with the portable device.
其中,图3A示出了电子设备的一种硬件结构示意图,该图3A对电子设备的硬件实现方式进行了示意;在另一些例子中,在电子设备内置的发光单元和短距离无线通信单元可以由处理单元控制,处理单元的处理过程可以采用软件或可编程逻辑器件等实现方式,如图3B所示,电子设备可执行如下步骤与便携设备进行数据交互:FIG. 3A shows a schematic diagram of a hardware structure of an electronic device, and FIG. 3A illustrates a hardware implementation of the electronic device. In other examples, a light-emitting unit and a short-range wireless communication unit built in the electronic device may Controlled by the processing unit, the processing process of the processing unit can be implemented by software or programmable logic devices. As shown in FIG. 3B, the electronic device can perform the following steps to perform data interaction with the portable device:
在步骤302中,向发光单元发出开启或关闭的控制指令,其中,所述发光单元用于:发射目标发光频率的光。In step 302, a control instruction for turning on or off is issued to a light emitting unit, wherein the light emitting unit is configured to: emit light of a target light emitting frequency.
在步骤304中,向短距离无线通信单元发出开启或关闭的控制指令,所述短距离无线通信单元用于与便携设备建立连接,其中,所述便携设备用于在检测到以所述目标发光频率发射的光后建立所述连接。In step 304, a control instruction for turning on or off is issued to a short-range wireless communication unit, which is configured to establish a connection with a portable device, wherein the portable device is configured to detect light emission with the target when detected. The connection is established after the light emitted by the frequency.
在步骤306中,在建立连接后,与所述便携设备进行数据交互。In step 306, after establishing a connection, perform data interaction with the portable device.
其中,发光单元可以包括LED(发光二极管,Light Emitting Diode)、荧光灯等发光器件,可以根据需要设定发光器件的发光频率,本实施例称为目标发光频率。设定该目标发光频率的目的,是为了供便携设备确定自身是否已经靠近电子设备,若便携设备靠近电子设备,则可以检测到电子设备以目标发光频率发射的光,从而可以防止便携设备与其他电子设备误连接。其中,该目标发光频率可以根据实际需要灵活配置,由于日常生活场所都有照明灯,为了提高检测准确率,目标发光频率可以与照明灯的发光频率不同,例如可以是120ms一个周期的发光频率等等,在该周期内可以是前60ms亮灯,后60ms熄灭。The light emitting unit may include light emitting devices such as LEDs (Light Emitting Diodes), fluorescent lamps, and the like. The light emitting frequency of the light emitting device may be set as required. This embodiment is referred to as a target light emitting frequency. The purpose of setting the target light emission frequency is for the portable device to determine whether it is close to the electronic device. If the portable device is close to the electronic device, the light emitted by the electronic device at the target light emission frequency can be detected, thereby preventing the portable device and other The electronic device is connected incorrectly. The target luminous frequency can be flexibly configured according to actual needs. Since there are lighting lamps in daily living places, in order to improve the detection accuracy, the target luminous frequency can be different from the luminous frequency of the illuminating lamp, for example, it can be a luminous frequency of 120ms per cycle. Wait, during this period, the first 60ms may be turned on and the second 60ms may be turned off.
具体实现时,作为例子,发光单元可以设置在电子设备壳体表面,便携设备在靠近电子设备后可以检测电子设备所发射的光;在其他例子中,发光单元可以是设置在电子设备内部,电子设备的表面可以具有一透明区域以使发光单元的光可以从内部发射而出,使得便携设备可以检测到光。In specific implementation, as an example, the light-emitting unit may be disposed on the surface of the electronic device casing, and the portable device may detect the light emitted by the electronic device after being near the electronic device. In other examples, the light-emitting unit may be disposed inside the electronic device. The surface of the device may have a transparent area so that the light of the light emitting unit can be emitted from the inside, so that the portable device can detect the light.
在其他例子中,如图3C所示,是本说明书根据一示例性实施例示出的电子设备的结构示意图,电子设备的壳体可以具有一凹槽,所述发光单元发射的光透过所述凹槽,该凹槽可限制便携设备检测光的方式,便携设备需要在插入凹槽后才可检测到电子设备发射的光,从而可减少其他光源的干扰,提高光的检测准确度。可选的,发光单元也可设置于凹槽内,使得发光单元发射的光在凹槽内被便携设备所检测;在其他例子中,发光单元可以是设置在电子设备内部,该凹槽内可以具有一透明区域,以使发光单元的光可以从内部发射并使便携设备可以在插入凹槽后可以检测到光。In another example, as shown in FIG. 3C, it is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present specification. The housing of the electronic device may have a groove, and the light emitted by the light-emitting unit passes through the groove. A groove, which can restrict the way a portable device detects light. The portable device needs to insert the groove before it can detect the light emitted by the electronic device, thereby reducing interference from other light sources and improving the accuracy of light detection. Optionally, the light-emitting unit may also be disposed in the groove, so that the light emitted by the light-emitting unit is detected by the portable device in the groove; in other examples, the light-emitting unit may be disposed inside the electronic device, and the groove may be There is a transparent area so that the light of the light emitting unit can be emitted from the inside and the portable device can detect the light after being inserted into the groove.
电子设备的其他器件如蓝牙模块可根据需要设置在凹槽内,也可以设置电子设备的表面等其他位置,其他常规的模块(如检测公交NFC卡片的NFC模块等)可根据需要设置电子设备的表面等其他位置。Other components of the electronic device, such as the Bluetooth module, can be set in the groove as required, and other positions on the surface of the electronic device can also be set. Surface and other locations.
可选的,发光单元可以持续地发射光,实际应用中,出于成本考虑及发光单元寿命考虑,也可以是需要被便携设备检测时才启动发光单元,在不需要检测的情况下关闭发光单元。基于此,本实施例提供了一种基于距离的发光单元控制方式,所述处理单元,还用于:基于设定距离范围内是否存在物体,控制所述发光单元的启动或关闭。Optionally, the light-emitting unit can continuously emit light. In practical applications, due to cost considerations and the life of the light-emitting unit, the light-emitting unit can be started only when it needs to be detected by a portable device, and the light-emitting unit can be turned off without detection. . Based on this, this embodiment provides a distance-based light-emitting unit control method. The processing unit is further configured to control the light-emitting unit to be turned on or off based on whether an object exists within a set distance.
其中,该设定距离范围可以通过测试而确定,可以是设定较小的距离以提高便携设备检测光的准确性,通过该距离可以限制便携设备需要与电子设备靠近,便携设备才能检测到电子设备所发射的光。在其他例子中,若有凹槽的情况下,可以是基于凹槽的尺寸而确定;例如,在便携设备与电子设备的距离低于凹槽尺寸,电子设备可以确定有物体进入,该物体是便携设备的可能性非常大,则可以通知发光单元启动以供便携设备检测光。可选的,电子设备可以配置距离传感器,通过距离传感器的检测结果确定设定距离范围内是否存在物体。The set distance range can be determined through testing. A smaller distance can be set to improve the accuracy of light detection by the portable device. This distance can limit the portable device to be close to the electronic device so that the portable device can detect the electronic The light emitted by the device. In other examples, if there is a groove, it can be determined based on the size of the groove; for example, when the distance between the portable device and the electronic device is lower than the size of the groove, the electronic device can determine that an object has entered, and the object is The possibility of the portable device is very large, and the light emitting unit can be notified to start for the portable device to detect light. Optionally, the electronic device may be configured with a distance sensor, and determine whether an object exists within a set distance range based on a detection result of the distance sensor.
相对应的,对于便携设备来说,可以通过光线传感器检测光,其中,光线传感器的检测时机,也可以基于距离来决定,在确定设定距离范围内存在物体后,则调用所述光线传感器检测所述光。其中,可以利用便携设备内置的距离传感器检测设定距离范围内是否存在物体。Correspondingly, for portable devices, light can be detected by a light sensor. The detection timing of the light sensor can also be determined based on the distance. After determining that there is an object within a set distance range, the light sensor is called to detect The light. Among them, a distance sensor built in the portable device can be used to detect whether an object exists within a set distance.
另一方面,考虑到日常生活中很多场合都会有灯光,有可能便携设备出现错误检测、也有可能便携设备会检测到与目标发光频率相同的光,基于此,本实施例方法,在基于短距离无线通信与电子设备建立连接之前,还包括:确定设定距离范围内存在物体。本实施例基于距离和光的双重验证,使得便携设备可以很大概率地与期望连接的设备建立连接。例如,若便携设备上的距离传感器被其他物品遮挡,但由于未检测到与目标发光 频率相同的光,此种情况下无需连接,从而可以避免误连接的情况。On the other hand, considering that there are lights on many occasions in daily life, it is possible that the portable device may detect errors or the portable device may detect light with the same frequency as the target. Based on this, the method of this embodiment is based on short distances. Before establishing a connection between the wireless communication and the electronic device, the method further includes: determining that an object exists within a set distance range. This embodiment is based on the double authentication of distance and light, so that the portable device can establish a connection with the device to be connected with a high probability. For example, if the distance sensor on the portable device is blocked by other objects, but no light with the same frequency as the target is detected, there is no need to connect in this case, which can avoid misconnection.
本实施例的短距离无线通信,可以包括蓝牙、Wi-Fi(Wireless Fidelity,无线保真)、近场通信、UWB(Ultra Wideband,一种无载波通信技术)或HomeRF(家庭射频)等。以蓝牙为例,蓝牙的工作模式包括主从模式,电子设备和便携设备所工作的模式可以根据需要灵活确定,本实施例对此不作限定。作为例子,可以是电子设备工作在从模式,电子设备可以广播基于短距离无线通信的连接消息,以供便携设备连接;而便携设备工作在主模式情况下,便携设备可以:接收电子设备广播的基于短距离无线通信的连接消息,根据所述连接消息与所述电子设备建立连接。The short-range wireless communication in this embodiment may include Bluetooth, Wi-Fi (Wireless Fidelity, wireless fidelity), near field communication, UWB (Ultra Wideband), or HomeRF (Home Radio Frequency). Taking Bluetooth as an example, the working mode of Bluetooth includes a master-slave mode, and the working modes of the electronic device and the portable device can be flexibly determined according to requirements, which is not limited in this embodiment. As an example, the electronic device may work in a slave mode, and the electronic device may broadcast a connection message based on short-range wireless communication for the portable device to connect; while the portable device works in the master mode, the portable device may: Based on a connection message of short-range wireless communication, a connection is established with the electronic device according to the connection message.
可选的,本实施例中电子设备和便携设备还可以进一步结合信号强度来连接,例如,当电子设备和便携设备两者较为靠近,则两者都可检测到对方的信号强度较强,因此,还可以根据RSSI(RSSI,Received Signal Strength Indication)强度的大小来建立连接,例如可以选择信号强度较强的设备建立连接。基于此,电子设备和便携设备对连接都具有一定的自主选择能力,例如,电子设备在发现距离高于阈值后,可以认为没有便携设备靠近,若有设备要尝试连接,可以停止或阻止该连接。Optionally, in this embodiment, the electronic device and the portable device may further be connected in combination with signal strength. For example, when the electronic device and the portable device are close to each other, both of them can detect that the signal strength of the other party is strong, so You can also establish a connection according to the RSSI (Received Signal Strength Indication) strength. For example, you can select a device with a stronger signal strength to establish a connection. Based on this, both electronic devices and portable devices have a certain ability to independently select the connection. For example, after the electronic device finds that the distance is higher than the threshold, it can be considered that no portable device is close. If there is a device to try to connect, you can stop or prevent the connection. .
基于上述实施例,电子设备和便携设备在建立连接后可以进行数据交互,本实施例无需要求电子设备配置成本较高的器件,对移动通信网络没有要求,在电子设备和便携设备处于离线状态情况下,也可以实现数据交互。Based on the above embodiment, the electronic device and the portable device can perform data interaction after the connection is established. This embodiment does not require the electronic device to be configured with a higher cost device. There is no requirement on the mobile communication network. The electronic device and the portable device are offline. Next, you can also implement data interaction.
本实施例可应用于多种场景,所交互的数据可包含如下一种或多种信息:支付凭证信息、公交车信息、地铁站信息、汽车票信息或火车票信息等等。接下来列举几种应用场景下,并对电子设备和便携设备所交互的数据进行举例说明。This embodiment can be applied to various scenarios, and the interacted data may include one or more of the following information: payment voucher information, bus information, subway station information, car ticket information or train ticket information, and so on. In the following, several application scenarios are listed, and the data exchanged by the electronic device and the portable device are exemplified.
第一种、公交场景(以固定计费为例)The first type of bus scenario (take fixed billing as an example)
本实施例的公交场景,以固定计费为例进行说明,本实施例的电子设备可部署于公交车上,作为例子,电子设备中的处理流程可以如图4A所示,其中,电子设备内置的距离传感器可以持续监听,若监听距离高于阈值,说明没有手机进入凹槽准备连接,可以持续地进行监听。当识别距离减少、距离低于阈值后,可以认为有手机进入凹槽,发送指令给发光单元,以开始唤醒LED灯发射光(可以是120ms一个周期的光,周期内前60ms亮灯,后60ms熄灭)。当电子设备的距离传感器检测到距离变大,例如变回默认值或没有检测到物体后,可以发送指令关闭发光单元。本实施例中的电子设备包括有BLE(蓝牙)模块,该模块可以持续在广播消息,以等待手机端的BLE模块连接。The bus scenario of this embodiment is described by taking a fixed charge as an example. The electronic device of this embodiment can be deployed on a bus. As an example, the processing flow in the electronic device can be shown in FIG. 4A. The distance sensor can continuously monitor. If the monitoring distance is higher than the threshold, it means that no mobile phone enters the groove to prepare for connection, and can continuously monitor. When the recognition distance is reduced and the distance is lower than the threshold, it can be considered that a mobile phone enters the groove and sends a command to the light emitting unit to start waking the LED light to emit light (it can be a light cycle of 120ms, the first 60ms light up during the period, and the last 60ms Off). When the distance sensor of the electronic device detects that the distance becomes larger, for example, it returns to the default value or no object is detected, it may send an instruction to turn off the light emitting unit. The electronic device in this embodiment includes a BLE (Bluetooth) module, which can continuously broadcast messages to wait for the BLE module on the mobile phone to connect.
用户的便携设备(本实施例以手机为例)可安装有第三方支付APP、用于提供地铁乘坐服务等APP。便携设备可执行如图4B所示实施例的步骤,用户上公交车后,用户可启动便携设备中所安装的APP,以唤醒便携设备内置的距离传感器。当用户的手机前半部分伸进电子设备的凹槽中时,手机内置的距离传感器识别到距离靠近,手机上的光线传感器开始检测是否有目标发光频率的光。当手机识别到120ms周期变化的灯光时,认为自己已经在电子设备内,利用BLE模块开始连接机具内的BLE模块。其中,手机可以选择RSSI强度最大的设备的BLE模块进行连接。The user's portable device (a mobile phone is taken as an example in this embodiment) may be installed with a third-party payment APP and an APP for providing a subway ride service. The portable device can perform the steps of the embodiment shown in FIG. 4B. After the user gets on the bus, the user can start an APP installed in the portable device to wake up the distance sensor built in the portable device. When the front half of the user's mobile phone protrudes into the groove of the electronic device, the distance sensor built in the mobile phone recognizes that the distance is close, and the light sensor on the mobile phone starts to detect whether there is light of the target luminous frequency. When the mobile phone recognizes the light with a periodic change of 120ms, it thinks that it is already in the electronic device, and uses the BLE module to start connecting the BLE module in the machine. Among them, the mobile phone can select the BLE module of the device with the highest RSSI strength to connect.
在本实施例中,数据交互的方式可以包括:In this embodiment, the manner of data interaction may include:
(1)电子设备向便携设备传输数据:(1) Electronic equipment transmits data to portable equipment:
电子设备可向便携设备发送的表征车费参数的数据,基于该数据,支付服务方可以对用户的支付账户扣取乘车费用。作为例子,便携设备中可以安装有支付宝APP,电子设备向支付宝传输数据,支付宝可将接收的数据(或者也可以是发送其他表征扣费的通知消息等等)发送给支付宝服务端。支付宝服务端接收后,可以对用户的支付账户进行扣款,从而完成用户对乘车费的交易处理。The data that the electronic device can send to the portable device to characterize the fare parameters. Based on the data, the payment service party can deduct the fare from the user's payment account. As an example, an Alipay APP may be installed in the portable device, the electronic device transmits data to Alipay, and Alipay may send the received data (or may also send other notification messages indicating chargeback, etc.) to the Alipay server. After receiving the Alipay service, the user can deduct the payment account of the user, thereby completing the transaction processing of the fare by the user.
(2)便携设备向电子设备传输数据:(2) The portable device transmits data to the electronic device:
便携设备可向电子设备发送用户身份标识等代表支付凭证(token)的数据,电子设备接收便携设备传输的数据,基于该支付凭证可扣取用户的乘车费用。作为例子,便携设备中可以安装有支付宝APP,支付宝向电子设备发送支付凭证,电子设备将接收到的支付凭证发送给支付宝服务端(可以是电子设备直接发送给支付宝服务端,也可以是电子设备通过其他服务器发送给支付宝服务端)。支付宝服务端接收后,可以对用户的支付账户进行扣款,从而完成用户对乘车费的支付处理。The portable device can send data representing a payment token (such as a user identity) to the electronic device. The electronic device receives the data transmitted by the portable device, and the user's ride fee can be deducted based on the payment certificate. As an example, an Alipay APP can be installed in a portable device. Alipay sends payment vouchers to the electronic device, and the electronic device sends the received payment voucher to the Alipay server (either the electronic device directly sends to the Alipay server or the electronic device) Sent to the Alipay server through other servers). After receiving the Alipay service, the user's payment account can be deducted to complete the user's payment processing of the fare.
可选的,电子设备还可以向便携设备传输公交车线路等信息,以供便携设备展示上述信息供用户查阅。Optionally, the electronic device can also transmit information such as bus lines to the portable device, so that the portable device can display the above information for users to view.
第二种、地铁场景(以分段计费为例)The second type, the subway scenario (take segmented billing as an example)
一些地铁场景中采用分段计费的方式,此种方式需要知悉用户的入站信息和出站信息。在此类场景中,本实施例的电子设备可配置于站点的出入口,电子设备可作为控制出入闸的设备;用户的便携设备可安装有第三方支付APP或提供地铁乘坐服务等APP。在入口处,用户可启动便携设备中所安装的APP,便携设备可向电子设备发送用户身份标识等代表支付凭证(token)的数据,电子设备接收到便携设备传输的数据后,可以控 制闸机放行,还可以将接收的数据发送给服务端;在另一些例子中,也可以是电子设备向用户的便携设备传输站点信息,可选的,便携设备可以将接收到的数据传输给服务端。In some subway scenarios, a segmented charging method is used. This method requires the user's inbound and outbound information. In such a scenario, the electronic device of this embodiment may be configured at an entrance of a station, and the electronic device may be used as a device for controlling entrance and exit; a user's portable device may be installed with a third-party payment APP or an APP that provides subway ride services. At the entrance, the user can launch the APP installed in the portable device. The portable device can send data representing the payment token (such as a user identity) to the electronic device. After receiving the data transmitted by the portable device, the electronic device can control the gate. The release can also send the received data to the server; in other examples, the electronic device can also transmit site information to the user's portable device. Optionally, the portable device can transmit the received data to the server.
在用户需要出闸时,用户的便携设备将与出口的电子设备进行数据交互,可以理解,可以是便携设备传输给电子设备,也可以是电子设备传输给便携设备,基于入口站点信息和出口站点信息,从而可以确定用户所需要缴纳的费用。When the user needs to get out of the gate, the user ’s portable device will perform data interaction with the exported electronic device. It can be understood that the portable device can be transmitted to the electronic device or the electronic device can be transmitted to the portable device, based on the entrance site information and the exit site Information so that you can determine what the user is paying.
第三种、高铁等非支付场景Third, non-payment scenarios such as high-speed rail
本实施例与地铁场景相类似,可用于出入口的闸机,但可以不涉及支付。例如,用户可以预先买好车票(例如火车票、地铁票、汽车票或景点门票等等),APP可以将该车票可以以电子卡、电子券等形式存储,本实施例可称为电子车票,该电子车票对应有入站信息、出站信息、用户身份信息或费用信息等等。This embodiment is similar to the subway scenario, and can be used for gates at entrances and exits, but may not involve payment. For example, the user can buy a ticket in advance (such as a train ticket, subway ticket, bus ticket, or attraction ticket, etc.), and the APP can store the ticket in the form of an electronic card, electronic coupon, etc. This embodiment may be called an electronic ticket. The electronic ticket corresponds to inbound information, outbound information, user identity information, fee information, and so on.
本实施例的电子设备可配置于站点的出口和/或入口,电子设备可作为控制出入闸的设备,用户的便携设备的安装APP存储有该电子车票。在出入口处,用户可启动便携设备中所安装的APP,便携设备可向电子设备发送包含车票信息的数据,电子设备接收到便携设备传输的数据后,可以进行信息核对,基于核对结果控制闸机是否放行。The electronic device in this embodiment may be configured at the exit and / or entrance of the station. The electronic device may be used as a device for controlling entry and exit. The installation APP of the user ’s portable device stores the electronic ticket. At the entrance, the user can launch the APP installed in the portable device. The portable device can send data containing ticket information to the electronic device. After receiving the data transmitted by the portable device, the electronic device can perform information verification and control the gate based on the verification result. Whether to release.
第四种、线下支付Fourth, offline payment
本实施例中,电子设备可部署于商店的结算区域,用户的便携设备可安装有第三方支付APP等支付类APP,用户启动便携设备中所安装的APP,便携设备可向电子设备发送用户身份标识等代表支付凭证(token)的数据,电子设备接收到便携设备传输的数据后,可以将接收的数据发送给服务端,以供服务端对用户的支付账户进行扣款。In this embodiment, the electronic device can be deployed in the settlement area of the store. The user's portable device can be installed with a payment app such as a third-party payment APP. The user starts the APP installed in the portable device, and the portable device can send the user identity to the electronic device Data such as identifications represent payment tokens. After the electronic device receives the data transmitted by the portable device, it can send the received data to the server for the server to charge the user's payment account.
从上述实施例可知,电子设备与便携设备之间的数据交互可能会涉及一些敏感信息,可选的,出于数据安全的考虑,电子设备和便携设备之间交互的数据可以进行加密处理形成一份加密数据。通过双方共享同样加解密算法,电子设备和便携设备既可以实现数据交互,又提高了数据交互的安全性。It can be known from the above embodiments that the data interaction between the electronic device and the portable device may involve some sensitive information. Optionally, for the sake of data security, the data exchanged between the electronic device and the portable device may be encrypted to form a Copies of encrypted data. By sharing the same encryption and decryption algorithm between the two parties, the electronic device and the portable device can both implement data interaction and improve the security of data interaction.
本说明书数据交互装置的实施例可以应用在便携设备上,例如智能手机、智能手表等。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在数据交互的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图5所示,为本说明书实施例数据交互装置所在便携设备的一种硬件结构图,除了图5所示的处理器510、内存530、网络接口520、以及非易失性存储器540之外,实施例中装 置531所在的便携设备,通常根据该便携设备的实际功能,还可以包括其他硬件,对此不再赘述。The embodiments of the data interaction device in this specification can be applied to portable devices, such as smart phones and smart watches. The device embodiments can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by reading corresponding computer program instructions in a non-volatile memory into a memory and running the processor through a data interaction processor. In terms of hardware, as shown in FIG. 5, this is a hardware structure diagram of the portable device where the data interaction device according to the embodiment of the specification is located, except for the processor 510, the memory 530, the network interface 520, and In addition to the volatile memory 540, the portable device in which the device 531 is located in the embodiment may generally include other hardware according to the actual function of the portable device, and details are not described herein again.
如图6所示,图6是本说明书根据一示例性实施例示出的一种数据交互装置的框图,所述装置包括:As shown in FIG. 6, FIG. 6 is a block diagram of a data interaction device according to an exemplary embodiment of the present specification. The device includes:
连接模块61,用于:确定检测到以目标发光频率发射的光后,基于短距离无线通信与电子设备建立连接;A connection module 61, configured to establish a connection with an electronic device based on short-range wireless communication after determining that light emitted at a target emission frequency is detected;
交互模块62,用于:在建立连接后,与所述电子设备进行数据交互。The interaction module 62 is configured to perform data interaction with the electronic device after the connection is established.
可选的,通过光线传感器检测所述光。Optionally, the light is detected by a light sensor.
可选的,所述光线传感器检测所述光,在确定设定距离范围内存在物体后执行。Optionally, the light sensor detects the light and executes it after determining that an object exists within a set distance range.
可选的,所述连接模块在基于短距离无线通信与电子设备建立连接之前,还包括:确定设定距离范围内存在物体。Optionally, before the connection module establishes a connection with the electronic device based on the short-range wireless communication, the connection module further includes: determining that an object exists within a set distance range.
可选的,通过距离传感器检测设定距离范围内是否存在物体。Optionally, a distance sensor is used to detect whether an object exists within a set distance.
可选的,所述目标发光频率与照明灯的发光频率不同。Optionally, the target light emission frequency is different from the light emission frequency of the lighting lamp.
可选的,所述连接模块,还用于:Optionally, the connection module is further configured to:
接收电子设备广播的基于短距离无线通信的连接消息,基于所述连接消息与所述电子设备建立连接。Receiving a connection message based on short-range wireless communication broadcasted by an electronic device, and establishing a connection with the electronic device based on the connection message.
可选的,所述与所述电子设备进行交互的数据,包含如下一种或多种信息:Optionally, the data interacting with the electronic device includes one or more of the following information:
支付凭证信息、公交车信息、地铁站信息、汽车票信息或火车票信息。Payment voucher information, bus information, subway station information, bus ticket information or train ticket information.
相应地,本说明书实施例还提供一种便携设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如下方法:Accordingly, an embodiment of the present specification further provides a portable device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the following method when executing the program:
确定检测到以目标发光频率发射的光后,基于短距离无线通信与电子设备建立连接;After determining that the light emitted at the target emission frequency is detected, establish a connection with the electronic device based on short-range wireless communication;
在建立连接后,与所述电子设备进行数据交互。After establishing a connection, perform data interaction with the electronic device.
相应地,本说明书实施例还提供一种电子设备,包括发光单元、短距离无线通信单元、存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如下方法:Accordingly, an embodiment of the present specification further provides an electronic device including a light emitting unit, a short-range wireless communication unit, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor The following methods are implemented when executing the program:
向所述发光单元发出开启或关闭的控制指令,其中,所述发光单元用于:发射目标发光频率的光;Sending a control instruction for turning on or off to the light emitting unit, wherein the light emitting unit is configured to: emit light of a target light emitting frequency;
向所述短距离无线通信单元发出开启或关闭的控制指令,所述短距离无线通信单元用于与便携设备建立连接,其中,所述便携设备用于在检测到以所述目标发光频率发射的光后建立所述连接;Sending a control instruction for turning on or off to the short-range wireless communication unit, where the short-range wireless communication unit is configured to establish a connection with a portable device, where the portable device is configured to detect a Establishing the connection after light;
在建立连接后,与所述便携设备进行数据交互。After establishing a connection, perform data interaction with the portable device.
上述数据交互装置中各个模块的功能和作用的实现过程具体详见上述数据交互方法中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and functions of each module in the data interaction device, refer to the implementation process of the corresponding steps in the data interaction method, and details are not described herein again.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the device embodiment, since it basically corresponds to the method embodiment, the relevant part may refer to the description of the method embodiment. The device embodiments described above are only schematic, and the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, may be located in One place, or can be distributed to multiple network modules. Some or all of these modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement without creative efforts.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The specific embodiments of the present specification have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and the desired result may still be achieved. In addition, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
本领域技术人员在考虑说明书及实践这里申请的发明后,将容易想到本说明书的其它实施方案。本说明书旨在涵盖本说明书的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本说明书的一般性原理并包括本说明书未申请的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本说明书的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily think of other embodiments of the present specification after considering the specification and practicing the inventions filed herein. This description is intended to cover any variations, uses, or adaptations of this specification. These modifications, uses, or adaptations follow the general principles of this specification and include the common general knowledge or conventional technical means in the technical field to which this specification has not been applied. . It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
应当理解的是,本说明书并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本说明书的范围仅由所附的权利要求来限制。It should be understood that this description is not limited to the precise structure that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of this description is limited only by the following claims.
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保 护的范围之内。The above are only the preferred embodiments of this specification and are not intended to limit this specification. Any modification, equivalent replacement, or improvement made within the spirit and principles of this specification shall be included in this specification Within the scope of protection.

Claims (19)

  1. 一种数据交互方法,所述方法包括:A data interaction method, the method includes:
    确定检测到以目标发光频率发射的光后,基于短距离无线通信与电子设备建立连接;After determining that the light emitted at the target emission frequency is detected, establish a connection with the electronic device based on short-range wireless communication;
    在建立连接后,与所述电子设备进行数据交互。After establishing a connection, perform data interaction with the electronic device.
  2. 根据权利要求1所述的方法,通过光线传感器检测所述光。The method according to claim 1, the light is detected by a light sensor.
  3. 根据权利要求2所述的方法,所述光线传感器检测所述光,在确定设定距离范围内存在物体后执行。The method according to claim 2, wherein the light sensor detects the light and executes after determining that an object exists within a set distance range.
  4. 根据权利要求1所述的方法,所述基于短距离无线通信与电子设备建立连接之前,还包括:确定设定距离范围内存在物体。The method according to claim 1, before the establishing a connection with the electronic device based on the short-range wireless communication, further comprising: determining that an object exists within a set distance range.
  5. 根据权利要求3或4所述的方法,通过距离传感器检测设定距离范围内是否存在物体。The method according to claim 3 or 4, detecting whether an object exists within a set distance range by using a distance sensor.
  6. 根据权利要求1所述的方法,所述目标发光频率与照明灯的发光频率不同。The method according to claim 1, wherein the target light emission frequency is different from the light emission frequency of the illumination lamp.
  7. 根据权利要求1所述的方法,所述基于短距离无线通信与电子设备建立连接,包括:The method according to claim 1, wherein the establishing a connection with an electronic device based on short-range wireless communication comprises:
    接收电子设备广播的基于短距离无线通信的连接消息,基于所述连接消息与所述电子设备建立连接。Receiving a connection message based on short-range wireless communication broadcasted by an electronic device, and establishing a connection with the electronic device based on the connection message.
  8. 根据权利要求1所述的方法,所述与所述电子设备进行交互的数据,包含如下一种或多种信息:The method according to claim 1, wherein the data interacting with the electronic device comprises one or more of the following information:
    支付凭证信息、公交车信息、地铁站信息、汽车票信息或火车票信息。Payment voucher information, bus information, subway station information, bus ticket information or train ticket information.
  9. 一种数据交互装臵,包括:A data interaction device, including:
    连接模块,用于:确定检测到以目标发光频率发射的光后,基于短距离无线通信与电子设备建立连接;A connection module configured to establish a connection with an electronic device based on short-range wireless communication after determining that light emitted at a target emission frequency is detected;
    交互模块,用于:在建立连接后,与所述电子设备进行数据交互。An interaction module is configured to perform data interaction with the electronic device after a connection is established.
  10. 一种电子设备,包括:An electronic device includes:
    发光单元,用于:发射目标发光频率的光;A light-emitting unit for: emitting light of a target light-emitting frequency;
    短距离无线通信单元,用于:与便携设备建立连接,其中,所述便携设备用于:在检测到以所述目标发光频率发射的光后建立所述连接;A short-range wireless communication unit configured to establish a connection with a portable device, wherein the portable device is configured to establish the connection after detecting light emitted at the target light emitting frequency;
    处理单元,用于:与所述便携设备进行数据交互。A processing unit, configured to: perform data interaction with the portable device.
  11. 根据权利要求10所述的电子设备,所述电子设备的壳体具有一凹槽,所述发光单元发射的光透过所述凹槽。The electronic device according to claim 10, wherein the housing of the electronic device has a groove, and light emitted by the light emitting unit passes through the groove.
  12. 根据权利要求10所述的电子设备,所述发光单元包括:LED。The electronic device according to claim 10, wherein the light emitting unit comprises: an LED.
  13. 根据权利要求10所述的电子设备,所述处理单元,还用于:基于设定距离范围内是否存在物体,控制所述发光单元的启动或关闭。The electronic device according to claim 10, the processing unit is further configured to: control the activation or shutdown of the light emitting unit based on whether an object exists within a set distance range.
  14. 根据权利要求10所述的电子设备,所述处理单元,还用于:基于设定距离范围内是否存在物体,控制所述短距离无线通信单元的启动或关闭。The electronic device according to claim 10, the processing unit is further configured to control the activation or shutdown of the short-range wireless communication unit based on whether an object exists within a set distance range.
  15. 根据权利要求13或14所述的电子设备,还包括:距离传感器,用于:确定设定距离范围内是否存在物体。The electronic device according to claim 13 or 14, further comprising: a distance sensor, configured to determine whether an object exists within a set distance.
  16. 根据权利要求10所述的电子设备,所述处理单元,还用于:将所述便携设备发送的数据发送给服务端。The electronic device according to claim 10, the processing unit is further configured to: send data sent by the portable device to a server.
  17. 一种数据交互方法,包括:A data interaction method includes:
    向发光单元发出开启或关闭的控制指令,其中,所述发光单元用于:发射目标发光频率的光;Sending a control instruction for turning on or off to a light emitting unit, wherein the light emitting unit is configured to: emit light of a target light emitting frequency;
    向短距离无线通信单元发出开启或关闭的控制指令,所述短距离无线通信单元用于与便携设备建立连接,其中,所述便携设备用于在检测到以所述目标发光频率发射的光后建立所述连接;A control instruction for turning on or off is sent to a short-range wireless communication unit, which is used to establish a connection with a portable device, wherein the portable device is used after detecting the light emitted at the target light emitting frequency. Establishing the connection;
    在建立连接后,与所述便携设备进行数据交互。After establishing a connection, perform data interaction with the portable device.
  18. 一种便携设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如下方法:A portable device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor implements the following method when the program is executed:
    确定检测到以目标发光频率发射的光后,基于短距离无线通信与电子设备建立连接;After determining that the light emitted at the target emission frequency is detected, establish a connection with the electronic device based on short-range wireless communication;
    在建立连接后,与所述电子设备进行数据交互。After establishing a connection, perform data interaction with the electronic device.
  19. 一种电子设备,包括发光单元、短距离无线通信单元、存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如下方法:An electronic device includes a light emitting unit, a short-range wireless communication unit, a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor implements the following method when the program is executed:
    向所述发光单元发出开启或关闭的控制指令,其中,所述发光单元用于:发射目标发光频率的光;Sending a control instruction for turning on or off to the light emitting unit, wherein the light emitting unit is configured to: emit light of a target light emitting frequency;
    向所述短距离无线通信单元发出开启或关闭的控制指令,所述短距离无线通信单元用于与便携设备建立连接,其中,所述便携设备用于在检测到以所述目标发光频率发射的光后建立所述连接;Sending a control instruction for turning on or off to the short-range wireless communication unit, where the short-range wireless communication unit is configured to establish a connection with a portable device, where the portable device is configured to detect a Establishing the connection after light;
    在建立连接后,与所述便携设备进行数据交互。After establishing a connection, perform data interaction with the portable device.
PCT/CN2019/080047 2018-06-25 2019-03-28 Data exchange method and apparatus, electronic device and portable device WO2020001109A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810663666.3 2018-06-25
CN201810663666.3A CN109102278B (en) 2018-06-25 2018-06-25 Data interaction method and device, electronic equipment and portable equipment

Publications (1)

Publication Number Publication Date
WO2020001109A1 true WO2020001109A1 (en) 2020-01-02

Family

ID=64844984

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/080047 WO2020001109A1 (en) 2018-06-25 2019-03-28 Data exchange method and apparatus, electronic device and portable device

Country Status (3)

Country Link
CN (1) CN109102278B (en)
TW (1) TW202001720A (en)
WO (1) WO2020001109A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109102278B (en) * 2018-06-25 2020-08-25 阿里巴巴集团控股有限公司 Data interaction method and device, electronic equipment and portable equipment
CN112822826A (en) * 2019-10-30 2021-05-18 厦门立达信照明有限公司 Light control method, system and signal transceiver
CN111210222B (en) * 2020-01-08 2022-04-29 支付宝实验室(新加坡)有限公司 Data display and payment method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105894269A (en) * 2016-03-30 2016-08-24 努比亚技术有限公司 Payment code display device and method
CN106331376A (en) * 2016-09-30 2017-01-11 维沃移动通信有限公司 Power saving method and mobile terminal
CN109102278A (en) * 2018-06-25 2018-12-28 阿里巴巴集团控股有限公司 Data interactive method, device, electronic equipment and portable equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005109348A1 (en) * 2004-05-12 2005-11-17 Telecom Italia S.P.A. System for and method of automating parking payment by using electronic tags
BR112018002131A2 (en) * 2015-08-17 2018-09-11 Bytemark, Inc. method on a mobile device, method for facilitating fare validation, mobile device and controller unit
CN107393071A (en) * 2017-07-20 2017-11-24 特斯联(北京)科技有限公司 A kind of current apparatus control method answered based on bluetooth distance perspective and control system
CN107155166A (en) * 2017-07-31 2017-09-12 湖南大学 The nfc communication apparatus communicated based on bluetooth and camera

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105894269A (en) * 2016-03-30 2016-08-24 努比亚技术有限公司 Payment code display device and method
CN106331376A (en) * 2016-09-30 2017-01-11 维沃移动通信有限公司 Power saving method and mobile terminal
CN109102278A (en) * 2018-06-25 2018-12-28 阿里巴巴集团控股有限公司 Data interactive method, device, electronic equipment and portable equipment

Also Published As

Publication number Publication date
TW202001720A (en) 2020-01-01
CN109102278A (en) 2018-12-28
CN109102278B (en) 2020-08-25

Similar Documents

Publication Publication Date Title
WO2020001109A1 (en) Data exchange method and apparatus, electronic device and portable device
US20200286317A1 (en) Traffic detection method, device, and system
US10419115B2 (en) Transmitter, transmitting method, and receiving method
US10075530B2 (en) Method and electronic device for establishing connection with external electronic device
US10262203B2 (en) Method for recognizing iris and electronic device therefor
KR102390046B1 (en) Wireless router, internet of things device and system for supporting a connection to wireless router of internet of things device
JP6352522B2 (en) Derivation of identifiers encoded in visible light communication signals
KR102186547B1 (en) Communication Method and Apparatus Supporting Selective Communication Services
KR101329877B1 (en) Mobile terminal based on the visible light communication and communication method using the same
US20160132865A1 (en) Electronic device including a plurality of payment modules
CN109716866B (en) Wireless lamp configuration
JP6994090B2 (en) Systems and methods for providing long-distance network services to short-range wireless devices
US11082151B2 (en) Electronic device and coverage compensation method thereof for short range communication
WO2021185354A1 (en) Electronic ink display device control and update methods, and related device and system
US20170171795A1 (en) Method and device for authentication via user behavior in mobile scenarios
CN108763895A (en) Image processing method and device, electronic equipment, storage medium
TWI691902B (en) Method, device and electronic equipment for quickly starting business in application program
TW202018624A (en) Mobile payment method and device and electronic device
US11082840B2 (en) System and methods for fast, secure and power efficient occupancy session management
US10635961B1 (en) Transaction token that exhibits indication-related detectable changes on the transaction token
CN110024307A (en) Visible light communication detection and/or decoding
US20210099837A1 (en) Intelligent control system for monitoring computing devices and physical assets within a premises and for facilitating related transactions
WO2023011306A1 (en) Offline payment
JPWO2020066202A1 (en) Entry management system, entry management method, portable device, entry notification method, and program
WO2024031705A1 (en) Zero-power (zp) internet of things (iot) tag remote finding

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19824805

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19824805

Country of ref document: EP

Kind code of ref document: A1