CN110209415A - Firmware method for refreshing, device and storage medium - Google Patents

Firmware method for refreshing, device and storage medium Download PDF

Info

Publication number
CN110209415A
CN110209415A CN201910457650.1A CN201910457650A CN110209415A CN 110209415 A CN110209415 A CN 110209415A CN 201910457650 A CN201910457650 A CN 201910457650A CN 110209415 A CN110209415 A CN 110209415A
Authority
CN
China
Prior art keywords
firmware
file
data
refreshing
replaced
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.)
Pending
Application number
CN201910457650.1A
Other languages
Chinese (zh)
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.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication 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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201910457650.1A priority Critical patent/CN110209415A/en
Publication of CN110209415A publication Critical patent/CN110209415A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a kind of firmware method for refreshing, device and storage medium, applied to mobile terminal, the mobile terminal is built-in with NFC chip, this method is by obtaining firmware refreshing instruction, and the firmware refreshing instruction carries firmware file to be refreshed, the current firmware file in the NFC chip is obtained further according to firmware refreshing instruction, then target data is determined from firmware file to be refreshed according to firmware file to be refreshed and current firmware file, and data to be replaced are determined from current firmware file, finally replacement data is treated using target data to be replaced, to carry out firmware refreshing to NFC chip, firmware refreshing can be completed without being replaced to entire firmware file, save the time of firmware refreshing, it improves firmware and refreshes efficiency.

Description

Firmware method for refreshing, device and storage medium
Technical field
This application involves field of computer technology more particularly to a kind of firmware method for refreshing, device and storage medium.
Background technique
Near field communication (NFC) (Near Field Communication, NFC) is a kind of the wireless of short distance high frequency Power technology, applied to the data transmission between the multiple equipment in 10 centimetres of distance.NFC uses aggressive mode and Passive Mode two Kind read mode.In the passive mode, initiating equipment (main equipment) starts near-field communication, and provides radiofrequency field (RF-field), Then 106kbps, 212kbps or 424kbps one of which transmission speed are selected, sends data file in target device, Target device does not generate radiofrequency field, and uses load modulation (load modulation) technology, is passed data with identical speed Return initiating equipment.In the active mode, initiating equipment and target device will generate the radiofrequency field of oneself, to be communicated.
Currently, increase NFC technique in most of mobile terminals, be moved easily terminal swipe the card waste, data point To transmission and the data transmission scanned the two-dimensional code.In use, due to complex, firmware inside NFC chip The process that (driver i.e. inside NFC chip) refreshes needs 10 to 30 seconds, and refresh process refers to that mobile terminal will prepare Good driver file is stored into NFC chip, and the subregion in NFC chip, and this refresh process needs to spend more time, Refresh low efficiency, influences using effect.
Summary of the invention
The application provides a kind of firmware method for refreshing, device and storage medium, solves the firmware refresh process of the prior art In need spend more time, refresh low efficiency the problem of.
The application provides a kind of firmware method for refreshing, is applied to mobile terminal, and the mobile terminal is built-in with NFC chip, The described method includes:
Firmware refreshing instruction is obtained, the firmware refreshing instruction carries firmware file to be refreshed;
The current firmware file in the NFC chip is obtained according to the firmware refreshing instruction;
Number of targets is determined from the firmware file to be refreshed according to the firmware file to be refreshed and current firmware file According to and from determining data to be replaced in the current firmware file;
The data to be replaced are replaced using the target data, to carry out firmware refreshing to the NFC chip.
The application also provides a kind of firmware refreshing apparatus, is applied to mobile terminal, and the mobile terminal is built-in with NFC core Piece, the firmware refreshing apparatus include:
First obtains module, and for obtaining firmware refreshing instruction, the firmware refreshing instruction carries firmware file to be refreshed;
Second obtains module, for obtaining the current firmware file in the NFC chip according to the firmware refreshing instruction;
Determining module, for according to the firmware file to be refreshed and current firmware file from the firmware file to be refreshed Middle determining target data and the determining data to be replaced from the current firmware file;
Replacement module, for being replaced using the target data to the data to be replaced, to the NFC chip Carry out firmware refreshing.
The application also provides a kind of computer readable storage medium, and a plurality of instruction is stored in the storage medium, described Instruction is suitable for being loaded by processor to execute the firmware method for refreshing of any of the above-described.
The utility model has the advantages that the application provides a kind of firmware method for refreshing, device and storage medium, it is applied to mobile terminal, it should Mobile terminal is built-in with NFC chip, and this method is by obtaining firmware refreshing instruction, and firmware refreshing instruction carrying is to be refreshed solid Part file obtains the current firmware file in the NFC chip further according to the firmware refreshing instruction, then according to described to be brushed New firmware file and current firmware file determine target data from the firmware file to be refreshed and from the current firmwares Data to be replaced are determined in file, finally the data to be replaced are replaced using the target data, to the NFC Chip carries out firmware refreshing, and firmware refreshing can be completed without being replaced to entire firmware file, save firmware brush It the new time, improves and refreshes efficiency, using effect is good.
Detailed description of the invention
With reference to the accompanying drawing, it is described in detail by the specific embodiment to the application, the technical solution of the application will be made And other beneficial effects are apparent.
Fig. 1 is the application scenarios schematic diagram of NFC chip provided by the embodiments of the present application.
Fig. 2 is the flow diagram of firmware method for refreshing provided by the embodiments of the present application.
Fig. 3 is another flow diagram of firmware method for refreshing provided by the embodiments of the present application.
Fig. 4 is the flow diagram of the step S30 of firmware method for refreshing provided by the embodiments of the present application.
Fig. 5 is the structural schematic diagram of firmware refreshing apparatus provided by the embodiments of the present application.
Fig. 6 is another structural schematic diagram of firmware refreshing apparatus provided by the embodiments of the present application.
Fig. 7 is the structural schematic diagram of mobile terminal provided by the embodiments of the present application.
Fig. 8 is another structural schematic diagram of mobile terminal provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, those skilled in the art's every other implementation obtained without creative efforts Example, shall fall in the protection scope of this application.
The embodiment of the present application in order to facilitate understanding, the communication network terminal being based below to the terminal of the application are retouched It states.
Referring to Fig. 1, the Fig. 1 is a kind of schematic diagram of NFC transmission provided by the embodiments of the present application, including wireless receiving control Control equipment 1 and mobile terminal 2, the mobile terminal be built-in with the wireless receiving control equipment be electrically connected, for receive and Obtain the NFC chip 21 of 2 information of external mobile terminal;
NFC chip 21 incudes 2 information of mobile terminal, and feedback information gives wireless receiving control after carrying out Near Field Communication connection Control equipment 1, then, the wireless receiving control equipment 1 for receiving feedback information handle feedback information, and send control letter Number arrive mobile terminal 2, with carry out mobile terminal 2 and wireless receiving control equipment 1 between data transmit, and mobile terminal 2 with Firmware refreshing can be carried out in wireless receiving control equipment 1, i.e., the driver inside internal NFC chip is refreshed.
But during actual use, it is matched which need to control 1 institute of equipment according to the wireless receiving Agreement refreshes the firmware in the NFC chip 21, i.e., refreshes to the driver inside NFC chip, the refreshing Journey needs 10 to 30 seconds, largely effects on the usage experience of user;The problem of the application takes long time according to the refresh process proposes A kind of firmware method for refreshing, refers to Fig. 2, which is the flow diagram of firmware method for refreshing provided by the embodiments of the present application. The method for refreshing specifically includes:
S10. firmware refreshing instruction is obtained, the firmware refreshing instruction carries firmware file to be refreshed;
Specifically, the firmware refreshing instruction, can generate the firmware refreshing instruction, example according to the flush condition of the mobile terminal Such as, Fig. 3 is referred to, which is another flow diagram of firmware method for refreshing provided by the embodiments of the present application, is obtaining firmware Before refreshing instruction, the generation firmware method for refreshing further include:
S50. the charge value of the mobile terminal is obtained;
Further, the charge value of mobile terminal is obtained, the charge value that can be consumed by detecting the mobile terminal, and according to The charge value accounts for the percentage of the voltameter chip in the mobile terminal, obtains the charge value of the mobile terminal, the mistake determined Journey, which can be, obtains a difference for the charge value that target battery capability value subtracts mobile terminal consumption, which works as mobile terminal Preceding remaining charge value, that is, detect the current value of mobile terminal provided by the embodiments of the present application.For example, target battery capacity is 1000 milliamperes, the battery capacity value of mobile terminal consumption is 100 milliamperes, then it is 90% that the charge value, which can be calculated,.
In the embodiment, the process of a calibration of theoretical cell capacity value can also be increased, improves movement end Cell damage is prevented in end or detects the wrong accuracy of the battery capacity value.
S60. judge whether the charge value reaches default charge value;
Further, above-mentioned default charge value is the minimum battery according to theoretical cell capacity value and the mobile terminal standby What capability value was calculated, the average cell that the process of the calculating can be the smaller batteries capability value for taking the two or take the two is held Magnitude is as default charge value in this.
In some embodiments, cell degradation parameter list is that mobile terminal factory is preceding to battery of mobile terminal progress aging survey Try obtained parameter list, wherein default charge value cell degradation parameter list preset when can be through inquiry battery factory It determines.Changing parameter list may include temperature, battery capacity value, depth of discharge (battery during use, the appearance that battery is released Amount accounts for the percentage of rated capacity), residual electric quantity, (battery does not discharge when opening a way between battery the two poles of the earth battery open circuit voltage Potential difference) etc. parameter informations, formed one estimate charge value, this, which estimates charge value, can guarantee that subsequent firmware refresh process can be protected The sufficient electricity of card carries out firmware method for refreshing provided by the embodiment of the present application.
S70. if the determination result is YES, then the firmware refreshing instruction is generated;
Further, reach default charge value in view of aforementioned charge value, generate firmware brush provided by the embodiment of the present application New command, to carry out the aftermentioned firmware method for refreshing.
It should be pointed out that the firmware method for refreshing that each embodiment of the application provides, it can be by refreshing function with firmware The mobile terminal of energy is realized.The mobile terminal can be smart phone, smart television, tablet computer, E-book reader, MP3 Player Moving Picture Experts Group Audio Layer III1, dynamic image expert's compression standard audio Level 3) and MP4 (oving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard sound Frequency level 4) player etc..
S20. the store path of the current firmware file in the NFC chip is obtained according to the firmware refreshing instruction;
Further, the current firmware file in the NFC chip is obtained according to the firmware refreshing instruction, it is specific to wrap It includes:
S201. according to the firmware refreshing instruction, the store path of the current firmware file is obtained;
Further, which is that the last firmware method for refreshing as provided by the embodiment of the present application refreshes The firmware file saved in the process, it should be pointed out that the current firmware file can be stored in default file library, for example, Additionally subregion goes out a file base area in NFC chip, and for storing the current firmware file, as the embodiment of the present application is mentioned The store path of confession.
S202. according to the store path, the current firmware file is obtained.
Further, it is known that the store path of current firmware file provided by the embodiment of the present application is easy to get to current solid Part file.
S30. mesh is determined from the firmware file to be refreshed according to the firmware file to be refreshed and current firmware file It marks data and determines data to be replaced from the current firmware file;
Specifically, referring to Fig. 4, which is the flow diagram of step S30 provided by the embodiment of the present application, packet It includes:
S301. the firmware file to be refreshed and the current firmware file are subjected to comparison in difference, obtain shared text Number of packages evidence;
The file content seen in the firmware file to be refreshed may be Chinese character, character, it is also possible to which picture etc. is each The kind form of expression directly does difference tracking in a computer than relatively difficult to achieve, in order to do to file content to the content seen Comparison in difference needs in a binary format to save the content of file.
Further, which parses the firmware file to be refreshed and the current firmware file, is formed more The corresponding firmware file block to be refreshed of a and firmware file to be refreshed and multiple current refreshing firmware file is corresponding works as with this Preceding refreshing firmware file block, further, the embodiment of the present application can be blocking according to the fractionation of specified keyword, record each text The size of part block, initial position hereof and knot last bit set, comparison in difference then is carried out to each blocks of files, thus The content of file change is obtained to get the shared blocks of files being previously mentioned to the embodiment of the present application, i.e. shared file data, this Application can also accurately record shared file data using the storage mode of structuring.
For example, when the firmware file to be refreshed of acquisition be { 5,6,7,8,9,10 } when, current firmware file be 1,2,3,4, When 5,6 }, after comparison in difference provided by the embodiments of the present application, obtaining shared data file is { 5,6 }.
S302. the remaining number of files in addition to the shared file data is obtained from the firmware file to be refreshed According to as target data;
For example, when the firmware file to be refreshed is { 5,6,7,8,9,10 }, obtaining shared data file is { 5,6 } When, the remaining file data except the shared file data can be removed from the firmware file to be refreshed, obtain number of targets According to for { 7,8,9,10 }.
S303. the remaining file data in addition to the shared file data is obtained from the current firmware file, As data to be replaced.
For example, when the current firmware file be { 1,2,3,4,5,6 } when, obtain shared data file be { 5,6 } when, can From the remaining file data removed except the shared file data in the current firmware file, obtaining data to be replaced is { 1,2,3,4 }.
S40. the data to be replaced are replaced using the target data, to carry out firmware to the NFC chip Refresh.
Firmware guarantees the normal work of electronic equipment as software most basic in electronic equipment, but certain external causes It will lead to firmware to go wrong, influence the normal work of electronic equipment, therefore this refresh process need to refresh control progress accordingly Firmware refreshes, specifically, the firmware refreshing instruction, which also carries, refreshes control, step S40 is specifically included:
S401. the refreshing control is utilized, the target data is replaced the data to be replaced;
Further, when refreshing firmware, specific brush machine control is usually accessed into mobile terminal, which passes through Driver corresponding with the refreshing control is run to read the firmware file to be refreshed in the mobile terminal, is realized to current The refreshing of firmware file.
S402. the data to be replaced are deleted.
Further, in order to guarantee that the high efficiency of the refresh process needs to delete when being replaced the data to be replaced Former data to be replaced improve the speed of service in the mobile terminal to guarantee to have enough memory spaces in the NFC chip.
For example, when data to be replaced are { 1,2,3,4 }, target data is { 7,8,9,10 }, and after being replaced, original is wait replace It changes data and is substituted for { 7,8,9,10 }, to carry out firmware refreshing to the NFC chip.
In some embodiments, for guarantee the high efficiency of the firmware refresh process and avoid the firmware refresh process because It shuts down and interrupts, when being replaced using the target data to the data to be replaced, further includes:
S80. detect whether the replacement operation interrupts because of mobile terminal shutdown;
Further, 10 to 30 seconds are needed in view of the process of the refreshing, it can battery electricity in the real-time detection mobile terminal Whether amount there is not enough power supply, or by judging that it is extreme that shutting down occurs in the reason of whether mobile terminal occurs other Situation.
S90. if the determination result is YES, then interruption position is marked, and according to the interruption position under the mobile terminal Continue firmware refresh operation when primary booting;
Further, interruption position is marked to mark the step of replacing in the embodiment of the present application, for example, when to be replaced Data are { 1,2,3,4 }, and target data is { 7,8,9,10 }, after being replaced, former data to be replaced be substituted for 7,8,9, 10 } in replacement process, such as the embodiment of the present application is that { will be substituted for 1 for 7, be substituted for 2 for 8,9 are substituted in sequence 3,4 are substituted for by 10 }, when proceeding to " being substituted for 3 for 9 ", replacement process occurs shutdown and interrupts, then marks " by 9 replacements At 3 ", its position is recorded, therefore, recording its interruption position is { be substituted for 1 for 7, be substituted for 2 for 8, be substituted for 3 for 9 }, next When secondary booting, the replacement operation of subsequent " being substituted for 4 for 10 " can be directly carried out according to " being substituted for 3 for 9 ".
If S100. judging result is no, Flushing success prompt is exported.
Further, the embodiment of the present application output Flushing success prompt, can be exported by the output module of mobile terminal, Such as display module shows " Flushing success " or is broadcast by audio-frequency module, to complete the output of output Flushing success prompt.
The application provides a kind of firmware method for refreshing, is applied to mobile terminal, which is built-in with NFC chip, should Method is by obtaining firmware refreshing instruction, and the firmware refreshing instruction carries firmware file to be refreshed, further according to the firmware brush New command obtains the current firmware file in the NFC chip, then according to the firmware file to be refreshed and current firmware text Part determines data to be replaced from target data determining in the firmware file to be refreshed and from the current firmware file, Finally the data to be replaced are replaced using the target data, to carry out firmware refreshing to the NFC chip, thus Firmware refreshing can be completed without being replaced to entire firmware file, save the time of firmware refreshing, improve firmware and refresh Efficiency.
The method according to described in above-described embodiment, the present embodiment will be thin from the angle further progress of firmware refreshing apparatus Change description, which can be used as independent entity specifically to realize, also can integrate in electronic equipment, such as eventually It is realized in end, which may include mobile phone, tablet computer etc..
Referring to Fig. 5, firmware refreshing apparatus provided by the embodiments of the present application has been described in detail in Fig. 5, it is applied to mobile terminal, The firmware refreshing apparatus may include: that the first acquisition module 10, second obtains module 20, determining module 30 and replacement module 40, in which:
(1) first obtains module 10
First acquisition module 10 carries firmware text to be refreshed for obtaining firmware refreshing instruction, the firmware refreshing instruction Part.
Specifically, the firmware refreshing instruction, can generate the firmware refreshing instruction, example according to the flush condition of the mobile terminal Such as, Fig. 6 is referred to, which is another structural schematic diagram of firmware refreshing apparatus provided by the embodiments of the present application, which refreshes Device further includes judgment module 50, is specifically used for:
(51) obtains the charge value of the mobile terminal;
Further, the charge value of mobile terminal is obtained, the charge value that can be consumed by detecting the mobile terminal, and according to The charge value accounts for the percentage of the voltameter chip in the mobile terminal, obtains the charge value of the mobile terminal, the mistake determined Journey, which can be, obtains a difference for the charge value that target battery capability value subtracts mobile terminal consumption, which works as mobile terminal Preceding remaining charge value, that is, detect the current value of mobile terminal provided by the embodiments of the present application.For example, target battery capacity is 1000 milliamperes, the battery capacity value of mobile terminal consumption is 100 milliamperes, then it is 90% that the charge value, which can be calculated,.
In the embodiment, the process of a calibration of theoretical cell capacity value can also be increased, improves movement end Cell damage is prevented in end or detects the wrong accuracy of the battery capacity value.
(52) judges whether the charge value reaches default charge value;
Further, above-mentioned default charge value is the minimum battery according to theoretical cell capacity value and the mobile terminal standby What capability value was calculated, the average cell that the process of the calculating can be the smaller batteries capability value for taking the two or take the two is held Magnitude is as default charge value in this.
In some embodiments, cell degradation parameter list is that mobile terminal factory is preceding to battery of mobile terminal progress aging survey Try obtained parameter list, wherein default charge value cell degradation parameter list preset when can be through inquiry battery factory It determines.Changing parameter list may include temperature, battery capacity value, depth of discharge (battery during use, the appearance that battery is released Amount accounts for the percentage of rated capacity), residual electric quantity, (battery does not discharge when opening a way between battery the two poles of the earth battery open circuit voltage Potential difference) etc. parameter informations, formed one estimate charge value, this, which estimates charge value, can guarantee that subsequent firmware refresh process can be protected The sufficient electricity of card carries out firmware method for refreshing provided by the embodiment of the present application.
(53) if the determination result is YES, generates the firmware refreshing instruction;
Further, reach default charge value in view of aforementioned charge value, generate firmware brush provided by the embodiment of the present application New command, to carry out the aftermentioned firmware method for refreshing.
It should be pointed out that the firmware method for refreshing that each embodiment of the application provides, it can be by refreshing function with firmware The mobile terminal of energy is realized.The mobile terminal can be smart phone, smart television, tablet computer, E-book reader, MP3 Player Moving Picture Experts Group Audio Layer III1, dynamic image expert's compression standard audio Level 3) and MP4 (oving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard sound Frequency level 4) player etc..
(2) second obtain module 20
Second acquisition module 20 is used to obtain the text of the current firmware in the NFC chip according to the firmware refreshing instruction Part.
Further, the current firmware file in the NFC chip is obtained according to the firmware refreshing instruction, this second is obtained Modulus block 20 is specifically used for:
(21) obtains the store path of the current firmware file according to the firmware refreshing instruction;
Further, which is that the last firmware method for refreshing as provided by the embodiment of the present application refreshes The firmware file saved in the process, it should be pointed out that the current firmware file can be stored in default file library, for example, Additionally subregion goes out a file base area in NFC chip, and for storing the current firmware file, as the embodiment of the present application is mentioned The store path of confession.
(22) obtains the current firmware file according to the store path.
Further, it is known that the store path of current firmware file provided by the embodiment of the present application is easy to get to current solid Part file.
(3) determining module 30
Determining module 30 is used for literary from the firmware to be refreshed according to the firmware file to be refreshed and current firmware file Target data is determined in part and data to be replaced are determined from the current firmware file.
Specifically, the determining module 30 is specifically used for:
(31) firmware file to be refreshed and the current firmware file are carried out comparison in difference by, obtain shared text Number of packages evidence;
The file content seen in the firmware file to be refreshed may be Chinese character, character, it is also possible to which picture etc. is each The kind form of expression directly does difference tracking in a computer than relatively difficult to achieve, in order to do to file content to the content seen Comparison in difference needs in a binary format to save the content of file.
Further, which parses the firmware file to be refreshed and the current firmware file, is formed more The corresponding firmware file block to be refreshed of a and firmware file to be refreshed and multiple current refreshing firmware file is corresponding works as with this Preceding refreshing firmware file block, further, the embodiment of the present application can be blocking according to the fractionation of specified keyword, record each text The size of part block, initial position hereof and knot last bit set, comparison in difference then is carried out to each blocks of files, thus The content of file change is obtained to get the shared blocks of files being previously mentioned to the embodiment of the present application, i.e. shared file data, this Application can also accurately record shared file data using the storage mode of structuring.
For example, when the firmware file to be refreshed of acquisition be { 5,6,7,8,9,10 } when, current firmware file be 1,2,3,4, When 5,6 }, after comparison in difference provided by the embodiments of the present application, obtaining shared data file is { 5,6 }.
(32) obtains the remaining number of files in addition to the shared file data from the firmware file to be refreshed According to as target data;
For example, when the firmware file to be refreshed is { 5,6,7,8,9,10 }, obtaining shared data file is { 5,6 } When, the remaining file data except the shared file data can be removed from the firmware file to be refreshed, obtain number of targets According to for { 7,8,9,10 }.
(33) obtains the remaining file data in addition to the shared file data from the current firmware file, As data to be replaced.
For example, when the current firmware file be { 1,2,3,4,5,6 } when, obtain shared data file be { 5,6 } when, can From the remaining file data removed except the shared file data in the current firmware file, obtaining data to be replaced is { 1,2,3,4 }.
(4) replacement module 40
Replacement module 40 is for being replaced the data to be replaced using the target data, to the NFC core Piece carries out firmware refreshing.
Firmware guarantees the normal work of electronic equipment as software most basic in electronic equipment, but certain external causes It will lead to firmware to go wrong, influence the normal work of electronic equipment, therefore this refresh process need to refresh control progress accordingly Firmware refreshes, specifically, the firmware refreshing instruction, which also carries, refreshes control, this is using the target data to described to be replaced Data are replaced, which is specifically used for:
(41) utilizes the refreshing control, and the target data is replaced the data to be replaced;
Further, when refreshing firmware, specific brush machine control is usually accessed into mobile terminal, which passes through Driver corresponding with the refreshing control is run to read the firmware file to be refreshed in the mobile terminal, is realized to current The refreshing of firmware file.
(42) deletes the data to be replaced.
Further, in order to guarantee that the high efficiency of the refresh process needs to delete when being replaced the data to be replaced Former data to be replaced improve the speed of service in the mobile terminal to guarantee to have enough memory spaces in the NFC chip.
For example, when data to be replaced are { 1,2,3,4 }, target data is { 7,8,9,10 }, and after being replaced, original is wait replace It changes data and is substituted for { 7,8,9,10 }, to carry out firmware refreshing to the NFC chip.
In some embodiments, for guarantee the high efficiency of the firmware refresh process and avoid the firmware refresh process because It shuts down and interrupts, when being replaced using the target data to the data to be replaced, further includes:
(60) detects whether the replacement operation interrupts because of mobile terminal shutdown;
Further, 10 to 30 seconds are needed in view of the process of the refreshing, it can battery electricity in the real-time detection mobile terminal Whether amount there is not enough power supply, or by judging that it is extreme that shutting down occurs in the reason of whether mobile terminal occurs other Situation.
(70) if the determination result is YES, then marks interruption position, and according to the interruption position under the mobile terminal Continue firmware refresh operation when primary booting;
Further, interruption position is marked to mark the step of replacing in the embodiment of the present application, for example, when to be replaced Data are { 1,2,3,4 }, and target data is { 7,8,9,10 }, after being replaced, former data to be replaced be substituted for 7,8,9, 10 } in replacement process, such as the embodiment of the present application is that { will be substituted for 1 for 7, be substituted for 2 for 8,9 are substituted in sequence 3,4 are substituted for by 10 }, when proceeding to " being substituted for 3 for 9 ", replacement process occurs shutdown and interrupts, then marks " by 9 replacements At 3 ", its position is recorded, therefore, recording its interruption position is { be substituted for 1 for 7, be substituted for 2 for 8, be substituted for 3 for 9 }, next When secondary booting, the replacement operation of subsequent " being substituted for 4 for 10 " can be directly carried out according to " being substituted for 3 for 9 ".
(80) if judging result be it is no, export Flushing success prompt.
Further, the embodiment of the present application output Flushing success prompt, can be exported by the output module of mobile terminal, Such as display module shows " Flushing success " or is broadcast by audio-frequency module, to complete the output of output Flushing success prompt.
The application provides a kind of firmware refreshing apparatus, is applied to mobile terminal, which is built-in with NFC chip, the One obtains module, and for obtaining firmware refreshing instruction, the firmware refreshing instruction carries firmware file to be refreshed;Second obtains mould Block, for obtaining the current firmware file in the NFC chip according to the firmware refreshing instruction;Determining module is used for basis The firmware file to be refreshed and current firmware file determine target data from the firmware file to be refreshed and from described Data to be replaced are determined in current firmware file;Replacement module, for using the target data to the data to be replaced into Firmware can be completed without being replaced to entire firmware file to carry out firmware refreshing to the NFC chip in row replacement Refresh, save the time of firmware refreshing, improves firmware and refresh efficiency.
In addition, the embodiment of the present application also provides a kind of mobile terminal, which can be smart phone, tablet computer Etc. equipment.As shown in fig. 7, mobile terminal 600 includes processor 601, memory 602.Wherein, processor 601 and memory 602 It is electrically connected.
Processor 601 is the control centre of mobile terminal 600, utilizes various interfaces and the entire mobile terminal of connection Various pieces by the application program of operation or load store in memory 602, and are called and are stored in memory 602 Data, execute mobile terminal various functions and processing data, thus to mobile terminal carry out integral monitoring.
In the present embodiment, processor 601 in mobile terminal 600 can according to following step, by one or one with On the corresponding instruction of process of application program be loaded into memory 602, and be stored in memory by processor 601 to run Application program in 602, to realize various functions.
Fig. 8 shows the specific block diagram of mobile terminal provided by the embodiments of the present application, which can be used for The firmware method for refreshing provided in above-described embodiment is provided.The mobile terminal 700 can be smart phone or tablet computer.
RF circuit 710 realizes the mutual conversion of electromagnetic wave and electric signal, thus with logical for receiving and transmitting electromagnetic wave News network or other equipment are communicated.RF circuit 710 may include various existing for executing the circuit elements of these functions Part, for example, antenna, RF transceiver, digital signal processor, encryption/deciphering chip, subscriber identity module (SIM) card, storage Device etc..RF circuit 710 can carry out communicating or by wireless with various networks such as internet, intranet, wireless network Network is communicated with other equipment.Above-mentioned wireless network may include cellular telephone networks, WLAN or Metropolitan Area Network (MAN). Above-mentioned wireless network can be used various communication standards, agreement and technology, including but not limited to global system for mobile communications, Enhanced mobile communication technology, Wideband CDMA Technology, Code Division Multiple Access, time division multiple access technology, adopting wireless fidelity technology, net Network phone (Voice over Internet Protocol, VoIP), worldwide interoperability for microwave accesses (Worldwide Interoperability for Microwave Access, Wi-Max), other are for mail, instant messaging and short message Agreement and any other suitable communications protocol, or even may include the agreement that those are not developed currently yet.
Memory 720 can be used for storing software program and module, such as firmware refreshing apparatus, method pair in above-described embodiment Program instruction/the module answered, the software program and module that processor 780 is stored in memory 720 by operation, to hold The function of switching standard is realized in row various function application and data processing.Memory 720 may include high speed random storage Device may also include nonvolatile memory, such as one or more magnetic storage device, flash memory or other are non-volatile solid State memory.In some instances, memory 720 can further comprise the memory remotely located relative to processor 780, this A little remote memories can pass through network connection to mobile terminal 700.The example of above-mentioned network includes but is not limited to internet, enterprise Industry intranet, local area network, mobile radio communication and combinations thereof.
Input unit 730 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, input unit 730 may include touching Sensitive surfaces 731 and other input equipments 732.Touch sensitive surface 731, also referred to as touch display screen or Trackpad are collected and are used Family on it or nearby touch operation (such as user using any suitable object or attachment such as finger, stylus in touch-sensitive table Operation on face 731 or near touch sensitive surface 731), and corresponding attachment device is driven according to preset formula.It is optional , touch sensitive surface 731 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used The touch orientation at family, and touch operation bring signal is detected, transmit a signal to touch controller;Touch controller is from touch Touch information is received in detection device, and is converted into contact coordinate, then gives processor 780, and can receive processor 780 The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves Realize touch sensitive surface 731.In addition to touch sensitive surface 731, input unit 730 can also include other input equipments 732.Specifically, Other input equipments 732 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), One of trace ball, mouse, operating stick etc. are a variety of.
Display unit 740 can be used for showing information input by user or the information and mobile terminal that are supplied to user 700 various graphical user interface, these graphical user interface can by figure, text, icon, video and any combination thereof Lai It constitutes.Display unit 740 may include display panel 741, optionally, can using LCD (Liquid Crystal Display, Liquid crystal display), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display Panel 741.Further, touch sensitive surface 731 can cover display panel 741, when touch sensitive surface 731 detect on it or near Touch operation after, send processor 780 to determine the type of touch event, be followed by subsequent processing device 780 according to touch event Type provides corresponding visual output on display panel 741.Although in Fig. 7, touch sensitive surface 731 is with display panel 741 Output and input function as two independent components to realize, but in some embodiments it is possible to by touch sensitive surface 731 with Display panel 741 is integrated and realizes and outputs and inputs function.
Mobile terminal 700 may also include at least one sensor 750, for example, optical sensor, motion sensor and other Sensor.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can basis The light and shade of ambient light adjusts the brightness of display panel 741, proximity sensor can when mobile terminal 700 is moved in one's ear, Close display panel 741 and/or backlight.As a kind of motion sensor, gravity accelerometer can detect all directions The size of upper (generally three axis) acceleration, can detect that size and the direction of gravity, can be used to identify mobile phone posture when static Application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (for example pedometer, strikes Hit) etc.;Gyroscope, barometer, hygrometer, thermometer, infrared sensor for can also configure as mobile terminal 700 etc. other Sensor, details are not described herein.
Voicefrequency circuit 760, loudspeaker 761, microphone 762 can provide the audio interface between user and mobile terminal 700. Electric signal after the audio data received conversion can be transferred to loudspeaker 761, be converted by loudspeaker 761 by voicefrequency circuit 760 For voice signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 762, is connect by voicefrequency circuit 760 Audio data is converted to after receipts, then by after the processing of audio data output processor 780, is sent to through RF circuit 710 such as another One terminal, or audio data is exported to memory 720 to be further processed.Voicefrequency circuit 760 is also possible that earplug Jack, to provide the communication of peripheral hardware earphone Yu mobile terminal 700.
Mobile terminal 700 can help user send and receive e-mail, is clear by transmission module 770 (such as Wi-Fi module) Look at webpage and access streaming video etc., it provides wireless broadband internet for user and accesses.Although Fig. 7 shows transmission mould Block 770, but it is understood that, and it is not belonging to must be configured into for mobile terminal 700, it can according to need do not changing completely Become in the range of the essence of the application and omits.
Processor 780 is the control centre of mobile terminal 700, utilizes each of various interfaces and connection whole mobile phone Part by running or execute the software program and/or module that are stored in memory 720, and calls and is stored in memory Data in 720 execute the various functions and processing data of mobile terminal 700, to carry out integral monitoring to mobile phone.It is optional , processor 780 may include one or more processing cores;In some embodiments, processor 780 can integrate application processor And modem processor, wherein the main processing operation system of application processor, user interface and application program etc., modulatedemodulate Processor is adjusted mainly to handle wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor In 780.
Mobile terminal 700 further includes the power supply 790 (such as battery) powered to all parts, in some embodiments, electricity Source can be logically contiguous by power-supply management system and processor 780, to realize management charging by power-supply management system, put The functions such as electricity and power managed.Power supply 790 can also include one or more direct current or AC power source, recharge The random components such as system, power failure detection circuit, power adapter or inverter, power supply status indicator.
Although being not shown, mobile terminal 700 can also include camera (such as front camera, rear camera), bluetooth Module etc., details are not described herein.Specifically in the present embodiment, the display unit of mobile terminal is touch-screen display, mobile whole End further includes having memory and one perhaps more than one program one of them or more than one program being stored in and deposits In reservoir, and it is configured to execute one or more than one program by one or more than one processor to include for carrying out The instruction operated below:
Firmware refreshing instruction is obtained, the firmware refreshing instruction carries firmware file to be refreshed;
The current firmware file in the NFC chip is obtained according to the firmware refreshing instruction;
Number of targets is determined from the firmware file to be refreshed according to the firmware file to be refreshed and current firmware file According to and from determining data to be replaced in the current firmware file;
The data to be replaced are replaced using the target data, to carry out firmware refreshing to the NFC chip.
When it is implemented, the above modules can be used as independent entity to realize, any combination can also be carried out, is made It is realized for same or several entities, the specific implementation of the above modules can be found in the embodiment of the method for front, herein not It repeats again.
It will appreciated by the skilled person that all or part of the steps in the various methods of above-described embodiment can be with It is completed by instructing, or relevant hardware is controlled by instruction to complete, which can store computer-readable deposits in one In storage media, and is loaded and executed by processor.For this purpose, the embodiment of the present application provides a kind of storage medium, wherein storing There is a plurality of instruction, which can be loaded by processor, to execute any firmware brush provided by the embodiment of the present application Step in new method.
Wherein, which may include: read-only memory (ROM, Read Only Memory), random access memory Body (RAM, Random Access Memory), disk or CD etc..
By the instruction stored in the storage medium, any firmware brush provided by the embodiment of the present application can be executed Step in new method, it is thereby achieved that achieved by any firmware method for refreshing provided by the embodiment of the present application Beneficial effect is detailed in the embodiment of front, and details are not described herein.
The specific implementation of above each operation can be found in the embodiment of front, and details are not described herein.
It is to sum up somebody's turn to do, although the application is disclosed above with preferred embodiment, above preferred embodiment is not to limit The application, those skilled in the art are not departing from spirit and scope, can make various changes and profit Decorations, therefore the protection scope of the application subjects to the scope of the claims.

Claims (10)

1. a kind of firmware method for refreshing, which is characterized in that be applied to mobile terminal, the mobile terminal is built-in with NFC chip, institute The method of stating includes:
Firmware refreshing instruction is obtained, the firmware refreshing instruction carries firmware file to be refreshed;
The current firmware file in the NFC chip is obtained according to the firmware refreshing instruction;
According to the firmware file to be refreshed and current firmware file from the firmware file to be refreshed determine target data, with And data to be replaced are determined from the current firmware file;
The data to be replaced are replaced using the target data, to carry out firmware refreshing to the NFC chip.
2. firmware method for refreshing according to claim 1, which is characterized in that before obtaining firmware refreshing instruction, also wrap It includes:
Obtain the charge value of the mobile terminal;
Judge whether the charge value reaches default charge value;
If so, generating the firmware refreshing instruction.
3. firmware method for refreshing according to claim 1, which is characterized in that it is described according to the firmware file to be refreshed and Current firmware file from the firmware file to be refreshed determine target data and from the current firmware file determine to Replacement data specifically includes:
The firmware file to be refreshed and the current firmware file are subjected to comparison in difference, obtain shared file data;
The remaining file data in addition to the shared file data is obtained from the firmware file to be refreshed, as target Data;
The remaining file data in addition to the shared file data is obtained from the current firmware file, as to be replaced Data.
4. firmware method for refreshing according to claim 1, which is characterized in that the firmware refreshing instruction also carries refreshing control Part, it is described that the data to be replaced are replaced using the target data, it specifically includes:
Using the refreshing control, the target data is replaced the data to be replaced;
Delete the data to be replaced.
5. firmware method for refreshing according to claim 1, which is characterized in that using the target data to described wait replace When changing data and being replaced, further includes:
Detect whether the replacement operation interrupts because of mobile terminal shutdown;
If so, label interruption position, and continued according to the interruption position when the mobile terminal is switched on next time Firmware refresh operation;
If it is not, then exporting Flushing success prompt.
6. a kind of firmware refreshing apparatus, which is characterized in that be applied to mobile terminal, the mobile terminal is built-in with NFC chip, institute Stating firmware refreshing apparatus includes:
First obtains module, and for obtaining firmware refreshing instruction, the firmware refreshing instruction carries firmware file to be refreshed;
Second obtains module, for obtaining the current firmware file in the NFC chip according to the firmware refreshing instruction;
Determining module, for true from the firmware file to be refreshed according to the firmware file to be refreshed and current firmware file The data that set the goal and the determining data to be replaced from the current firmware file;
Replacement module, for being replaced using the target data to the data to be replaced, to be carried out to the NFC chip Firmware refreshes.
7. firmware refreshing apparatus according to claim 6, which is characterized in that the firmware refreshing apparatus further includes judging mould Block, the judgment module are specifically used for:
Before described first obtains module acquisition firmware refreshing instruction, the charge value of the mobile terminal is obtained;
Judge whether the charge value reaches default charge value;
If so, generating the firmware refreshing instruction.
8. firmware refreshing apparatus according to claim 6, which is characterized in that the determining module is specifically used for:
The firmware file to be refreshed and the current firmware file are subjected to comparison in difference, obtain shared file data;
The remaining file data in addition to the shared file data is obtained from the firmware file to be refreshed, as target Data;
The remaining file data in addition to the shared file data is obtained from the current firmware file, as to be replaced Data.
9. firmware refreshing apparatus according to claim 6, which is characterized in that the replacement module is also used to:
During being replaced using the target data to the data to be replaced, whether the replacement operation is detected because moving It moves terminal closedown and interrupts;
If so, label interruption position, and continued according to the interruption position when the mobile terminal is switched on next time Firmware refresh operation.
10. a kind of computer readable storage medium, which is characterized in that be stored with a plurality of instruction, the finger in the storage medium It enables being suitable for being loaded by processor and 1 to 5 described in any item firmware method for refreshing is required with perform claim.
CN201910457650.1A 2019-05-29 2019-05-29 Firmware method for refreshing, device and storage medium Pending CN110209415A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910457650.1A CN110209415A (en) 2019-05-29 2019-05-29 Firmware method for refreshing, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910457650.1A CN110209415A (en) 2019-05-29 2019-05-29 Firmware method for refreshing, device and storage medium

Publications (1)

Publication Number Publication Date
CN110209415A true CN110209415A (en) 2019-09-06

Family

ID=67789383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910457650.1A Pending CN110209415A (en) 2019-05-29 2019-05-29 Firmware method for refreshing, device and storage medium

Country Status (1)

Country Link
CN (1) CN110209415A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858119A (en) * 2020-07-13 2020-10-30 山东云海国创云计算装备产业创新中心有限公司 BIOS fault repairing method and related device
CN112256302A (en) * 2020-10-20 2021-01-22 Tcl通讯(宁波)有限公司 Updating method, updating device, storage medium and mobile terminal
WO2023124333A1 (en) * 2021-12-28 2023-07-06 锐凌无线有限责任公司 Firmware refreshing method and apparatus, wireless module and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102830984A (en) * 2011-06-14 2012-12-19 联想(北京)有限公司 Method for updating firmware, chip and communication terminal
CN104765628A (en) * 2015-03-10 2015-07-08 惠州Tcl移动通信有限公司 Method and system for updating touch screen firmware of movable terminal
CN104978217A (en) * 2014-04-01 2015-10-14 福特全球技术公司 Smart vehicle reflash with battery SOC estimator
CN108595200A (en) * 2018-04-19 2018-09-28 北京微播视界科技有限公司 Code update method, figure update method, device, storage medium and terminal
CN109117159A (en) * 2018-08-15 2019-01-01 郑州云海信息技术有限公司 A kind of automatic identification refreshes the method and device of firmware

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102830984A (en) * 2011-06-14 2012-12-19 联想(北京)有限公司 Method for updating firmware, chip and communication terminal
CN104978217A (en) * 2014-04-01 2015-10-14 福特全球技术公司 Smart vehicle reflash with battery SOC estimator
CN104765628A (en) * 2015-03-10 2015-07-08 惠州Tcl移动通信有限公司 Method and system for updating touch screen firmware of movable terminal
CN108595200A (en) * 2018-04-19 2018-09-28 北京微播视界科技有限公司 Code update method, figure update method, device, storage medium and terminal
CN109117159A (en) * 2018-08-15 2019-01-01 郑州云海信息技术有限公司 A kind of automatic identification refreshes the method and device of firmware

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858119A (en) * 2020-07-13 2020-10-30 山东云海国创云计算装备产业创新中心有限公司 BIOS fault repairing method and related device
CN112256302A (en) * 2020-10-20 2021-01-22 Tcl通讯(宁波)有限公司 Updating method, updating device, storage medium and mobile terminal
WO2023124333A1 (en) * 2021-12-28 2023-07-06 锐凌无线有限责任公司 Firmware refreshing method and apparatus, wireless module and storage medium

Similar Documents

Publication Publication Date Title
CN104243671B (en) Volume adjusting method, device and electronic equipment
CN103458124B (en) A kind of shutdown processing method of terminal, device and terminal equipment
CN106340925B (en) A kind of charge control method, device and terminal
CN103281687A (en) Network flow management method and device of double-card terminal
CN103500002A (en) Method, device and terminal equipment for managing application program
CN105487649A (en) Prompt method and mobile terminal
CN105278937A (en) Method and device for displaying pop-up box messages
CN104899080A (en) Method and apparatus for switching real-time image in instant messaging
CN103530520A (en) Method and terminal for obtaining data
CN104657666A (en) Method and device for optimizing terminal operation environment
CN110209415A (en) Firmware method for refreshing, device and storage medium
CN103312597B (en) A kind of speech message generation method and device
CN104954159A (en) Network information statistics method and device
CN104346276A (en) Method and device for software tests
CN105162930B (en) The way of recording and device of mobile terminal
CN109669662A (en) A kind of pronunciation inputting method, device, storage medium and mobile terminal
CN106210514B (en) It takes pictures the method, apparatus and smart machine of focusing
CN105739856A (en) Object operation processing execution method and apparatus
CN105807908A (en) Working mode switching method and device
CN106255146B (en) A kind of electricity-saving control method of terminal, device and terminal
CN106254673B (en) Terminal falls detection method and device
CN104978237A (en) Method and device for repairing dynamic link library file
CN110489177A (en) Application control method, apparatus, storage medium and terminal device
CN104346128A (en) Executing method and executing device of sound events
CN103731552B (en) A kind of shooting changing method of mobile terminal, device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190906