Abnormality detection method, device, and electronic equipment based on micro-printer
By setting up camera devices and servers on the micro printer to analyze images, detecting abnormalities in the micro printer, problems that are difficult for non-professional personnel to solve and improve work efficiency.
Patent Information
- Application Number
- CN202311146956.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-07
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-09-07
AI Technical Summary
Micro printers are prone to abnormal problems during use, but it is difficult for non-professional personnel to solve them in a timely manner, which affects work efficiency and is simple and difficult to observe.
By setting up an image camera on the printer, taking the printed file image, and using the server to analyze the image, recalling the printing parameters and usage data, it is determined that the source of the abnormality is a parameter abnormality or hardware problem.
It realizes rapid detection of micro printer abnormalities, avoids problems caused by missed factors, saves time, and improves problem solving efficiency.
Smart Images

Figure CN117141138B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of micro-printing technology, and in particular to an abnormality detection method, device, and electronic device based on a micro-printer. Background Art
[0002] With the advancement of technology, people are gradually abandoning the practice of transcribing certain content by hand and instead using printers to print relevant content. This method saves time and improves efficiency. As technology advances, the types of printers are increasing. At the same time, to meet people's needs, printers are becoming smaller and smaller. A variety of miniature printers have gradually emerged, meeting people's diverse needs while being compact, convenient, and easy to carry.
[0003] However, whether this type of micro printer or large printer, there will be some problems, big or small, during use, and some people who do not understand the working principle of the printer are generally unable to solve such problems in a timely manner. In addition, the structure of the micro printer is relatively simple and difficult to observe, and may require professional personnel or other people with rich usage experience to handle it to solve it, which will affect work efficiency to a certain extent. Summary of the Invention
[0004] The present application provides an abnormality detection method, device, and electronic device based on a micro-printer to solve the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a micro-printer-based anomaly detection method, which is applied to a micro-printer-based anomaly detection system. The micro-printer-based anomaly detection system includes a micro-printer, a camera device, and a server. The micro-printer-based anomaly detection method is executed by the server. The method includes:
[0006] When the printing task is completed, obtaining the image captured by the camera device;
[0007] Analyzing the image to determine whether there is any abnormality in the currently printed file;
[0008] If there is an abnormality in the file that has been printed at the current moment, the printing parameters of the micro printer are retrieved;
[0009] Comparing the printing parameters with standard parameters to determine whether there is a parameter deviation;
[0010] If there is a parameter deviation, it is determined that the abnormal source of the micro printer is the parameter abnormality; if there is no parameter deviation, the usage data of the micro printer is retrieved, the usage data is analyzed, and it is determined whether there is an abnormality in the hardware of the micro printer.
[0011] Through the solution provided by the present application, after a printing task of a certain printer is completed, an image captured by a camera device installed on the printer is obtained. This image is analyzed to determine whether there is any abnormality in the printed file. When there is an abnormality, the printing parameters of the micro printer are first retrieved, and the printing parameters are compared with the standard parameters corresponding to the micro printer to determine whether the abnormality is caused by the printing parameters. If not, the usage data of the micro printer is retrieved, and the usage data is analyzed to determine whether there is any abnormality in the hardware of the micro printer. Through the solution provided by the present application, a comprehensive test is performed on several factors that may affect the printing results of the micro printer. On the one hand, it can avoid the situation where a problem caused by omitting a certain factor is difficult to solve. On the other hand, when an abnormality occurs in the micro printer, there is no need to wait for professionals to handle it. The source of the abnormality can be determined directly after analysis. It saves time and can solve problems efficiently.
[0012] Optionally, comparing the printing parameters with standard parameters to determine whether there is a parameter deviation includes:
[0013] Determining the current printing specifications based on the printing task;
[0014] Retrieving the standard parameters corresponding to the printing specifications and the parameter adjustment range corresponding to the printing specifications from a preset database;
[0015] Matching the printing parameters with standard parameters corresponding to the printing specifications to determine whether there is a parameter deviation;
[0016] If there is a parameter deviation, determining that the abnormal source of the micro printer is a parameter abnormality includes:
[0017] Calculating the printing parameters with parameter deviations and the corresponding standard parameters, and determining whether the parameter deviations fall within the parameter adjustment range based on the calculation results;
[0018] If it is determined that the parameter deviation does not fall within the parameter adjustment range, it is determined that the abnormality source of the micro printer is the parameter abnormality.
[0019] Optionally, the usage data includes print head usage data, the camera device includes an embedded camera device, and analyzing the usage data to determine whether there is an abnormality in the hardware of the micro-printer includes:
[0020] Determining whether there is color difference in the currently printed file based on the image analysis result;
[0021] If the file that has been printed at the current moment has color difference, controlling the embedded camera device to capture an image of the print head of the micro-printer, and performing feature extraction on the image to obtain image features;
[0022] Matching the image features with preset abnormal features to determine whether there is stain on the print head;
[0023] If no stain exists, determining the degree of wear of the print head of the micro-printer based on the print head usage data;
[0024] Determining, based on the degree of wear and the preset print head length, whether the current length of the print head is less than the preset print head length;
[0025] If it is determined that the current length of the print head is less than the preset print head length, it is determined that there is an abnormality in the hardware of the micro printer.
[0026] Optionally, the usage data includes temperature data, and analyzing the usage data to determine whether there is an abnormality in the hardware of the micro printer includes:
[0027] Analyzing temperature data during the execution of the printing task to determine whether temperature changes during the printing process are abnormal;
[0028] If there is an abnormality in the temperature change during the printing process, the temperature standard at the current moment is reset, the micro printer is started to re-execute the printing task at the current moment, and the temperature change during the execution process is received;
[0029] The received result is analyzed to determine whether there is an abnormality in the temperature sensor of the micro printer.
[0030] Optionally, the printing parameters further include dot matrix instructions, and determining whether there is a parameter deviation includes:
[0031] Determining the dot matrix instruction at the current moment according to the printing task;
[0032] Determining, based on the analysis result of the image, whether the printed file is executed according to the dot matrix instruction;
[0033] If the printed file is not executed according to the dot matrix instruction, it is determined that there is a parameter deviation.
[0034] Optionally, determining whether the printed file is executed according to the dot matrix instruction based on the analysis result of the image includes:
[0035] Predicting, based on the dot matrix instruction and the printing task, the file format after the printing task is completed;
[0036] Analyzing the predicted file format and matching the analysis result with the analysis result of the image to obtain a matching degree;
[0037] Comparing the matching degree with a preset matching threshold, and if the matching degree is higher than the preset matching threshold, determining that the printed file is executed according to the dot matrix instruction;
[0038] Determining whether there is a parameter deviation includes:
[0039] If the matching degree is lower than a preset matching threshold, it is determined that there is a parameter deviation.
[0040] Optional methods before anomaly detection include:
[0041] Collecting sample data, where the sample data includes several printer types and related information of the corresponding printer types;
[0042] Inputting the sample data into a deep learning model, and training the deep learning model so that the deep learning model determines relevant information of a corresponding type of printer according to the type;
[0043] The acquisition of the standard parameters includes:
[0044] determining the type of the micro-printer according to the basic information of the micro-printer;
[0045] The type is input into the deep learning model to determine the relevant information of the micro printer, and the standard parameters of the micro printer are retrieved from the relevant information.
[0046] In a second aspect, the present application provides an anomaly detection device based on a micro-printer, comprising:
[0047] An image acquisition module, used to acquire an image captured by a camera device when a printing task is completed;
[0048] An image analysis module is used to analyze the image and determine whether there is any abnormality in the file that has been printed at the current moment;
[0049] A parameter retrieving module, configured to retrieve the printing parameters of the micro-printer if an abnormality occurs in the file that has been printed at the current moment;
[0050] a deviation analysis module, for comparing the printing parameters with standard parameters to determine whether there is a parameter deviation;
[0051] The abnormality determination module is used to determine that the abnormal source of the micro printer is a parameter abnormality if there is a parameter deviation; if there is no parameter deviation, retrieve the usage data of the micro printer, analyze the usage data, and determine whether there is an abnormality in the hardware of the micro printer.
[0052] Optionally, the deviation analysis module is specifically used to:
[0053] Determining the current printing specifications based on the printing task;
[0054] Retrieving the standard parameters corresponding to the printing specifications and the parameter adjustment range corresponding to the printing specifications from a preset database;
[0055] Matching the printing parameters with standard parameters corresponding to the printing specifications to determine whether there is a parameter deviation;
[0056] If there is a parameter deviation, determining that the abnormal source of the micro printer is a parameter abnormality includes:
[0057] Calculating the printing parameters with parameter deviations and the corresponding standard parameters, and determining whether the parameter deviations fall within the parameter adjustment range based on the calculation results;
[0058] If it is determined that the parameter deviation does not fall within the parameter adjustment range, it is determined that the abnormality source of the micro printer is the parameter abnormality.
[0059] Optionally, the usage data includes print head usage data, the camera device includes an embedded camera device, and the abnormality determination module is specifically configured to:
[0060] Determining whether there is color difference in the currently printed file based on the image analysis result;
[0061] If the file that has been printed at the current moment has color difference, controlling the embedded camera device to capture an image of the print head of the micro-printer, and performing feature extraction on the image to obtain image features;
[0062] Matching the image features with preset abnormal features to determine whether there is stain on the print head;
[0063] If no stain exists, determining the degree of wear of the print head of the micro-printer based on the print head usage data;
[0064] Determining, based on the degree of wear and the preset print head length, whether the current length of the print head is less than the preset print head length;
[0065] If it is determined that the current length of the print head is less than the preset print head length, it is determined that there is an abnormality in the hardware of the micro printer.
[0066] Optionally, the usage data includes temperature data, and the abnormality determination module is further configured to:
[0067] Analyzing temperature data during the execution of the printing task to determine whether temperature changes during the printing process are abnormal;
[0068] If there is an abnormality in the temperature change during the printing process, the temperature standard at the current moment is reset, the micro printer is started to re-execute the printing task at the current moment, and the temperature change during the execution process is received;
[0069] The received result is analyzed to determine whether there is an abnormality in the temperature sensor of the micro printer.
[0070] Optionally, the deviation analysis module is further configured to:
[0071] Determining the dot matrix instruction at the current moment according to the printing task;
[0072] Determining, based on the analysis result of the image, whether the printed file is executed according to the dot matrix instruction;
[0073] If the printed file is not executed according to the dot matrix instruction, it is determined that there is a parameter deviation.
[0074] Optionally, the deviation analysis module is further configured to:
[0075] Predicting, based on the dot matrix instruction and the printing task, the file format after the printing task is completed;
[0076] Analyzing the predicted file format and matching the analysis result with the analysis result of the image to obtain a matching degree;
[0077] Comparing the matching degree with a preset matching threshold, and if the matching degree is higher than the preset matching threshold, determining that the printed file is executed according to the dot matrix instruction;
[0078] Determining whether there is a parameter deviation includes:
[0079] If the matching degree is lower than a preset matching threshold, it is determined that there is a parameter deviation.
[0080] Optionally, the micro-printer-based anomaly detection device further includes an information acquisition module, configured to:
[0081] Collecting sample data, where the sample data includes several printer types and related information of the corresponding printer types;
[0082] Inputting the sample data into a deep learning model, and training the deep learning model so that the deep learning model determines relevant information of a corresponding type of printer according to the type;
[0083] The acquisition of the standard parameters includes:
[0084] determining the type of the micro-printer according to the basic information of the micro-printer;
[0085] The type is input into the deep learning model to determine the relevant information of the micro printer, and the standard parameters of the micro printer are retrieved from the relevant information.
[0086] In a third aspect, the present application provides an electronic device comprising: a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the method of the first aspect.
[0087] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute the method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0089] Figure 1 A schematic diagram of an application scenario provided in one embodiment of the present application;
[0090] Figure 2 A flowchart of an abnormality detection method based on a micro-printer provided in one embodiment of the present application;
[0091] Figure 3 A schematic structural diagram of an anomaly detection device based on a micro-printer provided in one embodiment of the present application;
[0092] Figure 4 A schematic structural diagram of an electronic device provided in one embodiment of the present application. Implementation Method
[0093] To make the purpose, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0094] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document, unless otherwise specified, generally indicates an "or" relationship between the related objects.
[0095] The embodiments of the present application are described in further detail below with reference to the accompanying drawings.
[0096] With the advancement of technology, people are gradually abandoning the practice of transcribing certain content by hand and instead using printers to print relevant content. This method saves time and improves efficiency. As technology advances, the types of printers are increasing. At the same time, to meet people's needs, printers are becoming smaller and smaller. A variety of miniature printers have gradually emerged, meeting people's diverse needs while being compact, convenient, and easy to carry.
[0097] However, whether this type of micro printer or large printer, there will be some problems, big or small, during use, and some people who do not understand the working principle of the printer are generally unable to solve such problems in a timely manner. In addition, the structure of the micro printer is relatively simple and difficult to observe, and may require professional personnel or other people with rich usage experience to handle it to solve it, which will affect work efficiency to a certain extent.
[0098] Based on this, the present application provides an abnormality detection method, device, and electronic device based on a micro-printer. After a printing task of a certain printer is completed, an image captured by a camera device installed on the printer is obtained. This image is analyzed to determine whether there is any abnormality in the printed file. When there is an abnormality, the printing parameters of the micro-printer are first retrieved, and the printing parameters are compared with the standard parameters corresponding to the micro-printer to determine whether the abnormality is caused by the printing parameters. If not, the usage data of the micro-printer is retrieved, and the usage data is analyzed to determine whether there is an abnormality in the hardware of the micro-printer. Through the solution provided by the present application, a comprehensive detection is performed on several factors that may affect the printing results of the micro-printer. On the one hand, it can avoid the situation where a problem caused by omitting a certain factor is difficult to solve. On the other hand, when an abnormality occurs in the micro-printer, there is no need to wait for professional personnel to handle it. The source of the abnormality can be determined directly after analysis. It saves time and can solve problems efficiently.
[0099] Figure 1 A schematic diagram of an application scenario provided by this application. When a micro-printer is used by some enterprises or families that need a micro-printer, in order to reduce the problems that affect work efficiency caused by the micro-printer, the solution provided by this application can be used to detect the micro-printer. The solution provided by this application can be installed in a server, and the server interacts with the micro-printer to obtain the printing task status of the micro-printer at all times. At the same time, this micro-printer can also be provided with a camera device for capturing an image of the corresponding file after the printing task is completed, and transmitting it to the server for analysis, so that the server can determine whether to execute the solution of this application to detect the micro-printer based on the image.
[0100] For specific implementation methods, please refer to the following embodiments.
[0101] Figure 2 This is a flowchart of an abnormality detection method based on a micro printer provided in one embodiment of the present application. The method of this embodiment can be applied to the server in the above scenario. Figure 2 As shown, the method includes:
[0102] S201 . When the printing task is completed, obtain an image captured by a camera device.
[0103] A print job can be considered as a print job for a micro printer.
[0104] In the above scenario, the server constantly interacts with the micro-printer to track the completion of its tasks. Upon detecting that the micro-printer has completed a print task, the server can activate a camera to capture the file corresponding to the completed print task. After the capture is complete, the server can obtain the corresponding image.
[0105] S202: Analyze the image to determine whether there is any abnormality in the currently printed file.
[0106] After obtaining an image captured by the camera through the above steps, the image content is analyzed, such as the print colors. Before this analysis, personnel, such as the manufacturer, can first input standard print colors. The acquired image is then divided into a grid, resulting in a number of grid cells. The color data for each grid is then extracted and matched against the standard print colors to determine if any cells have color differences. If any grid cells have color differences, the printed file is considered abnormal.
[0107] S203: If there is an abnormality in the file that has been printed at the current moment, the printing parameters of the micro printer are retrieved.
[0108] The printing parameters of the micro printer may include printing speed, printing resolution, printing format, whether color is supported, whether duplex printing is supported, whether network printing is supported, whether large-capacity paper tray is supported, whether automatic binding is supported, whether scanning, copying, and faxing are supported, etc. These printing parameters can be directly obtained before the print task is started and stored in the location corresponding to the print task, such as the location corresponding to the print task in a database.
[0109] When it is determined that an abnormality exists in the file that has been printed at the current moment, the printing parameters corresponding to the printing task can be retrieved from the database.
[0110] S204: Compare the printing parameters with the standard parameters to determine whether there is a parameter deviation.
[0111] The standard parameters can be considered as the parameters that can ensure the normal completion of the printing task under normal circumstances. This standard parameter can be specified by the manufacturer during production. In some implementation methods, the printing parameters corresponding to several printing tasks that can be completed normally and have no problems with the files can be obtained through the historical printing records of the micro printer, and these printing parameters can be used as standard parameters.
[0112] The current printing parameters are compared with the above-obtained standard parameters to determine whether there is any deviation between these parameters. In a specific implementation, since the print tasks may be different, the corresponding standard parameters may also be different. Therefore, the print type can be determined by the print task first, and then the corresponding standard parameters can be obtained.
[0113] S205. If there is a parameter deviation, it is determined that the abnormal source of the micro printer is a parameter abnormality. If there is no parameter deviation, the usage data of the micro printer is retrieved and analyzed to determine whether there is an abnormality in the hardware of the micro printer.
[0114] Usage data can be considered as the data generated by each hardware during the use of the micro printer.
[0115] If the above comparison determines that there is a parameter deviation between the current printing parameters and the standard parameters, it can be assumed that the cause of the abnormality in the printed file is the parameter abnormality. In this case, adjusting the parameters can eliminate this problem. If there is no parameter deviation, it can be assumed that the problem is not caused by the parameters. In this case, the usage data of this micro printer can be retrieved and analyzed to determine whether there is any abnormal usage data. For example, the current usage data can be compared with the historical usage records to determine whether there is any location whose usage data differs significantly from the historical data. If so, there may be an abnormality in this location.
[0116] Through the solution provided by the present application, after a printing task of a certain printer is completed, an image captured by a camera device installed on the printer is obtained. This image is analyzed to determine whether there is any abnormality in the printed file. When there is an abnormality, the printing parameters of the micro printer are first retrieved, and the printing parameters are compared with the standard parameters corresponding to the micro printer to determine whether the abnormality is caused by the printing parameters. If not, the usage data of the micro printer is retrieved, and the usage data is analyzed to determine whether there is any abnormality in the hardware of the micro printer. Through the solution provided by the present application, a comprehensive test is performed on several factors that may affect the printing results of the micro printer. On the one hand, it can avoid the situation where a problem caused by omitting a certain factor is difficult to solve. On the other hand, when an abnormality occurs in the micro printer, there is no need to wait for professionals to handle it. The source of the abnormality can be determined directly after analysis. It saves time and can solve problems efficiently.
[0117] In some embodiments, the printing specifications at the current moment are determined based on the printing task; the standard parameters corresponding to the printing specifications and the parameter adjustment range corresponding to the printing specifications are retrieved from a preset database; the printing parameters are matched with the standard parameters corresponding to the printing specifications to determine whether there is a parameter deviation; the printing parameters with parameter deviation are calculated with the corresponding standard parameters, and based on the calculation results, it is determined whether the parameter deviation falls within the parameter adjustment range; if it is determined that the parameter deviation does not fall within the parameter adjustment range, it is determined that the source of the abnormality of the micro printer is the parameter abnormality.
[0118] Print specifications can be considered to be the print resolution and print format mentioned in the above embodiments. The preset database can be considered to be the same as the above embodiments, used to store various information, including relevant information corresponding to the print specifications, such as standard parameters and parameter adjustment ranges. This parameter adjustment range can be understood as when a set of standard parameters exists, the print parameters of the existing data are calculated with the standard parameters. If the calculated result is within this parameter adjustment range, it can still be considered that there is no parameter deviation.
[0119] Therefore, after obtaining the current printing parameters, first compare them with the standard parameters. If there is a deviation, calculate the difference between the two, such as taking the difference, and compare the calculated result with the parameter adjustment range to determine whether it is within the parameter adjustment range. If so, it can be assumed that the parameter deviation between the current printing parameters and the standard parameters will not affect the print job, that is, there is no abnormality in the printing parameters. If not, it can be assumed that the current printing parameters may affect the print job.
[0120] Through the solution provided by this embodiment, since each printer will have a certain degree of wear and tear or other influences as the use time increases, it may be necessary to fine-tune the parameters to ensure the smooth completion of the printing task. Therefore, a parameter adjustment range is set in advance. When there is a difference between the current printing parameters and the standard parameters, the corresponding data can be calculated and compared with the parameter adjustment range, so as to more accurately judge whether the parameters affect the printing, avoiding parameter errors caused by the long use of the micro printer and misjudgment caused by it.
[0121] In some embodiments, based on the image analysis results, it is determined whether there is color difference in the file that has been printed at the current moment; if there is color difference in the file that has been printed at the current moment, the embedded camera device is controlled to capture the image of the print head of the micro printer, and feature extraction is performed on the image to obtain image features; the image features are matched with preset abnormal features to determine whether there is stain on the print head; if there is no stain, the degree of wear of the print head of the micro printer is determined based on the print head usage data; based on the degree of wear and the preset print head length, it is determined whether the length of the print head at the current moment is lower than the preset print head length; if it is determined that the length of the print head at the current moment is lower than the preset print head length, it is determined that there is an abnormality in the hardware of the micro printer.
[0122] The usage data includes print head usage data, and the camera device includes an embedded camera device. The embedded camera device can be set at the position of the print head to photograph the print head.
[0123] Preset abnormality features can be considered to correspond to several types of anomalies that may occur during the printing process, such as missing text where it should be or blurred areas. These situations may be caused by stains on the print head. In this case, you can set the print head characteristics for stains in advance. For example, collect files with this situation, then extract and store the features of these specific areas.
[0124] The preset print head length can be considered as the length that the print head can be used normally. This preset print length can be obtained through a large number of experiments. When conducting experiments, it is necessary to ensure that other devices or parameters of the printer that may affect printing are consistent to avoid affecting the accuracy of the experiment.
[0125] If, through the above embodiment, it is determined that certain areas of a printed document have color differences, the embedded camera can be controlled to capture an image of the print head. Since the angle of the embedded camera is known when it is set up, the captured angle can also be directly known. After obtaining the image of the print head, feature extraction is performed on the image, and these extracted image features are matched with preset abnormality features to determine whether the print head is contaminated. If contamination is present, it can be assumed that the document is blurry or lacking text due to contamination on the print head. If contamination is not present, the degree of wear of each print head during the use of the micro-printer can be determined based on print head usage data. For example, the wear and tear of a print head during a single stroke can be determined experimentally. Using the micro-printer's historical printing records and the wear and tear per unit stroke determined experimentally, the degree of wear of each print head at the current moment can be determined. The current print head length can then be compared with the preset print length to determine whether the current print head length is insufficient for printing. If the current print head length is less than the preset print length, it can be assumed that the current print head length is insufficient for printing, indicating that a print head abnormality exists.
[0126] The solution provided in this embodiment uses an embedded camera to capture an image of the print head, which is then analyzed to determine whether the print head length is less than the preset print length. If so, this indicates that the print head is not functioning properly, thus confirming a hardware anomaly in the printer. This approach allows direct image analysis to determine if the print head is contaminated. While print head usage data cannot reflect the adhesion status of the print head surface, this improves the comprehensiveness of the detection and enables a more comprehensive analysis of the causes of micro-printer printing anomalies.
[0127] In some embodiments, the temperature data during the execution of the printing task is analyzed to determine whether the temperature change during the printing process is abnormal; if the temperature change during the printing process is abnormal, the temperature standard at the current moment is reset, the micro printer is started to re-execute the printing task at the current moment, and the temperature change during the execution process is received; the received results are analyzed to determine whether there is an abnormality in the temperature sensor of the micro printer.
[0128] The temperature standard can be considered as the temperature at which a thermal printer can clearly display the printed content during use. It can be a temperature value or a temperature range.
[0129] Usage data includes temperature data. Since most WeChat printers use thermal printers for printing, the impact of temperature changes on printed files is involved. Therefore, temperature data can be collected from thermal printers and analyzed to determine whether there are large temperature fluctuations when executing a print task. If so, it can be considered that the temperature change may be abnormal. In this case, the temperature of the thermal printer can be reset to the temperature corresponding to the temperature standard, and then the print task can be re-executed. At the same time, the temperature changes during this process are recorded to determine whether there is an abnormality in the thermal printer's temperature sensor.
[0130] In some implementations, during the execution of a printing task, the temperature may not reach the temperature value corresponding to the temperature standard, or after reaching the temperature value, the temperature may fluctuate greatly. For example, the temperature may suddenly drop after continuing to rise. In this case, it can be considered that there is an abnormality in the temperature sensor.
[0131] Through the solution provided by this embodiment, temperature changes during the execution of a print task are collected and analyzed to determine whether any temperature changes are abnormal. If an abnormality occurs, the print task can be re-executed to determine whether the temperature abnormality is accidental. If the abnormality is still found after the second execution, it can be considered that the temperature sensor of the micro-printer may be abnormal. In this way, it is possible to determine whether the temperature sensor is abnormal and, through multiple analyses, reduce the randomness of the problem and improve the accuracy of the detection.
[0132] In some embodiments, the dot matrix instruction at the current moment is determined based on the printing task; based on the image analysis results, it is determined whether the printed file is executed according to the dot matrix instruction; if the printed file is not executed according to the dot matrix instruction, it is determined that there is a parameter abnormality.
[0133] The dot matrix instructions corresponding to the printing tasks can be formulated by the manufacturer during production. The dot matrix instructions can include the printing status corresponding to different printing tasks, that is, the size of the file after printing is completed, the paper size, etc.
[0134] Different printing tasks require different dot matrix instructions. Since the possible printing states during the execution of each dot matrix instruction are pre-set, it is possible to perform image analysis on the printed file. After obtaining the analysis results, it can be determined whether the file was executed according to the dot matrix instruction.
[0135] If some states are different from the states corresponding to the dot matrix instructions, it can be directly considered that the execution is not completely in accordance with the dot matrix instructions, and it can be considered that there is an abnormality in the parameters.
[0136] In some implementations, the micro-printer may have been used for too long, causing problems with the printer itself. Therefore, when printing, the structure of the micro-printer itself can no longer meet the operation of this dot matrix instruction. At this time, the above-mentioned embodiment can be used to determine whether there is a problem with the print head and whether the temperature is abnormal. On the basis that there are no problems with these, it can be considered that there is an abnormality in the parameters, that is, the dot matrix instruction may have been maliciously adjusted.
[0137] The solution provided in this embodiment determines the dot matrix instruction associated with a print task based on the print task. Then, based on the image analysis results, it is determined whether the document was printed in accordance with the dot matrix instruction. If the printed document does not match the state presented by the dot matrix instruction, it can be assumed that the dot matrix instruction was not executed in accordance with the print task, and the microprinter may have a parameter anomaly. This method can eliminate the possibility of malicious adjustments to the dot matrix instruction and improve the comprehensiveness of the detection.
[0138] In some embodiments, based on the dot matrix instruction and the printing task, the file format after the printing task is completed is predicted; the predicted file format is analyzed, and the analysis result is matched with the analysis result of the image to obtain a matching degree; the matching degree is compared with a preset matching threshold, and if the matching degree is higher than the preset matching threshold, it is determined that the printed file is executed according to the dot matrix instruction; if the matching degree is lower than the preset matching threshold, it is determined that there is a parameter deviation.
[0139] The file format may include the size of the printed file, the position of the file content on the paper, etc. corresponding to the various parameters mentioned above.
[0140] The printer's dot matrix instructions are typically entered into the corresponding micro-printer by the manufacturer during the production process. Micro-printers generally print according to the dot matrix instructions. If the micro-printer does not execute the pre-set print instructions during the printing process, the printed document may have white lines or garbled characters.
[0141] The preset match threshold is the minimum match between the file and the dot matrix instruction after printing. For example, if a print instruction prints a plain text document on an A4 page, but white lines or garbled characters appear on the document after printing, it can be considered a mismatch between the printed file and the corresponding dot matrix instruction. If the match threshold is below the preset match threshold, the print job is considered to be significantly different from the output file corresponding to the dot matrix instruction.
[0142] After determining the dot matrix instructions for a print job, the content of the completed print job can be predicted based on this dot matrix instruction. This content can include the file format, such as single-sided or double-sided, and the location of the file on the paper. After the prediction, it is compared with the image corresponding to the printed file to determine the degree of match.
[0143] When performing the comparison, the printed file can also be divided into a unit grid as in the above embodiment to perform the comparison and determine the degree of match between the two. If the degree of match is higher than a preset matching threshold, it is determined that the printed file was executed according to the dot matrix instruction; if the degree of match is lower than the preset matching threshold, it is determined that the printed file was not executed according to the dot matrix instruction, that is, there is a parameter deviation.
[0144] The solution provided in this embodiment uses dot matrix instructions to predict the format of the file corresponding to the dot matrix instructions after printing. This can then be compared with the already printed file to determine whether the already printed file has been executed in accordance with the dot matrix instructions. If the degree of match falls below a preset matching threshold, a parameter deviation is determined. By setting a preset matching threshold, a standard for the degree of match is established, and deviation can be determined directly based on this standard, reducing errors that can occur in human judgment.
[0145] In some embodiments, sample data can be collected before performing anomaly detection, and the sample data can be input into a deep learning model. The deep learning model can be trained so that the deep learning model can determine the relevant information of the corresponding type of printer based on the type; the type of the micro printer can be determined based on the basic information of the micro printer; the type can be input into the deep learning model to determine the relevant information of the micro printer, and the standard parameters of the micro printer can be retrieved from the relevant information.
[0146] The sample data includes several printer types and related information about the corresponding printer types. The printer-related information may include the printer's parameters and the data generated during operation. The basic information can be considered to be the model information, brand information, and other basic content of a micro printer. The type of micro printer can be determined based on the model information.
[0147] First, a deep learning model is established, and then the above sample data is input into this deep learning model. The deep learning model is trained so that it can determine the relevant information of the corresponding type of printer based on the type of micro printer.
[0148] In some implementations, if there are multiple micro printers, when installing the micro printers, these printers can be numbered and stored in a database, and the corresponding basic information can be stored at the location of the number to make a one-to-one correspondence.
[0149] When a task exists for a specific micro-printer, the basic information stored in the database can be retrieved directly based on the micro-printer's number. The type of information can then be filtered out from the basic information. This information is then input into the trained deep learning model to obtain the relevant information corresponding to this type of micro-printer. Finally, the standard parameters can be filtered out from the relevant information.
[0150] Through the solution provided in this embodiment, a deep learning model is utilized to input the type of printer into the trained deep learning model, and the corresponding relevant information is directly output, thereby reducing the time for poem processing and improving detection efficiency.
[0151] Figure 3 A schematic diagram of the structure of an abnormality detection device based on a micro printer provided in one embodiment of the present application is shown in FIG. Figure 3 As shown, the micro-printer-based anomaly detection device 300 of this embodiment includes: an image acquisition module 301 , an image analysis module 302 , a parameter retrieval module 303 , a deviation analysis module 304 , and an anomaly determination module 305 .
[0152] The image acquisition module 301 is used to acquire the image captured by the camera device when the printing task is completed;
[0153] An image analysis module 302 is configured to analyze the image and determine whether there is any abnormality in the currently printed file;
[0154] The parameter retrieving module 303 is used to retrieve the printing parameters of the micro-printer if there is an abnormality in the file that has been printed at the current moment;
[0155] Deviation analysis module 304, for comparing the printing parameters with standard parameters to determine whether there is a parameter deviation;
[0156] The abnormality determination module 305 is used to determine that the abnormality source of the micro printer is parameter abnormality if there is a parameter deviation; if there is no parameter deviation, retrieve the usage data of the micro printer, analyze the usage data, and determine whether there is an abnormality in the hardware of the micro printer.
[0157] Optionally, the deviation analysis module 304 is specifically configured to:
[0158] Determining the current printing specifications based on the printing task;
[0159] Retrieving the standard parameters corresponding to the printing specifications and the parameter adjustment range corresponding to the printing specifications from a preset database;
[0160] Matching the printing parameters with standard parameters corresponding to the printing specifications to determine whether there is a parameter deviation;
[0161] If there is a parameter deviation, determining that the abnormal source of the micro printer is a parameter abnormality includes:
[0162] Calculating the printing parameters with parameter deviations and the corresponding standard parameters, and determining whether the parameter deviations fall within the parameter adjustment range based on the calculation results;
[0163] If it is determined that the parameter deviation does not fall within the parameter adjustment range, it is determined that the abnormality source of the micro printer is the parameter abnormality.
[0164] Optionally, the usage data includes print head usage data, the camera device includes an embedded camera device, and the abnormality determination module 305 is specifically configured to:
[0165] Determining whether there is color difference in the currently printed file based on the image analysis result;
[0166] If the file that has been printed at the current moment has color difference, controlling the embedded camera device to capture an image of the print head of the micro-printer, and performing feature extraction on the image to obtain image features;
[0167] Matching the image features with preset abnormal features to determine whether there is stain on the print head;
[0168] If no stain exists, determining the degree of wear of the print head of the micro-printer based on the print head usage data;
[0169] Determining, based on the degree of wear and the preset print head length, whether the current length of the print head is less than the preset print head length;
[0170] If it is determined that the current length of the print head is less than the preset print head length, it is determined that there is an abnormality in the hardware of the micro printer.
[0171] Optionally, the usage data includes temperature data, and the abnormality determination module 305 is further configured to:
[0172] Analyzing temperature data during the execution of the printing task to determine whether temperature changes during the printing process are abnormal;
[0173] If there is an abnormality in the temperature change during the printing process, the temperature standard at the current moment is reset, the micro printer is started to re-execute the printing task at the current moment, and the temperature change during the execution process is received;
[0174] The received result is analyzed to determine whether there is an abnormality in the temperature sensor of the micro printer.
[0175] Optionally, the deviation analysis module 304 is further configured to:
[0176] Determining the dot matrix instruction at the current moment according to the printing task;
[0177] Determining, based on the analysis result of the image, whether the printed file is executed according to the dot matrix instruction;
[0178] If the printed file is not executed according to the dot matrix instruction, it is determined that there is a parameter deviation.
[0179] Optionally, the deviation analysis module 304 is further configured to:
[0180] Predicting, based on the dot matrix instruction and the printing task, the file format after the printing task is completed;
[0181] Analyzing the predicted file format and matching the analysis result with the analysis result of the image to obtain a matching degree;
[0182] Comparing the matching degree with a preset matching threshold, and if the matching degree is higher than the preset matching threshold, determining that the printed file is executed according to the dot matrix instruction;
[0183] Determining whether there is a parameter deviation includes:
[0184] If the matching degree is lower than a preset matching threshold, it is determined that there is a parameter deviation.
[0185] Optionally, the micro-printer-based anomaly detection device 300 further includes an information acquisition module 306 for:
[0186] Collecting sample data, where the sample data includes several printer types and related information of the corresponding printer types;
[0187] Inputting the sample data into a deep learning model, and training the deep learning model so that the deep learning model determines relevant information of a corresponding type of printer according to the type;
[0188] The acquisition of the standard parameters includes:
[0189] determining the type of the micro-printer according to the basic information of the micro-printer;
[0190] The type is input into the deep learning model to determine the relevant information of the micro printer, and the standard parameters of the micro printer are retrieved from the relevant information.
[0191] The device of this embodiment can be used to execute the method of any of the above embodiments. Its implementation principles and technical effects are similar and will not be described in detail here.
[0192] Figure 4 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application is shown in FIG. Figure 4 As shown, the electronic device 400 of this embodiment may include: a memory 401 and a processor 402.
[0193] The memory 401 stores a computer program that can be loaded by the processor 402 and execute the method in the above embodiment.
[0194] The processor 402 and the memory 401 are connected, for example, via a bus.
[0195] Optionally, the electronic device 400 may further include a transceiver. It should be noted that in actual applications, the number of transceivers is not limited to one, and the structure of the electronic device 400 does not constitute a limitation on the embodiments of the present application.
[0196] Processor 402 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. Processor 402 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, or a combination of a DSP and a microprocessor.
[0197] A bus includes a path that transmits information between the components mentioned above. Examples include a PCI (Peripheral Component Interconnect) bus and an EISA (Extended Industry Standard Architecture) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the diagram uses a single thick line, but this does not imply a single bus or type of bus.
[0198] The memory 401 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0199] The memory 401 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 402. The processor 402 is used to execute the application code stored in the memory 401 to implement the content shown in the above method embodiment.
[0200] Electronic devices include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. They may also include servers, etc. Figure 4 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0201] The electronic device of this embodiment can be used to execute the method of any of the above embodiments. Its implementation principles and technical effects are similar and will not be described in detail here.
[0202] The present application also provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute the method in the above embodiment.
[0203] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
Claims
1. A micro-printer-based anomaly detection method, characterized in that: Applied to an anomaly detection system based on a micro-printer, the anomaly detection system based on a micro-printer includes a micro-printer, a camera device and a server, the anomaly detection method based on the micro-printer is executed by the server, and the method includes: When the printing task is completed, obtaining the image captured by the camera device; Analyzing the image to determine whether there is any abnormality in the currently printed file; If there is an abnormality in the file that has been printed at the current moment, the printing parameters of the micro printer are retrieved; Comparing the printing parameters with standard parameters to determine whether there is a parameter deviation; If there is a parameter deviation, determining that the source of the abnormality of the micro-printer is the parameter abnormality; if there is no parameter deviation, retrieving the usage data of the micro-printer, analyzing the usage data, and determining whether there is an abnormality in the hardware of the micro-printer; Comparing the printing parameters with standard parameters to determine whether there is a parameter deviation includes: Determining the current printing specifications based on the printing task; Retrieving the standard parameters corresponding to the printing specifications and the parameter adjustment range corresponding to the printing specifications from a preset database; Matching the printing parameters with standard parameters corresponding to the printing specifications to determine whether there is a parameter deviation; If there is a parameter deviation, determining that the abnormal source of the micro printer is a parameter abnormality includes: Calculating the printing parameters with parameter deviations and the standard parameters corresponding to the printing specifications, and determining whether the parameter deviations fall within the parameter adjustment range based on the calculation results; If it is determined that the parameter deviation does not fall within the parameter adjustment range, then determining that the abnormality source of the micro-printer is parameter abnormality; The usage data includes print head usage data, the camera device includes an embedded camera device, and analyzing the usage data to determine whether there is an abnormality in the hardware of the micro printer includes: Determining whether there is color difference in the currently printed file based on the image analysis result; If the file that has been printed at the current moment has color difference, controlling the embedded camera device to capture an image of the print head of the micro-printer, and performing feature extraction on the image to obtain image features; Matching the image features with preset abnormal features to determine whether there is stain on the print head; If no stain exists, determining the degree of wear of the print head of the micro-printer based on the print head usage data; Determining, based on the degree of wear and the preset print head length, whether the current length of the print head is less than the preset print head length; If it is determined that the current length of the print head is less than the preset print head length, it is determined that there is an abnormality in the hardware of the micro printer; Determining whether there is a parameter deviation includes: Determine the dot matrix instruction at the current moment according to the printing task; the dot matrix instruction is input into the micro printer by the manufacturer during the production process, and the micro printer will print according to the dot matrix instruction; Determining, based on the analysis result of the image, whether the printed file is executed according to the dot matrix instruction; If the printed file is not executed according to the dot matrix instruction, it is determined that there is a parameter deviation.
2. The method according to claim 1, characterized in that The usage data includes temperature data, and the analyzing the usage data to determine whether there is an abnormality in the hardware of the micro printer includes: Analyzing temperature data during the execution of the printing task to determine whether temperature changes during the printing process are abnormal; If there is an abnormality in the temperature change during the printing process, the temperature standard at the current moment is reset, the micro printer is started to re-execute the printing task at the current moment, and the temperature change during the execution process is received; The received result is analyzed to determine whether there is an abnormality in the temperature sensor of the micro printer.
3. The method according to claim 1, characterized in that Determining whether the printed file is executed according to the dot matrix instruction based on the analysis result of the image includes: Predicting, based on the dot matrix instruction and the printing task, the file format after the printing task is completed; Analyzing the predicted file format and matching the analysis result with the analysis result of the image to obtain a matching degree; Comparing the matching degree with a preset matching threshold, and if the matching degree is higher than the preset matching threshold, determining that the printed file is executed according to the dot matrix instruction; Determining whether there is a parameter deviation includes: If the matching degree is lower than a preset matching threshold, it is determined that there is a parameter deviation.
4. The method according to claim 1, wherein Methods before anomaly detection include: Collecting sample data, where the sample data includes several printer types and related information of the corresponding printer types; Inputting the sample data into a deep learning model, and training the deep learning model so that the deep learning model determines relevant information of a corresponding type of printer according to the type; The acquisition of the standard parameters includes: determining the type of the micro-printer according to the basic information of the micro-printer; The type of the micro printer is input into the deep learning model to determine the relevant information of the micro printer, and the standard parameters of the micro printer are retrieved from the relevant information.
5. An abnormality detection device based on a micro printer, characterized in that: include: An image acquisition module, used to acquire an image captured by a camera device when a printing task is completed; An image analysis module is used to analyze the image and determine whether there is any abnormality in the file that has been printed at the current moment; A parameter retrieving module, configured to retrieve the printing parameters of the micro-printer if an abnormality occurs in the file that has been printed at the current moment; a deviation analysis module, for comparing the printing parameters with standard parameters to determine whether there is a parameter deviation; an abnormality determination module, configured to determine that the source of the abnormality of the micro-printer is a parameter abnormality if a parameter deviation exists, and to retrieve usage data of the micro-printer and analyze the usage data to determine whether there is an abnormality in the hardware of the micro-printer if no parameter deviation exists; The deviation analysis module is specifically used for: Determine the current printing specifications based on the printing task; retrieve standard parameters corresponding to the printing specifications and parameter adjustment ranges corresponding to the printing specifications from a preset database; match the printing parameters with the standard parameters corresponding to the printing specifications to determine whether there is a parameter deviation; If the parameter deviation exists, determining that the source of the abnormality of the micro printer is the parameter abnormality includes: calculating the printing parameter with the parameter deviation and the standard parameter corresponding to the printing specification, and determining whether the parameter deviation falls within the parameter adjustment range based on the calculation result; if it is determined that the parameter deviation does not fall within the parameter adjustment range, determining that the source of the abnormality of the micro printer is the parameter abnormality; The usage data includes print head usage data, the camera device includes an embedded camera device, and the abnormality determination module is specifically configured to: Based on the analysis result of the image, determining whether there is color difference in the file that has been printed at the current moment; if there is color difference in the file that has been printed at the current moment, controlling the embedded camera device to capture an image of the print head of the micro-printer, and performing feature extraction on the image to obtain image features; matching the image features with preset abnormality features to determine whether there is stain on the print head; if there is no stain, determining the degree of wear of the print head of the micro-printer based on the print head usage data; determining whether the length of the print head at the current moment is less than the preset print head length based on the wear degree and the preset print head length; if it is determined that the length of the print head at the current moment is less than the preset print head length, determining that there is an abnormality in the hardware of the micro-printer; The deviation analysis module is further specifically used for: Based on the printing task, the dot matrix instruction at the current moment is determined; the dot matrix instruction is input into the micro printer by the manufacturer during the production process, and the micro printer will print according to the provisions of the dot matrix instruction; based on the analysis result of the image, it is determined whether the printed file is executed according to the dot matrix instruction; if the printed file is not executed according to the dot matrix instruction, it is determined that there is a parameter deviation.
6. An electronic device, characterized in that: include: memory and processor; The memory is used to store program instructions; The processor is used to call and execute program instructions in the memory to perform the micro-printer-based anomaly detection method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program; when the computer program is executed by the processor, the micro-printer-based anomaly detection method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Method and apparatus for generating trained models for print inspection systems
JP7204265B1
Image forming apparatus and method for diagnosing failure occurrence location thereof
US10496005B1