Data printing method and apparatus, storage medium, and electronic device

By acquiring the target difference print data from the previous page and storing it in the corresponding area for processing, the problem of frequent printer pauses caused by speed mismatch was solved, achieving efficient and stable operation of the printing equipment.

WO2026153322A1PCT designated stage Publication Date: 2026-07-23WUHAN JINGCHEN INTELLIGENT IDENTIFICATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
WUHAN JINGCHEN INTELLIGENT IDENTIFICATION TECH CO LTD
Filing Date
2026-01-13
Publication Date
2026-07-23

AI Technical Summary

Technical Problem

In existing technologies, printers often pause frequently while waiting for print data due to the high printing speed and slow data transmission speed, which affects work efficiency.

Method used

By acquiring the previous page's print data, the corresponding target difference print data is determined and stored in the appropriate data storage area for processing, including complete or partial data cache areas. This reduces the amount of data acquired by the printing device during the printing process and avoids frequent pauses.

Benefits of technology

It improves the efficiency of printing equipment, ensures a continuous and stable printing process, and reduces the problem of frequent pauses and waiting for printing data during a single printing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026072328_23072026_PF_FP_ABST
    Figure CN2026072328_23072026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in embodiments of the present application are a data printing method and apparatus, a storage medium, and an electronic device. The method comprises: acquiring previous-page print data, and storing the previous-page print data; determining, in current-page print data, target differential print data between the current-page print data and the previous-page print data; and determining a data storage region for the target differential print data, storing the target differential print data in the data storage region, determining target print data on the basis of the target differential print data, and performing printing processing on the target print data.
Need to check novelty before this filing date? Find Prior Art

Description

Data printing methods, apparatus, storage media, and electronic devices

[0001] This application claims priority to Chinese Patent Application No. 2025100790484, filed on January 17, 2025, entitled “Data Printing Method, Apparatus, Storage Medium and Electronic Device”, the entire contents of which are incorporated herein by reference. Technical Field

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

[0003] In related technologies, since different users have different printing needs and printer memory is limited, in order to meet the printing needs of all users, the data to be printed is sent from the user's device to the printer via Bluetooth or other means to achieve the function of printing while receiving data.

[0004] During a single printing process, users may print multiple pages and send the entire contents of each page to the printer. For some high-speed printers, the printing speed may exceed the data sending speed, causing the printer to frequently pause and wait for data to be printed during a single printing session, resulting in low printer efficiency. Therefore, improving printer efficiency is a pressing technical problem that needs to be solved.

[0005] Application content

[0006] This application provides a data printing method, apparatus, computer storage medium, and electronic device. The technical solution is as follows:

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

[0008] Obtain the previous page print data and store the previous page print data; determine the target difference print data corresponding to the current page print data and the previous page print data in the current page print data; determine the data storage area of ​​the target difference print data, store the target difference print data in the data storage area, determine the target print data based on the target difference print data, and perform printing processing on the target print data.

[0009] In one embodiment, determining the data storage area of ​​the target difference print data includes: obtaining the target print instruction corresponding to the target difference print data; if the target difference print data is determined to be of the data integrity type based on the target print instruction, then the integrity data cache area is determined as the data storage area of ​​the target difference print data; if the target difference print data is determined to be of the data incomplete type based on the target print instruction, then the partial data cache area is determined as the data storage area of ​​the target difference print data.

[0010] In one embodiment, the step of printing the target print data includes: determining the number of reprints corresponding to the target differential print data from the target print instruction, and performing reprint processing on the target print data according to the number of reprints.

[0011] In one embodiment, determining the target difference print data corresponding to the current page print data and the previous page print data in the current page print data includes: performing line-by-line data comparison processing on the current page print data and the previous page print data to obtain the target difference print data.

[0012] In one embodiment, storing the target difference print data in the data storage area, determining target print data based on the target difference print data, and printing the target print data includes: if the target difference print data is of incomplete data type, storing the target difference print data in a partial data cache area, determining the target storage location of the target difference print data in a complete data cache area, copying the target difference print data to the target storage location to obtain first target print data in the complete data cache area, and printing the first target print data; if the target difference print data is of complete data type, after all stored print data has been printed, storing the target difference print data in a complete data cache area to obtain second target print data, and printing the second target print data.

[0013] In one embodiment, determining the target storage location of the target difference print data in the complete data cache area, copying the target difference print data to the target storage location to obtain the first target print data in the complete data cache area, and printing the first target print data includes: determining at least one line of difference print data and a line number identifier corresponding to the at least one line of difference print data in the target difference print data; determining the target storage location indicated by the line number identifier in the complete data cache area; using the at least one line of difference print data to overwrite and update the data in the target storage location to obtain the first target print data in the complete data cache area; and reading the first target print data from the starting cache position in the complete data cache area and starting printing.

[0014] In one embodiment, storing the target difference print data in a complete data cache area to obtain second target print data, and printing the second target print data, includes: determining at least one line of difference print data and a line number identifier corresponding to the at least one line of difference print data in the target difference print data; writing the at least one line of difference print data into the storage location indicated by the line number identifier in the complete data cache area to obtain the second target print data in the complete data cache area; and reading the second target print data from the starting cache position in the complete data cache area and starting printing.

[0015] In one embodiment, obtaining and storing the previous page print data includes: obtaining the previous page print data; determining whether the previous page print data is the first page print data; if the previous page print data is the first page print data, storing the previous page print data in a complete data cache area; if the previous page print data is not the first page print data, determining a reference data type corresponding to the previous page print data, determining a reference data storage area for the previous page print data based on the reference data type, and storing the previous page print data in the reference data storage area.

[0016] In one embodiment, determining the target difference print data corresponding to the current page print data and the previous page print data in the current page print data includes: determining the target difference print data corresponding to the current page print data and the previous page print data in the current page print data after all the previous page print data has been printed; or, determining the target difference print data corresponding to the current page print data and the previous page print data in the current page print data after a preset time has elapsed since the printing completion time of the target row print data in the previous page print data has elapsed.

[0017] In one embodiment, before obtaining and storing the previous page print data, the method further includes: obtaining the print data to be printed corresponding to the target print task; determining similar print data in the print data to be printed, and determining a target print order based on the similar print data; or, determining an initial print order corresponding to the print data to be printed, and determining a target print order based on the initial print order.

[0018] In one embodiment, before determining the target difference print data between the current page print data and the previous page print data in the current page print data, the method further includes: obtaining the current page print data corresponding to the previous page print data according to the target printing order.

[0019] In one embodiment, the data storage area includes at least one of a complete data cache area and a partial data cache area, wherein the complete data cache area is used to store all the printing data of a single sheet, the starting cache position of the complete data cache area corresponds to the end position of the sheet in the length direction, the ending cache position of the complete data cache area corresponds to the tail position of the sheet in the length direction, and the partial data cache area is used to store partial printing data of at least one sheet.

[0020] Secondly, embodiments of this application provide a data printing apparatus, the apparatus comprising:

[0021] The first printing processing module is used to obtain the previous page printing data and store the previous page printing data;

[0022] The second printing processing module is used to determine the target difference printing data between the current page printing data and the previous page printing data from the current page printing data;

[0023] The third printing processing module is used to determine the data storage area of ​​the target difference printing data, store the target difference printing data in the data storage area, determine the target printing data based on the target difference printing data, and perform printing processing on the target printing data.

[0024] Thirdly, embodiments of this application provide a computer storage medium having multiple instructions adapted for loading and executing the methods described above by a processor.

[0025] Fourthly, embodiments of this application provide an electronic device, which may include: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the memory and to execute the above-described method.

[0026] The beneficial effects of the technical solutions provided in this application include at least the following:

[0027] The data printing method provided in this application involves acquiring and storing the previous page's print data, determining the target difference print data corresponding to the previous page's print data within the current page's print data, determining a data storage area for the target difference print data, storing the target difference print data in the data storage area, determining the target print data based on the target difference print data, and then printing the target print data. Therefore, by determining the target difference print data corresponding to adjacent pages' print data, the amount of print data acquired by the printing device during the printing process can be reduced. This avoids the problem of the printing device frequently pausing and waiting for print data during a single printing process, enabling the printing device to print continuously and stably, thus improving the printing device's working efficiency. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art 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.

[0029] Figure 1 is a schematic diagram of a data printing system provided in an embodiment of this application;

[0030] Figure 2 is a flowchart illustrating a data printing method provided in an embodiment of this application;

[0031] Figure 3 is a flowchart illustrating another data printing method provided in an embodiment of this application;

[0032] Figure 4 is a flowchart illustrating another data printing method provided in an embodiment of this application;

[0033] Figure 5 is a flowchart illustrating another data printing method provided in an embodiment of this application;

[0034] Figure 6 is a flowchart illustrating another data printing method provided in an embodiment of this application;

[0035] Figure 7 is a flowchart illustrating another data printing method provided in an embodiment of this application;

[0036] Figure 8 is a flowchart illustrating another data printing method provided in an embodiment of this application;

[0037] Figure 9 is a schematic diagram of the structure of a data printing device provided in an embodiment of this application;

[0038] Figure 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0039] To make the inventive objectives, features, and advantages of the embodiments of this application more apparent and understandable, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0040] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In the description of this application, it should be noted that, unless otherwise expressly specified and limited, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0041] Please refer to Figure 1, which is a schematic diagram of a data printing system provided in an embodiment of this application. As shown in Figure 1, the data printing system may include at least a client cluster and a printing device 100.

[0042] In some embodiments, the client cluster may include at least one client, as shown in Figure 1, specifically including client 1 corresponding to user 1, client 2 corresponding to user 2, ..., client n corresponding to user n, where n is an integer greater than 0.

[0043] Each client in a client cluster can be an electronic device with communication capabilities, including but not limited to: wearable devices, handheld devices, personal computers, tablets, in-vehicle devices, smartphones, computing devices, or other processing devices connected to a wireless modem. Electronic devices may have different names in different networks, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), and electronic devices in 5G networks or future evolved networks.

[0044] Printing device 100 is an output device used to print digital information onto a relevant medium. Its basic working principle is to control a print head or laser through signal processing to form characters or images on the transmitted paper using ink or toner. Printing device 100 may include, but is not limited to, inkjet printers, laser printers, thermal printers, dot matrix printers, and thermal transfer printers. The printing principles of the different types of printers mentioned above are as follows: Inkjet printers print text and images by spraying liquid ink onto paper; laser printers use a laser beam to draw the image or text to be printed on a photosensitive drum, then use electrical charge to attract toner (carbon powder) onto the image, and finally transfer the toner to the paper, fixing it onto the paper by heating; thermal printers form images or text by heating a special coating on thermal paper; thermal paper itself contains heat-reactive substances, and when the print head is heated, the coating on the paper surface undergoes a chemical reaction, displaying patterns or text; dot matrix printers print a series of small dots in columns on the paper using a print head, and these dots combine to form letters, numbers, and symbols; thermal transfer printers use a heat exchanger to transfer toner or ink from a strip material (such as a thermal transfer tape) to the paper, and the print head heats the ink on the tape and transfers it to the target surface to form the printed content.

[0045] In one or more embodiments of this application, the printing device 100 can establish a communication connection with at least one client in the client cluster, and complete data interaction during the data printing process based on the communication connection. For example, the printing device obtains and stores the previous page print data; the client determines the target difference print data corresponding to the current page print data and the previous page print data in the current page print data; the printing device determines the data storage area for the target difference print data, stores the target difference print data in the data storage area, determines the target print data based on the target difference print data, and performs printing processing on the target print data. The previous page print data and the target difference print data can be obtained from the client after the printing device establishes a communication connection with the client.

[0046] It should be noted that the printing device 100 establishes a communication connection with at least one client in the client cluster via a network for interactive communication. This network can be a wireless network or a wired network. Wireless networks include, but are not limited to, cellular networks, wireless LANs, infrared networks, or Bluetooth networks. Wired networks include, but are not limited to, Ethernet, universal serial bus (USB), or controller area networks. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network (such as target compressed packets). Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0047] The data printing system embodiments provided in this specification and the data printing methods described in one or more embodiments belong to the same concept. The execution entity corresponding to the data printing method involved in one or more embodiments of this specification can be an electronic device, which can be the aforementioned printing device 100 or the aforementioned client, depending on the actual application environment. The specific implementation process of the data printing system embodiments can be found in the following method embodiments, and will not be repeated here.

[0048] In one embodiment, as shown in Figure 2, a data printing method is proposed. This method can be implemented using a computer program and can run on a data printing device based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application.

[0049] Specifically, the data printing method includes:

[0050] S201, retrieve the previous page print data and store the previous page print data.

[0051] In this context, "previous page print data" refers to at least a portion of the data on a single page of a multi-page print job. This previous page print data is in a specific format that can be recognized and printed by the printing device. For example, the previous page print data could be at least a portion of the data on any page of a multi-page print job, excluding the last page. It can be understood that the previous page print data could be all the data on a single page to be printed, or it could be a portion of the data on that single page.

[0052] In some embodiments, the printing device can obtain the previous page print data from the client and then store the previous page print data locally. Specifically, the client can install printing software that communicates with, manages, and operates the printing device. The user can trigger a print job in the printing software, the client generates a print command corresponding to the print job, and the client sends the previous page print data corresponding to the user-triggered print job to the printing device based on the print command.

[0053] Understandably, printing devices can be configured with data buffer areas to store different data types of print data. For example, a printing device can be configured with a complete data buffer area and a partial data buffer area. The complete data buffer area can store all the data for a single page to be printed, while the partial data buffer area can store a portion of the data for a single page or a portion of the data for multiple pages to be printed. If the previous page of print data is all the data for a page to be printed, then the printing device can store the previous page's print data in the complete data buffer area. If the previous page of print data is only a portion of the data for a page to be printed, then the printing device can store the previous page's print data in the partial data buffer area.

[0054] S202, determine the target difference print data between the current page print data and the previous page print data in the current page print data.

[0055] The current page print data refers to the print data located after the previous page print data, determined according to the printing order of the data to be printed.

[0056] Target difference print data refers to the difference in print data between two adjacent pages; it can be understood as different data between two adjacent pages. In this embodiment, the current page print data and the complete page print data corresponding to the previous page print data are two adjacent pages. By comparing the current page print data and the complete page print data corresponding to the previous page print data, we can obtain print data that exists at the target page position in the current page print data but does not exist at the target page position in the complete page print data corresponding to the previous page print data; this is the target difference print data.

[0057] For example, the current page print data is split into a preset number of lines based on the page layout and the print head precision of the printing device. The complete page print data corresponding to the previous page print data is also split into a preset number of lines based on the page layout and the print head precision of the printing device. Assuming the preset number of lines is 500, the data from lines 410 to 425 in the 500 lines obtained from splitting the current page print data are different from the data from lines 410 to 425 in the 500 lines obtained from splitting the complete page print data corresponding to the previous page print data. The data in the remaining lines are exactly the same. Therefore, the data from lines 410 to 425 in the 500 lines obtained from splitting the current page print data is the target difference print data.

[0058] Understandably, if the previous page of printed data contains all the data from a page to be printed, then the complete page of printed data corresponding to the previous page is the previous page of printed data itself. If the previous page of printed data contains only a portion of the data from a page to be printed, then the complete page of printed data corresponding to the previous page is determined by both the previous page of printed data and the page of printed data preceding it.

[0059] In some embodiments, after the printing device stores the previous page of print data, the printing device processes the previous page of print data. After all the previous page of print data has been printed, or after a preset time has elapsed since the printing time of the target row of print data in the previous page of print data has elapsed, the printing device can send a data preparation instruction to the client. After receiving the data preparation instruction, the client obtains the current page of print data, determines the target difference print data between the current page of print data and the complete page of print data corresponding to the previous page of print data, and further sends the target difference print data to the printing device.

[0060] In some other embodiments, after the client sends the previous page print data to the printing device, the client can obtain the current page print data, determine the target difference print data between the current page print data and the complete page print data corresponding to the previous page print data in the current page print data, and further, the client directly sends the target difference print data to the printing device.

[0061] Optionally, the previous page of print data obtained by the printing device from the client can be multi-line data obtained by the client after splitting the data according to the print head resolution of the printing device. When splitting the data, the client first determines the print head resolution and print width, then calculates the number of dots that can be printed per line based on these parameters. Finally, the entire page of data to be printed is split into multiple lines according to the number of dots that can be printed per line. Here, print head resolution refers to the resolution of the printing device, used to express the number of dots that the print head can print per inch; print width refers to the maximum width that the printing device can print per line, usually measured in millimeters or inches.

[0062] S203, determine the data storage area for the target difference print data, store the target difference print data in the data storage area, determine the target print data based on the target difference print data, and perform print processing on the target print data.

[0063] The data storage area may include at least one of a complete data cache area and a partial data cache area.

[0064] In some embodiments, the printing device can receive target difference print data sent by the client. The printing device can determine the data storage area for the target difference print data based on its data type. When the target difference print data is of a complete data type, the printing device can store the target difference print data in the complete data cache area if it determines that the complete data cache area is idle. Then, it reads the latest print data from the complete data cache area for printing. The latest print data read from the complete data cache area is the target print data; that is, when the target difference print data is of a complete data type, the target print data is the target difference data. When the target difference print data is of a non-complete data type, the printing device can store the target difference print data in a partial data cache area. If it determines that the complete data cache area is idle, the printing device can determine the target storage location of the target difference print data in the complete data cache area, copy the target difference print data to the target storage location, and then read all print data from the complete data cache area to obtain the latest print data for printing. In this case, all print data in the complete data cache area is the target print data; that is, when the target difference print data is of a non-complete data type, the target difference data is a portion of the target print data.

[0065] It's understandable that a fully loaded data buffer being idle means that there is no unprinted data in the printing device; that is, all the printed data stored in the printing device has been printed. Only when the fully loaded data buffer is idle can new data be written to it. At this point, the printing device can store data that needs to be stored in the fully loaded data storage area.

[0066] In the data printing method provided in this application embodiment, the printing device acquires and stores the previous page's print data. The client determines the target difference print data corresponding to the current page's print data and the previous page's print data from the current page's print data. The printing device determines the data storage area for the target difference print data, stores the target difference print data in the data storage area, determines the target print data based on the target difference print data, and performs printing processing on the target print data. Therefore, by having the client determine the target difference print data corresponding to the print data of adjacent pages, the printing device only needs to receive the target difference print data and not the current page's print data. This reduces the amount of print data acquired by the printing device during the printing process, avoids the problem of frequent pauses and waiting for print data during a single printing process, and enables the printing device to print continuously and stably, improving the printing device's working efficiency.

[0067] Please refer to Figure 3, which provides a flowchart of another data printing method according to an embodiment of this application.

[0068] Specifically, the data printing method includes:

[0069] S301, retrieve the previous page print data and store the previous page print data.

[0070] S302, determine the target difference print data between the current page print data and the previous page print data in the current page print data.

[0071] Specifically, the implementation methods of S301 and S302 can be found in the description of the relevant parts in the embodiment shown in Figure 2, and will not be described in detail here.

[0072] S303, obtain the target printing instruction corresponding to the target difference printing data.

[0073] In some embodiments, where the previous page print data and the target difference print data are obtained by the printing device from the client, the printing device may also obtain the target print instruction from the client. After determining the target difference print data, the client can generate the target print instruction and send it to the printing device. Specifically, the target print instruction may include print parameters related to the target difference print data. These parameters may include, but are not limited to, print width, print height, and data type. Print width and print height refer to the width and height occupied on the print page after the current page print data is printed using the target difference data. The data type indicates whether the target difference print data is of a complete or incomplete data type.

[0074] S304, if the target difference print data is determined to be of the data integrity type based on the target print instruction, then the integrity data cache area is determined as the data storage area for the target difference print data.

[0075] Understandably, the complete data buffer area is a buffer area specifically configured in the printing device to store all the print data for a single sheet. After the printing device determines that the target difference print data is of the complete data type, it designates the complete data buffer area as the data storage area for the target difference print data.

[0076] S305, if the target difference print data is determined to be of incomplete data type based on the target print instruction, then the partial data cache area is determined as the data storage area for the target difference print data.

[0077] It is understandable that a partial data buffer area is a portion of the printed data specifically configured in the printing device to store at least one sheet of paper. The storage capacity of the partial data buffer area can be equal to the storage capacity of the full data buffer area, or it can be greater than or less than the storage capacity of the full data buffer area.

[0078] For example, a print job requires printing 3 pages. The print data of the 2nd page differs from that of the 1st page, and the print data of the 3rd page differs from that of the 2nd page. The first difference in print data between the 2nd page and the 1st page can be identified from the print data of the 2nd page, and the second difference in print data between the 3rd page and the 2nd page can be identified from the print data of the 3rd page. The storage capacity of a partial data cache area is sufficient to store the first and second difference print data.

[0079] Specifically, after the printing device determines that the target difference print data is of the incomplete data type, the printing device determines a partial data cache area as the data storage area for the target difference print data.

[0080] S306, store the target difference print data to the data storage area.

[0081] Specifically, when the target difference print data is of the data complete type, the printing device, after determining that the complete buffer area is in an idle state, retrieves all single-line data and their corresponding line number identifiers from the target difference print data. It then determines the row storage location corresponding to each line number identifier within the complete data buffer area and stores the single-line data corresponding to each line number identifier in that location. It can be understood that an idle complete buffer area means that there is no unprinted print data in the printing device; that is, all the print data stored in the printing device has been printed.

[0082] When the target difference print data is of incomplete data type, the printing device obtains all single-line data and the corresponding line number identifiers from the target difference print data, stores the line number identifiers and single-line data in a one-to-one correspondence in the partial data cache area, and records the storage address of these single-line data in the partial data cache area.

[0083] It is understood that the data storage area includes at least one of a complete data buffer area and a partial data buffer area. The complete data buffer area stores all the printing data for a single sheet, while the partial data buffer area stores partial printing data for at least one sheet. Specifically, the complete data buffer area can be configured such that its starting buffer position corresponds to the end position along the length of the paper, and its ending buffer position corresponds to the end position along the length of the paper. Thus, during the printing process, as the printing device reads printing data starting from the starting buffer position of the complete data buffer area, the printing position of the data can proceed from the end position along the length of the paper to the end position, ensuring that the content printed on the paper conforms to the user's reading habits.

[0084] S307, determine the target print data based on the target difference print data, determine the number of reprints corresponding to the target difference print data from the target print instruction, and perform reprint processing on the target print data according to the number of reprints.

[0085] In some embodiments, where the previous page print data and the target difference print data are obtained by the printing device from the client, the print parameters in the target print instruction obtained by the printing device from the client may also include the number of reprints corresponding to the target difference print data. The number of reprints refers to the number of times the current page print data, including the target difference print data, is reprinted. When the target difference print data is the current page print data, all print data is read from the complete data cache area, and all print data in the complete data cache area is used as the target print data. The printing device then performs reprint processing on the target print data according to the number of reprints. When the target difference print data is a portion of the current page print data, the printing device needs to copy the target difference print data from the partial data cache area to the corresponding position in the complete data cache area. The printing device then reads all print data from the complete data cache area, and all print data in the complete data cache area is used as the target print data. The printing device then performs reprint processing on the target print data according to the number of reprints.

[0086] In the data printing method provided in this application embodiment, the printing device acquires and stores the previous page print data. The client determines the target difference print data corresponding to the current page print data and the previous page print data in the current page print data. The printing device acquires the target print instruction corresponding to the target difference print data. If the target difference print data is determined to be of the data integrity type based on the target print instruction, the integrity data cache area is determined as the data storage area of ​​the target difference print data. If the target difference print data is determined to be of the data incomplete type based on the target print instruction, the partial data cache area is determined as the data storage area of ​​the target difference print data. The target difference print data is stored in the data storage area. The target print data is determined based on the target difference print data. The number of reprints corresponding to the target difference print data is determined from the target print instruction. The target print data is then reprinted according to the number of reprints. Therefore, by determining the target difference print data corresponding to the print data of adjacent pages through the client, and generating the target print command through the client, the printing device only needs to receive the target difference print data and does not need to receive the current page print data or the duplicate print data. This not only greatly reduces the amount of print data acquired by the printing device during the printing process, avoiding the problem of the printing device frequently pausing and waiting for print data during a single printing process, but also saves the time of the printing device in determining the data storage area of ​​the target difference print data, further improving the working efficiency of the printing device.

[0087] Please refer to Figure 4, which provides a flowchart of another data printing method according to an embodiment of this application.

[0088] Specifically, the data printing method includes:

[0089] S401, retrieve the previous page print data and store the previous page print data.

[0090] Specifically, the implementation of S401 can be found in the description of the relevant parts in the embodiment shown in Figure 2, and will not be detailed here.

[0091] S402, perform line-by-line data comparison between the current page print data and the previous page print data to obtain the target difference print data.

[0092] In some embodiments, where the previous page print data is all the data of a certain page to be printed, after the client sends the previous page print data to the printing device, it can determine the current page print data following the previous page print data according to the printing order, generate a target image of a preset format from the current page print data, split the target image into rows to obtain multiple rows of data corresponding to the current page print data, and perform row-by-row comparison processing between the multiple rows of data corresponding to the current page print data and the multiple rows of data corresponding to the previous page print data to obtain the target difference print data. Understandably, the multi-line data corresponding to the current page print data is the preset number of lines, and the multi-line data corresponding to the previous page print data is also the preset number of lines. For example, if the preset number of lines is 500, after line-by-line data comparison, it is confirmed that the data from lines 480 to 500 in the multi-line data corresponding to the current page print data is different from the data from lines 480 to 500 in the multi-line data corresponding to the previous page print data. Then, the data from lines 480 to 500 in the multi-line data corresponding to the current page print data is determined as the target difference print data. The target difference print data can include the line data with differences and the line number identifier corresponding to the line data.

[0093] Optionally, if the previous page print data is a portion of the data to be printed, after sending the previous page print data to the printing device, the client can determine the current page print data following the complete page print data corresponding to the previous page print data according to the printing order. The current page print data can then generate a preset target image. This target image can be split into rows to obtain multiple rows of data corresponding to the current page print data. These multiple rows of data can then be compared row by row with the multiple rows of data corresponding to the complete page print data to obtain the target difference print data.

[0094] S403, determine the data storage area for the target difference print data, store the target difference print data in the data storage area, determine the target print data based on the target difference print data, and perform print processing on the target print data.

[0095] Specifically, the implementation of S403 can be found in the description of the relevant parts in the embodiment shown in Figure 2, and will not be detailed here.

[0096] In the data printing method provided in this application embodiment, the printing device acquires and stores the previous page's print data. The client performs line-by-line data comparison processing between the current page's print data and the previous page's print data to obtain target difference print data. The printing device determines the data storage area for the target difference print data, stores the target difference print data in the data storage area, determines the target print data based on the target difference print data, and performs printing processing on the target print data. Therefore, by performing line-by-line data comparison processing between the current page's print data and the previous page's print data, the client can accurately determine the target difference print data, enabling the accurate target difference print data to be sent to the printing device. This reduces the amount of print data acquired by the printing device while ensuring the accuracy of the printed data.

[0097] Please refer to Figure 5, which provides a flowchart of another data printing method according to an embodiment of this application.

[0098] Specifically, the data printing method includes:

[0099] S501, retrieve the previous page print data and store the previous page print data.

[0100] S502, determine the target difference print data between the current page print data and the previous page print data in the current page print data.

[0101] S503, Determine the data storage area for the target difference print data.

[0102] Specifically, the implementation methods of S501-S503 can be found in the description of the relevant parts in the embodiment shown in Figure 2, and will not be elaborated here.

[0103] S504, if the target difference print data is of incomplete data type, store the target difference print data in the partial data cache area, determine the target storage location of the target difference print data in the complete data cache area, copy the target difference print data to the target storage location to obtain the first target print data in the complete data cache area, and perform printing processing on the first target print data.

[0104] In some embodiments, when the target difference print data is of an incomplete data type, the printing device stores the target difference print data in a partial data cache area. When the printing device determines that the complete data cache area is idle, it determines the target storage location of the target difference print data in the complete data cache area, copies the target difference print data to the target storage location to obtain the first target print data in the complete data cache area, and performs printing processing on the first target print data.

[0105] Specifically, the process involves determining the target storage location of the target difference print data within the complete data cache area, copying the target difference print data to the target storage location to obtain the first target print data in the complete data cache area, and then printing the first target print data. This process may include:

[0106] In the target difference print data, determine at least one line of difference print data and the corresponding line number identifier. In the complete data cache area, determine the target storage location indicated by the line number identifier. Use at least one line of difference print data to overwrite and update the data in the target storage location to obtain the first target print data in the complete data cache area. Start reading the first target print data from the starting cache position in the complete data cache area and start printing.

[0107] S505, if the target difference print data is of the data complete type, after all the stored print data has been printed, the target difference print data is stored in the complete data cache area to obtain the second target print data, and the second target print data is printed.

[0108] In some embodiments, when the target difference print data is of the data integrity type, the printing device first determines whether there is any stored print data that has not been printed completely. If there is stored print data that has not been printed completely, the printing device sends a no-memory instruction to the client to inform the client that the printing device does not currently have memory to store the target difference print data and to instruct the client to send the target difference print data to the printing device only when it receives a memory instruction. If there is no stored print data that has not been printed completely, that is, all stored print data has been printed completely, then the target difference print data is stored in the complete data buffer area to obtain the second target print data, and the second target print data is printed.

[0109] Specifically, the process of storing the target difference print data into the complete data cache area to obtain the second target print data, and then printing the second target print data, may include:

[0110] In the target difference print data, determine at least one line of difference print data and the corresponding line number identifier of at least one line of difference print data. Write at least one line of difference print data to the storage location indicated by the line number identifier in the complete data cache area to obtain the second target print data in the complete data cache area. Start reading the second target print data from the starting cache position in the complete data cache area and start printing.

[0111] In the data printing method provided in this application embodiment, the printing device acquires and stores the previous page's print data. The client determines the target difference print data corresponding to the previous page's print data from the current page's print data. If the target difference print data is of incomplete data type, the printing device stores the target difference print data in a partial data cache area, determines the target storage location of the target difference print data in the complete data cache area, copies the target difference print data to the target storage location to obtain the first target print data in the complete data cache area, and prints the first target print data. If the target difference print data is of complete data type, the printing device stores the target difference print data in the complete data cache area after all stored print data has been printed to obtain the second target print data, and prints the second target print data. Therefore, by configuring different storage areas in the printing device to store target difference print data of different data types sent by the client, the amount of print data received by the printing device can be reduced while ensuring that the printing device can accurately reconstruct the current page's print data based on the target difference print data, thus guaranteeing the accuracy of data printing.

[0112] Please refer to Figure 6, which provides a flowchart of another data printing method according to an embodiment of this application.

[0113] Specifically, the data printing method includes:

[0114] S601, retrieve the previous page print data, and determine whether the previous page print data is the first page print data.

[0115] The first page print data can be understood as the first page of print data received by the printing device in this print job. Specifically, the first page print data can be the first page of all data to be printed in this print job, arranged in the order of printing.

[0116] In some embodiments, after the printing device obtains the previous page print data from the client, the printing device can determine whether other page print data was received before receiving the previous page print data after the current print job was started, in order to determine whether the previous page print data is the first page print data. If no other page print data was received before receiving the previous page print data after the current print job was started, then the previous page print data can be determined to be the first page print data. If other page print data was received before receiving the previous page print data after the current print job was started, then the previous page print data can be determined not to be the first page print data.

[0117] S602, if the previous page print data is the first page print data, then store the previous page print data in the complete data cache area.

[0118] In some embodiments, after determining that the previous page print data is the first page print data, the printing device can obtain multiple lines of data and the line number identifier corresponding to each line of data from the previous page print data, obtain the start cache position and end cache position of the complete data cache area, and store each line of data corresponding to the line number identifier sequentially from the start cache position until the last line of data is stored at the end cache position, thus completing the storage process of the previous page print data.

[0119] S603, if the previous page print data is not the first page print data, then determine the reference data type corresponding to the previous page print data, determine the reference data storage area of ​​the previous page print data based on the reference data type, and store the previous page print data in the reference data storage area.

[0120] In some embodiments, after determining that the previous page print data is not the first page print data, the printing device can determine the reference data type of the previous page print data based on the print instruction corresponding to the previous page print data received from the client. When the reference data type is determined to be a complete data type, the reference data storage area is determined to be a complete data cache area. Further, if the printing device confirms that the complete data cache area is idle, the previous page print data is stored in the complete data cache area. When the reference data type is determined to be a non-complete data type, the reference data storage area is determined to be a partial data cache area. Further, the printing device directly stores the previous page print data in the partial data cache area and records the storage location of the previous page print data in the partial data cache area so that data can be read from the partial data cache area according to the storage location when printing the previous page print data later.

[0121] S604, determine the target difference print data between the current page print data and the previous page print data in the current page print data.

[0122] S605, determine the data storage area for the target difference print data, store the target difference print data in the data storage area, determine the target print data based on the target difference print data, and perform print processing on the target print data.

[0123] Specifically, the implementation methods of S604 and S605 can be found in the description of the relevant parts in the implementation shown in Figure 2, and will not be elaborated here.

[0124] In the data printing method provided in this application embodiment, the printing device acquires the previous page print data, determines whether the previous page print data is the first page print data, and if the previous page print data is the first page print data, stores the previous page print data in the complete data cache area. If the previous page print data is not the first page print data, determines the reference data type corresponding to the previous page print data, determines the reference data storage area for the previous page print data based on the reference data type, and stores the previous page print data in the reference data storage area. The client determines the target difference print data corresponding to the current page print data and the previous page print data in the current page print data. The printing device determines the data storage area for the target difference print data, stores the target difference print data in the data storage area, determines the target print data based on the target difference print data, and performs printing processing on the target print data. Therefore, by determining whether the previous page print data is the first page print data and then deciding whether to determine the storage area for the previous page print data based on the data type, the printing device can save time in determining the storage area for the previous page print data. This further improves the working efficiency of the printing device by reducing the amount of print data received by the printing device to avoid the problem of the printing device frequently waiting for print data.

[0125] Please refer to Figure 7, which provides a flowchart of another data printing method according to an embodiment of this application.

[0126] Specifically, the data printing method includes:

[0127] S701, retrieve the previous page print data and store the previous page print data.

[0128] Specifically, the implementation of S701 can be found in the description of the relevant parts in the implementation shown in Figure 2, which will not be elaborated here.

[0129] S702, after all the print data on the previous page has been printed, determine the target difference print data between the print data on the current page and the print data on the previous page.

[0130] In some embodiments, after sending the previous page of print data to the printing device, the client can continuously send print completion query commands corresponding to the previous page of print data to the printing device. After the printing device has finished printing all the previous page of print data, the printing device generates a confirmation print completion notification for the latest received print completion query command and sends the confirmation print completion notification to the client to inform the client that the previous page of print data has been completely printed. Once the client knows that the previous page of print data has been completely printed, the client determines the target difference print data between the current page of print data and the previous page of print data from the current page of print data. Specifically, the method by which the client determines the target difference print data from the current page of print data can be found in the description of the relevant parts in the above embodiments, and will not be detailed here.

[0131] In some other embodiments, after the printing device has finished printing all the data on the previous page, it generates a confirmation instruction for the previous page's printing completion and sends this instruction to the client to inform the client that the previous page's printing data has been completely printed. Once the client is aware that the previous page's printing data has been completely printed, it determines the target difference printing data between the current page's printing data and the previous page's printing data within the current page's printing data.

[0132] S703: After a preset time has elapsed since the printing completion time of the target row of the printed data on the previous page, the target difference print data corresponding to the current page print data and the previous page print data is determined in the current page print data.

[0133] The target row print data may refer to a specific number of rows in the previous page print data. This specific number of rows can be set according to the actual application scenario, and this application embodiment does not impose any specific restrictions on it.

[0134] The preset duration can be set according to the actual application scenario, and this application embodiment does not impose specific limitations on it.

[0135] In some embodiments, after the client sends the previous page of print data to the printing device, the client can continuously send data comparison query commands to the printing device. After the printing device confirms that the printing completion time of the target row of print data in the previous page has elapsed for a preset period, the printing device generates a confirmation notification for the latest received data comparison query command. The printing device sends the confirmation notification to the client to inform the client that the previous page of print data can be compared, meaning the client can begin the operation of determining the target difference print data corresponding to the current page of print data and the previous page of print data. Specifically, the method by which the client determines the target difference print data in the current page of print data can be found in the description of the relevant parts in the above embodiments, and will not be detailed here.

[0136] In some other embodiments, after the printing device confirms that the printing completion time of the target row of the previous page's printed data has elapsed for a preset period, the printing device generates a confirmation instruction to start data comparison. The printing device then sends the confirmation instruction to the client to inform the client that data comparison can be started, meaning the client can begin the operation of determining the target difference printed data between the current page's printed data and the previous page's printed data.

[0137] S704, determine the data storage area for the target difference print data, store the target difference print data in the data storage area, determine the target print data based on the target difference print data, and perform print processing on the target print data.

[0138] For details on the implementation of S704, please refer to the description of the relevant parts in the implementation shown in Figure 2, which will not be elaborated here.

[0139] In the data printing method provided in this application embodiment, the printing device acquires and stores the previous page's print data. After the previous page's print data is completely printed, the client determines the target difference print data corresponding to the previous page's print data in the current page's print data. Alternatively, after a preset time has elapsed since the target row's print data in the previous page was completed, the client determines the target difference print data corresponding to the previous page's print data in the current page's print data. The printing device determines the data storage area for the target difference print data, stores the target difference print data in the data storage area, determines the target print data based on the target difference print data, and performs printing processing on the target print data. Therefore, by determining the target difference print data only after the previous page's print data is completely printed, the client can ensure that the target difference print data only needs to be sent to the printing device once for successful reception and storage by the printing device. By determining the target difference print data after a preset time has elapsed since the target row print data in the previous page was completed, the client can ensure that the target difference print data is prepared as quickly as possible and sent to the printing device as soon as possible. This reduces the waiting time for the printing device to receive the target difference print data, thereby optimizing the working efficiency of the printing device by reducing the amount of print data received and shortening the transmission time of the print data received by the printing device.

[0140] Please refer to Figure 8, which provides a flowchart of another data printing method according to an embodiment of this application.

[0141] Specifically, the data printing method includes:

[0142] S801, obtain the data to be printed corresponding to the target print job.

[0143] In some embodiments, step S801 can be performed by the client. After receiving the target print job initiated by the user, the client can obtain the print data of all pages selected for printing in the target print job and determine the print data of all pages as the print data to be printed.

[0144] S802, determine similar print data in the data to be printed, and determine the target printing order based on the similar print data.

[0145] In some embodiments, step S802 can be performed by the client. The client performs similar data detection on the data to be printed, identifies at least one set of similar page printing data in the data to be printed, sets a continuous printing order for the page printing data in each set of similar page printing data, and sets the printing order of the page printing data in the data to be printed other than the similar page printing data before the continuous printing order, or sets the printing order of the page printing data in the data to be printed other than the similar page printing data after the continuous printing order, thereby obtaining the target printing order. Wherein, the similarity between any two page printing data in each set of similar page printing data is greater than a preset similarity threshold.

[0146] S803, determine the initial printing order corresponding to the data to be printed, and determine the target printing order based on the initial printing order.

[0147] In some embodiments, step S803 can be performed by the client. The client obtains the initial print order corresponding to the data to be printed from the original file where the data to be printed is located. The initial print order can be understood as the page order of the data to be printed in the original file. The client can set the initial print order as the target print order.

[0148] S804 retrieves and stores the previous page's print data.

[0149] Specifically, the client can retrieve the previous page's print data according to the target printing order, and send the previous page's print order to the printing device so that the printing device can obtain the previous page's print data. The implementation method for the printing device to store the previous page's print data can be found in the description of the relevant parts in Figure 2, and will not be detailed here.

[0150] S805 retrieves the current page print data corresponding to the previous page print data according to the target print order.

[0151] In some embodiments, step S805 can be performed by the client. After sending the previous page print data to the printing device, the client can determine the first print sequence number of the previous page print data in the target printing order, determine the second print sequence number that is adjacent to and after the first print sequence number, and obtain the current page print data corresponding to the second print sequence number.

[0152] S806, determine the target difference print data between the current page print data and the previous page print data in the current page print data.

[0153] S807, determine the data storage area for the target difference print data, store the target difference print data in the data storage area, determine the target print data based on the target difference print data, and perform print processing on the target print data.

[0154] Specifically, the implementation methods of S806 and S807 can be found in the description of the relevant parts in the implementation shown in Figure 2, and will not be elaborated here.

[0155] In the data printing method provided in this application embodiment, the client obtains the data to be printed corresponding to the target printing task, determines similar printing data in the data to be printed, and determines the target printing order based on the similar printing data; alternatively, the client determines the initial printing order corresponding to the data to be printed and determines the target printing order based on the initial printing order. The printing device obtains and stores the previous page printing data. The client obtains the current page printing data corresponding to the previous page printing data according to the target printing order, and determines the target difference printing data corresponding to the current page printing data and the previous page printing data in the current page printing data. The printing device determines the data storage area for the target difference printing data, stores the target difference printing data in the data storage area, determines the target printing data based on the target difference printing data, and performs printing processing on the target printing data. Therefore, by determining the target printing order through similar printing data, the client can optimize the printing order of the data to be printed, and thus the client sends the printing data to the printing device according to the optimized printing order, thereby improving the printing efficiency of the printing device.

[0156] The data printing apparatus provided in the embodiments of this application will now be described in detail with reference to FIG. 9. It should be noted that the data printing apparatus shown in FIG. 9 is used to execute the methods of the embodiments shown in FIG. 2 to FIG. 8 of this application. For ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the embodiments shown in FIG. 2 to FIG. 8 of this application.

[0157] Please refer to Figure 9, which shows a schematic diagram of the structure of a data printing device according to an embodiment of this application. This data printing device 1 can be implemented as all or part of a device through software, hardware, or a combination of both. According to some embodiments, the data printing device 1 includes a first printing processing module 11, a second printing processing module 12, and a third printing processing module 13, specifically used for:

[0158] The first printing processing module 11 is used to obtain the previous page printing data and store the previous page printing data;

[0159] The second printing processing module 12 is used to determine the target difference printing data between the current page printing data and the previous page printing data in the current page printing data;

[0160] The third printing processing module 13 is used to determine the data storage area of ​​the target difference printing data, store the target difference printing data in the data storage area, determine the target printing data based on the target difference printing data, and perform printing processing on the target printing data.

[0161] Optionally, the third print processing module 13 includes:

[0162] A print instruction acquisition unit is used to acquire the target print instruction corresponding to the target difference print data;

[0163] The first storage processing unit is configured to determine the complete data cache area as the data storage area of ​​the target difference print data if the target difference print data is determined to be of the data integrity type based on the target print instruction.

[0164] The second storage processing unit is configured to determine a partial data cache area as the data storage area for the target difference print data if the target difference print data is determined to be of an incomplete data type based on the target print instruction.

[0165] Optionally, the third print processing module 13 includes:

[0166] The reprint processing unit is used to determine the number of reprints corresponding to the target difference print data from the target print instruction, and to perform reprint processing on the target print data according to the number of reprints.

[0167] Optionally, the second printing processing module 12 includes:

[0168] The print data comparison unit is used to perform line-by-line data comparison processing between the print data of the current page and the print data of the previous page to obtain the target difference print data.

[0169] Optionally, the third print processing module 13 includes:

[0170] The first printing processing unit is configured to, if the target difference printing data is of an incomplete data type, store the target difference printing data in a partial data cache area, determine the target storage location of the target difference printing data in the complete data cache area, copy the target difference printing data to the target storage location to obtain the first target printing data in the complete data cache area, and perform printing processing on the first target printing data;

[0171] The second printing processing unit is used to, if the target difference printing data is of the data integrity type, store the target difference printing data in the integrity data cache area after all the stored printing data has been printed to obtain the second target printing data, and then perform printing processing on the second target printing data.

[0172] Optionally, the first printing processing unit is specifically used for:

[0173] In the target difference print data, at least one line of difference print data and the corresponding line number identifier are determined. In the complete data cache area, the target storage location indicated by the line number identifier is determined. The data at the target storage location is overwritten and updated using the at least one line of difference print data to obtain the first target print data in the complete data cache area. The first target print data is read from the starting cache position in the complete data cache area and printing is started.

[0174] Optionally, a second printing processing unit is specifically used for:

[0175] In the target difference print data, at least one line of difference print data and the corresponding line number identifier are determined. The at least one line of difference print data is written into the storage location indicated by the line number identifier in the complete data cache area to obtain the second target print data in the complete data cache area. The second target print data is read from the starting cache position in the complete data cache area and printing is started.

[0176] Optionally, the first printing processing module 11 includes:

[0177] The homepage data judgment unit is used to obtain the previous page print data and determine whether the previous page print data is the homepage print data;

[0178] The first data storage unit is used to store the previous page print data in the complete data cache area if the previous page print data is the first page print data;

[0179] The second data storage unit is used to determine the reference data type corresponding to the previous page print data if the previous page print data is not the first page print data, determine the reference data storage area of ​​the previous page print data based on the reference data type, and store the previous page print data in the reference data storage area.

[0180] Optionally, the second printing processing module 12 includes:

[0181] The first data comparison unit is configured to, after all the printed data on the previous page has been printed, determine the target difference printed data between the current page printed data and the previous page printed data in the current page printed data; or,

[0182] The second data comparison unit is used to determine the target difference print data between the current page print data and the previous page print data after a preset time has elapsed since the printing completion time of the target row print data in the previous page print data.

[0183] Optionally, the data printing device 1 also includes:

[0184] The print data acquisition module is used to acquire the data to be printed corresponding to the target print task;

[0185] The printing order determination module is used to determine similar printing data in the data to be printed, and determine a target printing order based on the similar printing data; or, to determine the initial printing order corresponding to the data to be printed, and determine a target printing order based on the initial printing order.

[0186] Optionally, the second printing processing module 12 also includes:

[0187] The print data acquisition unit is used to acquire the current page print data corresponding to the previous page print data according to the target print order.

[0188] Optionally, the data storage area includes at least one of a complete data cache area and a partial data cache area, wherein the complete data cache area is used to store all the printing data of a single sheet, the starting cache position of the complete data cache area corresponds to the end position of the paper in the length direction, the ending cache position of the complete data cache area corresponds to the tail position of the paper in the length direction, and the partial data cache area is used to store partial printing data of at least one sheet.

[0189] The data printing apparatus provided in this application embodiment acquires and stores the previous page's print data. It then determines the target difference print data corresponding to the previous page's print data within the current page's print data, identifies a data storage area for the target difference print data, stores the target difference print data in the data storage area, determines the target print data based on the target difference print data, and performs printing processing on the target print data. Therefore, by determining the target difference print data corresponding to adjacent pages' print data, the amount of print data acquired by the printing device during the printing process can be reduced. This avoids the problem of frequent pauses and waiting for print data during a single printing process, enabling the printing device to print continuously and stably, thus improving the printing device's working efficiency.

[0190] Please refer to Figure 10, which is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Exemplarily, the electronic device in this embodiment can specifically be a client or a server, and the electronic device may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 can be connected via the bus 150.

[0191] Processor 110 may include one or more processing cores. Processor 110 connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 120, and by calling data stored in memory 120. Optionally, processor 110 may be implemented using at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). Processor 110 may integrate one or more of a central processing unit (CPU), graphics processing unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 110 and may be implemented separately using a communication chip.

[0192] The memory 120 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 120 may include non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described below, etc. The operating system may be the Android system, including systems deeply developed based on the Android system, the iOS system developed by Apple Inc., including systems deeply developed based on the iOS system, or other systems.

[0193] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to establish data communication between the third-party applications and the operating system. This would allow the operating system to obtain the current scenario information of the third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.

[0194] The input device 130 is used to receive input instructions or data, and includes, but is not limited to, a keyboard, mouse, camera, microphone, or touch device. The output device 140 is used to output instructions or data, and includes, but is not limited to, a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 can be a touch display screen.

[0195] The touch display screen can be designed as a full-screen, curved screen, or irregularly shaped screen. It can also be designed as a combination of a full-screen and a curved screen, or a combination of an irregularly shaped screen and a curved screen; however, this application does not limit the specific design of the touch display screen.

[0196] In addition, those skilled in the art will understand that the structure of the electronic device shown in the above figures does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device may also include radio frequency circuits, input units, sensors, audio circuits, Wireless Fidelity (WiFi) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.

[0197] In some embodiments, when the electronic device shown in FIG10 is a client, the processor 110 can be used to call a program of a data printing method stored in the memory 120, and specifically perform the following operations:

[0198] Retrieve the previous page print data and store the previous page print data;

[0199] Determine the target difference print data between the current page print data and the previous page print data from the current page print data;

[0200] Determine the data storage area for the target difference print data, store the target difference print data in the data storage area, determine the target print data based on the target difference print data, and perform printing processing on the target print data.

[0201] Optionally, when performing the step of determining the data storage area of ​​the target difference print data, the processor 110 specifically performs the following operations:

[0202] Obtain the target printing instruction corresponding to the target difference printing data;

[0203] If the target difference print data is determined to be of the data integrity type based on the target print instruction, then the integrity data cache area is determined as the data storage area of ​​the target difference print data;

[0204] If the target difference print data is determined to be of incomplete data type based on the target print instruction, then a partial data cache area is determined as the data storage area for the target difference print data.

[0205] Optionally, when performing the step of printing the target print data, the processor 110 specifically performs the following operations:

[0206] The number of reprints corresponding to the target difference print data is determined from the target print instruction, and the target print data is reprinted according to the number of reprints.

[0207] Optionally, when the processor 110 performs the step of determining the target difference print data corresponding to the current page print data and the previous page print data in the current page print data, it specifically performs the following operations:

[0208] The current page print data is compared line by line with the previous page print data to obtain the target difference print data.

[0209] Optionally, when the processor 110 performs the steps of storing the target difference print data in the data storage area and printing the target difference print data, it specifically performs the following operations:

[0210] If the target difference print data is of incomplete data type, the target difference print data is stored in a partial data cache area, the target storage location of the target difference print data in the complete data cache area is determined, the target difference print data is copied to the target storage location to obtain the first target print data in the complete data cache area, and the first target print data is printed.

[0211] If the target difference print data is of the data complete type, then after all the stored print data has been printed, the target difference print data is stored in the complete data cache area to obtain the second target print data, and the second target print data is then printed.

[0212] Optionally, when the processor 110 executes the steps of determining the target storage location of the target difference print data in the complete data cache area, copying the target difference print data to the target storage location to obtain the first target print data in the complete data cache area, and performing print processing on the first target print data, the processor 110 specifically performs the following operations:

[0213] In the target difference print data, at least one line of difference print data and the corresponding line number identifier are determined. In the complete data cache area, the target storage location indicated by the line number identifier is determined. The data at the target storage location is overwritten and updated using the at least one line of difference print data to obtain the first target print data in the complete data cache area. The first target print data is read from the starting cache position in the complete data cache area and printing is started.

[0214] Optionally, when the processor 110 performs the step of storing the target difference print data into the complete data buffer area to obtain the second target print data, and then performing print processing on the second target print data, the processor 110 specifically performs the following operations:

[0215] In the target difference print data, at least one line of difference print data and the corresponding line number identifier are determined. The at least one line of difference print data is written into the storage location indicated by the line number identifier in the complete data cache area to obtain the second target print data in the complete data cache area. The second target print data is read from the starting cache position in the complete data cache area and printing is started.

[0216] Optionally, when the processor 110 performs the step of obtaining and storing the previous page print data, it specifically performs the following operations:

[0217] Obtain the previous page print data and determine whether the previous page print data is the first page print data;

[0218] If the previous page print data is the first page print data, then the previous page print data is stored in the complete data cache area;

[0219] If the previous page print data is not the first page print data, then the reference data type corresponding to the previous page print data is determined, the reference data storage area of ​​the previous page print data is determined based on the reference data type, and the previous page print data is stored in the reference data storage area.

[0220] Optionally, when the processor 110 performs the step of determining the target difference print data corresponding to the current page print data and the previous page print data in the current page print data, it specifically performs the following operations:

[0221] After all the data on the previous page has been printed, determine the target difference print data between the current page print data and the previous page print data in the current page print data; or,

[0222] After a preset time has elapsed since the printing completion time of the target row of the printed data on the previous page, the target difference print data corresponding to the current page print data and the previous page print data is determined in the current page print data.

[0223] Optionally, before performing the steps of obtaining and storing the previous page print data, the processor 110 also performs the following operations:

[0224] Retrieve the data to be printed corresponding to the target print job;

[0225] Identify similar printable data in the data to be printed, and determine the target print order based on the similar printable data; or, determine the initial print order corresponding to the data to be printed, and determine the target print order based on the initial print order.

[0226] Optionally, before executing the step of determining the target difference print data corresponding to the current page print data and the previous page print data in the current page print data, the processor 110 further performs the following operations:

[0227] Obtain the current page print data corresponding to the previous page print data according to the target print order.

[0228] Optionally, when the processor 110 executes the data printing method, the data storage area includes at least one of a complete data cache area and a partial data cache area, wherein the complete data cache area is used to store all the printing data of a single paper, the starting cache position of the complete data cache area corresponds to the end position of the paper in the length direction, the ending cache position of the complete data cache area corresponds to the tail position of the paper in the length direction, and the partial data cache area is used to store partial printing data of at least one paper.

[0229] This application also provides a computer-readable storage medium storing at least one instruction that is executed by a processor to implement the data printing method as described in the above embodiments.

[0230] This application also provides a computer program product that stores at least one instruction, which is loaded and executed by the processor to implement the data printing method described in the above embodiments.

[0231] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0232] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data printing method, wherein, The method includes: Retrieve the previous page print data and store the previous page print data; Determine the target difference print data between the current page print data and the previous page print data from the current page print data; Determine the data storage area for the target difference print data, store the target difference print data in the data storage area, determine the target print data based on the target difference print data, and perform printing processing on the target print data.

2. The method according to claim 1, wherein, Determining the data storage area for the target difference print data includes: Obtain the target printing instruction corresponding to the target difference printing data; If the target difference print data is determined to be of the data integrity type based on the target print instruction, then the integrity data cache area is determined as the data storage area of ​​the target difference print data; If the target difference print data is determined to be of incomplete data type based on the target print instruction, then a partial data cache area is determined as the data storage area for the target difference print data.

3. The method according to claim 2, wherein, The printing process of the target print data includes: The number of reprints corresponding to the target difference print data is determined from the target print instruction, and the target print data is reprinted according to the number of reprints.

4. The method according to claim 1, wherein, The step of determining the target difference print data between the current page print data and the previous page print data in the current page print data includes: The current page print data is compared line by line with the previous page print data to obtain the target difference print data.

5. The method according to claim 1, wherein, The step of storing the target difference print data in the data storage area, determining the target print data based on the target difference print data, and printing the target print data includes: If the target difference print data is of incomplete data type, the target difference print data is stored in a partial data cache area, the target storage location of the target difference print data in the complete data cache area is determined, the target difference print data is copied to the target storage location to obtain the first target print data in the complete data cache area, and the first target print data is printed. If the target difference print data is of the data complete type, then after all the stored print data has been printed, the target difference print data is stored in the complete data cache area to obtain the second target print data, and the second target print data is then printed.

6. The method according to claim 5, wherein, The process of determining the target storage location of the target difference print data in the complete data cache area, copying the target difference print data to the target storage location to obtain the first target print data in the complete data cache area, and printing the first target print data includes: In the target difference print data, at least one line of difference print data and the corresponding line number identifier are determined. In the complete data cache area, the target storage location indicated by the line number identifier is determined. The data at the target storage location is overwritten and updated using the at least one line of difference print data to obtain the first target print data in the complete data cache area. The first target print data is read from the starting cache position in the complete data cache area and printing is started.

7. The method according to claim 5, wherein, The step of storing the target difference print data in a complete data cache area to obtain second target print data, and then printing the second target print data, includes: In the target difference print data, at least one line of difference print data and the corresponding line number identifier are determined. The at least one line of difference print data is written into the storage location indicated by the line number identifier in the complete data cache area to obtain the second target print data in the complete data cache area. The second target print data is read from the starting cache position in the complete data cache area and printing is started.

8. The method according to claim 1, wherein, The step of obtaining and storing the previous page print data includes: Obtain the previous page print data and determine whether the previous page print data is the first page print data; If the previous page print data is the first page print data, then the previous page print data is stored in the complete data cache area; If the previous page print data is not the first page print data, then the reference data type corresponding to the previous page print data is determined, the reference data storage area of ​​the previous page print data is determined based on the reference data type, and the previous page print data is stored in the reference data storage area.

9. The method according to claim 1, wherein, The step of determining the target difference print data between the current page print data and the previous page print data in the current page print data includes: After all the data on the previous page has been printed, determine the target difference print data between the current page print data and the previous page print data in the current page print data; or, After a preset time has elapsed since the printing completion time of the target row of the printed data on the previous page, the target difference print data corresponding to the current page print data and the previous page print data is determined in the current page print data.

10. The method according to claim 1, wherein, Before obtaining and storing the previous page print data, the method further includes: Retrieve the data to be printed corresponding to the target print job; Identify similar printable data in the data to be printed, and determine the target print order based on the similar printable data; or, determine the initial print order corresponding to the data to be printed, and determine the target print order based on the initial print order.

11. The method according to claim 10, wherein, Before determining the target difference print data between the current page print data and the previous page print data in the current page print data, the method further includes: Obtain the current page print data corresponding to the previous page print data according to the target print order.

12. The method according to claim 1, wherein, The data storage area includes at least one of a complete data cache area and a partial data cache area. The complete data cache area is used to store all the printing data of a single sheet of paper. The starting cache position of the complete data cache area corresponds to the end position of the paper in the length direction, and the ending cache position of the complete data cache area corresponds to the tail position of the paper in the length direction. The partial data cache area is used to store partial printing data of at least one sheet of paper.

13. A data printing apparatus, wherein, The device includes: The first printing processing module is used to obtain the previous page printing data and store the previous page printing data; The second printing processing module is used to determine the target difference printing data between the current page printing data and the previous page printing data from the current page printing data; The third printing processing module is used to determine the data storage area of ​​the target difference printing data, store the target difference printing data in the data storage area, determine the target printing data based on the target difference printing data, and perform printing processing on the target printing data.

14. A computer storage medium, wherein, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as described in any one of claims 1 to 12.

15. An electronic device, wherein, include: Processor and memory; The memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1 to 12.