Disclosure of Invention
In view of the above, an object of the present application is to provide a data updating method, a chip system, a first chip and a second chip, which are used to update chip parameters so that the chip and a printer are matched with each other.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, an embodiment of the present application provides a data updating method, which is 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, 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 upgraded according to the new chip parameters.
Further, before the second chip determines whether there are new chip parameters in 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;
if not, the first chip takes the communication parameter and the parameter of which the chip parameter is not matched as the new chip parameter;
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 upgraded according to the new chip parameters.
Further, the step of upgrading the second chip according to the new chip parameters includes:
and the second chip updates the second chip by using the new chip parameters so as to finish the upgrading of the second chip.
In a second aspect, an embodiment of the present application provides 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, 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 upgraded according to the new chip parameters.
Further, the step of determining whether the first chip has new chip parameters in the second 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;
if not, the first chip takes the parameter which is not matched with the chip parameter in the communication parameters as the new chip parameter;
the first chip stores the new chip parameters.
Further, when the communication parameters are not matched with the chip parameters, the first chip is upgraded according to the new chip parameters.
Further, the step of upgrading the second chip according to the new chip parameters includes:
and the second chip updates 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 the 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 upgrade unit;
the second parameter matching unit is used for judging 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;
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 recording the new chip parameters into the second chip;
and 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 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 the communication process and is not matched with the chip parameter of the first chip, if the new chip parameter exists 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 upgraded according to the new chip parameter, so that the problem of updating the parameter under the condition that the parameter is not matched is solved, and the chip can be better adapted to a printer.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a chip system 100 according to an embodiment of the present disclosure. The chip system 100 includes a first chip 120 and a second chip 130, the first chip 120 in the chip system 100 may also be communicatively connected to a printer 110, and the printer 110 may be a stylus 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 original 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 reading instruction of the first chip 120 and send a communication parameter to the first chip 120, where the communication parameter may be a communication instruction 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 then store the unmatched parameters as new chip parameters, when the first chip 120 is in Communication connection with the printer 110, the connection mode may be wired connection or wireless connection, where the wired connection may be connection through a Communication contact as an interface to read the Communication parameters of the printer 110, the wireless connection may be connection through a wireless interface to read the Communication parameters of the printer 110, the wireless interface may be a Near Field Communication (NFC) interface, or a bluetooth interface or a WIFI interface, 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, the stored new chip parameter is obtained to upgrade the firmware of the second chip 130, the second chip 130 further has a remote upgrade interface, the second chip 130 may further be connected to an upgrade device through the remote upgrade interface, and the process of upgrading the firmware may further be completed through the upgrade device.
Referring to fig. 2 and fig. 3, fig. 2 is a schematic structural diagram of a first chip 120 according to an embodiment of the present disclosure, and fig. 3 is a schematic structural diagram of a second chip 130 according to an embodiment of the present disclosure.
The first chip 120 includes an instruction unit 121, a first parameter matching unit 122 and a parameter storage unit 123, the first parameter matching unit 122 is connected to the instruction unit 121 and the parameter storage unit 123 in a communication manner, and is configured to determine whether the communication parameter sent by the printer 110 matches the chip parameter of the first chip 120, and send the unmatched parameter to the parameter storage unit 123 as a new chip parameter when the communication parameter sent by the printer 110 does not match the chip parameter of the first chip 120.
The instruction unit 121 of the first chip 120 is in communication connection with the printer 110, and is configured to complete communication instruction interaction with the printer, where the connection mode between the instruction unit and the printer 110 may be wired connection or wireless connection, and the specific connection mode is discussed above in connection between the first chip 120 and the printer 110, which is not described herein again, and the parameter storage unit 123 not only can store new chip parameters, but also stores the chip parameters 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 upgrade unit 133, where the parameter reading unit 132 is in communication connection with the second parameter matching unit 131, and in communication connection with the remote upgrade unit 133, and is configured to acquire a new chip parameter stored in the 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, the second parameter matching unit 131 is configured to determine whether there is a new chip parameter inside the first chip 120, and may also be configured to determine whether the communication parameter is matched with the chip parameter, and the remote upgrade unit 133 is configured to perform data update on the second chip 130 by using the new chip parameter, so as to complete upgrade of the second chip 130, thereby implementing firmware update on the chip.
It should be noted that the first chip 120 and the second chip 130 have the same structure, the first chip 120 includes not only the instruction unit 121, the first parameter matching unit 122, and the parameter storage unit 123, but also a remote upgrade unit, a firmware storage unit, and a parameter reading unit, etc., where the firmware storage unit may be connected to the remote upgrade unit for storing a chip program, and the remote upgrade unit and the parameter reading unit in the first chip 120 may also complete an 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 not only determine whether there is a new chip parameter inside the first chip 120, but also determine whether the communication parameter and the chip parameter are matched, except that the actions initiated at different stages are different.
On the basis of fig. 1, fig. 2 and fig. 3, a data updating method applied to the above-described chip system 100 will be described below. Referring to fig. 4, fig. 4 is a schematic flow chart illustrating 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 first chip 120 stores new chip parameters. The new chip parameter is obtained by matching the communication parameter with the chip parameter of the first chip 120, and is a parameter of the communication parameter that does not match with the chip parameter.
And S102, if the new chip parameters exist in the first chip, the second chip acquires the new chip parameters of the first chip and records the new chip parameters into the second chip.
The instruction sent by the second chip 130 to the first chip 120 is to obtain the new chip parameters from the first parameter matching unit 122 of the first chip 120 if it is detected that the new chip parameters exist in the first parameter matching unit 122 of the first chip 120.
And S103, upgrading the second chip 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 in the second chip 130, so as to upgrade the firmware of the second chip 130, where the chip firmware is a software portion stored in the internal nonvolatile storage area of the firmware storage unit.
In order to acquire and store the new chip parameters, with reference to fig. 5 based on fig. 4, fig. 5 shows another schematic 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, the first chip reads the communication parameters under the condition of initialization.
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 are matched, where the chip initialization refers to a state of the first chip 120 when the first chip operates 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.
And 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 that the communication parameter and the chip parameter cannot be matched, the first parameter matching unit 122 of the first chip 120 acquires a non-matching parameter as a new chip parameter, and sends the new chip parameter to the parameter storage unit 123 for storage, at this time, the parameter storage unit 123 stores the new chip parameter and the chip parameter, and besides, the printer 110 reports an error and displays a reason for the non-operation.
S140, the first chip stores the new chip parameters.
In a specific embodiment, the chip parameters of the parameter storage unit 123 of the first chip 120 include parameter 1, parameter 2, and parameter 3, and the communication parameters sent by the printer 110 to the first chip 120 include parameter 1, parameter 2, parameter 3, and parameter 4, and if the first parameter matching unit 122 detects that only 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 following describes in detail the process of updating data of the first chip 120 according to the new chip parameters in S103. Referring to fig. 6 on the basis of fig. 4, fig. 6 shows another schematic flow chart of the data updating method provided in the embodiment of the present application, and step S103 may include the following sub-steps:
and S1031, the second chip updates the second chip by using the new chip parameters so as to complete the upgrading of the second chip.
The first parameter matching unit 122 updates the new chip parameters to 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 the inside of the first chip stores new chip parameters or not, the new chip parameters comprise parameters which are read by the first chip in the communication process and are not matched with the chip parameters of the first chip, if the inside of the first chip has the new chip parameters, the second chip acquires the new chip parameters of the first chip and inputs the new chip parameters into the second chip, and finally the second chip is upgraded according to the new chip parameters, so that the problem of updating the parameters under the condition that the parameters are not matched is solved, and the chip can better adapt to a printer.
And secondly, various communication parameters do not need to be collected to update the chip parameters, but the communication parameters of the printer installed on the chip are collected to update, so that the time cost and the material cost are greatly saved, and the firmware updating efficiency is improved.
The functions of each part of the chip system for implementing the data updating method are described in detail below.
The second chip 130 is configured to determine whether a new chip parameter exists inside the first chip, where the new chip parameter includes a parameter indicating that a communication parameter read by the first chip in a communication process is not matched with a chip parameter of the first chip;
if the new chip parameters exist in the first chip, obtaining 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 case of initialization;
judging whether the communication parameters are matched with the chip parameters;
if not, 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 parameter when the communication parameter does not match the chip parameter.
Optionally, the second chip 130 is further configured to update the second chip with the new chip parameters, so as to complete upgrading of the second chip.
The functions of the first chip and the second chip in the chip system will be described in detail below.
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 a communication parameter 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 in the communication parameters when 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 upgrade unit 133;
the second parameter matching unit 131 is configured to determine whether a new chip parameter exists inside the first chip, where the new chip parameter is a parameter of the first chip, where a communication parameter read by the first chip in a communication process is not matched with a chip parameter of the first chip;
the parameter reading unit 132 is configured to obtain a new chip parameter of the first chip when the new chip parameter exists inside the first chip, and record the new chip parameter into the second chip;
the remote upgrade unit 133 is configured to upgrade according to the new chip parameters.
To sum up, the embodiment of the present application provides a data updating method, a chip system, a first chip and a second chip, where the second chip first determines whether a new chip parameter is stored in the first chip, where the new chip parameter includes a parameter indicating that a communication parameter read by the first chip in a communication process is not matched with a chip parameter of the first chip, and if the first chip has the new chip parameter, the second chip obtains the new chip parameter of the first chip and inputs the new chip parameter into the second chip, and finally the second chip is upgraded according to the new chip parameter, so that the problem of updating the parameter under the condition that the parameter is not matched is solved, and the chip can better adapt to a printer.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.