CN112188461B - Control method and device of near field communication device, medium and electronic equipment - Google Patents

Control method and device of near field communication device, medium and electronic equipment Download PDF

Info

Publication number
CN112188461B
CN112188461B CN202011126376.9A CN202011126376A CN112188461B CN 112188461 B CN112188461 B CN 112188461B CN 202011126376 A CN202011126376 A CN 202011126376A CN 112188461 B CN112188461 B CN 112188461B
Authority
CN
China
Prior art keywords
display interface
near field
target
target display
field communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011126376.9A
Other languages
Chinese (zh)
Other versions
CN112188461A (en
Inventor
陈华星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011126376.9A priority Critical patent/CN112188461B/en
Publication of CN112188461A publication Critical patent/CN112188461A/en
Application granted granted Critical
Publication of CN112188461B publication Critical patent/CN112188461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The disclosure provides a control method of a near field communication device, a control device of the near field communication device, a computer readable medium and electronic equipment, and relates to the technical field of communication. The method comprises the following steps: when the first equipment is positioned on a target display interface, determining a target communication mode corresponding to the target display interface in a near field communication mode corresponding to a near field communication function; and when receiving a first control operation aiming at the target display interface, closing other communication modes except the target communication mode in the near field communication mode so that the first device establishes communication connection with the second device based on the target communication mode. The present disclosure may only preserve the target functionality mode when the first device is in the target display interface. Therefore, the condition that the near field communication function of the first device establishes communication connection different from the user requirement based on other functional modes when the first device is positioned on the target display interface can be avoided, and the accuracy of the established communication connection is improved.

Description

Control method and device of near field communication device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a control method of a near field communication device, a control device of a near field communication device, a computer readable medium, and an electronic apparatus.
Background
Near field communication (Near Field Communication, hereinafter referred to as NFC) technology is a near field communication technology, and has evolved from the integration of a contactless identification technology and an interconnection technology. At present, the technology is widely applied to life of people, such as common subways, buses, silver-colored simultaneous flash payment, access control systems and the like.
When a terminal device uses an NFC device to communicate, multiple near field communication modes of the NFC device are often switched by means of time slice polling. However, when the NFC devices of the two terminal apparatuses support multiple near field communication modes, there are also various communication connection manners between the NFC devices, and thus, there may be situations that the communication connection is different from the user requirement.
Disclosure of Invention
The disclosure aims to provide a control method of a near field communication device, a control device of the near field communication device, a computer readable medium and an electronic device, so as to avoid the situation that the established communication connection is different from the user requirement in the related art at least to a certain extent, and improve the accuracy of the established communication connection.
According to a first aspect of the present disclosure, there is provided a control method of a near field communication device, applied to a first apparatus having a near field communication function, including: when the first equipment is positioned on a target display interface, determining a target communication mode corresponding to the target display interface in a near field communication mode corresponding to a near field communication function; and when a first control operation aiming at a target display interface is received, closing other communication modes except the target communication mode in the near field communication mode, so that the first device establishes communication connection with the second device based on the target communication mode.
According to a second aspect of the present disclosure, there is provided a control device of a near field communication device, applied to a first apparatus having a near field communication function, comprising:
the mode determining module is used for determining a target communication mode corresponding to the target display interface in a near field communication mode corresponding to the near field communication function when the first equipment is positioned on the target display interface;
and the mode control module is used for closing other communication modes except the target communication mode in the near field communication mode when receiving a first control operation aiming at the target display interface so as to enable the first device to establish communication connection with the second device based on the target communication mode.
According to a third aspect of the present disclosure, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method described above.
According to a fourth aspect of the present disclosure, there is provided an electronic apparatus, comprising:
a processor; and
and a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the methods described above.
According to the control method of the near field communication device, when the first equipment is located on the target display interface, the target function mode which is needed to be used by a user when the first equipment is located on the target display interface can be judged, the target function mode is reserved, other function modes are closed, and therefore communication connection between the first equipment and the second equipment can be established based on the target communication mode. By the method, only the target function mode can be reserved when the first equipment is positioned on the target display interface. Therefore, when the near field communication function of the first device is in the target display interface, the condition that communication connection different from the user requirement is established between the near field communication function of the first device and the second device based on other function modes can be avoided, and the accuracy of the established communication connection is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 illustrates a schematic diagram of an exemplary system architecture to which embodiments of the present disclosure may be applied;
FIG. 2 shows a schematic diagram of an electronic device to which embodiments of the present disclosure may be applied;
fig. 3 is a schematic diagram showing a polling period of an NFC device polling operation in the related art;
fig. 4 schematically illustrates a flowchart of a control method of a near field communication device in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a schematic diagram of generating preset controls on a target display interface in an exemplary embodiment of the present disclosure;
fig. 6 schematically illustrates a flowchart of another control method of a near field communication device in an exemplary embodiment of the present disclosure;
Fig. 7 schematically illustrates a composition diagram of a control device of a near field communication device in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 shows a schematic diagram of a system architecture of an exemplary application environment in which a control method and apparatus of a near field communication device of an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of the terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others. The terminal devices 101, 102, 103 may be near field communication enabled terminal devices including, but not limited to, desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 105 may be a server cluster formed by a plurality of servers.
The control method of the near field communication device provided by the embodiments of the present disclosure is generally performed in the terminal apparatuses 101, 102, 103, and accordingly, the control device of the near field communication device is generally provided in the terminal apparatuses 101, 102, 103. However, it is easily understood by those skilled in the art that the control method of the near field communication device provided in the embodiment of the present disclosure may be performed by the server 105, and accordingly, the control device of the near field communication device may also be disposed in the server 105, which is not particularly limited in the present exemplary embodiment. For example, in an exemplary embodiment, the terminal device 101, 102, 103 may determine the target communication mode according to whether the display interface is the target display interface, and control the other communication modes to be turned off; the server 105 may monitor the display interfaces of the terminal devices 101, 102, 103 to determine whether the current interface is a target display interface, and then issue a control instruction to the terminal devices 101, 102, 103 after determining the corresponding target communication mode, so as to close other communication modes except the target communication mode.
Exemplary embodiments of the present disclosure provide an electronic device for implementing a control method of a near field communication device, which may be one or more of the terminal devices 101, 102, 103 or the server 105 in fig. 1. The electronic device comprises at least a processor and a memory for storing executable instructions of the processor, the processor being configured to perform a control method of the near field communication device via execution of the executable instructions.
The configuration of the electronic device will be exemplarily described below using the mobile terminal 200 of fig. 2 as an example. It will be appreciated by those skilled in the art that the configuration of fig. 2 can also be applied to stationary type devices in addition to components specifically for mobile purposes. In other embodiments, mobile terminal 200 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. The interfacing relationship between the components is shown schematically only and does not constitute a structural limitation of the mobile terminal 200. In other embodiments, the mobile terminal 200 may also employ a different interface from that of fig. 2, or a combination of interfaces.
As shown in fig. 2, the mobile terminal 200 may specifically include: processor 210, internal memory 221, external memory interface 222, universal serial bus (Universal Serial Bus, USB) interface 230, charge management module 240, power management module 241, battery 242, antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 271, receiver 272, microphone 273, headset interface 274, sensor module 280, display screen 290, camera module 291, indicator 292, motor 293, keys 294, and subscriber identity module (subscriber identification module, SIM) card interface 295, and the like. Wherein the sensor module 280 may include a depth sensor 2801, a pressure sensor 2802, a gyro sensor 2803, and the like.
Processor 210 may include one or more processing units such as, for example: the processor 210 may include an application processor (Application Processor, AP), a modem processor, a graphics processor (Graphics Processing Unit, GPU), an image signal processor (Image Signal Processor, ISP), a controller, a video codec, a digital signal processor (Digital Signal Processor, DSP), a baseband processor, and/or a Neural network processor (Neural-Network Processing Unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The NPU is a Neural-Network (NN) computing processor, and can rapidly process input information by referencing a biological Neural Network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the mobile terminal 200 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc. In some embodiments, the NPU may be used to identify whether the first device is in the target display interface. For example, the target display interface may be set to a display interface that includes a specific feature, at which time it may be identified from the NPU whether the current display of the first device includes the specific feature to determine whether the first device is on the target display interface.
The processor 210 has a memory disposed therein. The memory may store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transfer instructions, and notification instructions, and are controlled to be executed by the processor 210.
The charge management module 240 is configured to receive a charge input from a charger. The power management module 241 is used for connecting the battery 242, the charge management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and/or the charge management module 240 and provides power to the processor 210, the internal memory 221, the display 290, the camera module 291, the wireless communication module 260, and the like.
The wireless communication function of the mobile terminal 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like. Wherein the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals; the mobile communication module 250 may provide a solution including 2G/3G/4G/5G wireless communication applied to the mobile terminal 200; the modem processor may include a modulator and a demodulator.
The wireless communication module 260 may provide solutions for wireless communication including wireless local area network (Wireless Local Area Networks, WLAN) (e.g., wireless fidelity (Wireless Fidelity, wi-Fi) network), bluetooth (BT), etc., as applied on the mobile terminal 200. In some embodiments, antenna 1 and mobile communication module 250 of mobile terminal 200 are coupled, and antenna 2 and wireless communication module 260 are coupled, so that mobile terminal 200 may communicate with a network and other devices through wireless communication techniques.
The mobile terminal 200 implements display functions through a GPU, a display screen 290, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 290 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
The mobile terminal 200 may implement a photographing function through an ISP, a camera module 291, a video codec, a GPU, a display screen 290, an application processor, and the like. The ISP is used for processing the data fed back by the camera module 291; the camera module 291 is used for capturing still images or videos; the digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals; video codec is used to compress or decompress digital video, and the mobile terminal 200 may also support one or more video codecs.
The external memory interface 222 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the mobile terminal 200. The external memory card communicates with the processor 210 via an external memory interface 222 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 221 may be used to store computer executable program code that includes instructions. The internal memory 221 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created during use of the mobile terminal 200, and the like. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (Universal Flash Storage, UFS), and the like. The processor 210 performs various functional applications of the mobile terminal 200 and data processing by executing instructions stored in the internal memory 221 and/or instructions stored in a memory provided in the processor.
The mobile terminal 200 may implement audio functions through an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, an application processor, and the like. Such as music playing, recording, etc.
The depth sensor 2801 is used to acquire depth information of a scene; the pressure sensor 2802 is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal; the gyro sensor 2803 may be used to determine a motion gesture of the mobile terminal 200. In addition, sensors for other functions, such as an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., may be provided in the sensor module 280 according to actual needs.
Other devices that provide auxiliary functionality may also be included in mobile terminal 200. For example, the keys 294 include a power-on key, a volume key, etc., by which a user can generate key signal inputs related to user settings and function controls of the mobile terminal 200. As another example, indicator 292, motor 293, SIM card interface 295, and the like.
In addition, the mobile terminal 200 is provided with an NFC module 296 and an auxiliary device of the NFC module, for performing near field communication with other devices. The NFC module 296 may establish a communication connection with the NFC modules of other devices in different communication modes by sending out or receiving a radio frequency field. For example, information in an analog card may be read by a card reader mode; for another example, data transmission with other devices may be performed via a point-to-point transmission mode.
The analog card switching method and the analog card switching apparatus according to the exemplary embodiments of the present disclosure are specifically described below.
In the related art, when a terminal device uses an NFC device to communicate, multiple functional modes of the NFC device are often switched by means of time slice polling. Fig. 3 shows one polling period when the NFC device includes three near field communication modes. During a polling period, the NFC device is operated in a plurality of near field communication modes in turn according to time slices. After one polling period is over, the next period is entered, and the cycle is repeated. Based on the above polling scheme, when two NFC devices are close to each other, both may be in any of a variety of functional modes. In this case, it is likely that the communication connection cannot be established, or that the established communication connection is random. For example, where two NFC devices support a card reader mode, a card emulation mode, and a point-to-point transmission mode, the two devices may establish a communication connection in the card reader-card emulation mode, and possibly in the point-to-point transmission mode. In addition, a situation may occur in which a connection cannot be established.
For the above reasons, in the near field communication function used by the user, there is a high possibility that the communication connection that the user needs to use is different from the actual establishment of the communication connection. For example, users now need to establish a point-to-point transmission mode of the communication connection for data transmission, but the randomly established communication connection is a card reader-card emulation mode of the communication connection. At this time, the user is required to disconnect the communication connection of the card reader-card simulation mode and then to re-perform the random establishment process. In extreme cases, even after the user disconnects multiple times and re-performs the random establishment process multiple times, the communication connection in the point-to-point transmission mode still cannot be established.
In view of one or more of the above problems, the present exemplary embodiment provides a control method of a near field communication device, which may be applied to a first apparatus having a near field communication function. The first device may be a mobile phone, a tablet computer, a wearable device, etc. Referring to fig. 4, the control method of the near field communication device may include the following steps S410 and S420:
in step S410, when the first device is at the target display interface, a target communication mode corresponding to the target display interface is determined in the near field communication mode corresponding to the near field communication function.
The near field communication mode corresponding to the NFC function may include at least one of a card reader mode, a card analog mode, a point-to-point transmission mode, or a combination of multiple modes. In some embodiments, the near field communication mode corresponding to the NFC function may further include more communication modes, which is not particularly limited in this disclosure.
In an exemplary embodiment, the NFC functionality is typically used for data exchange between two terminal devices in close proximity to each other, the near field communication modes being different for different uses of the exchanged data. For example, when transmitting data such as a file and a picture, it is necessary to transmit the data in a point-to-point transmission mode. Therefore, before executing the control method of the present disclosure, a corresponding relationship between the display interface and the near field communication mode may be established according to different data contents included in the display interface, so that the near field communication mode required by the user may be determined according to the display interface where the first device is located. For example, a correspondence relationship between a display interface including picture data and file data and a peer-to-peer transmission mode may be established, and when the first device is in a target display interface including picture data, the target communication mode may be determined to be the peer-to-peer transmission mode based on the established correspondence relationship.
When the corresponding relation is established, the method can be performed by setting the identification. Specifically, different identifiers may be set for each near field communication mode, so as to identify the target display interface corresponding to each near field communication mode. When the current display interface of the first device is provided with the identifier, the first device can be determined to be in the target display interface, and then the corresponding target communication mode can be determined according to different identifiers. For example, a digital identifier "1" is set for the peer-to-peer transmission mode, pages such as a picture page, an address book page and the like which possibly need to be subjected to data transmission in the peer-to-peer transmission mode are marked in advance by the digital identifier "1", and when a mobile phone enters the pages such as the picture page, the address book page and the like, the page can be identified as a target display interface corresponding to the peer-to-peer transmission mode; the corresponding relation between each near field communication mode and the display interface can be established by limiting the characteristics of the display interface.
During control, whether the display interface characteristics in the current display interface of the first device meet the conditions of each near field communication mode or not can be identified and judged through devices such as NPU, and then the target communication mode is determined according to identification and judgment results. For example, the target display interface corresponding to the card simulation mode may be defined as a display interface including a feature of simulating a card. At this time, when the current display interface of the first device includes the feature of simulating the card, it may be determined that the first device is in the target display interface corresponding to the card simulation mode, and further it is determined that the target communication mode is the card simulation mode; in addition, the target display interface may be defined in other ways, which is not particularly limited by the present disclosure.
When the correspondence is established, the establishment is required based on the content contained in the display interface, so that the communication connection established based on the target communication mode can process the content contained in the corresponding target display interface. For example, when the content included in the target display interface of the first device is an analog card, only when the first device is in the card analog mode, other NFC devices can read the information of the analog card, that is, only the card analog mode can process the analog card; if the target communication mode corresponding to the target display interface including the analog card is set to be the point-to-point transmission mode, other NFC devices cannot read the analog card information, so that the point-to-point transmission mode cannot process the analog card.
In step S420, when a first control operation for the target display interface is received, other communication modes than the target communication mode in the near field communication mode are turned off, so that the first device establishes a communication connection with the second device based on the target communication mode.
In an exemplary embodiment, when the user needs to process the content included in the target display interface through the NFC function, the first control operation for the target display interface may be performed while the first device is still in the target display interface. The first control operation for the target display interface may include touch operations such as clicking and sliding performed by the user on the target display interface on the screen when the first device is located on the target display interface; and may also include user manipulation of the first device while the first device is in the target display interface. For example, when the first device is in the target display interface, a pressing operation of a key set on the first device by a user, or the like.
It should be noted that, in some embodiments, the first control operation may further include an operation of a preset control on the target display interface on the display screen by the user. At this time, when the first device is located on the target display interface, a preset control may be generated on the target display interface, so that a user may operate the preset control, and further determine that the user needs to process content included in the target display interface based on the near field communication function. For example, referring to fig. 5, an "N" shaped preset control 501 may be generated on the target display interface, and when the user performs a touch operation on the "N" shaped preset control, it may be determined that the user needs to process the content included in the target display interface based on the near field communication function, so as to close other communication modes except the target communication mode.
In an exemplary embodiment, the target communication mode may be a point-to-point transmission mode in a near field communication mode. In this case, since the first device only retains the point-to-point transmission mode at this time, if the first device establishes a communication connection with the second device based on the point-to-point transmission mode, the content included in the target display interface can be directly transmitted to the second device. In this way, the communication mode for establishing the connection and the content of the transmission can be determined simultaneously by the first control operation, and the communication transmission can be directly performed, thereby simplifying the operation steps.
It should be noted that, in some embodiments, after the communication mode of establishing the connection is determined through the first control operation, the content included in the target display interface may be confirmed through the second control operation, and then the confirmed content is transmitted in a communication manner.
Further, in an exemplary embodiment, the other communication modes than the target communication mode in the near field communication mode may be automatically restored after the transmission of the content included in the target display interface is completed. After the user's requirement for the target display interface (transmitting the content contained in the target display interface) ends, the user may need to perform other processing based on other near field communication modes, so after the content transmission of the target display interface ends, the other communication modes that have been closed before can be restored, and the influence on the user to perform other processing according to the other communication modes is avoided.
In an exemplary embodiment, since the target communication mode is used to support the first device to process the content included in the target display interface based on the target communication mode, when the first device closes the target display interface, it is indicated that the user does not need to process the content included in the target display interface. At this time, other communication modes which have been previously closed can be restored, avoiding affecting the need for the user to perform other processing according to the other communication modes.
In an exemplary embodiment, if the first device is always on the target display interface, it is also possible that the user does not need to process the content included in the target display interface based on the near field communication function. For example, the user need not transfer an open file, but rather browse the file. In this case, a preset time may be set, and when the first device is in the target display interface for the preset time, the first device still does not establish a communication connection based on the target communication mode, which may be that the user does not need to process the content included in the target display interface based on the near field communication function, so that other communication modes that have been closed before are restored, and the user is prevented from being influenced by other processing according to the other communication modes.
In an exemplary embodiment, the power consumption of the NFC device is different in different near field communication modes. For example, when the NFC device is in a card reader mode, the corresponding maximum current may reach 200-300 mA, while when the NFC device is in a card emulation mode or in a listening-only state, the current is typically below 50 uA. Based on the above, a near field communication mode with smaller power consumption may be selected as the preset communication mode, for example, a card simulation mode, and when the electric quantity of the first device is smaller than the preset electric quantity, the preset communication mode is turned on, and other communication modes except the preset communication mode in the near field communication mode are turned off. At this time, the first device only maintains the preset communication mode with smaller power consumption, so that the power consumption is smaller, and the situation that the first device is forced to be turned off due to larger power consumption of the NFC device can be avoided to a certain extent.
In addition, when the first device is in the target display interface, if the first control operation for the target display interface is not received, the near field communication mode can still work in turn in a polling mode, so that the first device can still establish communication connection with other devices at random.
It should be noted that, the above control method may be performed based on the authorization of the user, that is, the user performs authorization on the first device, which indicates that the first device may execute the control method provided in the present disclosure only after the user agrees that the first device may execute the control method.
The following describes in detail a technical solution of an embodiment of the present disclosure with reference to fig. 6 by taking a mobile phone as a first device as an example.
Step S602, obtaining a current display interface of a mobile phone;
step S604, detecting whether the current display interface of the mobile phone is a target display interface;
step S606, when the mobile phone is positioned on the target display interface, a preset control is generated on the target display interface, and a target communication mode is determined in a near field communication mode according to the target display interface; assuming that the target communication mode is a point-to-point transmission mode;
step S608, determining whether a first control operation of the user on the preset control is received;
Step S610, when a first control operation of a user on a preset control is not received, the near field communication mode can still work in turn in a polling mode;
step S612, when a first control operation of a user on a preset control is received, other communication modes except a point-to-point transmission mode in the near field communication mode are closed, so that the mobile phone can establish communication connection with other mobile phones through the point-to-point transmission mode;
it should be noted that the above functions may be implemented according to a specific instruction issued, for example, the mobile phone may be enabled to turn off other communication modes besides the peer-to-peer transmission mode by an instruction of "2103050282018301- = (re_discover_cmd) = -"
Step S614, detecting whether the mobile phone exits the target display interface;
step S616, when the mobile phone does not exit the target display interface and establishes communication connection with other mobile phones based on point-to-point transmission, transmitting the content included in the target display interface to the other mobile phones;
it should be noted that, whether the mobile phone establishes the communication connection based on the point-to-point transmission mode may be determined according to a specific instruction. For example, it may be determined by "0000028190LLCP:Conmection Commlete" that a handset has established a point-to-point transmission mode based communication connection with other handsets.
In step S618, when the mobile phone exits the target display interface, or after the mobile phone finishes transmitting the content included in the target display interface based on the peer-to-peer transmission mode, the other communication modes except the peer-to-peer transmission mode in the near field communication mode are restored.
After the user exits the target display interface or the transmission based on the point-to-point transmission mode is finished, a specific instruction can be issued to the NFC device to control the NFC device to resume other communication modes except the point-to-point transmission mode in the near field communication mode. For example, NCI instruction "2103150a0001010102010301800181018201830106017001- = (RF DISCOVER CIMD) = -" may be issued to the NFC device.
It should be noted that, in order to enable the mobile phone with only the peer-to-peer transmission mode to implement the near field communication function in a polling manner, the same information transmission start instruction as that in the related technical process may be reserved in the mobile phone with only the peer-to-peer transmission mode, that is, after the communication connection is successfully established and the preparation work for supporting the data transmission is completed, the information transmission start instruction is sent to other mobile phones, and after the information transmission start instruction is received by other mobile phones, the information can be received or sent normally. The instruction for starting transmission of information corresponding to the mobile phone with only the point-to-point transmission mode may be "000046472000910211487212910202637256425102046163010162005A2008016170706C69636174696F6E2F766E642E626C7565746F6F74682E65702E6F6F626208006425AB252ECO LLCP:Information", for example.
In summary, in this exemplary embodiment, on the one hand, the target communication mode is determined through the target display interface where the first device is located, and then other communication modes except for the target communication mode are closed, so that when communication connection needs to be established based on the target communication mode, erroneous establishment of communication connection based on other communication modes can be avoided, and accuracy of establishing communication connection is improved; on the other hand, when the target communication mode is a point-to-point transmission mode, the transmission can be completed only by initiating the first control operation for the target display interface by a user, and compared with the related art, the operation steps in the point-to-point transmission mode can be simplified; in addition, by reserving the control instruction in the related technology, the first device using the technical scheme of the disclosure can be mutually compatible with other devices using the related technology, and the problems of data transmission failure and the like caused by incompatibility are avoided.
It is noted that the above-described figures are merely schematic illustrations of processes involved in a method according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Further, referring to fig. 7, in this exemplary embodiment, there is further provided a control device 700 of a near field communication device, which is applied to a first apparatus having a near field communication function, and the device includes a mode determining module 710 and a mode controlling module 720. Wherein:
the mode determining module 710 may be configured to determine, when the first device is at the target display interface, a target communication mode corresponding to the target display interface in a near field communication mode corresponding to the near field communication function.
The mode control module 720 may be configured to, when receiving a first control operation for a target display interface, close other communication modes, except the target communication mode, in the near field communication mode, so that the first device establishes a communication connection with the second device based on the target communication mode.
In an exemplary embodiment, the mode determination module 710 may be configured to generate a preset control on the target display interface when the first device is at the target display interface.
In an exemplary embodiment, the control device 700 of the near field communication device may further include a data transmission module, which may be configured to transmit the content included in the target display interface to the second device in response to the first device establishing a communication connection with the second device based on the point-to-point transmission mode.
In an exemplary embodiment, the data transmission module may be further configured to transmit content included in the target display interface to the second device after receiving the second control operation for the target display interface.
In an exemplary embodiment, the mode control module 720 may be configured to resume other communication modes in the near field communication mode than the target communication mode after the transmission of the content included in the target display interface is completed.
In an exemplary embodiment, the mode control module 720 may be configured to resume other communication modes of the near field communication mode than the target communication mode in response to the first device closing the target display interface.
In an exemplary embodiment, the mode control module 720 may be configured to restore other communication modes in the near field communication mode than the target communication mode when the first device does not establish the communication connection based on the target communication mode within the preset time.
In an exemplary embodiment, the mode control module 720 may be configured to turn on the preset communication mode and turn off other communication modes in the near field communication mode than the preset communication mode in response to the power of the first device being less than the preset power.
The specific details of each module in the above apparatus are already described in the method section, and the details that are not disclosed can be referred to the embodiment of the method section, so that they will not be described in detail.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
Exemplary embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device, e.g. any one or more of the steps of fig. 4 or 6 may be carried out.
It should be noted that the computer readable medium shown in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Furthermore, the program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (9)

1. A control method of a near field communication device, applied to a first apparatus having a near field communication function, comprising:
when the first equipment is positioned on a target display interface, determining a target communication mode corresponding to the target display interface in a near field communication mode corresponding to the near field communication function, wherein the corresponding relation between the display interface and the communication mode is established based on the content contained in the display interface; the target display interface is determined according to the identification of the current display interface of the first device or according to the characteristic that the current display interface of the first device contains a simulation card;
when the first device is still in the target display interface and a first control operation for the target display interface is received, determining that a user processes content included in the target display interface based on the near field communication function, closing other communication modes except the target communication mode in the near field communication mode, enabling the first device to establish communication connection with a second device based on the target communication mode, and processing the content included in the target display interface;
The target communication mode comprises a point-to-point transmission mode;
after the switching off of the other communication modes of the near field communication mode than the target communication mode, the method further comprises:
transmitting content included in the target display interface to the second device in response to the first device establishing a communication connection with the second device based on the point-to-point transmission mode;
before the transmitting the content included in the target display interface to the second device, the method further includes:
transmitting content included in the target display interface to the second device after receiving a second control operation for the target display interface;
the method further comprises the steps of:
and if the first control operation aiming at the target display interface is not received, enabling the near field communication mode to work in turn in a polling mode so as to ensure that the first equipment can still establish communication connection with other equipment randomly.
2. The method of claim 1, wherein the first control operation comprises an operation on a preset control on the target display interface, the method further comprising:
And when the first equipment is positioned on a target display interface, generating a preset control on the target display interface.
3. The method according to claim 1, wherein the method further comprises:
and after the transmission of the content included in the target display interface is finished, recovering other communication modes except the target communication mode in the near field communication mode.
4. The method according to claim 1, wherein the method further comprises:
and responding to the first equipment closing the target display interface, and recovering other communication modes except the target communication mode in the near field communication mode.
5. The method according to claim 1, wherein after said switching off other of said near field communication modes than said target communication mode, said method further comprises:
and when the first equipment does not establish communication connection based on the target communication mode within a preset time, recovering other communication modes except the target communication mode in the near field communication mode.
6. The method according to claim 1, wherein the method further comprises:
and responding to the fact that the electric quantity of the first equipment is smaller than a preset electric quantity, starting a preset communication mode, and closing other communication modes except the preset communication mode in the near field communication mode.
7. A control device of a near field communication device, applied to a first apparatus having a near field communication function, characterized by comprising:
the mode determining module is used for determining a target communication mode corresponding to a target display interface in a near field communication mode corresponding to the near field communication function when the first device is located on the target display interface, wherein the corresponding relation between the display interface and the communication mode is established based on content contained in the display interface; the target display interface is determined according to the identification of the current display interface of the first device or according to the characteristic that the current display interface of the first device contains a simulation card;
the mode control module is used for determining that a user processes content included in the target display interface based on the near field communication function when the first device is still in the target display interface and receives a first control operation for the target display interface, closing other communication modes except the target communication mode in the near field communication mode, so that the first device establishes communication connection with a second device based on the target communication mode, and processes the content included in the target display interface;
The target communication mode comprises a point-to-point transmission mode;
after the switching off of the other communication modes of the near field communication modes than the target communication mode, the control means of the near field communication device is further configured to:
transmitting content included in the target display interface to the second device in response to the first device establishing a communication connection with the second device based on the point-to-point transmission mode;
the control means of the near field communication device is further configured to, prior to said transferring content comprised by the target display interface to the second apparatus:
transmitting content included in the target display interface to the second device after receiving a second control operation for the target display interface;
the control means of the near field communication device is further configured to:
and if the first control operation aiming at the target display interface is not received, enabling the near field communication mode to work in turn in a polling mode so as to ensure that the first equipment can still establish communication connection with other equipment randomly.
8. A computer readable medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any one of claims 1 to 6.
9. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any one of claims 1 to 6 via execution of the executable instructions.
CN202011126376.9A 2020-10-20 2020-10-20 Control method and device of near field communication device, medium and electronic equipment Active CN112188461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011126376.9A CN112188461B (en) 2020-10-20 2020-10-20 Control method and device of near field communication device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011126376.9A CN112188461B (en) 2020-10-20 2020-10-20 Control method and device of near field communication device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112188461A CN112188461A (en) 2021-01-05
CN112188461B true CN112188461B (en) 2023-07-25

Family

ID=73922366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011126376.9A Active CN112188461B (en) 2020-10-20 2020-10-20 Control method and device of near field communication device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112188461B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115694562A (en) * 2021-07-26 2023-02-03 华为技术有限公司 Information transmission method and medium between terminal devices and terminal device
CN113660149B (en) * 2021-08-13 2023-08-01 Oppo广东移动通信有限公司 Equipment control method and device, storage medium and electronic equipment
CN115623118B (en) * 2022-11-22 2023-10-20 荣耀终端有限公司 Near field communication control method and electronic equipment
CN117749936A (en) * 2024-02-19 2024-03-22 花瓣支付(深圳)有限公司 Display method, electronic device and computer storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111212412A (en) * 2020-01-03 2020-05-29 RealMe重庆移动通信有限公司 Near field communication method and device, computer readable storage medium and electronic equipment

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8855557B2 (en) * 2012-01-27 2014-10-07 Blackberry Limited Mobile communications device providing enhanced near field communication (NFC) mode switching features and related methods
CN102832977A (en) * 2012-09-04 2012-12-19 深圳盈烨创新通讯技术有限公司 Method for rapidly switching multiple operating modes of near-field communication equipment
CN104252631B (en) * 2013-06-25 2017-12-29 神讯电脑(昆山)有限公司 The control method of electronic installation and the electronic installation
US9603090B2 (en) * 2013-08-08 2017-03-21 Apple Inc. Management of near field communications using low power modes of an electronic device
US9998176B2 (en) * 2014-08-11 2018-06-12 Qualcomm Incorporated Near field communication mode adjustment based on a screen state
CN105472534A (en) * 2014-09-24 2016-04-06 西安酷派软件科技有限公司 Switching method and switching system of NFC working mode and terminal
AU2016422505B2 (en) * 2016-09-06 2020-07-16 Huawei Technologies Co., Ltd. Data sharing method and terminal
CN106231545A (en) * 2016-09-21 2016-12-14 广东欧珀移动通信有限公司 Reduce the method and device of near-field communication module power consumption
CN107071704A (en) * 2017-03-22 2017-08-18 深圳市金立通信设备有限公司 The open method and device of the mode of operation of NFC chip
CN110795949A (en) * 2019-09-25 2020-02-14 维沃移动通信(杭州)有限公司 Card swiping method and device, electronic equipment and medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111212412A (en) * 2020-01-03 2020-05-29 RealMe重庆移动通信有限公司 Near field communication method and device, computer readable storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112188461A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN112188461B (en) Control method and device of near field communication device, medium and electronic equipment
KR102630452B1 (en) Method and Apparatus for Establishing Device Connection
US20200037144A1 (en) Method and apparatus for establishing device connection
CN105224494A (en) Method for handover control and device
WO2022001343A1 (en) Output signal control method for nfc apparatus, and terminal device, medium and electronic device
US20220408164A1 (en) Method for editing image on basis of gesture recognition, and electronic device supporting same
CN113238727A (en) Screen switching method and device, computer readable medium and electronic equipment
CN111968641B (en) Voice assistant awakening control method and device, storage medium and electronic equipment
JP2022528628A (en) Automatic routing method for SE and electronic devices
KR20200098068A (en) Method for recommending word and apparatus thereof
CN113766127B (en) Mobile terminal control method and device, storage medium and electronic equipment
US20170251504A1 (en) Apparatus and method for requesting and transferring contents
EP4167072A1 (en) Method for opening file, and device
CN114489422A (en) Display method of sidebar and electronic equipment
CN113455013B (en) Electronic device for processing image and image processing method thereof
CN111492678A (en) File transmission method and electronic equipment
CN111770484B (en) Analog card switching method and device, computer readable medium and mobile terminal
CN113407318B (en) Operating system switching method and device, computer readable medium and electronic equipment
CN112020054B (en) Communication method and device, computer readable medium and electronic equipment
EP3758384B1 (en) Method for controlling video sharing through rich communication suite service and electronic device therefor
CN111757005A (en) Shooting control method and device, computer readable medium and electronic equipment
CN104486390A (en) Method and device for sharing data
CN111886595A (en) Screen control method and electronic device supporting the same
CN112667321A (en) Quick application starting method and device, storage medium and electronic equipment
CN113220255A (en) Screen control method and device, computer readable medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant