CNC file analysis method, equipment and medium for deep-sea connectors
Through the CNC file analysis method for deep-sea connectors, using AI large models and multiple machine learning models, the shortcomings in CNC file quality and accuracy verification in the existing technology are solved, intelligent analysis and verification are realized, and production safety and efficiency are improved.
Patent Information
- Application Number
- CN202510142893.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-02-10
AI Technical Summary
The existing technology is difficult to effectively verify the quality and correctness of CNC files of key components of deep-sea connectors, especially in terms of path safety, machine tool function customization, machining parameters rationality and enterprise own standards verification.
A CNC file analysis method for deep-sea connectors is proposed. Feature data is obtained through software devices, data cleaning and text encoding are performed, and AI large-scale models are used for training, including multiple machine learning models, which are used to analyze and detect CNC files, output analysis results, and decide whether to upload CNC files based on the results.
It realizes intelligent analysis and verification of CNC files of deep-sea connectors, has the ability to automatically classify and optimize and intelligently verify production file data, improves path safety support and rational judgment of processing parameters, and reduces the probability of production accidents.
Smart Images

Figure CN119576875B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method, device and medium for analyzing numerical control files of deep-sea connectors. Background Art
[0002] Deep-sea connectors are key components in the fields of marine engineering, underwater exploration, seabed resource development and deep-sea scientific research. They often face harsh and complex working environments, so deep-sea connectors are required to have extremely high sealing, corrosion resistance and compressive strength, as well as high stability, reliability and durability.
[0003] The key parts of deep-sea connectors include hubs, horizontal connection systems, IB protective caps, drive screws, KLV connectors, open-end assembly, and terminal assembly, etc. Due to the high requirements, the processing technology of key parts of deep-sea connectors is relatively complex. At the same time, there are many related processing parameters in each processing link, which is extremely difficult to compile manually, prone to errors, and inefficient.
[0004] CNC machining technology, namely Computer Numerical Control (CNC) technology, includes key CNC programs (also called CNC files) that contain many data variables such as tool paths, cutting parameters, feed parameters, program rotation modes, translation operations, etc. Each data variable varies greatly depending on the processed products, tools used, processing conditions, and materials. These differences can easily have a serious impact on the quality and accuracy of the data program.
[0005] In the traditional solution, the method for verifying the quality and correctness of the NC files of key components of deep-sea connectors is to use third-party software for simulation verification. However, the current third-party software still has the following problems:
[0006] 1. In terms of path safety, it is difficult to effectively support custom function codes for different CNC systems, resulting in simulation distortion.
[0007] 2. It is difficult to effectively support customized special machine tool functions, resulting in simulation distortion.
[0008] 3. It is difficult to reasonably judge the rationality and safety of various important processing parameters in the CNC file processing program.
[0009] 4. It is difficult to verify data against the company’s own standards for processing procedures. Summary of the invention
[0010] In order to solve the above problems, this application proposes a NC file analysis method for deep-sea connectors, including:
[0011] For key components in the deep-sea connector, the corresponding data source is obtained through a software device, and the required characteristic data is extracted from the data source; wherein the data type of the characteristic data includes: at least one of key component parameters, numerical control program parameters, and numerical control equipment parameters;
[0012] Performing data cleaning and text encoding on the feature data, and training an AI big model through the feature data; wherein the AI big model includes multiple machine learning models, and the machine learning models are trained through feature data of corresponding data types and perform different analysis tasks;
[0013] Through the AI big model, the input NC file to be analyzed is analyzed and tested, and the corresponding analysis results are output;
[0014] Based on the analysis results, the sub-analysis results of each machine learning model on the CNC file to be analyzed, and the preset file upload requirements, it is determined whether to upload the CNC file to be analyzed and displayed on the front-end interface of the software device.
[0015] In one example, for key components in a deep-sea connector, the corresponding data source is obtained through a software device, and the required feature data is extracted from the data source, specifically including:
[0016] Determine, through a page in the software device, a directory address of a data source pointing to a key component in the deep-sea connector, and obtain address data of the directory address;
[0017] Construct a data stream object through the address data to obtain the corresponding data source;
[0018] For each data type in the data source, encapsulate it into a corresponding data object in the software device;
[0019] For each data type, the required characteristic data is extracted, and the characteristic data is instantiated as a corresponding class to facilitate the use of the characteristic data.
[0020] In one example, data cleaning and text encoding are performed on the feature data, specifically including:
[0021] Data cleaning is performed on the characteristic data, and the corresponding file type is determined; wherein the data cleaning includes conventional data cleaning and / or custom data cleaning; the conventional data cleaning includes at least one of data deduplication, missing value processing, outlier processing, data standardization, data conversion and verification; the custom data cleaning is based on the value of the historical data of the enterprise corresponding to the data source, and the corresponding cleaning rules are set;
[0022] For the text document type, character strings are extracted, and the extracted character strings are stored according to preset format rules;
[0023] For non-text document types, a designated position in the non-text document type is parsed using a corresponding document parsing algorithm, and a character string obtained by parsing is stored according to a preset format rule.
[0024] In one example, the multiple machine learning models in the AI big model include: a production process optimal step model, a CNC file structure detection model, an equipment parameter prediction model, a feature extraction model, and a difference analysis model.
[0025] In one example, training the AI big model using the feature data specifically includes:
[0026] For the optimal step model of the production process, the key component parameters and at least part of the numerical control program parameters are used as training samples, a convolutional neural network is used as a model architecture, and a classification cross entropy loss is used as a loss function to classify the input production process to obtain multiple process steps, and generate the optimal step of the production process according to the multiple process steps;
[0027] For the NC file structure detection model, at least part of the NC program parameters and the NC device parameters are used as training samples, a sequence-to-sequence model is used as a model architecture, and adversarial loss is used as a loss function to identify the authenticity of the input NC file;
[0028] For the equipment parameter prediction model, at least some of the key component parameters, the numerical control program parameters, and the numerical control equipment parameters are used as training samples, a support vector machine is used as a model architecture, and a mean square error loss or an absolute error loss is used as a loss function to predict future predicted equipment parameters based on the input equipment parameters;
[0029] For the feature extraction model, at least part of the numerical control program parameters are used as training samples, an autoencoder is used as a model architecture, and a reconstruction error loss is used as a loss function to extract features from the input numerical control program parameters;
[0030] For the difference analysis model, at least part of the parameters of the CNC program are used as training samples, a difference recognition network is used as the model architecture, and a triplet loss is used as the loss function to compare the differences between the input CNC file and the enterprise preset standard file and create difference labels.
[0031] In one example, the AI big model is used to analyze and detect the input NC file to be analyzed, and the corresponding analysis results are output, specifically including:
[0032] Classifying the production processes contained in the input numerical control file to be analyzed by using the production process optimal step model to obtain a plurality of first process steps;
[0033] For the first process step, performing structure detection by using the numerical control file structure detection model, and performing difference detection by using the difference analysis model;
[0034] If there is an abnormality in the structure detection and / or the difference detection, deleting the first process step;
[0035] Otherwise, predicting the predicted equipment parameters corresponding to the numerical control file to be analyzed according to the plurality of first process steps through the equipment parameter prediction model;
[0036] Generate an optimal step list according to the plurality of first process steps and the predicted equipment parameters through the production process optimal step model; wherein the optimal step list includes a plurality of second process steps;
[0037] For the first process step and the second process step, feature extraction is performed using the feature extraction model, and according to the similarity between the extracted features, the first process step and the second process step whose similarity exceeds a preset degree are matched;
[0038] For a first process step that is successfully matched, the first process step is replaced by a second process step that matches the first process step;
[0039] For the first designated process step that fails to match, the first designated process step is temporarily reserved, and the predicted device parameters corresponding to the numerical control file to be analyzed are re-predicted by the device parameter prediction model;
[0040] If the prediction result is in line with expectations, determining to retain the first designated process step in the numerical control file to be analyzed;
[0041] Otherwise, the first designated process step is deleted.
[0042] In one example, if there is an abnormality in the structure detection and / or the difference detection, after deleting the first process step, the method further includes:
[0043] Determine the deletion quantity of the first process step that is currently deleted;
[0044] If the number of deletions has reached a preset number, the analysis and detection of the NC file to be analyzed is stopped, and the NC file to be analyzed is marked as not to be uploaded;
[0045] If the number of deletions does not reach the preset number, for the second designated process step that fails to match, determine the second process step that is closest to the second designated process step and successfully matches according to its position sequence in the optimal step list, and add the second designated process step to the production process of the NC file to be analyzed according to the position sequence of the second process step after replacement in the NC file to be analyzed;
[0046] Re-predicting the predicted equipment parameters corresponding to the numerical control file to be analyzed by using the equipment parameter prediction model;
[0047] If the prediction result is in line with expectations, determining to retain the second designated process step in the NC file to be analyzed;
[0048] Otherwise, the second designated process step is deleted.
[0049] In one example, based on the sub-analysis results of each machine learning model on the NC file to be analyzed in the analysis results and the preset file upload requirements, determining whether to upload the NC file to be analyzed specifically includes:
[0050] If the first process step is not deleted in the numerical control file to be analyzed, directly uploading the numerical control file to be analyzed;
[0051] If the first process step has been deleted in the numerical control file to be analyzed, determining a deletion source corresponding to the first process step;
[0052] If the deletion source is the structure detection of the numerical control file structure detection model and / or the difference detection of the difference analysis model, and the number of deletions has reached a preset number, then the uploading of the numerical control file to be analyzed is terminated;
[0053] If the deletion source is that the prediction of the equipment parameter prediction model does not meet expectations, the CNC file to be analyzed after deleting the first process step is uploaded.
[0054] On the other hand, the present application also proposes a CNC file analysis device for deep-sea connectors, comprising:
[0055] at least one processor; and,
[0056] a memory communicatively connected to the at least one processor; wherein,
[0057] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the CNC file analysis method for deep-sea connectors as described in any of the above examples.
[0058] On the other hand, the present application also proposes a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as: a numerical control file analysis method for a deep-sea connector as described in any of the above examples.
[0059] The numerical control file analysis method for deep-sea connectors proposed in this application can bring the following beneficial effects:
[0060] Through the AI big model, it is possible to have the ability to intelligently process the key components of deep-sea connectors, automatically classify and optimize CNC files, and intelligently verify relevant production file data, thus providing effective support in terms of path safety.
[0061] At the same time, it also has the ability to identify various errors in related documents during CNC machining, discover various unreasonableness, and correct inefficiencies. It can reasonably judge the rationality and safety of important machining parameters, and can realize data verification for the company's own standards for machining procedures, thereby reducing the probability of production accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0063] Figure 1 It is a flow chart of a method for analyzing a numerical control file for a deep-sea connector in an embodiment of the present application;
[0064] Figure 2 A schematic diagram of a flow chart of a method for analyzing a numerical control file for a deep-sea connector in one embodiment of the present application;
[0065] Figure 3 This is a schematic diagram of the neural structure of an AI large model in one scenario in an embodiment of the present application;
[0066] Figure 4 It is a schematic diagram of a CNC file analysis device for a deep-sea connector in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0068] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0069] like Figure 1 and Figure 2 As shown, the embodiment of the present application provides a method for analyzing a NC file for a deep-sea connector, comprising:
[0070] S101: For key components in the deep-sea connector, obtain the corresponding data source through a software device, and extract the required characteristic data from the data source; wherein the data type of the characteristic data includes: at least one of key component parameters, CNC program parameters, and CNC equipment parameters.
[0071] Key components may include a hub, a horizontal connection system, an IB protective cap, a drive screw, a KLV connector, an open-end assembly, and a terminal assembly, etc. Of course, for different application scenarios and technical improvements of deep-sea connectors, key components may also include other components, which are not limited here.
[0072] The software device refers to the software used to perform CNC file analysis, which has pre-set corresponding interfaces, can interact with relevant servers and terminals for data, and perform corresponding data analysis functions, and is configured with a front-end interactive interface to facilitate users to issue instructions.
[0073] Specifically, when acquiring the data source, the user issues a command through the page in the software device to determine the directory address of the data source pointing to the key components in the deep-sea connector (including the directory address of the key component manufacturer's server and the directory address of the NC file generation server, etc.), and obtains the address data of the directory address. At this time, the data flow object is constructed through the address data to obtain the corresponding data source.
[0074] In actual applications, the directory pointed to can contain a variety of data. For example, the data can be divided into key component parameters, CNC program parameters, and CNC equipment parameters according to major categories. The key component parameters can be further divided into usage parameters of deep-sea connector key components, usage environment data of deep-sea connector key components, and specification requirement parameters of deep-sea connector key components. The CNC program parameters can be divided into the main program and background subprograms in the CNC program of deep-sea connector key components, and related program single data. The CNC equipment parameters can be divided into CNC equipment model data, tool information list data, etc.
[0075] For each data type in the data source, it is encapsulated as a corresponding data object in the software device. Here, it can be encapsulated according to a large category or a small category. At this time, there can be multiple data objects in the software device.
[0076] For each data type, the required feature data is extracted and instantiated as a corresponding class to facilitate the use of the feature data, for example, for training large AI models.
[0077] Among them, characteristic data may include design safety factor data, environmental identification data, stable operation related data, processing technology, tool related, feed related, rotation information related, translation information, etc. in the processing program, and instantiate them as corresponding classes. Of course, other classes can also be set based on needs (for example, relevant parameter settings based on expert experience and manual experience), or existing classes can be deleted.
[0078] S102: Perform data cleaning and text encoding on the feature data, and train the AI big model through the feature data; wherein the AI big model includes multiple machine learning models, and the machine learning models are trained through the feature data of corresponding data types and perform different analysis tasks.
[0079] In this application, the AI big model is a combination model, which includes multiple machine learning models. Different machine learning models have different model architectures, which may include multi-layer perceptron (MLP), convolutional neural network (CNN), recurrent neural network (RNN) or long short-term memory network (LSTM), etc. Different models may use different training data and specify different analysis tasks, which may include prediction tasks, classification tasks, etc.
[0080] Specifically, when performing data cleaning, data cleaning is performed on the characteristic data, and the corresponding file type is determined. Among them, data cleaning includes regular data cleaning and / or custom data cleaning; regular data cleaning includes at least one of data deduplication, missing value processing, abnormal value processing, data standardization, data conversion and verification; custom data cleaning is based on the value of the historical data of the enterprise corresponding to the data source, and the corresponding cleaning rules are set. For example, the normal range of data values is set according to historical data, and any data value that does not belong to the normal range is considered abnormal data.
[0081] After determining the file type, for the text document type (for example, the CNC program involved in the actual CNC production process of deep-sea connector components is a text document that complies with the CNC language standard), the string (or character stream) is directly extracted and the extracted string is stored according to preset format rules.
[0082] For non-text document types (e.g., PDF files), the specified location in the non-text document type (e.g., the table therein) is parsed using the corresponding document parsing algorithm (e.g., for PDF files, the PDF parsing algorithm is used), and the parsed string is stored according to preset format rules.
[0083] After the feature data is cleaned, it can be used to train the machine learning models in the AI model. During the model training process, the machine learning model contains an input layer in the hierarchy to receive raw data, such as text, images, or time series data. It also includes hidden layers, such as Figure 3 As shown in the figure, the AI model contains multiple processing units (neurons) for feature extraction and transformation. Each layer may contain tens of thousands of neurons. It also includes an output layer: it produces predictions or classification results. The layers are connected by weights, and these weights are adjusted during the training process.
[0084] The connections can be fully connected (each neuron is connected to neurons in other layers) or partially connected. After the connection, the ReLU activation function is used to introduce nonlinearity, enabling the model to learn complex patterns.
[0085] For the characteristic data in the key component parameters, the training samples can be generated by combining the equipment usage parameters and the usage environment data. Representative samples such as seawater temperature, seawater depth, seawater pressure, and seawater corrosivity can be selected, and various dimensions such as weather conditions and ocean current information can be added for model training based on demand to ensure that the model can learn useful features.
[0086] Furthermore, when the AI big model is trained through feature data, since the AI big model includes multiple machine learning models, the model architecture, training process, etc. of different machine learning models may not be exactly the same.
[0087] In an embodiment of the present application, the machine learning model may include: a production process optimal step model, a CNC file structure detection model, an equipment parameter prediction model, a feature extraction model, and a difference analysis model.
[0088] For the optimal step model of the production process in multiple machine learning models, at least part of the parameters of key component parameters and numerical control program parameters are used as training samples (in the embodiment of the present application, if not specifically stated, each machine learning model can select part or all of the feature data of each type based on demand as training samples when training. For example, for key component parameters, some parameters such as enterprise historical data, experience values, machine tool parameter characteristics, and production tooling used can be selected from the usage parameters as feature models for training), and used for training after data cleaning, using a convolutional neural network as the model architecture, and using classification cross entropy loss as the loss function to classify the input production process, obtain multiple process steps, and generate the optimal steps of the production process based on the multiple process steps. Among them, the generated optimal steps of the production process also include multiple process steps, which can be the same or different from the multiple process steps in the production process parsed in the numerical control file, and the difference can be reflected in the difference in numerical value, number of steps, and purpose of steps.
[0089] For the CNC file structure detection model in multiple machine learning models, at least some of the parameters in the CNC program parameters and CNC equipment parameters are used as training samples, and a sequence-to-sequence model (Seq2Seq model) is used as the model architecture. The sequence-to-sequence model is suitable for converting CNC instructions in one language into another language, or converting simplified instructions into complex CNC files. An adversarial loss is used as the loss function, in which the generator tries to generate realistic CNC files, and the discriminator tries to distinguish between real and generated files, which is used to identify the authenticity of the input CNC files.
[0090] For the equipment parameter prediction model in multiple machine learning models, key component parameters, CNC program parameters, and at least some of the CNC equipment parameters are used as training samples, and support vector machine (SVM) is used as the model architecture. Generally speaking, if the data is discrete, SVM can be used to predict the optimal speed and feed parameters, while for equipment parameters in the processing technology (such as tool parameters), they are usually not continuous, but are set accordingly based on different scenarios, so the data is discrete. The mean square error (MSE) loss or absolute error loss is used as the loss function to predict future predicted equipment parameters (including equipment operating parameters, usage time, equipment loss, etc.) based on the input equipment parameters.
[0091] For feature extraction models in multiple machine learning models, at least part of the parameters of the CNC program are used as training samples, an autoencoder is used as the model architecture, and a reconstruction error loss is used as a loss function to extract features from the input CNC program parameters.
[0092] For the difference analysis model among multiple machine learning models, at least part of the parameters of the CNC program are used as training samples. Before training, the CNC files are standardized and difference labels are created. The difference recognition network is used as the model architecture, and the triplet loss is used as the loss function to compare the differences between the input CNC files and the enterprise preset standard files, and create difference labels.
[0093] In actual use, other machine learning models can also be set up based on demand to perform other tasks. In short, a large number of neurons are integrated into the AI big model, and the neurons are trained and iterated so that the AI big model can grasp the important data needed in production. The model adjusts the weights through multiple iterations until the model performance reaches the predetermined standard.
[0094] The training data in the above embodiments include but are not limited to: optimal process steps for the production of key components of deep-sea connectors, CNC files for the production and processing of key components of deep-sea connectors, optimal speed parameters in CNC production, optimal feed parameters, structural characteristics and detailed features of the currently dynamically uploaded CNC programs, differences between the CNC files involved and the company's customized standards, etc.
[0095] The AI big model can learn and analyze massive historical data, and has the ability to classify steps, identify features, identify various errors, discover various unreasonable things, and correct inefficiencies.
[0096] S103: Analyze and detect the input NC file to be analyzed through the AI big model, and output the corresponding analysis result.
[0097] During analysis and testing, each machine learning model can be used to analyze and test the CNC file to be analyzed separately. Each machine learning model gives corresponding analysis results separately, so as to analyze and judge the optimal production process steps, program data structure, tool data, feed data of key components of deep-sea connectors, and whether they meet the company's customized standards. Of course, other dynamic processing judgment and detection functions can also be added based on needs. For example, the judgment mechanism is a cyclic judgment mechanism of data lists or dictionaries, so as to realize the dynamic execution of various tasks.
[0098] Specifically, the production process optimal step model is mainly used to perform two tasks. One is to classify the input production process to obtain multiple process steps (herein, it can be called the first process step), and the other is to generate the optimal production process step according to the analysis of the first process step (herein, the multiple process steps included in the optimal production process step are called the second process step).
[0099] Use the model to predict new processing parameters (including predicting the corresponding processing parameters through the characteristics of new parts or current parts), and then generate CNC code process according to the processing parameters (the actual code generation logic will be written according to specific parameters and machine tool instructions, for example, including the settings of spindle forward rotation, set speed, feed rate, etc.) as the optimal step of the production process.
[0100] The obtained optimal steps of the production process can be directly used as a substitute for the production process in this NC file, and can also be used in the analysis process of the NC file.
[0101] The NC file structure detection model can check whether the program of the input NC file to be analyzed contains necessary data structure elements, such as loops, conditional statements, etc. Regular expressions or pattern matching are used to verify whether the data structure meets the specifications, so as to judge the authenticity of the NC file to be analyzed based on the analysis results. The authenticity can be directly fed back here. If the authenticity of the NC file to be analyzed is in doubt, a warning can be issued.
[0102] The equipment parameter prediction model analyzes and detects the equipment size, function and usage data in the acquired feature data, checks whether the equipment size (for example, tool size, feed speed, etc.) is within the allowable tolerance range, uses logical judgment to ensure that the equipment has not exceeded its service life or wear limit, and predicts the subsequent equipment parameter prediction model. It can be used alone for the prediction of equipment parameters, or it can be used in combination with the production process optimal step model to generate the second process step.
[0103] The feature extraction model is mainly used for feature extraction, especially some structural detail features, so as to accurately extract feature data.
[0104] In the difference analysis model, enterprises can pre-customize standard documents, and the difference analysis model checks whether the data meets all requirements. For example, logical judgment is used to ensure that the data meets specific standards.
[0105] Of course, the various machine learning models in the AI big model can also be used in combination to achieve better analysis and detection effects.
[0106] Specifically, when the input NC file to be analyzed is received, the production process contained in the input NC file to be analyzed is analyzed and identified through the production process optimal step model, and classified to obtain multiple first process steps (the process steps are referred to as first process steps here to distinguish them from the process steps below). There is a corresponding sequential relationship between the first process steps. In different scenarios, the content, time, equipment, and parameter values contained in the first process steps may be different.
[0107] At this time, for the first process step, structure detection is performed using the numerical control file structure detection model, and difference detection is performed using the difference analysis model.
[0108] If there are anomalies in the structure detection and / or the difference detection, the setting of the first process step is considered unqualified (for example, it does not meet the enterprise requirements, or its authenticity is questionable), and the first process step is deleted;
[0109] Otherwise, if there is no abnormality, the predicted equipment parameters corresponding to the CNC file to be analyzed are predicted according to multiple first process steps through the equipment parameter prediction model. The predicted equipment parameters refer to the equipment parameters that may be generated next if production continues according to the current first process step.
[0110] Through the production process optimal step model, an optimal step list is generated according to multiple first process steps and predicted equipment parameters. First, the first process step is completed according to the predicted equipment parameters, and then corresponding adjustments are made according to the completed first process step. Adjustments include deleting the first process step, adding new steps, modifying parameters, etc. The adjustment process analyzes the first process step to obtain the corresponding features in this production process (for example, the use parameters of key components, the use environment, the processing process, etc.), and adjusts the first process step through the features in the CNC file in the learned training data to generate an optimal step list. Here, the process step in the optimal step list is called the second process step.
[0111] At this time, for the first process step and the second process step, feature extraction is performed through the feature extraction model, and based on the similarity between the extracted features (for example, calculating the cosine distance between the features), the first process step and the second process step whose similarity exceeds a preset degree (for example, different weights are set for different features in advance, and the similarity is weighted summed up to obtain the similarity between the process steps) are matched.
[0112] When the similarity exceeds a preset level (eg, 80%), it is considered that the second process step is obtained by simply changing the first process step, and the difference between the two is small, so the two are matched.
[0113] For the first process step that is successfully matched, the first process step is replaced by the corresponding second process step, and the first process step is replaced by a better second process step, thereby improving the production effect of the current production process (for example, shortening the process time, improving product processing accuracy, reducing equipment loss, etc.).
[0114] For the first designated process step that failed to match (the first designated process step belongs to the first process step), the first designated process step is temporarily retained (based on subsequent analysis, it is decided whether to delete the first designated process step), and the predicted device parameters corresponding to the NC file to be analyzed are re-predicted through the equipment parameter prediction model. Different from the previous prediction, in this prediction, the first process step that successfully matched has been replaced with the second process step, and the first process step that does not meet the requirements for authenticity or structure has been deleted. Therefore, the prediction result this time is different from the prediction result before the previous processing.
[0115] If the prediction results meet expectations (including the predicted process time, equipment wear and tear, equipment accuracy, etc., which meet the expected requirements, or are higher than the predicted results when the first specified process step is not added), it is considered that the first specified process step has achieved a good effect. The reason for the matching failure may be that the step is new and the AI large model has not learned similar content. Therefore, it is determined to retain the first specified process step in the CNC file to be analyzed.
[0116] Otherwise, it is considered that the first specified process step should not exist, and it is deleted, and the corresponding code is deleted in the NC file.
[0117] Furthermore, as described above, after the structure detection and the difference detection, the first process step may be deleted, at which time the number of deleted first process steps currently deleted is determined. Of course, if the first designated process step is subsequently deleted, the number of deleted steps may also be updated accordingly.
[0118] If the number of deletions has reached the preset number (for example, 2 or 3), it is considered that there are major problems with the NC file as a whole. At this time, the analysis and detection of the NC file to be analyzed is stopped, and the NC file to be analyzed is marked as not to be uploaded, that is, the subsequent process will no longer be executed.
[0119] If the number of deletions does not reach the preset number, it is considered that there is still room for improvement in the CNC file and there are no major problems.
[0120] In addition to the first designated process step that fails to match, there may also be a second designated process step (which belongs to the second process step) that fails to match. For example, some second process steps are newly added steps and therefore fail to match successfully with the first process step.
[0121] For the second specified process step that fails to match, the second process step that is closest to the second specified process step and successfully matches is determined according to its position order in the optimal step list, and based on the position order of the determined second process step after replacement in the NC file to be analyzed, the second specified process step is added to the production process of the NC file to be analyzed.
[0122] For example, assuming that the second designated process step is in the 4th step in the optimal step list, and assuming that the 3rd step and the 5th step are the closest and successfully matched second process steps. At this time, there are no other second designated process steps that failed to match, but a new step is added to the first step of the production process of the NC file to be analyzed. At this time, the position order of the two second process steps after replacement is the 4th step and the 5th step. When the second designated process step is added to the production process of the NC file to be analyzed, it is added between the 4th step and the 5th step as the new 5th step.
[0123] The predicted equipment parameters corresponding to the NC file to be analyzed are re-predicted by the equipment parameter prediction model. At this time, the NC file to be analyzed is re-predicted after the new second designated process step is added.
[0124] If the prediction result meets the expectation (the expectation is similar to that in the above text and will not be repeated here), it is determined to retain the second designated process step in the NC file to be analyzed; otherwise, the second designated process step is deleted.
[0125] S104: Based on the sub-analysis results of each machine learning model on the NC file to be analyzed in the analysis results, and the preset file upload requirements, determine whether to upload the NC file to be analyzed, and display it on the front-end interface of the software device.
[0126] If each machine learning model is used separately and obtains corresponding sub-analysis results, it can be determined whether to upload the CNC file to be analyzed based on each sub-analysis result. If it is considered risk-free, it can be uploaded, and the CNC file to be analyzed can be used to perform the corresponding CNC task later. Of course, it can also be reviewed manually.
[0127] If the machine learning model is used in conjunction, if the first process step is not deleted in the CNC file to be analyzed, it is considered that there is no major risk in the CNC file, and the CNC file to be analyzed is directly uploaded and published.
[0128] If the first process step has been deleted in the numerical control file to be analyzed, a deletion source corresponding to the first process step is determined.
[0129] If the deletion source is the structural detection of the CNC file structure detection model and / or the difference detection of the difference analysis model, that is, the structural detection or difference detection is abnormal, and the number of deletions has reached the preset number, then the CNC file is considered to have a greater risk, and the upload and release of the CNC file to be analyzed is terminated.
[0130] If the deletion source is that the prediction of the equipment parameter prediction model does not meet expectations, the risk of the NC file is considered to be low. The main risk is that the prediction does not meet expectations. Therefore, the NC file to be analyzed after deleting the first process step can continue to be uploaded and published.
[0131] After the NC file is uploaded and published, the device notifies the server to receive the NC program. For NC files that have not been uploaded and published, the device notifies the server to prohibit receiving the program corresponding to the NC file. It can also output the errors or risks found to the software interface UI, so that technicians can correct or optimize the erroneous data, and feedback prompts or log information to the system.
[0132] like Figure 4 As shown, in one embodiment, the present application also proposes a numerical control file analysis device for deep-sea connectors, comprising:
[0133] at least one processor; and,
[0134] a memory communicatively connected to the at least one processor; wherein,
[0135] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the numerical control file analysis method for deep-sea connectors as described in any of the above embodiments.
[0136] In one embodiment, the present application further proposes a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as: a numerical control file analysis method for a deep-sea connector as described in any of the above embodiments.
[0137] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0138] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0139] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for analyzing NC files for deep-sea connectors, characterized in that: include: For key components in the deep-sea connector, the corresponding data source is obtained through a software device, and the required characteristic data is extracted from the data source; wherein the data type of the characteristic data includes: at least one of key component parameters, numerical control program parameters, and numerical control equipment parameters; The feature data is cleaned and text-encoded, and the AI big model is trained through the feature data; wherein the AI big model includes multiple machine learning models, and the machine learning models are trained through the feature data of corresponding data types and perform different analysis tasks; the multiple machine learning models in the AI big model include: production process optimal step model, CNC file structure detection model, equipment parameter prediction model, feature extraction model, and difference analysis model; The AI big model is used to analyze and detect the input numerical control file to be analyzed, and the corresponding analysis results are output, which specifically include: the production process contained in the input numerical control file to be analyzed is classified by the production process optimal step model to obtain multiple first process steps; for the first process step, the structure detection is performed by the numerical control file structure detection model, and the difference detection is performed by the difference analysis model; if there is an abnormality in the structure detection and / or the difference detection, the first process step is deleted; otherwise, the predicted equipment parameters corresponding to the numerical control file to be analyzed are predicted according to the multiple first process steps through the equipment parameter prediction model; the optimal step list is generated according to the multiple first process steps and the predicted equipment parameters through the production process optimal step model; wherein, The optimal step list includes a plurality of second process steps; for the first process step and the second process step, feature extraction is performed through the feature extraction model, and according to the similarity between the extracted features, the first process step and the second process step whose similarity exceeds a preset degree are matched; for the first process step that is successfully matched, the first process step is replaced by the second process step that matches it; for the first designated process step that fails to match, the first designated process step is temporarily retained, and the predicted device parameters corresponding to the numerical control file to be analyzed are re-predicted through the equipment parameter prediction model; if the prediction result meets expectations, the first designated process step is determined to be retained in the numerical control file to be analyzed; otherwise, the first designated process step is deleted; Based on the analysis results, the sub-analysis results of each machine learning model on the CNC file to be analyzed, and the preset file upload requirements, it is determined whether to upload the CNC file to be analyzed and displayed on the front-end interface of the software device.
2. The method according to claim 1, characterized in that: For the key components in the deep-sea connector, the corresponding data source is obtained through the software device, and the required feature data is extracted from the data source, including: Determine, through a page in the software device, a directory address of a data source pointing to a key component in the deep-sea connector, and obtain address data of the directory address; Construct a data stream object through the address data to obtain the corresponding data source; For each data type in the data source, encapsulate it into a corresponding data object in the software device; For each data type, the required characteristic data is extracted, and the characteristic data is instantiated as a corresponding class to facilitate the use of the characteristic data.
3. The method according to claim 2, characterized in that The characteristic data is cleaned and text encoded, specifically including: Data cleaning is performed on the characteristic data, and the corresponding file type is determined; wherein the data cleaning includes conventional data cleaning and / or custom data cleaning; the conventional data cleaning includes at least one of data deduplication, missing value processing, outlier processing, data standardization, data conversion and verification; the custom data cleaning is based on the value of the historical data of the enterprise corresponding to the data source, and the corresponding cleaning rules are set; For the text document type, character strings are extracted, and the extracted character strings are stored according to preset format rules; For non-text document types, a designated position in the non-text document type is parsed using a corresponding document parsing algorithm, and a character string obtained by parsing is stored according to a preset format rule.
4. The method according to claim 1, characterized in that The AI big model is trained using the feature data, specifically including: For the optimal step model of the production process, the key component parameters and at least part of the numerical control program parameters are used as training samples, a convolutional neural network is used as a model architecture, and a classification cross entropy loss is used as a loss function to classify the input production process to obtain multiple process steps, and generate the optimal step of the production process according to the multiple process steps; For the NC file structure detection model, at least part of the NC program parameters and the NC device parameters are used as training samples, a sequence-to-sequence model is used as a model architecture, and adversarial loss is used as a loss function to identify the authenticity of the input NC file; For the equipment parameter prediction model, the key component parameters, the numerical control program parameters, and at least part of the numerical control equipment parameters are used as training samples, a support vector machine is used as a model architecture, and a mean square error loss or an absolute error loss is used as a loss function to predict future predicted equipment parameters based on the input equipment parameters; For the feature extraction model, at least part of the numerical control program parameters are used as training samples, an autoencoder is used as a model architecture, and a reconstruction error loss is used as a loss function to extract features from the input numerical control program parameters; For the difference analysis model, at least part of the parameters of the CNC program are used as training samples, a difference recognition network is used as the model architecture, and a triplet loss is used as the loss function to compare the differences between the input CNC file and the enterprise preset standard file and create difference labels.
5. The method according to claim 1, characterized in that If there is an abnormality in the structure detection and / or the difference detection, after deleting the first process step, the method further includes: Determine the deletion quantity of the first process step that is currently deleted; If the number of deletions has reached a preset number, the analysis and detection of the NC file to be analyzed is stopped, and the NC file to be analyzed is marked as not to be uploaded; If the number of deletions does not reach the preset number, for the second designated process step that fails to match, determine the second process step that is closest to the second designated process step and successfully matches according to its position sequence in the optimal step list, and add the second designated process step to the production process of the NC file to be analyzed according to the position sequence of the second process step after replacement in the NC file to be analyzed; Re-predicting the predicted equipment parameters corresponding to the numerical control file to be analyzed by using the equipment parameter prediction model; If the prediction result is in line with expectations, determining to retain the second designated process step in the NC file to be analyzed; Otherwise, the second designated process step is deleted.
6. The method according to claim 1, characterized in that Based on the sub-analysis results of each machine learning model on the NC file to be analyzed in the analysis results, and the preset file upload requirements, determining whether to upload the NC file to be analyzed specifically includes: If the first process step is not deleted in the numerical control file to be analyzed, directly uploading the numerical control file to be analyzed; If the first process step has been deleted in the numerical control file to be analyzed, determining a deletion source corresponding to the first process step; If the deletion source is the structure detection of the numerical control file structure detection model and / or the difference detection of the difference analysis model, and the number of deletions has reached a preset number, then the uploading of the numerical control file to be analyzed is terminated; If the deletion source is that the prediction of the equipment parameter prediction model does not meet expectations, the CNC file to be analyzed after deleting the first process step is uploaded.
7. A numerical control file analysis device for deep-sea connectors, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the CNC file analysis method for deep-sea connectors as described in any one of claims 1 to 6.
8. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured as: a numerical control file analysis method for a deep-sea connector as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Numerical control machine tool fault prediction method and device, equipment and storage medium
CN116184930A