Cloud-based 3D printer intelligent control method and system

By generating G-code data in the cloud and combining it with real-time context-aware AI inference, the problem of insufficient detection accuracy in existing 3D printing technologies has been solved, enabling more efficient and reliable detection and remote management of printing anomalies.

CN120963040BActive Publication Date: 2026-05-19XIANYANG VOCATIONAL TECHN COLLEGE
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIANYANG VOCATIONAL TECHN COLLEGE
Filing Date
2025-08-07
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing 3D printing technologies suffer from insufficient detection accuracy, poor generalization, and a lack of real-time context awareness in terms of intelligent monitoring, leading to frequent printing defects and affecting the quality and efficiency of printed parts.

Method used

By receiving STL model files and printing parameters uploaded by users in the cloud, G-code data is generated. Combined with the printer's real-time G-code line numbers and camera video frames, context-aware AI reasoning is performed to generate accurate anomaly decisions and alerts.

Benefits of technology

It significantly improves the accuracy and robustness of print anomaly detection, providing a smarter, more efficient, and reliable remote printing experience, and reducing print failures and consumable waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120963040B_ABST
    Figure CN120963040B_ABST
Patent Text Reader

Abstract

The application discloses a cloud-based 3D printer intelligent control method and system, which receives the STL model file and printing parameters uploaded by the user in the cloud, executes slicing operation to generate G code data and transmits the G code data to the printer; then, the cloud continuously receives the G code line number currently executed by the printer, and accordingly performs context analysis on the G code data to generate a real-time printing context vector reflecting the current working state and expected action of the printer; at the same time, combined with the camera video frames collected by the printer, the real-time context vector is used to perform AI inference on the visual data based on context perception, so that more accurate abnormal decision is generated and an alarm is sent to the client. In this way, the accuracy and robustness of the printing abnormality detection are significantly improved, thereby providing a more intelligent, efficient and reliable remote printing experience for the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent control, and more specifically, to a cloud-based intelligent control method and system for 3D printers. Background Technology

[0002] 3D printing technology, as a core technology in additive manufacturing, has demonstrated revolutionary potential in recent years across numerous application scenarios, including industrial manufacturing, healthcare, education, and personalized customization. However, in practice, the 3D printing process is highly susceptible to various factors, such as inconsistent material extrusion, interlayer bonding defects, abnormal support structures, warping and deformation of printed parts, and other printing flaws. These defects not only directly affect the mechanical properties and surface quality of the printed parts but can also lead to material waste and printing failures, significantly increasing production costs and time. For complex models or long-duration printing tasks, continuous manual monitoring becomes extremely impractical and cannot meet the needs of remote management and large-scale production, which greatly restricts the further popularization and industrial application of 3D printing technology.

[0003] To address these challenges, existing technologies have attempted to introduce intelligent monitoring solutions. Early methods typically relied on printer-embedded contact sensors or simple visual recognition mechanisms to monitor a few key parameters (such as printhead temperature and filament level) or identify obvious structural deviations. With the development of artificial intelligence, especially computer vision technology, more and more solutions utilize cameras to collect visual data of the printing process and use image processing and machine learning algorithms to identify printing anomalies. However, these existing intelligent monitoring solutions generally have limitations. Many visual inspection systems treat the printing process as a series of isolated image frames, and their intelligent judgments are often based solely on visual information at a single moment, severely lacking an understanding of the overall context of the current printing task. Furthermore, existing intelligent models are mostly general-purpose, making it difficult to perform refined and personalized fault judgments based on different user habits, the performance differences of different printers, and the specific geometric features of the model to be printed (such as whether the current printing area indicated by the G-code is an outer wall, infill, or support). This contradiction between the model's generalization ability and the personalized needs of specific scenarios directly affects the accuracy of detection and the practicality of the system.

[0004] Therefore, an optimized cloud-based intelligent control method for 3D printers is anticipated. Summary of the Invention

[0005] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a cloud-based intelligent control method and system for 3D printers. After receiving STL model files and printing parameters uploaded by the user in the cloud, the system performs slicing operations to generate G-code data and transmits it to the printer. Subsequently, the cloud continuously receives the line number of the G-code currently being executed by the printer and performs context parsing on the G-code data accordingly, generating a real-time printing context vector reflecting the printer's current operating state and expected actions. Simultaneously, combined with camera video frames captured by the printer, this real-time context vector is used to perform context-aware AI inference on visual data, thereby generating more accurate anomaly decisions and sending alerts to the client. This approach significantly improves the accuracy and robustness of printing anomaly detection, providing users with a more intelligent, efficient, and reliable remote printing experience.

[0006] According to one aspect of this application, a cloud-based intelligent control method for a 3D printer is provided, comprising:

[0007] In the cloud, retrieve the user ID, target printer ID, STL model file, and printing parameters uploaded by the client;

[0008] In the cloud, the cloud slicing module slices the STL model file according to the printing parameters to obtain G-code data, and transmits the G-code data to the printer;

[0009] In the cloud, the currently executing G-code line number uploaded by the printer is received, and G-code context parsing is performed on the currently executing G-code line number based on the G-code data to obtain a real-time printing context vector;

[0010] In the cloud, camera video frames captured by the printer are acquired, and context-aware AI reasoning is performed on the camera video frames based on the real-time printing context vector to obtain anomaly decisions.

[0011] In the cloud, the anomaly decision is sent to the client, which then displays different levels of alerts based on the anomaly decision.

[0012] According to another aspect of this application, a cloud-based intelligent control system for a 3D printer is provided, comprising:

[0013] The information acquisition module is used to acquire, from the cloud, the user ID, target printer ID, STL model file and printing parameters uploaded by the client.

[0014] The cloud slicing module is used to slice the STL model file according to the printing parameters in the cloud to obtain G-code data, and then transmit the G-code data to the printer.

[0015] The G-code context parsing module is used to receive the currently executing G-code line number uploaded by the printer in the cloud, and perform G-code context parsing on the currently executing G-code line number based on the G-code data to obtain a real-time printing context vector;

[0016] The anomaly decision module is used to acquire camera video frames captured by the printer in the cloud, and perform context-aware AI reasoning on the camera video frames based on the real-time printing context vector to obtain anomaly decisions.

[0017] The intelligent alarm module is used to send the abnormal decision to the client in the cloud, and the client displays different levels of alarms based on the abnormal decision.

[0018] Compared with existing technologies, this application provides a cloud-based intelligent control method and system for 3D printers. After receiving STL model files and printing parameters uploaded by the user in the cloud, it performs slicing operations to generate G-code data and transmits it to the printer. Subsequently, the cloud continuously receives the line number of the G-code currently being executed by the printer and performs context parsing on the G-code data accordingly, generating a real-time printing context vector reflecting the printer's current working state and expected actions. Simultaneously, combined with camera video frames captured by the printer, this real-time context vector is used to perform context-aware AI inference on visual data, thereby generating more accurate anomaly decisions and sending alerts to the client. This approach significantly improves the accuracy and robustness of printing anomaly detection, providing users with a more intelligent, efficient, and reliable remote printing experience. Attached Figure Description

[0019] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0020] Figure 1 This is a flowchart of a cloud-based intelligent control method for a 3D printer according to an embodiment of this application;

[0021] Figure 2 This is a schematic diagram of the data flow of a cloud-based intelligent control method for 3D printers according to an embodiment of this application;

[0022] Figure 3 This is a block diagram of a cloud-based intelligent control system for a 3D printer according to an embodiment of this application. Detailed Implementation

[0023] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0024] As indicated in this application and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not specifically singular and may include plural forms. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.

[0025] While this application makes various references to certain modules of the systems according to embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The modules described are merely illustrative, and different aspects of the systems and methods may use different modules.

[0026] Flowcharts are used in this application to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.

[0027] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0028] To address the common problems in existing intelligent 3D printing solutions, such as insufficient accuracy in defect detection, poor generalization, and lack of real-time context awareness, this application proposes a cloud-based intelligent control method for 3D printers. Its core technical concept lies in fully utilizing cloud computing resources to deeply integrate traditional G-code slicing processing, real-time printer status, and advanced AI visual inspection, and to provide precise guidance for visual reasoning through G-code context information.

[0029] Specifically, the technical solution of this application proposes a cloud-based intelligent control method for 3D printers. Figure 1 This is a flowchart of a cloud-based intelligent control method for a 3D printer according to an embodiment of this application. Figure 2 This is a system architecture diagram of a cloud-based intelligent control method for 3D printers according to an embodiment of this application. Figure 1 and Figure 2 As shown, the cloud-based intelligent control method for a 3D printer according to an embodiment of this application includes the following steps: S1, in the cloud, acquiring the user ID, target printer ID, STL model file, and printing parameters uploaded by the client; S2, in the cloud, a cloud slicing module slices the STL model file according to the printing parameters to obtain G-code data, and transmits the G-code data to the printer; S3, in the cloud, receiving the currently executed G-code line number uploaded by the printer, and performing G-code context parsing on the currently executed G-code line number based on the G-code data to obtain a real-time printing context vector; S4, in the cloud, acquiring camera video frames captured by the printer, and performing context-aware AI inference on the camera video frames based on the real-time printing context vector to obtain anomaly decisions; S5, in the cloud, sending the anomaly decisions to the client, and the client displays different levels of alarms based on the anomaly decisions.

[0030] Specifically, in step S1, the user ID, target printer ID, STL model file, and printing parameters uploaded by the client are obtained in the cloud. It should be understood that the user ID, target printer ID, STL model file, and printing parameters clearly identify the initiator of the printing task, the intended execution device, the physical model to be printed, and all key process parameters that determine the printing quality and process. In the technical solution of this application, by obtaining the user ID, target printer ID, STL model file, and printing parameters, the cloud system can perform subsequent model processing, intelligent slicing, real-time monitoring, and anomaly decision-making, thereby achieving remote and efficient 3D printing management and control, avoiding many limitations of traditional local operations, and providing users with great convenience and flexibility.

[0031] Among them, the user ID is a unique identifier used to identify and manage different users; the target printer ID is used to precisely specify and connect to the specific 3D printing device desired by the user; the STL model file (STL_model_file) is a 3D model file format widely used in the field of 3D printing, which approximates the surface geometry of an object through a large number of triangular facets; and the printing parameters are a set of key printing configuration information that together determine how the printing task is executed, such as the type of consumables selected, the printing thickness of each layer, the number of outer wall layers when slicing the model printing layers, etc.

[0032] In practice, when a user initiates a print job, the client application (which can be a desktop, mobile, or web application) encapsulates the required data via network communication protocols (such as HTTP / HTTPS requests) and sends it to a cloud server. Upon receiving this request, the cloud server parses it. First, the system extracts and identifies a unique user identifier and the user-specified target printer identifier; these two IDs are crucial for identifying user permissions and the target device. Next, the system processes the user-uploaded STL model file, a binary format 3D model data that defines the geometry of the object to be printed. This file is typically stored on a cloud storage service and assigned a unique storage path for subsequent modules to access. Simultaneously, the system receives and parses printing parameters, usually represented in a structured data format (such as JSON). These parameters cover various specific settings required during the printing process, such as "material_type," "layer_height," and "wall_count," which directly affect the model's slicing method and the final printing result.

[0033] Specifically, in step S2, the cloud-based slicing module slices the STL model file according to the printing parameters to obtain G-code data, and then transmits the G-code data to the printer. Since 3D printers cannot directly understand complex 3D model files (such as STL format), they require a set of precise, linear machine instructions to control operations such as nozzle movement, material extrusion volume, heating temperature, and printing speed. Therefore, in the technical solution of this application, by converting complex 3D models into printer-recognizable G-code through cloud slicing and placing the slicing operation in the cloud, the powerful computing capabilities of cloud servers are further utilized. This enables the handling of high-load slicing tasks for large and complex models, avoids the limitations of local computing resources on the client or printer, and ensures the standardization and efficiency of the slicing process, providing fundamental support for remote control and mass production.

[0034] Slicing is a crucial preprocessing step in 3D printing. During slicing, the 3D model (such as an STL file) is virtually cut into a series of two-dimensional slices (cross-sections) with fixed layer thicknesses by software (slicing engine). For each slice, the slicing software calculates the path the print head needs to follow, including the outer contour, infill path, and support path, and converts these paths and related control instructions into G-code. G-code data is the programming language used by CNC machine tools (including 3D printers). It consists of a series of commands starting with the letters "G" or "M" to precisely control various machine operations. For example, "G0" or "G1" commands control the movement of the tool head, "M104" controls the temperature of the nozzle heater, "M140" controls the heated bed temperature, and the "E" parameter controls the material extrusion rate of the extruder. The complete G-code file is the blueprint for the printer to perform the printing task. CuraEngine is an open-source 3D printing slicing engine that can convert 3D model files such as STL into G-code, supports various complex slicing strategies and printing parameter configurations, and is the foundation of desktop 3D printing software and online slicing services.

[0035] In practice, the cloud-based slicing module first calls the internal slicing engine, CuraEngine. That is, the cloud-based slicing module is activated after the cloud system has successfully obtained the user ID, target printer ID, STL model file, and required printing parameters from the client for the printing task. The core function of this module is to coordinate and execute slicing operations. First, the cloud-based slicing module initiates a call request to the internal slicing engine, CuraEngine, a highly optimized slicing tool that receives the raw 3D model data and a series of printing parameters as input. The cloud-based slicing module provides the STL model file to be processed (via its storage path or file stream) and the set of printing parameters previously received from the client, which details the printing process. Then, the internal slicing engine takes the STL model file as input and slices it according to the rules defined in the printing parameters to obtain G-code data. For example, it determines the thickness of each layer based on the "layer_height" parameter and calculates the geometric contour of each layer. Next, it generates the printing path for the outer wall of the model based on the "wall_count" parameter, and the internal filling structure based on the "infill_density" and "infill_pattern" parameters. If the printing parameters specify the need for a support structure, CuraEngine will also automatically identify the overhanging parts in the model and generate the corresponding support structure path. Throughout the slicing process, CuraEngine also considers other parameters, such as printing speed, nozzle temperature, heated bed temperature, and retraction settings, embedding these physical control instructions into the generated path data. Finally, after processing by CuraEngine's complex algorithms, a text file containing all the necessary printing instructions, i.e., G-code data, is generated. The G-code data consists of a series of G-instructions and M-instructions, precisely describing the movement of the print head in three-dimensional space, the material output of the extruder, the switching of the fan, and the temperature control of the heater, etc. It is worth mentioning that after the G-code data is generated, the next key task of the cloud slicing module is to securely and reliably transmit this data to the designated target printer. This transmission process is typically achieved through network protocols, ensuring the integrity and real-time nature of the G-code. This allows the printer to immediately receive and begin interpreting these instructions, thereby initiating the actual 3D printing process. This cloud-based integration of slicing and transmission not only greatly simplifies user operations but also optimizes the efficiency of the entire printing workflow.

[0036] Specifically, in step S3, the system receives the currently executing G-code line number uploaded by the printer in the cloud, and performs G-code context parsing on the currently executing G-code line number based on the G-code data to obtain a real-time printing context vector. It should be understood that in the 3D printing process, relying solely on independent visual information to determine whether the printing is abnormal is far from sufficient, often leading to false positives or false negatives. For example, when printing the internal filling or support structure of a model, its visual appearance may appear messy, but this is a normal process phenomenon; however, when printing the outer wall, any tiny flaw may be a serious defect. Without understanding the printer's current intent and stage, AI visual reasoning cannot make such distinctions. Therefore, by parsing the G-code context in real time, crucial semantic information can be provided for subsequent AI reasoning, enabling visual detection to have context-aware capabilities, thereby significantly improving the accuracy and intelligence level of anomaly detection.

[0037] In practice, firstly, the G-code data is read backward from the currently executed G-code line number as the starting index to obtain a G-code context slice. Specifically, when performing a printing task, the 3D printer reports the sequence number of the G-code instruction it is currently processing to the cloud in real time via a network connection. This real-time feedback mechanism is the starting point of the entire context-aware chain, ensuring that the cloud system can accurately track the actual progress of the printer. Once the cloud receives this currently executed G-code line number, it uses the previously uploaded and stored complete G-code data to read backward from the preset length of code block, starting from that line number, to obtain the G-code context slice. Here, the preset length determines how many lines of G-code are read forward to provide a proactive understanding of the printer's next actions.

[0038] Then, G-code micro-instruction parsing and instantaneous feature extraction are performed on the G-code context slice to obtain the real-time printing context vector. Specifically, firstly, the G-code context slice is input into a feature parsing engine; the feature parsing engine is a specially designed software module that traverses each G-code prefetch line in the G-code context slice and performs rule parsing on each G-code prefetch line to obtain an instantaneous feature set.

[0039] Next, the feature parsing engine traverses each G-code pre-read line in the G-code context slice and performs rule parsing on each G-code pre-read line to obtain an instantaneous feature set. Specifically, annotation pattern matching, instruction parameter extraction, and overhang region inference are performed on each G-code pre-read line to obtain the instantaneous feature set. Comment pattern matching refers to parsing the comment lines (usually starting with a semicolon) automatically added by the slicing software in the G-code file. These comments may contain type information of the current printing area, which greatly facilitates the semantic recognition of the printing area. Instruction parameter extraction involves parsing specific numerical parameters from the G-code instructions themselves. These parameters can be used to infer the nozzle position, movement trajectory, material extrusion rate, etc. Overhang region inference intelligently determines whether the current printing is in or about to enter an overhang region requiring support, based on the changes in the Z-axis and the relationship between the XY path and the previous layer contour in the G-code instructions. This is because the printing characteristics and potential problems of overhang regions are significantly different from those of non-overhang regions. Through these analyses, the system can construct an instantaneous feature set that characterizes the printer's current dynamic working state.

[0040] Subsequently, feature fusion and real-time context vector generation are performed on the instantaneous feature set to obtain the real-time printing context vector. Specifically, firstly, the instantaneous feature set is input into a vector generator to obtain an instantaneous feature vector; that is, the previously extracted features describing the current dynamic G-code behavior are transformed into a unified numerical vector representation. Then, the instantaneous feature vector is concatenated with the initial context vector to obtain the real-time printing context vector. The extraction of the initial context vector includes: firstly, using the target printer ID to extract static printer data from the printer profile database; this data may include hardware-level information such as printer model, nozzle diameter, heated bed size, and firmware version; then, using the material type in the original printing parameters as the key, static material data is extracted from the material property database; for example, recommended printing temperature, shrinkage rate, cooling requirements, etc. for different materials such as PLA and PETG; then, using the user ID to extract user history data from the user behavior database; this covers personalized information such as the user's historical printing success rate, common failure modes, and preferred printing parameter settings; finally, the printer static data, material static data, and user history data are vectorized and then concatenated to obtain the initial context vector. In the technical solution of this application, by concatenating the instantaneous feature vector (dynamic, G-code related) with the initial context vector (static, user / printer / material related), the final generated real-time printing context vector is a comprehensive, multimodal numerical representation. It not only contains the details of the specific actions being performed by the printer, but also integrates the macro background information of related hardware, materials and user experience, providing a powerful and accurate input for subsequent context-aware AI reasoning.

[0041] Specifically, in step S4, the camera video frames captured by the printer are acquired in the cloud, and context-aware AI inference is performed on the camera video frames based on the real-time printing context vector to obtain anomaly decisions. It should be understood that purely visual information may not be able to distinguish the normal shape of a printed part (e.g., the inherent visual characteristics of internal filling or support structures) from actual defects. Therefore, to overcome the limitations of visual judgment in traditional 3D printing monitoring—that is, isolated image analysis is prone to false alarms or missed alarms—the technical solution of this application incorporates the key semantic information of the real-time printing context vector. This allows the AI ​​model to more accurately understand the printer's current process status, the type of part being printed, and the expected visual performance, thereby achieving more intelligent and accurate anomaly identification, avoiding unnecessary alarms, and promptly identifying real problems, greatly improving the reliability and automation level of 3D printing.

[0042] In practice, the first step is to extract visual feature maps of the printed part from the camera video frames. During this process, the system continuously receives and uploads camera video frames captured in real-time by the printer's camera in the cloud. These video frames are the most direct visual record of the printing process, carrying information about the current physical state of the printed part. Furthermore, the video frames are processed using deep learning models (such as convolutional neural networks) to obtain high-dimensional visual feature representations. These feature maps capture visual details such as the surface texture, geometry, and color variations of the printed part.

[0043] Next, based on the real-time printing context vector, context-aware AI inference is performed on the visual feature map of the printed part to obtain a printing context-guided visual focus feature vector for the printed part. It should be understood that when the printer executes G-code of a complex model, visual anomalies (such as material accumulation or interlayer misalignment) in the same camera frame may correspond to completely different fault levels. Existing isolated frame analysis methods often produce misjudgments due to the lack of fusion of contextual information such as the current printing stage (e.g., printing overhang structures or infill layers), material properties (e.g., elasticity differences between PLA and TPU), and printer status (e.g., printhead wear history). Therefore, in the technical solution of this application, the real-time printing context vector generated by G-code parsing is used as a semantic probe to drive the visual analysis system to focus on the regional features most relevant to the current printing stage. First, a dynamic context topology containing dimensions such as printhead movement trajectory, temperature setting, and region type is constructed through G-code micro-instruction parsing. Then, this topology is used as a guide to perform a deep scan of the visual feature map using graph neural networks, ultimately forming decision features highly coupled with the physical process of the current printing task, significantly improving the accuracy of anomaly detection and scene adaptability.

[0044] Specifically, firstly, the visual feature map of the printed part is node-based along the channel dimension to obtain a set of visual node feature vectors for the printed part. It should be understood that when the printer is executing G-code instructions with complex geometry, the nozzle trajectory and material accumulation process form a dynamically changing physical relationship in space. This implicit topological dependency is easily submerged in local pixel responses in a conventional flattened feature map. Therefore, in the technical solution of this application, by materializing each feature channel as a graph node, different patterns detected by the CNN (such as edges, texture anomalies, hot spots, etc.) are transformed into independently analyzable semantic units. This defect detection paradigm based on structured semantic understanding, compared to traditional frame-by-frame analysis visual methods, significantly improves the sensitivity to detect hidden printing risks while reducing false alarm rates.

[0045] Specifically, in the technical solution of this application, the visual feature map of the printed part is node-based along the channel dimension using the following formula to obtain a set of visual node feature vectors of the printed part; the formula is:

[0046] ,

[0047] ,

[0048] ,

[0049] in, Visual feature map of the printed part. For feature flattening operation, For the first The visual node feature vector of the printed part in each channel. =C represents the total number of channels. It is a set of visual node feature vectors for printed parts.

[0050] Next, the adjacency matrix between visual nodes is calculated as the set of visual node feature vectors of the printed part. It should be understood that when the system captures the printing process through a camera, physical phenomena such as nozzle movement trajectory, material accumulation morphology, and thermal radiation distribution activate different but interconnected detection channels in the feature space. For example, anomalies in the edge detection channel may indicate impending interlayer separation, while fluctuations in the thermal imaging channel are often causally related to material extrusion discontinuities. While traditional convolution operations can automatically learn the local correlations between these channels, they cannot explicitly express long-distance dependencies across channels. This global perspective is crucial for predicting complex printing defects. In the technical solution of this application, by calculating the adjacency matrix between visual node feature vectors, defect clues originally scattered in each channel can be woven into an organic, holistic knowledge graph. Each weight value in the adjacency matrix essentially reflects the logical correlation strength of different detection modes in a specific printing context. This reasoning method based on the adjacency matrix breaks through the dependence of traditional visual detection methods on a single frame image, achieving continuous tracking of the dynamic evolution of the printing process.

[0051] Specifically, in the technical solution of this application, the adjacency matrix between visual nodes of the set of visual node feature vectors of the printed part is calculated using the following formula:

[0052] ,

[0053] in, For nodes and nodes The adjacency matrix between visual nodes It is the Sigmoid activation function. This is a learnable edge weight generation function (e.g., MLP). Here, a dynamic edge weight mechanism is introduced, going beyond traditional cosine similarity, through... Capture non-linear topological relationships.

[0054] Subsequently, the set of feature vectors of the visual nodes of the printed part and the adjacency matrix between the visual nodes are input into the graph convolutional neural network model to obtain the topological correlation matrix between the visual nodes of the printed part. It should be understood that when the printer executes G-code instructions with complex geometry, the nozzle movement trajectory, material accumulation process, and heat conduction effect will form a cross-regional physical coupling relationship. For example, the printing quality of the outer wall of the current layer depends not only on the extrusion parameters of this layer, but also on the cooling state of the lower layer and the heat accumulation of adjacent filling structures. This multi-dimensional interaction is manifested as weakly correlated signals scattered between different channels in the original visual feature map. In the technical solution of this application, the graph convolutional neural network can weave these fragmented abnormal signs into a knowledge network with causal relationships through iterative neighborhood information aggregation; where each graph convolutional layer simulates the interaction process of material behavior in space. For example, when a node detects an abnormal nozzle temperature, this signal will propagate to related nodes along the topological path defined by the adjacency matrix, activating the thermal deformation prediction node and the interlayer bond strength assessment node, forming an inference chain. This graph convolution-based topological correlation modeling significantly improves the system's ability to diagnose complex printing defects.

[0055] Specifically, in the technical solution of this application, the set of feature vectors of the visual nodes of the printed part and the adjacency matrix between the visual nodes are input into a graph convolutional neural network model and graph convolutional encoding is performed using the following formula to obtain the topological association matrix between the visual nodes of the printed part; the formula is:

[0056] ,

[0057] in, This is the node feature matrix, which is the matrix form of the set of visual node feature vectors of the printed part. It is an adjacency matrix. For graph convolutional networks, This is the topological association matrix between visual nodes of the printed part.

[0058] Subsequently, using the real-time printing context vector as a query vector, a full-domain scan interaction is performed on the topological association matrix between the visual nodes of the printed part to obtain the printing context-guided visual focusing feature vector of the printed part. It should be understood that when a printer executes G-code instructions for complex geometric structures, the same visual feature may have completely different semantic meanings at different printing stages. Traditional methods separate visual analysis from process parameters, failing to establish such cross-modal semantic associations. In the technical solution of this application, by using the real-time context vector obtained from G-code parsing as a query probe, the system can dynamically filter the most relevant feature subgraphs from the visual topology network according to the specific needs of the current printing stage. During this process, the system prioritizes the visual nodes and their associated paths most relevant to the current printing action. For example, when the context vector indicates that a fine toothed structure is currently being printed, the query mechanism automatically enhances the attention weight of edge sharpness nodes and inter-layer alignment nodes, while suppressing attention to irrelevant features such as fill density nodes. This context-guided full-domain scanning mechanism significantly improves the system's detection robustness and diagnostic accuracy in complex scenarios.

[0059] Specifically, in the technical solution of this application, firstly, the real-time printing context vector is globally pooled to obtain the global gating weight vector of the real-time printing context channel; this process is expressed by the formula:

[0060] ,

[0061] in, This is a linear projection of the topological association moments between visual nodes of the printed part. , and For learnable weight matrix, For activation function, To print the transpose of the context vector in real time, To print the global gating weight vector of the context channel in real time;

[0062] Next, the self-attention weights of the feature values ​​at each position in the global gating weight vector of the real-time printing context channel are calculated to obtain the real-time printing context channel gating attention weight factor; this process is expressed by the formula:

[0063] ,

[0064] in, For exponential operations, The first node in the topological association matrix between visual nodes of the printed part The feature vector of each node Scaling factor To print the first global gating weight vector of the context channel in real time Each feature value corresponds to a real-time printing context channel gating attention weight factor;

[0065] Subsequently, based on the real-time printing context channel gating attention weight factor, topology-aware feature aggregation is performed on the topological association matrix between the visual nodes of the printed part to obtain the printing context-guided visual focusing feature vector of the printed part; this process is expressed by the formula:

[0066] ,

[0067] in, for Feature values ​​at each position, To print the feature values ​​at each position of the context vector in real time, Provide visual focus feature vectors for printed parts based on the printing context.

[0068] Furthermore, based on the visual focus feature vector of the printed part guided by the printing context, the anomaly decision is generated. That is, the visual information after context guidance and feature focusing is used as input, and a decision module makes the final judgment. This module is usually a rigorously trained classifier or regression model that can output a judgment representing the degree or type of anomaly in the printing state based on the high-dimensional feature vector it receives.

[0069] In practice, firstly, a top-level classifier of deep learning (such as a fully connected layer or a small neural network) receives the visual focus feature vector of the printed part as input, guided by the printing context. This classifier is trained to distinguish between normal printing states and various abnormal states, such as material blockage, interlayer misalignment, and support structure failure. The model outputs a probability distribution or a score, representing the likelihood of belonging to each abnormal category. Then, based on these probabilities or scores, combined with preset thresholds or rules, the system can make a final anomaly decision. For example, if the probability of a certain anomaly type exceeds a specific threshold, or the overall score reaches a dangerous level, the system classifies it as an anomaly. The decision result typically includes the type of anomaly (e.g., "extrusion anomaly," "structural deformation"), the severity of the anomaly (e.g., "minor," "moderate," "severe"), and the possible confidence level.

[0070] Specifically, in S5, the abnormal decision is sent to the client in the cloud, and the client displays different levels of alerts based on the abnormal decision. That is, by displaying alerts to the user in real time and in a tiered manner, complex AI reasoning results are transformed into intuitive and actionable information, enabling the user to understand the printer's status promptly and intervene immediately when necessary. This minimizes printing failures, reduces consumable waste, and lowers manpower monitoring costs, ultimately improving the success rate of 3D printing and the user experience.

[0071] In practice, once the cloud-based anomaly decision-making module completes context-aware AI inference and generates a clear anomaly decision (e.g., the decision might be a structured data object containing information such as the anomaly type, severity level, and confidence level), this decision is immediately transmitted to the cloud-based intelligent alert module. The intelligent alert module encapsulates this anomaly decision into a data packet using a pre-defined network communication mechanism (e.g., WebSocket, MQTT, or other real-time push protocols) and sends it over the network to a client connected to the cloud. This real-time push mechanism ensures that anomaly information reaches the user with minimal latency. Once the client (i.e., the user's desktop application, mobile app, or web interface) successfully receives this anomaly decision data packet, its built-in alert processing logic immediately activates. The client first parses the received data, extracting key information such as the anomaly type, anomaly level (e.g., minor, moderate, severe), and confidence level. Based on this parsed information, the client displays different alert levels to the user. These different alert levels mean that the alert presentation is not static but dynamically adjusted according to the severity and type of the anomaly to achieve effective information delivery and optimized user experience. For example, for anomalies classified as "critical" (such as printhead clogging or printouts falling off the platform), the client might immediately trigger a full-screen red alert pop-up, play a loud, repetitive alarm sound, send a push notification to the user's mobile device, and may even vibrate the device to ensure uninterrupted user attention. For "minor" anomalies (such as slight stringing or surface irregularities), the client might only display a yellow warning icon in the print job status area on the interface, or record a message in the log, without triggering strong interference, allowing the user to review it at their convenience. This tiered alert mechanism allows users to quickly identify the urgency of the problem and prioritize the most critical issues. The client can display more relevant details, such as the G-code line number of the anomaly (if available), suggested troubleshooting steps, and may even simultaneously display camera video frame clips of the moment the anomaly occurred, allowing users to make a visual assessment.

[0072] In summary, the cloud-based intelligent control method for 3D printers according to embodiments of this application is explained. After receiving the STL model file and printing parameters uploaded by the user in the cloud, it performs a slicing operation to generate G-code data and transmits it to the printer. Subsequently, the cloud continuously receives the G-code line number currently being executed by the printer and performs context parsing on the G-code data accordingly to generate a real-time printing context vector reflecting the printer's current working state and expected actions. Simultaneously, combined with camera video frames captured by the printer, this real-time context vector is used to perform context-aware AI inference on the visual data, thereby generating more accurate anomaly decisions and sending alerts to the client. This approach significantly improves the accuracy and robustness of printing anomaly detection, providing users with a more intelligent, efficient, and reliable remote printing experience.

[0073] Furthermore, a cloud-based intelligent control system for 3D printers is also provided.

[0074] Figure 3 This is a block diagram of a cloud-based intelligent control system for a 3D printer according to an embodiment of this application. Figure 3 As shown, the cloud-based intelligent control system 300 for a 3D printer according to an embodiment of this application includes: an information acquisition module 310, used to acquire, in the cloud, a user ID, a target printer ID, an STL model file, and printing parameters uploaded by a client; a cloud slicing module 320, used to slice the STL model file according to the printing parameters to obtain G-code data in the cloud, and transmit the G-code data to the printer; a G-code context parsing module 330, used to receive the currently executed G-code line number uploaded by the printer in the cloud, and perform G-code context parsing on the currently executed G-code line number based on the G-code data to obtain a real-time printing context vector; an anomaly decision module 340, used to acquire camera video frames captured by the printer in the cloud, and perform context-aware AI inference on the camera video frames based on the real-time printing context vector to obtain an anomaly decision; and an intelligent alarm module 350, used to send the anomaly decision to the client in the cloud, and the client displays different levels of alarms based on the anomaly decision.

[0075] As described above, the cloud-based 3D printer intelligent control system 300 according to the embodiments of this application can be implemented in various wireless terminals, such as servers with cloud-based 3D printer intelligent control algorithms. In one possible implementation, the cloud-based 3D printer intelligent control system 300 according to the embodiments of this application can be integrated into the wireless terminal as a software module and / or hardware module. For example, the cloud-based 3D printer intelligent control system 300 can be a software module in the operating system of the wireless terminal, or it can be an application developed for the wireless terminal; of course, the cloud-based 3D printer intelligent control system 300 can also be one of many hardware modules of the wireless terminal.

[0076] Alternatively, in another example, the cloud-based 3D printer intelligent control system 300 and the wireless terminal can also be separate devices, and the cloud-based 3D printer intelligent control system 300 can connect to the wireless terminal via wired and / or wireless networks and transmit interactive information in accordance with an agreed data format.

[0077] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A cloud-based intelligent control method for 3D printers, characterized in that, include: In the cloud, retrieve the user ID, target printer ID, STL model file, and printing parameters uploaded by the client; In the cloud, the cloud slicing module slices the STL model file according to the printing parameters to obtain G-code data, and transmits the G-code data to the printer; In the cloud, the currently executing G-code line number uploaded by the printer is received, and G-code context parsing is performed on the currently executing G-code line number based on the G-code data to obtain a real-time printing context vector; In the cloud, camera video frames captured by the printer are acquired, and context-aware AI reasoning is performed on the camera video frames based on the real-time printing context vector to obtain anomaly decisions. This includes: extracting a visual feature map of the printed part from the camera video frames; performing context-aware AI reasoning on the visual feature map of the printed part based on the real-time printing context vector to obtain a printing context-guided visual focus feature vector of the printed part; and generating the anomaly decision based on the printing context-guided visual focus feature vector of the printed part. In the cloud, the abnormal decision is sent to the client, and the client displays different levels of alerts based on the abnormal decision; Specifically, based on the real-time printing context vector, context-aware AI inference is performed on the visual feature map of the printed part to obtain a printing context-guided visual focus feature vector for the printed part, including: The visual feature map of the printed part is node-based along the channel dimension to obtain a set of visual node feature vectors of the printed part; Calculate the adjacency matrix between visual nodes of the set of visual node feature vectors of the printed part; The set of feature vectors of the visual nodes of the printed part and the adjacency matrix between the visual nodes are input into the graph convolutional neural network model to obtain the topological association matrix between the visual nodes of the printed part. Using the real-time printing context vector as the query vector, a global scan interaction is performed on the topological association matrix between the visual nodes of the printed item to obtain the printing context-guided visual focusing feature vector of the printed item. This includes: performing global pooling on the real-time printing context vector to obtain a global gating weight vector for the real-time printing context channel; calculating the self-attention weight of the feature values ​​at each position in the global gating weight vector for the real-time printing context channel to obtain a gating attention weight factor for the real-time printing context channel; and performing topological awareness feature aggregation on the topological association matrix between the visual nodes of the printed item based on the gating attention weight factor for the real-time printing context channel to obtain the printing context-guided visual focusing feature vector of the printed item.

2. The cloud-based intelligent control method for 3D printers according to claim 1, characterized in that, In the cloud, the cloud slicing module slices the STL model file according to the printing parameters to obtain G-code data, and transmits the G-code data to the printer, including: The cloud-based slicing module calls an internal slicing engine, namely CuraEngine; and The internal slicing engine takes the STL model file as input and slices the STL model file according to the rules defined in the printing parameters to obtain G-code data.

3. The cloud-based intelligent control method for 3D printers according to claim 1, characterized in that, In the cloud, the system receives the currently executing G-code line number uploaded by the printer, and performs G-code context parsing on the currently executing G-code line number based on the G-code data to obtain a real-time printing context vector, including: Using the currently executed G-code line number as the starting index, read code blocks of a preset length from the G-code data to obtain a G-code context slice; The real-time printing context vector is obtained by parsing G-code micro-instructions and extracting instantaneous features from the G-code context slice.

4. The cloud-based intelligent control method for 3D printers according to claim 3, characterized in that, The real-time printing context vector is obtained by parsing G-code micro-instructions and extracting instantaneous features from the G-code context slice, including: The G-code context slice is input into the feature parsing engine; The feature parsing engine traverses each G-code prefetch line in the G-code context slice and performs rule parsing on each G-code prefetch line to obtain an instantaneous feature set; The instantaneous feature set is fused and a real-time context vector is generated to obtain the real-time printing context vector.

5. The cloud-based intelligent control method for 3D printers according to claim 4, characterized in that, The feature parsing engine traverses each G-code prefetch line in the G-code context slice and performs rule parsing on each G-code prefetch line to obtain an instantaneous feature set, including: performing annotation pattern matching, instruction parameter extraction, and overhang region inference on each G-code prefetch line to obtain the instantaneous feature set.

6. The cloud-based intelligent control method for 3D printers according to claim 4, characterized in that, The real-time printing context vector is obtained by performing feature fusion and real-time context vector generation on the instantaneous feature set, including: The instantaneous feature set is input into a vector generator to obtain an instantaneous feature vector; The instantaneous feature vector is concatenated with the initial context vector to obtain the real-time printing context vector.

7. The cloud-based intelligent control method for 3D printers according to claim 6, characterized in that, The extraction of the initial context vector includes: Retrieve static printer data from the printer profile database using the target printer ID; Using the material type in the original printing parameters as the key, extract static material data from the material property database; Use the user ID to extract historical user data from the user behavior database; The printer static data, material static data, and user history data are vectorized and then concatenated to obtain the initial context vector.

8. A cloud-based intelligent control system for a 3D printer, characterized in that, include: The information acquisition module is used to acquire, from the cloud, the user ID, target printer ID, STL model file and printing parameters uploaded by the client. The cloud slicing module is used to slice the STL model file according to the printing parameters in the cloud to obtain G-code data, and then transmit the G-code data to the printer. The G-code context parsing module is used to receive the currently executing G-code line number uploaded by the printer in the cloud, and perform G-code context parsing on the currently executing G-code line number based on the G-code data to obtain a real-time printing context vector; An anomaly decision module is used to acquire camera video frames captured by the printer in the cloud, and perform context-aware AI reasoning on the camera video frames based on the real-time printing context vector to obtain anomaly decisions. This includes: extracting a visual feature map of the printed part from the camera video frames; performing context-aware AI reasoning on the visual feature map of the printed part based on the real-time printing context vector to obtain a printing context-guided visual focus feature vector of the printed part; and generating the anomaly decision based on the printing context-guided visual focus feature vector of the printed part. The intelligent alarm module is used to send the abnormal decision to the client in the cloud, and the client displays alarms of different levels based on the abnormal decision; Specifically, based on the real-time printing context vector, context-aware AI inference is performed on the visual feature map of the printed part to obtain a printing context-guided visual focus feature vector for the printed part, including: The visual feature map of the printed part is node-based along the channel dimension to obtain a set of visual node feature vectors of the printed part; Calculate the adjacency matrix between visual nodes of the set of visual node feature vectors of the printed part; The set of feature vectors of the visual nodes of the printed part and the adjacency matrix between the visual nodes are input into the graph convolutional neural network model to obtain the topological association matrix between the visual nodes of the printed part. Using the real-time printing context vector as the query vector, a global scan interaction is performed on the topological association matrix between the visual nodes of the printed item to obtain the printing context-guided visual focusing feature vector of the printed item. This includes: performing global pooling on the real-time printing context vector to obtain a global gating weight vector for the real-time printing context channel; calculating the self-attention weight of the feature values ​​at each position in the global gating weight vector for the real-time printing context channel to obtain a gating attention weight factor for the real-time printing context channel; and performing topological awareness feature aggregation on the topological association matrix between the visual nodes of the printed item based on the gating attention weight factor for the real-time printing context channel to obtain the printing context-guided visual focusing feature vector of the printed item.