Printer label seam positioning method, printing method and electronic equipment
Through the sensor, the voltage change characteristics of the label paper surface are collected and compared with the seam positioning model, the problem of inaccurate identification of label paper gaps is solved, and the efficiency and accuracy of label printing is achieved.
Patent Information
- Application Number
- CN202510597044.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-15
AI Technical Summary
The prior art is difficult to accurately identify the gaps between different face papers in different types of label papers, resulting in a decrease in label printing efficiency and accuracy.
The voltage change characteristics of the label paper surface are collected through sensors and compared with the seam positioning model to determine the joint position of the label paper.
It realizes accurate identification of adjacent surface paper gaps in different types of label paper, improves the accuracy of seam positioning, avoids misjudgment caused by factors such as light transmission and inconsistent seam length, and enhances the stability and reliability of the system.
Smart Images

Figure CN120481469A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of printers, and in particular to a seam positioning method, a printing method and an electronic device for a printer label. Background Art
[0002] In the field of label printing, label positioning is a key technology for achieving precise printing. With the widespread application of label printing technology in logistics, retail, healthcare, and other fields, the types of label paper that label printers need to adapt to are becoming increasingly diverse. Different types of label paper exhibit significant differences in label size, gap width, and label transparency.
[0003] Due to the above differences, in related technologies, when faced with diversified label papers, label printers find it difficult to accurately identify the gaps between different surface papers in different types of label papers, which in turn affects the efficiency and accuracy of label printing and easily results in missing printed characters. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a seam positioning method, a printing method and an electronic device for printer labels, which can accurately locate the gaps between different surface papers in different types of label papers.
[0005] In order to solve the above technical problems, a technical solution adopted by the present invention is: A method for locating the seam of a printer label is used in an electronic device, wherein the electronic device includes a sensor, and the electronic device is equipped with label paper. The sensor is used to collect the voltage of the label paper surface; the method includes: During the paper feeding process of the printing process, the sensor collects the first voltage of the current label paper surface and records the real-time change characteristics of the first voltage; Inputting the real-time change characteristics into the seam positioning model for comparison; If the target change feature of the target label paper in the seam positioning model is consistent with the real-time change feature, the voltage collection position corresponding to the real-time change feature on the current label paper surface is determined to be the seam of the current label paper.
[0006] In order to solve the above technical problems, another technical solution adopted by the present invention is: A method for printing a label using a printer, comprising: In response to a print instruction, determining the seam of the current label paper according to the seam positioning method of the printer label, so as to stop printing at the seam; The top of the face paper of the current label paper is determined based on the seam of the current label paper, so as to start printing at the top of the face paper.
[0007] In order to solve the above technical problems, another technical solution adopted by the present invention is: An electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, each step of the above-mentioned method for locating the seam of a printer label is implemented.
[0008] The beneficial effects of the present invention are as follows: the first voltage of the current label paper surface is collected by the sensor, and the real-time change characteristics of the first voltage are recorded, and then compared with the seam positioning model. When the real-time change characteristics are consistent with the target change characteristics in the seam positioning model, it can be determined that the position where the current voltage collects this real-time change characteristic is the seam position of the current label paper. The present invention can accurately identify the gap between adjacent surface papers in different types of label paper, that is, the seam, through the voltage change characteristics of the label paper surface. This is because the voltage change characteristics of different types of label paper at the gap are consistent, and there will be no differences due to the dielectric material or the length of the seam. It can effectively avoid misjudgments caused by factors such as the light transmittance of the label paper and inconsistent seam lengths, thereby improving the accuracy of seam positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 A flowchart of a method for locating a seam of a printer label provided by an embodiment of the present invention; Figure 2 This is a schematic diagram of voltage changes at the seam of ordinary label paper; Figure 3 This is a schematic diagram of voltage changes at the seam of pre-printed label paper; Figure 4 This is a schematic diagram of the voltage change at the seam of ultra-thin label paper; Figure 5 A flow chart of a method for generating a seam positioning model provided by an embodiment of the present invention; Figure 6 A flow chart of a seam positioning method provided by an embodiment of the present invention; Figure 7 A schematic diagram of the architecture of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0010] In order to make the technical problems, technical solutions and beneficial effects to be solved by this application more clearly understood, this application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0011] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0012] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0013] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0014] In the related art, label printers usually use phototransistor radiation or reflection to locate labels. The principle is to use the difference in current flowing through the transistor under different light intensities, convert the current signal into a voltage signal through a simple current-voltage conversion, and then use the analog-to-digital conversion technology of the microcontroller unit to detect the current voltage value. When the voltage is higher or lower than the preset threshold, it is determined to be a label or a gap. However, when label printers are adapted to different types of label paper, due to the significant differences in label size, gap width, and label transmittance among different types of label paper, it is easy to cause deviations in voltage value detection, making it difficult to accurately identify the gaps between different surface papers in different types of label paper, thereby affecting the efficiency and accuracy of label printing.
[0015] In order to solve the above problems, the present application provides a seam positioning method, a printing method and an electronic device for a printer label.
[0016] Embodiments of the present application provide a method for locating the seam of a printer label, for use in an electronic device comprising a sensor equipped with label paper. The sensor is configured to detect a voltage on the surface of the label paper. In some embodiments, the electronic device is a label printer or a financial terminal such as a POS terminal or cash register that includes a label printer. The label paper comprises a base paper and a face paper, with several face papers covering the base paper. The gap between adjacent face papers (where only the base paper is included in the gap) is the seam.
[0017] Please refer to Figure 1 The method includes steps S110 to S130.
[0018] Step S110: During the paper feeding process of the printing process, a first voltage of the current label paper surface is collected by a sensor, and a real-time change characteristic of the first voltage is recorded.
[0019] Step S120: inputting the real-time change features into the seam positioning model for comparison.
[0020] Step S130: If the target change feature of the target label paper is consistent with the real-time change feature in the seam positioning model, the voltage collection position corresponding to the real-time change feature on the current label paper surface is determined to be the seam of the current label paper.
[0021] As can be seen from the above embodiment, the first voltage of the current label paper surface is collected by the sensor, and the real-time change characteristics of the first voltage are recorded, and then compared with the seam positioning model. When the real-time change characteristics are consistent with the target change characteristics in the seam positioning model, it can be determined that the position where the current voltage collects this real-time change characteristic is the seam position of the current label paper. The present invention can accurately identify the gap between adjacent surface papers in different types of label paper, that is, the seam, through the voltage change characteristics of the label paper surface. This is because the voltage change characteristics of different types of label paper at the gap are consistent, and there will be no differences due to the dielectric material or the seam length. It can effectively avoid misjudgments caused by factors such as the light transmittance of the label paper and inconsistent seam lengths, thereby improving the accuracy of seam positioning.
[0022] In one embodiment of the present application, the method of recording the real-time variation characteristics of the first voltage in step S110 includes steps S210 - S220 .
[0023] Step S210: Record the value change of the first voltage.
[0024] Step S220: determining a value change value between two first voltages with adjacent acquisition times from the value change of the first voltage, and extracting a real-time change feature according to the value change value.
[0025] In one embodiment of the present application, when the number of collected first voltages is greater than a preset sampling threshold, step S220 is executed. The sampling threshold can be set to 30. When the number of collected first voltages is greater than 30, real-time change features are extracted based on the changes in the collected values of the first voltage. By adjusting the sampling threshold, the accuracy of the label printer in capturing voltage changes and the efficiency of the system can be effectively balanced. A smaller sampling threshold may cause the system to be overly sensitive to capturing voltage changes, and a larger sampling threshold may miss important voltage change information. Therefore, by reasonably setting the sampling threshold, the accuracy of voltage change feature extraction can be guaranteed while avoiding frequent system intervention due to excessive misjudgments. This not only ensures the normal operation of the label printer, but also improves the overall efficiency of the system.
[0026] As can be seen from the above examples, by calculating the change between two adjacent voltage values, subtle voltage changes can be accurately captured, improving detection resolution. Extracting real-time change features from the numerical change between two voltages simplifies complex voltage data, avoids complex analysis of the original voltage data, reduces the computational effort for feature extraction, and ensures accuracy.
[0027] In one embodiment of the present application, the numerical change value is equal to the first voltage value currently collected minus the second voltage value collected last time, wherein the method of extracting real-time change features based on the numerical change value in step S220 includes steps S310-S340.
[0028] Step S310: If the numerical change value is continuously positive, the voltage change feature corresponding to the numerical change value in the numerical change is recorded as rising.
[0029] Step S320: If the numerical change value is continuously negative, the voltage change feature corresponding to the numerical change value in the numerical change is recorded as a decrease.
[0030] Step S330: If the numerical change value is continuously smaller than the preset minimum value, the voltage change characteristic corresponding to the numerical change value in the numerical change is recorded as stable.
[0031] Step S340: Generate a real-time change feature according to all voltage change features in the value change.
[0032] In one embodiment of the present application, the first voltage values are arranged in sequence according to the acquisition time, and therefore the numerical change values corresponding to the first voltage values are also arranged in sequence according to the acquisition time. When the acquisition times are adjacent and the number of positive numerical change values is greater than a preset number, the numerical change values are determined to be continuously positive; when the acquisition times are adjacent and the number of negative numerical change values is greater than a preset number, the numerical change values are determined to be continuously negative; when the acquisition times are adjacent and the number of numerical change values that are less than a preset minimum value is greater than a preset number, the numerical change values are determined to be continuously less than the preset minimum value. For example, the first voltage values arranged in order of acquisition time are {3V, 3.3V, 3.5V, 3.7V, 3.8V, 3.9V, 3.85V, 3.77V, 3.65V, 3.45V, 3.21V, 3.211V, 3.21V, 3.209V, 3.208V, 3.209V}, and the numerical change values corresponding to the first voltage values are {0.3V, 0.2V, 0.2V, 0.1V, 0.1V, -0.05V, -0.08V, -0.12V, -0.2V, -0.24V, 0.001V, -0.001V, -0.001V, -0.001V, 0.001V}. If the preset number is 4, then the number of consecutive acquisitions of {0.3V, 0.2V, 0.2V, 0.1V, 0.1V} with positive values is 6, so the value change is determined to be a continuous positive value. Furthermore, the number of consecutive acquisitions of {-0.05V, -0.08V, -0.12V, -0.2V, -0.24V} with negative values is 5, so the value change is determined to be a continuous negative value. If the preset minimum value is 0.005V, the number of consecutive acquisitions of {0.001V, -0.001V, -0.001V, -0.001V, 0.001V} with values less than 0.005V is 5, so the value change is determined to be a continuous value less than the preset minimum value.
[0033] In one embodiment of the present application, after generating real-time change features based on all voltage change features in the numerical change in step S430, the method further includes: recording the currently generated real-time change features as a first set of real-time change features, returning to execute steps S210-S220 to obtain a second set of real-time change features, and repeating this process multiple times to obtain at least two sets of real-time change features. The two sets of real-time change features are then compared to determine whether they are consistent. If they are consistent, the real-time change features are determined to be repeatable, and step S120 is executed below. If they are inconsistent, the real-time change features are determined to be non-repeatable, and the process returns to execute steps S210-S220. Because the base and face paper of the label paper are arranged in a regular pattern, the voltage change features at their seams also exhibit a certain regularity. This method can effectively analyze whether the extracted real-time change features exhibit regular changes, thereby eliminating erroneous features extracted due to voltage fluctuation interference.
[0034] As can be seen from the above example, when the numerical change between two adjacent voltages is positive, it indicates that the currently collected voltage is greater than the previously collected voltage. Therefore, when the numerical change is continuously positive, the voltage change characteristic is increasing. Similarly, when the numerical change between two adjacent voltages is negative, it indicates that the currently collected voltage is less than the previously collected voltage. Therefore, when the numerical change is continuously negative, the voltage change characteristic is decreasing. This method accurately describes the voltage change characteristics of the label paper during paper feeding, thereby ensuring accurate positioning of the label gap.
[0035] In one embodiment of the present application, after extracting the real-time change feature according to the numerical change value in step S220, the method further includes steps S410-S420.
[0036] Step S410: If the real-time change characteristics include rising, falling and stable, it is determined that the real-time change characteristics have changed, and step S120 is executed.
[0037] Step S420: If the real-time change characteristics only include rising, falling or stable, it is determined that the real-time change characteristics do not change, and step S110 is executed.
[0038] As can be seen from the above examples, when the real-time variation feature includes rising, falling, and plateauing, it indicates that the sensor has completed voltage acquisition from the tag entering the seam to exiting it. In this case, the real-time variation feature represents the voltage change of the entire seam, and thus is input into the seam location model for comparison and verification. When the real-time variation feature only includes rising, falling, or plateauing, it indicates that the sensor has only completed voltage acquisition for a portion of the tag's entry or exit process. In this case, the real-time variation feature represents the voltage change of a portion of the seam. Therefore, accurately locating the seam can be achieved by determining whether the real-time variation feature has changed.
[0039] According to the embodiments of the present application, only when the real-time change characteristics include rising, falling and stabilizing at the same time, can the seam positioning model be used to determine whether the current voltage collection position is at the seam. This is because no matter what type of label paper sensor is used, the voltage change characteristics collected from entering the seam to exiting the seam must include rising, falling and stabilizing. Specifically, Figure 2 As shown in the figure, the label paper is ordinary label paper, and the voltage at the seam changes with the acquisition time in the following manner: decrease-increase-stabilize. Figure 3 As shown in the figure, the label paper is pre-printed label paper, and the voltage at the seam changes with the acquisition time as follows: decrease-increase-stabilize. Figure 4 As shown, the label paper is ultra-thin, and the voltage at the seam changes with the acquisition time in the following manner: rise-fall-becomes stable. Figures 2 to 4 The horizontal axis represents the number of acquisition points. For example, if 1000 acquisition points = 1 second, the number of acquisition points equals the acquisition time. The vertical axis represents the voltage value, expressed in mV. The voltage variation characteristics of the three types of label stock described above indicate that the voltage value collected by the sensor will vary randomly depending on the media on the face stock. However, the voltage variation characteristics collected by the sensor from entering the seam to exiting the seam necessarily include rising, falling, and leveling-off transitions. The voltage difference collected from the face stock to fully entering the seam is the largest, with the peak or trough located where the label seam is completely covered by the sensor. Therefore, only when the real-time variation characteristics change can it be determined that the sensor has fully collected all voltages from entering the seam to exiting the seam, allowing for subsequent seam comparison and verification steps.
[0040] In one embodiment of the present application, before inputting the real-time change feature into the seam positioning model for comparison in step S120, the method further includes steps S510-S530.
[0041] Step S510: calculating a first voltage difference between a maximum voltage and a minimum voltage of the first voltage, and comparing the first voltage difference with a preset joint voltage.
[0042] Step S520: If the first voltage difference is greater than the preset joint voltage, execute step S120.
[0043] Step S530: If the first voltage difference is not greater than the preset joint voltage, executing step S110.
[0044] It can be seen from the above embodiment that before the comparison is performed through the seam positioning model, the first voltage difference between the maximum voltage and the minimum voltage of the first voltage is calculated and compared with the preset seam voltage to pre-judge the seam position of the label paper. This can avoid misjudgment caused by voltage fluctuations and avoid frequent calling of the seam positioning model for invalid judgment, thereby improving the seam positioning accuracy and ensuring detection efficiency.
[0045] In one embodiment of the present application, step S120 specifically involves inputting the real-time variation feature into the seam location model for comparison: if the real-time variation feature is rising-falling-becoming-stable, then a comparison is performed to determine whether the seam location model has the target variation feature of rising-falling-becoming-stable; if the real-time variation feature is falling-rising-becoming-stable, then a comparison is performed to determine whether the seam location model has the target variation feature of falling-rising-becoming-stable. It should be noted that during this feature comparison, only the variation feature is compared; the specific numerical changes in voltage (such as slope, voltage difference, etc.) are not considered.
[0046] In one embodiment of the present application, the method further includes step S610.
[0047] Step S610: If the target change characteristics of the target label paper do not exist in the seam positioning model and are consistent with the real-time change characteristics, an error message is generated to prompt the user to equip the target label paper in the electronic device and trigger a model generation instruction; the model generation instruction is used to return to step S210.
[0048] It can be seen from the above embodiments that by prompting error messages, guiding users to replace label paper and re-learn the seam positioning model, printing errors caused by label paper replacement or seam positioning model failure can be corrected in a timely manner, thereby improving the system's adaptability and user experience, ensuring the stability and reliability of the printing process, and avoiding printing failures due to model mismatch.
[0049] The following provides a method for generating a seam positioning model.
[0050] In one embodiment of the present application, before collecting the first voltage of the current label paper surface through the sensor in step S110, the method further includes steps S710-S730.
[0051] Step S710: collecting a second voltage on the target label paper surface through a sensor, and recording a value change of the second voltage.
[0052] Step S720: When the number of samples collected of the second voltage is greater than a preset sampling threshold, extracting a target change feature from the value change of the second voltage.
[0053] In one embodiment of the present application, the method of extracting target change features from the numerical change of the second voltage is the same as the above-mentioned method of extracting real-time change features from the numerical change of the first voltage, and will not be repeated here.
[0054] Step S730: After forming a correspondence between the target change feature and the target label paper, the feature is written into the power-off protection area of the electronic device to obtain a seam positioning model.
[0055] A power-failure protection zone is a protected area established to prevent data loss or system damage in the event of a sudden power outage. This area is typically equipped with specialized power-failure protection devices and technologies to ensure that the system can safely save its current state or perform necessary processing in the event of a power outage.
[0056] As can be seen from the above embodiment, before printing, the voltage variation characteristics of the target label paper are learned, and a seam positioning model is established and stored. This allows the seam positioning model to accurately reflect the characteristics of the label paper, further improving the accuracy of seam positioning. This model is stored in a power-off protection area so that it can be recalled and retrieved after the label printer is turned on, eliminating the need for relearning and improving label positioning efficiency.
[0057] In one embodiment of the present application, after extracting the target change feature from the numerical change of the second voltage in step S720, the method further includes steps S810-S840.
[0058] Step S810 : If the target variation characteristic has changed, then calculating a second voltage difference between the maximum voltage and the minimum voltage of the second voltage.
[0059] Step S820: If the second voltage difference is greater than the preset joint voltage, execute step S230.
[0060] Step S830: If the second voltage difference is not greater than the preset joint voltage, execute step S210.
[0061] Step S840: If there is no change in the target change feature, execute step S210.
[0062] It can be seen from the above embodiment that if there is a change in the target change feature, it means that the sensor has completed the voltage collection of the tag from entering the seam to exiting the seam. By calculating the second voltage difference between the maximum voltage and the minimum voltage of the second voltage and comparing it with the preset seam voltage, misjudgment caused by voltage fluctuations is avoided, thereby improving the accuracy of the seam positioning model.
[0063] An embodiment of the present application provides a method for printing printer labels, including responding to a print instruction, determining the seam of the current label paper according to the above-mentioned seam positioning method of the printer label, so as to stop printing at the seam; and determining the face paper head of the current label paper based on the seam of the current label paper, so as to start printing at the face paper head.
[0064] In one embodiment of the present application, the aforementioned printer label printing method is used with a label printer. A user currently needs to print on ultra-thin label paper using this label printer. After attaching the ultra-thin label paper to the label printer, the user triggers a print command, and the label printer executes the following steps S910-S1020.
[0065] like Figure 5 As shown, step S910: in response to the print instruction, start the paper feeding process, collect the voltage of the label paper through the sensor, and record the voltage value change of the label paper. Step S910 is a specific application scenario of the above step S110.
[0066] Step S920: When the number of collected voltages is greater than 30, subtract the last collected voltage value from each collected voltage value to obtain a numerical change value of each voltage value. Step S920 is a specific application scenario of the above step S220.
[0067] When the number of collected voltages is less than or equal to 30, the process returns to step S910 .
[0068] Step S930: Detecting that adjacent numerical change values are consecutively positive, recording the voltage change characteristics corresponding to the positive values as rising, and continuing to collect the voltage of the ultra-thin label paper.
[0069] It is detected that the adjacent numerical change values are continuously negative, the voltage change characteristics corresponding to the negative values are recorded as a decrease, and the voltage of the ultra-thin label paper is continuously collected.
[0070] It is detected that the adjacent numerical change values are continuously smaller than the minimum value, the voltage change characteristics corresponding to the values smaller than the minimum value are recorded as stable, and the voltage of the ultra-thin label paper is continuously collected.
[0071] Thus, the first group of real-time change characteristics is rising-falling-becoming stable, and returning to execute step S920 to obtain the second group of real-time change characteristics is rising-falling-becoming stable, and the third group of real-time change characteristics is rising-falling-becoming stable.
[0072] Step S930 is a specific application scenario of the above steps S310-S340.
[0073] Step S940: Detecting that the three sets of real-time change features are consistent, determining that the real-time change features have regularity, and inputting the real-time change features into the seam positioning model for comparison.
[0074] If any set of real-time change features is detected to be inconsistent, the process returns to step S910 .
[0075] Step S950: If it is detected that the maximum voltage value of the real-time change feature is greater than the preset seam voltage, and the target change feature in the seam positioning model is consistent with the real-time change feature, then step S960 is executed.
[0076] If it is detected that the maximum voltage value of the real-time variation feature is not greater than the preset seam voltage, or if there is no target variation feature in the seam positioning model that is consistent with the real-time variation feature, step S970 is executed.
[0077] Step S950 is a specific application scenario of the above steps S510-S530.
[0078] Step S960: Determine that the voltage collection position corresponding to the real-time change feature on the current label paper surface is the seam of the label paper, stop printing at the seam of the label paper, and determine the face paper head of the label paper based on the seam of the label paper, and start printing at the face paper head.
[0079] Step S960 is a specific application scenario of the above step 130.
[0080] Step S970: Generate an error message to prompt the user to equip the label printer with target label paper and trigger the model generation instruction.
[0081] Step S970 is a specific application scenario of the above step S610.
[0082] like Figure 6 As shown, step S980: in response to the model generation instruction, start the paper feeding process, collect the voltage of the ultra-thin label paper through the sensor, and record the voltage value change of the ultra-thin label paper. Step S980 is a specific application scenario of the above step S710.
[0083] Step S990: When the number of collected voltages is greater than 30, subtract the voltage value collected last time from each collected voltage value to obtain a numerical change value of each voltage value.
[0084] When the number of collected voltages is less than or equal to 30, the process returns to step S980 .
[0085] Step S990 is a specific application scenario of the above step S720.
[0086] Step S1010: Detecting that adjacent numerical change values are consecutively positive, recording the voltage change characteristics corresponding to the positive values as rising, and continuing to collect the voltage of the ultra-thin label paper.
[0087] When no consecutive positive values of adjacent numerical changes are detected, the voltage change feature is not recorded, and the voltage of the ultra-thin label paper continues to be collected.
[0088] It is detected that the adjacent numerical change values are continuously negative, the voltage change characteristics corresponding to the negative values are recorded as a decrease, and the voltage of the ultra-thin label paper is continuously collected.
[0089] It is detected that the adjacent numerical change values are continuously smaller than the minimum value, the voltage change characteristics corresponding to the values smaller than the minimum value are recorded as stable, and the voltage of the ultra-thin label paper is continuously collected.
[0090] Thus, the target change characteristics of the first group of voltages are rising-falling-becoming stable, and returning to execute step S920, the target change characteristics of the second group are rising-falling-becoming stable, and the target change characteristics of the third group are rising-falling-becoming stable.
[0091] Step S1020: Detecting that the three groups of target change features are consistent, determining that the target change features have regularity, forming a correspondence between the target change features and the target label paper, and writing them into the power-off protection area to obtain a seam positioning model.
[0092] If any set of target change features is detected to be inconsistent, the process returns to step S980 .
[0093] Steps S1010-S1020 are a specific application scenario of the above step S730.
[0094] After obtaining the seam positioning model, the process returns to step S910 to complete the printing task.
[0095] like Figure 7 As shown, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, each step in the above-mentioned printer label seam positioning method is implemented.
[0096] Among them, the corresponding content of the seam positioning method of the printer label has been disclosed in the above section and will not be repeated here.
[0097] In summary, the present invention provides a seam positioning method, a printing method, and an electronic device for printer labels. By collecting the voltage change characteristics of the label paper surface through a sensor and comparing them with the seam positioning model, the gap between adjacent surface papers in different types of label papers, i.e., the seam, can be accurately identified. This method is not affected by factors such as the light transmittance of the label paper and the inconsistency of the seam length, and effectively avoids misjudgment caused by these factors, thereby significantly improving the accuracy of seam positioning. At the same time, the method further eliminates erroneous features extracted due to voltage fluctuation interference by collecting real-time change characteristics multiple times and comparing their repeatability, thereby enhancing the stability and reliability of the system. In the model training stage, by learning the voltage change characteristics of the target label paper and storing them in the power-off protection area, the seam positioning model can accurately reflect the characteristics of the label paper and can be quickly called after the printer is turned on without the need for re-learning, further improving the efficiency of label positioning.
[0098] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for positioning the seam of a printer label, characterized in that: Used in an electronic device, the electronic device includes a sensor, the electronic device is equipped with label paper, and the sensor is used to collect the voltage of the label paper surface; the method includes: During the paper feeding process of the printing process, the sensor collects the first voltage of the current label paper surface and records the real-time change characteristics of the first voltage; Inputting the real-time change characteristics into the seam positioning model for comparison; If the target change feature of the target label paper in the seam positioning model is consistent with the real-time change feature, the voltage collection position corresponding to the real-time change feature on the current label paper surface is determined to be the seam of the current label paper.
2. The seam positioning method according to claim 1, characterized in that: Before collecting the first voltage of the current label paper surface by the sensor, the method further includes: collecting a second voltage on the target label paper surface through the sensor, and recording a value change of the second voltage; When the number of samples collected of the second voltage is greater than a preset sampling threshold, a target change feature is extracted from the numerical change of the second voltage, and after the target change feature is corresponding to the target label paper, it is written into the power-off protection area of the electronic device to obtain a seam positioning model.
3. The seam positioning method according to claim 1, characterized in that: Recording the real-time change characteristics of the first voltage includes: Recording a change in the value of the first voltage; A value change value between two first voltages with adjacent acquisition times is determined from the value change of the first voltage, and a real-time change feature is extracted based on the value change value.
4. The seam positioning method according to claim 3, characterized in that: The value change is equal to the first voltage value currently collected minus the second voltage value collected last time; Extracting real-time change features according to the numerical change value includes: If the numerical change value is continuously positive, recording the voltage change feature corresponding to the numerical change value in the numerical change as rising; If the numerical change value is continuously negative, recording the voltage change feature corresponding to the numerical change value in the numerical change as a decrease; If the value change value is continuously smaller than the preset minimum value, the voltage change characteristic corresponding to the value change value in the value change is recorded as stable; A real-time change feature is generated according to all the voltage change features in the value change.
5. The seam positioning method according to claim 4, characterized in that: After extracting the real-time change feature from the value change of the first voltage, the method further includes: If the real-time change feature includes the rise, the fall, and the stability, determining that the real-time change feature has changed, and performing the step of inputting the real-time change feature into the seam positioning model for comparison; If the real-time change feature only includes the rise, the fall or the stability, it is determined that the real-time change feature does not change, and the step of collecting the first voltage of the current label paper surface through the sensor is performed.
6. The seam positioning method according to claim 1, characterized in that: Before inputting the real-time change feature into the seam positioning model for comparison, the method further includes: Calculating a first voltage difference between a maximum voltage and a minimum voltage of the first voltage, and comparing the first voltage difference with a preset joint voltage; If the first voltage difference is greater than the preset joint voltage, the step of inputting the real-time change feature into a joint positioning model for comparison is performed; If the first voltage difference is not greater than the preset seam voltage, the step of collecting the first voltage of the current label paper surface by the sensor is performed.
7. The seam positioning method according to claim 2, characterized in that: After extracting the target change feature from the value change of the second voltage, the method further includes: If the target change characteristic changes, calculating a second voltage difference between a maximum voltage and a minimum voltage of the second voltage, and comparing the second voltage difference with a preset joint voltage; If the second voltage difference is greater than the preset seam voltage, performing the step of forming a correspondence between the target change feature and the target label paper, and writing the correspondence into the power-off protection area of the electronic device to obtain a seam positioning model; If the voltage difference is not greater than the preset seam voltage, performing the step of collecting a second voltage of the target label paper surface by the sensor; If the target change characteristic does not change, the step of collecting the second voltage of the target label paper surface by the sensor is performed.
8. The seam positioning method according to claim 2, characterized in that: Also includes: If the target change characteristics of the target label paper do not exist in the seam positioning model and are consistent with the real-time change characteristics, an error message is generated to prompt the user to equip the target label paper in the electronic device and trigger a model generation instruction; the model generation instruction is used to return to the step of collecting the second voltage of the target label paper surface through the sensor.
9. A method for printing a printer label, characterized in that: include: In response to a print instruction, determining a seam of the current label paper according to the seam positioning method for a printer label according to any one of claims 1 to 8, so as to stop printing at the seam; The top of the face paper of the current label paper is determined based on the seam of the current label paper, so as to start printing at the top of the face paper.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, each step of the method for locating the seam of a printer label according to any one of claims 1 to 8 is implemented.