Data decryption method, device, equipment and storage medium

By utilizing a preset hash algorithm and data sequence conversion processing in the consumable chip, the problem of uncontrollable decryption time caused by insufficient computing power of the consumable chip is solved, realizing fast and secure decryption data feedback and ensuring normal printing of the image forming device.

CN119562014BActive Publication Date: 2026-06-09GUANGZHOU ZHONO ELECTRONICS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU ZHONO ELECTRONICS TECH CO LTD
Filing Date
2024-11-06
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Insufficient computing power of the consumable chip leads to excessively long processing time, uncontrollable decryption process execution time, and inability to promptly send decryption data back to the image forming device, affecting consumable printing.

Method used

By acquiring a data acquisition request from the image forming device, the target encrypted data is calculated using a preset hash algorithm to obtain a first binary data sequence, and then a second data sequence is obtained by truncating the data to a preset number of bits. The corresponding first target decrypted data is read from the second storage area and fed back to the image forming device.

Benefits of technology

It enables rapid retrieval of target decryption data, ensuring the security of the decryption process, while reducing the performance requirements of consumable chips and ensuring the normal operation of the consumable printing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119562014B_ABST
    Figure CN119562014B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data decryption method, device and equipment and a storage medium. The method comprises: obtaining a data acquisition request sent by an image forming device, reading target encrypted data corresponding to a target data address in the data acquisition request from a first storage area; calculating the target encrypted data based on a preset hash algorithm to obtain a first binary data sequence; performing a preset bit number interception process on the first data sequence to obtain a second data sequence, reading first target decryption data corresponding to the second data sequence from a second storage area, feeding back the first target decryption data to the image forming device, and storing first decryption data corresponding to a binary data sequence set within a preset bit number in the second storage area. The present scheme realizes the second data sequence based on the storage address of the target decryption data, can quickly find the required target decryption data, reduces the performance requirement for the consumable chip, and ensures the normal printing process of the consumable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data decryption method, apparatus, device, and storage medium. Background Technology

[0002] With the continuous advancement of science and technology, the printing industry has developed rapidly, and printing-related image forming equipment is being used in more and more applications. Image forming equipment includes printers, copiers, etc., and the application of printing consumables in image forming equipment is becoming increasingly widespread. Ink cartridges, toner cartridges, ribbons, and other printing consumables have become easily consumable components of image forming equipment. Printing consumables are equipped with consumable chips, which, in addition to storing information such as manufacturer information, remaining quantity information, category information, and color information, can also communicate and authenticate with the image forming equipment.

[0003] In related technologies, the data decryption process in the consumable chip relies entirely on the execution of the decryption algorithm. This may lead to abnormalities such as insufficient computing power of the consumable chip causing excessively long processing times and uncontrollable decryption process execution times. Consequently, the decrypted data cannot be fed back to the image forming device in a timely manner, causing errors in the image forming device and affecting consumable printing. Improvements are needed. Summary of the Invention

[0004] This application provides a data decryption method, apparatus, device, and storage medium, which solves the problems in related technologies such as insufficient computing power of consumable chips causing excessively long computation time and uncontrollable decryption process execution time, resulting in the inability to promptly feed back decrypted data to the image forming device, causing errors in the image forming device and affecting consumable printing. It realizes hierarchical conversion processing of target encrypted data and obtains a second data sequence used to represent the storage address of target decrypted data, which can quickly find the required target decrypted data. While ensuring the security of the decryption process, it does not require the use of complex decryption algorithms, reduces the performance requirements of consumable chips, and ensures the normal operation of the consumable printing process.

[0005] In a first aspect, embodiments of this application provide a data decryption method, the method comprising:

[0006] Obtain a data acquisition request sent by the image forming device, and read the target encrypted data corresponding to the target data address in the data acquisition request from the first storage area;

[0007] The target encrypted data is calculated based on a preset hash algorithm to obtain a binary first data sequence;

[0008] The first data sequence is truncated to a preset number of bits to obtain a second data sequence. The first target decrypted data corresponding to the second data sequence is read from the second storage area and fed back to the image forming device. The second storage area stores the first decrypted data corresponding to the binary data sequence set within the preset number of bits.

[0009] Secondly, embodiments of this application also provide a data decryption apparatus, comprising:

[0010] The acquisition module is configured to acquire data acquisition requests sent by the image forming device;

[0011] The first reading module is configured to read target encrypted data corresponding to the target data address in the data acquisition request from the first storage area.

[0012] The first calculation module is configured to calculate a first binary data sequence from the target encrypted data based on a preset hash algorithm;

[0013] The second calculation module is configured to truncate the first data sequence by a preset number of bits to obtain the second data sequence;

[0014] The second reading module is configured to read first target decrypted data corresponding to the second data sequence from the second storage area, wherein the second storage area stores the first decrypted data corresponding to a binary data sequence set within a preset number of bits.

[0015] The data feedback module is configured to feed back the first target decryption data to the image forming device.

[0016] Thirdly, embodiments of this application also provide a data decryption device, the device comprising:

[0017] One or more processors;

[0018] Storage device, configured to store one or more programs,

[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the data decryption method described in the embodiments of this application.

[0020] Fourthly, embodiments of this application also provide a non-volatile storage medium for storing computer-executable instructions, which, when executed by a computer processor, are configured to perform the data decryption method described in embodiments of this application.

[0021] In this embodiment, by acquiring a data acquisition request sent by an image forming device, target encrypted data at the target data address in the corresponding data acquisition request is read from a first storage area; a binary first data sequence is obtained by calculating the target encrypted data based on a preset hash algorithm; a second data sequence is obtained by truncating the first data sequence by a preset number of bits; first target decrypted data corresponding to the second data sequence is read from the second storage area; the first target decrypted data is fed back to the image forming device; and the second storage area stores the first decrypted data corresponding to the binary data sequence set within the preset number of bits. In the above scheme, by converting the target encrypted data into a binary first data sequence and truncating the first data sequence by a preset number of bits to obtain the second data sequence, hierarchical conversion processing of the target encrypted data can be achieved to obtain a second data sequence used to represent the storage address of the target decrypted data; by reading the first target decrypted data from the first storage area based on the second data sequence, the required target decrypted data can be quickly found. While ensuring the security of the decryption process, it eliminates the need for complex decryption algorithms, reduces the performance requirements of the consumable chip, and ensures the normal operation of the consumable printing process. Attached Figure Description

[0022] Figure 1 A flowchart illustrating a data decryption method provided in this application embodiment;

[0023] Figure 2 A flowchart illustrating a data decryption method comprising a second data sequence obtained through truncation processing, provided as an embodiment of this application;

[0024] Figure 3 This application provides a schematic diagram of a process for obtaining a second data sequence by truncating a first data sequence according to an embodiment of the present application.

[0025] Figure 4 A flowchart illustrating a data decryption method that includes pre-storing decrypted data to a second storage area, as provided in this application embodiment;

[0026] Figure 5 A flowchart of a data decryption method including periodically feeding back first target decryption data to an image forming device, provided as an embodiment of this application;

[0027] Figure 6 A flowchart illustrating a data decryption method for reading second target decryption data based on a third data sequence, provided in this application embodiment;

[0028] Figure 7 A flowchart illustrating a data decryption method for reading third target decryption data based on a fourth data sequence, provided in this application embodiment;

[0029] Figure 8 A structural block diagram of a data decryption device provided in an embodiment of this application;

[0030] Figure 9 This is a schematic diagram of the structure of a data decryption device provided in an embodiment of this application. Detailed Implementation

[0031] The embodiments of this application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of this application and are not intended to limit the scope of the embodiments. Furthermore, it should be noted that, for ease of description, only the parts relevant to the embodiments of this application are shown in the accompanying drawings, not the entire structure.

[0032] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0033] The data decryption method provided in this application embodiment is used during the printing process of an image forming device to read internally stored target encrypted data, perform data conversion and truncation processing on the target encrypted data to obtain a data sequence representing the data address, and read target decrypted data based on the data sequence, providing target decrypted data for verification to the image forming device. Specific application scenarios may include document printing, image printing, etc. The aforementioned application scenarios are merely exemplary and illustrative. In practical applications, this data decryption method can also be used in data decryption in other scenarios, and this application embodiment does not limit this. This application aims to provide a data decryption method, apparatus, device, and storage medium to solve the problems in related technologies where insufficient computing power of consumable chips leads to excessively long computation times and uncontrollable decryption process execution times, resulting in the inability to promptly feed back decrypted data to the image forming device, causing errors in the image forming device and affecting consumable printing.

[0034] Figure 1 This is a flowchart illustrating a data decryption method provided in an embodiment of this application. This data decryption method can be implemented using the processor of a consumable chip as the execution entity. Figure 1 As shown, the data decryption method specifically includes the following steps:

[0035] Step S101: Obtain the data acquisition request sent by the image forming device, and read the target encrypted data of the target data address in the corresponding data acquisition request from the first storage area.

[0036] The data acquisition request can be a request sent by the image forming device to the consumable chip to obtain decrypted data. This decrypted data can be used for verification before the printer performs a printing operation. Only if the verification is successful can the image forming device perform the printing operation. The data acquisition request can include a target data address, which can be a storage location pointing to the target encrypted data in a first storage area, which can be the internal storage area of ​​the consumable chip. By performing subsequent data processing operations, the first target decrypted data corresponding to the target encrypted data can be determined and fed back to the image forming device so that the image forming device can verify whether the first target decrypted data is the same as the expected result value, thereby determining whether the verification is successful.

[0037] Step S102: Calculate the target encrypted data based on the preset hash algorithm to obtain the first binary data sequence.

[0038] The preset hash algorithm can be the SHA (Secure Hash Algorithm), including SHA-1, SHA-224, SHA-256, etc., which are not limited in this application. Taking the SHA-1 algorithm as an example, the target encrypted data can be calculated based on the SHA-1 algorithm to obtain a first data sequence of 256 binary bits. The number of bits in this first data sequence can be between 16 bits and 256 bits (ZXCVB).

[0039] Step S103: The first data sequence is truncated to a preset number of bits to obtain a second data sequence. The first target decrypted data corresponding to the second data sequence is read from the second storage area and fed back to the image forming device. The second storage area stores the first decrypted data corresponding to the binary data sequence set within the preset number of bits.

[0040] The second storage area can be provided by the chip's internal memory or by an externally configured memory; this application does not limit this. The preset bit length can be adaptively set by the developer based on the available storage space of the available consumable chips or external memory in the actual application scenario; for example, 7 bits to 10 bits; this application does not limit this. The truncation process can determine a second data sequence that meets the preset bit length based on a sub-data sequence extracted from the first data sequence at a preset position. In one embodiment, a sub-data sequence meeting the preset bit length can be directly extracted from the first data sequence at the preset position as the second data sequence. In another embodiment, the first data sequence can be first shifted in a preset direction to remove some data bits, and then a sub-data sequence with the preset bit length can be extracted from the first data sequence at the preset position. In one embodiment, a fixed-length sub-data sequence can be extracted from the first data sequence at a preset position. The number of bits in this sub-data sequence is less than the preset number of bits. This sub-data sequence is then expanded by padding data bits or fusing with other sub-data sequences to obtain a second data sequence that meets the preset number of bits. For example, the data bits can be 0 or 1, and the padding position can be a high bit, a low bit, or another fixed position. Alternatively, the content of other sub-data sequences can be a combination of 0 and 1, and the fusing method can be high bit merging, low bit merging, or insertion at a middle position. The specific settings can be adaptively configured by the developer based on the relevant storage location of the decrypted data in the actual application scenario, and are not limited in this application. Since the second storage area can be a pre-stored first decrypted data corresponding to a binary data sequence set within the preset number of bits, the first target decrypted data corresponding to the target decrypted data can be quickly read from the second storage area based on the second data sequence, and the first target decrypted data can be fed back to the image forming device for its data verification process. For example, the first data sequence can be 16 bits, which can be truncated to obtain a 10-bit second data sequence. The second storage area can provide 2 10 = 1024 data addresses, each of which can correspond to a 10-bit binary data sequence. The whole is equivalent to a set of binary data sequences corresponding to 10-bit binary data. Each data address also stores pre-generated first decryption data. Thus, each second data sequence can be used as address information to read the corresponding first target decryption data from the second storage area.

[0041] As described above, by acquiring a data acquisition request sent by the image forming device, target encrypted data at the target data address in the corresponding data acquisition request is read from the first storage area; a binary first data sequence is obtained by calculating the target encrypted data based on a preset hash algorithm; the first data sequence is truncated by a preset number of bits to obtain a second data sequence; the first target decrypted data corresponding to the second data sequence is read from the second storage area; the first target decrypted data is fed back to the image forming device; and the second storage area stores the first decrypted data corresponding to the binary data sequence set within the preset number of bits. In the above scheme, by converting the target encrypted data into a binary first data sequence and truncating the first data sequence by a preset number of bits to obtain the second data sequence, hierarchical conversion processing of the target encrypted data can be achieved to obtain a second data sequence used to represent the storage address of the target decrypted data; by reading the first target decrypted data from the first storage area based on the second data sequence, the required target decrypted data can be quickly found. While ensuring the security of the decryption process, it eliminates the need for complex decryption algorithms, reduces the performance requirements of the consumable chip, and ensures the normal operation of the consumable printing process.

[0042] Figure 2 This application provides a flowchart of a data decryption method that includes a second data sequence obtained through truncation processing. This data decryption method can be implemented using the processor of a consumable chip as the execution entity. Figure 2 As shown, the data decryption method specifically includes the following steps:

[0043] Step S201: Obtain the data acquisition request sent by the image forming device, and read the target encrypted data of the target data address in the corresponding data acquisition request from the first storage area.

[0044] Step S202: Calculate the target encrypted data based on the preset hash algorithm to obtain the first binary data sequence.

[0045] Step S203: Shift the first data sequence by a set number of data bits in the first preset direction to obtain an intermediate data sequence. Extract the data bits from the intermediate data sequence in the second preset direction and with a preset start position to obtain a second data sequence that satisfies the preset number of bits.

[0046] The first preset direction can be a counting direction from the least significant bit to the most significant bit, or a counting direction from the most significant bit to the least significant bit. The number of preset directions can be 3, 4, 5, etc., and this application does not limit this. The second preset direction can be a counting direction from the least significant bit to the most significant bit, or a counting direction from the most significant bit to the least significant bit. The preset starting position can be the 1st position, the 2nd position, the 3rd position, etc., and this application does not limit this.

[0047] In one embodiment, Figure 3 This application provides a schematic diagram illustrating a process of truncating a first data sequence to obtain a second data sequence, as shown in the embodiments of the present application. Figure 3 As shown, the first data sequence 101 is 11000011 1010 0101. The first preset direction is from high bit to low bit, with a set quantity of 3. The second preset direction is from low bit to high bit, with the preset start bit being the 1st bit and the preset number of bits being 10. After shifting the first data sequence 101 by 3 data bits according to the first preset direction, the intermediate data sequence 102 can be obtained. The intermediate data sequence 102 is 0001 1000 0111 0100. After extracting 10 data bits from the intermediate data sequence 102 according to the second preset direction and with the preset start bit being the 1st bit, the second data sequence 103 can be obtained. The second data sequence 103 is 00 0111 0100.

[0048] Step S204: Read the first target decrypted data corresponding to the second data sequence from the second storage area, and feed the first target decrypted data back to the image forming device. The second storage area stores the first decrypted data corresponding to the binary data sequence set within a preset number of bits.

[0049] As described above, by performing relevant translation and extraction operations on the first data sequence, a second data sequence with a preset number of bits can be obtained, effectively converting the first data sequence into a second data sequence that matches the storage space size of the second storage area, thus providing valid address information for querying the first target decrypted data.

[0050] Figure 4 A flowchart illustrating a data decryption method that includes pre-storing decrypted data to a second storage area, as provided in an embodiment of this application. Figure 4 As shown, the data decryption method specifically includes the following steps:

[0051] Step S301: Receive multiple decrypted data and the binary data sequence corresponding to each decrypted data sent by an external computing device. The multiple decrypted data are the decryption results obtained by the external computing device based on the set decryption algorithm for each binary data sequence within a preset number of bits.

[0052] Since the computing power of the consumable chip is limited, the decryption data corresponding to the encrypted data can be pre-calculated by an external computing device and stored in the corresponding location of the second storage area. Each decryption data can be calculated by the external computing device based on its corresponding binary data sequence, and the binary data sequence corresponding to each decryption data can be used as the storage address of the decryption data in the second storage area. For example, the second storage area can provide a 16-bit binary data address, so the external computing device can calculate the corresponding decryption result based on the binary data sequences corresponding to 0-65535 respectively. The storage address corresponding to each decryption result is consistent with its corresponding binary data sequence. For example, the decryption result calculated by the external computing device based on 1101 1111 1001 1001 can be stored in the second storage area at the binary data address 1101 1111 1001 1001.

[0053] Step S302: Store each decrypted data at the address of the corresponding binary data sequence in the second storage area.

[0054] Step S303: Obtain the data acquisition request sent by the image forming device, and read the target encrypted data from the target data address in the corresponding data acquisition request from the first storage area.

[0055] Step S304: Calculate the target encrypted data based on the preset hash algorithm to obtain the first binary data sequence.

[0056] Step S305: The first data sequence is truncated to a preset number of bits to obtain a second data sequence. The first target decrypted data corresponding to the second data sequence is read from the second storage area and fed back to the image forming device. The second storage area stores the first decrypted data corresponding to the binary data sequence set within the preset number of bits.

[0057] As mentioned above, by utilizing the computing power of external computing devices, multiple decryption data required can be calculated in advance, making up for the insufficient computing power of ordinary consumable chips. Furthermore, by storing the relevant decryption data in the second storage area in advance, it is beneficial to quickly output decryption data when processing data acquisition requests sent by the image forming device, ensuring the normal operation of consumable printing.

[0058] Figure 5 This is a flowchart illustrating a data decryption method that includes periodically feeding back first target decryption data to an image forming apparatus, as provided in an embodiment of this application. Figure 5 As shown, the data decryption method specifically includes the following steps:

[0059] Step S401: Obtain the data acquisition request sent by the image forming device, and read the target encrypted data of the target data address in the corresponding data acquisition request from the first storage area.

[0060] Step S402: Calculate the target encrypted data based on the preset hash algorithm to obtain the first binary data sequence.

[0061] Step S403: The first data sequence is truncated to a preset number of bits to obtain a second data sequence. A timer is set to start the first countdown. The first target decrypted data corresponding to the second data sequence is read from the second storage area. When the first countdown reaches the preset duration, the first target decrypted data is fed back to the image forming device. The second storage area stores the first decrypted data corresponding to the binary data sequence set within the preset number of bits.

[0062] In some scenarios, image forming devices may need to verify not only the decrypted data but also the decryption time. In the printing program of the image forming device, the consumable chip requires a certain processing time interval to process the data acquisition request and obtain the first target decrypted data. Therefore, the image forming device has a time range limit for the waiting time from sending the data acquisition request to receiving the first target decrypted data. Since this embodiment uses a method based on a second data sequence query to obtain the first target decrypted data, it is faster and takes less time than calculating the first target decrypted data through a processor. Consequently, the image forming device may consider the time interval for obtaining the first target decrypted data to be too short, leading to an unreliable data source and a printing error. Therefore, this embodiment sets a timer for the first count. Only when the first count reaches a preset time is the first target decrypted data fed back to the image forming device. This preset time can be adaptively set based on the time range corresponding to the waiting time built into the printing program, and is not limited in this application.

[0063] As mentioned above, by setting a timer to control the timing of feeding back the first target decryption data to the image forming device, it is possible to meet the image forming device's time constraints and ensure the normal operation of the printing process.

[0064] Figure 6 A flowchart illustrating a data decryption method for reading second target decryption data based on a third data sequence, provided as an embodiment of this application. Figure 6 As shown, the data decryption method specifically includes the following steps:

[0065] Step S501: Obtain the data acquisition request sent by the image forming device, and read the target encrypted data of the target data address in the corresponding data acquisition request from the first storage area.

[0066] Step S502: Calculate the target encrypted data based on the preset hash algorithm to obtain the first binary data sequence.

[0067] Step S503: Truncate the first data sequence to a preset number of bits to obtain the second data sequence, and obtain the current system time.

[0068] Step S504: If the current system time has not reached the preset time node, read the first target decrypted data corresponding to the second data sequence from the second storage area, and feed the first target decrypted data back to the image forming device. The second storage area stores the first decrypted data corresponding to the binary data sequence set within a preset number of bits.

[0069] Step S505: When the current system time reaches a preset time node, the second data sequence and the reference data sequence are XORed to obtain the third data sequence. The second target decryption data corresponding to the third data sequence is read from the third storage area and fed back to the image forming device. The third storage area stores the second decryption data corresponding to the binary data sequence set within a preset number of bits.

[0070] Since the possible values ​​of the second data sequence are limited, the risk of external attacks and cracking increases gradually as the first decrypted data in the second storage area is read based on the second data sequence for an extended period. Therefore, a preset time node can be set to determine whether the cumulative time for the consumable chip to process data acquisition requests has reached the expected time threshold. If the current system time has not reached the preset time node, the cumulative time can be considered within an acceptable range, and the first target decrypted data can continue to be read based on the obtained second data sequence. If the current system time has reached the preset time node, the cumulative time can be considered to have exceeded the expected time threshold. Therefore, it is necessary to transform the data bits of the second data sequence to obtain a third data sequence, and then read the second target decrypted data from the third storage area based on the third data sequence. For example, the second data sequence can be 00 0001 1101, and the reference data sequence can be 11 11111111. By performing an XOR operation between the second data sequence and the reference data sequence, the 0s in the second data sequence can be converted to 1s, and the 1s to 0s, resulting in the third data sequence: 11 1110 0010. Of course, developers may set other reference data sequences for different application scenarios, but this application does not limit this.

[0071] In one embodiment, the reference data sequence includes a first reference data sequence and a second reference data sequence. The specific process of XORing the second data sequence with the reference data sequence to obtain the third data sequence includes the following steps:

[0072] An intermediate result sequence is obtained by performing an XOR operation between the sub-data sequence at the first preset position in the second data sequence and the first reference data sequence.

[0073] The third data sequence is obtained by XORing the sub-data sequence at the second preset position in the intermediate result sequence with the second reference data sequence. The first preset position is different from the second preset position.

[0074] For example, the second data sequence can be 00 0001 1101. The sub-data sequence at the first preset position can be the sub-data sequence corresponding to the 1st to 4th bits from the least significant bit to the most significant bit, i.e., 1101. The corresponding first reference data sequence is 0101. Then, XORing 1101 and 0101 in the second data sequence yields the intermediate result sequence: 00 0001 1000. Alternatively, for the intermediate result sequence, the sub-data sequence at the second preset position can be the sub-data sequence corresponding to the 5th to 8th bits from the least significant bit to the most significant bit, i.e., 0001. The corresponding second reference data sequence is 1010. Then, XORing 0001 and 1010 in the intermediate data sequence yields the third data sequence: 00 1011 1000. Of course, other preset positions and reference data sequences can be set, which are not limited in this application.

[0075] As described above, by comparing the current system time with the preset time node, it is possible to effectively determine whether the cumulative duration of processing data acquisition requests has reached the expected duration threshold. Furthermore, if the current system time reaches the preset time node, the second data sequence can be transformed by performing an XOR operation with the reference data sequence to obtain the third data sequence. The third data sequence is then provided to the image forming device as the second target decryption data, increasing the difficulty of cracking the decryption data address and reducing the risk of external cracking.

[0076] Figure 7 A flowchart illustrating a data decryption method for reading third target decryption data based on a fourth data sequence, provided as an embodiment of this application. Figure 7 As shown, the data decryption method specifically includes the following steps:

[0077] Step S601: Obtain the data acquisition request sent by the image forming device, update the cumulative number of request processing times, and read the target encrypted data of the target data address in the corresponding data acquisition request from the first storage area.

[0078] Step S602: Calculate the target encrypted data based on the preset hash algorithm to obtain the first binary data sequence.

[0079] Step S603: Truncate the first data sequence by a preset number of bits to obtain the second data sequence.

[0080] Step S604: If the number of request processing attempts has not reached the preset number, read the first target decrypted data corresponding to the second data sequence from the second storage area, and feed the first target decrypted data back to the image forming device. The second storage area stores the first decrypted data corresponding to the binary data sequence set within a preset number of bits.

[0081] Step S605: When the number of request processing times reaches a preset number, the sub-data sequences corresponding to the third preset position and the fourth preset position in the second data sequence are swapped to obtain the fourth data sequence. The third target decryption data corresponding to the fourth data sequence is read from the fourth storage area and fed back to the image forming device. The fourth storage area stores the third decryption data corresponding to the binary data sequence set within a preset number of bits.

[0082] By counting the number of data acquisition requests processed, the historical cumulative number of times the second data sequence has been used to determine the first decrypted data can be determined. Since the possible values ​​of the second data sequence are limited, if the historical cumulative number reaches a certain order of magnitude, the risk of being cracked by external attacks may increase. Therefore, a preset number of times can be set to determine whether the cumulative number of data acquisition requests processed by the consumable chip has reached an expected threshold. If the number of requests processed has not reached the preset number, it can be considered that the cumulative number of requests processed is within an acceptable range, and thus the first target decrypted data can continue to be read based on the obtained second data sequence. If the number of requests processed has reached the preset number, it can be considered that the cumulative number of requests processed has exceeded the expected threshold, and therefore it is necessary to partially swap the second data sequence to obtain a fourth data sequence, and read the third target decrypted data from the fourth storage area based on the fourth data sequence. For example, the second data sequence can be 00 0001 1101, the third preset position sub-data sequence can be the sub-data sequence corresponding to the 1st to 4th bits in the direction from the least significant bit to the most significant bit, i.e., this sub-data sequence is 1101, and the fourth preset position sub-data sequence can be the sub-data sequence corresponding to the 5th to 8th bits in the direction from the least significant bit to the most significant bit, i.e., this sub-data sequence is 0001. By swapping the positions of 1101 and 0001, the fourth data sequence can be obtained: 00 11010001. Of course, other preset position settings are also possible, which are not limited in this application.

[0083] As described above, by comparing the number of request processing times with the preset number of times, it is possible to effectively determine whether the historical cumulative number of data acquisition requests has reached the expected number threshold. Furthermore, if the number of request processing times reaches the preset number of times, the second data sequence can be partially rearranged to obtain the fourth data sequence. The third target decryption data corresponding to the fourth data sequence is then provided to the image forming device, effectively rearranging the second data sequence, increasing the difficulty of cracking the decryption data address, and ensuring the security of consumable printing.

[0084] Figure 8 This is a structural block diagram of a data decryption apparatus provided in an embodiment of this application. The apparatus is configured to execute the data decryption method provided in the above embodiment, and possesses corresponding functional modules and beneficial effects for executing the method. For example... Figure 8 As shown, the device specifically includes:

[0085] The acquisition module 201 is configured to acquire data acquisition requests sent by the image forming device;

[0086] The first reading module 202 is configured to read the target encrypted data from the target data address in the corresponding data acquisition request from the first storage area;

[0087] The first calculation module 203 is configured to calculate the first binary data sequence based on the target encrypted data using a preset hash algorithm;

[0088] The second calculation module 204 is configured to truncate the first data sequence to a preset number of bits to obtain the second data sequence;

[0089] The second reading module 205 is configured to read the first target decrypted data corresponding to the second data sequence from the second storage area, wherein the second storage area stores the first decrypted data corresponding to the binary data sequence set within a preset number of bits.

[0090] The data feedback module 206 is configured to feed back the first target decryption data to the image forming device.

[0091] As described above, by acquiring a data acquisition request sent by the image forming device, target encrypted data at the target data address in the corresponding data acquisition request is read from the first storage area; a binary first data sequence is obtained by calculating the target encrypted data based on a preset hash algorithm; the first data sequence is truncated by a preset number of bits to obtain a second data sequence; the first target decrypted data corresponding to the second data sequence is read from the second storage area; the first target decrypted data is fed back to the image forming device; and the second storage area stores the first decrypted data corresponding to the binary data sequence set within the preset number of bits. In the above scheme, by converting the target encrypted data into a binary first data sequence and truncating the first data sequence by a preset number of bits to obtain the second data sequence, hierarchical conversion processing of the target encrypted data can be achieved to obtain a second data sequence used to represent the storage address of the target decrypted data; by reading the first target decrypted data from the first storage area based on the second data sequence, the required target decrypted data can be quickly found. While ensuring the security of the decryption process, it eliminates the need for complex decryption algorithms, reduces the performance requirements of the consumable chip, and ensures the normal operation of the consumable printing process.

[0092] In one possible embodiment, the second computing module 204 is further configured to:

[0093] The intermediate data sequence is obtained by shifting the first data sequence by a set number of data bits in a first preset direction;

[0094] The intermediate data sequence is processed by extracting data bits according to the second preset direction and the preset start position to obtain a second data sequence that meets the preset number of bits.

[0095] In one possible embodiment, a decryption data storage module is also included, configured as follows:

[0096] Receive multiple decrypted data and the corresponding binary data sequence of each decrypted data sent by an external computing device. The multiple decrypted data are the decryption results obtained by the external computing device based on the set decryption algorithm to calculate each binary data sequence within a preset number of bits.

[0097] Each decrypted data is stored at the address of the corresponding binary data sequence in the second storage area.

[0098] In one possible embodiment, a timing module is also included, configured to:

[0099] The first timing is initiated using the set timer;

[0100] Data feedback module 206 is configured as follows:

[0101] Once the first timing reaches the preset duration, the first target decryption data is fed back to the image forming device.

[0102] In one possible embodiment, a system time acquisition module is also included, configured as follows:

[0103] Get the current system time;

[0104] The second reading module 205 is also configured as follows:

[0105] If the current system time has not reached the preset time node, read the first target decrypted data corresponding to the second data sequence from the second storage area;

[0106] Correspondingly, a third computing module is also included, configured as follows:

[0107] When the current system time reaches the preset time node, the third data sequence is obtained by XORing the second data sequence with the reference data sequence;

[0108] The third reading module is configured as follows:

[0109] Read the second target decryption data corresponding to the third data sequence from the third storage area. The third storage area stores the second decryption data corresponding to the binary data sequence set within a preset number of bits.

[0110] The second data feedback module is configured as follows:

[0111] The second target decryption data is fed back to the image forming device.

[0112] In one possible embodiment, the third computing module is further configured as follows:

[0113] An intermediate result sequence is obtained by performing an XOR operation between the sub-data sequence at the first preset position in the second data sequence and the first reference data sequence.

[0114] The third data sequence is obtained by XORing the sub-data sequence at the second preset position in the intermediate result sequence with the second reference data sequence. The first preset position is different from the second preset position.

[0115] In one possible embodiment, a count module is also included, configured as follows:

[0116] Update the cumulative number of request processing attempts;

[0117] The second reading module 205 is also configured as follows:

[0118] If the number of request processing attempts has not reached the preset number, the first target decrypted data corresponding to the second data sequence is read from the second storage area;

[0119] Correspondingly, a fourth computing module is also included, configured as follows:

[0120] If the number of requests processed reaches a preset number, the sub-data sequences corresponding to the third and fourth preset positions in the second data sequence are swapped to obtain the fourth data sequence.

[0121] The fourth reading module is configured as follows:

[0122] Read the third target decryption data corresponding to the fourth data sequence from the fourth storage area. The fourth storage area stores the third decryption data corresponding to the binary data sequence set within a preset number of bits.

[0123] The fourth data feedback module is configured as follows:

[0124] The third target decryption data is fed back to the image forming device.

[0125] Figure 9 This is a schematic diagram of the structure of a data decryption device provided in an embodiment of this application, as shown below. Figure 9 As shown, the device includes a processor 301, a memory 302, an input device 303, and an output device 304; the number of processors 301 in the device can be one or more. Figure 9 Taking a processor 301 as an example; the processor 301, memory 302, input device 303, and output device 304 in the device can be connected via a bus or other means. Figure 9 Taking a bus connection as an example, the memory 302, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the data decryption method in this embodiment. The processor 301 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 302, thereby implementing the aforementioned data decryption method. The input device 303 can be configured to receive input digital or character information and generate key signal inputs related to user settings and function control of the device. The output device 304 may include a display screen or other display device.

[0126] The data decryption device provided above can be used to execute the data decryption method provided in any of the above embodiments, and has the corresponding functions and beneficial effects.

[0127] This application embodiment also provides a non-volatile storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are configured to perform a data decryption method described in the above embodiments, comprising: acquiring a data acquisition request sent by an image forming device; reading target encrypted data corresponding to a target data address in the data acquisition request from a first storage area; calculating a first binary data sequence based on a preset hash algorithm on the target encrypted data; truncating the first data sequence to a preset number of bits to obtain a second data sequence; reading first target decrypted data corresponding to the second data sequence from a second storage area; and feeding back the first target decrypted data to the image forming device. The second storage area stores the first decrypted data corresponding to a binary data sequence set within a preset number of bits.

[0128] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media, or optical storage; registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” may include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.

[0129] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the data decryption method described above, but can also perform related operations in the data decryption method provided in any embodiment of this application.

[0130] It is worth noting that in the above-described embodiments of the data decryption device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not configured to limit the protection scope of the embodiments of this application.

[0131] It should be noted that the numbering of each step in this solution is only used to describe the overall design framework of this solution and does not indicate a necessary sequential relationship between the steps. As long as the overall implementation process conforms to the overall design framework of this solution, it falls within the protection scope of this solution. The order of the words in the description is not an exclusive limitation on the specific implementation process of this solution. Those skilled in the art should understand that the embodiments of this application can be provided as methods, systems, or computer program products. In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent memory in computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0132] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0133] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A data decryption method, characterized in that, include: Obtain a data acquisition request sent by the image forming device, and read the target encrypted data corresponding to the target data address in the data acquisition request from the first storage area; The target encrypted data is calculated based on a preset hash algorithm to obtain a binary first data sequence; The first data sequence is truncated to a preset number of bits to obtain the second data sequence; Get the current system time; If the current system time has not reached the preset time node, the first target decrypted data corresponding to the second data sequence is read from the second storage area, and the first target decrypted data is fed back to the image forming device. The second storage area stores the first decrypted data corresponding to the binary data sequence set within a preset number of bits.

2. The data decryption method according to claim 1, characterized in that, The step of truncating the first data sequence to obtain the second data sequence by a preset number of bits includes: The intermediate data sequence is obtained by shifting the first data sequence by a set number of data bits in a first preset direction; The intermediate data sequence is processed by extracting data bits according to the second preset direction and the preset start position to obtain a second data sequence that satisfies the preset number of bits.

3. The data decryption method according to claim 1, characterized in that, Prior to acquiring the data acquisition request sent by the image forming device, the method further includes: The device receives multiple decrypted data and a binary data sequence corresponding to each decrypted data sent by an external computing device. The multiple decrypted data are the decryption results obtained by the external computing device based on a set decryption algorithm for each binary data sequence within a preset number of bits. Each of the decrypted data is stored in the address location corresponding to the binary data sequence in the second storage area.

4. The data decryption method according to claim 1, characterized in that, Before reading the first target decrypted data corresponding to the second data sequence from the second storage area, the method further includes: The first timing is initiated using the set timer; The step of feeding back the first target decryption data to the image forming device includes: When the first timing reaches a preset duration, the first target decryption data is fed back to the image forming device.

5. The data decryption method according to claim 1, characterized in that, After obtaining the current system time, the following is also included: When the current system time reaches the preset time node, the second data sequence and the reference data sequence are XORed to obtain the third data sequence. The second target decryption data corresponding to the third data sequence is read from the third storage area and fed back to the image forming device. The third storage area stores the second decryption data corresponding to the binary data sequence set within a preset number of bits.

6. The data decryption method according to claim 5, characterized in that, The reference data sequence includes a first reference data sequence and a second reference data sequence. The step of XORing the second data sequence with the reference data sequence to obtain a third data sequence includes: An intermediate result sequence is obtained by performing an XOR operation between the sub-data sequence at the first preset position in the second data sequence and the first reference data sequence. The third data sequence is obtained by XORing the sub-data sequence at the second preset position in the intermediate result sequence with the second reference data sequence, wherein the first preset position is different from the second preset position.

7. The data decryption method according to claim 1, characterized in that, Following the acquisition request sent by the image forming device, the method further includes: Update the cumulative number of request processing attempts; The step of reading the first target decrypted data corresponding to the second data sequence from the second storage area includes: If the number of request processing attempts does not reach the preset number, the first target decrypted data corresponding to the second data sequence is read from the second storage area; Accordingly, after truncating the first data sequence to obtain the second data sequence by a preset number of bits, the method further includes: When the number of request processing times reaches the preset number, the sub-data sequences corresponding to the third and fourth preset positions in the second data sequence are swapped to obtain the fourth data sequence. The third target decryption data corresponding to the fourth data sequence is read from the fourth storage area and fed back to the image forming device. The fourth storage area stores the third decryption data corresponding to the binary data sequence set within a preset number of bits.

8. A data decryption device, characterized in that, include: The acquisition module is configured to acquire data acquisition requests sent by the image forming device; The first reading module is configured to read target encrypted data corresponding to the target data address in the data acquisition request from the first storage area. The first calculation module is configured to calculate a first binary data sequence from the target encrypted data based on a preset hash algorithm; The second calculation module is configured to truncate the first data sequence by a preset number of bits to obtain the second data sequence; The system time acquisition module is configured to acquire the current system time. The second reading module is configured to read the first target decrypted data corresponding to the second data sequence from the second storage area when the current system time has not reached the preset time node. The second storage area stores the first decrypted data corresponding to the binary data sequence set within a preset number of bits. The data feedback module is configured to feed back the first target decryption data to the image forming device.

9. A data decryption device, the device comprising: One or more processors; A storage device configured to store one or more programs that, when executed by one or more processors, cause the one or more processors to implement the data decryption method according to any one of claims 1-7.

10. A non-volatile storage medium storing computer-executable instructions, which, when executed by a computer processor, are configured to perform the data decryption method of any one of claims 1-7.