Paper detection method and device and printing equipment

By using the number of steps of the stepper motor and the thickness of the paper to calculate the remaining paper in the paper box, the problem of increased hardware cost of the sensor is solved, and low-cost and accurate detection of the remaining paper amount is achieved.

CN120697457APending Publication Date: 2025-09-26ZHUHAI PANTUM ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510891941.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the prior art, the printer detects the remaining amount of paper using a sensor, which increases hardware costs and leads to high costs.

Method used

By obtaining the number of rotation steps of the stepping motor and the paper thickness of a single sheet of paper in the paper box, the remaining amount of paper in the paper box is calculated, avoiding the use of additional sensors.

Benefits of technology

The hardware cost of the printing equipment is reduced, and the remaining amount of paper is accurately detected, avoiding the cost increase due to the sensor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120697457A_ABST
    Figure CN120697457A_ABST
Patent Text Reader

Abstract

The invention relates to a paper detection method and device and printing equipment, and the method comprises the steps: obtaining the rotation step number of a stepping motor, and determining the current lifting distance of a bottom plate based on the step number; wherein the lifting distance of the bottom plate is in positive correlation with the step number; obtaining the paper thickness of a single piece of paper in the paper box; and determining the residual amount of the paper in the paper box at least based on the current lifting distance of the bottom plate and the paper thickness. In this way, detection of the remaining paper amount can be achieved without arranging an additional sensor in the paper box, and then the hardware cost of printing equipment can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of printer technology, and in particular to a paper detection method, device and printing equipment. Background Art

[0002] With the continuous development of technology, printers are widely used in daily office work and other fields. When users use printers, they need to have enough paper to meet their printing needs. Once the printer is out of paper, the printing process will be interrupted, which will affect the normal work of the user.

[0003] In order to promptly determine the remaining amount of paper in the printer, a related sensor is provided on the printer in the related art to detect the remaining amount of paper in the paper box through the sensor. However, this method of the related art increases the hardware cost of the printer. Summary of the Invention

[0004] The embodiments of the present application provide a paper detection method, apparatus, and printing device, which can reduce the hardware cost of the printing device.

[0005] According to a first aspect of the present application, a paper detection method is provided, which is applied to a printing device, wherein the printing device includes a paper box and a stepper motor, the paper box is provided with a bottom plate, and the stepper motor is used to drive the bottom plate to lift. The method includes:

[0006] Obtaining the number of steps of the stepper motor, and determining the current lifting distance of the base plate based on the number of steps; wherein the lifting distance of the base plate is positively correlated with the number of steps;

[0007] Obtaining the paper thickness of a single sheet of paper in the paper box;

[0008] The remaining amount of paper in the paper cassette is determined based on at least the current lifting distance of the bottom plate and the thickness of the paper.

[0009] This solution determines the current lift distance of the base plate by measuring the number of steps the stepper motor has taken. It then determines the remaining paper in the paper tray based on the thickness of the individual sheets in the tray and the current lift distance of the base plate. This eliminates the need for additional sensors in the paper tray to detect paper remaining, reducing the hardware cost of the printing device.

[0010] In a possible implementation manner provided in the present application, determining the remaining amount of paper in the paper box based at least on the current lifting distance of the bottom plate and the thickness of the paper includes:

[0011] When the current lifting distance of the bottom plate is not less than the maximum lifting distance of the bottom plate, it is determined that the remaining amount of paper in the paper box is zero.

[0012] In this scheme, if the current lifting distance of the bottom plate is not less than the maximum lifting distance of the bottom plate, it means that the current lifting distance of the bottom plate is greater than or equal to the maximum lifting distance of the bottom plate. At this time, the lifting height of the bottom plate is already the highest, and it can be determined that the remaining amount of paper in the paper box is zero. At this time, it can be quickly determined whether the remaining amount of paper in the paper box is zero based on the current lifting height of the bottom plate.

[0013] In a possible implementation manner provided in the present application, determining the remaining amount of paper in the paper box based at least on the current lifting distance of the bottom plate and the thickness of the paper includes:

[0014] When the current lifting distance of the bottom plate is less than the maximum lifting distance of the bottom plate, determining a first consumption of paper in the paper box based on the current lifting distance of the bottom plate, the maximum lifting distance and the thickness of the paper;

[0015] The remaining amount of paper in the paper cassette is determined based on a first consumption amount of paper in the paper cassette and a maximum capacity of the paper cassette.

[0016] This solution can be that when the paper box is in a full box state before the printing job, a first remaining amount of paper in the paper box can be determined by obtaining a first consumption amount of paper in the paper box after the printing job is completed.

[0017] In a possible implementation manner provided in the present application, when the printing device starts working, the paper box has a first total paper volume; the first total paper volume is less than or equal to the maximum capacity of the paper box;

[0018] The determining the remaining amount of paper in the paper box based at least on the current lifting distance of the bottom plate and the thickness of the paper includes:

[0019] determining a second consumption of paper in the paper box based on the current lifting distance and the paper thickness;

[0020] A second remaining amount of paper in the paper box is obtained based on the second consumption amount and the first total amount of paper.

[0021] In this solution, the amount of paper consumed during this printing process, i.e., the second amount of paper consumed in the paper box, can be obtained by dividing the current lifting distance of the bottom plate by the thickness of a single sheet of paper. The second remaining amount of paper in the paper box can be obtained by taking the difference between the second amount of paper consumed and the first total amount of paper.

[0022] In a possible implementation manner provided in this application, the method further includes:

[0023] When it is detected that the paper in the paper box is exhausted, obtaining a first lifting distance of the bottom plate;

[0024] The maximum lift distance is corrected based on the first lift distance.

[0025] This solution can obtain the first lifting distance of the bottom plate when it is detected that the paper in the paper box is exhausted. The first lifting distance can be used as the maximum lifting distance of the bottom plate to correct the previous maximum lifting distance of the bottom plate.

[0026] In a possible implementation manner provided in this application, the method further includes:

[0027] During the printing process of the printing device, obtaining the number of printed pages;

[0028] The paper thickness is corrected based on the number of printed pages and the current lift distance.

[0029] This solution can obtain the number of printed pages during the printing process of the printing device, so that the thickness of a single sheet of the current paper can be calculated based on the number of printed pages and the current lifting distance. That is, the thickness of a single sheet of the current paper can be obtained by dividing the current lifting distance by the number of printed pages, thereby updating the paper thickness of the current paper.

[0030] In a possible implementation provided by the present application, the paper thickness is a first thickness, and the correcting the paper thickness based on the number of printed pages and the current lifting distance includes:

[0031] Obtaining a second thickness of a single sheet of paper in the paper box based on the number of printed pages and the current lifting distance;

[0032] When the second thickness is within a target range, the second thickness is used as the paper thickness of a single sheet of paper in the paper box; wherein the target range is determined based on the first thickness and a preset offset.

[0033] This solution can set the paper thickness of a single sheet of paper in the paper box to a first thickness when starting printing. For example, the first thickness can be a default standard value. To avoid the paper thickness of a single sheet of paper in the current paper box being not the first thickness, the embodiment can calculate the second thickness of the single sheet of paper in the current paper box through the number of printed pages and the current lifting distance. If it is within the target range, that is, the value of the second thickness does not deviate too much from the first thickness, it means that the second thickness meets the requirements. The paper thickness of the single sheet of paper in the current paper box can be corrected based on the second thickness, so that the remaining amount of paper in the paper box can be calculated more accurately.

[0034] In a possible implementation manner provided in the present application, determining the remaining amount of paper in the paper box based at least on the current lifting distance of the bottom plate and the thickness of the paper includes:

[0035] The remaining amount of paper in the paper cassette is determined based on at least the current lifting distance of the bottom plate and the corrected paper thickness.

[0036] This solution makes the calculated remaining amount of paper in the paper box more accurate through the current lifting distance of the bottom plate and the corrected paper thickness.

[0037] In a possible implementation manner provided in this application, the method further includes:

[0038] generating status information of the paper box based on the remaining amount of the paper;

[0039] The status information is displayed on a display panel of the printing device.

[0040] This solution allows users to obtain the remaining amount of paper in the paper box in real time by displaying the status information of the paper box, and can also remind users when the remaining amount of paper in the paper box is low so that users can replenish the paper in the paper box in time.

[0041] According to a second aspect of the present application, a paper detection device is provided, which is applied to a printing device. The printing device includes a paper box and a stepper motor. The paper box is provided with a bottom plate. The stepper motor is used to drive the bottom plate to lift. The device also includes:

[0042] a lifting distance calculation module, configured to obtain the number of steps of the stepper motor and determine the current lifting distance of the base plate based on the number of steps; wherein the lifting distance of the base plate is positively correlated with the number of steps;

[0043] A paper thickness obtaining module, used for obtaining the paper thickness of a single sheet of paper in the paper box;

[0044] The paper remaining amount obtaining module is configured to determine the remaining amount of paper in the paper box based at least on the current lifting distance of the bottom plate and the thickness of the paper.

[0045] According to a third aspect of the present application, a printing device is provided, comprising: a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the program.

[0046] According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method of the present application is implemented.

[0047] According to a fifth aspect of the present application, a computer program product is provided, comprising a computer program, wherein the computer program implements the above method of the present application when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Further details, features and advantages of the present application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0049] Figure 1 A schematic diagram of a paper box structure in a printing device provided by an exemplary embodiment of the present application;

[0050] Figure 2 for Figure 1 Schematic diagram of the structure when the midsole plate is lifted;

[0051] Figure 3 A flowchart of a paper detection method provided for an exemplary embodiment of the present application;

[0052] Figure 4 A schematic diagram showing the relationship between the lifting distance of the bottom plate and the amount of remaining paper provided in an exemplary embodiment of the present application;

[0053] Figure 5 A flow chart of a parameter dynamic correction method provided by an exemplary embodiment of the present application;

[0054] Figure 6 A flowchart of a paper detection method provided for an exemplary embodiment of the present application;

[0055] Figure 7 A schematic block diagram of the functional modules of a paper detection device provided in an exemplary embodiment of the present application;

[0056] Figure 8 A structural block diagram of a printing device provided as an exemplary embodiment of the present application;

[0057] Figure 9 A structural block diagram of a computer system provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0058] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.

[0059] It should be understood that the various steps described in the method embodiments of the present application can be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0060] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0061] It should be noted that the modifications of "one" and "multiple" mentioned in this application are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0062] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0063] It is understandable that before using the technical solutions disclosed in the embodiments of this application, the type, scope of use, usage scenarios, etc. of the personal information involved in this application should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0064] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. Thus, based on the prompt message, the user can independently choose whether to provide personal information to the software or hardware such as the printing device, application, server, or storage medium that performs the operation of the technical solution of this application.

[0065] As an optional but non-limiting implementation, in response to receiving a user's active request, the method for sending a prompt to the user can be, for example, a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also contain a selection control for the user to choose "agree" or "disagree" to provide personal information to the printing device. It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this application. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this application.

[0066] During the printing process of the printing device in the embodiment of the present application, the stepper motor will drive the bottom plate at the bottom of the paper box to lift up. By obtaining the lifting distance of the bottom plate in the paper box, the remaining amount of paper in the paper box can be converted, and the status information of the paper in the paper box is displayed on the display panel of the printing device according to the remaining amount of paper, so that the user can obtain the remaining amount of paper in the paper box in real time, and can also remind the user when the remaining amount of paper in the paper box is low, so that the user can replenish the paper in the paper box in time.

[0067] Specifically, such as Figure 1 As shown, Figure 1 The schematic diagram of the paper box structure in the printing device provided in the embodiment of the present application is shown in FIG.

[0068] During the operation of the printing device, the stepper motor provided in the printing device drives the gear 12 to rotate. The gear 12 is connected to the metal sheet 13. When the gear 12 rotates, the metal sheet 13 is driven to rise. The metal sheet 13 is connected to the base plate 11. When the metal sheet 13 rises, the base plate 11 is driven to rise.

[0069] Combine Figure 1 As shown in the embodiment provided in the present application, when the paper box 10 is powered on, as the paper is consumed, the remaining amount of paper in the paper box 10 will change, and at this time the bottom plate 11 in the paper box 10 will also be lifted. Figure 1 As shown, when the paper box 10 is full of paper, the stepper motor does not lift or lifts slightly, and the bottom plate 11 tends to be horizontal; see Figure 2 As shown, when the amount of paper in the paper box 10 gradually decreases, the stepper motor rotates step by step at a constant speed, driving the metal sheet 13 connected to the gear 12 to rise, thereby lifting the bottom plate 11. Because the stepper motor rotates at a constant speed, the rotation angle of each step is the same, so that the bottom plate lifting distance corresponding to each step of rotation is the same. In other words, the lifting distance of the bottom plate is positively correlated with the number of steps of the stepper motor. The lifting distance of a single sheet of paper can be known by the thickness of the single sheet of paper in the paper box. Then, based on the current lifting distance of the bottom plate, the amount of paper consumed and the remaining amount of paper in the paper box can be calculated. Therefore, the embodiment can calculate the remaining amount of paper by the number of steps of the stepper motor when the bottom plate 11 is lifted.

[0070] In this embodiment, when the printing device is operating, the number of steps of the stepper motor can be obtained in real time, and a corresponding relationship can be established between the number of steps of the stepper motor and the lifting distance of the base plate 11. The lifting distance of the base plate is positively correlated with the number of steps of the stepper motor. The greater the number of steps of the stepper motor, the greater the lifting distance of the base plate.

[0071] In the embodiment provided in this application, the lifting distance of the base plate can be calculated in the following manner.

[0072] In the embodiment, the number of steps of the stepper motor is converted into the lifting distance of the carton bottom plate, which can be calculated by the following formula (1):

[0073]

[0074] Among them, S1 represents the number of steps of the stepper motor; L represents the lead, that is, the linear displacement per rotation of the screw. The screw is used to convert the rotational torque of the stepper motor into a driving force in the linear direction. L can also be replaced by C, where C represents the circumference of the pulley; R represents the transmission ratio, that is, the ratio of the reducer or gear (such as 2:1 is 0.5); S represents the number of steps corresponding to one rotation of the stepper motor, S = 360° / θ is the number of steps per rotation, θ represents the step angle, that is, the angle of motor rotation per step (such as 1.8°); m represents the microstep coefficient, that is, the subdivision setting of the driver (such as 1, 2, 4, etc.).

[0075] In the embodiment, as the printing device prints, the remaining amount of paper in the paper box will continue to decrease, and the lifting distance of the bottom plate in the paper box will continue to increase. Since the paper thickness of a single sheet of paper of different types may be different, and when the paper thickness of a single sheet of paper is different, the lifting distance of the bottom plate corresponding to the same S1 will also be different. Specifically, the corresponding relationship between the number of steps rotated by the stepper motor and the lifting distance of the bottom plate under different paper thicknesses can be calculated using the following formula (2):

[0076] D=a*S1 (2)

[0077] Where D represents the lifting distance of the bottom plate, S1 represents the number of steps of the stepper motor, and a represents the lifting threshold corresponding to one step of the stepper motor. The value of a is different for different types of paper.

[0078] In an embodiment, by obtaining the paper thickness of a single sheet of paper in the paper box and the current lifting distance of the bottom plate, the consumption of paper in the paper box can be calculated. Combined with the capacity of the paper box or the initial amount of paper in the paper box, the remaining amount of paper in the paper box can be obtained.

[0079] Specifically, based on the above embodiment, in another embodiment provided in this application, as Figure 3 As shown, an embodiment of the present application provides a paper detection method, which may include the following steps:

[0080] Step 31 , the device is turned on, that is, when the printing device is in the turned-on state, the remaining amount of paper in the paper box will be detected.

[0081] Step 32: Determine the status of the paper box.

[0082] In the embodiment, the state of the paper box is first determined when the machine is turned on, that is, whether the paper box is in an open state or a closed state. When the paper box is in an open state, step 33 is executed; when the paper box is in a closed state, step 34 is executed.

[0083] Step 33: When the paper box is in the open state, the remaining amount of paper is not calculated.

[0084] In the embodiment, when the paper box is in the open state, it indicates that the user may be putting paper or performing other operations, so the remaining amount of paper is not calculated at this time. At this time, when the remaining amount is displayed in step 44, the remaining amount of paper can be displayed as 0, and the paper box is also displayed in the opened state.

[0085] Step 34: When the paper box is in the closed state, determine whether the bottom plate is in place.

[0086] In an embodiment, the state of the bottom plate lifting can be obtained when the machine is powered on to determine whether the bottom plate has been lifted to the desired position.

[0087] When the bottom plate is not lifted into place, step 35 is executed; when the bottom plate is lifted into place, step 37 is executed.

[0088] In step 35, if the bottom plate is not lifted into place at this time, it is necessary to continue lifting the bottom plate and stop after the bottom plate is lifted into place. Then go to step 36.

[0089] Step 36 : Calculate the lifting distance D1 of the base plate, which can be obtained by the above method, and save the obtained value to the printing device.

[0090] In the embodiment, when the remaining amount of paper changes and the bottom plate is lifted, the total lifting steps of the bottom plate are calculated, the steps are converted into a lifting distance, the lifting distance D2 of the bottom plate is obtained, and D2 is saved in real time to the printing device.

[0091] Step 37: The bottom plate is in place, and the lifting distance D2 of the bottom plate is obtained.

[0092] In the embodiment, since the embodiment can calculate the lifting distance D1 of the base plate in real time or periodically and save the value of the lifting distance D1 to the printing device, when the base plate is already in place, the value corresponding to the base plate lifting distance D2 at this time can be read from the printing device.

[0093] In the embodiment, the bottom plate can be lifted to the right position without placing paper in the paper box, and the maximum number of steps of the stepper motor at this time is recorded. The maximum number of steps is converted into the lifting distance of the bottom plate to obtain the maximum lifting distance D of the bottom plate. max And save it to the printing device.

[0094] Step 38: Determine whether the bottom plate lifting distance D2 is greater than or equal to the maximum lifting distance D max .

[0095] If the bottom plate lifting distance D2 is greater than or equal to the maximum lifting distance D max , go to step 39. If not, go to step 40.

[0096] Step 39: When the bottom plate lifting distance D2 is greater than or equal to the maximum lifting distance D max If the paper box is out of paper, the remaining paper amount is 0.

[0097] Step 40: When the bottom plate lifting distance D2 is less than the maximum lifting distance D max In this case, the remaining amount of paper can be calculated, which can be calculated using the following formula (3):

[0098]

[0099] Among them, N represents the remaining amount of paper in the paper box, D2 represents the lifting distance of the bottom plate, and D max Indicates the maximum lifting distance of the bottom plate, and T indicates the thickness of a single sheet of paper.

[0100] Step 41 : Determine whether the remaining paper quantity N is greater than or equal to the paper box capacity N0. If so, proceed to step 42 ; otherwise, proceed to step 43 .

[0101] Step 42: When the remaining amount of paper N is greater than or equal to the paper box capacity N0, it is determined that the paper box is full of paper.

[0102] Step 43 : When the remaining amount of paper N is less than the paper box capacity N0 , calculate the percentage of the remaining amount of paper in the paper box.

[0103] Specifically, the percentage of the remaining paper in the paper box can be calculated by the following formula (4):

[0104]

[0105] Wherein, Q represents the percentage of the remaining amount of paper in the paper box, N represents the remaining amount of paper in the paper box, and N0 represents the capacity of the paper box.

[0106] See also Figure 4 , Figure 4 A schematic diagram showing the relationship between the lifting distance of the bottom plate and the remaining amount of paper provided in an embodiment of the present application.

[0107] Figure 4 In the figure, the horizontal axis represents the bottom plate lifting distance (mm), and the vertical axis represents the percentage of the remaining paper. Figure 4 Including the relationship between the lifting distance of the bottom plate and the remaining amount of paper corresponding to different thicknesses of paper.

[0108] Step 44 : Display the remaining state of paper on the display panel of the printing device, such as paper available, paper out, or the percentage of remaining paper.

[0109] Based on the above embodiment, in another embodiment provided by the present application, the accuracy of the calculation may be affected by the operating environment of the printing device or the differences in the mechanical structure of the printing device. Therefore, to improve the accuracy of the calculation, during the printing process of the printing device, as the paper decreases, the base plate will rise. Since the number of pages printed by the printing device is known, the above-mentioned related parameters can be dynamically corrected based on the base plate rise distance and the number of pages printed.

[0110] like Figure 5 As shown, the parameter dynamic correction method provided in the embodiment of the present application may include the following steps:

[0111] Step 51, device power on, that is, when the printing device is powered on, steps 52 and 59 may be executed.

[0112] Step 52: Issue the printing task.

[0113] In step 53, it is determined whether the bottom plate is lifted. If the bottom plate is not lifted, the determination step is continued.

[0114] When the base plate is raised, step 54 is executed.

[0115] Step 54: Calculate the current lifting distance Dn.

[0116] And in step 55, the number of pages printed this time Pn is obtained.

[0117] In step 56 , the paper thickness Tn of the single sheet of paper during this printing can be calculated based on Dn and Pn , and then step 57 is executed.

[0118] In this embodiment, the initial value of the thickness T of a single sheet of paper can be used as the standard thickness. During printing, as the remaining amount of paper decreases, each time the bottom plate is lifted, the lifting distance Dn can be calculated, and the corresponding number of printed pages Pn can be obtained to update the thickness of the single sheet of paper, that is:

[0119] Tn = Dn / Pn (5)

[0120] Wherein, Tn represents the paper thickness of a single sheet of paper during this printing, Dn represents the lifting distance of the bottom plate during this printing, and Pn represents the number of printed pages during this printing.

[0121] In an embodiment, during the printing process of a printing device, the paper thickness Tn of a single sheet of paper is calculated. When the paper thickness Tn is inconsistent with the above standard thickness, the calculated paper thickness Tn can be used to replace the single-sheet paper thickness T to correct the paper thickness of the single sheet, so that the remaining amount of paper in the paper tray can be calculated more accurately.

[0122] Step 57, determine whether the paper tray has paper and meets the conditions.

[0123] In an embodiment, if 0.7T < Tn < 1.3T and it is detected by a sensor that the state in the paper tray is that there is paper, then subsequently Tn can be used instead of T to calculate the remaining amount of paper, and in this way, the remaining amount of paper in the paper tray can be calculated more accurately.

[0124] Step 58, when 0.7T < Tn < 1.3T and the state in the paper tray is that there is paper, it can be determined that the paper tray has paper and meets the conditions, and in this way, Tn obtained by calculation can be used instead of T to update the paper thickness.

[0125] In an embodiment, step 59 can also be used to detect the paper state in the paper tray in real time or periodically.

[0126] Step 60, determine whether the paper tray is short of paper. If the paper tray is not short of paper, return to step 59 to continue detecting the paper state in the paper tray.

[0127] If the paper tray is short of paper, in step 61, obtain the total lifting distance of the bottom plate, and update the maximum lifting distance of the above bottom plate according to this total distance.

[0128] Step 62, update D max value.

[0129] In an embodiment, when the state of the paper tray is that there is no paper, that is, when the paper tray is short of paper, the total lifting distance of the bottom plate can be obtained, and the above D max value can be updated according to this lifting total distance, and this value is saved to the printing device. [[ID=二十九]]

[0130] [[]]Based on the above embodiments, the embodiments of the present application provide that when processing the remaining amount of paper, the following steps can be included:

[0131] 1) Obtain the remaining amount information of the paper in the paper tray.

[0132] In an embodiment, when the remaining amount of paper in the paper tray changes, or when the presence or absence state of the paper in the paper tray changes, the remaining amount information of the paper can be generated, and this remaining amount information is sent to the upper layer such as the controller. The presence or absence state of the paper refers to that the sensor set in the paper tray can detect whether there is paper or no paper in the paper tray.

[0133] 2) The upper layer displays the status of the paper box on the display panel based on the remaining amount information of the received paper.

[0134] In the embodiment, when the remaining amount of paper in the paper box exceeds 10%, the paper box status is normal; when the remaining amount of paper is lower than the warning value, the paper box status is almost empty; when the remaining amount of paper is 0%, but the paper status is paper in, the paper box status is almost empty; when the remaining amount of paper is 0%, but the paper status is no paper, the paper box status is out of paper.

[0135] 3) Users can check the status of the paper box or set alarm thresholds.

[0136] In an embodiment, a user can view the status of a paper tray in the paper tray settings. Upon receiving a user request to view the status, the corresponding paper tray status is displayed on the display panel. The user can also set a remaining paper alarm threshold, prompting the user to replenish paper promptly when the remaining paper level falls below the threshold. For example, in an embodiment, the default alarm threshold may be 10%, and the specific setting can be as needed, and the embodiment is not limited to this.

[0137] Based on the above embodiment, the embodiment of the present application further provides a paper detection method, which is applied to a printing device, the printing device including a paper box and a stepper motor, the paper box is provided with a bottom plate, the stepper motor is used to drive the bottom plate to lift, such as Figure 6 As shown, the method may include the following steps:

[0138] In step S610 , the number of steps of the stepping motor is obtained, and the current lifting distance of the base plate is determined based on the number of steps.

[0139] Among them, the lifting distance of the base plate is positively correlated with the number of steps.

[0140] In conjunction with the above embodiment, it can be seen that when the printing device is printing, as the remaining amount of paper in the paper box decreases, the stepper motor can drive the bottom plate to lift through the gear. The more steps the stepper motor has, the greater the lifting distance of the bottom plate. Therefore, the lifting distance of the bottom plate is positively correlated with the number of steps. In the embodiment, the lifting distance of the bottom plate can be determined based on the number of steps of the stepper motor. For example, the lifting distance of the bottom plate can be calculated using the above formula (1).

[0141] In step S620 , the paper thickness of the single paper in the paper box is obtained.

[0142] In an embodiment, the printing device may pre-store a standard thickness of a single sheet of paper, and may use the standard thickness as the paper thickness of the single sheet of paper in the paper box; or may obtain the paper thickness of the single sheet of paper input by the user through the display panel of the printing device, so that the printing device can obtain the paper thickness of the single sheet of paper during printing.

[0143] In the embodiment, since the thickness of a single sheet of paper of different types of paper may be different, and in the case of different thickness of a single sheet of paper, the same number of steps of the stepper motor rotates corresponding to the lifting distance of the bottom plate will also be different, it can be combined with Figure 4 As shown, the lifting distance of the bottom plate is different for papers with different paper thicknesses. Therefore, it is necessary to obtain the paper thickness of a single sheet of paper when the printing device is printing in order to calculate the remaining amount of paper in the paper box.

[0144] In step S630 , the remaining amount of paper in the paper cassette is determined based on at least the current lifting distance of the bottom plate and the thickness of the paper.

[0145] In an embodiment, when the current lifting distance of the bottom plate and the thickness of the paper are obtained, the consumption of paper for this printing can be calculated based on the current lifting distance of the bottom plate and the thickness of the paper. Before this printing, if the paper box is full, the first remaining amount of paper in the current paper box can be obtained by subtracting the first consumption of the paper from the capacity of the paper box.

[0146] Before this printing, if the paper box status is not full, the initial amount of paper in the paper box before this printing can be obtained, and the second remaining amount of paper in the current paper box can be obtained by subtracting the second consumption of paper for this printing from the initial amount.

[0147] In an embodiment, the remaining amount of paper in the paper box can be expressed as the remaining number of paper, or can be expressed as a remaining percentage of paper, which can be specifically obtained by the ratio of the remaining number of paper to the capacity of the paper box.

[0148] The paper detection method provided in the embodiments of the present application determines the current lift distance of the base plate by obtaining the number of rotation steps of the stepper motor. Furthermore, the remaining amount of paper in the paper box is determined based on the thickness of the individual sheets in the paper box and the current lift distance of the base plate. This eliminates the need for additional sensors in the paper box to detect paper, thereby reducing the hardware cost of the printing device.

[0149] Based on the above embodiment, in the embodiment provided in this application, the above step S630 may further include the following steps:

[0150] In step S631 , when the current lifting distance of the bottom plate is not less than the maximum lifting distance of the bottom plate, it is determined that the remaining amount of paper in the paper box is zero.

[0151] In an embodiment, if the current lifting distance of the bottom plate is not less than the maximum lifting distance of the bottom plate, it means that the current lifting distance of the bottom plate is greater than or equal to the maximum lifting distance of the bottom plate. At this time, the lifting height of the bottom plate is already the highest, and it can be determined that the remaining amount of paper in the paper box is zero. At this time, it can be quickly determined whether the remaining amount of paper in the paper box is zero based on the current lifting height of the bottom plate.

[0152] Based on the above embodiment, in the embodiment provided in this application, the above step S630 may further include the following steps:

[0153] In step S632 , when the current lifting distance of the bottom plate is less than the maximum lifting distance of the bottom plate, a first consumption of paper in the paper box is determined based on the current lifting distance of the bottom plate, the maximum lifting distance, and the thickness of the paper.

[0154] In an embodiment, when obtaining the maximum lifting distance of the bottom plate, when it is detected that no paper is placed in the paper box, a first lifting distance of the bottom plate may be obtained, and the first lifting distance may be used as the maximum lifting distance.

[0155] In an embodiment, the first consumption of paper in the paper box can be determined based on the current lifting distance of the bottom plate, the maximum lifting distance, and the paper thickness obtained in the above manner.

[0156] In step S633 , the remaining amount of paper in the paper cassette is determined based on the first consumption amount of paper in the paper cassette and the maximum capacity of the paper cassette.

[0157] In an embodiment, the remaining amount of paper in the paper box can be determined by the difference between the remaining amount of paper in the paper box and the maximum capacity of the paper box, wherein the capacity of the paper box can be the maximum number of paper that the paper box can accommodate.

[0158] In an embodiment, the above-mentioned method can be to determine the remaining amount of paper in the paper box by obtaining the remaining amount of paper in the paper box after the printing job is completed when the paper box is in a full box state before the printing job.

[0159] In another embodiment provided by the present application, if the paper box is not full before printing, it can be obtained that the paper box has a first total paper amount when the printing device starts working, and the first total paper amount is less than or equal to the maximum capacity of the paper box. In this case, the above-mentioned step S630 may further specifically include the following steps:

[0160] In step S634 , based on the current lifting distance and the paper thickness, a second consumption amount of paper in the paper box is determined.

[0161] In step S635 , a second remaining amount of paper in the paper box is obtained based on the second consumption amount and the first total amount of paper.

[0162] In an embodiment, a second amount of paper consumed during this printing can be obtained by dividing the current lifting distance of the bottom plate by the thickness of a single sheet of paper. A second remaining amount of paper in the paper box can be obtained by the difference between the second amount of paper consumed and the first total amount of paper.

[0163] In an embodiment, when the paper box is not full before printing, in order to obtain the first total amount of paper in the paper box, an input operation of the user on the display panel can be received, and the first total amount of paper input by the user can be obtained through the input operation.

[0164] For example, in general, the quantity of each pack of paper is known and determined, so the user can directly input the number of packs of paper put into the paper box, and the printing device can determine the first total amount of paper in the output paper box according to the user's input operation.

[0165] In an embodiment, a scale line may be provided inside the paper box to indicate the total amount of paper placed in the paper box to the user. The user may determine a first total amount of paper placed in the paper box based on the scale line and input the information via the display panel, so that the printing device receives the user's input and determines the first total amount of paper in the paper box.

[0166] Based on the above embodiment, in another embodiment provided in this application, the method may further include the following steps:

[0167] In step S640 , when it is detected that the paper in the paper box is exhausted, a first lifting distance of the bottom plate is acquired.

[0168] In step S650 , the maximum lift distance is corrected based on the first lift distance.

[0169] In the embodiment, the maximum lifting distance of the bottom plate may vary due to the mechanical structure or usage environment of the printing device. Once the maximum lifting distance of the bottom plate changes, the calculated remaining amount of paper in the paper box may be inaccurate.

[0170] Therefore, the embodiment can obtain the first lifting distance of the bottom plate at this time when it is detected that the paper placed in the paper box is exhausted, and can use the first lifting distance as the maximum lifting distance of the bottom plate to correct the previous maximum lifting distance of the bottom plate.

[0171] Based on the above embodiment, in another embodiment provided in this application, the method may further include the following steps:

[0172] In step S660, during the printing process of the printing device, the number of printed pages is obtained.

[0173] In step S670 , the paper thickness is corrected based on the number of printed pages and the current lift distance.

[0174] In the embodiment, since different types of paper have different thicknesses of individual sheets, if the thickness of the paper changes, the calculated remaining amount of paper in the paper box may be inaccurate.

[0175] Therefore, during the printing process of the printing device, the number of printed pages can be obtained. Based on this number of pages and the current lifting distance, the thickness of a single sheet of paper in the current stack can be calculated. That is, by dividing the current lifting distance by the number of printed pages, the thickness of a single sheet of the current paper can be obtained, achieving an update of the paper thickness.

[0176] Based on the above embodiments, the above paper thickness can be the first thickness. Without verifying whether the thickness of the paper in the current paper tray is the first thickness, step S670 can specifically further include the following steps:

[0177] In step S671, based on the number of printed pages and the current lifting distance, the second thickness of a single sheet of paper in the paper tray is obtained.

[0178] In step S672, when the second thickness is within the target range, the second thickness is used as the thickness of a single sheet of paper in the paper tray; wherein, the target range is determined based on the first thickness and a preset offset.

[0179] In the embodiment, when starting to print, the thickness of a single sheet of paper in the paper tray can be set as the first thickness. For example, the first thickness can be a default standard value. To avoid the thickness of a single sheet of paper in the current paper tray not being the first thickness, in the embodiment, the second thickness of a single sheet of paper in the current paper tray can be calculated through the number of printed pages and the current lifting distance. If it is within the target range, that is, the value of the second thickness does not deviate too much from the first thickness, it indicates that the second thickness meets the requirements, and the thickness of a single sheet of paper in the current paper tray can be corrected based on the second thickness, so that the remaining amount of paper in the paper tray can be calculated more accurately.

[0180] For example, the initial value of the thickness T of a single sheet of paper in the paper tray is the standard thickness. During the printing process of the printing device, as the remaining amount of paper decreases, each time the bottom plate is lifted, the lifting distance Dn of the bottom plate can be calculated, and the corresponding number of printed pages Pn can be obtained. In this way, the thickness Tn of a single sheet of paper obtained this time can be calculated through Tn = Dn / Pn.

[0181] In the case of (T - (T * m)) < Tn < (T + (T * m)), subsequently, Tn can be used to replace T to calculate the remaining amount of paper, achieving the purpose of correcting T with Tn, making the obtained thickness of a single sheet of paper more accurate, and avoiding the situation where when the type of paper in the paper tray changes, the calculated remaining amount of paper in the paper tray is inaccurate due to the change in the thickness of a single sheet of paper.

[0182] It should be noted that the above m is an offset, which can be 20% or 30%, etc., and can be set specifically as needed, and the embodiment is not limited thereto. In addition, T*m represents the degree of deviation between Tn and T, and [T-(T*m), T+(T*m)] represents the target interval. Since the difference between the thickness of each type of paper is within a certain range, if the calculated Tn differs greatly from T, there may be a problem with the calculation. Therefore, the accuracy of T can be verified by determining whether T is within the target interval. When Tn is within the target interval, Tn can be used as the paper thickness of the subsequent single sheet. Otherwise, it means that Tn is inaccurate and can be discarded and recalculated.

[0183] In the embodiment, the paper thickness of the current paper may be calculated multiple times, and the paper thickness may be corrected using the obtained average value.

[0184] In this way, the remaining amount of paper in the paper tray can be determined based on at least the current lifting distance of the bottom plate and the corrected paper thickness, so that the calculated remaining amount of paper in the paper tray will be more accurate.

[0185] Based on the above embodiment, in another embodiment provided in this application, the method may further include the following steps:

[0186] In step S680 , status information of the paper cassette is generated based on the remaining amount of paper.

[0187] In step S690, status information is displayed on the display panel of the printing apparatus.

[0188] In an embodiment, for example, when the remaining amount of paper exceeds 10%, the paper box status displayed on the display panel may be normal; when the remaining amount of paper is lower than the warning value, the paper box status displayed on the display panel may be almost empty; when the remaining amount of paper is 0%, but the paper status is paper in, the paper box status displayed on the display panel may be almost empty; when the remaining amount of paper is 0%, but the paper status is no paper, the paper box status displayed on the display panel may be out of paper.

[0189] The embodiment displays the status information of the paper box so that the user can obtain the remaining amount of paper in the paper box in real time, and can also remind the user when the remaining amount of paper in the paper box is low so that the user can replenish the paper in the paper box in time.

[0190] In the case of dividing each functional module according to each function, an embodiment of the present application provides a paper detection device, which can be applied to a printing device. The printing device includes a paper box and a stepper motor. The paper box is provided with a bottom plate, and the stepper motor is used to drive the bottom plate to rise. Figure 7 This is a schematic block diagram of the functional modules of a paper detection device provided by an exemplary embodiment of the present application. Figure 7 As shown, the paper detection device includes:

[0191] a lifting distance calculation module 71 for obtaining the number of steps of the stepper motor and determining the current lifting distance of the base plate based on the number of steps; wherein the lifting distance of the base plate is positively correlated with the number of steps;

[0192] A paper thickness obtaining module 72 is used to obtain the paper thickness of a single sheet of paper in the paper box;

[0193] The paper remaining amount obtaining module 73 is configured to determine the remaining amount of paper in the paper box based at least on the current lifting distance of the bottom plate and the thickness of the paper.

[0194] In another embodiment provided by the present application, the remaining paper amount obtaining module 73 is further configured to:

[0195] When the current lifting distance of the bottom plate is not less than the maximum lifting distance of the bottom plate, it is determined that the remaining amount of paper in the paper box is zero.

[0196] In another embodiment provided by the present application, the remaining paper amount obtaining module 73 is further configured to:

[0197] When the current lifting distance of the bottom plate is less than the maximum lifting distance of the bottom plate, determining a first consumption of paper in the paper box based on the current lifting distance of the bottom plate, the maximum lifting distance and the thickness of the paper;

[0198] A first remaining amount of paper in the paper cassette is determined based on a first consumption amount of paper in the paper cassette and a maximum capacity of the paper cassette.

[0199] In another embodiment provided by the present application, when the printing device starts working, the paper box has a first total paper amount, and the first total paper amount is less than or equal to the maximum capacity of the paper box; the paper remaining amount acquisition module 73 is further configured to:

[0200] determining a second consumption of paper in the paper box based on the current lifting distance and the paper thickness;

[0201] A second remaining amount of paper in the paper box is obtained based on the second consumption amount and the first total amount of paper.

[0202] In another embodiment provided by the present application, the device further includes a maximum lifting distance correction module, specifically configured to:

[0203] When it is detected that the paper in the paper box is exhausted, obtaining a first lifting distance of the bottom plate;

[0204] The maximum lift distance is corrected based on the first lift distance.

[0205] In another embodiment provided by the present application, the device further includes a paper thickness correction module, specifically configured to:

[0206] During the printing process of the printing device, obtaining the number of printed pages;

[0207] The paper thickness is corrected based on the number of printed pages and the current lift distance.

[0208] The paper thickness is a first thickness, and the paper thickness correction module is further configured to:

[0209] Obtaining a second thickness of a single sheet of paper in the paper box based on the number of printed pages and the current lifting distance;

[0210] When the second thickness is within a target range, the second thickness is used as the paper thickness of a single sheet of paper in the paper box; wherein the target range is determined based on the first thickness and a preset offset.

[0211] In another embodiment provided by the present application, the remaining paper amount obtaining module 73 is further configured to:

[0212] The remaining amount of paper in the paper cassette is determined based on at least the current lifting distance of the bottom plate and the corrected paper thickness.

[0213] In another embodiment provided by the present application, the device further includes an information display module, specifically configured to:

[0214] generating status information of the paper box based on the remaining amount of the paper;

[0215] The status information is displayed on a display panel of the printing device.

[0216] The paper detection device provided in the embodiments of the present application determines the current lift distance of the base plate by obtaining the number of rotation steps of the stepper motor. Furthermore, the remaining amount of paper in the paper box is determined based on the thickness of the individual sheets in the paper box and the current lift distance of the base plate. This eliminates the need for additional sensors in the paper box to detect paper, thereby reducing the hardware cost of the printing device.

[0217] An embodiment of the present application also provides a printing device, comprising: at least one processor; a memory for storing instructions executable by the at least one processor; wherein the at least one processor is configured to execute the instructions to implement the above method disclosed in the embodiment of the present application.

[0218] Figure 8 This is a schematic diagram of the structure of a printing device provided by an exemplary embodiment of the present application. Figure 8 As shown, the printing device 1800 includes at least one processor 1801 and a memory 1802 coupled to the processor 1801. The processor 1801 can execute corresponding steps in the above method disclosed in the embodiment of the present application.

[0219] The processor 1801 can also be referred to as a central processing unit (CPU), which can be an integrated circuit chip with signal processing capabilities. Each step in the above method disclosed in the embodiment of the present application can be completed by hardware integrated logic circuits in the processor 1801 or software instructions. The processor 1801 can be a general-purpose processor, a digital signal processor (DSP), an ASIC (Application Specific Integrated Circuit), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly implemented as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in the memory 1802, such as a random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other storage media mature in the art. The processor 1801 reads the information in the memory 1802 and, in conjunction with its hardware, completes the steps of the above method.

[0220] In addition, when various operations / processes according to the present application are implemented by software and / or firmware, they can be transmitted from a storage medium or a network to a computer system with a dedicated hardware structure, such as Figure 9 The computer system 1900 shown is installed with the programs constituting the software. When the various programs are installed, the computer system can perform various functions, including the functions described above. Figure 9 A structural block diagram of a computer system provided for an exemplary embodiment of the present application.

[0221] like Figure 9As shown, computer system 1900 includes a computing unit 1901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1902 or a computer program loaded from a storage unit 1908 into a random access memory (RAM) 1903. Various programs and data required for the operation of computer system 1900 may also be stored in RAM 1903. Computing unit 1901, ROM 1902, and RAM 1903 are connected to each other via a bus 1904. An input / output (I / O) interface 1905 is also connected to bus 1904.

[0222] Several components within computer system 1900 are connected to I / O interface 1905, including an input unit 1906, an output unit 1907, a storage unit 1908, and a communication unit 1909. Input unit 1906 can be any type of device capable of inputting information into computer system 1900. Input unit 1906 can receive input numeric or character information and generate key input signals related to user settings and / or function control of a printing device. Output unit 1907 can be any type of device capable of presenting information and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. Storage unit 1908 may include, but is not limited to, a magnetic disk or an optical disk. Communication unit 1909 allows computer system 1900 to exchange information / data with other devices over a network, such as the Internet, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver and / or chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0223] The computing unit 1901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units for running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1901 performs the various methods and processes described above. For example, in some embodiments, the above-mentioned method disclosed in the embodiments of the present application may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1908. In some embodiments, part or all of the computer program may be loaded and / or installed on a printing device via ROM 1902 and / or communication unit 1909. In some embodiments, the computing unit 1901 may be configured to perform the above-mentioned method disclosed in the embodiments of the present application by any other appropriate means (e.g., by means of firmware).

[0224] An embodiment of the present application also provides a computer-readable storage medium, wherein, when instructions in the computer-readable storage medium are executed by a processor of a printing device, the printing device is enabled to execute the above method disclosed in the embodiment of the present application.

[0225] The computer-readable storage medium in the embodiment of the present application can be a tangible medium, which can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. The above-mentioned computer-readable storage medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the above. More specifically, the above-mentioned computer-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device or any suitable combination of the above.

[0226] The computer-readable medium may be included in the printing device, or may exist independently without being incorporated into the printing device.

[0227] An embodiment of the present application further provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the method disclosed in the embodiment of the present application is implemented.

[0228] In an embodiment of the present application, the computer program code for the operation of performing the present application can be written with one or more programming languages ​​or their combination, and above-mentioned programming language includes but is not limited to object-oriented programming language, such as Java, Smalltalk, C++, also comprises conventional procedural programming language, such as " C " language or similar programming language.Program code can be executed on user's computer completely, partly on user's computer, execute as an independent software package, partly on user's computer, partly on remote computer, or execute completely on remote computer or server.In the situation relating to remote computer, remote computer can be connected to user's computer by the network (comprising local area network (LAN) or wide area network (WAN)) of any type, perhaps, can be connected to external computer.

[0229] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0230] The modules, components, or units described in the embodiments of the present application may be implemented in software or hardware. The names of the modules, components, or units do not necessarily limit the modules, components, or units themselves.

[0231] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, and without limitation, exemplary hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0232] The above descriptions are merely some embodiments of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in this application is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.

[0233] Although some specific embodiments of the present application have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present application. It should be understood by those skilled in the art that the above examples may be modified without departing from the scope and spirit of the present application. The scope of the present application is defined by the appended claims.

Claims

1. A paper detection method, characterized in that: Applied to a printing device, the printing device includes a paper box and a stepper motor, the paper box is provided with a bottom plate, the stepper motor is used to drive the bottom plate to lift, the method includes: Obtaining the number of steps of the stepper motor, and determining the current lifting distance of the base plate based on the number of steps; wherein the lifting distance of the base plate is positively correlated with the number of steps; Obtaining the paper thickness of a single sheet of paper in the paper box; The remaining amount of paper in the paper cassette is determined based on at least the current lifting distance of the bottom plate and the thickness of the paper.

2. The method according to claim 1, characterized in that The determining the remaining amount of paper in the paper box based at least on the current lifting distance of the bottom plate and the thickness of the paper includes: When the current lifting distance of the bottom plate is not less than the maximum lifting distance of the bottom plate, it is determined that the remaining amount of paper in the paper box is zero.

3. The method according to claim 1, characterized in that The determining the remaining amount of paper in the paper box based at least on the current lifting distance of the bottom plate and the thickness of the paper includes: When the current lifting distance of the bottom plate is less than the maximum lifting distance of the bottom plate, determining a first consumption of paper in the paper box based on the current lifting distance of the bottom plate, the maximum lifting distance and the thickness of the paper; A first remaining amount of paper in the paper cassette is determined based on a first consumption amount of paper in the paper cassette and a maximum capacity of the paper cassette.

4. The method according to claim 1 or 3, characterized in that When the printing device starts working, the paper box has a first total paper volume, and the first total paper volume is less than or equal to the maximum capacity of the paper box; The determining the remaining amount of paper in the paper box based at least on the current lifting distance of the bottom plate and the thickness of the paper includes: determining a second consumption of paper in the paper box based on the current lifting distance and the paper thickness; A second remaining amount of paper in the paper box is obtained based on the second consumption amount and the first total amount of paper.

5. The method according to claim 2 or 3, characterized in that The method further comprises: When it is detected that the paper in the paper box is exhausted, obtaining a first lifting distance of the bottom plate; The maximum lift distance is corrected based on the first lift distance.

6. The method according to claim 1, characterized in that The method further comprises: During the printing process of the printing device, obtaining the number of printed pages; The paper thickness is corrected based on the number of printed pages and the current lift distance.

7. The method according to claim 6, characterized in that The paper thickness is a first thickness, and the correcting the paper thickness based on the number of printed pages and the current lifting distance includes: Obtaining a second thickness of a single sheet of paper in the paper box based on the number of printed pages and the current lifting distance; When the second thickness is within a target range, the second thickness is used as the paper thickness of a single sheet of paper in the paper box; wherein the target range is determined based on the first thickness and a preset offset.

8. The method according to claim 1, characterized in that The method further comprises: generating status information of the paper box based on the remaining amount of the paper; The status information is displayed on a display panel of the printing device.

9. A paper detection device, characterized in that: Applicable to a printing device, the printing device includes a paper box and a stepper motor, the paper box is provided with a bottom plate, the stepper motor is used to drive the bottom plate to lift, and the device also includes: a lifting distance calculation module, configured to obtain the number of steps of the stepper motor and determine the current lifting distance of the base plate based on the number of steps; wherein the lifting distance of the base plate is positively correlated with the number of steps; A paper thickness obtaining module, used for obtaining the paper thickness of a single sheet of paper in the paper box; The paper remaining amount obtaining module is configured to determine the remaining amount of paper in the paper box based at least on the current lifting distance of the bottom plate and the thickness of the paper.

10. A printing device, characterized in that: include: at least one processor; a memory for storing the at least one processor-executable instruction; The at least one processor is configured to execute the instructions to implement the method according to any one of claims 1 to 8.