CN109302669B - Polling mechanism setting method and device, storage medium and electronic equipment - Google Patents

Polling mechanism setting method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN109302669B
CN109302669B CN201811070356.7A CN201811070356A CN109302669B CN 109302669 B CN109302669 B CN 109302669B CN 201811070356 A CN201811070356 A CN 201811070356A CN 109302669 B CN109302669 B CN 109302669B
Authority
CN
China
Prior art keywords
communication standard
polling
nfc
time period
target
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
CN201811070356.7A
Other languages
Chinese (zh)
Other versions
CN109302669A (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201811070356.7A priority Critical patent/CN109302669B/en
Publication of CN109302669A publication Critical patent/CN109302669A/en
Application granted granted Critical
Publication of CN109302669B publication Critical patent/CN109302669B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a method and a device for setting a polling mechanism, a storage medium and electronic equipment. The method is applied to the electronic equipment and comprises the following steps: acquiring geographical position information of the electronic equipment; determining a target polling mechanism corresponding to the geographical position information, wherein the target polling mechanism is a working mechanism in a polling stage of Near Field Communication (NFC); and setting the electronic equipment according to the target polling mechanism so as to apply the target polling mechanism to the NFC polling phase of the electronic equipment. The method and the device can improve the flexibility of the electronic equipment for NFC polling.

Description

Polling mechanism setting method and device, storage medium and electronic equipment
Technical Field
The application belongs to the technical field of near field communication, and particularly relates to a method and a device for setting a polling mechanism, a storage medium and electronic equipment.
Background
Near Field Communication (NFC) is a short-range, high-frequency wireless Communication technology that allows contactless data transmission between electronic devices. The communication standard adopted by the NFC technology includes Type a communication standard, Type B communication standard, and Type F communication standard. The Polling phase and Listening phase may constitute a complete duty cycle of NFC. In the related art, a polling mechanism used by an electronic device supporting the NFC technology in a polling phase is to periodically transmit signals (perform polling) according to three types of communication standards, namely Type a, Type B and Type F, so as to search for a nearby NFC device. However, such a polling mechanism has poor flexibility, i.e., the electronic device has poor flexibility for NFC polling.
Disclosure of Invention
The embodiment of the application provides a method and a device for setting a polling mechanism, a storage medium and an electronic device, which can improve the flexibility of NFC polling of the electronic device.
The embodiment of the application provides a method for setting a polling mechanism, which is applied to electronic equipment and comprises the following steps:
acquiring geographical position information of the electronic equipment;
determining a target polling mechanism corresponding to the geographic position information, wherein the target polling mechanism is a working mechanism in a polling stage of Near Field Communication (NFC);
and setting the electronic equipment according to the target polling mechanism so as to apply the target polling mechanism to an NFC polling stage of the electronic equipment.
The embodiment of the application provides a setting device of a polling mechanism, which is applied to electronic equipment and comprises:
the acquisition module is used for acquiring the geographical position information of the electronic equipment;
the determining module is used for determining a target polling mechanism corresponding to the geographic position information, wherein the target polling mechanism is a working mechanism in a polling stage of Near Field Communication (NFC);
and the setting module is used for setting the electronic equipment according to the target polling mechanism so as to apply the target polling mechanism to the NFC polling stage of the electronic equipment.
An embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute a setting method of a polling mechanism provided in an embodiment of the present application.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the setting method of the polling mechanism provided in the embodiment of the present application by calling the computer program stored in the memory.
It can be understood that, in the embodiment of the present application, the electronic device may determine a corresponding target polling mechanism according to a geographic location of the electronic device, and set the electronic device according to the target polling mechanism, so that the target polling mechanism is applied to an NFC polling phase of the electronic device. Since the present embodiment may determine different target polling mechanisms according to different geographic locations, the flexibility of the electronic device in performing NFC polling may be improved in the present embodiment.
Drawings
The technical solution and the advantages of the present invention will be apparent from the following detailed description of the embodiments of the present invention with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a setting method of a polling mechanism according to an embodiment of the present application.
Fig. 2 is another schematic flowchart of a setting method of a polling mechanism provided in an embodiment of the present application.
Fig. 3 to fig. 6 are schematic scene diagrams of a setting method of a polling mechanism according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of a setting apparatus of a polling mechanism provided in an embodiment of the present application.
Fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Fig. 9 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring now to the drawings, in which like numerals represent like elements, the principles of the present invention are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
It is understood that the execution subject of the embodiment of the present application may be an electronic device such as a smart phone or a tablet computer that supports the NFC technology.
Referring to fig. 1, fig. 1 is a schematic flowchart of a setting method of a polling mechanism according to an embodiment of the present application, where the flowchart may include:
101. geographical location information of the electronic device is obtained.
Near field communication NFC is a short-range, high-frequency wireless communication technology that allows contactless data transmission between electronic devices. The communication standard adopted by the NFC technology includes Type a communication standard, Type B communication standard, and Type F communication standard. The polling phase and listening phase may constitute one complete duty cycle of NFC. In the related art, a polling mechanism used by an electronic device supporting the NFC technology in a polling phase is to periodically transmit signals (perform polling) according to three types of communication standards, namely Type a, Type B and Type F, so as to search for a nearby NFC device. However, this polling mechanism is less flexible. That is, the electronic device has poor flexibility for NFC polling.
In 101 of this embodiment of the application, for example, an electronic device supporting the NFC technology may first acquire geographic location information of the electronic device.
102. And determining a target polling mechanism corresponding to the geographical position information, wherein the target polling mechanism is a working mechanism in a polling stage of Near Field Communication (NFC).
For example, after obtaining the geographic location information of the electronic device, the electronic device may determine a target polling mechanism corresponding to the geographic location information. The target polling mechanism is a working mechanism in a polling phase of NFC.
103. According to the target polling mechanism, the electronic equipment is set so as to apply the target polling mechanism to the NFC polling phase of the electronic equipment.
For example, after determining the target polling mechanism, the electronic device may set the electronic device according to the target polling mechanism, so as to apply the target polling mechanism to an NFC polling phase of the electronic device.
In practical applications, there are differences in NFC communication standards adopted in different countries or regions. For example, the NFC communication standard adopted in the first region includes three types of communication standards, Type a, Type B, and Type F. Then, the first target polling mechanism corresponding to the first zone may be to periodically transmit signals according to three communication standards, Type a, Type B, and Type F, during the NFC polling phase to search for nearby NFC devices. And the NFC communication standard adopted by the zone B only includes Type a and Type B communication standards, and does not adopt Type F communication standard. Then, the second target polling mechanism corresponding to the zone of ethyl may be to periodically transmit signals according to both Type a and Type B communication standards during the NFC polling phase to search for nearby NFC devices.
That is, when the electronic device is located in the first region, the electronic device may acquire the first target polling mechanism corresponding to the first region, and perform the NFC polling phase according to the first target polling mechanism. When the electronic device is located in the zone, the electronic device may acquire a second target polling mechanism corresponding to the zone, and perform the NFC polling phase according to the second target polling mechanism.
It can be understood that, in the embodiment of the present application, the electronic device may determine a corresponding target polling mechanism according to a geographic location of the electronic device, and set the electronic device according to the target polling mechanism, so that the target polling mechanism is applied to an NFC polling phase of the electronic device. Since the present embodiment may determine different target polling mechanisms according to different geographic locations, the flexibility of the electronic device in performing NFC polling may be improved in the present embodiment.
Referring to fig. 2, fig. 2 is another schematic flow chart of a setting method of a polling mechanism according to an embodiment of the present application, where the flow chart may include:
201. the electronic equipment acquires the geographical position information of the electronic equipment.
For example, the electronic device may first obtain the geographical location information of the electronic device.
202. The electronic equipment determines a first communication standard adopted by a region corresponding to the geographic position information, wherein the first communication standard is at least one of NFC communication standards.
For example, after obtaining the geographic location information, the electronic device may determine a first communication standard adopted by a region corresponding to the geographic location information. Wherein the first communication standard is at least one of NFC communication standards.
For example, in the related art, the communication standards adopted by NFC include a Type a communication standard, a Type B communication standard, and a Type F communication standard. Then, the first communication standard may include one or more of Type a, Type B, and Type F.
For example, the geographic location where the electronic device is located is hong Kong. And the NFC communication standard adopted by hong kong is Type F communication standard. That is, the first communication standard is a Type F communication standard.
203. According to the first communication standard, the electronic equipment determines a second communication standard, wherein the second communication standard is an NFC communication standard which is not adopted in a region corresponding to the geographic position information.
For example, after determining the first communication standard, the electronic device may determine the second communication standard accordingly. The second communication standard is an NFC communication standard which is not adopted in a region corresponding to the geographical position information of the electronic equipment. For example, hong kong has only adopted the Type F communication standard, and has not adopted the Type a and Type B communication standards. Then, the second communication standard determined by the electronic device includes Type a and Type B communication standards.
After determining the first communication standard and the second communication standard of the geographical location where the electronic device is located, the electronic device may determine the target polling mechanism for the NFC polling phase accordingly. In one embodiment, after 203, the electronic device may perform 204 the flow. In another embodiment, after 203, the electronic device may also perform 205 the process.
204. The electronic equipment resets the working mechanism of the target time period to be polled according to the first communication standard so as to obtain a target polling mechanism, wherein the target time period is a time period used for polling according to the second communication standard in the NFC polling stage.
For example, after determining the first communication standard and the second communication standard, the electronic device may reset the operation mechanism of the target time period to perform polling according to the first communication standard, so as to obtain the target polling mechanism. The target time period is a time period used for polling according to a second communication standard in the NFC polling phase.
For example, the first communication standard is a Type F communication standard, and the second communication standard is Type a and Type B communication standards. Originally, the electronic equipment carries out polling work according to Type A, Type B and Type F communication standard in proper order at the NFC polling stage. In this embodiment, because the area where the electronic device is currently located does not adopt the Type a and Type B communication standards, in this embodiment, the electronic device may reset the time period originally used for polling according to the Type a and Type B communication standards in the polling phase to polling according to the Type F communication standard, so as to obtain the target polling mechanism.
It is to be understood that, in the above-described embodiment, since the time period originally used for polling according to the Type a and Type B communication standards is reset to polling according to the Type F communication standard, the entire NFC polling phase becomes polling according to the Type F communication standard. This can read the NFC device or card that adopts Type F communication standard more rapidly.
205. And the electronic equipment allocates the target time period to the listening stage of the NFC so as to cancel polling according to the second communication standard and obtain a target polling mechanism.
For example, after determining the first communication standard and the second communication standard, the electronic device may assign the target time period to a listening phase of NFC. The target time period is a time period used for polling according to a second communication standard in the NFC polling phase. It can be understood that, after the target time period is allocated to the listening phase of NFC, the electronic device cancels the polling operation according to the second communication standard in the NFC polling phase.
For example, the first communication standard is a Type F communication standard, and the second communication standard is Type a and Type B communication standards. Originally, the electronic equipment carries out polling work according to Type A, Type B and Type F communication standard in proper order at the NFC polling stage. In this embodiment, because the area where the electronic device is currently located does not adopt the Type a and Type B communication standards, the electronic device in this embodiment may allocate, to the listening phase of the NFC, a time period originally used for polling according to the Type a and Type B communication standards in the polling phase, for performing a listening operation, thereby obtaining the target polling mechanism.
It is to be understood that, in the above embodiment, since the time period originally used for polling according to the Type a and Type B communication standards is allocated to the listening phase of NFC, the listening phase of NFC does not need to transmit signals like the polling phase of NFC. Thus, this approach may save power consumption of the electronic device.
206. The electronic equipment sets the electronic equipment according to a target polling mechanism so as to apply the target polling mechanism to an NFC polling stage of the electronic equipment.
For example, after obtaining the target polling mechanism, the electronic device may set the electronic device according to the target polling mechanism, so as to apply the target polling mechanism to an NFC polling phase of the electronic device.
For example, the NFC polling mechanism of the electronic device changes from polling according to Type a, Type B, and Type F communication standards in sequence to polling according to Type F communication standard only.
In one embodiment, the electronic device, when executing the process of 204, may perform:
the electronic equipment counts a first number of the first communication standards and a second number of the second communication standards;
if the first number is less than or equal to the second number, the electronic device resets the operating mechanism of the target time period to polling according to the first communication standard.
For example, after determining the communication standard adopted by the area corresponding to the geographic location information (i.e., the first communication standard) and the communication standard not adopted by the area (i.e., the second communication standard), the electronic device may count the number of the first communication standards (i.e., the first number) and the number of the second communication standards (i.e., the second number).
Thereafter, the electronic device may detect whether the first number is less than or equal to the second number. If it is detected that the first number is less than or equal to the second number, the electronic device may reset the operation mechanism of the target time period to perform polling according to the first communication standard, where the target time period is a time period used for polling according to the second communication standard in the NFC polling phase. For example, the first communication standard includes a Type F communication standard, the second communication standard includes Type a and Type B communication standards, and the first number of the first communication standard is 1 and the second number of the second communication standard is 2. In this case, the electronic device may reset the period of time for which polling was originally performed according to the Type a and Type B communication standards to be polled according to the Type F communication standard.
In an embodiment, when the electronic device performs the above-mentioned process of resetting the operation mechanism of the target time period to polling according to the first communication standard if the first number is smaller than the second number, the electronic device may perform:
if the first number is smaller than the second number and the first number is 1, the electronic device resets the working mechanism of the target time period to polling according to the first communication standard.
For example, in the case that the first number (of the first communication standard) is smaller than the second number (of the second communication standard), if the first number is 1, the electronic device may reset the operation mechanism of the target time period to perform polling according to the first communication standard.
It is easily understood that in the case where the first number is 1, for example, the first communication standard includes a Type F communication standard, and the second communication standard includes Type a and Type B communication standards. Because the target time periods originally used for polling according to the Type A and Type B communication standards can all be used for polling according to the Type F communication standard, the electronic device can reset the working mechanism of the target time periods to polling according to the first communication standard, and therefore the reading speed of the electronic device on the NFC device is improved.
In one embodiment, the electronic device, when executing the process of 205, may perform:
the electronic equipment counts a first number of the first communication standards and a second number of the second communication standards;
if the first number is greater than the second number, the electronic device allocates the target time period to a listening phase of the NFC.
For example, after determining the communication standard adopted by the area corresponding to the geographic location information (i.e., the first communication standard) and the communication standard not adopted by the area (i.e., the second communication standard), the electronic device may count the number of the first communication standards (i.e., the first number) and the number of the second communication standards (i.e., the second number).
Thereafter, the electronic device may detect whether the first number is less than or equal to the second number. If it is detected that the first number is greater than the second number, the electronic device may allocate a target time period to a listening phase of the NFC, where the target time period is a time period for polling according to a second communication standard in the NFC polling phase. For example, the first communication standard includes Type a and Type B communication standards, the second communication standard includes Type F communication standards, and the first number of the first communication standard is 2 and the second number of the second communication standard is 1. In this case, the electronic device may allocate a time period for which polling was originally performed according to the Type F communication standard to the listening phase of NFC for performing a listening operation.
It is readily understood that since the target time period is not conveniently allocated between the first communication standard(s) when the first number is larger than the second number, the electronic device may in this case allocate the time period originally polled according to the second communication standard to the listening phase of the NFC for listening operations. For example, if the first communication standard includes Type a and Type B communication standards and the second communication standard includes Type F communication standard, the target time period originally used for polling according to the Type F communication standard cannot be allocated to both the Type a and Type B communication standards, and therefore the electronic device may allocate the target time period to the listening phase of NFC, thereby reducing the power consumption of the electronic device.
In another embodiment, the electronic device may also alternate the target time period between the first communication standard if the first number is greater than the second number. For example, if the first communication standard includes Type a and Type B communication standards and the second communication standard includes Type F communication standard, the target time period originally used for polling according to the Type F communication standard may be alternately allocated for polling according to the Type a and Type B communication standards. For example, the target time period is allocated for polling according to the Type a communication standard this time, and is allocated for polling according to the Type B communication standard next time, and so on.
In still another embodiment, the electronic device may further decide whether to allocate the target time period to the NFC listening phase or reset the operation mechanism of the target time period to polling according to the first communication standard according to the amount of power of the electronic device. For example, the electronic device may allocate the target time period to the NFC listening phase when the remaining power of the electronic device is lower than the preset power threshold, so as to reduce the power consumption of the terminal. And under the condition that the residual electric quantity is not lower than the preset electric quantity threshold value, resetting the working mechanism of the target time period to poll according to the first communication standard, thereby improving the reading speed of the NFC equipment.
In an embodiment, the method and the device can adopt different polling mechanisms to perform NFC polling according to different geographic locations, and can further set a polling mechanism selection interface on the electronic device. The user can select any one of seven polling mechanisms that only carry out NFC polling according to the Type A communication standard, only carry out NFC polling according to the Type B communication standard, only carry out NFC polling according to the Type F communication standard, only carry out NFC polling according to the Type A and Type B communication standards, only carry out NFC polling according to the Type A and Type F communication standards, only carry out NFC polling according to the Type B and Type F communication standards, and carry out NFC polling according to the Type A, Type B and Type F communication standards on the interface. It will be appreciated that this approach may leave the user with the right to autonomously select the NFC polling mechanism.
Referring to fig. 3 to 6, fig. 3 to 6 are schematic views illustrating a scenario of a setting method of a polling mechanism according to an embodiment of the present application.
As shown in fig. 3, both the electronic device and the bus card support the NFC technology, wherein an application that can recharge the bus card is installed on the electronic device. For example, the user starts the application and the NFC function of the electronic device to prepare to recharge the bus card. At this time, the electronic device may first acquire the current geographic location information of the electronic device, and determine the NFC communication standard used in the area corresponding to the geographic location information. For example, the area where the electronic device is currently located is the first place, and the electronic device determines that the NFC communication standard adopted by the first place includes three types, namely, a Type a communication standard, a Type B communication standard, and a Type F communication standard, by querying the preset correspondence table. That is, any NFC device or card on the first place may communicate using the Type a communication standard, may communicate using the Type B communication standard, or may communicate using the Type F communication standard. In this case, the electronic device may sequentially perform polling according to the Type a communication standard, the Type B communication standard and the Type F communication standard in the polling phase of NFC to search for a nearby NFC device, where the NFC duty cycle of the electronic device may be as shown in fig. 4. For example, the bus card adopts the Type B communication standard for communication. Then, when the electronic device polls according to the Type B communication standard, the bus card can be searched. And then, the electronic equipment can carry out data transmission with the bus card, so that the recharging of the bus card is completed.
After that, the user carries the electronic device to the second place and starts the NFC function of the electronic device. At this time, the electronic device may obtain the current geographic location information, and determine the NFC communication standard used in the area corresponding to the geographic location information. For example, the area where the electronic device is currently located is the second place, and the electronic device determines that the NFC communication standard adopted by the second place only includes the Type F communication standard by querying the preset correspondence table. That is, the NFC device or card in the second place does not communicate using the Type a communication standard and the Type B communication standard. In this case, the electronic device may determine a Type F communication standard adopted by the second place as the first communication standard, and determine a Type a communication standard and a Type B communication standard not adopted by the second place as the second communication standard. After that, the electronic device may determine a time period for polling according to the Type a communication standard and the Type B communication standard in the NFC polling phase as a target time period, and reset an operating mechanism of the target time period, so as to obtain a target polling mechanism.
In one embodiment, the electronic device may reset the operating mechanism for the target time period to poll according to the first communication standard. For example, when located at the ethnic site, the electronic device may reset the time period originally used for polling according to the Type a communication standard and the Type B communication standard to polling according to the Type F communication standard. That is, the polling mechanism of the NFC polling phase of the electronic device changes from fig. 4 to fig. 5. That is, when the electronic device operates in the NFC polling phase, polling is performed only according to the Type F communication standard, and polling is not performed according to the Type a communication standard and the Type B communication standard when the electronic device is located at the ethnic site. As can be seen from fig. 5, this way improves the duty ratio of the polling duration according to the Type F communication standard in one NFC duty cycle.
In another embodiment, when the electronic device resets the operation mechanism of the target time period, the electronic device may also be in a listening phase in which the target time period is allocated to NFC. For example, when located at the ethnic site, the electronic device may allocate a time period originally used for polling according to the Type a and Type B communication standards to the listening phase, while cancelling polling according to the Type a and Type B communication standards. That is, the polling mechanism of the NFC polling phase of the electronic device changes from fig. 4 to fig. 6. As can be seen from fig. 6, in this way, the duty ratio of the polling duration according to the Type F communication standard in one NFC duty cycle is constant, and the duty ratio of the duration of the listening phase in one NFC duty cycle is increased.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a setup device of a polling mechanism according to an embodiment of the present application. The setting means 300 of the polling mechanism may include: an acquisition module 301, a determination module 302 and a setting module 303.
An obtaining module 301, configured to obtain geographic location information of the electronic device.
A determining module 302, configured to determine a target polling mechanism corresponding to the geographic location information, where the target polling mechanism is a working mechanism in a polling phase of NFC.
A setting module 303, configured to set the electronic device according to the target polling mechanism, so as to apply the target polling mechanism to an NFC polling phase of the electronic device.
In one embodiment, the determining module 302 may be configured to:
determining a first communication standard adopted by a region corresponding to the geographic position information, wherein the first communication standard is at least one of NFC (near field communication) standards;
determining a target polling mechanism according to the first communication standard.
In one embodiment, the determining module 302 may be configured to:
determining a second communication standard according to the first communication standard, wherein the second communication standard is an NFC communication standard which is not adopted in a region corresponding to the geographical position information;
and resetting the working mechanism of a target time period to obtain a target polling mechanism, wherein the target time period is a time period used for polling according to the second communication standard in the NFC polling stage.
In one embodiment, the determining module 302 may be configured to:
and resetting the working mechanism of the target time period to be polled according to the first communication standard.
In one embodiment, the determining module 302 may be configured to:
and allocating the target time period to a listening phase of NFC to cancel polling according to the second communication standard.
In one embodiment, the determining module 302 may be configured to:
counting a first number of the first communication standards and a second number of the second communication standards;
and if the first number is less than or equal to the second number, resetting the working mechanism of the target time period to be polled according to the first communication standard.
In one embodiment, the determining module 302 may be configured to:
and if the first number is smaller than the second number and the first number is 1, resetting the working mechanism of the target time period to be polled according to the first communication standard.
In one embodiment, the determining module 302 may be configured to:
counting a first number of the first communication standards and a second number of the second communication standards;
and if the first number is larger than the second number, allocating the target time period to a listening phase of NFC.
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute the steps in the setting method of the polling mechanism provided in this embodiment.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the steps in the setting method of the polling mechanism provided in this embodiment by calling a computer program stored in the memory.
For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Referring to fig. 8, fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
The mobile terminal 400 may include an NFC communication module 401, a memory 402, a processor 403, and the like. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 8 is not intended to be limiting of mobile terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The NFC communication module 401 may be used for contactless wireless communication in a close range with other NFC communication devices or cards or the like.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the mobile terminal.
In this embodiment, the processor 403 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 403 runs the application programs stored in the memory 402, so as to execute:
acquiring geographical position information of the electronic equipment; determining a target polling mechanism corresponding to the geographic position information, wherein the target polling mechanism is a working mechanism in a polling stage of Near Field Communication (NFC); and setting the electronic equipment according to the target polling mechanism so as to apply the target polling mechanism to an NFC polling stage of the electronic equipment.
Referring to fig. 9, the mobile terminal 500 may include an NFC communication module 501, a memory 502, a processor 503, an input unit 504, an output unit 505, and the like.
The NFC communication module 501 may be used for contactless wireless communication in a close range with other NFC communication devices or cards and the like.
The memory 502 may be used to store applications and data. Memory 502 stores applications containing executable code. The application programs may constitute various functional modules. The processor 503 executes various functional applications and data processing by running an application program stored in the memory 502.
The processor 503 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the mobile terminal.
The input unit 504 may be used to receive input numbers, character information, or user characteristic information (such as a fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The output unit 505 may be used to display information input by or provided to a user and various graphic user interfaces of the mobile terminal, which may be configured by graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
In this embodiment, the processor 503 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 503 runs the application programs stored in the memory 502, so as to execute:
acquiring geographical position information of the electronic equipment; determining a target polling mechanism corresponding to the geographic position information, wherein the target polling mechanism is a working mechanism in a polling stage of Near Field Communication (NFC); and setting the electronic equipment according to the target polling mechanism so as to apply the target polling mechanism to an NFC polling stage of the electronic equipment.
In one embodiment, when the processor 503 executes the target polling mechanism for determining the target corresponding to the geographic location information, it may execute: determining a first communication standard adopted by a region corresponding to the geographic position information, wherein the first communication standard is at least one of NFC (near field communication) standards; determining a target polling mechanism according to the first communication standard.
In one embodiment, when the processor 503 executes the target polling mechanism determined according to the first communication standard, it may execute: determining a second communication standard according to the first communication standard, wherein the second communication standard is an NFC communication standard which is not adopted in a region corresponding to the geographical position information; and resetting the working mechanism of a target time period to obtain a target polling mechanism, wherein the target time period is a time period used for polling according to the second communication standard in the NFC polling stage.
In one embodiment, when the processor 503 performs the resetting of the working mechanism of the target time period, it may perform: and resetting the working mechanism of the target time period to be polled according to the first communication standard.
In one embodiment, when the processor 503 performs the resetting of the working mechanism of the target time period, it may perform: and allocating the target time period to a listening phase of NFC to cancel polling according to the second communication standard.
In one embodiment, when the processor 503 performs the resetting of the working mechanism of the target time period to polling according to the first communication standard, the following steps may be performed: counting a first number of the first communication standards and a second number of the second communication standards; and if the first number is less than or equal to the second number, resetting the working mechanism of the target time period to be polled according to the first communication standard.
In one embodiment, the processor 503 may perform, when resetting the working mechanism of the target time period to polling according to the first communication standard if the first number is smaller than the second number, the following steps: and if the first number is smaller than the second number and the first number is 1, resetting the working mechanism of the target time period to be polled according to the first communication standard.
In one embodiment, when the processor 503 executes the listening phase for allocating the target time period to NFC, it may execute: counting a first number of the first communication standards and a second number of the second communication standards; and if the first number is larger than the second number, allocating the target time period to a listening phase of NFC.
In the above embodiments, the descriptions of the embodiments have respective emphasis, and a part that is not described in detail in a certain embodiment may refer to the above detailed description of the setting method for the polling mechanism, and is not described here again.
The setting device of the polling mechanism provided in the embodiment of the present application and the setting method of the polling mechanism in the above embodiments belong to the same concept, and any method provided in the setting method embodiment of the polling mechanism may be run on the setting device of the polling mechanism, and details of an implementation process thereof are referred to in the setting method embodiment of the polling mechanism, and are not described herein again.
It should be noted that, for the setting method of the polling mechanism described in the embodiment of the present application, it can be understood by those skilled in the art that all or part of the process of implementing the setting method of the polling mechanism described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and during the execution process, the process of the embodiment of the setting method of the polling mechanism can be included. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the setting apparatus of the polling mechanism in the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The foregoing describes in detail a method, an apparatus, a storage medium, and an electronic device for setting a polling mechanism provided in an embodiment of the present application, where the present application applies an example to explain principles and embodiments of the present invention, and the description of the foregoing embodiment is only used to help understand the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (5)

1. A method for setting a polling mechanism is applied to an electronic device, and is characterized by comprising the following steps:
acquiring geographical position information of the electronic equipment;
determining a first communication standard adopted by a region corresponding to the geographic position information, wherein the first communication standard is at least one of NFC (near field communication) standards; determining a second communication standard according to the first communication standard, wherein the second communication standard is an NFC communication standard which is not adopted in a region corresponding to the geographical position information; acquiring the residual electric quantity of the electronic equipment, allocating a target time period to an NFC interception stage when the residual electric quantity is lower than a preset electric quantity threshold, and resetting a working mechanism of the target time period to poll according to the first communication standard when the residual electric quantity is not lower than the preset electric quantity threshold; or counting a first number of the first communication standard and a second number of the second communication standard, resetting the working mechanism of the target time period to poll according to the first communication standard if the first number is less than or equal to the second number, and allocating the target time period to a listening stage of NFC or alternately allocating the target time period among the first communication standards if the first number is greater than the second number to obtain a target polling mechanism, wherein the target time period is a time period used for polling according to the second communication standard in an NFC polling stage, and the target polling mechanism is a working mechanism in a polling stage of near field communication NFC;
and setting the electronic equipment according to the target polling mechanism so as to apply the target polling mechanism to an NFC polling stage of the electronic equipment.
2. The method according to claim 1, wherein resetting the working mechanism of the target time period to poll according to the first communication standard if the first number is smaller than the second number comprises:
and if the first number is smaller than the second number and the first number is 1, resetting the working mechanism of the target time period to be polled according to the first communication standard.
3. A setting device of a polling mechanism is applied to an electronic device, and is characterized by comprising:
the acquisition module is used for acquiring the geographical position information of the electronic equipment;
the determining module is configured to determine a first communication standard adopted by a region corresponding to the geographic location information, where the first communication standard is at least one of NFC communication standards; determining a second communication standard according to the first communication standard, wherein the second communication standard is an NFC communication standard which is not adopted in a region corresponding to the geographical position information; acquiring the residual electric quantity of the electronic equipment, allocating a target time period to an NFC interception stage when the residual electric quantity is lower than a preset electric quantity threshold, and resetting a working mechanism of the target time period to poll according to the first communication standard when the residual electric quantity is not lower than the preset electric quantity threshold; or counting a first number of the first communication standard and a second number of the second communication standard, resetting the working mechanism of the target time period to poll according to the first communication standard if the first number is less than or equal to the second number, and allocating the target time period to a listening stage of NFC or alternately allocating the target time period among the first communication standards if the first number is greater than the second number to obtain a target polling mechanism, wherein the target time period is a time period used for polling according to the second communication standard in an NFC polling stage, and the target polling mechanism is a working mechanism in a polling stage of near field communication NFC;
and the setting module is used for setting the electronic equipment according to the target polling mechanism so as to apply the target polling mechanism to the NFC polling stage of the electronic equipment.
4. A storage medium having stored thereon a computer program, characterized in that the computer program, when executed on a computer, causes the computer to execute the method according to any of claims 1-2.
5. An electronic device comprising a memory, a processor, wherein the processor is configured to perform the method of any of claims 1-2 by invoking a computer program stored in the memory.
CN201811070356.7A 2018-09-13 2018-09-13 Polling mechanism setting method and device, storage medium and electronic equipment Active CN109302669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811070356.7A CN109302669B (en) 2018-09-13 2018-09-13 Polling mechanism setting method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811070356.7A CN109302669B (en) 2018-09-13 2018-09-13 Polling mechanism setting method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109302669A CN109302669A (en) 2019-02-01
CN109302669B true CN109302669B (en) 2021-04-13

Family

ID=65166995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811070356.7A Active CN109302669B (en) 2018-09-13 2018-09-13 Polling mechanism setting method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109302669B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110958562B (en) * 2019-11-28 2021-07-16 Oppo广东移动通信有限公司 Modulation mode selection method, near field communication device and storage medium
CN114302316A (en) * 2020-09-22 2022-04-08 Oppo(重庆)智能科技有限公司 Control method, device, equipment and storage medium of near field wireless communication equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101228532A (en) * 2005-07-25 2008-07-23 诺基亚公司 Equipment and method for operating multifunctional near-field communication equipment supporting a plurality of data formats
CN105635937A (en) * 2015-04-28 2016-06-01 宇龙计算机通信科技(深圳)有限公司 Determination method and determination device for polling time, and control equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5304513B2 (en) * 2009-07-24 2013-10-02 ソニー株式会社 Communication device, communication method discrimination method, and program
US9887743B2 (en) * 2012-10-29 2018-02-06 Qualcomm Incorporated Methods and apparatus for discovering tag talks first devices
US20140266624A1 (en) * 2013-03-15 2014-09-18 Motorola Mobility Llc Wearable Authentication Device
US20160174267A1 (en) * 2014-12-15 2016-06-16 Qualcomm Incorporated Proprietary packet exchange for enhanced nfc communication
US9647884B2 (en) * 2015-02-19 2017-05-09 Qualcomm Incorporated Near field communication forum listen mode profiles
US9826364B2 (en) * 2015-04-03 2017-11-21 Qualcomm Incorporated Systems and methods for location-based tuning
US10212576B2 (en) * 2016-09-08 2019-02-19 Samsung Electronics Co., Ltd. Near field communication device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101228532A (en) * 2005-07-25 2008-07-23 诺基亚公司 Equipment and method for operating multifunctional near-field communication equipment supporting a plurality of data formats
CN105635937A (en) * 2015-04-28 2016-06-01 宇龙计算机通信科技(深圳)有限公司 Determination method and determination device for polling time, and control equipment

Also Published As

Publication number Publication date
CN109302669A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
EP3567477B1 (en) Method for preloading application, storage medium, and terminal
CN108984064B (en) Split screen display method and device, storage medium and electronic equipment
US20150288629A1 (en) Electronic device and method of providing information by electronic device
US10819455B2 (en) Broadcast processing method, non-transitory storage medium, and electronic device
US20190188030A1 (en) Terminal background application management method and apparatus
EP3572935A1 (en) Method for preloading application, storage medium, and terminal
CN109213596B (en) Method and equipment for allocating terminal memory
CN110222288B (en) Page display method, device and storage medium
CN109062464B (en) Touch operation method and device, storage medium and electronic equipment
CN102866916A (en) Terminal and method for dynamically loading application program interface
EP3633880A1 (en) Radio frequency interference processing method and electronic device
CN109302669B (en) Polling mechanism setting method and device, storage medium and electronic equipment
CN106488539A (en) The processing method of WiFi resource and system in terminal
US11855477B2 (en) Method, device for charging control, wireless charging base and storage device
CN111148182B (en) Device control method, device, storage medium and electronic device
CN112749074B (en) Test case recommending method and device
CN104102560A (en) Method and device for testing system performance
CN105373305A (en) Image interception method and device
CN109107148B (en) Control method, control device, storage medium and mobile terminal
CN110035399B (en) Message transmission method and related equipment
CN106547400B (en) Method, device and terminal for reporting information
CN105930090A (en) Method and system for transmitting coordinate data of touch screens on basis of mobile terminals
CN112596883B (en) Application switching method and device, storage medium and electronic equipment
CN114546171A (en) Data distribution method, data distribution device, storage medium and electronic equipment
CN107205272B (en) Communication method, communication device, computer-readable storage 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