CN113590382B - NFC function processing method, NFC function processing device and storage medium - Google Patents

NFC function processing method, NFC function processing device and storage medium Download PDF

Info

Publication number
CN113590382B
CN113590382B CN202110831459.6A CN202110831459A CN113590382B CN 113590382 B CN113590382 B CN 113590382B CN 202110831459 A CN202110831459 A CN 202110831459A CN 113590382 B CN113590382 B CN 113590382B
Authority
CN
China
Prior art keywords
nfc function
repair
electronic device
nfc
function
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
CN202110831459.6A
Other languages
Chinese (zh)
Other versions
CN113590382A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110831459.6A priority Critical patent/CN113590382B/en
Publication of CN113590382A publication Critical patent/CN113590382A/en
Application granted granted Critical
Publication of CN113590382B publication Critical patent/CN113590382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/142Reconfiguring to eliminate the error
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a processing method, a device and a storage medium for NFC function. The method is applied to the electronic equipment and comprises the following steps: when detecting triggering operation for repairing the NFC function of the electronic equipment, starting the repairing function aiming at the NFC function of the electronic equipment; and under the condition that the repair function is successfully started, repairing the NFC function of the electronic equipment based on a repair script pre-stored in the electronic equipment. According to the NFC function repairing method and device, the NFC function of the electronic equipment can be started based on the detected triggering operation of the NFC function for repairing the electronic equipment, and under the condition that the NFC function is successfully started, the NFC function of the electronic equipment is repaired based on the repairing script pre-stored in the electronic equipment, so that the possibility that a user requests to leave a machine or return to a factory for maintenance due to a non-hardware problem can be reduced, the experience of the user in using the electronic equipment is improved, and the maintenance cost of the electronic equipment is reduced.

Description

NFC function processing method, NFC function processing device and storage medium
Technical Field
The disclosure relates to the field of computer communication, and in particular relates to a processing method, a device and a storage medium for an NFC function.
Background
Near Field Communication (NFC) is also called Near Field Communication (NFC), which is a high-frequency wireless Communication technology for realizing contactless data transmission between devices, and with the continuous perfection of NFC technology, the application of NFC technology in electronic devices is popular, and based on NFC chips in electronic devices, near field Communication between different card reading devices can be realized. In the actual application process, due to the diversification of user interaction types in different application scenes, in order to meet the application needs of varied users, multiple types of NFC functions can be built in the electronic equipment.
However, in the process of using the NFC function of the electronic device, the user often encounters problems such as card opening, recharging, card swiping failure, etc., which are difficult to reproduce, and even if a tester or the user feeds back such problems and provides an error report, the problem of abnormal NFC function is difficult to repair because the user is far away from the problem site and cannot accurately reach the time point of the problem.
Disclosure of Invention
The disclosure provides a processing method, a device and a storage medium for NFC function.
According to a first aspect of an embodiment of the present disclosure, there is provided a processing method of an NFC function, applied to an electronic device, including:
When detecting triggering operation for repairing the NFC function of the electronic equipment, starting the repairing function aiming at the NFC function of the electronic equipment;
And under the condition that the repair function is successfully started, repairing the NFC function of the electronic equipment based on a repair script pre-stored in the electronic equipment.
Optionally, the method further comprises:
determining repair tasks of NFC functions of the electronic equipment and priorities of the repair tasks based on fault information of the NFC functions of the electronic equipment;
Adding the repair task to a preset task set;
the repairing the NFC function of the electronic device includes:
and executing each repair task in the preset task set according to the priority of each repair task.
Optionally, the method further comprises:
after the repair task is added to the preset task set, updating a repair identifier of the NFC function of the electronic device to a first identifier;
Updating the repair identifier of the NFC function of the electronic device to a second identifier after the NFC function of the electronic device is successfully repaired;
The first identifier is used for representing that the NFC function of the electronic equipment is to be repaired, and the second identifier is used for representing that the NFC function of the electronic equipment is repaired.
Optionally, the method further comprises:
restarting the NFC function of the electronic device after updating the repair identifier of the NFC function of the electronic device to the first identifier;
Acquiring firmware state information of a controller for controlling an NFC function of the electronic device;
the repairing the NFC function of the electronic device based on the repairing script pre-stored in the electronic device includes:
And if the firmware state of the controller is determined to be abnormal according to the firmware state information, repairing the firmware of the controller based on the repairing script.
Optionally, the repairing firmware of the controller based on the repairing script includes:
restoring the function parameters of the NFC function of the electronic equipment to initial settings;
And after the function parameters of the NFC function of the electronic equipment are restored to the initial setting, repairing the firmware of the controller based on the repairing script.
Optionally, the method further comprises:
After the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device is started.
According to a second aspect of embodiments of the present disclosure, there is provided a processing apparatus with NFC functionality, applied to an electronic device, including:
The electronic equipment comprises a first starting module, a second starting module and a first triggering module, wherein the first starting module is configured to start a repairing function aiming at the NFC function of the electronic equipment when detecting a triggering operation for repairing the NFC function of the electronic equipment;
and the repair module is configured to repair the NFC function of the electronic equipment based on a repair script pre-stored in the electronic equipment under the condition that the repair function is successfully started.
Optionally, the apparatus further includes:
A determining module configured to determine repair tasks of the NFC function of the electronic device and priorities of the repair tasks based on failure information of the NFC function of the electronic device;
The adding module is configured to add the repair task to a preset task set; and the repair module is configured to execute each repair task in the preset task set according to the priority of each repair task.
Optionally, the apparatus further includes:
the first updating module is configured to update the repair identifier of the NFC function of the electronic device to a first identifier after the repair task is added to the preset task set;
The second updating module is configured to update the repair identifier of the NFC function of the electronic device to a second identifier after the NFC function of the electronic device is successfully repaired;
The first identifier is used for representing that the NFC function of the electronic equipment is to be repaired, and the second identifier is used for representing that the NFC function of the electronic equipment is repaired.
Optionally, the apparatus further includes:
a second start-up module configured such that the apparatus further comprises:
The second starting module is configured to restart the NFC function of the electronic device after updating the repair identifier of the NFC function of the electronic device to the first identifier;
an acquisition module configured to acquire firmware state information of the controller for controlling an NFC function of the electronic device;
the repair module is configured to:
And if the firmware state of the controller is determined to be abnormal according to the firmware state information, repairing the firmware of the controller based on the repairing script.
Optionally, the repair module is configured to:
restoring the function parameters of the NFC function of the electronic equipment to initial settings;
And after the function parameters of the NFC function of the electronic equipment are restored to the initial setting, repairing the firmware of the controller based on the repairing script.
Optionally, the apparatus further includes:
And the third starting module is configured to start the NFC function of the electronic equipment after the NFC function of the electronic equipment is successfully repaired.
According to a third aspect of embodiments of the present disclosure, there is provided a processing apparatus of NFC functionality, including:
A processor;
A memory configured to store processor-executable instructions;
Wherein the processor is configured to: the steps in the processing method for implementing any NFC function in the first aspect when executed.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium, which when executed by a processor of a processing device of an NFC functionality, causes the device to perform the steps in the processing method of any of the NFC functionality of the first aspect described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
According to the embodiment of the disclosure, the repair function of the NFC function of the electronic equipment can be started based on the detected triggering operation of the NFC function for repairing the electronic equipment, and under the condition that the repair function is successfully started, the NFC function of the electronic equipment is repaired based on the repair script pre-stored in the electronic equipment, so that the possibility that a user requests to be taken off the machine or returns to a factory for maintenance due to a non-hardware problem can be reduced, the experience of the user in using the electronic equipment is further improved, and the maintenance cost of the electronic equipment is reduced.
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.
Fig. 1 is a flowchart one of a processing method of an NFC function according to an exemplary embodiment.
Fig. 2 is a flowchart two of a processing method of the NFC function according to an exemplary embodiment.
Fig. 3 is a block diagram of a processing device for NFC cards according to an example embodiment.
Fig. 4 is a block diagram showing a hardware configuration of a processing apparatus of an NFC function according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a flowchart of a processing method of an NFC function according to an exemplary embodiment, and as shown in fig. 1, the method is applied to an electronic device, and mainly includes the following steps:
In step 101, when a triggering operation for repairing an NFC function of an electronic device is detected, starting a repairing function for the NFC function of the electronic device;
In step 102, if the repair function is successfully started, repairing the NFC function of the electronic device based on a repair script pre-stored in the electronic device.
In the embodiment of the disclosure, the electronic device with the NFC function may be simulated into an NFC card for use, such as an access card, a bank card, a bus card, etc., where the electronic device with the NFC function may be an electronic device with an NFC chip. Here, the electronic device includes a mobile terminal, wherein the mobile terminal includes: a cell phone, a tablet computer, a wearable electronic device, etc. In some embodiments, the application may be written by an NFC chip installed on the electronic device, and different NFC functions may be implemented by the application, e.g., different types of card swipe functions may be implemented, etc.
In the using process, the electronic device simulated into the NFC card can be close to the card reading device so as to perform close-range communication interaction with the card reading device. Here, an NFC card swiping system may be set in the card reading device, so that the card reading device performs near field communication interaction with the electronic device simulated into the NFC card based on the NFC card swiping system, where the NFC card swiping system set in the card reading device may be an access control system, a payment system, a public transportation system, or the like. For example, when the NFC card swiping system set in the card reading device is an access control system, the electronic device with the NFC function may be simulated as an access control card; when the NFC card swiping system arranged in the card reading equipment is a payment system, the electronic equipment with the NFC function can be simulated into a bank card; when the NFC card swiping system arranged in the card reading equipment is a public transportation system, the electronic equipment with the NFC function can be simulated into a public transportation card.
However, in the process of implementing the NFC function of the electronic device, an error may occur due to the analysis of the application program, so that the NFC function of the electronic device is abnormal. For example, problems such as card opening, recharging, card swiping, or card reading failure may result.
According to the embodiment of the disclosure, the NFC function of the electronic equipment can be restored based on the detected triggering operation for restoring the NFC function of the electronic equipment, and under the condition that the NFC function of the electronic equipment is successfully started, the NFC function of the electronic equipment is restored based on the restoration script pre-stored in the electronic equipment.
In some embodiments, the first control may be set on the display interface of the electronic device, so that the user can input a trigger operation based on the first control, and when the electronic device detects the trigger operation acting on the first control, a repair function for the NFC function of the electronic device may be started. The method for starting the repair function of the NFC function of the electronic equipment comprises the following steps: and calling a repair script pre-stored in the electronic equipment, namely, when the repair script pre-stored in the electronic equipment is successfully called, indicating that the NFC function of the electronic equipment is successfully started. In other embodiments, the display interface may be a setting interface of the electronic device, and the first control may be a virtual control on the setting interface.
For example, a first control may be provided on the display interface, which in some embodiments may be identified by text. In other alternative embodiments, the first control may also be identified by a pattern, geometry, etc., so long as it can be easily recognized by the user that the first control is a trigger operation entered by the user for repairing the NFC functionality of the electronic device. In some embodiments, the triggering operation may include: the click operation, the long press operation, the slide operation, or the like is not particularly limited herein.
In some embodiments, after detecting the trigger operation, the electronic device may output the first confirmation information and the second control on the display interface, e.g., may output the first confirmation information and the second control in a box-flick manner. The first confirmation information is used for displaying fault information to be confirmed to a user, and the user can input a first confirmation operation through the second control when the fault information to be confirmed is accurate. After detecting the first confirmation operation, the electronic device may output the second confirmation information and the third control on the display interface.
After the user inputs the first confirmation operation through the second control, the electronic device may output the second confirmation information and the third control on the display interface, for example, the third confirmation information and the third control may be output in a box-flicking manner. The third confirmation information is used for displaying prompt information related to repair to the user, and the second confirmation operation can be input through the third control when the user determines that the NFC function of the electronic equipment is to be repaired. After the electronic device detects the second confirmation operation, the NFC functionality of the electronic device may be repaired based on the repair script.
In other embodiments, the user may also input the triggering operation by way of a physical key, a virtual key, or a gesture, as long as the repair function for the NFC function of the electronic device can be initiated by the triggering operation.
It should be noted that the trigger operation may be input when the use of the NFC function of the electronic device has been abnormal, or may be input when the use of the NFC function of the electronic device has not been abnormal. That is, the user may actively repair the NFC function of the electronic device, or repair the NFC of the electronic device when an abnormality has occurred in use of the NFC function of the electronic device.
In other embodiments, when the repair function of the NFC function of the electronic device is successfully started, a prompt for that the repair function of the NFC function of the electronic device is successfully started may be output.
In the embodiment of the disclosure, under the condition that the repair function is successfully started, the NFC function of the electronic device can be repaired based on the repair script pre-stored in the electronic device. Wherein the repair script comprises an executable program written in a set format.
In the process of repairing the NFC function of the electronic device, the original application program written in the NFC chip may be updated based on the executable program in the repair script, so as to repair the NFC function of the electronic device. For example, all original applications written in the NFC chip may be replaced directly based on the executable program in the repair script. For another example, according to the fault information of the NFC function of the electronic device, a repair program corresponding to the fault information may be determined from the repair script, and the original application program written in the NFC chip may be updated based on the repair program.
In some embodiments, when detecting that the NFC function of the electronic device is abnormal, the first control may be automatically output based on the display interface, and whether there is a triggering operation acting on the first control is detected.
According to the embodiment of the disclosure, the repair function of the NFC function of the electronic equipment can be started based on the detected triggering operation of the NFC function for repairing the electronic equipment, and under the condition that the repair function is successfully started, the NFC function of the electronic equipment is repaired based on the repair script pre-stored in the electronic equipment, so that the possibility that a user requests to be taken off the machine or returns to a factory for maintenance due to a non-hardware problem can be reduced, the experience of the user in using the electronic equipment is further improved, and the maintenance cost of the electronic equipment is reduced.
In some embodiments, the method further comprises:
determining repair tasks of NFC functions of the electronic equipment and priorities of the repair tasks based on fault information of the NFC functions of the electronic equipment;
Adding the repair task to a preset task set;
the repairing the NFC function of the electronic device includes:
and executing each repair task in the preset task set according to the priority of each repair task.
Here, when the NFC function of the electronic device is abnormal, the electronic device may detect an application related to the NFC function, determine fault information of the NFC function of the electronic device based on a detection result, and after determining the fault information, determine a corresponding repair task. For example, if the failure is a card swiping failure, a repair task related to the card swiping can be determined; if the fault is the recharging failure, determining a repairing task related to recharging; if the failure is a card opening failure, the repair task related to card opening can be determined.
In the embodiment of the disclosure, after determining each repair task, the priority of each repair task can also be determined according to the fault information, where the priority of each repair task can be determined according to the fault type, for example, a mapping relationship between the fault type and the priority can be preset, and in the implementation process, if the fault type is determined, the corresponding priority can be determined according to the fault type and the mapping relationship. For another example, the priority of the repair task related to card opening may be higher than the priority of the repair task related to card swiping, and the priority of the repair task related to card swiping may be higher than the priority of the repair task related to recharging, which may be specifically set according to the need, and is not specifically limited herein.
In the embodiment of the disclosure, after determining the repair task, the repair task may be added to the preset task set, and since the priority of each repair task is determined according to the fault information, in the process of repairing the NFC function of the electronic device, each repair task in the preset task set may be executed according to the priority of each repair task, so as to complete repairing the NFC function of the electronic device.
In the embodiment of the disclosure, in the process of repairing the NFC function of the electronic device, priorities of the repair tasks may be ordered according to the fault information, and corresponding repair tasks are executed according to the order of priorities, so that normal use of the NFC function of the electronic device can be ensured on the basis of repairing the NFC function of the electronic device. For example, if the card swiping function and the recharging function of the electronic device are abnormal, the card swiping function can be repaired preferentially, so that the user can normally use the card swiping function, and of course, the recharging function can be repaired preferentially under other use scenes, and the specific priority order can be flexibly switched according to different scenes, which is not limited in detail.
In some embodiments, the method further comprises:
after the repair task is added to the preset task set, updating a repair identifier of the NFC function of the electronic device to a first identifier;
Updating the repair identifier of the NFC function of the electronic device to a second identifier after the NFC function of the electronic device is successfully repaired;
The first identifier is used for representing that the NFC function of the electronic equipment is to be repaired, and the second identifier is used for representing that the NFC function of the electronic equipment is repaired.
In the embodiment of the disclosure, after the repair task is added to the preset task set, the repair task which needs to be executed currently is represented, and at this time, the repair identifier of the NFC function of the electronic device may be updated to a first identifier, which is used to represent that the NFC function of the electronic device is to be repaired. The first identifier may be represented by letters or numbers, for example, the first identifier may be "true".
After the NFC function of the electronic equipment is successfully repaired, the fact that no repair task needs to be executed at present is characterized, and at this time, the repair identifier of the NFC function of the electronic equipment can be updated to be a second identifier for representing that the NFC function repair of the electronic equipment is completed. Wherein the second identifier may be indicated by letters or numbers, for example, the second identifier may be "false".
In the embodiment of the disclosure, the repair state of the NFC function of the electronic device is represented by the first identifier and the second identifier, so that the electronic device can execute corresponding operations according to the corresponding identifiers, and further flexibility of the electronic device in processing the NFC function is improved.
In some embodiments, the method further comprises:
restarting the NFC function of the electronic device after updating the repair identifier of the NFC function of the electronic device to the first identifier;
Acquiring firmware state information of a controller for controlling an NFC function of the electronic device;
the repairing the NFC function of the electronic device based on the repairing script pre-stored in the electronic device includes:
And if the firmware state of the controller is determined to be abnormal according to the firmware state information, repairing the firmware of the controller based on the repairing script.
Here, after updating the repair identifier of the NFC function of the electronic device to the first identifier, it indicates that there is a repair task that needs to be executed currently, and in this case, in order to reduce an influence of an application program related to the NFC function that is currently in a running state on a repair process, the NFC function of the electronic device may be restarted, specifically: the NFC function of the electronic device is turned off, and after the NFC function of the electronic device is turned off, the NFC function of the electronic device is restarted.
After restarting the NFC functionality of the electronic device, firmware state information for a controller controlling the NFC functionality of the electronic device may be obtained, wherein the firmware state information characterizes a current state of firmware of the controller.
In the embodiment of the disclosure, when determining that the firmware state of the controller is abnormal according to the firmware state information, the firmware of the controller can be repaired based on the repair script. For example, a parameter state of the repair_pass inside the firmware of the controller may be acquired, if the repair_pass=0, it indicates that the firmware of the controller is abnormal, and at this time, the firmware of the controller may be repaired based on the repair script. Wherein the repair script comprises an executable program written in a set format.
In repairing firmware of a controller of an electronic device, an original application written in the firmware may be updated based on an executable program in a repair script. For example, all original applications written in firmware, etc. may be replaced directly based on the executable program in the repair script.
Through the technical scheme in the disclosure, if a user encounters a situation that card opening, recharging and card swiping fail due to the problem of NFC firmware state errors in the process of using the electronic equipment, the firmware of the controller can be repaired based on the repair script, so that the stability of NFC functions is improved.
In some embodiments, the repairing firmware of the controller based on the repairing script includes:
restoring the function parameters of the NFC function of the electronic equipment to initial settings;
And after the function parameters of the NFC function of the electronic equipment are restored to the initial setting, repairing the firmware of the controller based on the repairing script.
In the embodiment of the disclosure, when determining that the firmware of the controller is abnormal, the function parameters of the NFC function of the electronic device may be restored to the initial setting, that is, the NFC function of the electronic device is initialized, and after restoring the function parameters of the NFC function of the electronic device to the initial setting, the firmware of the controller is restored based on the restoration script.
For example, initializing the function parameters of the NFC function of the electronic device may include: the NFC function of the electronic equipment is restored to the factory setting, and the possibility of generating new problems in the repairing process can be reduced and the repairing efficiency of the NFC function of the electronic equipment is improved by restoring the NFC function of the electronic equipment to the factory setting.
In some embodiments, the method further comprises:
After the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device is started.
In the embodiment of the disclosure, after the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device may be automatically started, so that a user may directly use the NFC function of the electronic device, and further, the convenience of using the electronic device by the user is improved.
For example, if the repair operation is performed during the execution of the card swiping function by the electronic device, the card swiping function of the electronic device may be automatically started after the card swiping function of the electronic device is successfully repaired. For another example, if the repair operation is performed during the execution of the recharging function by the electronic device, the recharging function of the electronic device may be automatically started after the recharging function of the electronic device is successfully repaired.
Fig. 2 is a flowchart two of a processing method of an NFC function according to an exemplary embodiment, and as shown in fig. 2, the method is applied to an electronic device, and mainly includes the following steps:
in step 501, a triggering operation for repairing an NFC functionality of an electronic device is detected.
In some embodiments, the first control may be set on the display interface of the electronic device, so that the user can input a trigger operation based on the first control, and when the electronic device detects the trigger operation acting on the first control, a repair function for the NFC function of the electronic device may be started. The method for starting the repair function of the NFC function of the electronic equipment comprises the following steps: and calling a repair script pre-stored in the electronic equipment, namely, when the repair script pre-stored in the electronic equipment is successfully called, indicating that the NFC function of the electronic equipment is successfully started. In other embodiments, the display interface may be a setting interface of the electronic device, and the first control may be a virtual control on the setting interface.
In step 502, a confirmation operation is detected.
After detecting the triggering operation, the electronic device may output the first confirmation information and the second control on the display interface, for example, the first confirmation information and the second control may be output in a form of a frame. The first confirmation information is used for displaying fault information to be confirmed to a user, and the user can input a first confirmation operation through the second control when the fault information to be confirmed is accurate. After detecting the first confirmation operation, the electronic device may output the second confirmation information and the third control on the display interface.
For example, the third confirmation information and the third control may be output in a form of a box. The third confirmation information is used for displaying prompt information related to repair to the user, and the second confirmation operation can be input through the third control when the user determines that the NFC function of the electronic equipment is to be repaired.
In step 503, upon detection of a confirmation operation, a repair function for the NFC function of the electronic device is initiated.
After the electronic device detects the second confirmation operation, a repair function for the NFC function of the electronic device may be initiated.
In step 504, in case the repair function is successfully started, the repair task is added to the preset task set.
Here, when the NFC function of the electronic device is abnormal, the electronic device may detect an application related to the NFC function, determine fault information of the NFC function of the electronic device based on a detection result, and after determining the fault information, determine a corresponding repair task. For example, if the failure is a card swiping failure, a repair task related to the card swiping can be determined; if the fault is the recharging failure, determining a repairing task related to recharging; if the failure is a card opening failure, the repair task related to card opening can be determined.
In the embodiment of the disclosure, after determining the repair task, the repair task may be added to the preset task set, and since the priority of each repair task is determined according to the fault information, in the process of repairing the NFC function of the electronic device, each repair task in the preset task set may be executed according to the priority of each repair task, so as to complete repairing the NFC function of the electronic device.
In step 505, the repair identity of the NFC functionality of the electronic device is updated to the first identity.
In the embodiment of the disclosure, after the repair task is added to the preset task set, the repair task which needs to be executed currently is represented, and at this time, the repair identifier of the NFC function of the electronic device may be updated to a first identifier, which is used to represent that the NFC function of the electronic device is to be repaired. The first identifier may be represented by letters or numbers, for example, the first identifier may be "true".
In step 506, the NFC functionality of the electronic device is restarted.
Here, after updating the repair identifier of the NFC function of the electronic device to the first identifier, it indicates that there is a repair task that needs to be executed currently, and in this case, in order to reduce an influence of an application program related to the NFC function that is currently in a running state on a repair process, the NFC function of the electronic device may be restarted, specifically: the NFC function of the electronic device is turned off, and after the NFC function of the electronic device is turned off, the NFC function of the electronic device is restarted.
In step 507, it is determined whether the firmware state of the controller is abnormal according to the firmware state information.
After restarting the NFC functionality of the electronic device, firmware state information for a controller controlling the NFC functionality of the electronic device may be obtained, wherein the firmware state information characterizes a current state of firmware of the controller.
In step 508, if the firmware state of the controller is abnormal, the function parameters of the NFC function of the electronic device are restored to the initial settings.
In the embodiment of the disclosure, when determining that the firmware of the controller is abnormal, the function parameters of the NFC function of the electronic device may be restored to the initial setting, that is, the NFC function of the electronic device is initialized, and after restoring the function parameters of the NFC function of the electronic device to the initial setting, the firmware of the controller is restored based on the restoration script.
In step 509, firmware of the controller is repaired based on the repair script.
In repairing firmware of a controller of an electronic device, an original application written in the firmware may be updated based on an executable program in a repair script. For example, all original applications written in firmware, etc. may be replaced directly based on the executable program in the repair script.
In step 510, after the NFC functionality of the electronic device is successfully restored, the NFC functionality of the electronic device is initiated.
In the embodiment of the disclosure, after the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device may be automatically started, so that a user may directly use the NFC function of the electronic device, and further, the convenience of using the electronic device by the user is improved.
In step 511, the repair identity of the NFC functionality of the electronic device is updated to the second identity.
After the NFC function of the electronic equipment is successfully repaired, the fact that no repair task needs to be executed at present is characterized, and at this time, the repair identifier of the NFC function of the electronic equipment can be updated to be a second identifier for representing that the NFC function repair of the electronic equipment is completed. Wherein the second identifier may be indicated by letters or numbers, for example, the second identifier may be "false".
In the embodiment of the disclosure, the repair state of the NFC function of the electronic device is represented by the first identifier and the second identifier, so that the electronic device can execute corresponding operations according to the corresponding identifiers, and further flexibility of the electronic device in processing the NFC function is improved.
According to the technical scheme, if a user encounters the condition of NFC function abnormality in the process of using the electronic equipment, the software problem can be solved through the function of one-key repair after the user wants to take off or maintain the electronic equipment; when the production department finds out the software problem, the problem can be solved by the function of one-key repair; when the testing department encounters the problem of NFC abnormality, the problem can be solved through one-key repair, so that the upgrade, self-grinding and maintenance cost and the user feedback rate related to NFC can be reduced, the flexibility of NFC function problem repair can be improved, and the accuracy and repair efficiency of analyzing the problem can be accelerated.
Fig. 3 is a block diagram of a processing device for NFC cards according to an example embodiment. As shown in fig. 3, the apparatus is applied to an electronic device, and the processing apparatus 1200 of the NFC function mainly includes:
A first starting module 601 configured to start a repair function for an NFC function of an electronic device when a trigger operation for repairing the NFC function of the electronic device is detected;
And the repair module 602 is configured to repair the NFC function of the electronic device based on a repair script pre-stored in the electronic device if the repair function is successfully started.
In some embodiments, the apparatus 600 further comprises:
A determining module configured to determine repair tasks of the NFC function of the electronic device and priorities of the repair tasks based on failure information of the NFC function of the electronic device;
The adding module is configured to add the repair task to a preset task set;
And the repair module is configured to execute each repair task in the preset task set according to the priority of each repair task.
In some embodiments, the apparatus 600 further comprises:
the first updating module is configured to update the repair identifier of the NFC function of the electronic device to a first identifier after the repair task is added to the preset task set;
The second updating module is configured to update the repair identifier of the NFC function of the electronic device to a second identifier after the NFC function of the electronic device is successfully repaired;
The first identifier is used for representing that the NFC function of the electronic equipment is to be repaired, and the second identifier is used for representing that the NFC function of the electronic equipment is repaired.
In some embodiments, the apparatus 600 further comprises:
The second starting module is configured to restart the NFC function of the electronic device after updating the repair identifier of the NFC function of the electronic device to the first identifier;
an acquisition module configured to acquire firmware state information of the controller for controlling an NFC function of the electronic device;
the repair module is configured to:
And if the firmware state of the controller is determined to be abnormal according to the firmware state information, repairing the firmware of the controller based on the repairing script.
In some embodiments, the repair module 602 is configured to:
restoring the function parameters of the NFC function of the electronic equipment to initial settings;
And after the function parameters of the NFC function of the electronic equipment are restored to the initial setting, repairing the firmware of the controller based on the repairing script.
In some embodiments, the apparatus 600 further comprises:
And the third starting module is configured to start the NFC function of the electronic equipment after the NFC function of the electronic equipment is successfully repaired.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 4 is a block diagram showing a hardware configuration of a processing apparatus of an NFC function according to an exemplary embodiment. For example, apparatus 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 4, apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the apparatus 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen between the device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 800 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the apparatus 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, an orientation or acceleration/deceleration of the device 800, and a change in temperature of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices, either in a wired or wireless manner. The apparatus 800 may access a wireless network based on a communication standard, such as WI-FI,4G, or 8G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of apparatus 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of a processing device of an NFC functionality, causes the processing device of the NFC functionality to perform a method of processing of the NFC functionality, the method being applied to an electronic device and comprising:
When detecting triggering operation for repairing the NFC function of the electronic equipment, starting the repairing function aiming at the NFC function of the electronic equipment;
And under the condition that the repair function is successfully started, repairing the NFC function of the electronic equipment based on a repair script pre-stored in the electronic equipment.
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 disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general 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 (12)

1. The processing method of the NFC function is characterized by being applied to electronic equipment and comprising the following steps of:
When detecting triggering operation for repairing the NFC function of the electronic equipment, starting the repairing function aiming at the NFC function of the electronic equipment;
Under the condition that the repair function is successfully started, repairing the NFC function of the electronic equipment based on a repair script pre-stored in the electronic equipment; the method further comprises the steps of:
Determining a repair task of the NFC function of the electronic device based on fault information of the NFC function of the electronic device;
Adding the repair task to a preset task set;
after the repair task is added to the preset task set, updating a repair identifier of the NFC function of the electronic device to a first identifier; the first identifier is used for representing that NFC functions of the electronic equipment are to be repaired;
restarting the NFC function of the electronic device after updating the repair identifier of the NFC function of the electronic device to the first identifier;
Acquiring firmware state information of a controller for controlling an NFC function of the electronic device;
the repairing the NFC function of the electronic device based on the repairing script pre-stored in the electronic device includes:
And if the firmware state of the controller is determined to be abnormal according to the firmware state information, repairing the firmware of the controller based on the repairing script.
2. The method of claim 1, wherein the repairing NFC functionality of the electronic device comprises:
and executing each repair task in the preset task set according to the priority of each repair task.
3. The method according to claim 1, wherein the method further comprises:
Updating the repair identifier of the NFC function of the electronic device to a second identifier after the NFC function of the electronic device is successfully repaired;
The second identifier is used for representing that NFC function repair of the electronic device is completed.
4. The method of claim 1, wherein repairing firmware of the controller based on the repair script comprises:
restoring the function parameters of the NFC function of the electronic equipment to initial settings;
And after the function parameters of the NFC function of the electronic equipment are restored to the initial setting, repairing the firmware of the controller based on the repairing script.
5. The method according to any one of claims 1 to 4, further comprising:
After the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device is started.
6. A processing apparatus for NFC functionality, applied to an electronic device, comprising:
The electronic equipment comprises a first starting module, a second starting module and a first triggering module, wherein the first starting module is configured to start a repairing function aiming at the NFC function of the electronic equipment when detecting a triggering operation for repairing the NFC function of the electronic equipment;
The restoration module is configured to restore the NFC function of the electronic equipment based on a restoration script pre-stored in the electronic equipment under the condition that the restoration function is successfully started;
a determining module configured to determine a repair task of an NFC function of the electronic device based on failure information of the NFC function of the electronic device;
The adding module is configured to add the repair task to a preset task set;
the first updating module is configured to update the repair identifier of the NFC function of the electronic device to a first identifier after the repair task is added to the preset task set; the first identifier is used for representing that NFC functions of the electronic equipment are to be repaired;
The second starting module is configured to restart the NFC function of the electronic device after updating the repair identifier of the NFC function of the electronic device to the first identifier;
an acquisition module configured to acquire firmware state information of the controller for controlling an NFC function of the electronic device;
the repair module is configured to:
And if the firmware state of the controller is determined to be abnormal according to the firmware state information, repairing the firmware of the controller based on the repairing script.
7. The apparatus of claim 6, wherein the repair module is configured to execute each of the repair tasks in the set of preset tasks according to a priority of each of the repair tasks.
8. The apparatus of claim 6, wherein the apparatus further comprises:
The second updating module is configured to update the repair identifier of the NFC function of the electronic device to a second identifier after the NFC function of the electronic device is successfully repaired;
The second identifier is used for representing that NFC function repair of the electronic device is completed.
9. The apparatus of claim 6, wherein the repair module is configured to:
restoring the function parameters of the NFC function of the electronic equipment to initial settings;
And after the function parameters of the NFC function of the electronic equipment are restored to the initial setting, repairing the firmware of the controller based on the repairing script.
10. The apparatus according to any one of claims 6 to 9, further comprising:
And the third starting module is configured to start the NFC function of the electronic equipment after the NFC function of the electronic equipment is successfully repaired.
11. A processing apparatus for NFC functionality, comprising:
A processor;
A memory configured to store processor-executable instructions;
wherein the processor is configured to: steps in a processing method that when executed implements the NFC functionality of any of the above claims 1 to 5.
12. A non-transitory computer readable storage medium, which when executed by a processor of a processing device of an NFC functionality, causes the device to perform the steps in the processing method of any of the above claims 1 to 5.
CN202110831459.6A 2021-07-22 2021-07-22 NFC function processing method, NFC function processing device and storage medium Active CN113590382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110831459.6A CN113590382B (en) 2021-07-22 2021-07-22 NFC function processing method, NFC function processing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110831459.6A CN113590382B (en) 2021-07-22 2021-07-22 NFC function processing method, NFC function processing device and storage medium

Publications (2)

Publication Number Publication Date
CN113590382A CN113590382A (en) 2021-11-02
CN113590382B true CN113590382B (en) 2024-09-03

Family

ID=78248999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110831459.6A Active CN113590382B (en) 2021-07-22 2021-07-22 NFC function processing method, NFC function processing device and storage medium

Country Status (1)

Country Link
CN (1) CN113590382B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102857358A (en) * 2011-06-29 2013-01-02 环旭电子股份有限公司 Customer premise equipment capable of repairing firmware and firmware repairing method of customer premise equipment
CN109067893A (en) * 2018-08-22 2018-12-21 北京小米移动软件有限公司 Smart machine fault handling method, device, terminal and server

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8140837B2 (en) * 2008-11-05 2012-03-20 International Business Machines Corporation Automatically making selective changes to firmware or configuration settings
CN110781699B (en) * 2019-10-31 2023-09-26 天星数科科技有限公司 NFC card switching method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102857358A (en) * 2011-06-29 2013-01-02 环旭电子股份有限公司 Customer premise equipment capable of repairing firmware and firmware repairing method of customer premise equipment
CN109067893A (en) * 2018-08-22 2018-12-21 北京小米移动软件有限公司 Smart machine fault handling method, device, terminal and server

Also Published As

Publication number Publication date
CN113590382A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
EP3848795A1 (en) Firmware upgrade method and device, and storage medium
EP2993582B1 (en) Method, apparatus and device for upgrading an operating system of a terminal device
US9800666B2 (en) Method and client terminal for remote assistance
CN110231901B (en) Application interface display method and device
CN104536891A (en) Method and device for testing system
EP3016349A1 (en) Method and apparatus for verifying terminal and computer program product
CN105094904A (en) Application program installation method and device
CN109521923B (en) Floating window control method and device and storage medium
CN114218005A (en) Equipment fault detection and repair processing method, device and equipment
CN109684112B (en) Program file operation method, device, terminal and storage medium
CN110852163A (en) Binding method and device
US10671827B2 (en) Method and device for fingerprint verification
CN108829532B (en) Fingerprint detection method, device and readable storage medium
CN107273173B (en) Fingerprint sensor control method and device and storage medium
CN113590382B (en) NFC function processing method, NFC function processing device and storage medium
CN106648392B (en) The method and device of pasting data
CN112383661B (en) Mobile terminal automatic test method and device, electronic equipment and storage medium
CN106155863A (en) Terminal anticipatory behavior control method and terminal
CN106533841A (en) Method, apparatus and system for testing protocol consistency of user identification module cards
CN108132782B (en) Automatic programming device and electronic equipment
CN112631695A (en) Data verification method and device, electronic equipment and storage medium
CN106709285B (en) Display method and device of application lock interface
CN107728909B (en) Information processing method and device
CN108334357B (en) Intelligent terminal and flashing method thereof
CN111240875B (en) Network exception handling method, device and storage medium

Legal Events

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