STEP-NC data analysis method and system in industrial internet environment
By converting Step-NC data into JSON files and STEP model files, the problem of G code application limitations in the industrial Internet environment is solved, and the simplified development process of networked design, manufacturing and digital twin applications has been realized, and development efficiency is improved.
Patent Information
- Application Number
- CN202411468106.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-24
AI Technical Summary
In the industrial Internet environment, traditional G code cannot contain product processing characteristics, sizes, tolerances and other design information, resulting in its application limitations in the context of industrial Internet technology and the inability to achieve seamless transmission of a unified information model.
By converting Step-NC data into JSON files and Step model files, design and programmers do not need to understand the complex STEP-NC standards. They only need to understand the various fields of JSON files and their meanings and processing the loading of the STEP model, so that they can be networked to be networked. Coordinated design, manufacturing and digital twin application development.
This method greatly simplifies the processing and application of STEP-NC data, allows digital twin platform developers to focus on application development without worrying about the complexity of standards and formats, and improves development efficiency.
Smart Images

Figure CN119356245A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of industrial Internet data processing technology, in particular to the field of CNC machining technology in the CNC machine tool industry, and relates to a STEP-NC data analysis method and system in an industrial Internet environment. Background Art
[0002] Industrial Internet is a new infrastructure that deeply integrates the new generation of information and communication technology with modern industrial technology. It is an important carrier for the digitalization, networking and intelligence of manufacturing industry. It realizes the comprehensive perception, dynamic transmission and real-time analysis of industrial data by building a basic network connecting machines, materials, people and information systems, forming a new service-oriented manufacturing model and improving the efficiency of manufacturing resource allocation. Under the background of the development of industrial Internet technology, the current CNC processing and manufacturing technology is developing in the direction of networking and cloud computing. The traditional CNC machine tools that use G code as CNC language have application limitations under the background of industrial Internet technology. The main reason is that G code cannot contain the product's processing features, dimensions, tolerances and other design information. STEP-NC (STEP Compliant Data Interface for Numerical Controls) is an advanced CNC system data interaction standard. The STEP-NC standard is proposed to solve the current application limitations of G code. It enables the CNC system to directly use the CAD three-dimensional product data model that complies with the STEP standard (including workpiece geometry information, tolerance information and manufacturing feature information), plus process information and tool information, to directly generate processing instructions to control the machine tool. In the context of the Industrial Internet, through the STEP-NC model, remote product design and manufacturing teams can seamlessly transfer the design, process and manufacturing information of parts based on a unified information model. In order to achieve the computer interpretability of STEP-NC data in the Industrial Internet environment, a STEP-NC data parsing method in a Web environment is needed. Some domestic research units have conducted early research and exploration on the networked application of STEP-NC. For example, Wang Ke and others from Shandong University studied the key technologies of networked STEP-NC controllers, focusing on the overall solution of networked STEP-NC controllers, and did not give specific data parsing methods. Zhang Liyan and others from Beijing University of Chemical Technology studied the implementation method of STEP-NC based on the INTERNET, and proposed to convert STEP-NC into XML format files to achieve networked transmission and sharing of data. Xiao Wenlei and others from Beijing University of Aeronautics and Astronautics invented a STEP-NC-based edge-cloud collaborative digital twin system, a method and device for inferring CNC machining status based on real-time data and STEP-NC data, and a modular three-dimensional modeling method based on the STEP-NC standard. Lin Shuwen from Fuzhou University invented a STEP-NC decoder development method for an open CNC system based on Linux. Currently, there are no patents that specifically address STEP-NC analysis in an industrial Internet environment.
[0003] Although some scholars have conducted early research on the network application of STEP-NC, the methods they proposed are all based on XML data mapping methods. This type of method describes and expresses the machining process data in STEP-NC through XML syntax to achieve computer operability, but does not cover the manufacturing features, tools, and three-dimensional model data of workpieces in STEP-NC files. In addition, XML is a markup language with a relatively complex and lengthy syntax structure, a relatively complex parsing method, slow processing speed, and a large data transmission volume. Its characteristics are not conducive to its application in an industrial Internet environment with high real-time requirements. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a STEP-NC data parsing method and system in an industrial Internet environment, which converts STEP-NC into JSON files and STEP model files that are easy to process by software programs. Designers and programmers do not need to understand the complex STEP-NC standards or develop STEP-NC processing tools. They only need to understand the fields and meanings of the JSON files generated by the STEP-NC file parsing tool of the present invention and process the loading of the STEP model to realize networked collaborative design, networked collaborative manufacturing and digital twin-related application development, which can greatly simplify the processing and application of STEP-NC data.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A STEP-NC data analysis method in an industrial Internet environment, the method comprising the following steps:
[0007] S1. Parse the received STEP-NC data packet and convert the STEP-NC standard data packet into a JSON file and a 3D model file in STEP format, wherein the JSON file expresses all the information related to the data structure and process in the STEP-NC data packet; the STEP file includes but is not limited to the 3D solid model information of the processing features, workpiece, fixture, and tool;
[0008] S2. Parse the JSON file, including but not limited to the parsing of the process, work step, workpiece, tool, and path information JSON file, and map the JSON file into a memory tree structure, which contains all the process information of the STEP-NC file; the tool, workpiece, and fixture attribute field content is consistent with the model name exported by the STEP-NC file parser, and the corresponding model is directly loaded through the attribute name during application development;
[0009] S3. Use the WebGL model rendering engine to load the three-dimensional solid models of features, workpieces, fixtures, and tools in STEP format, parse the JSON file structure tree, and render the model to the correct position in the workpiece coordinate system according to the positions and transformation matrices of the features, workpieces, fixtures, and tools to realize the simulation of the workpiece machining process.
[0010] Further, in step S1, the following steps are specifically included:
[0011] S11. Open the STEP-NC file, check whether the basic syntax of the file format is correct, and parse the entity according to the STEP-NC standard;
[0012] S12, judging the entity type, if the entity type is a tool, calling the tool parsing program to parse the tool information; if the entity type is a feature, calling the feature parsing program to parse the feature information; if the entity type is a model, calling the model parsing program to export the model as a STEP file; if the entity type is a process step, calling the process step parsing program to parse the process information;
[0013] S13. The parsed data is saved as a JSON file, and the feature, workpiece, and tool model are exported and saved as a STEP file.
[0014] Further, in step S3, the following steps are specifically included:
[0015] S31, load the JSON file generated by the STEP-NC parsing tool, parse the tool, workpiece, and fixture attributes from it, and load the relevant model from the background with the attribute value as the name;
[0016] S32, parsing the tool trajectory data, and transforming the tool motion trajectory into the tool trajectory in the fixture coordinate system according to the fixture coordinate system, the workpiece coordinate system and the tool coordinate system;
[0017] S33, calculate the workpiece position and tool position transformation matrix in the fixture coordinate system for each trajectory point, save the workpiece position and tool position as key frames, and associate each frame according to the nId field in the JSON structure. The playback time of each frame is calculated by the base_time field in the tool trajectory data. The formula is as follows:
[0018]
[0019] Where time is the playback time of the current frame, i is the number of the current point in the tool motion trajectory, n is the total number of trajectory points, and totalTime is the base_time field in the tool path;
[0020] S34. According to the nId field value of the process, all key frame data associated with the process are obtained, and the key frames are automatically played according to the sequence of the playing time.
[0021] The present invention also provides a STEP-NC data parsing system in an industrial Internet environment, the system comprising a STEP-NC parser, a JSON file parser, and a WebGL model rendering engine;
[0022] The STEP-NC parser is used to convert STEP-NC standard data packets into JSON files and STEP format 3D model files, wherein the JSON files express all information related to the data structure and process in the STEP-NC data packets; the STEP files contain processing features, workpieces, fixtures, and tool 3D solid model information;
[0023] The JSON file parser is used to parse the JSON file containing process, work step, workpiece, tool, and path information, and map the JSON file into a memory tree structure, which contains all the process information of the STEP-NC file, where the tool, workpiece, and fixture attribute field content is consistent with the model name exported by the STEP-NC file parser, and the corresponding model is directly loaded by the attribute name during application development;
[0024] The WebGL model rendering engine is used to load three-dimensional solid models such as features, workpieces, fixtures, and tools, parse the JSON file structure tree, and render the model to the correct position in the workpiece coordinate system according to the position and transformation matrix of the features, workpieces, fixtures, and tools to realize the simulation of the workpiece processing process.
[0025] Further, the file parsing process of the STEP-NC parser specifically includes:
[0026] 1) Open the STEP-NC file, check whether the basic syntax of the file format is correct, and parse the entity according to the STEP-NC standard;
[0027] 2) Determine the entity type. If the entity type is a tool, call the tool parsing program to parse the tool information; if the entity type is a feature, call the feature parsing program to parse the feature information; if the entity type is a model, call the model parsing program to export the model as a STEP file; if the entity type is a process step, call the process step parsing program to parse the process information;
[0028] 3) Save the parsed data as a JSON file, and export the feature, workpiece, and tool models and save them as STEP files.
[0029] Furthermore, the WebGL model rendering engine simulation process specifically includes:
[0030] 1) Load the JSON file generated by the STEP-NC parsing tool, parse the tool, workpiece, and fixture attributes from it, use the attribute value as the name, and load the relevant model from the background;
[0031] 2) Analyze the tool trajectory data and transform the tool motion trajectory into the tool trajectory in the fixture coordinate system according to the fixture coordinate system, the workpiece coordinate system and the tool coordinate system;
[0032] 3) Calculate the workpiece position and tool position transformation matrix in the fixture coordinate system for each trajectory point, save the workpiece position and tool position as key frames, and associate each frame according to the nId field in the JSON structure. The playback time of each frame is calculated by the base_time field in the tool trajectory data. The formula is as follows:
[0033]
[0034] Where time is the playback time of the current frame, i is the number of the current point in the tool motion trajectory, n is the total number of trajectory points, and totalTime is the base_time field in the tool path;
[0035] 4) According to the nId field value of the process, obtain all key frame data associated with the process, and automatically play the key frames according to the sequence of playback time.
[0036] The beneficial effects of the present invention are:
[0037] The present invention provides a STEP-NC data parsing method and system in an industrial Internet environment. After the STEP-NC model is uploaded through this solution, the STEP-NC file parsing tool can be automatically called to parse the STEP-NC file into a JSON file and a STEP file. The digital twin platform developers do not need to understand the STEP-NC standard, so that the developers can focus on the development of digital twin applications without worrying about the complexity of standards and formats, which greatly simplifies the process of developing digital twin applications with STEP-NC standard files as source data.
[0038] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0040] Figure 1 It is the overall framework diagram of the scheme of the present invention;
[0041] Figure 2It is the STEP-NC file parsing flow chart of the present invention;
[0042] Figure 3 This is a simulation flow chart of the WebGL model rendering engine of the present invention. DETAILED DESCRIPTION
[0043] The technical solution of the present invention is described in detail below with reference to the accompanying drawings.
[0044] Figure 1 This is an overall framework diagram of the solution of the present invention. As shown in the figure, the present invention also provides a STEP-NC data parsing method and system in an industrial Internet environment. The system includes a STEP-NC parser, a JSON file parser, and a WebGL model rendering engine.
[0045] The STEP-NC parser is used to convert STEP-NC standard data packets into JSON files and STEP format 3D model files, where the JSON file expresses all information related to the data structure and process in the STEP-NC data packet; the STEP file contains processing features, workpieces, fixtures, and tool 3D solid model information; the specific flow chart is as follows Figure 2 shown.
[0046] The file parsing process of STEP-NC parser specifically includes:
[0047] 1) Open the STEP-NC file, check whether the basic syntax of the file format is correct, and parse the entity according to the STEP-NC standard;
[0048] 2) Determine the entity type. If the entity type is a tool, call the tool parsing program to parse the tool information; if the entity type is a feature, call the feature parsing program to parse the feature information; if the entity type is a model, call the model parsing program to export the model as a STEP file; if the entity type is a process step, call the process step parsing program to parse the process information;
[0049] 3) Save the parsed data as a JSON file, and export the feature, workpiece, and tool models and save them as STEP files.
[0050] The JSON file parser is used to parse the JSON file containing the process, step, workpiece, tool, and path information. The JSON file is mapped into a memory tree structure, which contains all the process information of the STEP-NC file. The tool, workpiece, and fixture attribute field content is consistent with the model name exported by the STEP-NC file parser. The corresponding model is directly loaded through the attribute name during application development;
[0051] The WebGL model rendering engine is used to load three-dimensional solid models such as features, workpieces, fixtures, and tools, parse the JSON file structure tree, render the model to the correct position in the workpiece coordinate system according to the position and transformation matrix of the features, workpieces, fixtures, and tools, and realize the simulation of the workpiece processing process. The specific flow chart is as follows Figure 3 shown.
[0052] The WebGL model rendering engine simulation process specifically includes:
[0053] 1) Load the JSON file generated by the STEP-NC parsing tool, parse the tool, workpiece, and fixture attributes from it, use the attribute value as the name, and load the relevant model from the background;
[0054] 2) Analyze the tool trajectory data and transform the tool motion trajectory into the tool trajectory in the fixture coordinate system according to the fixture coordinate system, the workpiece coordinate system and the tool coordinate system;
[0055] 3) Calculate the workpiece position and tool position transformation matrix in the fixture coordinate system for each trajectory point, save the workpiece position and tool position as key frames, and associate each frame according to the nId field in the JSON structure. The playback time of each frame is calculated by the base_time field in the tool trajectory data. The formula is as follows:
[0056]
[0057] Where time is the playback time of the current frame, i is the number of the current point in the tool motion trajectory, n is the total number of trajectory points, and totalTime is the base_time field in the tool path;
[0058] 4) According to the nId field value of the process, obtain all key frame data associated with the process, and automatically play the key frames according to the sequence of playback time.
[0059] The present invention converts STEP-NC into JSON files and STEP model files that are easy to process by software programs. Designers and programmers do not need to understand the complex STEP-NC standards or develop STEP-NC processing tools. They only need to understand the fields and meanings of the JSON files generated by the STEP-NC file parsing tool of the present invention and process the loading of the STEP model to achieve networked collaborative design, networked collaborative manufacturing and digital twin-related application development, which can greatly simplify the processing and application of STEP-NC data.
[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A STEP-NC data analysis method in an industrial Internet environment, characterized by: The method comprises the following steps: S1. Parse the received STEP-NC data packet and convert the STEP-NC standard data packet into a JSON file and a 3D model file in STEP format, wherein the JSON file expresses all the information related to the data structure and process in the STEP-NC data packet; the STEP file includes but is not limited to the 3D solid model information of the processing features, workpiece, fixture, and tool; S2. Parse the JSON file, including but not limited to the parsing of the process, work step, workpiece, tool, and path information JSON file, and map the JSON file into a memory tree structure, including all process information of the STEP-NC file; S3. Use the WebGL model rendering engine to load the three-dimensional solid models of features, workpieces, fixtures, and tools in STEP format, parse the JSON file structure tree, and render the model to the correct position in the workpiece coordinate system according to the positions and transformation matrices of the features, workpieces, fixtures, and tools to realize the simulation of the workpiece machining process.
2. According to a STEP-NC data analysis method in an industrial Internet environment according to claim 1, it is characterized in that: In step S1, the following steps are specifically included: S11. Open the STEP-NC file, check whether the basic syntax of the file format is correct, and parse the entity according to the STEP-NC standard; S12, judging the entity type, if the entity type is a tool, calling the tool parsing program to parse the tool information; if the entity type is a feature, calling the feature parsing program to parse the feature information; if the entity type is a model, calling the model parsing program to export the model as a STEP file; if the entity type is a process step, calling the process step parsing program to parse the process information; S13. The parsed data is saved as a JSON file, and the feature, workpiece, and tool model are exported and saved as a STEP file.
3. According to a STEP-NC data analysis method in an industrial Internet environment according to claim 2, it is characterized in that: In step S3, the following steps are specifically included: S31, load the JSON file generated by the STEP-NC parsing tool, parse the tool, workpiece, and fixture attributes from it, and load the relevant model from the background with the attribute value as the name; S32, parsing the tool trajectory data, and transforming the tool motion trajectory into the tool trajectory in the fixture coordinate system according to the fixture coordinate system, the workpiece coordinate system and the tool coordinate system; S33, calculate the workpiece position and tool position transformation matrix in the fixture coordinate system for each trajectory point, save the workpiece position and tool position as key frames, and associate each frame according to the nId field in the JSON structure. The playback time of each frame is calculated by the base_time field in the tool trajectory data. The formula is as follows: Where time is the playback time of the current frame, i is the number of the current point in the tool motion trajectory, n is the total number of trajectory points, and totalTime is the base_time field in the tool path; S34. According to the nId field value of the process, all key frame data associated with the process are obtained, and the key frames are automatically played according to the sequence of the playing time.
4. A STEP-NC data analysis system in an industrial Internet environment, characterized by: The system includes STEP-NC parser, JSON file parser, and WebGL model rendering engine; The STEP-NC parser is used to convert STEP-NC standard data packets into JSON files and STEP format 3D model files, wherein the JSON files express all information related to the data structure and process in the STEP-NC data packets; the STEP files contain processing features, workpieces, fixtures, and tool 3D solid model information; The JSON file parser is used to parse the JSON file containing process, work step, workpiece, tool, and path information, and map the JSON file into a memory tree structure, which contains all the process information of the STEP-NC file, where the tool, workpiece, and fixture attribute field content is consistent with the model name exported by the STEP-NC file parser, and the corresponding model is directly loaded by the attribute name during application development; The WebGL model rendering engine is used to load three-dimensional solid models such as features, workpieces, fixtures, and tools, parse the JSON file structure tree, and render the model to the correct position in the workpiece coordinate system according to the position and transformation matrix of the features, workpieces, fixtures, and tools to realize the simulation of the workpiece processing process.
5. According to the STEP-NC data analysis system in an industrial Internet environment according to claim 4, it is characterized in that: The file parsing process of the STEP-NC parser specifically includes: 1) Open the STEP-NC file, check whether the basic syntax of the file format is correct, and parse the entity according to the STEP-NC standard; 2) Determine the entity type. If the entity type is a tool, call the tool parsing program to parse the tool information; if the entity type is a feature, call the feature parsing program to parse the feature information; if the entity type is a model, call the model parsing program to export the model as a STEP file; if the entity type is a process step, call the process step parsing program to parse the process information; 3) Save the parsed data as a JSON file, and export the feature, workpiece, and tool models and save them as STEP files.
6. The STEP-NC data analysis system in an industrial Internet environment according to claim 5, characterized in that: The WebGL model rendering engine simulation process specifically includes: 1) Load the JSON file generated by the STEP-NC parsing tool, parse the tool, workpiece, and fixture attributes from it, use the attribute value as the name, and load the relevant model from the background; 2) Analyze the tool trajectory data and transform the tool motion trajectory into the tool trajectory in the fixture coordinate system according to the fixture coordinate system, the workpiece coordinate system and the tool coordinate system; 3) Calculate the workpiece position and tool position transformation matrix in the fixture coordinate system for each trajectory point, save the workpiece position and tool position as key frames, and associate each frame according to the nId field in the JSON structure. The playback time of each frame is calculated by the base_time field in the tool trajectory data. The formula is as follows: Where time is the playback time of the current frame, i is the number of the current point in the tool motion trajectory, n is the total number of trajectory points, and totalTime is the base_time field in the tool path; 4) According to the nId field value of the process, obtain all key frame data associated with the process, and automatically play the key frames according to the sequence of playback time.