Detection method, system and related equipment for 3D printing equipment

By setting an algorithm model in the central processor of the 3D printing device to detect printing anomalies, the problems of privacy data leakage and high costs in the existing technology are solved, and efficient and secure printing anomaly detection and resource optimization are achieved.

CN118238419BActive Publication Date: 2025-09-19HUIZHOU CHUANGXIANG 3D TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410546866.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2025-09-19
Estimated Expiration
2044-04-30

AI Technical Summary

Technical Problem

Existing detection methods for 3D printing equipment rely on third-party APP online detection, which poses the risk of user privacy data leakage, is costly, and cannot effectively detect printing anomalies.

Method used

An algorithm model for data inference is set in the central processor of the 3D printing device. Anomaly detection is performed by obtaining printing information, and the initial algorithm model is quantized and reconstructed by reasoning to reduce space occupancy and resource consumption.

Benefits of technology

It improves the accuracy of printing anomaly detection and device reliability, reduces detection costs, protects user privacy and security, and optimizes CPU resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118238419B_ABST
    Figure CN118238419B_ABST
Patent Text Reader

Abstract

The present application provides a detection method, system, and related equipment for 3D printing equipment, including: obtaining printing information from the 3D printing equipment; transmitting the printing information to an algorithm model, so that the algorithm model detects whether the current 3D printing equipment has a printing anomaly based on the printing information, and stops 3D model printing when the current 3D printing equipment has a printing anomaly detected; wherein the algorithm model is obtained by quantizing the initial algorithm model and then performing model inference reconstruction, the model quantization is used to convert the model accuracy of the initial algorithm model into a preset model accuracy that can accelerate the model data inference process, and the model inference reconstruction is used to reduce the space occupied by the initial algorithm model. The present application can accurately detect whether a printing anomaly occurs during the printing process of a 3D printing device, reduce detection costs, and effectively protect the privacy and security of users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of 3D printing technology, and in particular to a detection method, system, and related equipment for 3D printing equipment. Background Art

[0002] With the rise of concepts like smart manufacturing and Industry 4.0, 3D printing technology is becoming increasingly widespread. 3D printing, first appearing in the mid-1990s, is essentially a state-of-the-art rapid prototyping device utilizing technologies like photocuring and paper lamination. It operates on essentially the same principle as conventional printing: a printer is filled with "printing material" such as liquid or powder. Once connected to a computer, the computer controls the process of layering the "printing material," ultimately transforming the blueprint on the computer into a physical object. This printing technology is known as 3D printing.

[0003] In related technologies, 3D printing equipment detects whether any abnormalities occur during the printing process through detection software or the NPU chip installed on the 3D printing device. Most 3D printing detection software uses a third-party APP for online detection, and the data is stored in the cloud, which may cause risks such as user video data leakage and cannot effectively protect user privacy and security; the cost of NPU chips is relatively high. Summary of the Invention

[0004] In view of this, the present application provides a detection method, apparatus and related equipment based on 3D printing equipment, which can accurately detect whether printing abnormalities occur during the printing process of the 3D printing equipment, reduce detection costs, and effectively protect the privacy and security of users.

[0005] A first aspect of the present application provides a detection method for a 3D printing device, wherein the 3D printing device includes a central processing unit, and the central processing unit includes an algorithm model for data inference. The detection method includes: obtaining printing information of the 3D printing device, wherein the printing information includes video data or image data of the current 3D printing device; transmitting the printing information to the algorithm model, so that the algorithm model detects whether the current 3D printing device has a printing abnormality based on the printing information, and stops 3D model printing when the current 3D printing device is detected to have a printing abnormality; wherein the algorithm model is obtained by performing model quantization on an initial algorithm model and then performing model inference reconstruction, the model quantization is used to convert the model accuracy of the initial algorithm model into a preset model accuracy that can accelerate the model data inference process, and the model inference reconstruction is used to reduce the space occupied by the initial algorithm model.

[0006] Compared with the related art, the embodiments of the present application have at least the following advantages:

[0007] By setting up an algorithm model for data inference in the central processing unit, when the 3D printing device obtains printing information, the printing information can be directly transmitted to the algorithm model, so that the algorithm model can detect whether the current 3D printing device has a printing abnormality based on the printing information. On the one hand, the detection through the algorithm model has high accuracy and can immediately stop 3D model printing when the current 3D printing device detects a printing abnormality, thereby improving the reliability of the 3D printing device. On the other hand, this detection method does not require the addition of additional third-party equipment or software, reducing detection costs and effectively protecting the privacy and security of users. In addition, since the algorithm model is obtained by quantizing the initial algorithm model and then performing model inference reconstruction, model quantization can accelerate the data inference process of the algorithm model, thereby reducing the consumption of central processing unit resources, and model inference reconstruction can reduce the space occupied by the algorithm model, thereby ensuring that the algorithm model can operate normally in the central processing unit.

[0008] In some possible implementations, the initial algorithm model is trained in the following manner: obtaining historical printing abnormality data, wherein the historical printing abnormality data includes historical image data or historical video data of printing abnormalities that occurred before or during the 3D printing process of the 3D printing device; performing data preprocessing on the historical printing abnormality data to obtain target training data; wherein the data preprocessing includes at least data analysis, data cleaning, and data enhancement; inputting the target training data into a preset algorithm model for model training, and using the preset algorithm model after the model training as the initial algorithm model, wherein the preset algorithm model is an algorithm model whose model size is lower than a preset value and whose computing power required by the model is lower than the preset computing power.

[0009] In this way, the accuracy of the trained initial algorithm model can be improved, thereby improving the model accuracy of the subsequently obtained algorithm model.

[0010] In some possible implementations, the printing abnormality includes multiple categories, and the historical printing abnormality data includes abnormal data corresponding to each of the categories; the data preprocessing of the historical printing abnormality data includes: visually counting the historical printing abnormality data and then performing equalization processing to obtain initial training data; wherein the number of abnormal data corresponding to each of the categories in the initial training data is within a preset number range; data cleaning and data enhancement are performed on the initial training data, and a preset percentage of noise data is added to obtain the target training data.

[0011] In this way, the amount of initial training data can be increased, and the amount of historical printed abnormal situation data corresponding to each type of abnormal situation can be made the same, or within a certain range, thereby further ensuring the accuracy of the subsequently trained algorithm model. In some possible implementations, the initial algorithm model is quantized in the following manner: according to a preset quantization calibration table, the model parameters of the initial algorithm model are converted into fixed-point representation, wherein the quantization calibration table includes at least the number of quantization bits, the quantization method, and the quantization range; the accuracy of the initial algorithm model whose model parameters are converted into fixed-point representation is detected. When the accuracy does not meet the preset requirements, the quantization calibration table is adjusted and the initial algorithm model is quantized again until the accuracy of the initial algorithm model after the model quantization meets the preset requirements.

[0012] By quantizing the initial algorithm model, the model's storage requirements can be reduced while improving the inference speed on the embedded side of the central processing unit. Model quantization converts floating-point model parameters into fixed-point representation, thereby reducing the space, memory bandwidth, and memory overhead occupied by the initial algorithm model on the storage medium. At the same time, the quantized model can take advantage of the higher computational efficiency of integer operations on the central processing unit compared to floating-point operations, enabling more efficient calculations on embedded hardware.

[0013] In some possible implementations, the initial algorithm model includes multiple hierarchical structures; the initial algorithm model after model quantization is reconstructed by model reasoning in the following manner: according to the shooting data size of the 3D printing device, the input value size of the initial algorithm model after the model quantization is modified; the output value of the initial algorithm model after the model quantization is reconstructed by non-maximum suppression; and the last three hierarchical structures of the initial algorithm model after the model quantization are reshaped by data dimensions.

[0014] By adopting this technical solution, the accuracy of the algorithm model can be ensured, and the output values ​​can be rewritten and sorted to further reduce the complexity of the algorithm; by reshaping the data dimensions of the last three hierarchical structures of the initial algorithm model after model quantization, the detection performance of the initial algorithm model can be guaranteed while reducing the size of the model's occupied space.

[0015] In some possible implementations, the central processing unit has multiple threads; before transmitting the printing information to the algorithm model, the detection method further includes: obtaining resource occupancy information of each thread among the multiple threads; determining a target thread among the multiple threads that meets preset data processing requirements based on the resource occupancy information of each thread; transmitting the printing information to the algorithm model so that the algorithm model detects whether the current 3D printing device has a printing abnormality based on the printing information, including: transmitting the printing information to the algorithm model so that the algorithm model detects whether the current 3D printing device has a printing abnormality through the target thread.

[0016] By adopting this technical solution, reasonable resource scheduling can be carried out, thereby improving the resource utilization rate of the central processing unit and ensuring the normal operation of the central processing unit.

[0017] In some possible implementations, after transmitting the printing information to the algorithm model, it also includes: obtaining the data inference time corresponding to the printing information; detecting whether the data inference time is less than or equal to the preset data inference time, and whether the current resource occupancy of the central processing unit is greater than the preset occupancy; the algorithm model detects whether the current 3D printing device has a printing abnormality through the target thread, including: when detecting that the data inference time is less than or equal to the preset data inference time, the algorithm model detects whether the current 3D printing device has a printing abnormality through the target thread; when detecting that the data inference time is greater than the preset data inference time, and the current resource occupancy of the central processing unit is greater than the preset occupancy, the algorithm model suspends detecting whether the current 3D printing device has a printing abnormality until detecting that the current resource occupancy of the central processing unit is less than or equal to the preset occupancy, and the algorithm model detects whether the current 3D printing device has a printing abnormality through the target thread.

[0018] By adopting this technical solution, the resources required for model inference can be further reduced, ensuring the normal operation of the central processing unit, thereby improving the stability of the 3D printing equipment.

[0019] The second aspect of the present application discloses a detection system for 3D printing equipment, comprising: a central processing unit, a data acquisition module and a data transmission module, wherein the central processing unit includes an algorithm model for data reasoning; the data acquisition module is used to obtain printing information of the 3D printing equipment, wherein the printing information includes video data or image data of the current 3D printing equipment; the data transmission module is used to transmit the printing information to the algorithm model; the algorithm model uses the printing information to detect whether the current 3D printing equipment has a printing abnormality, and the central processing unit is also used to stop 3D model printing when the current 3D printing equipment has a printing abnormality; wherein the algorithm model is obtained by quantizing the initial algorithm model and then performing model reasoning reconstruction, the model quantization is used to convert the model accuracy of the initial algorithm model into a preset model accuracy that can accelerate the model data reasoning process, and the model reasoning reconstruction is used to reduce the space occupied by the initial algorithm model.

[0020] A third aspect of the present application discloses an electronic device, comprising a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes the above-mentioned detection method for a 3D printing device.

[0021] A fourth aspect of the present application discloses a storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned detection method for a 3D printing device.

[0022] It can be understood that the detection system of the 3D printing device of the second aspect, the electronic device of the third aspect, and the storage medium of the fourth aspect provided above all correspond to the method of the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0024] Figure 1 This is a flowchart of a detection method for a 3D printing device provided in one embodiment of the present application.

[0025] Figure 2 This is a flowchart of a detection method for a 3D printing device provided in one embodiment of the present application.

[0026] Figure 3 This is a flowchart of a detection method for a 3D printing device provided in one embodiment of the present application.

[0027] Figure 4 A schematic diagram of the functional modules of a detection system for a 3D printing device provided in one embodiment of the present application.

[0028] Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to more clearly understand the above-mentioned objectives, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features therein can be combined with each other in the absence of conflict.

[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present application. The described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0032] It should be further noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0033] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. A and B can be singular or plural.

[0034] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0035] To facilitate understanding, some illustrations of concepts related to the embodiments of the present application are given for reference.

[0036] 3D printing equipment, also known as three-dimensional printers or stereo printers, is a rapid prototyping process that typically uses digital printing technology to create materials. 3D printing equipment is often used to create models or parts in fields such as mold manufacturing and industrial design.

[0037] Please refer to Figure 1 , which is a flow chart of a detection method for a 3D printing device provided in one embodiment of the present application. This embodiment is applied to a 3D printing device. The 3D printing device includes a central processing unit (CPU), which includes an algorithm model for data inference. The detection method includes the following steps:

[0038] Step 101: Obtain printing information of a 3D printing device.

[0039] In some embodiments, the printing information includes video data or image data of the current 3D printing device. It is understood that the 3D printing device includes a camera component, and when the 3D printing device prints a 3D model, the central processing unit controls the camera component to capture video data or image data of the printing process.

[0040] In some embodiments, before or during the 3D printing process, printing information of the 3D printing device is obtained.

[0041] It is worth noting that before printing a 3D model, various tools, such as pliers, spatulas, or screwdrivers, may be left on the printing platform of the 3D printing device, or the 3D model printed previously may not be removed. This may cause the 3D printing device to collide with the previously printed 3D model when printing directly, thereby damaging the 3D printing device. Therefore, by obtaining the printing information of the 3D printing device before the 3D printing device prints the 3D model, and performing anomaly detection based on the printing information in subsequent steps, it is possible to avoid printing anomalies in the 3D printing device before printing, thereby improving the reliability of the 3D printing device.

[0042] It should also be noted that during the 3D printing process, problems such as warping, model collapse, support structure failure, insufficient interlayer adhesion, inappropriate temperature settings, and excessive printing speeds may occur. Therefore, by obtaining printing information from the 3D printing device during the printing process and performing anomaly detection based on this information in subsequent steps, 3D printing can be immediately stopped if a printing anomaly occurs during the 3D printing process, thereby further improving the reliability of the 3D printing device.

[0043] In some embodiments, the shooting method of the shooting component is not specifically limited. For example, when the shooting component shoots video data of the printing process, it can shoot 20 seconds of video data every 1 minute, or it can shoot 50 seconds of video data every 2 minutes. This embodiment does not specifically limit the shooting interval and shooting duration when the shooting component shoots video.

[0044] For example, when the shooting component captures image data of the printing process, it may capture images once every 10 seconds or once every 20 seconds. This embodiment also does not impose any specific limitation on the shooting interval when the shooting component captures images.

[0045] Step 102: The printing information is transmitted to the algorithm model, so that the algorithm model detects whether there is any printing abnormality in the current 3D printing device according to the printing information.

[0046] In some embodiments, the algorithm model is obtained by performing model quantization on the initial algorithm model and then performing model inference reconstruction. Model quantization is used to convert the model accuracy of the initial algorithm model into a preset model accuracy that can accelerate the model data inference process. Model inference reconstruction is used to reduce the space occupied by the initial algorithm model.

[0047] In some embodiments, the initial algorithm model is trained in the following manner: obtaining historical printing abnormality data, wherein the historical printing abnormality data includes historical image data or historical video data of printing abnormalities that occurred before or during the 3D printing process of the 3D printing device; performing data preprocessing on the historical printing abnormality data to obtain target training data; wherein the data preprocessing includes at least data analysis, data cleaning, and data enhancement; inputting the target training data into a preset algorithm model for model training, and using the preset algorithm model after model training as the initial algorithm model, wherein the preset algorithm model is an algorithm model whose model size is lower than a preset value and whose computing power required by the model is lower than the preset computing power.

[0048] In some embodiments, the preset algorithm model is the Yolov5n model. Yolov5n is a model in the field of target detection that ensures that the detection accuracy meets the requirements while having a small model size, required computing power, and memory. It can ensure that while running the detection on the central processing unit side, the impact on the motion control related processes of the 3D printing device is small.

[0049] In some embodiments, printing abnormality situations include multiple categories, and historical printing abnormality situation data include abnormal data corresponding to each category; data preprocessing is performed on the historical printing abnormality situation data, including: visual statistics of the historical printing abnormality situation data and then equalization processing to obtain initial training data; wherein the number of abnormal data corresponding to each category in the initial training data is within a preset number range; data cleaning and data enhancement are performed on the initial training data, and a preset percentage of noise data is added to obtain target training data.

[0050] In some embodiments, the size of the preset percentage is not specifically limited and may be 2%, 1.5%, etc., and may be set according to actual needs.

[0051] To facilitate understanding, the following describes in detail how data preprocessing is performed in this embodiment:

[0052] 1. Define 3D printing anomalies, such as foreign objects on the platform, abnormally failed prints, filamentous objects, etc., and collect historical printing anomaly data for different anomalies. It is understandable that in order to ensure the accuracy of the subsequently trained algorithm model, multiple historical printing anomaly data are required for each type of anomaly.

[0053] 2. Perform data analysis on historical printing anomaly data, including using scatter plots to visualize the distribution of sample labels, understand the distribution, central tendency, and degree of dispersion of historical printing anomaly data, and count and balance all historical printing anomaly data. Specifically, after balancing the historical printing anomaly data, the number of historical printing anomaly data corresponding to each type of anomaly is equal or within a certain range, thereby further ensuring the accuracy of the subsequently trained algorithm model.

[0054] 3. Automatically orient the marked area of ​​historical printing abnormality data. For example, if the abnormality type is the presence of foreign matter on the platform and the corresponding historical printing abnormality data is data A, the marked area of ​​data A will be automatically oriented to the printing platform.

[0055] 4. Automatically orient the marked area. After automatic orientation, the historical printing anomaly data is cleaned and enhanced. Specifically, data cleaning removes problematic data from the historical printing anomaly data, such as distorted image data. Data enhancement enhances or reduces the brightness, saturation, and exposure of the historical printing anomaly data to match the actual camera imaging effect.

[0056] 5. Randomly add a preset percentage of noise data to the historical printing abnormality data after data cleaning and data enhancement to improve the algorithm robustness of the subsequently trained algorithm model.

[0057] In some embodiments, the initial algorithm model is quantized in the following manner: according to a preset quantization calibration table, the model parameters of the initial algorithm model are converted into fixed-point representation, wherein the quantization calibration table includes at least the number of quantization bits, the quantization method, and the quantization range; the accuracy of the initial algorithm model whose model parameters are converted into fixed-point representation is detected. When the accuracy does not meet the preset requirements, the quantization calibration table is adjusted and the initial algorithm model is quantized again until the accuracy of the initial algorithm model after model quantization meets the preset requirements.

[0058] It is worth mentioning that quantizing the initial algorithm model can reduce the model's storage requirements and improve the inference speed on the embedded side of the central processing unit: model quantization converts floating-point model parameters into fixed-point representation, thereby reducing the space, memory bandwidth, and memory overhead occupied by the initial algorithm model on the storage medium; at the same time, the quantized model can take advantage of the higher computational efficiency of integer operations on the central processing unit compared to floating-point operations, thereby achieving more efficient calculations on embedded hardware.

[0059] To facilitate understanding, the following is a detailed description of how to quantize the initial algorithm model in this embodiment: The core of model quantization is to convert the format of the initial algorithm model to ONNX format through the ONNX open source library, which helps to better deploy the model and quickly exchange and transplant it between different frameworks and platforms, thereby improving the utility and usability of the model. The ONNX format file of the initial algorithm model is then quantized through the NCNN framework. The specific quantization steps are as follows:

[0060] 1. Create a quantization calibration table to specify the quantization parameters and settings. The calibration table file is a text file that contains the parameters required for quantization, such as the quantization method, quantization bit number, and quantization range. In this example, the parameter settings are mean = [104, 117, 123]; norm = [0.017, 0.017, 0.017]; shape = [320, 320, 3]; pixel = BGR; thread = 8; method = kl.

[0061] 2. Calculate the quantization calibration table to maintain accuracy: To maintain a certain level of model accuracy after quantization, it is necessary to collect the histogram of activation values ​​for each layer, generate different quantization distributions based on different thresholds, and then calculate the relative entropy of each distribution with the original distribution. The one with the least entropy, that is, the one most similar to the original distribution, is selected as the resulting output scale to ensure quantization accuracy.

[0062] 3. Quantize activation values: Multiply the model input by the scale result of the quantization calibration table to match the quantization parameter, and then truncate to int8.

[0063] 4. Evaluation and Adjustment: After the quantization training is completed, the accuracy of the quantization model needs to be evaluated. If the accuracy of the model does not meet the requirements, further adjustments and fine-tuning can be performed, such as adjusting the range of quantization parameters or retraining some layers of the model.

[0064] In some embodiments, the initial algorithm model includes multiple hierarchical structures; the initial algorithm model after model quantization is reconstructed by model reasoning in the following manner: according to the shooting data size of the 3D printing device, the input value size of the initial algorithm model after model quantization is modified; the output value of the initial algorithm model after model quantization is reconstructed by non-maximum suppression; and the last three hierarchical structures of the initial algorithm model after model quantization are reshaped by data dimensions.

[0065] Specifically, by modifying the input value size of the initial algorithm model after model quantization according to the size of the shooting data of the 3D printing device, the accuracy of the algorithm model can be ensured; by performing non-maximum suppression reconstruction on the output value of the initial algorithm model after model quantization, the output value can be rewritten and sorted to further reduce the complexity of the algorithm; by reshaping the data dimensions of the last three hierarchical structures of the initial algorithm model after model quantization, for example, by Reshaping 0=1600 to indicate that the first dimension (usually the batch size) is set to 1600 and suppressed to -1, the size of the model's occupied space can be reduced while ensuring the detection performance of the initial algorithm model.

[0066] Step 103: When it is detected that the current 3D printing device has a printing abnormality, stop printing the 3D model.

[0067] In some embodiments, when the algorithm model detects that the current 3D printing device has a printing abnormality, the central processing unit controls the nozzle assembly of the 3D printing device to stop printing the 3D model.

[0068] In some embodiments, after the 3D printing device stops printing the 3D model, it will also send a warning message to the user to remind the user of the printing abnormality so that the user can handle it in time, thereby improving the stability of the 3D printing device.

[0069] In some embodiments, the type of warning information includes but is not limited to voice reminders, text reminders, etc. The user can set the type of warning information according to actual needs.

[0070] Compared with the related art, the embodiments of the present application have at least the following advantages: by setting an algorithm model for data inference in the central processing unit, when the 3D printing device obtains printing information, the printing information can be directly transmitted to the algorithm model, so that the algorithm model can detect whether the current 3D printing device has a printing abnormality based on the printing information. On the one hand, the detection through the algorithm model has high accuracy, and when it is detected that the current 3D printing device has a printing abnormality, it can immediately stop the 3D model printing, thereby improving the reliability of the 3D printing device; on the other hand, this detection method does not require the addition of additional third-party equipment or software, reduces the detection cost, and effectively protects the privacy and security of users. In addition, since the algorithm model is obtained by quantizing the initial algorithm model and then performing model inference reconstruction, model quantization can accelerate the data inference process of the algorithm model, thereby reducing the consumption of central processing unit resources, and model inference reconstruction can reduce the space occupied by the algorithm model, thereby ensuring that the algorithm model can operate normally in the central processing unit.

[0071] Please refer to Figure 2 , is a flow chart of a detection method for a 3D printing device provided in one embodiment of the present application. This embodiment is a further improvement on the previous embodiment, primarily in that: in this embodiment, the resource usage information of each thread in the central processing unit is also detected, and the thread that meets the preset data processing requirements among multiple threads is used as the target thread for data inference in the algorithm model. In this way, reasonable resource scheduling can be performed, thereby improving the resource utilization of the central processing unit and ensuring the normal operation of the central processing unit.

[0072] The specific process of this embodiment is as follows Figure 2 As shown, it is applied to 3D printing equipment, including the following steps:

[0073] Step 201: Obtain printing information of a 3D printing device.

[0074] Step 202: Obtain resource occupancy information of each thread in the current plurality of threads.

[0075] Step 203: Determine a target thread that meets the preset data processing requirement among the multiple threads based on the resource occupancy information of each thread.

[0076] In some embodiments, if a thread is not currently processing any task, it indicates that the thread meets the preset data processing requirements.

[0077] Step 204: The printing information is transmitted to the algorithm model, so that the algorithm model detects whether there is any printing abnormality in the current 3D printing device through the target thread.

[0078] In some embodiments, the target thread executes the algorithm model to detect whether the current 3D printing device has a printing anomaly based on the printing information. In this way, the idle thread can be used to execute the algorithm model's reasoning task, thereby improving the resource utilization of the central processing unit.

[0079] Step 205: When it is detected that the current 3D printing device has a printing abnormality, stop printing the 3D model.

[0080] Step 201 and step 205 of this embodiment are similar to step 101 and step 103 of the above embodiment, and will not be described again here to avoid repetition.

[0081] Compared with the related art, the embodiments of the present application have at least the following advantages: by setting an algorithm model for data inference in the central processing unit, when the 3D printing device obtains printing information, the printing information can be directly transmitted to the algorithm model, so that the algorithm model can detect whether the current 3D printing device has a printing abnormality based on the printing information. On the one hand, the detection through the algorithm model has high accuracy, and when it is detected that the current 3D printing device has a printing abnormality, it can immediately stop the 3D model printing, thereby improving the reliability of the 3D printing device; on the other hand, this detection method does not require the addition of additional third-party equipment or software, reduces the detection cost, and effectively protects the privacy and security of users. In addition, since the algorithm model is obtained by quantizing the initial algorithm model and then performing model inference reconstruction, model quantization can accelerate the data inference process of the algorithm model, thereby reducing the consumption of central processing unit resources, and model inference reconstruction can reduce the space occupied by the algorithm model, thereby ensuring that the algorithm model can operate normally in the central processing unit.

[0082] Please refer to Figure 3, which is a flow chart of a detection method for a 3D printing device provided in one embodiment of the present application. This embodiment is a further improvement on the aforementioned embodiment, and the main improvement is that: in this embodiment, it is also detected whether the data inference time corresponding to the printing information is less than or equal to the preset data inference time, and whether the current resource occupancy rate of the central processing unit is greater than the preset occupancy rate, and when the data inference time is greater than the preset data inference time, and the current resource occupancy rate of the central processing unit is greater than the preset occupancy rate, the algorithm model pauses the detection of whether there is a printing abnormality in the current 3D printing device. In this way, the resources required for model inference can be further reduced, the normal operation of the central processing unit can be ensured, and the stability of the 3D printing device can be improved.

[0083] The specific process of this embodiment is as follows Figure 3 As shown, it is applied to 3D printing equipment, including the following steps:

[0084] Step 301: Obtain printing information of a 3D printing device.

[0085] Step 302: Obtain resource occupancy information of each thread in the current plurality of threads.

[0086] Step 303: Determine a target thread that meets the preset data processing requirement among the multiple threads according to the resource occupancy information of each thread.

[0087] Step 304: Transmit the printing information to the algorithm model to obtain the data inference time corresponding to the printing information.

[0088] In some embodiments, after receiving the printing information, the central processing unit determines the time required to process the printing information, that is, the data inference time.

[0089] Step 305: When it is detected that the data inference time is less than or equal to the preset data inference time, the algorithm model detects whether there is a printing abnormality in the current 3D printing device through the target thread.

[0090] In some embodiments, if the data inference time is less than or equal to the preset data inference time, indicating that the inference task corresponding to the printing information will not occupy too much resource utilization, the algorithm model directly detects whether there is a printing abnormality in the current 3D printing device in the target thread based on the printing information.

[0091] In some embodiments, the preset data inference time can be set according to actual needs. This embodiment does not specifically limit the duration of the preset data inference time.

[0092] Step 306: When it is detected that the data inference time is greater than the preset data inference time and the current resource occupancy rate of the central processing unit is greater than the preset occupancy rate, the algorithm model suspends detection of whether the current 3D printing device has a printing abnormality until it is detected that the current resource occupancy rate of the central processing unit is less than or equal to the preset occupancy rate. Then, the algorithm model detects whether the current 3D printing device has a printing abnormality through the target thread.

[0093] In some embodiments, when it is detected that the current resource occupancy rate of the central processing unit is greater than the preset occupancy rate, it indicates that the central processing unit process is busy at this time. If the data inference time is greater than the preset data inference time, the central processing unit needs more time and resources to process the inference task corresponding to the printing information. By performing thread sleep processing on the inference task corresponding to the printing information, the intensive use of the central processing unit can be slowed down, thereby further reducing the resources required for model inference.

[0094] Step 307: When it is detected that the current 3D printing device has a printing abnormality, stop printing the 3D model.

[0095] Steps 301 to 303 and 305 of this embodiment are similar to steps 201 to 203 and 205 of the aforementioned embodiment, and will not be described again here to avoid repetition.

[0096] Compared with the related art, the embodiments of the present application have at least the following advantages: by setting an algorithm model for data inference in the central processing unit, when the 3D printing device obtains printing information, the printing information can be directly transmitted to the algorithm model, so that the algorithm model can detect whether the current 3D printing device has a printing abnormality based on the printing information. On the one hand, the detection through the algorithm model has high accuracy, and when it is detected that the current 3D printing device has a printing abnormality, it can immediately stop the 3D model printing, thereby improving the reliability of the 3D printing device; on the other hand, this detection method does not require the addition of additional third-party equipment or software, reduces the detection cost, and effectively protects the privacy and security of users. In addition, since the algorithm model is obtained by quantizing the initial algorithm model and then performing model inference reconstruction, model quantization can accelerate the data inference process of the algorithm model, thereby reducing the consumption of central processing unit resources, and model inference reconstruction can reduce the space occupied by the algorithm model, thereby ensuring that the algorithm model can operate normally in the central processing unit.

[0097] Please refer to Figure 4 , which is a functional module diagram of a detection system for a 3D printing device provided in an embodiment of the present application. The detection system 100 for a 3D printing device includes: a central processing unit 1, a data acquisition module 2, and a data transmission module 3, wherein the central processing unit 1 includes an algorithm model 10 for data reasoning.

[0098] The data acquisition module 2 is used to obtain printing information of the 3D printing device, wherein the printing information includes video data or image data of the current 3D printing device; the data transmission module 3 is used to transmit the printing information to the algorithm model; the algorithm model 10 is used to detect whether there is a printing abnormality in the current 3D printing device based on the printing information, and the central processing unit 1 is also used to stop the 3D model printing when there is a printing abnormality in the current 3D printing device; wherein, the algorithm model is obtained by quantizing the initial algorithm model and then performing model reasoning and reconstruction. The model quantization is used to convert the model accuracy of the initial algorithm model into a preset model accuracy that can accelerate the model data reasoning process. The model reasoning and reconstruction is used to reduce the space occupied by the initial algorithm model.

[0099] Please refer to Figure 5 , is a schematic diagram of the hardware structure of the electronic device 1000 provided in the embodiment of the present application. Figure 5 As shown, electronic device 1000 may include a processor 1001 and a memory 1002. Memory 1002 is configured to store one or more computer programs 1003. One or more computer programs 1003 are configured to be executed by processor 1001. The one or more computer programs 1003 include instructions that can be used to implement the above-mentioned 3D printing device detection method in electronic device 1000.

[0100] It is understood that the structure shown in this embodiment does not constitute a specific limitation on the electronic device 1000. In other embodiments, the electronic device 1000 may include more or fewer components than shown, or combine or separate some components, or arrange the components differently.

[0101] The processor 1001 may include one or more processing units. For example, the processor 1001 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0102] Processor 1001 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 1001 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 1001. If processor 1001 needs to use the same instruction or data again, it can directly access it from this memory. This avoids duplicate accesses, reduces the waiting time of processor 1001, and thus improves system efficiency.

[0103] In some embodiments, the processor 1001 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface.

[0104] In some embodiments, memory 1002 may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0105] This embodiment further provides a computer-readable storage medium storing computer instructions. When the instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the detection method of the 3D printing device in the above-mentioned embodiment.

[0106] Among them, the detection device, electronic device, and storage medium based on the 3D printing device provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0107] In practical applications, the above functions can be distributed to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0108] In the several embodiments provided in this application, the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are schematic. For example, the division of the modules or units is a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0109] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0110] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0111] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0112] The above description is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be included in the protection scope of the present application.

Claims

1. A method for detecting a 3D printing device, characterized in that: The 3D printing device includes a central processing unit (CPU), the CPU includes an algorithm model for data reasoning, and the detection method includes: Acquiring printing information of the 3D printing device, wherein the printing information includes video data or image data of the current 3D printing device; Transmitting the printing information to the algorithm model, so that the algorithm model detects whether the current 3D printing device has a printing abnormality according to the printing information, and stops 3D model printing when the current 3D printing device is detected to have a printing abnormality; The algorithm model is obtained by performing model quantization on the initial algorithm model and then performing model inference reconstruction. The model quantization is used to convert the model accuracy of the initial algorithm model into a preset model accuracy that can accelerate the model data inference process. The model inference reconstruction is used to reduce the space occupied by the initial algorithm model. The algorithm model quantizes the initial algorithm model in the following manner: Converting the model parameters of the initial algorithm model into fixed-point representation according to a preset quantization calibration table, wherein the quantization calibration table includes at least the number of quantization bits, the quantization method, and the quantization range; The accuracy of the initial algorithm model converted from the detection model parameters to fixed-point numbers is detected. When the accuracy does not meet the preset requirements, the quantization calibration table is adjusted and the initial algorithm model is quantized again until the accuracy of the initial algorithm model after model quantization meets the preset requirements.

2. The detection method of a 3D printing device according to claim 1, wherein: The initial algorithm model is trained in the following way: Acquiring historical printing abnormality data, wherein the historical printing abnormality data includes historical image data or historical video data of the 3D printing device having printing abnormalities; Performing data preprocessing on the historical printing abnormality data to obtain target training data; wherein the data preprocessing includes at least data analysis, data cleaning, and data enhancement; The target training data is input into a preset algorithm model for model training, and the preset algorithm model after the model training is used as the initial algorithm model, wherein the preset algorithm model is an algorithm model whose model size is lower than a preset value and whose computing power required by the model is lower than the preset computing power.

3. The detection method of a 3D printing device according to claim 2, wherein: The printing abnormality includes multiple categories, and the historical printing abnormality data includes abnormal data corresponding to each category; The data preprocessing of the historical printing abnormality data includes: Performing visual statistics on the historical printing abnormality data and then performing equalization processing to obtain initial training data; wherein the number of abnormal data corresponding to each category in the initial training data is within a preset number range; The initial training data is cleaned and enhanced, and a preset percentage of noise data is added to obtain the target training data.

4. The detection method of a 3D printing device according to claim 1, wherein: The initial algorithm model includes multiple hierarchical structures; the initial algorithm model after model quantization is reconstructed by model reasoning in the following manner: Modifying the input value size of the initial algorithm model after the model quantization according to the shooting data size of the 3D printing device; Performing non-maximum suppression reconstruction on the output value of the initial algorithm model after the model is quantized; The data dimensions of the last three hierarchical structures of the initial algorithm model after the model is quantized are reshaped.

5. The detection method of 3D printing equipment according to claim 1, characterized in that: The central processing unit has multiple threads; before transmitting the printing information to the algorithm model, the detection method further includes: Obtain resource usage information of each thread in the current plurality of threads; Determining a target thread that meets a preset data processing requirement among the multiple threads according to the resource occupancy information of each thread; The transmitting the printing information to the algorithm model so that the algorithm model detects whether the current 3D printing device has a printing abnormality according to the printing information, includes: The printing information is transmitted to the algorithm model, so that the algorithm model detects whether there is a printing abnormality in the current 3D printing device through the target thread.

6. The detection method of 3D printing equipment according to claim 5, characterized in that: After transmitting the printing information to the algorithm model, the method further includes: Obtaining data inference time corresponding to the printing information; Detecting whether the data inference time is less than or equal to a preset data inference time, and whether the current resource occupancy rate of the central processing unit is greater than a preset occupancy rate; The algorithm model detects whether the current 3D printing device has a printing abnormality through the target thread, including: When it is detected that the data inference time is less than or equal to the preset data inference time, the algorithm model detects whether there is a printing abnormality in the current 3D printing device through the target thread; When it is detected that the data inference time is greater than the preset data inference time and the current resource occupancy rate of the central processing unit is greater than the preset occupancy rate, the algorithm model suspends detecting whether there is a printing abnormality in the current 3D printing device until it is detected that the current resource occupancy rate of the central processing unit is less than or equal to the preset occupancy rate. At this time, the algorithm model detects whether there is a printing abnormality in the current 3D printing device through the target thread.

7. A detection system for 3D printing equipment, characterized in that: include: A central processing unit, a data acquisition module, and a data transmission module, wherein the central processing unit includes an algorithm model for data reasoning; The data acquisition module is used to acquire printing information of the 3D printing device, wherein the printing information includes video data or image data of the current 3D printing device; The data transmission module is used to transmit the printing information to the algorithm model; The algorithm model is used to detect whether the current 3D printing device has a printing abnormality according to the printing information, and the central processing unit is further used to stop the 3D model printing when the current 3D printing device has a printing abnormality; The algorithm model is obtained by performing model quantization on the initial algorithm model and then performing model inference reconstruction. The model quantization is used to convert the model accuracy of the initial algorithm model into a preset model accuracy that can accelerate the model data inference process. The model inference reconstruction is used to reduce the space occupied by the initial algorithm model. The algorithm model quantizes the initial algorithm model in the following manner: Converting the model parameters of the initial algorithm model into fixed-point representation according to a preset quantization calibration table, wherein the quantization calibration table includes at least the number of quantization bits, the quantization method, and the quantization range; The accuracy of the initial algorithm model converted from the detection model parameters to fixed-point numbers is detected. When the accuracy does not meet the preset requirements, the quantization calibration table is adjusted and the initial algorithm model is quantized again until the accuracy of the initial algorithm model after model quantization meets the preset requirements.

8. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the electronic device executes the detection method for a 3D printing device according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, enable the electronic device to execute the detection method for a 3D printing device according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Quantization parameter confirmation method and device, electronic equipment and storage medium

    CN115238776A

  • 3D printing method, device and equipment for intelligently controlling object barriers and storage medium

    CN115489123A