NFC function processing method, device and storage medium
By detecting the trigger repair operation in the electronic device and using the repair script to repair the NFC function, it solves the problem of abnormal NFC function that is difficult to repair, improves the user experience and reduces maintenance costs, and achieves the stability and convenience of the NFC function. .
Patent Information
- Application Number
- CN202110831459.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-22
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-07-22
AI Technical Summary
In the process of using the NFC function of electronic devices, users often encounter problems such as card opening, recharge, and card swiping failures. Moreover, because it is difficult to reproduce and accurately locate the problem site, NFC function abnormalities are difficult to repair.
Provide an NFC function processing method and device. By detecting the trigger repair operation, start the repair function, and use the pre-existing repair script to repair the NFC function of the electronic device, including determining fault information, prioritizing, and executing repair tasks. and repair the controller's firmware if necessary.
It reduces the possibility of users requesting to return the machine or return it to the factory for repair, improves user experience, reduces the maintenance cost of electronic equipment, and improves the stability and ease of use of the NFC function.
Smart Images

Figure CN113590382B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer communications, and in particular to a method, device and storage medium for processing NFC functions. Background Art
[0002] Near Field Communication (NFC), also known as short-range wireless communication, is a high-frequency wireless communication technology used to achieve contactless data transmission between devices. With the continuous improvement of NFC technology, the application of NFC technology in electronic devices has become popular. Based on the NFC chip in electronic devices, short-range communication between different card readers can be achieved. In actual application, due to the diversity of user interaction types in different application scenarios, in order to meet the changing application needs of users, multiple types of NFC functions can be built into electronic devices.
[0003] However, when using the NFC function of electronic devices, users often encounter problems such as card activation, recharge, and card swiping failures. These problems are difficult to reproduce. Even if testers or users report such problems and provide error reports, they are often far away from the problem site and cannot accurately determine the time when the problem occurred, making the NFC function abnormality difficult to repair. Summary of the invention
[0004] The present disclosure provides a method, device and storage medium for processing NFC function.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for processing an NFC function is provided, which is applied to an electronic device and includes:
[0006] When a triggering operation for repairing the NFC function of the electronic device is detected, starting a repair function for the NFC function of the electronic device;
[0007] When the repair function is successfully started, the NFC function of the electronic device is repaired based on a repair script pre-stored in the electronic device.
[0008] Optionally, the method further includes:
[0009] Determining, based on the fault information of the NFC function of the electronic device, a repair task of the NFC function of the electronic device and a priority of each of the repair tasks;
[0010] Adding the repair task to a preset task set;
[0011] The repairing of the NFC function of the electronic device includes:
[0012] Execute each of the repair tasks in the preset task set according to the priority of each of the repair tasks.
[0013] Optionally, the method further includes:
[0014] After adding the repair task to the preset task set, updating the repair identifier of the NFC function of the electronic device to a first identifier;
[0015] After the NFC function of the electronic device is successfully repaired, updating the repair identifier of the NFC function of the electronic device to a second identifier;
[0016] The first identifier is used to indicate that the NFC function of the electronic device needs to be repaired, and the second identifier is used to indicate that the repair of the NFC function of the electronic device is complete.
[0017] Optionally, the method further includes:
[0018] After updating the repair identifier of the NFC function of the electronic device to the first identifier, restarting the NFC function of the electronic device;
[0019] Acquire firmware status information of a controller for controlling an NFC function of the electronic device;
[0020] The repairing of the NFC function of the electronic device based on the repair script pre-stored in the electronic device includes:
[0021] If it is determined according to the firmware status information that the firmware status of the controller is abnormal, the firmware of the controller is repaired based on the repair script.
[0022] Optionally, repairing the firmware of the controller based on the repair script includes:
[0023] Restoring the function parameters of the NFC function of the electronic device to the initial settings;
[0024] After restoring the function parameters of the NFC function of the electronic device to the initial settings, the firmware of the controller is repaired based on the repair script.
[0025] Optionally, the method further includes:
[0026] After the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device is activated.
[0027] According to a second aspect of an embodiment of the present disclosure, there is provided a device for processing an NFC function, which is applied to an electronic device, including:
[0028] A first starting module, configured to start a repair function for the NFC function of the electronic device when a triggering operation for repairing the NFC function of the electronic device is detected;
[0029] The repair module is configured to repair the NFC function of the electronic device based on a repair script pre-stored in the electronic device when the repair function is successfully started.
[0030] Optionally, the device further comprises:
[0031] a determination module configured to determine, based on the fault information of the NFC function of the electronic device, a repair task of the NFC function of the electronic device and a priority of each of the repair tasks;
[0032] The adding module is configured to add the repair task to the preset task set; the repair module is configured to execute each of the repair tasks in the preset task set according to the priority of each of the repair tasks.
[0033] Optionally, the device further comprises:
[0034] A first updating module, configured to update the repair identifier of the NFC function of the electronic device to a first identifier after adding the repair task to the preset task set;
[0035] A second updating module is configured to update the repair identifier of the NFC function of the electronic device to a second identifier after successfully repairing the NFC function of the electronic device;
[0036] The first identifier is used to indicate that the NFC function of the electronic device needs to be repaired, and the second identifier is used to indicate that the repair of the NFC function of the electronic device is complete.
[0037] Optionally, the device further comprises:
[0038] The second startup module is configured such that the device further includes:
[0039] a second starting module, 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;
[0040] an acquisition module, configured to acquire firmware status information of the controller for controlling the NFC function of the electronic device;
[0041] The repair module is configured as follows:
[0042] If it is determined according to the firmware status information that the firmware status of the controller is abnormal, the firmware of the controller is repaired based on the repair script.
[0043] Optionally, the repair module is configured as follows:
[0044] Restoring the function parameters of the NFC function of the electronic device to the initial settings;
[0045] After restoring the function parameters of the NFC function of the electronic device to the initial settings, the firmware of the controller is repaired based on the repair script.
[0046] Optionally, the device further comprises:
[0047] The third starting module is configured to start the NFC function of the electronic device after successfully repairing the NFC function of the electronic device.
[0048] According to a third aspect of an embodiment of the present disclosure, there is provided a device for processing an NFC function, including:
[0049] processor;
[0050] a memory configured to store processor-executable instructions;
[0051] The processor is configured to: implement the steps in any one of the NFC function processing methods in the first aspect when executed.
[0052] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an NFC function processing device, the device is enabled to perform the steps in any one of the NFC function processing methods in the first aspect above.
[0053] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0054] In the disclosed embodiments, based on a detected trigger operation for repairing the NFC function of the electronic device, a repair function for the NFC function of the electronic device can be started, and when the repair function is successfully started, the NFC function of the electronic device can be repaired based on a repair script pre-stored in the electronic device, thereby reducing the possibility of users requesting a return of the device or returning the device to the factory for repair due to non-hardware issues, thereby improving the user experience of using the electronic device and reducing the repair cost of the electronic device.
[0055] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0057] Figure 1 The following is a flow chart of a method for processing an NFC function according to an exemplary embodiment. Figure 1 .
[0058] Figure 2 The following is a flow chart of a method for processing an NFC function according to an exemplary embodiment. Figure 2 .
[0059] Figure 3 The present invention is a block diagram of a processing device for an NFC card according to an exemplary embodiment.
[0060] Figure 4 The present invention is a hardware structure block diagram of a NFC function processing device according to an exemplary embodiment. DETAILED DESCRIPTION
[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0062] Figure 1 The following is a flow chart of a method for processing an NFC function according to an exemplary embodiment. Figure 1 ,like Figure 1 As shown, the method is applied to electronic equipment and mainly includes the following steps:
[0063] In step 101, when a triggering operation for repairing the NFC function of the electronic device is detected, a repair function for the NFC function of the electronic device is started;
[0064] In step 102, when the repair function is successfully started, the NFC function of the electronic device is repaired based on a repair script pre-stored in the electronic device.
[0065] In the embodiments of the present disclosure, an electronic device with NFC function can be simulated as an NFC card, such as an access card, a bank card, a bus card, etc., wherein the electronic device with NFC function can be an electronic device equipped with an NFC chip. Here, the electronic device includes a mobile terminal, wherein the mobile terminal includes: a mobile phone, a tablet computer, a wearable electronic device, etc. In some embodiments, an application program can be written through an NFC chip installed on an electronic device, and different NFC functions can be implemented through the application program, for example, different types of card swiping functions can be implemented, etc.
[0066] During use, the electronic device simulated as an NFC card can be brought close to the card reader to perform short-range communication interaction with the card reader. Here, an NFC card swiping system can be set in the card reader so that the card reader can perform near-field communication interaction with the electronic device simulated as an NFC card based on the NFC card swiping system. The NFC card swiping system set in the card reader can be an access control system, a payment system, a public transportation system, etc. For example, when the NFC card swiping system set in the card reader is an access control system, the electronic device with NFC function can be simulated as an access control card; when the NFC card swiping system set in the card reader is a payment system, the electronic device with NFC function can be simulated as a bank card; when the NFC card swiping system set in the card reader is a public transportation system, the electronic device with NFC function can be simulated as a public transportation card.
[0067] However, in the process of implementing the NFC function of the electronic device, errors may occur in the analysis of the application, which may cause the NFC function of the electronic device to be abnormal. For example, it may cause problems such as card activation, recharge, card swiping or card reading failure.
[0068] In the disclosed embodiment, a repair function for the NFC function of the electronic device can be started based on a detected trigger operation for repairing the NFC function of the electronic device, and when the repair function is successfully started, the NFC function of the electronic device can be repaired based on a repair script pre-stored in the electronic device.
[0069] In some embodiments, a 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. Wherein, starting the repair function for the NFC function of the electronic device includes: calling a repair script pre-stored in the electronic device, that is, successfully calling the repair script pre-stored in the electronic device indicates that the NFC function of the electronic device 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.
[0070] For example, a first control may be set on the display interface, and in some embodiments, the first control may be identified by text. In other optional embodiments, the first control may also be identified by a pattern, a geometric shape, etc., as long as it is easy for the user to recognize that the first control is a trigger operation input by the user for repairing the NFC function of the electronic device. In some embodiments, the trigger operation may include: a click operation, a long press operation, or a sliding operation, etc., which is not specifically limited here.
[0071] 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, for example, the first confirmation information and the second control may be output in the form of a pop-up box. The first confirmation information is used to display the fault information to be confirmed to the user, and if the fault information to be confirmed is accurate, the user can input the first confirmation operation through the second control. After detecting the first confirmation operation, the electronic device may output the second confirmation information and the third control on the display interface.
[0072] After the user inputs the first confirmation operation through the second control, the electronic device can output the second confirmation information and the third control on the display interface, for example, the third confirmation information and the third control can be output in the form of a pop-up box. Among them, the third confirmation information is used to display repair-related prompt information to the user. If the user determines that the NFC function of the electronic device is to be repaired, the second confirmation operation can be input through the third control. After the electronic device detects the second confirmation operation, the NFC function of the electronic device can be repaired based on the repair script.
[0073] In other embodiments, the user may also input a trigger operation by means 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 started through the trigger operation.
[0074] It should be noted that the trigger operation can be input when the NFC function of the electronic device is used abnormally, or when the NFC function of the electronic device is used normally. In other words, the user can actively repair the NFC function of the electronic device, or repair the NFC of the electronic device when the NFC function of the electronic device is used abnormally.
[0075] In other embodiments, when the repair function of the NFC function of the electronic device is successfully started, a prompt message indicating that the repair function of the NFC function of the electronic device is successfully started may be output.
[0076] In the embodiment of the present disclosure, when the repair function is successfully started, the NFC function of the electronic device can be repaired based on a repair script pre-stored in the electronic device, wherein the repair script includes an executable program written in a set format.
[0077] In the process of repairing the NFC function of the electronic device, the original application written in the NFC chip can be updated based on the executable program in the repair script to repair the NFC function of the electronic device. For example, all the original applications written in the NFC chip can be directly replaced 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 can be determined from the repair script, and the original application written in the NFC chip can be updated based on the repair program.
[0078] In some embodiments, when it is detected that an abnormality occurs in the NFC function of the electronic device, the first control may be automatically output based on the display interface, and it may be detected whether there is a trigger operation acting on the first control.
[0079] In the disclosed embodiments, based on a detected trigger operation for repairing the NFC function of the electronic device, a repair function for the NFC function of the electronic device can be started, and when the repair function is successfully started, the NFC function of the electronic device can be repaired based on a repair script pre-stored in the electronic device, thereby reducing the possibility of users requesting a return of the device or returning the device to the factory for repair due to non-hardware issues, thereby improving the user experience of using the electronic device and reducing the repair cost of the electronic device.
[0080] In some embodiments, the method further comprises:
[0081] Determining, based on the fault information of the NFC function of the electronic device, a repair task of the NFC function of the electronic device and a priority of each of the repair tasks;
[0082] Adding the repair task to a preset task set;
[0083] The repairing of the NFC function of the electronic device includes:
[0084] Execute each of the repair tasks in the preset task set according to the priority of each of the repair tasks.
[0085] Here, when the NFC function of the electronic device is abnormal, the electronic device can detect the application related to the NFC function, and determine the fault information of the NFC function of the electronic device based on the detection result. After the fault information is determined, the corresponding repair task can be determined. For example, if the fault is a card swiping failure, a repair task related to the card swiping can be determined; if the fault is a recharge failure, a repair task related to the recharge can be determined; if the fault is a card opening failure, a repair task related to the card opening can be determined.
[0086] In the disclosed embodiment, after determining each repair task, the priority of each repair task can also be determined according to the fault information, wherein the priority of the repair task can be determined according to the fault type, such as the 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, etc. For another example, the priority of the repair task related to card opening can be higher than the priority of the repair task related to card swiping, and the priority of the repair task related to card swiping can be higher than the priority of the repair task related to recharge, which can be set according to the needs and is not specifically limited here.
[0087] In the embodiment of the present disclosure, after the repair task is determined, the repair task can be added to a preset task set. Since the priority of each repair task has been determined based on the fault information, in the process of repairing the NFC function of the electronic device, each repair task in the preset task set can be executed according to the priority of each repair task, thereby completing the repair of the NFC function of the electronic device.
[0088] In the disclosed embodiment, in the process of repairing the NFC function of the electronic device, the priority of each repair task can be sorted according to the fault information, and the corresponding repair task can be executed in order of priority, so that the normal use of the NFC function of the electronic device can be guaranteed on the basis of realizing the repair of the NFC function of the electronic device. For example, if both the card swiping function and the recharge function of the electronic device are abnormal, the card swiping function can be repaired first, so that the user can use the card swiping function normally. Of course, in other usage scenarios, the recharge function can also be repaired first. The specific priority order can be flexibly switched according to different scenarios, and is not specifically limited here.
[0089] In some embodiments, the method further comprises:
[0090] After adding the repair task to the preset task set, updating the repair identifier of the NFC function of the electronic device to a first identifier;
[0091] After the NFC function of the electronic device is successfully repaired, updating the repair identifier of the NFC function of the electronic device to a second identifier;
[0092] The first identifier is used to indicate that the NFC function of the electronic device needs to be repaired, and the second identifier is used to indicate that the repair of the NFC function of the electronic device is complete.
[0093] In the embodiment of the present disclosure, after the repair task is added to the preset task set, it indicates that there is a repair task that needs to be executed. At this time, the repair identifier of the NFC function of the electronic device can be updated to the first identifier, which is used to indicate that the NFC function of the electronic device is to be repaired. The first identifier can be represented by letters or numbers, for example, the first identifier can be "true".
[0094] After the NFC function of the electronic device is successfully repaired, it indicates that there is no repair task that needs to be performed. At this time, the repair indicator of the NFC function of the electronic device can be updated to a second indicator to indicate that the repair of the NFC function of the electronic device is completed. The second indicator can be represented by letters or numbers, for example, the second indicator can be "false".
[0095] In the embodiment of the present disclosure, the repair status of the NFC function of the electronic device is represented by the first identifier and the second identifier, so that the electronic device can perform corresponding operations according to the corresponding identifier, thereby improving the flexibility of the electronic device in processing the NFC function.
[0096] In some embodiments, the method further comprises:
[0097] After updating the repair identifier of the NFC function of the electronic device to the first identifier, restarting the NFC function of the electronic device;
[0098] Acquire firmware status information of a controller for controlling an NFC function of the electronic device;
[0099] The repairing of the NFC function of the electronic device based on the repair script pre-stored in the electronic device includes:
[0100] If it is determined according to the firmware status information that the firmware status of the controller is abnormal, the firmware of the controller is repaired based on the repair script.
[0101] Here, after the repair identifier of the NFC function of the electronic device is updated to the first identifier, it indicates that there is a repair task that needs to be performed. At this time, in order to reduce the impact of the currently running application related to the NFC function on the repair process, the NFC function of the electronic device can be restarted, specifically: turn off the NFC function of the electronic device, and after turning off the NFC function of the electronic device, restart the NFC function of the electronic device.
[0102] After the NFC function of the electronic device is restarted, firmware status information of a controller for controlling the NFC function of the electronic device may be acquired, wherein the firmware status information indicates a current status of the firmware of the controller.
[0103] In the disclosed embodiment, when it is determined 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, the parameter state repair_pass inside the firmware of the controller can be obtained. If repair_pass=0, it means that the firmware state of the controller is abnormal. At this time, the firmware of the controller can be repaired based on the repair script. The repair script includes an executable program written in a set format.
[0104] In the process of repairing the firmware of the controller of the electronic device, the original application program written in the firmware can be updated based on the executable program in the repair script. For example, all the original application programs written in the firmware can be directly replaced based on the executable program in the repair script.
[0105] Through the technical solution disclosed in the present invention, when a user uses an electronic device, if he encounters a situation where card activation, recharging, or card swiping fails due to an NFC firmware status error, the controller's firmware can be repaired based on a repair script, thereby improving the stability of the NFC function.
[0106] In some embodiments, repairing the firmware of the controller based on the repair script includes:
[0107] Restoring the function parameters of the NFC function of the electronic device to the initial settings;
[0108] After restoring the function parameters of the NFC function of the electronic device to the initial settings, the firmware of the controller is repaired based on the repair script.
[0109] In an embodiment of the present disclosure, when it is determined that the firmware of the controller is abnormal, the functional parameters of the NFC function of the electronic device can be restored to the initial settings, that is, the NFC function of the electronic device can be initialized, and after the functional parameters of the NFC function of the electronic device are restored to the initial settings, the firmware of the controller can be repaired based on the repair script.
[0110] For example, initializing the functional parameters of the NFC function of the electronic device may include: restoring the NFC function of the electronic device to the factory settings. By restoring the NFC function of the electronic device to the factory settings, the possibility of new problems arising during the repair process can be reduced, and the repair efficiency of the NFC function of the electronic device can be improved.
[0111] In some embodiments, the method further comprises:
[0112] After the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device is activated.
[0113] In the disclosed embodiment, after the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device can be automatically started, so that the user can directly use the NFC function of the electronic device, thereby improving the convenience of the user in using the electronic device.
[0114] For example, if the repair operation is performed during the process of executing a card swipe function through an electronic device, the card swipe function of the electronic device can be automatically started after the card swipe function of the electronic device is successfully repaired. For another example, if the repair operation is performed during the process of executing a recharge function through an electronic device, the recharge function of the electronic device can be automatically started after the recharge function of the electronic device is successfully repaired.
[0115] Figure 2 The following is a flow chart of a method for processing an NFC function according to an exemplary embodiment. Figure 2 ,like Figure 2 As shown, the method is applied to electronic equipment and mainly includes the following steps:
[0116] In step 501, a triggering operation for repairing an NFC function of an electronic device is detected.
[0117] In some embodiments, a 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. Wherein, starting the repair function for the NFC function of the electronic device includes: calling a repair script pre-stored in the electronic device, that is, successfully calling the repair script pre-stored in the electronic device indicates that the NFC function of the electronic device 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.
[0118] In step 502, whether a confirmation operation is detected.
[0119] After detecting the trigger 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 the form of a pop-up box. The first confirmation information is used to display the fault information to be confirmed to the user, and if the fault information to be confirmed is accurate, the user can input the first confirmation operation through the second control. After detecting the first confirmation operation, the electronic device may output the second confirmation information and the third control on the display interface.
[0120] For example, the third confirmation information and the third control may be output in a pop-up window, wherein the third confirmation information is used to display repair-related prompt information to the user, and when the user determines to repair the NFC function of the electronic device, the second confirmation operation may be input through the third control.
[0121] In step 503, when the confirmation operation is detected, a repair function for the NFC function of the electronic device is started.
[0122] After the electronic device detects the second confirmation operation, a repair function for the NFC function of the electronic device may be started.
[0123] In step 504, when the repair function is successfully started, the repair task is added to the preset task set.
[0124] Here, when the NFC function of the electronic device is abnormal, the electronic device can detect the application related to the NFC function, and determine the fault information of the NFC function of the electronic device based on the detection result. After the fault information is determined, the corresponding repair task can be determined. For example, if the fault is a card swiping failure, a repair task related to the card swiping can be determined; if the fault is a recharge failure, a repair task related to the recharge can be determined; if the fault is a card opening failure, a repair task related to the card opening can be determined.
[0125] In the embodiment of the present disclosure, after the repair task is determined, the repair task can be added to a preset task set. Since the priority of each repair task has been determined based on the fault information, in the process of repairing the NFC function of the electronic device, each repair task in the preset task set can be executed according to the priority of each repair task, thereby completing the repair of the NFC function of the electronic device.
[0126] In step 505, the repair identifier of the NFC function of the electronic device is updated to the first identifier.
[0127] In the embodiment of the present disclosure, after the repair task is added to the preset task set, it indicates that there is a repair task that needs to be executed. At this time, the repair identifier of the NFC function of the electronic device can be updated to the first identifier, which is used to indicate that the NFC function of the electronic device is to be repaired. The first identifier can be represented by letters or numbers, for example, the first identifier can be "true".
[0128] In step 506, the NFC function of the electronic device is restarted.
[0129] Here, after the repair identifier of the NFC function of the electronic device is updated to the first identifier, it indicates that there is a repair task that needs to be performed. At this time, in order to reduce the impact of the currently running application related to the NFC function on the repair process, the NFC function of the electronic device can be restarted, specifically: turn off the NFC function of the electronic device, and after turning off the NFC function of the electronic device, restart the NFC function of the electronic device.
[0130] In step 507, it is determined whether the firmware state of the controller is abnormal according to the firmware state information.
[0131] After the NFC function of the electronic device is restarted, firmware status information of a controller for controlling the NFC function of the electronic device may be acquired, wherein the firmware status information indicates a current status of the firmware of the controller.
[0132] In step 508, if the firmware status of the controller is abnormal, the function parameters of the NFC function of the electronic device are restored to the initial settings.
[0133] In an embodiment of the present disclosure, when it is determined that the firmware of the controller is abnormal, the functional parameters of the NFC function of the electronic device can be restored to the initial settings, that is, the NFC function of the electronic device can be initialized, and after the functional parameters of the NFC function of the electronic device are restored to the initial settings, the firmware of the controller can be repaired based on the repair script.
[0134] In step 509, the firmware of the controller is repaired based on the repair script.
[0135] In the process of repairing the firmware of the controller of the electronic device, the original application program written in the firmware can be updated based on the executable program in the repair script. For example, all the original application programs written in the firmware can be directly replaced based on the executable program in the repair script.
[0136] In step 510, after the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device is enabled.
[0137] In the disclosed embodiment, after the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device can be automatically started, so that the user can directly use the NFC function of the electronic device, thereby improving the convenience of the user in using the electronic device.
[0138] In step 511, the repair identifier of the NFC function of the electronic device is updated to a second identifier.
[0139] After the NFC function of the electronic device is successfully repaired, it indicates that there is no repair task that needs to be performed. At this time, the repair indicator of the NFC function of the electronic device can be updated to a second indicator to indicate that the repair of the NFC function of the electronic device is completed. The second indicator can be represented by letters or numbers, for example, the second indicator can be "false".
[0140] In the embodiment of the present disclosure, the repair status of the NFC function of the electronic device is represented by the first identifier and the second identifier, so that the electronic device can perform corresponding operations according to the corresponding identifier, thereby improving the flexibility of the electronic device in processing the NFC function.
[0141] Through the technical solution disclosed in the present invention, if a user encounters an abnormal NFC function during the use of an electronic device and hopes to return the device or have it repaired, the after-sales service can solve the software problem through the one-click repair function; when the production department finds a software problem, it can also be solved through the one-click repair function; when the testing department encounters an abnormal NFC problem, it can also be solved through the one-click repair function, thereby reducing the upgrade, self-research, and maintenance costs, as well as the user feedback rate related to NFC, and can also improve the flexibility of repairing NFC function problems, and speed up the accuracy of problem analysis and repair efficiency.
[0142] Figure 3 FIG. 1 is a block diagram of a processing device for an NFC card according to an exemplary embodiment. Figure 3 As shown, the device is applied to an electronic device, and the NFC function processing device 1200 mainly includes:
[0143] A first starting module 601 is configured to start a repair function for the NFC function of the electronic device when a trigger operation for repairing the NFC function of the electronic device is detected;
[0144] 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 when the repair function is successfully started.
[0145] In some embodiments, the apparatus 600 further includes:
[0146] a determination module configured to determine, based on the fault information of the NFC function of the electronic device, a repair task of the NFC function of the electronic device and a priority of each of the repair tasks;
[0147] An adding module, configured to add the repair task to a preset task set;
[0148] The repair module is configured to execute each of the repair tasks in the preset task set according to the priority of each of the repair tasks.
[0149] In some embodiments, the apparatus 600 further includes:
[0150] A first updating module, configured to update the repair identifier of the NFC function of the electronic device to a first identifier after adding the repair task to the preset task set;
[0151] A second updating module is configured to update the repair identifier of the NFC function of the electronic device to a second identifier after successfully repairing the NFC function of the electronic device;
[0152] The first identifier is used to indicate that the NFC function of the electronic device needs to be repaired, and the second identifier is used to indicate that the repair of the NFC function of the electronic device is complete.
[0153] In some embodiments, the apparatus 600 further includes:
[0154] a second starting module, 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;
[0155] an acquisition module, configured to acquire firmware status information of the controller for controlling the NFC function of the electronic device;
[0156] The repair module is configured as follows:
[0157] If it is determined according to the firmware status information that the firmware status of the controller is abnormal, the firmware of the controller is repaired based on the repair script.
[0158] In some embodiments, the repair module 602 is configured to:
[0159] Restoring the function parameters of the NFC function of the electronic device to the initial settings;
[0160] After restoring the function parameters of the NFC function of the electronic device to the initial settings, the firmware of the controller is repaired based on the repair script.
[0161] In some embodiments, the apparatus 600 further includes:
[0162] The third starting module is configured to start the NFC function of the electronic device after successfully repairing the NFC function of the electronic device.
[0163] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0164] Figure 4 800 is a hardware structure block diagram of a NFC function processing device according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0165] Reference Figure 4 , the device 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 .
[0166] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0167] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 disk or optical disk.
[0168] The power component 806 provides power to the various components of the device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0169] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. 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 the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect 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. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0170] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0171] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0172] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical 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 accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0173] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WI-FI, 4G or 8G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0174] 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 components to perform the above method.
[0175] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0176] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an NFC function processing device, enables the NFC function processing device to perform an NFC function processing method, the method being applied to an electronic device, comprising:
[0177] When a triggering operation for repairing the NFC function of the electronic device is detected, starting a repair function for the NFC function of the electronic device;
[0178] When the repair function is successfully started, the NFC function of the electronic device is repaired based on a repair script pre-stored in the electronic device.
[0179] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0180] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for processing an NFC function, characterized in that: Used in electronic equipment, including: When a triggering operation for repairing the NFC function of the electronic device is detected, starting a repair function for the NFC function of the electronic device; When the repair function is successfully started, the NFC function of the electronic device is repaired based on a repair script pre-stored in the electronic device; the method further includes: Determining a repair task for the NFC function of the electronic device based on the fault information of the NFC function of the electronic device; Adding the repair task to a preset task set; After adding the repair task to the preset task set, updating the repair identifier of the NFC function of the electronic device to a first identifier; wherein the first identifier is used to indicate that the NFC function of the electronic device needs to be repaired; After updating the repair identifier of the NFC function of the electronic device to the first identifier, restarting the NFC function of the electronic device; Acquire firmware status information of a controller for controlling an NFC function of the electronic device; The repairing of the NFC function of the electronic device based on the repair script pre-stored in the electronic device includes: If it is determined according to the firmware status information that the firmware status of the controller is abnormal, the firmware of the controller is repaired based on the repair script.
2. The method according to claim 1, characterized in that The repairing of the NFC function of the electronic device includes: Execute each of the repair tasks in the preset task set according to the priority of each of the repair tasks.
3. The method according to claim 1, characterized in that The method further comprises: After the NFC function of the electronic device is successfully repaired, updating the repair identifier of the NFC function of the electronic device to a second identifier; The second identifier is used to indicate that the repair of the NFC function of the electronic device is complete.
4. The method according to claim 1, characterized in that: The repairing of the firmware of the controller based on the repair script includes: Restoring the function parameters of the NFC function of the electronic device to the initial settings; After restoring the function parameters of the NFC function of the electronic device to the initial settings, the firmware of the controller is repaired based on the repair script.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: After the NFC function of the electronic device is successfully repaired, the NFC function of the electronic device is activated.
6. A processing device for NFC function, characterized in that: Used in electronic equipment, including: A first starting module, configured to start a repair function for the NFC function of the electronic device when a triggering operation for repairing the NFC function of the electronic device is detected; a repair module, configured to repair the NFC function of the electronic device based on a repair script pre-stored in the electronic device when the repair function is successfully started; a determination module configured to determine a repair task of the NFC function of the electronic device based on the fault information of the NFC function of the electronic device; An adding module, configured to add the repair task to a preset task set; A first updating module is configured to update the repair identifier of the NFC function of the electronic device to a first identifier after adding the repair task to the preset task set; wherein the first identifier is used to indicate that the NFC function of the electronic device needs to be repaired; a second starting module, 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 status information of the controller for controlling the NFC function of the electronic device; The repair module is configured as follows: If it is determined according to the firmware status information that the firmware status of the controller is abnormal, the firmware of the controller is repaired based on the repair script.
7. The device according to claim 6, characterized in that The repair module is configured to execute each of the repair tasks in the preset task set according to the priority of each of the repair tasks.
8. The device according to claim 6, characterized in that The device also includes: A second updating module is configured to update the repair identifier of the NFC function of the electronic device to a second identifier after successfully repairing the NFC function of the electronic device; The second identifier is used to indicate that the repair of the NFC function of the electronic device is complete.
9. The device according to claim 6, characterized in that The repair module is configured as follows: Restoring the function parameters of the NFC function of the electronic device to the initial settings; After restoring the function parameters of the NFC function of the electronic device to the initial settings, the firmware of the controller is repaired based on the repair script.
10. The device according to any one of claims 6 to 9, characterized in that The device also includes: The third starting module is configured to start the NFC function of the electronic device after successfully repairing the NFC function of the electronic device.
11. A processing device for NFC function, characterized in that: include: processor; a memory configured to store processor-executable instructions; The processor is configured to: implement the steps in the processing method of any one of the NFC functions in claims 1 to 5 when executed.
12. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an NFC function processing device, the device is enabled to perform the steps in any one of the NFC function processing methods of claims 1 to 5.
