Disclosure of Invention
In view of the foregoing, it is an object of the present application to provide a data updating method, a chip system, a first chip and a second chip for updating chip parameters so that the chips and a printer are matched with each other.
In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
in a first aspect, an embodiment of the present application provides a data updating method applied to a chip system, where the chip system includes a first chip and a second chip, and the first chip is communicatively connected to the second chip, and the method includes:
the second chip judges whether a new chip parameter exists in the first chip or not, wherein the new chip parameter is a parameter which is read by the first chip in the communication process and is not matched with the chip parameter of the first chip;
if the new chip parameters exist in the first chip, the second chip acquires the new chip parameters of the first chip and inputs the new chip parameters into the second chip;
and the second chip is updated according to the new chip parameters.
Further, before the second chip determines whether there is a new chip parameter inside the first chip, the method further includes:
the first chip reads the communication parameters under the condition of initialization;
the first chip judges whether the communication parameters are matched with the chip parameters or not;
if the communication parameters are not matched with the chip parameters, the first chip takes the parameters of which the communication parameters are not matched with the chip parameters as the new chip parameters;
the first chip stores the new chip parameters.
Further, the method further comprises:
and when the communication parameters are not matched with the chip parameters, the first chip is updated according to the new chip parameters.
Further, the step of upgrading the second chip according to the new chip parameters includes:
and updating the second chip by using the new chip parameters so as to finish the upgrading of the second chip.
In a second aspect, embodiments of the present application provide a chip system, where the chip system includes a first chip and a second chip, and the first chip is communicatively connected to the second chip;
the second chip judges whether a new chip parameter exists in the first chip or not, wherein the new chip parameter is a parameter which is read by the first chip in the communication process and is not matched with the chip parameter of the first chip;
if the new chip parameters exist in the first chip, the second chip acquires the new chip parameters of the first chip and inputs the new chip parameters into the second chip;
and the second chip is updated according to the new chip parameters.
Further, the step before the second chip determines whether there is a new chip parameter in the first chip further includes:
the first chip reads the communication parameters under the condition of initialization;
the first chip judges whether the communication parameters are matched with the chip parameters or not;
if the communication parameters are not matched with the chip parameters, the first chip takes the parameters which are not matched with the chip parameters in the communication parameters as the new chip parameters;
the first chip stores the new chip parameters.
Further, when the communication parameter does not match the chip parameter, the first chip is upgraded according to the new chip parameter.
Further, the step of upgrading the second chip according to the new chip parameters includes:
and updating the second chip by using the new chip parameters so as to finish the upgrading of the second chip.
In a third aspect, an embodiment of the present application provides a first chip, where the first chip includes an instruction unit, a first parameter matching unit, and a parameter storage unit;
the instruction unit is used for reading communication parameters under the condition that the first chip is initialized;
the first parameter matching unit is used for judging whether the communication parameters are matched with the chip parameters of the first chip or not;
the parameter storage unit is used for storing parameters which are not matched with the chip parameters in the communication parameters as new chip parameters under the condition that the communication parameters are not matched with the chip parameters of the first chip.
In a fourth aspect, an embodiment of the present application provides a second chip, where the second chip includes a second parameter matching unit, a parameter reading unit, and a remote upgrading unit;
the second parameter matching unit is used for judging whether a new chip parameter exists in the first chip or not, wherein the new chip parameter is a parameter which is not matched with the chip parameter of the first chip in the communication parameter read by the first chip in the communication process;
the parameter reading unit is used for acquiring the new chip parameters of the first chip under the condition that the new chip parameters exist in the first chip, and inputting the new chip parameters into the second chip;
the remote upgrading unit is used for upgrading according to the new chip parameters.
The embodiment of the application provides a data updating method, a chip system, a first chip and a second chip, wherein the second chip firstly judges whether a new chip parameter is stored in the first chip or not, the new chip parameter comprises a parameter which is read by the first chip in a communication process and is not matched with the chip parameter of the first chip, if the new chip parameter is stored in the first chip, the second chip acquires the new chip parameter of the first chip and inputs the new chip parameter into the second chip, and finally the second chip is updated according to the new chip parameter, so that the problem of updating the parameter under the condition of parameter mismatch is solved, and the chip can be better adapted to a printer.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a structure of a chip system 100 according to an embodiment of the disclosure. The chip system 100 includes a first chip 120 and a second chip 130, where the first chip 120 in the chip system 100 may be further communicatively connected to the printer 110, and the printer 110 may be a pin printer, an inkjet printer, a laser printer, or the like, which is not limited in this disclosure. The chip system 100 is used for updating firmware in the printer 110, wherein the first chip 120 and the second chip 130 may be factory chips, compatible substitute chips, and the like, and the first chip 120 is communicatively connected to the second chip 130 for data transmission or interaction.
If the printer 110 is communicatively connected to the first chip 120, the printer 110 is configured to receive a read command from the first chip 120 and send a communication parameter to the first chip 120, where the communication parameter may be a communication command or communication data.
The first chip 120 is configured to match the communication parameters with the chip parameters stored in the first chip 120 after receiving the communication parameters sent by the printer 110, and store the unmatched parameters as new chip parameters, where when the first chip 120 is communicatively connected with the printer 110, the connection mode may be a wired connection or a wireless connection, where the wired connection may be that a communication contact is used as an interface to connect to read the communication parameters of the printer 110, the wireless connection may be that a wireless interface is used to connect to read the communication parameters of the printer 110, and the wireless interface may be a near field wireless communication (Near Field Communication, NFC) interface, a bluetooth interface, a WIFI interface, or the like, and the chip parameters are the communication parameters stored in the first chip 120.
The second chip 130 is configured to detect whether a new chip parameter is stored in the first chip, and if the new chip parameter is stored in the first chip, acquire the stored new chip parameter to upgrade firmware of the second chip 130, and further, the second chip 130 is further provided with a remote upgrade interface, and the second chip 130 may be connected with an upgrade device through the remote upgrade interface, and the process of upgrading the firmware may be completed through the upgrade device.
Referring to fig. 2 and 3, fig. 2 is a schematic structural diagram of a first chip 120 according to an embodiment of the present application, and fig. 3 is a schematic structural diagram of a second chip 130 according to an embodiment of the present application.
The first chip 120 includes an instruction unit 121, a first parameter matching unit 122, and a parameter storage unit 123, where the first parameter matching unit 122 is communicatively connected to the instruction unit 121 and is communicatively connected to the parameter storage unit 123, and is configured to determine whether the communication parameter sent by the printer 110 matches the chip parameter of the first chip 120, and when the communication parameter sent by the printer 110 does not match the chip parameter of the first chip 120, send the unmatched parameter to the parameter storage unit 123 as a new chip parameter.
The instruction unit 121 of the first chip 120 is communicatively connected to the printer 110, and is configured to complete interaction with the printer communication instruction, where the connection manner of the instruction unit 121 and the printer communication instruction may be a wired connection or a wireless connection, and the specific connection manner is discussed above in connection of the first chip 120 and the printer 110, which is not described herein again, and the parameter storage unit 123 is capable of storing not only the new chip parameter, but also the chip parameter of the first chip 120 in the parameter storage unit 123.
The second chip 130 includes a second parameter matching unit 131, a parameter reading unit 132, and a remote upgrading unit 133, where the parameter reading unit 132 is communicatively connected to the second parameter matching unit 131 and is communicatively connected to the remote upgrading unit 133, and is configured to obtain a new chip parameter stored in a parameter storage unit of the first chip 120, and enter the new chip parameter into the parameter storage unit 123 of the second chip 130, and the second parameter matching unit 131 is further configured to determine whether the communication parameter is matched with the chip parameter in addition to determining whether the new chip parameter is in the first chip 120, and the remote upgrading unit 133 is configured to update data of the second chip 130 by using the new chip parameter, so as to complete upgrading of the second chip 130, thereby implementing firmware updating of the chip.
It should be noted that, the first chip 120 and the second chip 130 have the same structure, the first chip 120 not only includes the instruction unit 121, the first parameter matching unit 122, the parameter storage unit 123, but also includes a remote upgrade unit, a firmware storage unit, a parameter reading unit, and the like, where the firmware storage unit may be connected with the remote upgrade unit and used for storing a chip program, the remote upgrade unit and the parameter reading unit in the first chip 120 may also complete the action in the second chip 130, and the second chip has the same structure as the first chip and also includes the above units.
It should be noted that, the first parameter matching unit 122 in the first chip 120 and the second parameter matching unit 131 in the second chip 130 can determine whether there is a new chip parameter in the first chip 120, and also determine whether the communication parameter matches the chip parameter, except that actions initiated at different stages are different.
Based on fig. 1, 2 and 3, a data update method applied to the above-described chip system 100 will be described below. Referring to fig. 4, fig. 4 is a schematic flow chart of a data updating method according to an embodiment of the present application, where the data updating method includes the following steps:
s101, the second chip judges whether a new chip parameter exists in the first chip, wherein the new chip parameter is a parameter which is read by the first chip in the communication process and is not matched with the chip parameter of the first chip.
When the second chip 130 is to upgrade the chip firmware, an instruction is sent to the first chip 120 to determine whether the new chip parameters are stored in the first chip 120. The new chip parameters are obtained by matching the communication parameters with the chip parameters of the first chip 120, and are parameters of the communication parameters that do not match the chip parameters.
S102, if the new chip parameters exist in the first chip, the second chip acquires the new chip parameters of the first chip and inputs the new chip parameters into the second chip.
The instruction sent by the second chip 130 to the first chip 120 acquires the new chip parameters from the first parameter matching unit 122 of the first chip 120 if the new chip parameters are detected in the first parameter matching unit 122 of the first chip 120.
And S103, the second chip is updated according to the new chip parameters.
After acquiring the new chip parameters from the first chip 120, the parameter reading unit 132 of the second chip 130 adds the acquired new chip parameters to the chip firmware stored in the parameter storage unit of the second chip 130, so as to upgrade the firmware of the second chip 130, wherein the chip firmware is a software part stored in the internal nonvolatile memory area of the firmware storage unit.
In order to acquire and store the new chip parameters, referring to fig. 5 based on fig. 4, fig. 5 shows another flow chart of the data updating method provided in the embodiment of the present application, and before step S101, the data updating method may further include steps S110 to S150.
S110, under the initialization condition, the first chip reads the communication parameters.
S120, the first chip judges whether the communication parameters are matched with the chip parameters.
When the first chip 120 is initialized, the first chip 120 sends an instruction to the printer 110 through the instruction unit 121 to obtain the communication parameters, the instruction unit 121 of the first chip 120 obtains the chip parameters from the parameter storage unit of the first chip after receiving the communication parameters, and then compares the communication parameters with the chip parameters to determine whether the communication parameters and the chip parameters match, wherein the chip initialization refers to the state of the first chip 120 when working for the first time.
In the embodiment of the present application, if the communication parameter does not match the chip parameter, step S130 is performed, and if the communication parameter matches the chip parameter, step S150 is performed.
S130, the first chip takes the parameters which are not matched with the chip parameters in the communication parameters as new chip parameters.
In the case where the communication parameters and the chip parameters cannot be matched, the first parameter matching unit 122 of the first chip 120 obtains the unmatched parameters as new chip parameters, and sends the new chip parameters to the parameter storage unit 123 for storage, and at this time, the new chip parameters and the chip parameters are stored in the parameter storage unit 123, and in addition, the printer 110 may report errors and display reasons of the failure.
S140, the first chip stores the new chip parameters.
In a specific embodiment, the parameter storage unit 123 of the first chip 120 has the chip parameters of parameter 1, parameter 2 and parameter 3, and the communication parameters sent to the first chip 120 by the printer 110 have the parameters of parameter 1, parameter 2 and parameter 3, and parameter 4, if the first parameter matching unit 122 detects that only the parameter 4 cannot be matched, the parameter 4 is sent to the parameter storage unit 123 as a new chip parameter for storage.
S150, the printer works normally.
When the printer 110 is connected to the first chip 120 and the communication parameters and the chip parameters can be completely matched, the printer 110 can operate normally.
The process of updating the data of the first chip 120 according to the new chip parameters in S103 will be described in detail. Referring to fig. 6 on the basis of fig. 4, fig. 6 shows another flow chart of the data updating method provided in the embodiment of the present application, and step S103 may include the following sub-steps:
s1031, the second chip updates the second chip by using the new chip parameters to finish the upgrading of the second chip.
The first parameter matching unit 122 updates the new chip parameters into the chip firmware of the parameter storage unit 123, thereby completing the upgrade of the second chip.
Compared with the prior art, the embodiment of the application has the following beneficial effects:
firstly, the second chip judges whether a new chip parameter is stored in the first chip or not, the new chip parameter comprises a parameter which is read by the first chip in a communication process and is not matched with the chip parameter of the first chip, if the new chip parameter is stored in the first chip, the second chip acquires the new chip parameter of the first chip and inputs the new chip parameter into the second chip, and finally the second chip is updated according to the new chip parameter, so that the problem of updating the parameter under the condition of parameter mismatch is solved, and the chip can be better adapted to a printer.
Secondly, because the communication parameters of the printer installed on the chip are not required to be collected for updating the chip parameters, the time cost and the material cost are greatly saved, and the firmware updating efficiency is improved.
The functions of the chip system implementing the data updating method are described in detail below.
The second chip 130 is configured to determine whether a new chip parameter exists in the first chip, where the new chip parameter includes a parameter that a communication parameter read by the first chip in a communication process does not match a chip parameter of the first chip;
if the new chip parameters exist in the first chip, acquiring the new chip parameters of the first chip, and inputting the new chip parameters into the second chip;
and upgrading according to the new chip parameters.
Optionally, the first chip 120 is configured to read the communication parameters in the case of initialization;
judging whether the communication parameters are matched with the chip parameters or not;
if the parameters are not matched, taking the parameters which are not matched with the chip parameters in the communication parameters as new chip parameters;
the new chip parameters are stored.
Optionally, the first chip 120 is further configured to upgrade according to the new chip parameters when the communication parameters do not match the chip parameters.
Optionally, the second chip 130 is further used to update the second chip with the new chip parameters to complete the upgrade of the second chip.
The functions of the first chip and the second chip in the chip system will be described in detail.
The first chip 120 includes an instruction unit 121, a first parameter matching unit 122, and a parameter storage unit 123;
the instruction unit 121 is configured to read communication parameters when the first chip is initialized;
the first parameter matching unit 122 is configured to determine whether the communication parameter matches a chip parameter of the first chip;
the parameter storage unit 123 is configured to store, as a new chip parameter, a parameter that does not match the chip parameter among the communication parameters in a case where the communication parameter does not match the chip parameter of the first chip.
The second chip 130 includes a second parameter matching unit 131, a parameter reading unit 132, and a remote upgrading unit 133;
the second parameter matching unit 131 is configured to determine whether a new chip parameter exists in the first chip, where the new chip parameter is a parameter that is not matched with a communication parameter read by the first chip in a communication process;
the parameter reading unit 132 is configured to obtain a new chip parameter of the first chip when the new chip parameter exists in the first chip, and input the new chip parameter into the second chip;
the remote upgrade unit 133 is used for upgrading according to the new chip parameters.
In summary, the embodiment of the application provides a data updating method, a chip system, a first chip and a second chip, firstly, the second chip firstly judges whether a new chip parameter is stored in the first chip, the new chip parameter includes a parameter that the communication parameter read by the first chip in the communication process is not matched with the chip parameter of the first chip, if the new chip parameter is stored in the first chip, the second chip acquires the new chip parameter of the first chip and inputs the new chip parameter into the second chip, and finally, the second chip is updated according to the new chip parameter, so that the problem of updating the parameter under the condition that the parameters are not matched is solved, and the chip can be better adapted to a printer.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.