Data printing method and device, storage medium and electronic equipment

By determining the difference in print data of adjacent pages in the printing device and receiving only the difference data for printing, the frequent pauses caused by insufficient data is solved, and the printing efficiency is improved.

CN120029568AActive Publication Date: 2025-05-23WUHAN JINGCHEN INTELLIGENT IDENTIFICATION TECH CO LTD

Patent Information

Application Number
CN202510079048.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-23
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

During the printing process, the printer frequently pauses and waits for printing data due to insufficient data issuance speed, which reduces work efficiency.

Method used

By acquiring and storing the previous page print data, the client determines the target differential printing data corresponding to the previous page print data in the current page print data, and the printing device stores the target differential printing data and performs printing processing.

Benefits of technology

The amount of printing data obtained by the printing device during the printing process is reduced, the problem of frequent pause and waiting for printing data is avoided, and the working efficiency of the printing device is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029568A_ABST
    Figure CN120029568A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data printing method and device, a storage medium and electronic equipment, and the method comprises the steps: obtaining printing data of a previous page, storing the printing data of the previous page, determining target difference printing data corresponding to the printing data of the current page and the printing data of the previous page in the printing data of the current page, and determining a data storage area of the target difference printing data, storing the target difference printing data to the data storage area, determining target printing data based on the target difference printing data, and printing the target printing data. Therefore, by determining the target difference printing data corresponding to the printing data of the adjacent pages, the data size of the printing data obtained by the printing equipment in the printing process can be reduced, the problem that the printing equipment frequently pauses to wait for the printing data in the one-time printing process can be avoided, and therefore the printing equipment can continuously and stably conduct printing, and the printing efficiency is improved. And the working efficiency of the printing equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of printing technology, and in particular to a data printing method, device, storage medium and electronic device. Background Art

[0002] In the related art, since different users have different printing requirements for printing content and the printer memory is limited, in order to meet the printing needs of all users, the data to be printed is sent from the user device to the printer via Bluetooth or other means to achieve the function of receiving and printing at the same time.

[0003] During a printing process, users may print multiple pages and send all the printed content of each page to the printer. For some printers with fast printing speed, the printing speed exceeds the data sending speed, so the printer may frequently pause to wait for printing data during a printing process, resulting in low printer efficiency. Therefore, how to improve the working efficiency of the printer is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present application provide a data printing method, device, computer storage medium and electronic device. The technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a data printing method, the method comprising:

[0006] Acquire the previous page of print data, and store the previous page of print data;

[0007] Determining target difference printing data corresponding to the current page printing data and the previous page printing data in the current page printing data;

[0008] A data storage area for the target difference print data is determined, the target difference print data is stored in the data storage area, target print data is determined based on the target difference print data, and print processing is performed on the target print data.

[0009] In a second aspect, an embodiment of the present application provides a data printing device, the device comprising:

[0010] A first printing processing module, used for acquiring the previous page of printing data and storing the previous page of printing data;

[0011] A second printing processing module, configured to determine, in the current page printing data, target difference printing data corresponding to the current page printing data and the previous page printing data;

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

[0013] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium has a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method.

[0014] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a memory and a processor; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the memory and executing the above method.

[0015] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0016] The data printing method provided by the embodiment of the present application obtains the previous page printing data, stores the previous page printing data, 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, determines the data storage area of ​​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 difference printing data corresponding to the printing data of the adjacent pages, the amount of printing data obtained by the printing device during the printing process can be reduced, and the problem of frequent pauses and waiting for printing data in the printing device during a printing process can be avoided, so that the printing device can continuously and stably print, thereby improving the working efficiency of the printing device. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 It is a scenario diagram of a network data printing system provided by an embodiment of the present application;

[0019] Figure 2 It is a flowchart of a data printing method provided in an embodiment of the present application;

[0020] Figure 3 It is a flowchart of another data printing method provided in an embodiment of the present application;

[0021] Figure 4 It is a flowchart of another data printing method provided in an embodiment of the present application;

[0022] Figure 5 It is a flowchart of another data printing method provided in an embodiment of the present application;

[0023] Figure 6 It is a flowchart of another data printing method provided in an embodiment of the present application;

[0024] Figure 7 It is a flowchart of another data printing method provided in an embodiment of the present application;

[0025] Figure 8 It is a flowchart of another data printing method provided in an embodiment of the present application;

[0026] Fig. 9 is a structural schematic diagram of a data printing device provided in an embodiment of the present application;

[0027] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0029] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0030] See also Figure 1 , is a schematic diagram of a scenario of a data printing system provided in an embodiment of the present application. Figure 1 As shown, the data printing system may at least include a client cluster and a printing device 100 .

[0031] In some embodiments, a client cluster may include at least one client, such as Figure 1 As shown, it specifically includes 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.

[0032] Each client in the client cluster may be an electronic device with communication function, including but not limited to: wearable device, handheld device, personal computer, tablet computer, vehicle-mounted device, smart phone, computing device or other processing device connected to a wireless modem, etc. Electronic devices may be called 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 device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), electronic device in 5G network or future evolution network, etc.

[0033] The printing device 100 is an output device for printing digital information on a related medium. Its basic working principle is to control the print head or laser through signal processing, and use ink or toner to form characters or images on the transmitted paper. The printing device 100 may include but is not limited to an inkjet printer, a laser printer, a thermal printer, a dot matrix printer, and a thermal transfer printer. The printing principles of the above different types of printers are as follows: inkjet printers print text and images by spraying liquid ink onto paper; laser printers use laser beams to draw the image or text to be printed on a photosensitive drum, and then adsorb toner (carbon powder) to the image through an electric charge, and finally transfer the toner to the paper and fix it on the paper by heating; thermal printers form images or text by heating a special coating on thermal paper. The thermal paper itself contains heat-reactive substances. When the print head is heated, the coating on the surface of the paper reacts chemically to display patterns or text; dot matrix printers use a print head to print a series of small dots in columns on the paper, and these small dots are combined into letters, numbers and symbols; thermal transfer printers use a thermal belt to transfer toner or ink from a strip material (such as a thermal transfer ribbon) to the paper. The print head heats the ink on the ribbon and transfers it to the target surface to form the printed content.

[0034] In one or more embodiments of the present application, the printing device 100 can establish a communication connection with at least one client in the client cluster, and complete the data interaction in the data printing process based on the communication connection. For example, the printing device obtains the previous page print data 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 of ​​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. Among them, 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.

[0035] It should be noted that the printing device 100 and at least one client in the client cluster establish a communication connection through a network for interactive communication, wherein the network can be a wireless network or a wired network, the wireless network includes but is not limited to a cellular network, a wireless local area network, an infrared network or a Bluetooth network, and the wired network includes but is not limited to an Ethernet, a universal serial bus (USB) or a controller local area network. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data (such as a target compressed package) exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.

[0036] The data printing system embodiment provided in this specification and the data printing method described in one or more embodiments belong to the same concept. The execution subject corresponding to the data printing method involved in one or more embodiments of the specification can be an electronic device, the electronic device can be the above-mentioned printing device 100, and the electronic device can also be the above-mentioned client, which is determined based on the actual application environment. The specific implementation process of the data printing system embodiment can be found in the following method embodiment, which will not be repeated here.

[0037] In one embodiment, Figure 2 As shown, a data printing method is proposed, which can be implemented by a computer program and can be run on a data printing device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.

[0038] Specifically, the data printing method includes:

[0039] S201, obtaining the previous page of print data and storing the previous page of print data.

[0040] The last page print data refers to at least part of the data of a certain page of the multi-page data to be printed corresponding to a certain print task, and the last page print data is data in a specific format that can be recognized and printed by a printing device. For example, the last page print data can be at least part of the data of any page of the multi-page data to be printed corresponding to a certain print task, except for the last page of data. It can be understood that the last page print data can be all the data of a certain page of data to be printed, or the last page print data can also be part of the data of a certain page of data to be printed.

[0041] In some embodiments, the printing device can obtain the last page of print data from the client, and then the printing device stores the last page of print data locally. Specifically, the client can install printing software that communicates, manages and operates with the printing device, the user can trigger a print task in the printing software, the client generates a print instruction corresponding to the print task, and the client sends the last page of print data corresponding to the print task triggered by the user to the printing device based on the print instruction.

[0042] It is understandable that the printing device can be configured with a data cache area for storing printing data of different data types, such as the printing device can be configured with a complete data cache area and a partial data cache area, the complete data cache area can be used to store all the data of a page of data to be printed, and the partial data cache area can be used to store partial data of a page of data to be printed or partial data of multiple pages of data to be printed. If the previous page of printing data is the entire data of a certain page of data to be printed, then the printing device can store the previous page of printing data in the complete data cache area. If the previous page of printing data is partial data of a certain page of data to be printed, then the printing device can store the previous page of printing data in the partial data cache area.

[0043] S202: Determine target difference printing data corresponding to the current page printing data and the previous page printing data in the current page printing data.

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

[0045] The target difference print data refers to the difference print data between two adjacent pages of print data, which can be understood as different data of the two adjacent pages of print data. In the embodiment of the present application, the current page print data and the complete page print data corresponding to the previous page print data are two adjacent pages of print data. By comparing the current page print data with the complete page print data corresponding to the previous page print data, 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 can be obtained, namely, the target difference print data.

[0046] For example, the current page print data is split according to the number of lines determined by the page layout and the print head precision of the printing device to obtain data with a preset number of lines, and the complete page print data corresponding to the previous page print data is split according to the number of lines determined by the page layout and the print head precision of the printing device to obtain data with a preset number of lines. Assuming the preset number of lines is 500, the data from lines 410 to 425 of the 500 lines of data obtained by splitting the current page print data are different from the data from lines 410 to 425 of the 500 lines of data obtained by splitting the complete page print data corresponding to the previous page print data, and the data of the remaining lines are exactly the same. Therefore, the data from lines 410 to 425 of the 500 lines of data obtained by splitting the current page print data are the target difference print data.

[0047] It is understandable that if the previous page print data is all the data of a certain page of data to be printed, then the complete page print data corresponding to the previous page print data is the previous page print data itself. If the previous page print data is part of the data of a certain page of data to be printed, then the complete page print data corresponding to the previous page print data is determined by the previous page print data and the previous page print data corresponding to the previous page print data.

[0048] In some embodiments, after the printing device stores the previous page of print data, the printing device prints the previous page of print data. After the previous page of print data is completely printed, or after the printing completion time of the target row of print data in the previous page of print data exceeds a preset time, 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 in the current page of print data, and further, the client sends the target difference print data to the printing device.

[0049] 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.

[0050] Optionally, the previous page of print data obtained by the printing device from the client may be multiple lines of data obtained after the client performs line data splitting processing according to the print head precision of the printing device. When performing line data splitting processing, the client first determines the print head precision and print width, then calculates the number of dots that can be printed per line according to the print head precision and print width, and then splits the entire page of data to be printed into multiple lines of data according to the number of dots that can be printed per line. Among them, print head precision refers to the resolution of the printing device, which is used to indicate 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 in millimeters or inches.

[0051] S203, determining a data storage area for target difference printing data, storing the target difference printing data in the data storage area, determining target printing data based on the target difference printing data, and performing printing processing on the target printing data.

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

[0053] In some embodiments, a printing device may receive target difference print data sent by a client, and the printing device may determine a data storage area for the target difference print data according to the data type of the target difference print data. When the target difference print data is of a data complete type, the printing device may store the target difference print data in the complete data cache area when it is determined that the complete data cache area is in an idle state, and then read the latest print data from the complete data cache area for printing processing. The latest print data read from the complete data cache area is the target print data, that is, when the target print difference print data is of a data complete type, the target print data is the target print difference data. When the target difference print data is of a data incomplete type, the printing device may store the target difference print data in the partial data cache area, and the printing device may determine a target storage location of the target difference print data in the complete data cache area when it is determined that the complete data cache area is in an idle state, and copy the target difference print data to the target storage location, so as to read all print data in the complete data cache area to obtain the latest print data for printing processing. At this time, all print data in the complete data cache area is the target print data, that is, when the target difference print data is of an incomplete data type, the target print difference data is a part of the target print data.

[0054] It can be understood that the complete data cache area is in an idle state, which means that there is no unprinted print data in the printing device, that is, the print data stored in the printing device has been printed. When the complete data cache area is in an idle state, new data can be written to the complete data cache area, and at this time, the printing device can store the data that needs to be stored in the complete data storage area in the complete data storage area.

[0055] In the data printing method provided in the embodiment of the present application, the printing device obtains the previous page printing data, stores the previous page printing data, the client 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 of ​​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. Thus, the client determines the target difference printing data corresponding to the printing data of the adjacent pages, so that the printing device only needs to receive the target difference printing data instead of the current page printing data, which can reduce the amount of printing data obtained by the printing device during the printing process, and can avoid the problem of frequent pauses of the printing device waiting for printing data during a printing process, so that the printing device can continuously and stably print, thereby improving the working efficiency of the printing device.

[0056] See also Figure 3 , a flow chart of another data printing method is provided for an embodiment of the present application.

[0057] Specifically, the data printing method includes:

[0058] S301, obtaining the previous page of print data and storing the previous page of print data.

[0059] S302: Determine target difference printing data corresponding to the current page printing data and the previous page printing data in the current page printing data.

[0060] For details, the implementation of S301 and S302 can be found in Figure 2 The description of the relevant parts in the illustrated embodiment will not be repeated in detail here.

[0061] S303, obtaining a target printing instruction corresponding to the target difference printing data.

[0062] In some embodiments, in a scenario 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 may generate the target print instruction and send the target print instruction to the printing device. Specifically, the target print instruction may include print parameters related to the target difference print data, and the print parameters may include but are not limited to print width, print height, and data type. The print width and print height refer to the width and height occupied on the printed page after the current page print data is printed out through the target difference data. The data type is used to indicate whether the target difference print data is a data complete type or a data incomplete type.

[0063] S304: If it is determined based on the target printing instruction that the target difference printing data is of a data complete type, a complete data buffer area is determined as a data storage area for the target difference printing data.

[0064] It is understandable that the complete data buffer area is a buffer area specially configured in the printing device for storing all print data of a single paper. After the printing device determines that the target difference print data is of data complete type, the printing device determines the complete data buffer area as the data storage area of ​​the target difference print data.

[0065] S305: If it is determined based on the target printing instruction that the target difference printing data is of an incomplete data type, a partial data buffer area is determined as a data storage area for the target difference printing data.

[0066] It can be understood that the partial data cache area is specially configured in the printing device for storing partial printing data of at least one paper. The storage capacity of the partial data cache area can be equal to the storage capacity of the complete data cache area, and the storage capacity of the partial data cache area can also be greater than or less than the storage capacity of the complete data cache area.

[0067] For example, a printing task needs to print the content of 3 pages, there is a difference between the printing data of the 2nd page and the printing data of the 1st page, there is a difference between the printing data of the 3rd page and the printing data of the 2nd page, the first difference printing data corresponding to the printing data of the 2nd page and the printing data of the 1st page can be determined in the printing data of the 2nd page, the second difference printing data corresponding to the printing data of the 3rd page and the printing data of the 2nd page can be determined in the printing data of the 3rd page, and the storage capacity of the partial data cache area is sufficient to store the first difference printing data and the second difference printing data.

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

[0069] S306, storing the target difference printing data into the data storage area.

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

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

[0072] It can be understood that 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 print data of a single paper, and the partial data cache area is used to store partial print data of at least one paper. Specifically, the complete data cache area can be configured as follows: the starting cache position of the complete data cache area corresponds to the end position in the length direction of the paper, and the ending cache position of the complete data cache area corresponds to the tail position in the length direction of the paper. In this way, in the process of the printing device reading the print data from the starting cache position of the complete data cache area, according to the order of reading, the printing position of the print data can be printed from the end position in the length direction of the paper to the tail position in the length direction of the paper, thereby ensuring that the content printed on the paper conforms to the user's reading habits.

[0073] S307, determining the target printing data based on the target difference printing data, determining the number of repeated printings corresponding to the target difference printing data from the target printing instruction, and performing repeated printing processing on the target printing data according to the number of repeated printings.

[0074] In some embodiments, in a scenario where the previous page print data and the target difference print data are obtained by the printing device from the client, the printing parameters in the target print instruction obtained by the printing device from the client may also include the number of repeated prints corresponding to the target difference print data. The number of repeated prints refers to the number of repeated prints of the current page print data including the target difference print data. In the case where the target difference print data is the current page print data, all the print data is read from the complete data cache area, all the print data in the complete data cache area is used as the target print data, and the printing device performs repeated print processing on the target print data according to the number of repeated prints. In the case where the target difference print data is part 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, and the printing device then reads all the print data from the complete data cache area, all the print data in the complete data cache area is used as the target print data, and the printing device performs repeated print processing on the target print data according to the number of repeated prints.

[0075] In the data printing method provided in the embodiment of the present application, the printing device obtains the previous page printing data and stores the previous page printing data. The client 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 obtains the target printing instruction corresponding to the target difference printing data. If the target difference printing data is determined to be a data complete type based on the target printing instruction, the complete data cache area is determined as the data storage area of ​​the target difference printing data. If the target difference printing data is determined to be an incomplete data type based on the target printing instruction, the partial data cache area is determined as the data storage area of ​​the target difference printing data. The target difference printing data is stored in the data storage area. The target printing data is determined based on the target difference printing data. The number of repeated printings corresponding to the target difference printing data is determined from the target printing instruction. The target printing data is repeatedly printed according to the number of repeated printings. Therefore, the target difference printing data corresponding to the printing data of adjacent pages is determined by the client, and the target printing instruction is generated by the client, so that the printing device only needs to receive the target difference printing data instead of the current page printing data or repeated printing data. This not only greatly reduces the amount of printing data obtained by the printing device during the printing process, but also avoids the problem of frequent pauses and waiting for printing data in a printing process of the printing device. It can also save the time of the printing device to determine the data storage area of ​​the target difference printing data, thereby further improving the working efficiency of the printing device.

[0076] See also Figure 4 , a flow chart of another data printing method is provided for an embodiment of the present application.

[0077] Specifically, the data printing method includes:

[0078] S401, obtaining the previous page of print data and storing the previous page of print data.

[0079] For details, the implementation of S401 can be found in Figure 2 The description of the relevant parts in the illustrated embodiment will not be repeated in detail here.

[0080] S402, performing a line-by-line data comparison process on the current page print data and the previous page print data to obtain target difference print data.

[0081] In some embodiments, when the previous page print data is all the data of a page of data to be printed, after sending the previous page print data to the printing device, the client can determine the current page print data that is located after the previous page print data according to the printing order, generate a target image in a preset format for the current page print data, split the target image into rows to obtain multiple rows of data corresponding to the current page print data, perform line-by-line data comparison processing on 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 target difference print data. It can be understood that the multiple lines of data corresponding to the current page printing data are data of a preset number of lines, and the multiple lines of data corresponding to the previous page printing data are also data of a preset number of lines. For example, the preset number of lines is 500 lines. After line-by-line data comparison processing, it is confirmed that the data from lines 480 to 500 in the multiple lines of data corresponding to the current page printing data are different from the data from lines 480 to 500 in the multiple lines of data corresponding to the previous page printing data. Then, the data from lines 480 to 500 in the multiple lines of data corresponding to the current page printing data are determined as target difference printing data. The target difference printing data may include the line data with differences and the line number identifiers corresponding to the line data.

[0082] Optionally, in the case that the previous print data is partial data of a page of data to be printed, after sending the previous page print data to the printing device, the client can determine the current page print data that is located after the complete page print data corresponding to the previous page print data according to the printing order, generate a preset target image for the current page print data, split the target image into rows to obtain multiple rows of data corresponding to the current page print data, perform line-by-line data comparison processing on the multiple rows of data corresponding to the current page print data and the multiple rows of data corresponding to the complete page print data to obtain target difference print data.

[0083] S403, determining a data storage area for target difference printing data, storing the target difference printing data in the data storage area, determining target printing data based on the target difference printing data, and performing printing processing on the target printing data.

[0084] For details, the implementation of S403 can be found in Figure 2 The description of the relevant parts in the illustrated embodiment will not be repeated in detail here.

[0085] In the data printing method provided in the embodiment of the present application, the printing device obtains the previous page printing data, stores the previous page printing data, the client performs line-by-line data comparison processing on the current page printing data and the previous page printing number to obtain the target difference printing data, the printing device determines the data storage area of ​​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, the client can accurately determine the target difference printing data by performing line-by-line data comparison processing on the current page printing data and the previous page printing number, so as to send the accurate target difference printing data to the printing device, which can reduce the amount of printing data obtained by the printing device while ensuring the accuracy of the printing data.

[0086] See also Figure 5 , which provides a flow chart of another data printing method for an embodiment of the present application.

[0087] Specifically, the data printing method includes:

[0088] S501, obtaining the previous page of print data and storing the previous page of print data.

[0089] S502: Determine target difference printing data corresponding to the current page printing data and the previous page printing data in the current page printing data.

[0090] S503, determining a data storage area for the target difference print data.

[0091] For details on how to implement S501-S503, please refer to Figure 2 The description of the relevant parts in the illustrated embodiment will not be repeated in detail here.

[0092] S504, if the target difference printing data is of an incomplete data type, the target difference printing data is stored in a partial data cache area, a target storage position of the target difference printing data in the complete data cache area is determined, the target difference printing data is copied to the target storage position to obtain the first target printing data in the complete data cache area, and the first target printing data is printed.

[0093] 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 in an idle state, the target storage position 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 position to obtain the first target print data in the complete data cache area, and the first target print data is printed.

[0094] Specifically, determining a target storage location of 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 performing print processing on the first target print data may include:

[0095] Determine at least one line of difference printing data and a line number identifier corresponding to at least one line of difference printing data in the target difference printing data, determine the target storage position indicated by the line number identifier in the complete data cache area, use at least one line of difference printing data to overwrite and update the data at the target storage position, obtain the first target printing data in the complete data cache area, read the first target printing data from the starting cache position in the complete data cache area and start printing.

[0096] S505, if the target difference printing data is of a complete data type, after all stored printing data are printed, the target difference printing data is stored in a complete data buffer area to obtain second target printing data, and the second target printing data is printed.

[0097] In some embodiments, when the target difference print data is of a data complete type, the printing device first determines whether there is any stored print data that has not been printed. If there is any stored print data that has not been printed, the printing device sends a no memory instruction to the client to inform the client that the printing device temporarily has no memory to store the target difference print data and instructs the client to send the target difference print data to the printing device when receiving the memory instruction. If there is no stored print data that has not been printed, that is, all stored print data has been printed, then 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.

[0098] Specifically, storing the target difference print data in the complete data buffer area to obtain the second target print data, and performing print processing on the second target print data may include:

[0099] Determine at least one line of difference printing data and a line number identifier corresponding to at least one line of difference printing data in the target difference printing data, write at least one line of difference printing data into a storage location indicated by the line number identifier in the complete data cache area, obtain second target printing data in the complete data cache area, read the second target printing data from the starting cache position in the complete data cache area and start printing.

[0100] In the data printing method provided in the embodiment of the present application, the printing device obtains the previous page printing data, stores the previous page printing data, and the client 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. If the target difference printing data is of an incomplete data type, the printing device stores the target difference printing data in a partial data cache area, determines the target storage position of the target difference printing data in the complete data cache area, copies the target difference printing data to the target storage position to obtain the first target printing data in the complete data cache area, and performs printing processing on the first target printing data. If the target difference printing data is of a complete data type, the printing device stores the target difference printing data in the complete data cache area to obtain the second target printing data after all the stored printing data are printed, and performs printing processing on the second target printing data. Therefore, by configuring different storage areas in the printing device to store target difference printing data of different data types sent by the client, the amount of printing data received by the printing device can be reduced, and it can also be ensured that the printing device can accurately restore the current page printing data based on the target difference printing data to ensure the accuracy of data printing.

[0101] See also Figure 6 , which provides a flow chart of another data printing method for an embodiment of the present application.

[0102] Specifically, the data printing method includes:

[0103] S601, obtaining the previous page print data, and determining whether the previous page print data is the first page print data.

[0104] The first page print data may be understood as the first page print data received by the printing device in this print task. The first page print data may be the print data arranged on the first page in the printing order among all the data to be printed in this print task.

[0105] 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 has been received after the current printing task is started and before the previous page print data is received, so as to determine whether the previous page print data is the first page print data. If other page print data has not been received after the current printing task is started and before the previous page print data is received, it can be determined that the previous page print data is the first page print data. If other page print data has been received after the current printing task is started and before the previous page print data is received, it can be determined that the previous page print data is not the first page print data.

[0106] S602: If the previous page of print data is the first page of print data, the previous page of print data is stored in the complete data cache area.

[0107] In some embodiments, after determining that the previous page of print data is the first page of 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 of print data, obtain the starting cache position and the ending cache position of the complete data cache area, and store each line of data corresponding to the line number identifier in sequence starting from the starting cache position until the last line of data is stored at the ending cache position, thereby completing the storage process of the previous page of print data.

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

[0109] 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 to which the previous page print data belongs based on the print instruction corresponding to the previous page print data received from the client, and when determining that the reference data type is a complete data type, determine that the reference data storage area is a complete data cache area. Further, the printing device stores the previous page print data in the complete data cache area when confirming that the complete data cache area is in an idle state. When determining that the reference data type is an incomplete data type, determine that the reference data storage area is 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 the data can be read from the partial data cache area according to the storage location when the previous page print data is subsequently printed.

[0110] S604, determining target difference printing data corresponding to the current page printing data and the previous page printing data in the current page printing data.

[0111] S605 , determining a data storage area for target difference printing data, storing the target difference printing data in the data storage area, determining target printing data based on the target difference printing data, and performing printing processing on the target printing data.

[0112] For details, the implementation of S604 and S605 can be found in Figure 2 The description of the relevant parts in the illustrated implementation will not be repeated in detail here.

[0113] In the data printing method provided in the embodiment of the present application, the printing device obtains the previous page printing data, determines whether the previous page printing data is the first page printing data, and if the previous page printing data is the first page printing data, stores the previous page printing data in the complete data cache area; if the previous page printing data is not the first page printing data, determines the reference data type corresponding to the previous page printing data, determines the reference data storage area of ​​the previous page printing data based on the reference data type, and stores the previous page printing data in the reference data storage area; the client 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 of ​​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. Thus, the printing device can save the time of determining the storage area of ​​the previous page printing data by determining whether the previous page printing data is the first page printing data, and then decides whether to determine the storage area of ​​the previous page printing data according to the data type, so as to further improve the working efficiency of the printing device by reducing the amount of printing data received by the printing device to avoid the problem of frequent waiting for printing data in the printing device.

[0114] See also Figure 7 , which provides a flow chart of another data printing method for an embodiment of the present application.

[0115] Specifically, the data printing method includes:

[0116] S701, obtaining the previous page of print data and storing the previous page of print data.

[0117] For details, the implementation of S701 can be found in Figure 2 The description of the relevant parts in the illustrated implementation will not be repeated in detail here.

[0118] S702: After the printing of the previous page of printing data is completed, target difference printing data corresponding to the current page of printing data and the previous page of printing data is determined in the current page of printing data.

[0119] In some embodiments, after the client sends the previous page of print data to the printing device, the client can continue to send the print completion query instruction corresponding to the previous page of print data to the printing device. After the printing device has completed printing all the previous page of print data, the printing device generates a confirmation print completion notification of the most recently received print completion query instruction, and the printing device sends the confirmation print completion notification to the client to inform the client that the previous page of print data has been completely printed. After the client learns that the previous page of print data has been completely printed, the client determines the target difference print data corresponding to the current page of print data and the previous page of print data in the current page of print data. Specifically, the way in 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 part of the above embodiments, and will not be described in detail here.

[0120] In some other embodiments, after the printing device has completed printing of the previous page of print data, the printing device generates a confirmation print completion instruction corresponding to the previous page of print data, and the printing device sends the confirmation print completion instruction to the client to inform the client that the previous page of print data has been completely printed. After the client learns that the previous page of print data has been completely printed, the client determines the target difference print data corresponding to the current page of print data and the previous page of print data in the current page of print data.

[0121] S703, after the printing completion time of the target row of print data in the previous page of print data exceeds a preset time, target difference print data corresponding to the current page of print data and the previous page of print data is determined in the current page of print data.

[0122] Among them, the target row printing data may refer to a specific number of rows of data in the previous page printing data. The specific number of rows may be set according to the actual application scenario, and the embodiment of the present application does not impose any specific restrictions on this.

[0123] The preset duration can be set according to the actual application scenario, and the embodiments of the present application do not impose any specific restrictions on this.

[0124] In some embodiments, after the client sends the previous page of print data to the printing device, the client can continue to send the start data comparison query instruction 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 of print data has passed the preset time, the printing device generates a confirmation start data comparison notification of the latest received start data comparison query instruction, and the printing device sends the confirmation start data comparison notification to the client to inform the client that the previous page of print data can start data comparison, that is, the client can start to perform the operation of determining the target difference print data corresponding to the current page of print data and the previous page of print data in the current page of print data. Specifically, the way in which the client determines the target difference print data in the current page of print data can refer to the description of the relevant part of the above embodiment, which will not be described in detail here.

[0125] In some other embodiments, after confirming that the printing completion time of the target row of print data in the previous page of print data has passed a preset time, the printing device generates a confirmation instruction for starting data comparison, and the printing device sends the confirmation instruction for starting data comparison to the client to inform the client that data comparison can be started, that is, the client can start to execute the operation of determining the target difference print data corresponding to the current page of print data and the previous page of print data in the current page of print data.

[0126] S704, determining a data storage area for target difference printing data, storing the target difference printing data in the data storage area, determining target printing data based on the target difference printing data, and performing printing processing on the target printing data.

[0127] For details, the implementation of S704 can be found in Figure 2 The description of the relevant parts in the illustrated implementation will not be repeated in detail here.

[0128] In the data printing method provided in the embodiment of the present application, the printing device obtains the previous page printing data, stores the previous page printing data, and after the previous page printing data is completely printed, the client 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, or after the printing completion time of the target row printing data in the previous page printing data exceeds a preset time, the client 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 of ​​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 difference printing data after the previous page printing data is completely printed, the client can ensure that the target difference printing data can be successfully received and stored by the printing device only by sending it to the printing device once. By determining the target difference printing data after a preset period of time has passed since the printing completion time of the target row printing data in the previous page printing data, the client can ensure that the target difference printing data can be prepared as soon as possible, thereby sending the target difference printing data to the printing device as soon as possible, reducing the waiting time for the printing device to receive the target difference printing data, and jointly optimizing the working efficiency of the printing device by reducing the amount of printing data received by the printing device and shortening the sending time of the printing data received by the printing device.

[0129] See also Figure 8 , which provides a flow chart of another data printing method for an embodiment of the present application.

[0130] Specifically, the data printing method includes:

[0131] S801, obtaining the to-be-printed data corresponding to the target printing task.

[0132] In some embodiments, step S801 may be executed by the client. After receiving the target printing task started by the user, the client may obtain the printing data of all pages to be printed selected by the target printing task, and determine the printing data of all pages as the data to be printed.

[0133] S802, determining similar printing data in the data to be printed, and determining a target printing order according to the similar printing data.

[0134] In some embodiments, step S802 may be executed by a client, the client performs similar data detection on the data to be printed, determines at least one group of similar page printing data in the data to be printed, sets a continuous printing order for the page printing data in each group of similar page printing data, sets the printing order of the page printing data other than the similar page printing data in the data to be printed before the continuous printing order, or sets the printing order of the page printing data other than the similar page printing data in the data to be printed after the continuous printing order, and the target printing order can be obtained. The similarity between any two page printing data in each group of similar page printing data is greater than a preset similarity threshold.

[0135] S803, determining an initial printing sequence corresponding to the data to be printed, and determining a target printing sequence according to the initial printing sequence.

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

[0137] S804, obtaining the previous page of print data and storing the previous page of print data.

[0138] Specifically, the client can obtain the previous page print data according to the target print sequence, and send the previous page print sequence to the printing device, so that the printing device can obtain the previous page print data. The implementation method of the printing device storing the previous page print data can be found in Figure 2 The description of the relevant parts in the implementation shown will not be described in detail here

[0139] S805, obtaining the current page print data corresponding to the previous page print data according to the target printing order.

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

[0141] S806, determining target difference printing data corresponding to the current page printing data and the previous page printing data in the current page printing data.

[0142] S807, determining a data storage area for target difference printing data, storing the target difference printing data in the data storage area, determining target printing data based on the target difference printing data, and performing printing processing on the target printing data.

[0143] For details, the implementation of S806 and S807 can be found in Figure 2 The description of the relevant parts in the illustrated implementation will not be repeated in detail here.

[0144] In the data printing method provided in the embodiment of the present application, the client obtains the to-be-printed data corresponding to the target printing task, determines the similar printing data in the to-be-printed data, and determines the target printing order according to the similar printing data, or the client determines the initial printing order corresponding to the to-be-printed data, and determines the target printing order according to the initial printing order; the printing device obtains the previous page printing data 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 of ​​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, the client determines the target printing order through the similar printing data, and can optimize the printing order of the to-be-printed data, so that the client sends the printing data to the printing device according to the optimized printing order, which can improve the printing efficiency of the printing device.

[0145] The following will be combined Fig. 9 , the data printing device provided in the embodiment of the present application is introduced in detail. It should be noted that, Fig. 9 The data printing device shown is used to execute the application Figure 2 to Figure 8 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 2 to Figure 8 The embodiment shown.

[0146] See also Fig. 9, which shows a schematic diagram of the structure of a data printing device according to an embodiment of the present application. The 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, which are specifically used to:

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

[0148] A second printing processing module 12, configured to determine, in the current page printing data, target difference printing data corresponding to the current page printing data and the previous page printing data;

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

[0150] Optionally, the third printing processing module 13 includes:

[0151] A printing instruction acquisition unit, used for acquiring a target printing instruction corresponding to the target difference printing data;

[0152] a first storage processing unit, configured to determine a complete data cache area as a data storage area for the target difference print data if it is determined based on the target print instruction that the target difference print data is of a data complete type;

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

[0154] Optionally, the third printing processing module 13 includes:

[0155] The repeated printing processing unit is used to determine the repeated printing times corresponding to the target difference printing data from the target printing instruction, and perform repeated printing processing on the target printing data according to the repeated printing times.

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

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

[0158] Optionally, the third printing processing module 13 includes:

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

[0160] The second printing processing unit is used for storing the target difference printing data in the complete data buffer area to obtain second target printing data after all stored printing data are printed if the target difference printing data is of a complete data type, and performing printing processing on the second target printing data.

[0161] Optionally, the first printing processing unit is specifically configured to:

[0162] At least one line of difference printing data and a line number identifier corresponding to the at least one line of difference printing data are determined in the target difference printing data, a target storage position indicated by the line number identifier is determined in the complete data cache area, the at least one line of difference printing data is used to overwrite and update the data at the target storage position to obtain the first target printing data in the complete data cache area, the first target printing data is read from the starting cache position in the complete data cache area and printing is started.

[0163] Optionally, the second printing processing unit is specifically configured to:

[0164] Determine at least one line of difference printing data and a line number identifier corresponding to the at least one line of difference printing data in the target difference printing data, write the at least one line of difference printing data into a storage location indicated by the line number identifier in the complete data cache area, obtain second target printing data in the complete data cache area, read the second target printing data from the starting cache position in the complete data cache area and start printing.

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

[0166] A first page data judging unit, used for obtaining the previous page printing data and judging whether the previous page printing data is the first page printing data;

[0167] A first data storage unit, configured to store the previous page print data in a complete data buffer area if the previous page print data is the first page print data;

[0168] 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.

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

[0170] A first data comparison unit is used to determine, in the current page print data, target difference print data corresponding to the current page print data and the previous page print data after the previous page print data is completely printed; or

[0171] The second data comparison unit is used to determine target difference printing data corresponding to the current page printing data and the previous page printing data in the current page printing data after the printing completion time of the target row printing data in the previous page printing data exceeds a preset time.

[0172] Optionally, the data printing device 1 further includes:

[0173] A print data acquisition module, used to acquire the to-be-printed data corresponding to the target print task;

[0174] The printing order determination module is used to determine similar printing data in the data to be printed and determine the target printing order according to the similar printing data; or to determine the initial printing order corresponding to the data to be printed and determine the target printing order according to the initial printing order.

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

[0176] 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 printing order.

[0177] 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 printing data of a single paper, the starting cache position of the complete data cache area corresponds to the end position in the length direction of the paper, the ending cache position of the complete data cache area corresponds to the tail position in the length direction of the paper, and the partial data cache area is used to store partial printing data of at least one paper.

[0178] The data printing device provided in the embodiment of the present application obtains the previous page printing data, stores the previous page printing data, 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, determines the data storage area of ​​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 difference printing data corresponding to the printing data of the adjacent pages, the amount of printing data obtained by the printing device during the printing process can be reduced, and the problem of frequent pauses and waiting for printing data in the printing device during a printing process can be avoided, so that the printing device can continuously and stably print, thereby improving the working efficiency of the printing device.

[0179] Please refer to Fig.10 , a schematic diagram of the structure of an electronic device is provided for an embodiment of the present application. Exemplarily, the electronic device in the embodiment of the present application may 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, the memory 120, the input device 130, and the output device 140 may be connected via the bus 150.

[0180] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.

[0181] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, codes, 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., a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The operating system may be an Android system, including a system deeply developed based on the Android system, an IOS system developed by Apple, including a system deeply developed based on the IOS system or other systems.

[0182] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to open up data communication between third-party applications and the operating system so that the operating system can obtain the current scenario information of third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.

[0183] The input device 130 is used to receive input commands or data, and includes but is not limited to a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used to output commands 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 are touch screen displays.

[0184] The touch display screen can be designed as a full screen, a curved screen or a special-shaped screen. The touch display screen can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.

[0185] In addition, those skilled in the art will appreciate that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module and other components, which will not be described in detail here.

[0186] In some embodiments, Fig.10When the electronic device shown 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:

[0187] Acquire the previous page of print data, and store the previous page of print data;

[0188] Determining target difference printing data corresponding to the current page printing data and the previous page printing data in the current page printing data;

[0189] A data storage area for the target difference print data is determined, the target difference print data is stored in the data storage area, target print data is determined based on the target difference print data, and print processing is performed on the target print data.

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

[0191] Acquire a target printing instruction corresponding to the target difference printing data;

[0192] If it is determined based on the target printing instruction that the target difference printing data is of a data complete type, a complete data buffer area is determined as a data storage area for the target difference printing data;

[0193] If it is determined based on the target printing instruction that the target difference printing data is of an incomplete data type, a partial data buffer area is determined as a data storage area for the target difference printing data.

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

[0195] The number of repeated printings corresponding to the target difference printing data is determined from the target printing instruction, and the target printing data is repeatedly printed according to the number of repeated printings.

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

[0197] The current page printing data and the previous page printing data are compared line by line to obtain target difference printing data.

[0198] Optionally, when executing the step of storing the target difference print data in the data storage area and performing print processing on the target difference print data, the processor 110 specifically performs the following operations:

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

[0200] If the target difference print data is of a complete data type, after all stored print data are printed, the target difference print data is stored in a complete data buffer area to obtain second target print data, and the second target print data is printed.

[0201] Optionally, when the processor 110 performs the steps of determining a 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 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:

[0202] At least one line of difference printing data and a line number identifier corresponding to the at least one line of difference printing data are determined in the target difference printing data, a target storage position indicated by the line number identifier is determined in the complete data cache area, the at least one line of difference printing data is used to overwrite and update the data at the target storage position to obtain the first target printing data in the complete data cache area, the first target printing data is read from the starting cache position in the complete data cache area and printing is started.

[0203] Optionally, when the processor 110 executes the step of storing the target difference print data in the complete data cache area to obtain the second target print data, and performing print processing on the second target print data, the following operations are specifically performed:

[0204] Determine at least one line of difference printing data and a line number identifier corresponding to the at least one line of difference printing data in the target difference printing data, write the at least one line of difference printing data into a storage location indicated by the line number identifier in the complete data cache area, obtain second target printing data in the complete data cache area, read the second target printing data from the starting cache position in the complete data cache area and start printing.

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

[0206] Obtaining the previous page of print data, and determining whether the previous page of print data is the first page of print data;

[0207] If the previous page print data is the first page print data, storing the previous page print data in the complete data cache area;

[0208] If the previous page print data is not the first page print data, a reference data type corresponding to the previous page print data is determined, a reference data storage area for 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.

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

[0210] After the previous page print data is completely printed, determining target difference print data corresponding to the current page print data and the previous page print data in the current page print data; or,

[0211] After the printing completion time of the target row of printing data in the previous page of printing data exceeds a preset time, target difference printing data corresponding to the current page of printing data and the previous page of printing data is determined in the current page of printing data.

[0212] Optionally, before executing the steps of obtaining the previous page of print data and storing the previous page of print data, the processor 110 further performs the following operations:

[0213] Obtain the to-be-printed data corresponding to the target printing task;

[0214] Determine similar printing data in the data to be printed, and determine a target printing order according to the similar printing data; or determine an initial printing order corresponding to the data to be printed, and determine a target printing order according to the initial printing order.

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

[0216] The current page print data corresponding to the previous page print data is acquired according to the target printing order.

[0217] 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 printing data of a single paper, the starting cache position of the complete data cache area corresponds to the end position in the length direction of the paper, the ending cache position of the complete data cache area corresponds to the tail position in the length direction of the paper, and the partial data cache area is used to store partial printing data of at least one paper.

[0218] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the data printing method described in the above embodiments.

[0219] An embodiment of the present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the data printing method described in the above embodiments.

[0220] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with 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 codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0221] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A data printing method, characterized in that: The method comprises: Acquire the previous page of print data, and store the previous page of print data; Determining target difference printing data corresponding to the current page printing data and the previous page printing data in the current page printing data; A data storage area for the target difference print data is determined, the target difference print data is stored in the data storage area, target print data is determined based on the target difference print data, and print processing is performed on the target print data.

2. The method according to claim 1, characterized in that The step of determining the data storage area of ​​the target difference print data comprises: Acquire a target printing instruction corresponding to the target difference printing data; If it is determined based on the target printing instruction that the target difference printing data is of a data complete type, a complete data buffer area is determined as a data storage area for the target difference printing data; If it is determined based on the target printing instruction that the target difference printing data is of an incomplete data type, a partial data buffer area is determined as a data storage area for the target difference printing data.

3. The method according to claim 2, characterized in that The printing process of the target printing data includes: The number of repeated printings corresponding to the target difference printing data is determined from the target printing instruction, and the target printing data is repeatedly printed according to the number of repeated printings.

4. The method according to claim 1, characterized in that The determining, in the current page print data, target difference print data corresponding to the current page print data and the previous page print data comprises: The current page printing data and the previous page printing data are compared line by line to obtain target difference printing data.

5. The method according to claim 1, characterized in that The storing the target difference print data in the data storage area, determining the target print data based on the target difference print data, and performing print processing on the target print data includes: If the target difference print data is of an incomplete data type, the target difference print data is stored in a partial data cache area, a target storage position of the target difference print data in a complete data cache area is determined, the target difference print data is copied to the target storage position to obtain 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 a complete data type, after all stored print data are printed, the target difference print data is stored in a complete data buffer area to obtain second target print data, and the second target print data is printed.

6. The method according to claim 5, characterized in that The determining a 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 first target print data in the complete data cache area, and performing print processing on the first target print data, comprises: At least one line of difference printing data and a line number identifier corresponding to the at least one line of difference printing data are determined in the target difference printing data, a target storage position indicated by the line number identifier is determined in the complete data cache area, the at least one line of difference printing data is used to overwrite and update the data at the target storage position to obtain the first target printing data in the complete data cache area, the first target printing 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, characterized in that The storing the target difference print data into the complete data buffer area to obtain second target print data, and performing print processing on the second target print data, comprises: Determine at least one line of difference printing data and a line number identifier corresponding to the at least one line of difference printing data in the target difference printing data, write the at least one line of difference printing data into a storage location indicated by the line number identifier in the complete data cache area, obtain second target printing data in the complete data cache area, read the second target printing data from the starting cache position in the complete data cache area and start printing.

8. The method according to claim 1, characterized in that The obtaining of the previous page of print data and storing the previous page of print data comprises: Obtaining the previous page of print data, and determining whether the previous page of print data is the first page of print data; If the previous page print data is the first page print data, storing the previous page print data in the complete data cache area; If the previous page print data is not the first page print data, a reference data type corresponding to the previous page print data is determined, a reference data storage area for 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, characterized in that: The determining, in the current page print data, target difference print data corresponding to the current page print data and the previous page print data comprises: After the previous page print data is completely printed, determining target difference print data corresponding to the current page print data and the previous page print data in the current page print data; or, After the printing completion time of the target row of printing data in the previous page of printing data exceeds a preset time, target difference printing data corresponding to the current page of printing data and the previous page of printing data is determined in the current page of printing data.

10. The method according to claim 1, characterized in that Before obtaining the previous page of print data and storing the previous page of print data, the method further includes: Obtain the to-be-printed data corresponding to the target printing task; Determine similar printing data in the data to be printed, and determine a target printing order according to the similar printing data; or determine an initial printing order corresponding to the data to be printed, and determine a target printing order according to the initial printing order.

11. The method according to claim 10, characterized in that Before determining 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 method further includes: The current page print data corresponding to the previous page print data is acquired according to the target printing order.

12. The method according to claim 1, characterized in that 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 printing data of a single paper, the starting cache position of the complete data cache area corresponds to the end position in the length direction of the paper, the ending cache position of the complete data cache area corresponds to the tail position in the length direction of the paper, and the partial data cache area is used to store partial printing data of at least one paper.

13. A data printing device, characterized in that: The device comprises: A first printing processing module, used for acquiring the previous page of printing data and storing the previous page of printing data; A second printing processing module, configured to determine, in the current page printing data, target difference printing data corresponding to the current page printing data and the previous page printing data; The third printing processing module is used to determine a data storage area for the target difference printing data, store the target difference printing data in the data storage area, determine target printing data based on the target difference printing data, and perform printing processing on the target printing data.

14. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 12.

15. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Variable-data printing page processing method and variable-data printing page processing device

    CN104346107A

  • Image forming apparatus and consumable product management method

    CN106527090A

  • Printing apparatus and method of controlling the same, and storage medium

    CN111683187A

  • Printer

    JP1983060350A

  • Printing device

    JP1996258345A

Cited By

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

    WO2026153322A1