A chip, data transmission method and device
Patent Information
- Application Number
- CN202211651297.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-21
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-12-21
AI Technical Summary
[0004]有鉴于此,本申请提供一种数据传输方法、装置、芯片、设备及存储介质,以利于解决现有技术中可靠性判断不准确的问题
[0036] The solution provided in this application embodiment receives first data and second data sent by a host; detects whether the first data and second data match; if they match, sends a matching response message to the host within a preset time and before the storage of the first data and second data is completed; the matching response message is used to identify that the first data and second data match; the preset time is no later than the latest time the host receives the matching response message. In other words, in this application embodiment, after the chip receives the first data and second data sent by the host and detects that the first data and second data match, it can send the matching response message to the host within a preset time and before the storage of the first data and second data is completed, without having to send the matching response message after the first data and second data are stored. This increases the chip's flexibility in storing the first data and second data and ensures that the matching response message is sent to the host in a timely manner within a specified time, allowing the host to receive the response message within the specified time. This enables the host to make a more accurate reliability judgment, thus improving the accuracy of the reliability judgment.
Smart Images

Figure CN115809214B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, specifically to a chip, a data transmission method, and an apparatus. Background Technology
[0002] In some technologies, to improve the reliability of communication between the storage components of a master and slave device, the master typically sends test storage data to the slave to check the reliability of the data link between their storage components. For example, the master sends first data and second data to the slave, where the second data is generated based on the first data. The slave receives the first and second data and determines whether the second data matches the first data. If they match, the slave stores both the first and second data in its storage component and then sends a match response message to the master. The master can determine the reliability of communication with the slave's storage component through the match response message.
[0003] On the host side, after sending the first and second data, the host needs to receive a matching response message within a specified time. If no matching response message is received within the specified time, the transmitted first and second data are considered mismatched. On the slave side, the slave needs to completely write the first and second data into the storage device before sending the matching response message to the host. The slave needs a certain amount of time to store the first and second data into the storage device. If this time is too long, the time required for the slave to completely store the first and second data into the storage device may exceed the specified time for the host to receive the matching response message, causing the slave to be unable to send the matching response message to the host within the specified time. This leads to the host making an incorrect judgment that the transmitted first and second data do not match, reducing the accuracy of the reliability judgment. Furthermore, in the above scheme, the slave side needs to store the first and second data into the storage device before sending the matching response message to the host side, resulting in a lack of flexibility in the process of sending the matching response message and storing the first and second data on the slave side. Summary of the Invention
[0004] In view of this, this application provides a data transmission method, apparatus, chip, device, and storage medium to help solve the problem of inaccurate reliability judgment in the prior art.
[0005] In a first aspect, embodiments of this application provide a chip for communicating with a host, the chip being used for:
[0006] The system receives first data and second data sent by the host; the second data is data generated by the host based on the first data.
[0007] Detect whether the first data and the second data match;
[0008] If a match is found, a matching response message is sent to the host within a preset time and before the storage of the first and second data is completed; the matching response message is used to identify that the first and second data match; the preset time is no later than the latest time when the host receives the matching response message.
[0009] In one possible implementation of the first aspect, the chip is specifically used for:
[0010] Before sending a matching response message to the host, first sub-data is stored; the first sub-data is a portion of the first data and / or the second data.
[0011] After storing the first sub-data, 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;
[0012] After sending a matching response message to the host, the second sub-data is stored, which is the first data and the data in the second data excluding the first sub-data.
[0013] In one possible implementation of the first aspect, the chip is further used for:
[0014] If a match is found, the matching duration is obtained; the matching duration is the time used to detect whether the first data and the second data match.
[0015] Storing the first sub-data before sending a matching response message to the host includes:
[0016] When the matching time is less than a first preset time, the first sub-data is stored before sending a matching response message to the host.
[0017] In one possible implementation of the first aspect, the chip is specifically used for:
[0018] If a match is found, a matching response message is sent to the host within a preset time. After sending the matching response message to the host, the first data and the second data are stored.
[0019] In one possible implementation of the first aspect, the chip is further used for:
[0020] If a match is found, the matching duration is obtained; the matching duration is the time used to detect whether the first data and the second data match.
[0021] After sending a matching response message to the host, storing the first data and the second data includes:
[0022] When the matching duration exceeds a first preset duration, after sending a matching response message to the host, the first data and the second data are stored.
[0023] In one possible implementation of the first aspect, the chip is further used for:
[0024] If a match is found, the first time is obtained; the first time is the time when the first data and the second data are checked to see if they match.
[0025] Detect whether the first time is earlier than the preset time;
[0026] If a match is found, sending a matching response message to the host within a preset time period and before the storage of the first and second data is completed includes:
[0027] If a match is found, and the first time is earlier than the preset time, then the target time is determined based on the first time and the preset time, and a matching response message is sent to the host at the target time before the storage of the first data and the second data is completed; the target time is later than the first time and not later than the preset time.
[0028] In one possible implementation of the first aspect, the second data is the inverted version of the first data.
[0029] In one possible implementation of the first aspect, the duration of sending the matching response message is no greater than a second preset duration.
[0030] In one possible implementation of the first aspect, the matching response message includes a valid level signal.
[0031] Secondly, embodiments of this application provide a data transmission device, including: the chip described in any of the first aspects above.
[0032] Thirdly, embodiments of this application provide a data transmission method applied to a chip, wherein the chip communicates with a host; the method includes:
[0033] The system receives first data and second data sent by the host; the second data is data generated by the host based on the first data.
[0034] Detect whether the first data and the second data match;
[0035] If a match is found, a matching response message is sent to the host within a preset time and before the storage of the first and second data is completed; the matching response message is used to identify that the first and second data match; the preset time is no later than the latest time when the host receives the matching response message.
[0036] The solution provided in this application embodiment receives first data and second data sent by a host; detects whether the first data and second data match; if they match, sends a matching response message to the host within a preset time and before the storage of the first data and second data is completed; the matching response message is used to identify that the first data and second data match; the preset time is no later than the latest time the host receives the matching response message. In other words, in this application embodiment, after the chip receives the first data and second data sent by the host and detects that the first data and second data match, it can send the matching response message to the host within a preset time and before the storage of the first data and second data is completed, without having to send the matching response message after the first data and second data are stored. This increases the chip's flexibility in storing the first data and second data and ensures that the matching response message is sent to the host in a timely manner within a specified time, allowing the host to receive the response message within the specified time. This enables the host to make a more accurate reliability judgment, thus improving the accuracy of the reliability judgment. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This application provides a schematic diagram of the structure of a communication system according to an embodiment of the present application.
[0039] Figure 2 This is a schematic diagram of another communication system provided in an embodiment of this application;
[0040] Figure 3 This is a schematic diagram of another communication system provided in an embodiment of this application;
[0041] Figure 4 A schematic diagram illustrating a data transmission scenario provided in an embodiment of this application;
[0042] Figure 5 A schematic diagram illustrating another data transmission scenario provided in an embodiment of this application;
[0043] Figure 6This is a schematic diagram of another communication system provided in an embodiment of this application;
[0044] Figure 7a A schematic diagram illustrating another data transmission scenario provided in an embodiment of this application;
[0045] Figure 7b A schematic diagram illustrating another data transmission scenario provided in an embodiment of this application;
[0046] Figure 8 This is a schematic diagram of the structure of a consumable chip provided in an embodiment of this application;
[0047] Figure 9 This is a flowchart illustrating a data transmission method provided in an embodiment of this application. Detailed Implementation
[0048] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0049] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0050] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0051] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0052] See Figure 1 This is a schematic diagram of the structure of a communication system provided in an embodiment of this application. Figure 1As shown, the communication system includes a host 100 and a chip 200 (a slave device corresponding to the host 100). The host 100 is provided with a communication port 101, and 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, through which the host 100 and the chip 200 can transmit information. The communication link 300 can be a contact-type communication link, i.e., a wired communication link. Specifically, the communication port 101 and the input / output module 201 can be electrically connected via pins, contacts, or spring contacts to establish the communication link 300. In other embodiments, the communication link 300 can also be a non-contact communication link, i.e., a wireless communication link. In this case, the communication port 101 and the input / output module 201 can include an antenna or coil for transmitting wireless signals. In some possible implementations, the communication link 300 may also be referred to as a data bus. Generally, when the host 100 and the chip 200 communicate, they adopt a time-division multiplexing method to achieve bidirectional information transmission and reception (i.e., full-duplex communication).
[0053] The host 100 involved in this application embodiment is a device capable of data processing, control, or related operations. The chip 200 is installed on the host 100 to assist the host 100 in performing related functions. In one example, the host can be a computer, and the chip can be a peripheral device / device of the computer. In another example, the host can be a mobile terminal (e.g., a mobile phone, tablet computer, PDA, etc.), and the chip is an accessory or peripheral device / device of the mobile terminal, such as a lithium battery chip, wearable device chip, etc. For example, in Figure 2 In the illustrated application scenario, the host device 100 is a printing device 110, and the chip 200 is a consumable chip 210. The printing device 110 has a communication port 111, and the consumable chip 210 has an input / output module 211. A communication link 310 is established between the communication port 111 and the input / output module 211. The printing device 110 and the consumable chip 210 can transmit information through the communication link 310. For example, during the imaging process, the consumable chip 210 is used to provide identification information and record material usage information.
[0054] For ease of description, the technical solutions provided in the embodiments of this application are described below using printing device 110 and consumable chip 210 as examples. However, those skilled in the art should understand that, in addition to printing device 110 and consumable chip 210, the technical solutions provided in the embodiments of this application can also be applied to other types of hosts and chips, and the embodiments of this application do not limit this.
[0055] During the imaging process, the printing device 110 requires the assistance of imaging aid information from the consumable cartridge to complete the imaging process. This imaging aid information is recorded not only within the printing device 110 itself but also on the consumable chip 210. The consumable chip 210 primarily serves for identification and recording the material usage status. Therefore, when the consumable chip 210 is installed on the printing device 110, the printing device 110 reads the information from the consumable chip 210 and sends information about the printing job status and related data to the consumable chip 210.
[0056] In related technologies, to improve the communication reliability between the printing device 110 and the consumable chip 210, the printing device 110 typically sends test stored data to the consumable chip 210 to check the reliability of the communication link between them. For example, the printing device 110 sends first data and second data to the consumable chip 210. 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. If they match, it stores the first data and the second data, and then sends a matching response message to the printing device 110. The printing device 110 can determine the reliability of its communication with the consumable chip 210 through the matching response message.
[0057] On the printing device 110 side, after sending the first and second data, it needs to receive a matching response message within a specified time. If no matching response message is received within the specified time, it is considered that the transmitted first and second data do not match. On the consumable chip 210 side, the consumable chip 210 needs to store the first and second data before sending a matching response message to the printer 110. However, the consumable chip 210 needs a certain amount of time to store the first and second data. If this time is too long, the time required for the consumable chip 210 to store the first and second data may exceed the specified time for the printer 110 to receive the matching response message. This would prevent the consumable chip 210 from sending the matching response message to the printer 110 within the specified time, causing the printer 110 to make an incorrect judgment that the transmitted first and second data do not match, thus reducing the accuracy of the reliability judgment. Furthermore, in the above scheme, the consumable chip 210 needs to store the first and second data before sending a matching response message to the printer 110, resulting in a lack of flexibility in the process of the consumable chip 210 sending the matching response message and storing the first and second data.
[0058] To address the aforementioned issues, the consumable chip 210 provided in this application embodiment further includes a control module 212, such as... Figure 3As shown. Thus, the input / output module 211 can receive the first and second data sent by the printer 110 via the communication link 310; the control module 212 can detect whether the first and second data match. If they match, within a preset time and before the storage of the first and second data is completed, the input / output module 211 can be triggered to send a matching response message to the printer 110 via the communication link 310; wherein the preset time is no later than the latest time when the printer 110 receives the matching response message. In other words, in this embodiment, after receiving the first data and the second data sent by the printer 110 and detecting a match between the first and second data, the consumable chip 210 can send a matching response message to the printer 110 within a preset time and before the first and second data are fully stored. This eliminates the need to send the matching response message after storing the first and second data, thus increasing the flexibility of the consumable chip 210 in storing the first and second data and ensuring that the matching response message is sent to the printer 110 promptly within the specified time. This allows the printer 110 to receive the matching response message within the specified time, enabling the printer 110 to make a more accurate reliability judgment, thereby improving the accuracy of the reliability judgment. A detailed explanation follows.
[0059] In the specific implementation, before the printer 110 communicates with the consumable chip 210, it needs to check the reliability of the communication link 310 used for data transmission between the printer 110 and the consumable chip 210. At this time, the printer 110 needs to send first data and second data for reliability testing to the consumable chip via the communication link 310. The second data is generated based on the first data. Therefore, when the consumable chip 210 learns the generation rule of the printer 110 for generating the second data, it can check whether the first and second data match upon receiving them, based on that generation rule. Based on this, the printer 110 sends the first and second data to the consumable chip 210 via the communication link 310. The consumable chip 210 can receive the first and second data via the data link 310.
[0060] It should be understood that when printer 110 sends the first data and the second data to consumable chip 210, it can package the first data and the second data into separate data packets for transmission. In this case, consumable chip 210 can receive the two data packets via communication link 310 and obtain the first data and the second data by parsing each data packet separately. Alternatively, printer 110 can package the first data and the second data into a single data packet and send it to consumable chip 210 via communication link 310. In this case, to ensure that consumable chip 210 can accurately determine which part of the data packet represents the first data and which represents the second data, the data packet must contain location identifiers for the first and second data. Thus, after receiving the data packet, consumable chip 210 can obtain the first data and the second data by parsing the location identifiers for the first and second data within the data packet.
[0061] As one possible implementation, to reduce the complexity and detection time of matching the first and second data, the second data is the inverse of the first data. Specifically, the second data is the inverse of the first data, meaning that each bit in the second data is the opposite of the value at the same position in the first data. For example, if the first data is 1010, then the second data is 0101.
[0062] After receiving the first data and the second data, the consumable chip 210 can detect whether the first data and the second data match. For example, the consumable chip 210 can first determine how the printer 110 generates the second data, and based on the first data, generate the third data using the same method as the printer 110, and then detect whether the third data is the same as the second data to determine whether the first data and the second data match. Alternatively, the consumable chip 210 can determine the relationship between the first data and the second data, and determine whether the first data and the second data match based on the relationship. Of course, the consumable chip 210 can detect whether the first data and the second data match in other ways, and this application does not limit this.
[0063] As one possible implementation, when the second data is the inverse of the first data, the consumable chip 210 can detect whether the first data and the second data are the same. If they are the same, it indicates a communication error between the consumable chip 210 and the printer 110. In this case, the consumable chip 210 determines that the first data and the second data do not match. In some embodiments, the first data can be a multi-bit binary number. In this case, the second data generated by the printer 110 based on the first data is also a multi-bit binary number, where each bit of the second data is the opposite of the bit value at the same position in the first data. For example, if the first data is 0101, then the second data generated by the printer 110 based on the first data is 1010. Thus, after receiving the first data and the second data, the consumable chip 210 can detect whether each bit of the first data is the opposite of the bit value at the same position in the second data. If they are all opposite, the consumable chip 210 determines that the first data and the second data are inverses of each other, thereby determining that the first data and the second data match. If the consumable chip 210 detects that at least one bit in the first data and the second data has the same value, then the consumable chip 210 can determine that the first data and the second data are not reversed data, and thus can determine that the first data and the second data do not match. For example, if the consumable chip 210 receives the first data as 0101 and the second data as 1011, then the last bit value 1 in the first data and the last bit value 1 in the second data are the same, indicating that the first data and the second data are not reversed data, and thus can determine that the first data and the second data do not match.
[0064] In some embodiments, when the consumable chip 210 determines that the first data and the second data do not match, it may not send a response message to the printer 110. In this case, if the printer 110 does not receive a response message within a preset time period, it is determined that there is a communication error in the communication link 310 between the printer 110 and the consumable chip 210, and it is unreliable.
[0065] Alternatively, in some embodiments, when the consumable chip 210 determines that the first data and the second data do not match, it can send a failure response message to the printer 110 through the communication link 310. At this time, after receiving the failure response message, the printer 110 determines that there is a communication error in the communication link 310 between the printer 110 and the consumable chip 210, and that it is unreliable.
[0066] In some embodiments, when the consumable chip 210 determines that the first data and the second data match, it needs to send a matching response message to the printer 110 to identify that the first data and the second data match. Since the printer 110 needs to receive the matching response message within a specified time, a preset time can be set based on the latest time that the printer 110 can receive 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 first data and the second data. This can prevent the printer 110 from receiving the matching response message after a timeout, and reduce the possibility that the printer 110 may mistakenly judge the communication link between it and the consumable chip 210 as unreliable because it has not received the matching response message within the specified time.
[0067] As one possible implementation, after determining that the first and second data match, the consumable chip 210 can store a portion of the first and / or second data before sending a matching response message to the printer 110. To ensure the printer 110 receives the matching response message within a specified time, the consumable chip 210 can send the matching response message to the printer 110 after storing a portion of the first and / or second data, without waiting for all the first and second data to be stored before sending the matching response message. Based on this, the consumable chip 210 is specifically used for: storing the first sub-data before sending the matching response message to the printer 110; sending the matching response message to the printer 110 within a preset time and before completing the storage of the first and second data after storing the first sub-data; and storing the second sub-data after sending the matching response message to the printer 110.
[0068] The first sub-data is a portion of the first data and / or the second data. The second sub-data is the data in the first data and the second data excluding the first sub-data.
[0069] In other words, in this embodiment, if the consumable chip 210 completes storing all the first and second data before sending a matching message to the printer 110, the printer 110 may time out receiving the matching response message, reducing the accuracy of the printer 110's judgment on the reliability of the communication link 310. Therefore, when the consumable chip 210 detects that the first and second data match, it can store a portion of the first and / or second data before sending the matching response message to the printer 110; that is, the consumable chip 210 first stores the first sub-data of the first and / or second data. After storing the first sub-data, the consumable chip 210 can send a matching response message to the printer 110 within a preset time and before completing the storage of the first and second data. After sending the matching response message, the remaining data in the first and second data are then stored, which is called storing the second sub-data. In other words, the consumable chip 210 can first store a portion of the first data and / or the second data, and then send a matching response message within a preset time. This reduces the probability that the time taken for the consumable chip 210 to send the matching response message exceeds the specified time for the printer 110 to receive the response message, thereby improving the accuracy of the printer 110's judgment on communication reliability. After sending the matching response message, the consumable chip 210 can continue to store the first data and the second sub-data in the second data to complete the storage of the first data and the second data.
[0070] For example, suppose the latest time for printer 110 to receive the matching response message is time t, and a preset time can be set to t2, where the preset time t2 is less than or equal to t. Figure 4As shown. Printer 110 can determine 4 bits of binary data as the first data, assuming the first data is 1010, and generate a second data that is the opposite of the first data. That is, inverting each bit of the first data yields the second data as 0101. Printer 110 sends the first data and the second data to consumable chip 210 via communication link 310. After receiving the first data and the second data, consumable chip 210 performs a matching test on the received first data and second data. At this time, consumable chip 210 can detect whether each bit in the first data is the opposite of the corresponding bit in the second data. If the first data received by consumable chip 210 is 1010 and the second data received is 0101, it can be detected that each bit in the first data is the opposite of the corresponding bit in the second data, and the first data and the second data can be determined to match. When consumable chip determines that the first data and the second data match, consumable chip 210 can write part of the first data and / or the second data within the time period t1, that is, write the first sub-data first at time t1. Where t1 is less than the preset time t2. After the consumable chip 210 stores the first sub-data, it sends a matching response message to the printer 110 during the time interval from t1 to t2. After the consumable chip 210 sends the matching response message, it stores the first data and the second sub-data that were not stored in the second data into the consumable chip 210. (Refer to...) Figure 4 As shown.
[0071] As another possible implementation, after determining that the first and second data match, the consumable chip 210 can first send a matching response message to the printer 110, and then store the first and second data after sending the matching response message. In this case, the consumable chip 210 is specifically used for:
[0072] If a match is found, a matching response message is sent to printer 110 within a preset time. After sending the matching response message to printer 110, the first data and the second data are stored.
[0073] In other words, when the consumable chip 210 detects that the first data and the second data match, in order to ensure that the printer 110 can receive the matching response message within a specified time, the consumable chip 210 does not store the first data and the second data first, but directly sends the matching response message to the printer 110 within a preset time. After sending the matching response message to the printer 110, the first data and the second data are stored. This can prevent the time for the consumable chip 210 to send the matching response message to the printer 110 from exceeding the specified time for the printer 110 to receive the matching response message due to storing the first data and the second data, which would reduce the accuracy of the printer 110's judgment on communication reliability.
[0074] For example, suppose the latest time for printer 110 to receive the matching response message is time t, and a preset time can be set to t2, where the preset time t2 is less than or equal to t. Figure 5 As shown. Printer 110 can determine 4 bits of binary data as the first data, assuming the first data is 1010, and generate a second data that is the opposite of the first data. That is, inverting each bit of the first data yields the second data as 0101. Printer 110 sends the first data and the second data to consumable chip 210 via communication link 310. After receiving the first data and the second data, consumable chip 210 performs a matching test on the received first data and second data. At this time, consumable chip 210 can detect whether each bit in the first data is the opposite of the corresponding bit in the second data. If the first data received by consumable chip 210 is 1010 and the second data is 0101, it can be detected that each bit in the first data is the opposite of the corresponding bit in the second data, and the first data and the second data can be determined to match. When the consumable chip determines that the first data and the second data match, the consumable chip 210 can send a matching response message to the printer 110 within time t2. After the consumable chip 210 sends the matching response message, it then stores the first data and the second data in the consumable chip 210. (Refer to...) Figure 5 As shown.
[0075] As one possible implementation, when the consumable chip 210 detects a match between the first data and the second data, it can determine whether to store a portion of the first data and / or the second data before sending a matching message, or to send a matching response message first and then store the first and second data, based on the time taken to detect whether the first and second data match. In this case, the consumable chip 210 is also used to obtain the matching time if a match is found. The matching time is the duration used to detect whether the first data and the second data match.
[0076] The above-mentioned storage of the first sub-data before sending the matching response message to the host includes: storing the first sub-data before sending the matching response message to the host when the matching time is less than the first preset time.
[0077] After sending a matching response message to the host, storing the first data and the second data includes: 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.
[0078] That is, after detecting that the first data and the second data match, the consumable chip 210 can further obtain the matching time when detecting whether the first data and the second data match. In some embodiments, the consumable chip 210 also includes a timing module 213, such as... Figure 6As shown. The timing module 213 is used for timing. The timing module 213 of the consumable chip 210 can start timing when the consumable chip 210 begins matching detection of the first and second data, and stop timing after detecting whether the first and second data match. In this way, the consumable chip 210 can obtain the matching duration through the timing module 213. The matching duration is compared with a first preset duration. If the matching duration is determined to be less than the first preset duration, it means that the time taken by the consumable chip 210 to detect whether the first and second data match is short. In this case, partial data of the first and / or second data can be stored first, and then the matching response message can be sent. That is, when the consumable chip 210 determines that the matching duration is less than the first preset duration, it stores the first sub-data before sending the matching response message to the printer 110. After storing the first sub-data, it sends the matching response message to the printer 110 within a preset time. After sending the matching response message, it stores the second sub-data to complete the storage of the first and second data.
[0079] Alternatively, when the consumable chip 210 compares the matching time with a first preset time, and determines that the matching time is longer than the first preset time, it indicates that the time taken by the consumable chip 210 to detect the matching of the first and second data is too long. In this case, in order to ensure that the printer 110 receives the matching response message within the specified time, the consumable chip 210 can first send the matching response message to the printer 110 through the communication link 310. After sending the matching response message, the first and second data are stored.
[0080] In this way, the method described above can determine which method to use to send the matching response message to the printer 110. Of course, the consumable chip 210 can also determine this in other ways, such as by user selection, by pre-setting a default method, or other methods; this application does not limit this.
[0081] As one possible implementation, when the consumable chip 210 performs matching detection on the first and second data, the detection time may be too long, causing the time after the detection to exceed the time specified by the printer 110 for receiving the matching response message. Therefore, before sending the matching response message to the printer 110, the consumable chip 210 needs to determine whether the time for detecting whether the first and second data match has exceeded a preset time. In this case, after detecting whether the first and second data match, the consumable chip 210 can obtain the first time, that is, the time for detecting whether the first and second data match. In some embodiments, when the consumable chip 210 includes a timing module 213, the timing module 213 can perform matching detection on the first and second data for timing. That is, the timing module 213 can start timing from when the consumable chip 210 receives the first and second data, or it can start timing from when the consumable chip 210 starts detecting whether the first and second data match, and end timing after detecting whether the first and second data match. Thus, the time for detecting whether the first and second data match can be obtained in the timing module 213. After acquiring the first time, the consumable chip 210 can compare the first time with a preset time to check if the first time is earlier than the preset time. If the first time is later than the preset time, it means that the time taken by the consumable chip 210 to detect whether the first data and the second data match is too long, and the time taken to complete the detection of whether the first data and the second data match has exceeded the preset time, that is, it has exceeded the prescribed time for the printer 110 to receive the matching response message. Therefore, the consumable chip 210 does not need to send a matching response message to the printer 110. In some embodiments, the consumable chip 210 can send a matching timeout response message to the printer 110 to trigger the printer 110 to adjust the first data and the second data and re-perform the reliability judgment of the communication link 310.
[0082] If the first time is earlier than the preset time, it means that the time taken for the consumable chip 210 to detect whether the first data and the second data match has not exceeded the preset time. At this time, the consumable chip 210 can determine the target time based on the first time and the preset time, within a time period later than the first time but not later than the preset time. Before completing the storage of the first data and the second data at the target time, a matching response message is sent to the printer 110.
[0083] For example, suppose the latest time for printer 110 to receive the matching response message is time t, and a preset time can be set to t2, where the preset time t2 is less than or equal to t. Figure 7a and Figure 7bAs shown. Printer 110 can determine 4 bits of binary data as the first data, assuming the first data is 1010, and generate a second data that is the opposite of the first data. That is, inverting each bit of the first data yields the second data as 0101. Printer 110 sends the first data and the second data to consumable chip 210 via communication link 310. After receiving the first data and the second data, consumable chip 210 performs a matching test on the received first data and second data. At this time, consumable chip 210 can detect whether each bit in the first data is the opposite of the corresponding bit in the second data. If the first data received by consumable chip 210 is 1010 and the second data received is 0101, it can be detected that each bit in the first data is the opposite of the corresponding bit in the second data, and the first data and the second data can be determined to match. When consumable chip determines that the first data and the second data match, the time when consumable chip 210 has completed the detection of the first data and the second data matching can be obtained through timing module 213, which is the first time t4. Compare t4 with the preset time t2. If t4 is later than t2, it means that the time taken by 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. Figure 7a As shown.
[0084] If t4 is earlier than t2, it means that the consumable chip 210 detected whether the first data and the second data matched earlier than the preset time t2. At this time, the consumable chip 210 can determine the target time t3 between the first time t4 and the preset time t2. Before the first data and the second data are stored at the target time t3, it sends a matching response message to the printer 110. Figure 7b As shown. Furthermore, after sending the matching response message, the data that was not stored in the first data and the second data is stored in the consumable chip 210.
[0085] As one possible implementation, the matching response message includes a valid level signal.
[0086] In this embodiment, after establishing a communication link 310 between the consumable chip 210 and the printer 110, a matching response message can be sent through the communication link 310. At this time, the matching response message is the level signal (ACK) transmitted in the communication link 310. To prevent signal transmission link interruption, when the communication link 310 is not transmitting signals, the consumable chip 210 can send an invalid signal to the printer 110. For example, when the consumable chip 210 does not need to send a response message to the printer 110, it can continuously send a low-level signal or a high-level signal to the printer 110. When a response message needs to be sent, the sent level signal can be adjusted. For example, when the consumable chip 210 does not need to send a response message to the printer 110, it can continuously send a low-level signal or a high-level signal through the communication link 310. When a response message needs to be sent to the printer 110, the sent level signal can be switched to a high-level signal or a low-level signal, and after transmission is complete, it can be switched back to a low-level signal or a high-level signal. At this time, the level signal sent by the consumable chip 210 when it does not need to send a response message to the printer 110 can be called an invalid level signal, and the level signal switched when it needs to send a response signal can be called an effective level signal.
[0087] Refer to the example above, where an invalid signal is a low-level signal and a 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 continuously sends a low-level signal to the printer 110. Within a preset time t2, when the consumable chip 210 sends a matching response message to the printer 110 at time t3, the consumable chip 210 switches the level signal transmitted through the communication link 310 from a low-level signal to a high-level signal at time t3, and then switches the level signal back from high-level to low-level after sending, completing the transmission of the matching response message. (Refer to...) Figures 4-7b As shown.
[0088] As one possible implementation, the consumable chip 210 can send a matching response message of an instantaneous pulse signal to the printer 110, wherein the duration of the matching response message is no greater than a second preset duration.
[0089] See Figure 8 This is a schematic diagram of the structure of a consumable chip provided in an embodiment of this application. The consumable chip 800 can be detachably mounted on a consumable cartridge, which can be an ink cartridge, a toner drum, or a toner cartridge / powder container. The consumable cartridge is also detachably mounted to the printing device. The consumable chip 800 includes: a control module 820, an input / output module 810, and a storage module 830. The input / output module 810 and the storage module 830 are both electrically connected to the control module 820, wherein:
[0090] The input / output module 810 is used for input and output communication with external devices. When the consumable chip is installed in the printing device, it can be used to receive information / instructions sent by the printing device and to send information to the printing device. The storage module 830 is used to store information about the consumable chip, such as the manufacturing date, manufacturer, color of the recording material (e.g., ink, toner), capacity of the recording material, remaining or consumed quantity of the recording material, number of printable pages, number of printed pages, and other rewritable or read-only information. In this embodiment, the storage module 830 can also store data characteristics before and after the printing device transmits preset data (first data), such as the predetermined number of bytes before the printing device transmits the preset data. The storage module 830 can use common non-volatile memory, or a combination of non-volatile memory and volatile memory.
[0091] Several configuration fields can be set in the storage module 830, which can adjust when the consumable chip determines when preset data will appear. During later maintenance, the number of preset bits / bytes or the timing duration determined by the consumable chip can be adjusted by modifying the configuration fields.
[0092] The control module 820, specifically a microcontroller (MCU), FPGA, ASIC, etc., is used to control the communication between the consumable chip and the printing device, read information from the storage module 830, and store information in the storage module 830. In this embodiment, the functions of the aforementioned interference module can be implemented through the control module 820.
[0093] The consumable chip may also include a circuit board that carries the control module 820, input / output module 810, and storage module 830 described above. In one embodiment, the control module 820, input / output module 810, and storage module 830 are integrated into the same circuit.
[0094] Corresponding to the above embodiments, this application also provides a consumable box on which any of the aforementioned consumable chips are installed.
[0095] Corresponding to the above embodiments, this application also provides an apparatus that includes any of the aforementioned chips.
[0096] Corresponding to the above embodiments, this application also provides a data transmission method, such as... Figure 9 As shown, the method includes:
[0097] Step S901: Receive the first data and the second data sent by the host.
[0098] The second data is data generated by the host based on the first data.
[0099] Step S902: Detect whether the first data and the second data match.
[0100] Step S903: If a match is found, a matching response message is sent to the host within a preset time and before the storage of the first and second data is completed.
[0101] The matching response message is used to identify that the first data and the second data match. The preset time is no later than the latest time the host receives the matching response message.
[0102] In a specific implementation, the present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program, when executed, may include some or all of the steps of the various embodiments of the data transmission method provided by the present invention. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0103] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.
[0104] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments and terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
Claims
1. A chip for communicating with a host computer, characterized in that, The chip is used for: The system receives first data and second data sent by the host; the second data is data generated by the host based on the first data. Detect whether the first data and the second data match; If a match is found, a matching response message is sent to the host within a preset time and before the storage of the first and second data is completed. The matching response message is used to identify that the first data and the second data match; the preset time is no later than the latest time when the host receives the matching response message.
2. The chip according to claim 1, characterized in that, The chip is specifically used for: Before sending a matching response message to the host, first sub-data is stored; the first sub-data is a portion of the first data and / or the second data. After storing the first sub-data, 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; After sending a matching response message to the host, the second sub-data is stored, which is the first data and the data in the second data excluding the first sub-data.
3. The chip according to claim 2, characterized in that, The chip is also used for: If a match is found, the matching duration is obtained; the matching duration is the time used to detect whether the first data and the second data match. Storing the first sub-data before sending a matching response message to the host includes: When the matching time is less than a first preset time, the first sub-data is stored before sending a matching response message to the host.
4. The chip according to claim 1, characterized in that, The chip is specifically used for: If a match is found, a matching response message is sent to the host within a preset time. After sending the matching response message to the host, the first data and the second data are stored.
5. The chip according to claim 4, characterized in that, The chip is also used for: If a match is found, the matching duration is obtained; the matching duration is the time used to detect whether the first data and the second data match. After sending a matching response message to the host, storing the first data and the second data includes: When the matching duration exceeds a first preset duration, after sending a matching response message to the host, the first data and the second data are stored.
6. The chip according to any one of claims 1-5, characterized in that, The chip is also used for: If a match is found, the first time is obtained; the first time is the time when the first data and the second data are checked to see if they match. Detect whether the first time is earlier than the preset time; If a match is found, sending a matching response message to the host within a preset time period and before the storage of the first and second data is completed includes: If a match is found, and the first time is earlier than the preset time, a target time is determined based on the first time and the preset time, and a matching response message is sent to the host at the target time before the storage of the first data and the second data is completed; the target time is later than the first time and not later than the preset time.
7. The chip according to any one of claims 1-5, characterized in that, The second data is the reverse of the first data.
8. The chip according to any one of claims 1-5, characterized in that, The duration of sending the matching response message is no greater than the second preset duration.
9. The chip according to any one of claims 1-5, characterized in that, The matching response message includes a valid level signal.
10. A data transmission device, characterized in that, Includes the chip described in any one of claims 1-9.
11. A data transmission method, characterized in that, Applied to a chip that communicates with a host; the method includes: The system receives first data and second data sent by the host; the second data is data generated by the host based on the first data. Detect whether the first data and the second data match; If a match is found, a matching response message is sent to the host within a preset time and before the storage of the first and second data is completed; the matching response message is used to identify that the first and second data match; the preset time is no later than the latest time when the host receives the matching response message.
Citation Information
Patent Citations
Method, device and system for retransmitting data packet
CN101621368A
Consumable chip and communication method thereof
CN107203359A