CN112256302A - Updating method, updating device, storage medium and mobile terminal - Google Patents
Updating method, updating device, storage medium and mobile terminal Download PDFInfo
- Publication number
- CN112256302A CN112256302A CN202011126070.3A CN202011126070A CN112256302A CN 112256302 A CN112256302 A CN 112256302A CN 202011126070 A CN202011126070 A CN 202011126070A CN 112256302 A CN112256302 A CN 112256302A
- Authority
- CN
- China
- Prior art keywords
- instruction set
- partition
- instruction
- partitions
- instructions
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000005192 partition Methods 0.000 claims abstract description 204
- 238000004891 communication Methods 0.000 claims abstract description 48
- 238000000638 solvent extraction Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 description 22
- 238000005516 engineering process Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000010295 mobile communication Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 230000006698 induction Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/325—Power saving in peripheral device
- G06F1/3275—Power saving in memory, e.g. RAM, cache
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
- Telephone Function (AREA)
Abstract
The application discloses an updating method, a device, a storage medium and a mobile terminal, wherein the updating method is applied to the mobile terminal provided with a near field communication chip, and the near field communication chip comprises n subareas, and the updating method comprises the following steps: acquiring an update instruction, wherein the update instruction carries a firmware file, the firmware file comprises at least one first instruction set, each first instruction set corresponds to one partition of n partitions, and n is a natural number not less than 1; acquiring at least one second instruction set stored in the near field communication chip, wherein each second instruction set corresponds to one partition of the n partitions; any one of the n partitions is partitioned into SiMatching the corresponding first instruction set and second instruction set SiThe index i ∈ {1, 2,..., n }; if partition SiIf the corresponding first instruction set and second instruction set do not match, then according to partition SiCorresponding first instruction set to partition SiThe corresponding second instruction set is updated fromAnd the updating time is reduced, and the power consumption of the mobile terminal is also reduced.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an update method, an update device, a storage medium, and a mobile terminal.
Background
Near field communication (NFC for short) is an emerging technology integrated and evolved from a non-contact Radio Frequency Identification (RFID) and an interconnection technology, and an induction card reader, an induction card and a point-to-point function are combined on a single chip, so that identification and data exchange can be performed with compatible equipment in a short distance. At present, the technology is widely used, and more mobile terminals are added with applications which are convenient to use the NFC technology, such as a card swiping application.
As NFC technology is in the process of continuous development, it is often necessary to update the firmware of the NFC chip. The existing updating method is to completely replace the instruction set of each partition in the NFC chip firmware with a new instruction set provided by a service provider. However, such an update method is time consuming and tends to increase the power consumption of the mobile terminal.
Disclosure of Invention
The invention provides an updating method, an updating device, a storage medium and a mobile terminal, and aims to solve the technical problems that the updating of firmware of an NFC chip is long in time consumption and the power consumption of the mobile terminal is easy to increase.
The technical scheme provided by the application is as follows:
the application provides an updating method, which is applied to a mobile terminal provided with a near field communication chip, wherein the near field communication chip comprises n subareas, and the updating method comprises the following steps:
acquiring an update instruction, wherein the update instruction carries a firmware file, the firmware file comprises at least one first instruction set, each first instruction set corresponds to one partition of the n partitions, and n is a natural number not less than 1;
acquiring at least one second instruction set stored in the near field communication chip, wherein each second instruction set corresponds to one partition of the n partitions;
any one of the n partitions is partitioned into SiMatching the corresponding first instruction set and second instruction set, SiThe index i ∈ {1, 2,..., n };
if the partition SiIf the corresponding first instruction set and second instruction set do not match, then according to the partition SiCorresponding first instruction set to the partition SiThe corresponding second instruction set is updated.
The application also provides an updating device, which is applied to a mobile terminal provided with a near field communication chip, wherein the near field communication chip comprises n subareas, and the updating device comprises:
a first obtaining module, configured to obtain an update instruction, where the update instruction carries a firmware file, the firmware file includes at least one first instruction set, each first instruction set corresponds to one partition of the n partitions, and n is a natural number not less than 1;
a second obtaining module, configured to obtain at least one second instruction set stored in the near field communication chip, where each second instruction set corresponds to one partition of the n partitions;
a matching module for partitioning any one of the n partitions into SiMatching the corresponding first instruction set and second instruction set, SiThe index i ∈ {1, 2,..., n };
an update module for if the partition SiIf the corresponding first instruction set and second instruction set do not match, then according to the partition SiCorresponding first instruction set to the partition SiThe corresponding second instruction set is updated.
In the update apparatus provided by the present application, the first instruction set includes at least one first instruction, the second instruction set includes at least one second instruction, and the matching module is specifically configured to:
comparing the partitions SiWhether at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are identical;
if the partition SiIf at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are completely the same, the partition S is judgediThe corresponding first instruction set and the second instruction set are matched;
if the partition SiIf at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are not identical, the partition S is judgediThe corresponding first instruction set and second instruction set do not match.
In the update apparatus provided in the present application, the update module is specifically configured to:
determining the partition SiCorresponding first instruction set and the partition SiMatching degree of the corresponding second instruction set;
according to the matching degree and the subarea SiCorresponding first instruction set to the partition SiThe corresponding second instruction set is updated.
In the update apparatus provided in the present application, the update module is specifically configured to:
if the matching degree is not less than the preset matching degree, the partition S is dividediStoring a first instruction not present in a corresponding second instruction set to the partition SiCorresponding second instruction set, and partitioning the SiCorresponding second instruction set and the partition SiDeleting second instructions different from the first instructions in the corresponding first instruction set;
if the matching degree is less than the preset matching degree, using the subarea SiReplacing the partition S with a corresponding first set of instructionsiA corresponding second instruction set.
In the update apparatus provided in the present application, the update module is specifically configured to:
determining the partition SiThe sum of the total number of the second instructions in the corresponding second instruction set and the partition SiA first number of second instructions in the corresponding first instruction set, wherein the first instructions are the same as the first instructions;
calculating a quotient value between the first number and the total number;
and taking the quotient value as the matching degree.
In the update apparatus provided in the present application, the second obtaining module is specifically configured to:
acquiring at least one binary code set stored in the near field communication chip, wherein each binary code set comprises at least one binary code;
converting all binaries in each of the binary sets into instructions to obtain the at least one second instruction set.
The present application further provides a computer-readable storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor to perform the updating method of any of the above.
The application also provides a terminal device, which comprises a processor and a memory, wherein the processor is electrically connected with the memory, the memory is used for storing instructions and data, and the processor is used for executing the steps in the updating method.
The beneficial effect of this application does: different from the prior art that all instruction sets are updated indiscriminately, the technical scheme of the application is that the instruction set in the NFC chip is matched with the update instruction set provided by a service provider, and the instruction set which is not matched with the update instruction set provided by the service provider is updated. Because only the incompletely matched instruction set is updated, the updating time is reduced, and the power consumption of the mobile terminal is also reduced.
Drawings
The technical solution and other advantages of the present invention will become apparent from the following detailed description of specific embodiments of the present invention, which is to be read in connection with the accompanying drawings.
Fig. 1 is a schematic flowchart of an update method according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a partition provided in the embodiment of the present application.
Fig. 3 is another schematic flow chart of an update method according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an update apparatus according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Fig. 6 is another schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. In the drawings, elements having similar structures are denoted by the same reference numerals. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The embodiment of the application provides an updating method, an updating device, a storage medium and a mobile terminal.
Referring to fig. 1, fig. 1 is a schematic flowchart of an updating method provided in an embodiment of the present application, where the updating method is applied to a mobile terminal provided with a near field communication chip, where the near field communication chip includes n partitions, and the mobile terminal is any intelligent electronic device with a mobile communication function, such as a smart phone, a tablet computer, and a smart watch. As shown in fig. 1, the updating method provided in this embodiment mainly includes steps S101 to S104, which are described as follows:
step S101: the method comprises the steps of obtaining an updating instruction, wherein the updating instruction carries a firmware file, the firmware file comprises at least one first instruction set, each first instruction set corresponds to one partition of n partitions, and n is a natural number not less than 1.
Firmware, refers to a "driver" stored in a corresponding device (e.g., NFC chip). By providing different partitions in the firmware and storing various instructions in each partition, a wide variety of functions can be implemented. For example, the firmware of the NFC chip may include a plurality of partitions, each of which holds different instructions for implementing read, write, and point-to-point functions, etc. For example, referring to fig. 2, fig. 2 is a schematic diagram of a partition structure provided in an embodiment of the present application, in which the nfc chip includes four partitions (S)1、S2、S3、S4) In the section S1、S2、S3And S4Having stored therein a second instruction set, a1, B1, C1, and D1, respectively.
In order to improve the user experience, the service provider will continuously update and upgrade the Near Field Communication (NFC) function. Taking a common card swiping function as an example, a service provider can update and upgrade the distance of card swiping response, and update the distance of card swiping response from a short distance to a long distance so as to improve the sensitivity of the card swiping function and greatly improve the user experience. When the service provider upgrades the NFC function, an update instruction is generated and sent to the mobile terminal having the function (i.e., provided with the near field communication chip).
It is easily understood that, since various NFC functions are implemented in firmware provided in the NFC chip, updating the near field communication function is updating the firmware in the NFC chip. Therefore, the update instruction needs to carry a firmware file, where the firmware file includes at least one first instruction set, and each instruction set corresponds to one partition of the n partitions. It should be noted that each partition of the firmware in the NFC chip may have a uniquely determined identifier, which may be composed of letters, numbers, or a combination of the letters and the numbers, and therefore, the at least one first instruction set in the firmware file may carry the partition identifier to identify the corresponding relationship with each partition.
For example, if the NFC chip includes two partitions, which are identified as 000x and 0x00, the content in the firmware file may be in the form of 000 x: instruction set 1; 0x 00: instruction set 2.
Specifically, the number of the first instruction sets in the firmware file may be different from the number of the partitions in the NFC chip, for example, if a service provider only updates a certain partition in the NFC chip, the firmware file only needs to carry the first instruction set corresponding to the partition to be updated.
Step S102: and acquiring at least one second instruction set stored in the near field communication chip, wherein each second instruction set corresponds to one partition of the n partitions.
Referring to fig. 3, fig. 3 is another schematic flow chart of the updating method according to the embodiment of the present application, in the embodiment, the step S102 mainly includes steps S1021 and S1022:
step S1021: at least one binary code set stored in the near field communication chip is obtained, wherein each binary code set comprises at least one binary code.
Specifically, a Central Processing Unit (CPU) is one of the most important devices in a mobile terminal, and is used to process various instructions and thus perform various operations. Since the CPU can only process binary instructions, each instruction corresponds to a unique string of binary codes, which is stored in firmware.
Step S1022: all binaries in each set of binaries are converted into instructions to obtain at least one second instruction set.
It is easy to understand that the binary code is a string of codes consisting of 0 and 1, and because it has a certain length, if the matching is directly performed in the binary code form in the subsequent step, the workload of the processor is greatly increased, and the matching speed of the processor is further reduced, which also reduces the updating speed. Moreover, the binary codes are directly stored in the firmware files, so that the condition of messy codes is easily caused, and the whole updating process and result are influenced. Therefore, the matching is carried out in the form of the instruction, so that the updating speed is improved, and the updating effect is ensured.
Step S103: any one of the n partitions is partitioned into SiThe corresponding first instruction set and second instruction set are matched.
Specifically, SiI.e., S, e.g., 1, 21Representing the first of n partitions, S2Representing the second of the n partitions, … …, SiRepresenting the ith partition of the n partitions, and so on, a partition SiOnly one instruction set can always be stored.
For example, the firmware file carried by the update command includes 4 first command sets a2, B2, C2 and D2, wherein a2 corresponds to the partition S1B2 corresponds to partition S2C2 corresponds to partition S3D2 corresponds to partition S4. If the first instruction set in the firmware file is matched with the second instruction set of each partition in fig. 2, a1 should be matched with a2, B1 should be matched with B2, C1 should be matched with C2, and D1 should be matched with D2.
Referring to fig. 3, in the present embodiment, the first instruction set includes at least one first instruction, the second instruction set includes at least one second instruction, and step S103 may mainly include steps S1031 to S1033:
step S1031: comparing the partitions SiIf the at least one first instruction and the at least one second instruction in the corresponding first instruction set and second instruction set are completely the same, step S1032 is executed, and if not, step S1033 is executed.
For example, please continue to refer to FIG. 2, section S1The corresponding second instruction set A1 includes three second instructions a1, a2 and a3, which when matching, compare a1, a2 and a3 with the partition S in the firmware file1Whether at least one first instruction in the corresponding first instruction set is identical.
Step S1032 judging the partition SiThe corresponding first instruction set and second instruction set match.
For example, if the partition S1The corresponding second instruction set A1 includes three second instructions a1, a2 and a3, partition S in firmware file1The corresponding first instruction set A2 also includes three first instructions a1, a2 and a3, and the partition S is determined1If the corresponding first instruction set and second instruction set match, the service provider may be considered as not having partition S1And (6) updating.
Step S1033: decision partition SiThe corresponding first instruction set and second instruction set do not match,
for example, if the partition S1The corresponding second instruction set A1 includes 3 first instructions a1, a2 and a3, while the partition S in the firmware file1The corresponding first instruction set A2 includes 4 first instructions a1, a2, A3, and a4, and the first instructions a1, a2, A3, and a4 in the first instruction set A2 are compared with the second instruction setIf the second commands a1, a2 and a3 in A1 are not identical, the partition S is determined1If the corresponding first instruction set A2 and second instruction set A1 do not match, the service provider may be considered to be with partition S1The update is performed.
Step S104: if partition SiIf the corresponding first instruction set and second instruction set do not match, then according to partition SiCorresponding first instruction set to partition SiThe corresponding second instruction set is updated.
In some embodiments, step S104 may mainly include step S1041 and step S1042:
step S1041: determining a partition SiCorresponding first instruction set and partition SiThe degree of match of the corresponding second instruction set.
Referring to fig. 3, the step S1041 may mainly include steps S1-1 to S1-3:
s1-1: determining a partition SiThe sum of the total number of the second instructions in the corresponding second instruction set and the partition SiA first number of second instructions in the corresponding first instruction set, wherein the first instructions are the same as the first instructions;
and S1-2, calculating a quotient value between the first number and the total number.
S1-3: and taking the quotient value as the matching degree.
For example, if the partition S2The total number of the second instructions in the corresponding second instruction set is five, and the partition S2Corresponding second instruction set and partition S2If the first number of the second instructions in the corresponding first instruction set is two, the matching degree is forty percent.
Step S1042: according to the matching degree and the partition SiCorresponding first instruction set to partition SiThe corresponding second instruction set is updated.
With continued reference to FIG. 3, the step S1042 may mainly include the steps S2-1 and S2-2:
s2-1: if the matching degree is not less than the preset matching degree, partitioning the SiStoring a first instruction not present in the corresponding second instruction set to partition SiCorresponding second instruction set, and partitioning SiCorresponding second instruction set and partition SiAnd deleting second instructions different from the first instructions in the corresponding first instruction set.
It will be readily appreciated that if partition S is partitioned1The matching degree between the corresponding first instruction set and the second instruction set is greater than the preset matching degree, and the service provider can be considered to update only a small part of instructions in the second instruction set. In this embodiment, the predetermined matching degree may be sixty percent.
For example, if the partition SiThe corresponding second instruction set includes five second instructions k1, k2, k3, k4, k5, partition SiThe corresponding first instruction set comprises five first instructions k1, k2, k3, k4 and k6, four second instructions which are the same as the first instructions in the first instruction set are respectively k1, k2, k3 and k4, the total number of the second instructions is five, and the matching degree is eighty percent and is greater than the preset matching degree, so that the first instructions (k6) which do not exist in the second instruction set in the first instruction set are only stored in the second instruction set, and the second instruction set (k5) which is different from the first instruction set in the second instruction set is deleted, so that the updated second instruction sets k1, k2, k3, k4 and k6 are obtained.
Therefore, the second instruction set can be updated only by one-time deletion and one-time writing in the step, and compared with the existing updating method in which all the steps are replaced, namely five-time deletion and five-time writing, the updating time is saved, and the power consumption of the mobile terminal is further reduced.
S2-2: if the matching degree is less than the preset matching degree, using the subarea SiReplacement of partition S by a corresponding first instruction setiA corresponding second instruction set.
In particular, if partition S1The matching degree between the corresponding first instruction set and the second instruction set is smaller than the preset matching degree, and it can be considered that the service provider updates most of the instructions in the second instruction set, so that the partition S is directly used1Corresponding first instruction set replacement S1The corresponding second instruction set.
From the above, the present embodiment providesThe new method is used for a mobile terminal provided with a near field communication chip, wherein the near field communication chip comprises n subareas, and the method comprises the following steps: acquiring an update instruction, wherein the update instruction carries a firmware file, the firmware file comprises at least one first instruction set, each first instruction set corresponds to one partition of n partitions, and n is a natural number not less than 1; acquiring at least one second instruction set stored in the near field communication chip, wherein each second instruction set corresponds to one partition of the n partitions; any one of the n partitions is partitioned into SiMatching the corresponding first instruction set and second instruction set SiThe index i ∈ {1, 2,..., n }; if partition SiIf the corresponding first instruction set and second instruction set do not match, then according to partition SiCorresponding first instruction set to partition SiAnd the corresponding second instruction set is updated, so that the updating time is reduced, and the power consumption of the mobile terminal is also reduced.
According to the method described in the above embodiment, the embodiment will be further described from the perspective of an updating apparatus, which may be specifically implemented as an independent entity or integrated in a mobile terminal.
Referring to fig. 4, fig. 4 specifically describes an updating apparatus provided in the embodiment of the present application, which is applied to a mobile terminal provided with a near field communication chip, where the near field communication chip includes n partitions, and the updating apparatus mainly includes a first obtaining module 10, a second obtaining module 20, a matching module 30, and an updating module 40, and the description is as follows:
(1) first acquisition module 10
The first obtaining module 10 is configured to obtain an update instruction, where the update instruction carries a firmware file, the firmware file includes at least one first instruction set, each first instruction set corresponds to one partition of n partitions, and n is a natural number not less than 1.
(2) Second acquisition module 20
The second obtaining module 20 is configured to obtain at least one second instruction set stored in the near field communication chip, where each second instruction set corresponds to one partition of the n partitions.
In some embodiments, the second obtaining module 20 is primarily for:
acquiring at least one binary code set stored in a near field communication chip, wherein each binary code set comprises at least one binary code;
all binaries in each set of binaries are converted into instructions to obtain at least one second instruction set.
(3) Matching module 30
A matching module 30 for partitioning any one of the n partitions SiMatching the corresponding first instruction set and second instruction set SiIs e {1, 2,. eta., n }.
In this embodiment, the first instruction set includes at least one first instruction, the second instruction set includes at least one second instruction, and the matching module 30 is mainly configured to:
comparing the partitions SiWhether at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are identical;
if partition SiIf at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are completely the same, the partition S is determinediThe corresponding first instruction set and the second instruction set are matched;
if partition SiIf at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are not identical, the partition S is determinediThe corresponding first instruction set and second instruction set do not match.
(4) Update module 40
An update module 40 for determining if the partition SiIf the corresponding first instruction set and second instruction set do not match, then according to partition SiCorresponding first instruction set to partition SiThe corresponding second instruction set is updated.
In this embodiment, the updating module 40 is mainly configured to:
determining a partition SiCorresponding first instruction set and partition SiMatching degree of the corresponding second instruction set;
according to the matching degree and the partition SiCorresponding first instruction set to partition SiThe corresponding second instruction set is updated.
Further, the updating module 40 is mainly used for:
if the matching degree is not less than the preset matching degree, partitioning the SiStoring a first instruction not present in the corresponding second instruction set to partition SiCorresponding second instruction set, and partitioning SiCorresponding second instruction set and partition SiDeleting second instructions different from the first instructions in the corresponding first instruction set;
if the matching degree is less than the preset matching degree, using the subarea SiReplacement of partition S by a corresponding first instruction setiA corresponding second instruction set.
Further, the update module 40 may be mainly configured to:
determining a partition SiThe sum of the total number of the second instructions in the corresponding second instruction set and the partition SiA first number of second instructions in the corresponding first instruction set, wherein the first instructions are the same as the first instructions;
calculating a quotient value between the first number and the total number;
and taking the quotient value as the matching degree.
As can be seen from the above description, the update apparatus provided in this embodiment is applied to a mobile terminal provided with a near field communication chip, where the near field communication chip includes n partitions, the first obtaining module 10 obtains an update instruction, the update instruction carries a firmware file, the firmware file includes at least one first instruction set, each first instruction set corresponds to one partition of the n partitions, n is a natural number not less than 1, then, the second obtaining module 20 obtains at least one second instruction set stored in the near field communication chip, each second instruction set corresponds to one partition of the n partitions, and then, the matching module 30 matches any partition S of the n partitionsiMatching the corresponding first instruction set and second instruction set SiIs e {1, 2.. eta., n }, if partition S is partitionediIf the corresponding first instruction set and second instruction set do not match, update module 40 updates the partition SiCorresponding first instruction set to partition SiAnd the corresponding second instruction set is updated, so that the updating time is reduced, and the power consumption of the mobile terminal is also reduced.
In addition, this application embodiment still provides a mobile terminal, and this mobile terminal is provided with near field communication chip, and near field communication chip includes n subregion, can be equipment such as smart mobile phone, panel computer. As shown in fig. 5, the mobile terminal 500 includes a processor 501, a memory 502. The processor 501 is electrically connected to the memory 502.
The processor 501 is a control center of the mobile terminal 500, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or loading an application stored in the memory 502 and calling data stored in the memory 502, thereby integrally monitoring the mobile terminal.
In this embodiment, the processor 501 in the mobile terminal 500 loads instructions corresponding to processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 runs the application programs stored in the memory 502, so as to implement various functions:
acquiring an update instruction, wherein the update instruction carries a firmware file, the firmware file comprises at least one first instruction set, each first instruction set corresponds to one partition of n partitions, and n is a natural number not less than 1;
acquiring at least one second instruction set stored in the near field communication chip, wherein each second instruction set corresponds to one partition of the n partitions;
any one of the n partitions is partitioned into SiMatching the corresponding first instruction set and second instruction set SiThe index i ∈ {1, 2,..., n };
if partition SiIf the corresponding first instruction set and second instruction set do not match, then according to partition SiCorresponding first instruction set to partition siThe corresponding second instruction set is updated.
Fig. 6 shows a specific structural block diagram of a mobile terminal provided in an embodiment of the present application, where the mobile terminal may be used to implement the updating method provided in the foregoing embodiment. The mobile terminal 300 may be a smart phone or a tablet computer provided with a near field communication chip, where the near field communication chip includes n partitions.
The RF circuit 310 is used for receiving and transmitting electromagnetic waves, and performs interconversion between the electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices. RF circuitry 310 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. RF circuit 310 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The wireless network may use various communication standards, protocols and technologies, including but not limited to global system for mobile communication (GSM), enhanced mobile communication (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), wireless fidelity (Wi-Fi) (such as ieee802.11a, ieee802.11b, ieee802.11g and/or ieee802.11n), voice over internet protocol (VoIP), microwave access (world interoperability for microwave), other suitable protocols for short message communication (Wi-Max), and any other suitable instant messaging protocols, including those currently developed.
The memory 320 may be used for storing software programs and modules, such as the updating method and the corresponding program instructions/modules in the above embodiments, and the processor 380 executes various functional applications and data processing, i.e. implements the communication data saving function, by running the software programs and modules stored in the memory 320. The memory 320 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 320 may further include memory located remotely from the processor 380, which may be connected to the mobile terminal 300 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 330 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 330 may include a touch-sensitive surface 331 as well as other input devices 332. The touch-sensitive surface 331, also referred to as a touch screen or touch pad, may collect touch operations by a user on or near the touch-sensitive surface 331 (e.g., operations by a user on or near the touch-sensitive surface 331 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 331 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 380, and can receive and execute commands sent by the processor 380. In addition, the touch-sensitive surface 331 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 330 may comprise other input devices 332 in addition to the touch sensitive surface 331. In particular, other input devices 332 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 340 may be used to display information input by or provided to the user and various graphical user interfaces of the mobile terminal 300, which may be made up of graphics, text, icons, video, and any combination thereof. The display unit 340 may include a display panel 341, and optionally, the display panel 341 may be configured in the form of an LCD (liquid crystal display), an OLED (organic light-emitting diode), or the like. Further, touch-sensitive surface 331 may overlay display panel 341, and when touch-sensitive surface 331 detects a touch operation thereon or thereabout, communicate to processor 380 to determine the type of touch event, and processor 380 then provides a corresponding visual output on display panel 341 in accordance with the type of touch event. Although in FIG. 6, touch-sensitive surface 331 and display panel 341 are implemented as two separate components for input and output functions, in some embodiments, touch-sensitive surface 331 and display panel 341 may be integrated for input and output functions.
The mobile terminal 300 may also include at least one sensor 350, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 341 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 341 and/or the backlight when the mobile terminal 300 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured on the mobile terminal 300, detailed descriptions thereof are omitted.
The mobile terminal 300, which may assist the user in e-mail, web browsing, streaming media access, etc., through the transmission module 370 (e.g., a Wi-Fi module), provides the user with wireless broadband internet access. Although fig. 6 shows the transmission module 370, it is understood that it does not belong to the essential constitution of the mobile terminal 300 and may be omitted entirely within the scope not changing the essence of the invention as needed.
The processor 380 is a control center of the mobile terminal 300, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile terminal 300 and processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory 320, thereby integrally monitoring the mobile phone. Optionally, processor 380 may include one or more processing cores; in some embodiments, processor 380 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 380.
The mobile terminal 300 also includes a power supply 390 (e.g., a battery) that provides power to the various components and, in some embodiments, may be logically coupled to the processor 380 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the mobile terminal 300 may further include a camera (e.g., a front camera, a rear camera), a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the display unit of the mobile terminal is a touch screen display, the mobile terminal further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
acquiring an update instruction, wherein the update instruction carries a firmware file, the firmware file comprises at least one first instruction set, each first instruction set corresponds to one partition of n partitions, and n is a natural number not less than 1;
acquiring at least one second instruction set stored in the near field communication chip, wherein each second instruction set corresponds to one partition of the n partitions;
any one of the n partitions is partitioned into SiMatching the corresponding first instruction set and second instruction set SiThe index i ∈ {1, 2,..., n };
if partition SiIf the corresponding first instruction set and second instruction set do not match, then according to partition SiCorresponding first instruction set to partition SiThe corresponding second instruction set is updated.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor. To this end, embodiments of the present application provide a storage medium including mobile terminal-executable instructions. The mobile terminal executable instructions, when executed by a mobile terminal processor, perform the steps of any one of the update methods provided by the embodiments of the present application.
Wherein the storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, or the like.
Since the instructions stored in the storage medium can execute the steps in any of the updating methods provided in the embodiments of the present invention, the beneficial effects that can be achieved by any of the updating methods provided in the embodiments of the present invention can be achieved, for details, see the foregoing embodiments, and are not described herein again.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
In summary, although the present application has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present application, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application, so that the scope of the present application shall be determined by the appended claims.
Claims (10)
1. An updating method applied to a mobile terminal provided with a near field communication chip, wherein the near field communication chip comprises n partitions, the updating method comprising:
acquiring an update instruction, wherein the update instruction carries a firmware file, the firmware file comprises at least one first instruction set, each first instruction set corresponds to one partition of the n partitions, and n is a natural number not less than 1;
acquiring at least one second instruction set stored in the near field communication chip, wherein each second instruction set corresponds to one partition of the n partitions;
any one of the n partitions is partitioned into SiMatching the corresponding first instruction set and second instruction set, SiThe index i ∈ {1, 2,..., n };
if the partition SiIf the corresponding first instruction set and second instruction set do not match, then according to the partition SiCorresponding first instruction set to the partition SiThe corresponding second instruction set is updated.
2. The updating method of claim 1, wherein the first finger is a fingerThe instruction set comprises at least one first instruction, the second instruction set comprises at least one second instruction, and the partition S is any one of the n partitionsiMatching the corresponding first instruction set and the second instruction set, specifically comprising:
comparing the partitions SiWhether at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are identical;
if the partition SiIf at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are completely the same, the partition S is judgediThe corresponding first instruction set and the second instruction set are matched;
if the partition SiIf at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are not identical, the partition S is judgediThe corresponding first instruction set and second instruction set do not match.
3. The updating method according to claim 2, wherein said updating is according to said partition SiCorresponding first instruction set to the partition SiUpdating the corresponding second instruction set, specifically including:
determining the partition SiCorresponding first instruction set and the partition SiMatching degree of the corresponding second instruction set;
according to the matching degree and the subarea SiCorresponding first instruction set to the partition SiThe corresponding second instruction set is updated.
4. The updating method according to claim 3, wherein said updating is performed according to said matching degree and said partition SiCorresponding first instruction set to the partition SiUpdating the corresponding second instruction set, specifically including:
if the matching degree is not less than the preset matching degree, the partition S is dividediStoring the first instruction not existing in the corresponding second instruction set to the instruction registerThe section SiCorresponding second instruction set, and partitioning the SiCorresponding second instruction set and the partition SiDeleting second instructions different from the first instructions in the corresponding first instruction set;
if the matching degree is less than the preset matching degree, using the subarea SiReplacing the partition S with a corresponding first set of instructionsiA corresponding second instruction set.
5. The update method of claim 3, wherein the determining the partition SiCorresponding first instruction set and the partition SiThe matching degree of the corresponding second instruction set specifically includes:
determining the partition SiThe sum of the total number of the second instructions in the corresponding second instruction set and the partition SiA first number of second instructions in the corresponding first instruction set, wherein the first instructions are the same as the first instructions;
calculating a quotient value between the first number and the total number;
and taking the quotient value as the matching degree.
6. The updating method according to claim 1, wherein the obtaining at least one second instruction set stored in the near field communication chip specifically includes:
acquiring at least one binary code set stored in the near field communication chip, wherein each binary code set comprises at least one binary code;
converting all binaries in each of the binary sets into instructions to obtain the at least one second instruction set.
7. An update apparatus applied to a mobile terminal provided with a near field communication chip including n partitions, the update apparatus comprising:
a first obtaining module, configured to obtain an update instruction, where the update instruction carries a firmware file, the firmware file includes at least one first instruction set, each first instruction set corresponds to one partition of the n partitions, and n is a natural number not less than 1;
a second obtaining module, configured to obtain at least one second instruction set stored in the near field communication chip, where each second instruction set corresponds to one partition of the n partitions;
a matching module for partitioning any one of the n partitions into SiMatching the corresponding first instruction set and second instruction set, SiThe index i ∈ {1, 2,..., n };
an update module for if the partition SiIf the corresponding first instruction set and second instruction set do not match, then according to the partition SiCorresponding first instruction set to the partition SiThe corresponding second instruction set is updated.
8. The updating apparatus according to claim 7, wherein the first instruction set comprises at least one first instruction, wherein the second instruction set comprises at least one second instruction, and wherein the matching module is specifically configured to:
comparing the partitions SiWhether at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are identical;
if the partition SiIf at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are completely the same, the partition S is judgediThe corresponding first instruction set and the second instruction set are matched;
if the partition SiIf at least one first instruction and at least one second instruction in the corresponding first instruction set and second instruction set are not identical, the partition S is judgediThe corresponding first instruction set and second instruction set do not match.
9. A computer-readable storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor to perform the updating method of any of claims 1 to 6.
10. A mobile terminal comprising a processor and a memory, the processor being electrically connected to the memory, the memory being configured to store instructions and data, the processor being configured to perform the steps of the updating method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011126070.3A CN112256302A (en) | 2020-10-20 | 2020-10-20 | Updating method, updating device, storage medium and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011126070.3A CN112256302A (en) | 2020-10-20 | 2020-10-20 | Updating method, updating device, storage medium and mobile terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112256302A true CN112256302A (en) | 2021-01-22 |
Family
ID=74245175
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011126070.3A Pending CN112256302A (en) | 2020-10-20 | 2020-10-20 | Updating method, updating device, storage medium and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112256302A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106789154A (en) * | 2016-11-18 | 2017-05-31 | 武汉天喻信息产业股份有限公司 | A kind of POS terminal firmware update and more new system |
US20170344803A1 (en) * | 2016-05-30 | 2017-11-30 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method for unlocking mobile terminal and mobile terminal |
CN109976784A (en) * | 2019-01-24 | 2019-07-05 | 金卡智能集团股份有限公司 | Intelligent internet of things measuring instrument remote firmware updating method and system |
CN110209415A (en) * | 2019-05-29 | 2019-09-06 | 惠州Tcl移动通信有限公司 | Firmware method for refreshing, device and storage medium |
CN110888663A (en) * | 2019-11-11 | 2020-03-17 | 中科有讯(北京)科技有限公司 | Application updating method, service server, transfer server, cluster and storage medium |
CN111090444A (en) * | 2019-12-03 | 2020-05-01 | 航天信息股份有限公司 | Version upgrading method and device, storage medium and electronic equipment |
CN111736858A (en) * | 2019-03-25 | 2020-10-02 | 深圳Tcl新技术有限公司 | Terminal equipment upgrading method, storage medium and terminal equipment |
-
2020
- 2020-10-20 CN CN202011126070.3A patent/CN112256302A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170344803A1 (en) * | 2016-05-30 | 2017-11-30 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method for unlocking mobile terminal and mobile terminal |
CN106789154A (en) * | 2016-11-18 | 2017-05-31 | 武汉天喻信息产业股份有限公司 | A kind of POS terminal firmware update and more new system |
CN109976784A (en) * | 2019-01-24 | 2019-07-05 | 金卡智能集团股份有限公司 | Intelligent internet of things measuring instrument remote firmware updating method and system |
CN111736858A (en) * | 2019-03-25 | 2020-10-02 | 深圳Tcl新技术有限公司 | Terminal equipment upgrading method, storage medium and terminal equipment |
CN110209415A (en) * | 2019-05-29 | 2019-09-06 | 惠州Tcl移动通信有限公司 | Firmware method for refreshing, device and storage medium |
CN110888663A (en) * | 2019-11-11 | 2020-03-17 | 中科有讯(北京)科技有限公司 | Application updating method, service server, transfer server, cluster and storage medium |
CN111090444A (en) * | 2019-12-03 | 2020-05-01 | 航天信息股份有限公司 | Version upgrading method and device, storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111142711B (en) | Firmware configuration method and device, storage medium and mobile terminal | |
CN106786962B (en) | Charging control method and device and terminal | |
US11184754B2 (en) | Data sharing method and terminal | |
CN111277991B (en) | Operator name display method and device, mobile terminal and storage medium | |
CN108984066B (en) | Application icon display method and mobile terminal | |
CN103455330A (en) | Application program management method, terminal, equipment and system | |
CN107219951B (en) | Touch screen control method and device, storage medium and terminal equipment | |
CN107145386B (en) | Data migration method, terminal device and computer readable storage medium | |
EP2869604B1 (en) | Method, apparatus and device for processing a mobile terminal resource | |
CN108536349B (en) | Icon management method and mobile terminal | |
CN111027406B (en) | Picture identification method and device, storage medium and electronic equipment | |
CN111026457B (en) | Hardware configuration method and device, storage medium and terminal equipment | |
CN110245017B (en) | Resource identifier allocation method and equipment | |
CN110442361B (en) | Gray release method and device and electronic equipment | |
CN110225106B (en) | Data transmission method, device and storage medium | |
CN111104186A (en) | Bluetooth configuration file loading method and device, storage medium and terminal equipment | |
CN111045737A (en) | Equipment identifier acquisition method and device, terminal equipment and storage medium | |
CN110851014A (en) | Touch identification method and device, storage medium and terminal equipment | |
CN110955436A (en) | Application program installation method and electronic equipment | |
CN110995324B (en) | Bluetooth communication method, device, storage medium and terminal equipment | |
CN112256302A (en) | Updating method, updating device, storage medium and mobile terminal | |
CN109831771B (en) | Bluetooth searching method and device, mobile terminal and storage medium | |
CN110061813B (en) | Data encoding method, data decoding method and related devices | |
CN112367428A (en) | Electric quantity display method and system, storage medium and mobile terminal | |
CN108280798B (en) | Method and device for rendering and displaying browser kernel |
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: 20210122 |