CN115809214A - Chip, data transmission method and device - Google Patents

Chip, data transmission method and device Download PDF

Info

Publication number
CN115809214A
CN115809214A CN202211651297.9A CN202211651297A CN115809214A CN 115809214 A CN115809214 A CN 115809214A CN 202211651297 A CN202211651297 A CN 202211651297A CN 115809214 A CN115809214 A CN 115809214A
Authority
CN
China
Prior art keywords
data
response message
host
time
matching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211651297.9A
Other languages
Chinese (zh)
Inventor
刘康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jihai Microelectronics Co ltd
Original Assignee
Jihai Microelectronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jihai Microelectronics Co ltd filed Critical Jihai Microelectronics Co ltd
Priority to CN202211651297.9A priority Critical patent/CN115809214A/en
Publication of CN115809214A publication Critical patent/CN115809214A/en
Pending legal-status Critical Current

Links

Images

Abstract

The chip, the data transmission method and the data transmission device provided by the embodiment of the application comprise the steps of receiving first data and second data sent by a host; the second data is data generated by the host based on the first data; detecting whether the first data and the second data are matched, and if so, sending a matching response message to the host within a preset time and before the first data and the second data are stored; the matching response message is used for identifying that the first data is matched with the second data; the preset time is no later than the latest time when the matching response message is received by the host. The method is used for improving the accuracy of the reliability judgment of the communication link.

Description

Chip, data transmission method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a chip, a data transmission method, and an apparatus.
Background
In some technologies, in order to improve the communication reliability between the storage components of the master and the slave, the master generally needs to send test storage data to the slave to detect whether the data link between the storage components of the master and the slave is reliable. For example, the master sends the first data and the second data to the slave. Wherein the second data is generated based on the first data. The slave machine receives the first data and the second data and judges whether the second data is matched with the first data or not. And if the first data and the second data are matched, storing the first data and the second data into the storage component, and sending a matching response message to the host computer after the first data and the second data are stored into the storage component. The master can know whether the communication with the storage unit of the slave is reliable or not through the matching response message.
On the host side, after the host sends the first data and the second data, the matching response message needs to be received within the specified time, and if the matching response message is not received within the specified time, the first data and the second data transmitted by the host are considered to be not matched. On the slave side, the slave needs to send a matching response message to the host after completely writing the first data and the second data in the storage unit. The slave takes a certain time to store the first data and the second data in the storage unit. If the time is too long, the time required for the slave to completely store the first data and the second data in the storage component is longer than the specified time for the host to receive the matching response message, so that the slave cannot send the matching response message to the host within the specified time, the host generates an error judgment that the first data and the second data transmitted by the host are not matched, and the accuracy of reliability judgment is reduced. In addition, in the above-mentioned solution, the slave side needs to store the first data and the second data in the storage unit before sending the matching response message to the master side, so that the process of sending the matching response message and storing the first data and the second data from the slave side is not flexible.
Disclosure of Invention
In view of this, the present application provides a data transmission method, apparatus, chip, device and storage medium, so as to solve the problem of inaccurate reliability judgment in the prior art.
In a first aspect, an embodiment of the present application provides a chip, which communicates with a host, where the chip is configured to:
receiving first data and second data sent by the host; the second data is data generated by the host based on the first data;
detecting whether the first data and the second data are matched;
if the first data and the second data are matched, sending a matching response message to the host within a preset time and before the first data and the second data are stored; the matching response message is used for identifying that the first data and the second data are matched; the preset time is not later than the latest time when the host receives the matching response message.
In a possible implementation manner of the first aspect, the chip is specifically configured to:
storing first subdata before sending a matching response message to the host; the first sub data is partial data in the first data and/or the second data;
after the first subdata is stored, sending a matching response message to the host within preset time and before the first data and the second data are stored;
and after the matching response message is sent to the host, storing second subdata, wherein the second subdata is the data except the first subdata in the first data and the second data.
In a possible implementation manner of the first aspect, the chip is further configured to:
if so, acquiring the matching duration; the matching duration is a duration for detecting whether the first data and the second data are matched;
prior to sending the match response message to the host, storing the first child data comprises:
and when the matching duration is less than a first preset duration, storing the first subdata before sending a matching response message to the host.
In a possible implementation manner of the first aspect, the chip is specifically configured to:
and if so, sending a matching response message to the host within preset time, and storing the first data and the second data after sending the matching response message to the host.
In a possible implementation manner of the first aspect, the chip is further configured to:
if so, acquiring the matching duration; the matching duration is a duration for detecting whether the first data and the second data are matched;
after sending the match response message to the host, storing the first data and the second data comprises:
and when the matching duration is longer than a first preset duration, storing the first data and the second data after sending a matching response message to the host.
In a possible implementation manner of the first aspect, the chip is further configured to:
if the time is matched with the preset time, acquiring first time; the first time is the time when whether the first data is matched with the second data is detected;
detecting whether the first time is earlier than the preset time;
if the first data and the second data are matched, sending a matching response message to the host within a preset time and before the first data and the second data are stored, wherein the sending of the matching response message to the host comprises:
if the first time is matched with the second time, determining the target time based on the first time and the preset time, and sending a matching response message to the host at the target time before the first data and the second data are stored; the target time is later than the first time and is not later than the preset time.
In a possible implementation manner of the first aspect, the second data is an inverse data of the first data.
In a possible implementation manner of the first aspect, a sending duration of the matching response message is not greater than a second preset duration.
In one possible implementation manner of the first aspect, the matching response message includes an active level signal.
In a second aspect, an embodiment of the present application provides a data transmission apparatus, including: a chip according to any one of the preceding first aspects.
In a third aspect, an embodiment of the present application provides a data transmission method, which is applied to a chip, where the chip communicates with a host; the method comprises the following steps:
receiving first data and second data sent by the host; the second data is data generated by the host based on the first data;
detecting whether the first data and the second data are matched;
if the first data and the second data are matched, sending a matching response message to the host within a preset time and before the first data and the second data are stored; the matching response message is used for identifying that the first data and the second data are matched; the preset time is not later than the latest time when the host receives the matching response message.
By adopting the scheme provided by the embodiment of the application, the first data and the second data sent by the host are received; detecting whether the first data and the second data are matched, and if so, sending a matching response message to the host within a preset time and before the first data and the second data are stored; the matching response message is used for identifying that the first data is matched with the second data; the preset time is no later than the latest time when the matching response message is received by the host. That is to say, in the embodiment of the present application, after the chip receives the first data and the second data sent by the host and detects that the first data and the second data are matched, the chip may send the matching response message to the host within the preset time and before the first data and the second data are stored, and it is not necessary to send the matching response message again after the first data and the second data are stored, so that the freedom of the chip in storing the first data and the second data is improved, and it is ensured that the matching response message is sent to the host in time within the specified time, so that the host can receive the response message within the specified time, and the host can more accurately perform the reliability determination, that is, the accuracy of the reliability determination is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of another communication system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of another communication system according to an embodiment of the present application;
fig. 4 is a schematic view of a data transmission scenario provided in an embodiment of the present application;
fig. 5 is a schematic view of another scenario of data transmission according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another communication system according to an embodiment of the present application;
fig. 7a is a schematic view of another scenario of data transmission according to an embodiment of the present application;
fig. 7b is a schematic view of another scenario of data transmission according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a consumable chip according to an embodiment of the present disclosure;
fig. 9 is a flowchart illustrating a data transmission method according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solution of the present application, the following detailed description is made with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. 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 application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely a relationship that describes an associated object, meaning that three relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Referring to fig. 1, a schematic structural diagram of a communication system according to an embodiment of the present application is provided. As shown in fig. 1, the communication system includes a host 100 and a chip 200 (a slave corresponding to the host 100), the host 100 is provided with a communication port 101, the chip 200 is provided with an input/output module 201, a communication link 300 is established between the communication port 101 and the input/output module 201, and the host 100 and the chip 200 can perform information transmission through the communication link 300. The communication link 300 may be a contact communication link, i.e. a wired communication link. Specifically, the communication port 101 and the input/output module 201 may be electrically contacted by a contact pin, a contact point or a spring plate, so as to establish the communication link 300. In other embodiments, the communication link 300 may also be a contactless communication link, i.e. a wireless communication link, in which case the communication port 101 and the input/output module 201 may include an antenna or a coil for transmitting wireless signals. In some possible implementations, the communication link 300 may also be referred to as a data bus. In general, when the host 100 and the chip 200 communicate with each other, the information is transmitted and received in a time-division manner (i.e., duplex communication) in both directions.
The host 100 according to the embodiment of the present application is a device that can implement data processing, control, or related operations, and the chip 200 is configured to be mounted on the host 100 to assist the host 100 to perform related functions. In one example, the host may be a computer and the chip may be a peripheral/device of the computer. In yet another example, the host may be a mobile terminal (e.g., a cell phone, a tablet, a PDA, etc.), and the chip is an accessory or peripheral device, apparatus of the mobile terminal, such as a lithium battery chip, a wearable device chip, etc. For example, in the application scenario shown in fig. 2, the host 100 is the printing device 110, and the chip 200 is the consumable chip 210. The printing device 110 is provided with a communication port 111, the consumable chip 210 is provided with an input/output module 211, and a communication link 310 is established between the communication port 111 and the input/output module 211. Printing device 110 and consumable chip 210 may communicate information via communication link 310. For example, the consumable chip 210 is used to provide identification information and recording material usage information during an imaging process.
For convenience of description, the printing apparatus 110 and the consumable chip 210 are taken as examples in the following to explain the technical solutions provided in the embodiments of the present application. However, it should be understood by those skilled in the art that the solution provided in the embodiment of the present application can be applied to other types of hosts and chips besides the printing apparatus 110 and the consumable chip 210, and the embodiment of the present application is not limited thereto.
In the image forming process, the printing apparatus 110 requires the assistance of the image forming assistance information of the consumable cartridge to complete the image forming process. The imaging auxiliary information of the printing apparatus 110 is recorded on the consumable chip 210 in addition to the printing apparatus 110. The consumable chip 210 mainly serves to identify and provide the status of the recording material, so that when the consumable chip 210 is installed on the printing apparatus 110, the printing apparatus 110 reads the information of the consumable chip 210 and sends the status of the printing job and related information to the consumable chip 210.
In the related art, in order to improve the communication reliability between the printing apparatus 110 and the consumable chip 210, the printing apparatus 110 generally needs to send test storage data to the consumable chip 210 to detect whether the communication link between the printing apparatus 110 and the consumable chip 210 is reliable. For example, the printing apparatus 110 sends the first data and the second data to the consumable chip 210. Wherein the second data is generated based on the first data. The consumable chip 210 receives the first data and the second data, and determines whether the second data matches the first data. And if the first data and the second data are matched, storing the first data and the second data, and then sending a matching response message to the printing device 110. The printing apparatus 110 can know whether the communication with the consumable chip 210 is reliable through the matching response message.
On the printing device 110 side, after the printing device 110 has sent the first data and the second data, it is necessary to receive the matching response message within a predetermined time, and if the matching response message is not received within the predetermined time, it is considered that the first data and the second data transmitted by the printing device do not match. On the consumable chip 210 side, the consumable chip 210 needs to send a matching response message to the printer 110 after storing the first data and the second data. The consumable chip 210 requires a certain time to store the first data and the second data. If the time is too long, the time required for the consumable chip 210 to store the first data and the second data is longer than the specified time for the printer 110 to receive the matching response message, so that the consumable chip 210 cannot send the matching response message to the printer 110 within the specified time, the printer 110 makes an error judgment that the first data and the second data transmitted by the printer are not matched, and the accuracy of the reliability judgment is reduced. In addition, in the above solution, the consumable chip 210 needs to complete the storage of the first data and the second data before sending the matching response message to the printer 110, so that the processing procedure of sending the matching response message and storing the first data and the second data by the consumable chip 210 is not flexible.
In view of the above problem, the consumable chip 210 provided in the embodiment of the present application further includes a control module 212, as shown in fig. 3. Thus, the input/output module 211 can receive the first data and the second data transmitted by the printer 110 through the communication link 310; the control module 212 may detect whether the first data and the second data match. If the first data and the second data are matched, the input/output module 211 may be triggered to send a matching response message to the printer 110 through the communication link 310 within a preset time and before the storage of the first data and the second data is completed; wherein the preset time is not later than the latest time when the printer 110 receives the matching response message. That is to say, in the embodiment of the present application, after the consumable chip 210 receives the first data and the second data sent by the printer 110 and detects that the first data and the second data are matched, the matching response message may be sent to the printer 110 within the preset time and before the first data and the second data are stored, and it is not necessary to send the matching response message again after the first data and the second data are stored, so that the freedom degree of the consumable chip 210 storing the first data and the second data is improved, and it is ensured that the matching response message is sent to the printer 110 in time within the specified time, so that the printer 110 can receive the matching response message within the specified time, and thus the printer 110 can more accurately perform the reliability determination, that is, the accuracy of the reliability determination is improved. The details will be described below.
In a specific implementation, before the printer 110 performs data communication to the consumable chip 210, it is required to detect whether the communication link 310 for data transmission between the printer 110 and the consumable chip 210 is reliable. At this time, the printer 110 needs to transmit the first data and the second data for performing the reliability test to the consumable chip through the communication link 310. Here, the second data is generated based on the first data, so that when the consumable chip 210 knows the generation rule of the second data generated by the printer 110, it is possible to detect whether the first data and the second data match based on the generation rule when the first data and the second data are received, because the second data is generated based on the first data. Based on this, the printer 110 sends the first data and the second data to the consumable chip 210 through the communication link 310. The consumable chip 210 may receive the first data and the second data through the data link 310.
It should be understood that when the printer 110 sends the first data and the second data to the consumable chip 210, the first data and the second data may be packed into different data packets for sending. At this time, the consumable chip 210 may receive the two data packets through the communication link 310, and obtain the first data and the second data by analyzing the two data packets respectively. Of course, the printer 110 may also package the first data and the second data into a data packet to be transmitted to the consumable chip 210 through the communication link 310. At this time, in order to accurately know which part of data in the data packet is the first data and which part of data is the second data by analyzing the data packet, the position identification information of the first data and the position identification information of the second data need to be set in the data packet. In this way, after receiving the data packet, the consumable chip 210 may obtain the first data and the second data by analyzing the position identification information of the first data and the position identification information of the second data in the data packet.
As a possible implementation manner, in order to reduce the complexity of the matching detection of the first data and the second data and reduce the detection time, the second data is the inverse data of the first data. The second data is the inverse of the first data, which means that each bit in the second data is opposite to the data value at the same position in the first data. For example, the first data is 1010, and the second data is 0101.
After receiving the first data and the second data, the consumable chip 210 may detect whether the first data matches the second data, for example, the consumable chip 210 may determine a manner in which the printer 110 generates the second data, generate third data based on the first data in a manner in which the printer 110 generates the second data, and detect whether the third data is the same as the second data, so as to detect whether the first data matches the second data. Alternatively, the consumable chip 210 may determine a relationship between the first data and the second data, and determine whether the first data and the second data match according to the relationship between the first data and the second data. Of course, the consumable chip 210 may detect whether the first data matches the second data in other ways, which is not limited in this application.
As a possible implementation manner, when the second data is the inverse data of the first data, the consumable chip 210 may detect whether the first data is the same as the second data, which indicates that there is a communication error between the consumable chip 210 and the printer 110. At this time, the consumable chip 210 determines that the first data does not match the second data. In some embodiments, the first data may be a multi-bit binary number, in which case the second data generated by the printer 110 based on the first data is also a multi-bit binary number, with each bit of the binary number in the second data having the opposite value of the binary number at the same location in the first data. For example, the first data is 0101, and the second data generated by the printer 110 based on the first data is 1010. Thus, after the consumable chip 210 receives the first data and the second data, it may be detected whether each bit value in the first data is opposite to a value at the same position in the second data, and if both are opposite, the consumable chip 210 determines that the first data and the second data are inverse data, so as to determine that the first data and the second data match. If the consumable chip 210 detects that the value at the at least one bit identical position in the first data and the second data is identical, the consumable chip 210 may determine that the first data and the second data are not inverted data, and thus may determine that the first data and the second data do not match. For example, if the first data received by the consumable chip 210 is 0101 and the second data is 1011, and the last bit value 1 in the first data is the same as the last bit value 1 in the second data, it indicates that the first data and the second data are not inverted data, so that it can be determined that the first data does not match the second data.
In some embodiments, the consumable chip 210 may not send a response message to the printer 110 when it is determined that the first data does not match the second data, and at this time, the printer 110 does not receive the response message within a preset time period, it is determined that the communication link 310 between the printer 110 and the consumable chip 210 has a communication error and is unreliable.
Alternatively, in some embodiments, the consumable chip 210 may send a failure response message to the printer 110 via the communication link 310 when it is determined that the first data does not match the second data, and at this time, after the printer 110 receives the failure response message, it is determined that the communication link 310 between the printer 110 and the consumable chip 210 has a communication error and is unreliable.
In some embodiments, the consumable chip 210 needs to send a match response message to the printer 110 identifying that the first data and the second data match when determining that the first data and the second data match. Since the printer 110 needs to receive the matching response message within a prescribed time, the preset time may be set according to the latest time when the printer 110 receives the matching response message. The consumable chip 210 needs to send the matching response message to the printer 110 within the preset time and before completing the storage of the data and the second data, so that the printer 110 can be prevented from receiving the matching response message overtime, and the possibility that the printer 110 mistakenly judges that the communication of the data communication link with the consumable chip 210 is unreliable due to the fact that the printer 110 does not receive the matching response message within the specified time is reduced.
As a possible implementation manner, after determining that the first data and the second data are matched, the consumable chip 210 may store part of the first data and/or the second data before sending the matching response message to the printer 110. In order to enable the printer 110 to receive the matching response message within the specified time, the consumable chip 210 may transmit the matching response message to the printer 110 after storing part of the first data and/or the second data, without waiting until the first data and the second data are completely stored. Based on this, the consumable chip 210 is specifically configured to: the first sub data is stored before the matching response message is transmitted to the printer 110. After the first subdata is stored, within a preset time and before the first data and the second data are stored, sending a matching response message to the printer 110; after transmitting the matching response message to the printer 110, the second sub data is stored.
The first sub data is part of the first data and/or the second data. The second sub data is data other than the first sub data among the first data and the second data.
That is to say, in the embodiment of the present application, if the consumable chip 210 sends the matching message to the printer 110 after all the first data and the second data are stored, the printer 110 may receive the matching response message overtime, and the accuracy of the determination of the reliability of the communication link 310 by the printer 110 may be reduced. Therefore, when the consumable chip 210 detects that the first data and the second data match, before sending the matching response message to the printer 110, the consumable chip 210 may store part of the first data and/or the second data, that is, the consumable chip 210 stores the first sub-data of the first data and/or the second data. After the first sub-data is completely stored, the consumable chip 210 may send a matching response message to the printer 110 within a preset time and before the first data and the second data are completely stored. And after the matching response message is sent, storing other data in the first data and the second data, namely storing the second subdata. That is, the consumable chip 210 may first store part of the first data and/or the second data, and then send the matching response message within a preset time, so as to reduce the probability that the time for the consumable chip 210 to send the matching response message exceeds the specified time for the printer 110 to receive the response message, so as to improve the accuracy of the determination of the printer 110 on the communication reliability. After the matching response message is sent, the consumable chip 210 may continue to store the second sub-data in the first data and the second data to complete the storage of the first data and the second data.
Illustratively, it is assumed that the latest time when the printer 110 receives the matching response message is time t, and the preset time may be set as time t2, where the preset time t2 is less than or equal to t, as shown in fig. 4. The printer 110 may determine 4-bit binary data as first data, assume that the first data is 1010, and generate second data opposite to the first data based on the first data. That is, the binary number of each bit of the first data is inverted to obtain 0101 as the second data. The printer 110 sends the first data and the second data to the consumable chip 210 through the communication link 310. After the consumable chip 210 receives the first data and the second data, the matching detection is performed on the received first data and the received second data. At this time, the consumable chip 210 may detect whether each bit of the first data is the opposite data to the same data bit of the second data. If the first data received by the consumable chip 210 is 1010 and the second data received by the consumable chip is 0101, it can be detected that each bit of the first data and the same bit of the second data are both opposite data, and it can be determined that the first data and the second data match. When the consumable chip determines that the first data and the second data are matched, the consumable chip 210 may write part of the first data and/or the second data in the t1 time period, that is, write the first sub-data in the t1 time period first. Wherein t1 is less than the preset time t2. After the consumable chip 210 stores the first subdata, a matching response message is sent to the printer 110 within a time period from t1 to t2, and after the consumable chip 210 sends the matching response message, second subdata which is not stored in the first data and the second data is stored in the consumable chip 210, as shown in fig. 4.
As another possible implementation manner, after determining that the first data and the second data are matched, the consumable chip 210 may also send a matching response message to the printer 110 first, and then store the first data and the second data after sending the matching response message. At this time, the consumable chip 210 is specifically configured to:
if the data is matched, a matching response message is sent to the printer 110 within a preset time, and the first data and the second data are stored after the matching response message is sent to the printer 110.
That is, when the consumable chip 210 detects that the first data and the second data are matched, in order to ensure that the printer 110 can receive the matching response message within the specified time, the consumable chip 210 does not store the first data and the second data, but directly sends the matching response message to the printer 110 within the preset time, and stores the first data and the second data after sending the matching response message to the printer 110, so that the consumable chip 210 can be prevented from sending the matching response message to the printer 110 for a time exceeding the specified time for the printer 110 to receive the matching response message due to the storage of the first data and the second data, and the accuracy of the judgment of the printer 110 on the communication reliability is reduced.
For example, it is assumed that the latest time when the printer 110 receives the matching response message is time t, and the preset time may be set as time t2, where the preset time t2 is less than or equal to t, as shown in fig. 5. The printer 110 may determine 4-bit binary data as first data, assume that the first data is 1010, and generate second data opposite to the first data based on the first data. That is, the binary number of each bit of the first data is inverted to obtain 0101 as the second data. The printer 110 sends the first data and the second data to the consumable chip 210 via the communication link 310. After the consumable chip 210 receives the first data and the second data, the matching detection is performed on the received first data and the received second data. At this time, the consumable chip 210 may detect whether each bit of the first data is the opposite data to the same data bit of the second data. If the first data received by the consumable chip 210 is 1010 and the second data received by the consumable chip is 0101, it can be detected that each bit of the first data and the same bit of the second data are both opposite data, and it can be determined that the first data and the second data match. When the consumable chip determines that the first data and the second data are matched, the consumable chip 210 may send a matching response message to the printer 110 within a time t2, and after the consumable chip 210 sends the matching response message, the first data and the second data are stored in the consumable chip 210, as shown in fig. 5.
As a possible implementation manner, when detecting that the first data matches with the second data, the consumable chip 210 may determine that it stores part of the first data and/or the second data before sending the matching message according to the time length for detecting whether the first data matches with the second data; or directly sending the matching response message first and then storing the first data and the second data. At this time, the consumable chip 210 is further configured to obtain a matching duration if matching. The matching duration is a duration for detecting whether the first data and the second data are matched.
Before sending the matching response message to the host, the storing the first sub-data includes: and when the matching duration is less than the first preset duration, storing the first subdata before sending the matching response message to the host.
After sending the matching response message to the host, storing the first data and the second data comprises: and when the matching duration is longer than a first preset duration, storing the first data and the second data after sending a matching response message to the host.
That is, after detecting that the first data and the second data are matched, the consumable chip 210 may further obtain a matching duration when detecting whether the first data and the second data are matched. In some embodiments, a timing module 213 is also included in the consumable chip 210, as shown in FIG. 6. The timing module 213 is used for timing. The timing module 213 of the consumable chip 210 may start timing when the consumable chip 210 starts to perform the matching detection of the first data and the second data, and stop timing after detecting whether the first data and the second data are matched. In this way, the consumable chip 210 can obtain the matching time length through the timing of the timing module 213. And comparing the matching duration with a first preset duration, and when the matching duration is determined to be less than the first preset duration, indicating that the time taken for the consumable chip 210 to detect that the first data and the second data are matched is short, and at this time, after storing part of the first data and/or the second data, sending a matching response message. That is, the consumable chip 210 stores the first sub-data before sending the matching response message to the printer 110 when determining that the matching duration is less than the first preset duration. And transmits a matching response message to the printer 110 within a preset time after the first sub-data is stored. And after the matching response message is sent, storing the second subdata to finish the storage of the first data and the second data.
Alternatively, the consumable chip 210 compares the matching duration with a first preset duration, and when it is determined that the matching duration is longer than the first preset duration, it indicates that the time taken for the consumable chip 210 to detect that the first data and the second data are matched is longer, and at this time, in order to determine that the printer 110 receives the matching response message within a specified time, the consumable chip 210 may first send the matching response message to the printer 110 through the communication link 310. And storing the first data and the second data after the matching response message is sent.
Thus, it is possible to determine in the consumable chip 210 which way to use to send the matching response message to the printer 110 in the above-described manner. Of course, the consumable chip 210 may be determined in other manners, for example, according to the selection of the user, or a default manner is preset, or other manners, which is not limited in this application.
As a possible implementation manner, when the consumable chip 210 performs the matching detection on the first data and the second data, the detection time is too long, so that the time after the detection is over the specified time when the printer 110 receives the matching response message, and therefore, before the consumable chip 210 sends the matching response message to the printer 110, it is further required to determine whether the time for detecting whether the first data and the second data are matched is over the preset time. At this time, after detecting whether the first data matches with the second data, the consumable chip 210 may obtain a first time, that is, a time when detecting whether the first data matches with the second data. In some embodiments, when the timing module 213 is included in the consumable chip 210, the timing module 213 may perform matching detection on the first data and the second data for timing, that is, the timing module 213 may start timing when receiving the first data and the second data from the consumable chip 210, certainly, may also start timing when whether the first data and the second data are matched, and end timing when detecting whether the first data and the second data are matched, so that the timing module 213 may acquire the time when detecting whether the first data and the second data are matched. After obtaining the first time, the consumable chip 210 may compare the first time with a preset time, and detect whether the first time is earlier than the preset time. If the first time is later than the preset time, it indicates that the time taken for the consumable chip 210 to detect whether the first data matches with the second data is longer, and the time for detecting whether the first data matches with the second data exceeds the preset time, that is, the time exceeds the specified time for the printer 110 to receive the matching response message, the consumable chip 210 does not need to send the matching response message to the printer 110. In some embodiments, the consumable chip 210 may send a response message to the printer 110 matching the time timeout to trigger the printer 110 to adjust the first data and the second data to re-determine the reliability of the communication link 310.
If the first time is earlier than the preset time, it indicates that the time for the consumable chip 210 to detect whether the first data matches with the second data does not exceed the preset time, and at this time, the consumable chip 210 may determine the target time based on the first time and the preset time within a time period that is later than the first time and is not later than the preset time. At the target time and before the storage of the first data and the second data is completed, a matching response message is sent to the printer 110.
For example, it is assumed that the latest time when the printer 110 receives the matching response message is time t, and the preset time may be set as time t2, where the preset time t2 is less than or equal to t, as shown in fig. 7a and 7 b. The printer 110 may determine 4-bit binary data as first data, assume that the first data is 1010, and generate second data opposite to the first data based on the first data. That is, the binary number of each bit of the first data is inverted to obtain 0101 as the second data. The printer 110 sends the first data and the second data to the consumable chip 210 through the communication link 310. After the consumable chip 210 receives the first data and the second data, the matching detection is performed on the received first data and the received second data. At this time, the consumable chip 210 may detect whether each bit of the first data is the opposite data to the same data bit of the second data. If the first data received by the consumable chip 210 is 1010 and the second data received by the consumable chip is 0101, it can be detected that each bit of the first data and the same bit of the second data are both opposite data, and it can be determined that the first data and the second data match. When the consumable chip determines that the first data matches the second data, the timing module 213 may obtain a time when the consumable chip 210 finishes detecting the first data and the second data, that is, obtain the first time t4. Comparing t4 with the preset time t2, if t4 is later than t2, it means that the time for the consumable chip 210 to detect whether the first data and the second data match exceeds the specified time for the printer 110 to receive the matching response message, and the matching response message sent by the consumable chip 210 to the printer 110 also times out, as shown in fig. 7 a.
If t4 is earlier than t2, it indicates that the time for the consumable chip 210 to detect whether the first data and the second data are matched is earlier than the preset time t2, at this time, the consumable chip 210 may determine the target time t3 between the first time t4 and the preset time t2, and send a matching response message to the printer 110 before the target time t3 and the storage of the first data and the second data is completed, as shown in fig. 7 b. After the matching response message is transmitted, the data that is not stored in the first data and the second data is stored in the consumable chip 210.
As a possible implementation, the matching response message includes an active level signal.
In the embodiment of the present application, after the communication link 310 is established between the consumable chip 210 and the printer 110, the matching response message can be sent through the communication link 310. At this time, the matching response message is a level signal (ACK) transmitted in the communication link 310. To ensure that the signaling link is prevented from being interrupted, the consumable chip 210 can send an invalid signal to the printer 110 when the communication link 310 is not signaling. For example, the consumable chip 210 may always send a low signal or a high signal to the printer 110 when it is not necessary to send a response message to the printer 110. When a response message needs to be sent, the transmitted level signal can be adjusted. For example, the consumable chip 210 can always send a low level signal or a high level signal to the printer 110 through the communication link 310 when it is not necessary to send a response message to the printer 110, and then can switch the sent level signal to a high level signal or a low level signal when it is necessary to send a response message to the printer 110, and then switch back to a low level signal or a high level signal after the sending is completed. In this case, the level signal transmitted by the consumable chip 210 when the response message is not required to be transmitted to the printer 110 may be referred to as an invalid level signal, and the level signal switched when the response message is required to be transmitted may be referred to as an active level signal.
As shown in the above example, the description is made by taking the example in which the invalid signal is a low-level signal and the valid signal is a high-level signal. When the consumable chip 210 does not need to send a response message to the printer 110, it always sends a low level signal to the printer 110, and when the consumable chip 210 sends a matching response message to the printer 110 at time t3 within a preset time t2, the consumable chip 210 switches the level signal transmitted through the communication link 310 from the low level signal to the high level signal at time t3, and switches the level signal from the high level signal to the low level signal after the sending is completed, so as to complete the sending of the matching response message, as shown in fig. 4-7 b.
As a possible implementation manner, the consumable chip 210 may send a matching response message of the transient pulse signal to the printer 110, where the sending time duration of the matching response message is not greater than the second preset time duration.
Referring to fig. 8, a schematic structural diagram of a consumable chip provided in an embodiment of the present application is shown. The consumable chip 800 may be detachably mounted on a consumable cartridge, which may be an ink cartridge containing ink, a toner cartridge containing toner, or a toner cartridge, a toner cartridge containing toner, and the consumable cartridge may also be detachably mounted on the printing apparatus. The consumable chip 800 includes: control module 820, input/output module 810 and storage module 830 all electrically connect to control module 820, wherein:
the input/output module 810 is used for performing input/output communication with an external device, and when the consumable chip is installed in the printing device, can be used for receiving information/instructions sent by the printing device and sending information to the printing device. The storage module 830 is configured to store information about the consumable chip, such as a manufacturing date of the consumable chip, a manufacturer, a color of a recording material (e.g., ink, toner), a capacity of the recording material, a remaining amount or a consumed amount of the recording material, a number of printable pages, a number of printed pages, and rewritable or read-only information. In this embodiment, the storage module 830 may further store data characteristics before and after the printing device transmits the preset data (first data), for example, a predetermined number of bytes before the printing device transmits the preset data. The storage module 830 may employ a common non-volatile memory, or a combination of a non-volatile memory and a volatile memory.
In the storage module 830, several configuration fields may be set, which may adjust the consumable chip to determine when the predetermined data is present. During later maintenance, the preset bit/byte quantity or timing duration judged by the consumable chip can be adjusted by modifying the configuration field.
The control module 820 may be a single chip Microcomputer (MCU), a microcontroller, an FPGA, a logic circuit (ASIC), or the like, and is configured to control communication between the consumable chip and the printing apparatus, read information from the storage module 830, and store information in the storage module 830. In the embodiment of the present application, the functions in the interference module described above may be implemented by the control module 820.
The consumable chip may further include a circuit board, which carries the control module 820, the input/output module 810 and the storage module 830. In one embodiment, the control module 820, the input/output module 810 and the storage module 830 are integrally disposed in a same circuit.
Corresponding to the embodiment, the embodiment of the application also provides a consumable box, and any consumable chip is installed on the consumable box.
Corresponding to the above embodiments, the present application further provides an apparatus, which includes any one of the above chips.
Corresponding to the foregoing embodiment, an embodiment of the present application further provides a data transmission method, as shown in fig. 9, where the method includes:
step S901 receives the first data and the second data sent by the host.
Wherein the second data is data generated by the host based on the first data.
And step S902, detecting whether the first data is matched with the second data.
Step S903, if the first data and the second data are matched, a matching response message is sent to the host within a preset time and before the storage of the first data and the second data is completed.
And the matching response message is used for identifying that the first data is matched with the second data. The preset time is no later than the latest time when the matching response message is received by the host.
In specific implementation, the present invention further provides a computer storage medium, where the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the data transmission method provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, as for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.

Claims (11)

1. A chip in communication with a host, the chip configured to:
receiving first data and second data sent by the host; the second data is data generated by the host based on the first data;
detecting whether the first data and the second data are matched;
if the first data and the second data are matched, sending a matching response message to the host within a preset time and before the first data and the second data are stored; the matching response message is used for identifying that the first data and the second data are matched; the preset time is not later than the latest time when the host receives the matching response message.
2. The chip according to claim 1, characterized in that it is in particular used for:
storing first subdata before sending a matching response message to the host; the first sub data is partial data in the first data and/or the second data;
after the first subdata is stored, sending a matching response message to the host within preset time and before the first data and the second data are stored;
and after the matching response message is sent to the host, storing second subdata, wherein the second subdata is the data except the first subdata in the first data and the second data.
3. The chip of claim 2, wherein the chip is further configured to:
if so, acquiring the matching duration; the matching duration is a duration for detecting whether the first data and the second data are matched;
prior to sending the match response message to the host, storing the first child data comprises:
and when the matching duration is less than a first preset duration, storing the first subdata before sending a matching response message to the host.
4. The chip according to claim 1, characterized in that it is in particular used for:
and if so, sending a matching response message to the host within preset time, and storing the first data and the second data after sending the matching response message to the host.
5. The chip of claim 4, wherein the chip is further configured to:
if so, acquiring the matching duration; the matching duration is a duration for detecting whether the first data and the second data are matched;
after sending the match response message to the host, storing the first data and the second data comprises:
and when the matching duration is longer than a first preset duration, storing the first data and the second data after sending a matching response message to the host.
6. The chip of any one of claims 1-5, wherein the chip is further configured to:
if the time is matched with the preset time, acquiring first time; the first time is the time when whether the first data is matched with the second data is detected;
detecting whether the first time is earlier than the preset time;
if the first data and the second data are matched, sending a matching response message to the host within a preset time and before the first data and the second data are stored, wherein the sending of the matching response message to the host comprises:
if the first time is matched with the second time, determining the target time based on the first time and the preset time, and sending a matching response message to the host at the target time before the first data and the second data are stored; the target time is later than the first time and is not later than the preset time.
7. The chip according to any one of claims 1 to 5, wherein the second data is an inverse of the first data.
8. The chip according to any one of claims 1 to 5, wherein the sending duration of the matching response message is not greater than a second preset duration.
9. The chip of any of claims 1-5, wherein the match response message comprises an active level signal.
10. A data transmission device comprising a chip as claimed in any one of claims 1 to 9.
11. A data transmission method is characterized in that the method is applied to a chip, and the chip is communicated with a host; the method comprises the following steps:
receiving first data and second data sent by the host; the second data is data generated by the host based on the first data;
detecting whether the first data and the second data are matched;
if the first data and the second data are matched, sending a matching response message to the host within a preset time and before the first data and the second data are stored; the matching response message is used for identifying that the first data and the second data are matched; the preset time is not later than the latest time when the host receives the matching response message.
CN202211651297.9A 2022-12-21 2022-12-21 Chip, data transmission method and device Pending CN115809214A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211651297.9A CN115809214A (en) 2022-12-21 2022-12-21 Chip, data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211651297.9A CN115809214A (en) 2022-12-21 2022-12-21 Chip, data transmission method and device

Publications (1)

Publication Number Publication Date
CN115809214A true CN115809214A (en) 2023-03-17

Family

ID=85486436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211651297.9A Pending CN115809214A (en) 2022-12-21 2022-12-21 Chip, data transmission method and device

Country Status (1)

Country Link
CN (1) CN115809214A (en)

Similar Documents

Publication Publication Date Title
KR100751141B1 (en) A Method and an Apparatus for Identifying a Battery
US7650388B2 (en) Wireless identification protocol with confirmation of successful transmission
US7146112B2 (en) Replaceable unit monitor reader with auto polling capabilities
EP0587115B1 (en) Communication system
EP0217654B1 (en) Information medium
JP2013197677A (en) Image processing device, image formation device, abnormality management processing method, and abnormality management processing program
JP2003316712A5 (en)
WO2022063263A1 (en) Consumable chip, consumables, image forming apparatus, and image forming control method
WO2022083523A1 (en) Control method and system for preventing incorrect identification in near-field transmission, and device and medium
CN110271291B (en) Universal chip, imaging box, imaging system and using method
CN115809214A (en) Chip, data transmission method and device
EP3588193A1 (en) Communication between an image forming device and a replaceable supply item
CN113352770B (en) Consumable chip and imaging box
CN107301024B (en) Imaging box chip, imaging box and data processing method
JP2001105699A5 (en)
CN114083913B (en) Chip, consumable box and data transmission method
CN111930582A (en) System management bus detection platform, processor and system management bus detection method
US11012195B2 (en) Method, sensor, and controller for transmitting a data packet from a sensor to a controller
CN109976928B (en) Chip, chip resetting method and consumable container
CN116975929A (en) Chip and data transmission method
CN114953787A (en) Chip, device and data transmission method
US4747071A (en) Data transfer apparatus and system
CN109634906B (en) IC communication system and method
CN116743308A (en) Replaceable device, replaceable chip and communication method thereof
KR100245022B1 (en) Image printing apparatus having debug function and a method of debuging it

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