File distribution method and system
Through the interaction between the server, client and wireless gateway, the remote distribution and management of CNC machine tool program files can be realized, solving the problems of time-consuming and labor-intensive on-site copying and unauthorized copying, and improving management efficiency and product yield.
Patent Information
- Application Number
- CN202310403478.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2043-04-14
AI Technical Summary
The existing technology requires going to the CNC machine tool site to copy program files via a USB flash drive, which is time-consuming, labor-intensive, and difficult to control. It is easy for unauthorized copying to occur, resulting in defective products.
Through the interaction of the server, client and wireless gateway, the remote distribution and management of program files are realized, and the preset CNC management system is used to perform permission verification and directory matching to ensure that the files are accurately transmitted to the designated storage location of the target machine tool.
It improves the management efficiency and security of program files, reduces the risk of unauthorized copying, and ensures the yield and safety of processed products.
Smart Images

Figure CN116389462B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a file distribution method and system. Background Art
[0002] A CNC (Computerized Numerical Control) machine tool is a computer-controlled machine tool that processes blanks or components (e.g., aluminum blocks) to produce a desired workpiece. The CNC machine tool's processing data (such as the workpiece's geometry, machine rotational speed, feed rate, etc.) for the workpiece to be produced (i.e., milled or turned on a lathe) is typically stored in the CNC machine's control system's memory in the form of a program file. The CNC machine then loads and runs the program file to produce the desired workpiece.
[0003] Existing technology usually requires going to the CNC machine workshop to copy the program file to the CNC machine tool via a USB flash drive, which is time-consuming, labor-intensive and difficult to control. Moreover, it is easy for the program to be copied without permission for processing, resulting in defective products. Summary of the Invention
[0004] The present application provides a file distribution method and system, which can enhance the management and control of program files, prevent program files from being copied without authorization, and improve the yield rate of machine tool processing products.
[0005] In a first aspect, the present application provides a method for issuing a file, comprising the steps of:
[0006] The server obtains the program file uploaded by the client through the preset CNC management system;
[0007] The server obtains input information sent by the client; the input information includes a target machine tool and a target program file; the target program file is a program file to be sent to the target machine tool;
[0008] When the server obtains the confirmation information, it triggers the transmission of the target program file to a wireless gateway connected to the target machine tool; the wireless gateway is connected to the target machine tool, and the target machine tool is installed with a collection script for collecting the program file;
[0009] The wireless gateway obtains the target program file through the acquisition script and sends it to the target root directory for storage.
[0010] In some embodiments, the server obtains the program file uploaded by the client through the preset numerical control management system, including the following steps:
[0011] The server obtains a login request sent by the client; the login request includes account information;
[0012] After the server verifies the account information, it logs into the preset CNC management system according to the account information;
[0013] The server opens the file transmission channel of the preset numerical control management system to obtain the program file uploaded by the client and stores it.
[0014] In some embodiments, before the server obtains the input information sent by the client, the server includes the following steps:
[0015] The server obtains first memory information of the target machine tool;
[0016] The server obtains second memory information of an external storage device connected to a data interface of the target machine tool from the wireless gateway;
[0017] The server obtains the target root directory according to the first memory information and the second memory information.
[0018] In some embodiments, the server obtains the target root directory according to the first memory information and the second memory information, comprising the steps of:
[0019] The server matches the file space occupied by the target program file with the remaining storage space of the first memory information;
[0020] If the remaining storage space of the first memory information is greater than the space occupied by the file, the first preset root directory in the target machine tool is determined to be the target root directory.
[0021] In some embodiments, the server obtains the target root directory according to the first memory information and the second memory information, comprising the steps of:
[0022] If the remaining storage space of the first memory information is less than the space occupied by the file, the server obtains a judgment result from the wireless gateway; the judgment result is to determine whether the data interface of the target machine tool is connected to the external storage device;
[0023] If the judgment result is that the data interface on the target machine tool is connected to the external storage device, the server matches the file occupied space of the target program file with the remaining storage space of the second memory information;
[0024] If the remaining storage space of the second memory information is greater than the space occupied by the file, a second preset root directory in the external storage device is determined to be the target root directory.
[0025] In some embodiments, the server obtains the target root directory according to the first memory information and the second memory information, comprising the steps of:
[0026] The server obtains historical directory information corresponding to the target program file being loaded and executed recently from the wireless gateway;
[0027] The server determines the historical directory information as the target root directory.
[0028] In some embodiments, the wireless gateway obtains the target program file through the acquisition script and sends it to the target root directory for storage, including the following steps:
[0029] The wireless gateway obtains the data to be identified received from the server;
[0030] The wireless gateway parses the data to be identified through the acquisition script to determine whether the data to be identified belongs to a program file type;
[0031] If the data to be identified is of a program file type, the wireless gateway sends the target program file to a target root directory for storage.
[0032] In some embodiments, before the server obtains the input information sent by the client, the server includes the following steps:
[0033] The wireless gateway obtains directory information of the connected target machine tool through a network cable interface or a wireless port connected to the target machine tool;
[0034] The wireless gateway synchronously uploads the directory information to the server so that the server displays the directory information.
[0035] In a second aspect, the present application also provides a file distribution system, including: a server, a client, and a wireless gateway;
[0036] The server is used to obtain the program file uploaded by the client through a preset numerical control management system;
[0037] The server is further configured to obtain input information sent by the client; the input information includes a target machine tool and a target program file; the target program file is a program file to be sent to the target machine tool;
[0038] The server is further configured to obtain confirmation information to trigger transmission of the target program file to the wireless gateway connected to the target machine tool; the wireless gateway is connected to the target machine tool, and the target machine tool is installed with a collection script for collecting the program file;
[0039] The wireless gateway is used to obtain the target program file through the acquisition script and send it to the target root directory for storage.
[0040] In some embodiments, the wireless gateway includes:
[0041] an acquisition unit, configured to acquire directory information of the target machine tool connected thereto through a network cable interface or a wireless port connected thereto;
[0042] A communication unit is used for the wireless gateway to synchronously upload the directory information to the server so that the server displays the directory information.
[0043] This application solves the problem that when CNC program files are issued, due to the wide variety of CNC machine tool brands, each brand manufacturer and customer has no unified standard for the naming of CNC program files and the naming and storage location of file storage directories, thereby greatly improving the management efficiency of program files. In addition, this application interacts with the server, client, wireless gateway and machine tool, so that staff do not need to go to the CNC machine tool workshop in person to copy program files to the CNC machine tool via a USB flash drive, thereby improving the efficiency of program files being issued to the machine tool for processing and production. Moreover, through the interaction between the server, client, wireless gateway and machine tool, the person responsible for issuing the program file can be traced, thereby facilitating the management and control of the issuance of program files. In addition, it effectively suppresses or reduces the unauthorized copying of programs for production and processing without permission, and can ensure that program files issued by designated staff control machine tools for processing and production, which can ensure the accuracy and reliability of program files, thereby improving the yield rate of machine tool processing products. In addition, by logging into the preset CNC management system through the server to remotely issue program files, it effectively prohibits non-designated staff from tampering with or copying program files, thereby improving the safety of product processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 This is a structural diagram of a file distribution system provided in an embodiment of the present application;
[0046] Figure 2 This is a flowchart of a method of a file distribution system provided by an embodiment of the present application;
[0047] Figure 3 This is another flowchart of the method of the file distribution system provided in the embodiment of the present application;
[0048] Figure 4 This is another flowchart of the method of the file distribution system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0050] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0051] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that one of ordinary skill in the art will recognize that the present application can be implemented without using these specific details. In other examples, well-known processes will not be elaborated in detail to avoid obscuring the description of the embodiments of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in accordance with the embodiments of the present application.
[0052] The execution subject of the file delivery method of the embodiment of the present application can be the file delivery system provided by the embodiment of the present application. For example, the file delivery method provided by the embodiment of the present application can be applied to Figure 1 In the file distribution system shown, Figure 1: This is a structural diagram of a file distribution system provided in an embodiment of the present application. The file distribution system includes a server 10, a client 20, and a wireless gateway 30. The client 20 can be a device that includes both receiving and transmitting hardware, that is, a device that has receiving and transmitting hardware capable of performing two-way communication over a two-way communication link. The client 20 can also be a mobile phone, a tablet computer, a laptop computer, etc. The wireless gateway 30 can be a wireless router or a wireless terminal device DTU (Data Transfer Unit). The server 10 can have a display screen for displaying images. The server 10 can be a standalone server 10, or a server 10 network or server 10 cluster composed of servers 10, including but not limited to a computer, a network host, a single network server 10, a set of multiple network servers 10, or a cloud server 10 composed of multiple servers 10. The cloud server 10 is composed of a large number of computers or network servers 10 based on cloud computing. Those skilled in the art will understand that the above application scenario is merely one application scenario of the present application solution and does not constitute a limitation of the application scenario of the present application solution. It is understood that the file distribution system can also include one or more other servers 10, which are not specifically limited here. In addition, the file distribution system may also include a memory for storing data, such as program files for development and design, work logs of the machine tool 40, etc.
[0053] Next, we will introduce the file distribution method provided by the embodiment of the present application. Figure 1 As shown, Figure 2 This is a flowchart of the file distribution method provided by the embodiment of the present application. Figure 1 The flowcharts shown in the figures or other figures show a logical order, but in some cases, the steps shown or described may be performed in a different order than shown in the figures. The file distribution method includes steps S100 to step 400, which are as follows:
[0054] S100 , the server 10 obtains the program file uploaded by the client 20 through a preset numerical control management system.
[0055] In the embodiment of the present application, the machine tool 40 (Computer numerical control, abbreviated as CNC) is a computer numerical automation machine tool 40 controlled by a program, including but not limited to CNC lathes, CNC milling machines, CNC hydraulic presses and other machine tools 40 for various purposes. The machine tool 40 is equipped with a tool (also known as a cutting tool). The tool is a tool used for cutting processing in mechanical manufacturing. The machine tool 40 tool may include a turning tool, a drilling tool (such as a drill bit, a reamer, etc.), a boring tool, a milling tool, etc. In the embodiment of the present application, it is assumed that all machine tools 40 are connected to the wireless gateway 30, and it is assumed that all machine tools 40 are installed with a collection script for collecting program files.
[0056] The pre-configured numerical control management system is a distributed numerical control (DNC) system that utilizes computer network technology to integrate computers and machine tool 40 clusters (i.e., machine tools equipped with numerical control devices) distributed throughout the workshop. This system dynamically assigns numerical control (NC) machining tasks to any machine tool 40 or processing equipment. This system effectively integrates the workshop's machine tools 40 or processing equipment, improving their utilization and reducing their idle time. It also provides transparency into the workshop's resources and information, lowering management costs and complexity.
[0057] All process planning to process the processing flow and process parameters of the product must be designed and arranged and incorporated into the processing program. The processing program is transmitted and saved in the form of a file. The file including the processing program is the program file of this application. The processing program may include processing flow and process parameters. Among them, the processing flow refers to the processing steps, for example. Among them, the process parameters include the tool path (i.e., the tool movement path), the geometry and size of the tool, the machining allowance, the fixture model, the fixture specifications, the cutting amount and other special requirements.
[0058] In the embodiment of the present application, a designated staff member with permission to use program files (e.g., for programming or testing) can use a personal client 20 to remotely log in to the preset numerical control management system to upload program files to the server 10. The server 10 can then remotely obtain one or more program files uploaded by the client 20 through the preset numerical control management system.
[0059] In other embodiments, the step S100 in which the server 10 obtains the program file uploaded by the client 20 through the preset numerical control management system includes the following steps:
[0060] S110, the server 10 obtains a login request sent by the client 20; the login request includes account information.
[0061] In an embodiment of the present application, a preset numerical control management system is installed on a server 10 of a supplier that provides DNC numerical control management services to manufacturers or machine tool workshops 40. Among them, the preset numerical control management system registers and stores a large amount of account information. In this way, if the designated staff has force majeure factors such as an epidemic or a business trip and needs to work remotely in another place or at home, the designated staff only needs to use the client 20 to enter personal account information on the login page of the preset numerical control management system, and click or touch the control button to select login, then the client 20 will generate a login request including the account information. After generating the login request, the client 20 uploads the login request to the server 10 via wireless communication.
[0062] S120 , after successfully verifying the account information, the server 10 logs into the preset CNC management system according to the account information.
[0063] In an embodiment of the present application, after receiving a login request, the server 10 parses the login request to obtain account information, which includes an account ID and an account password. If either or both of the account ID and the account password are different from the authorized account ID and the authorized account password of the authorized account information pre-registered and stored in the server 10, then the server 10 determines that the account information verification has failed, and the server 10 denies the client 20 from logging into the preset CNC management system. Of course, if the account ID and the account password are the same as the authorized account ID and the authorized account password of the authorized account information pre-registered and stored in the server 10, then the server 10 determines that the account information verification has passed, and then the server 10 allows the client 20 to log into the preset CNC management system.
[0064] S130 , the server 10 opens the file transmission channel of the preset numerical control management system to obtain the program file uploaded by the client 20 and stores it.
[0065] In an embodiment of the present application, the preset numerical control management system can create a file transmission channel for transmitting program files, and can also create a message transmission channel for transmitting control instructions for the machine tool 40. The preset numerical control management system in the present application can divide different usage permissions for the machine tool 40, and creating different transmission channels (including file transmission channels and message transmission channels) can manage the use of the machine tool 40 in a more detailed manner. Therefore, after the server 10 determines that the verification account information has passed and allows the client 20 to log in to the preset numerical control management system, the server 10 can temporarily or once open the file transmission channel in the background, and then designate a staff member to use the client 20 to upload and send the program file to the server 10 through the file transmission channel opened this time. After the server 10 receives the program file uploaded by the client 20, it partitions and stores it according to the naming rules of the program file, the timestamp of receiving the program file, and the machine tool 40 ID of the machine tool 40 to which the program file applies.
[0066] S200, the server 10 obtains input information sent by the client; the input information includes a target machine tool 40 and a target program file; the target program file is a program file to be sent to the target machine tool 40;
[0067] In an embodiment of the present application, after the server 10 confirms that the account information has been verified and allows the client 20 to log in to the preset CNC management system, the designated staff member using the client 20 will be displayed an operation page or operation interface of the preset CNC management system. The display content of the operation page includes, but is not limited to, machine tool 40 information and a machine tool 40 input box, program file information and a program file input box. The operation page may also display other content, such as account information. The operation page of the preset CNC management system also displays a confirmation control button for triggering the sending of the target program file to the target machine tool 40. After the designated staff member manually inputs the target program file and target machine tool 40 through the operation page, touching or clicking the confirmation control button generates a corresponding confirmation operation indicator to the server 10.
[0068] Among them, the machine tool 40 input box will display multiple entries of machine tool 40 information, including the space information available for the workshop where the machine tool 40 is located, the equipment ID of the machine tool 40, the type of machine tool 40 (for example, CNC lathe, CNC milling machine, CNC hydraulic press, etc.), the processing technology type of the machine tool 40 (for example, cutting, turning, drilling, boring, milling, etc.), the brand of the machine tool 40, the name of the machine tool 40, etc.
[0069] The program file input box will display program file information of multiple entries, and the program file information includes the version number of the program file, the name of the program file, and the machine tool 40 information of the machine tool 40 to which the program file is applicable.
[0070] After the designated staff displays the preset CNC management system operation page and the above-mentioned input box through the display of the client 20, they can manually select the required machine tool 40 through the machine tool 40 input box to obtain the target machine tool 40, and can also manually select the required program file through the program file input box to obtain the target program file.
[0071] In some other embodiments, before the server 10 obtains the input information sent by the client in step S200, the following steps are included:
[0072] S150 : The server 10 obtains first memory information of the target machine tool 40 .
[0073] In the embodiment of the present application, each machine tool 40 is provided with a local memory for storing data. The wireless gateway 30 establishes a connection with each machine tool 40, so that the wireless gateway 30 can obtain the first memory information of each machine tool 40. In this way, the server 10 can obtain the first memory information of the local memory of each machine tool 40 through the wireless gateway 30 connected to the machine tool 40. The first memory information includes the remaining memory of the local memory of the machine tool 40 and the device ID, which is a unique identifier of the machine tool 40 (such as a product serial number).
[0074] S160 , the server 10 obtains second memory information of the external storage device 50 connected to the data interface of the target machine tool 40 from the wireless gateway 30 .
[0075] In the embodiment of the present application, the external storage device 50 includes but is not limited to a USB flash drive, a mobile hard disk, etc. Among them, the mobile hard disk is a storage product that uses a hard disk as a storage medium, exchanges large-capacity data with a computer, and emphasizes portability. The mobile hard disk can be connected to the machine tool 40 using a USB interface. Among them, the full name of the USB flash drive is a micro high-capacity mobile storage product that uses a USB interface and does not require a physical drive. It can be connected to the machine tool 40 through the USB interface to achieve plug-and-play. Each machine tool 40 is provided with a USB interface. The controller of each machine tool 40 can obtain the second memory information of the external storage device 50 connected through the USB interface. The wireless gateway 30 establishes a connection with each machine tool 40, so that the wireless gateway 30 can obtain the second memory information. In this way, the server 10 can obtain the second memory information of the external storage device 50 connected to the USB interface of each machine tool 40 through the wireless gateway 30 connected to the machine tool 40. The second memory information includes the remaining memory of the external storage device 50 and the device ID, which is the unique identifier of the external storage device 50 (such as the product serial number).
[0076] S170. The server 10 obtains the target root directory according to the first memory information and the second memory information.
[0077] In an embodiment of the present application, after the server 10 obtains the first memory information and the second memory information through steps S150 and S160, it can analyze the remaining memory in the first memory information and the second memory information to obtain the target root directory. The specific process of obtaining the target root directory is described in the embodiment below.
[0078] In some other embodiments, the step S200 includes the following steps before the server 10 obtains the input information sent by the client:
[0079] S101 : The wireless gateway 30 obtains directory information of the target machine tool 40 connected thereto through a network cable interface or a wireless port connected thereto.
[0080] In the embodiment of the present application, since the wireless gateway 30 is connected to each machine tool 40, the wireless gateway 30 can obtain the directory information of the connected machine tool 40 through the network cable interface or wireless port connected to the machine tool 40. The directory information includes the address of the storage space for storing program files, etc.
[0081] S102 : The wireless gateway 30 synchronously uploads the directory information to the server 10 so that the server 10 displays the directory information.
[0082] In an embodiment of the present application, the wireless gateway 30 will obtain the directory information corresponding to each machine tool 40 and upload it to the server 10 synchronously through the network cable interface in a wired manner or the wireless port in a wireless manner (for example, 3G, 4G, 5G and other mobile cellular networks or WIFI Internet of Things). The server 10 will display the operation page on the display of the client 20 through the preset numerical control management system. The operation page can also display directory information and a directory input box, wherein the directory input box will display directory information of multiple entries. In this way, after the operation page of the preset numerical control management system and the above-mentioned input box are displayed on the display of the client 20, the designated staff can also manually select the required directory through the directory input box to obtain the target root directory.
[0083] In other embodiments, referring to Figure 3 As shown, Figure 3 This is another flowchart of the file distribution method provided by the embodiment of the present application. In step S200, the server 10 obtains the target root directory according to the first memory information and the second memory information, including the following steps:
[0084] S211. The server 10 matches the file space occupied by the target program file with the remaining storage space of the first memory information.
[0085] S212: If the remaining storage space of the first memory information is greater than the space occupied by the file, determine the first preset root directory in the target machine tool 40 as the target root directory.
[0086] In an embodiment of the present application, the server 10 compares the file space occupied by the target program file with the remaining storage space of the first memory information, that is, compares the file space occupied with the remaining storage space of the local memory of the target machine tool 40. If the remaining storage space of the first memory information is greater than the file space occupied, it means that the remaining storage space of the local memory of the target machine tool 40 is sufficient to store the target program file. Then, the server 10 automatically uses the first preset root directory of the target machine tool 40 for the target program file to be issued as the target root directory. Compared with the method of manually selecting the target root directory, the present application automatically determines and selects the first preset root directory in the target machine tool 40 as the target root directory based on the remaining storage space and the file space occupied, thereby reducing manual operations and thus reducing the tediousness of uploading the target program file.
[0087] S213. If the remaining storage space of the first memory information is smaller than the space occupied by the file, the server 10 obtains a judgment result from the wireless gateway 30; the judgment result is to determine whether the data interface on the target machine tool 40 is connected to the external storage device 50.
[0088] S214 : If the judgment result is that the data interface on the target machine tool 40 is connected to the external storage device 50 , the server 10 matches the file space occupied by the target program file with the remaining storage space of the second memory information.
[0089] In an embodiment of the present application, if the remaining storage space in the first memory information is less than the file occupied space, it indicates that the remaining storage space in the local memory of the target machine tool 40 is insufficient to store the target program file. The server 10 then needs to further determine whether the data interface on the target machine tool 40 is connected to the external storage device 50. If the determination result is that the data interface on the target machine tool 40 is not connected to the external storage device 50, it indicates that the remaining storage space in the local memory of the target machine tool 40 is insufficient to store the target program file, and the target machine tool 40 does not have an external storage device 50 available for uploading and storing the target program file. The server 10 can then send a notification instruction to the client 20 of other staff members on site at the workshop machine tool 40, prompting them to insert an external storage device 50 with sufficient remaining storage space into the target machine tool 40. If the determination result is that the data interface on the target machine tool 40 is connected to the external storage device 50, the server 10 compares the file occupied space of the target program file with the remaining storage space in the second memory information, i.e., compares the file occupied space with the remaining storage space of the external storage device 50 connected to the target machine tool 40.
[0090] S215: If the remaining storage space of the second memory information is greater than the space occupied by the file, determine that the second preset root directory in the external storage device 50 is the target root directory.
[0091] In an embodiment of the present application, if the remaining storage space of the second memory information is less than the file occupied space, it indicates that the remaining storage space of the external storage device 50 connected to the target machine tool 40 is insufficient to store the target program file. The server 10 can then send a notification instruction to the client 20 of other staff members at the workshop machine tool 40 to prompt them to insert an external storage device 50 with sufficient remaining storage space into the target machine tool 40. Of course, if the remaining storage space of the second memory information is greater than the file occupied space, it indicates that the remaining storage space of the external storage device 50 connected to the target machine tool 40 is sufficient to store the target program file. The server 10 then automatically sets the second preset root directory of the external storage device 50 connected to the target machine tool 40 for the target program file to be distributed as the target root directory. Compared to the method of manually selecting the target root directory, the present application automatically determines and selects the first preset root directory in the external storage device 50 connected to the target machine tool 40 as the target root directory based on the remaining storage space and the file occupied space, reducing manual operations and thus reducing the tediousness of uploading the target program file.
[0092] In some other embodiments, the server 10 in step S200 obtains the target root directory according to the first memory information and the second memory information, including the following steps:
[0093] S221 , the server 10 obtains from the wireless gateway 30 historical directory information corresponding to the target program file that was recently loaded and executed.
[0094] S222: The server 10 determines that the historical directory information is the target root directory.
[0095] In the embodiment of the present application, the historical directory information may be the first preset root directory in the machine tool 40, or the second preset root directory in the external storage device 50 connected to the machine tool 40. After the program file is stored on the machine tool 40, if the machine tool 40 loads and runs the program file during production and processing, the machine tool 40 will generate log data of the program file being loaded and run on the machine tool 40. The log data stores the historical directory information that was last used or most recently loaded and run on the target machine tool 40.
[0096] Wireless gateway 30 automatically determines, through a network interface, the directory where target machine tool 40 last ran product processing using the target program file, i.e., historical directory information. Wireless gateway 30 sends this historical directory information to server 10. Upon receiving this historical directory information, server 10 can directly determine it as the target root directory.
[0097] S300, when the server 10 obtains the confirmation information, the server 10 determines whether the input information and the confirmation information are legal. If so, the server 10 triggers the transmission of the target program file to the wireless gateway 30 connected to the target machine tool 40; the wireless gateway 30 is connected to the target machine tool 40, and the target machine tool 40 is installed with a collection script for collecting the program file.
[0098] In the embodiment of the present application, a confirmation control button is preset on the operation page of the numerical control management system for confirming and triggering the sending of the target program file to the target machine tool 40. After the designated staff logs in to the operation page of the preset numerical control management system through the client 20 and manually inputs the target program file and the target machine tool 40, they touch or click the confirmation control button to generate an operation identifier to the server 10.
[0099] Since different control buttons have different operation identifiers, the client 20 can obtain the confirmation operation identifier generated by the user touching or clicking the OK control button, as well as the file identification code corresponding to the target program file and the device ID corresponding to the target machine tool 40 obtained by the user logging into the operation page of the preset numerical control management system through the client. The client generates a corresponding first verification code to be identified by using an encryption algorithm based on the confirmation operation identifier corresponding to the OK control button, the identification code corresponding to the target program file, and the device ID and one-time dynamic code (e.g., a randomly generated random number) or timestamp corresponding to the target machine tool. In addition, the server can obtain the confirmation operation identifier generated by the user touching or clicking the OK control button uploaded by the client. The target program file has a corresponding file identification code, and the target machine tool has a corresponding device ID. In this way, after the server obtains the input information, it can generate a corresponding second verification code based on the confirmation operation identifier corresponding to the OK control button, the identification code corresponding to the target program file, and the device ID and one-time dynamic code (e.g., a randomly generated random number) or timestamp corresponding to the target machine tool using the same encryption algorithm as the client. The server compares and determines whether the first verification code and the second verification code are the same. If they are the same, the server determines that the input information is legal. Otherwise, if they are not the same, the server can determine that the input information is illegal. In this way, the server can refuse to provide basic services to the client, that is, deny the client access to the server's local file resources. This ensures that the client does not illegally access the server. If the server determines that the input information is legal, it will initiate the process of transmitting the target program file to the wireless gateway 30 connected to the target machine tool 40.
[0100] S400: The wireless gateway 30 obtains the target program file through the acquisition script and sends it to the target root directory for storage.
[0101] In an embodiment of the present application, the wireless gateway 30 obtains the target program file through an acquisition script for acquiring the program file and sends it to the local memory of the target machine tool 40, so that the target program file is stored in a first preset root directory of the local memory of the target machine tool 40. Alternatively, the wireless gateway 30 obtains the target program file through an acquisition script for acquiring the program file and sends it to an external storage device 50 connected to the target machine tool 40, so that the target program file is stored in a second preset root directory of the external storage device 50 connected to the target machine tool 40.
[0102] In other embodiments, referring to Figure 4 As shown, Figure 4This is another flowchart of the file sending method provided by the embodiment of the present application. In step S400, the wireless gateway 30 obtains the target program file through the acquisition script and sends it to the target root directory for storage, including the following steps:
[0103] S410 : The wireless gateway 30 obtains the data to be identified received from the server 10 .
[0104] S420: The wireless gateway 30 parses the data to be identified through the acquisition script to determine whether the data to be identified belongs to a program file type.
[0105] S430: If the data to be identified is of a program file type, the wireless gateway 30 sends the target program file to a target root directory for storage.
[0106] In an embodiment of the present application, the data to be identified includes the device ID of the machine tool 40. The data to be identified sent by the server 10 to the machine tool 40 via the wireless gateway 30 is not necessarily a program file; it could also be a lock command for controlling the machine tool 40 to switch to a locked state, an unlock command for controlling the machine tool 40 to switch from a locked state to an unlocked state, or a shutdown or restart command for controlling the machine tool 40 to enter a shutdown or restart state. Therefore, after the wireless gateway 30 obtains the data to be identified for the target machine tool 40 from the server 10, it needs to parse the data to be identified using a collection script to determine the data type of the data to be identified. Since instructions generally include a header, and the file format of program files differs from instructions, the device ID may not be the device ID of the target machine tool 40. Therefore, the wireless gateway 30 can determine whether the data to be identified is of the program file type. If the data to be identified is not of the program file type, the data to be identified, which is not of the program file type, can be directly sent to the machine tool 40 corresponding to the device ID. Of course, if the data to be identified is of the program file type, the wireless gateway 30 will send the target program file to the target root directory for storage.
[0107] The present application solves the problem that when CNC program files are issued, due to the wide variety of brands of CNC machine tools 40, manufacturers and customers of each brand have no unified standards for the naming of CNC program files and the naming and storage location of file storage directories, thereby greatly improving the management efficiency of program files. In addition, the present application uses the server 10, client 20, wireless gateway 30 and machine tool 40 to interact, so that staff do not need to go to the workshop of the CNC machine tool 40 in person to copy program files to the CNC machine tool 40 via a USB flash drive, thereby improving the efficiency of issuing program files to the machine tool 40 for processing and production. Moreover, through the interaction between the server 10, client 20, wireless gateway 30 and machine tool 40, the person responsible for issuing the program file can be traced, thereby facilitating the control of the issuance of program files. In addition, it effectively suppresses or reduces the unauthorized copying of programs for production and processing without permission, and can ensure that the program files issued by designated staff control the machine tool 40 for processing and production, which can ensure the accuracy and reliability of the program files and thus improve the yield rate of the products processed by the machine tool 40. In addition, by logging into the preset numerical control management system through the server 10 to remotely distribute the program files, it is effectively prohibited for non-designated staff to tamper with or copy the program files and leak secrets, thereby improving the safety of product processing.
[0108] Reference Figure 1 As shown, the embodiment of the present application also provides a file distribution system, Figure 1 This is a structural diagram of a file distribution system provided in an embodiment of the present application, wherein the management system includes: a server 10, a client 20, and a wireless gateway 30;
[0109] The server 10 is used to obtain the program file uploaded by the client 20 through a preset numerical control management system;
[0110] The server 10 is further configured to obtain input information sent by the client; the input information includes a target machine tool 40 and a target program file; the target program file is a program file to be sent to the target machine tool 40;
[0111] The server 10 is further configured to obtain confirmation information to trigger transmission of the target program file to the wireless gateway 30 connected to the target machine tool 40; the wireless gateway 30 is connected to the target machine tool 40, and the target machine tool 40 is installed with a collection script for collecting the program file;
[0112] The wireless gateway 30 is used to obtain the target program file through the acquisition script and send it to the target root directory for storage.
[0113] In some embodiments, the wireless gateway 30 includes:
[0114] an acquisition unit, configured to acquire directory information of the target machine tool 40 connected thereto via a network cable interface or a wireless port connected thereto;
[0115] The communication unit is used for the wireless gateway 30 to synchronously upload the directory information to the server 10 so that the server 10 displays the directory information.
[0116] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to implement as the same or several entities. The above units can refer to the previous method embodiments to implement program file management, which will not be repeated here.
[0117] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be accomplished by instructions, or by controlling related hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor to implement the above method embodiments. The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0118] In the above embodiments, the description of each embodiment has its own focus. For parts not described in detail in one embodiment, please refer to the relevant description of other embodiments. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working process and beneficial effects of the file distribution system and its corresponding units described above can be referred to the description of the file distribution method in the above embodiments, and the details will not be repeated here.
[0119] The above is a detailed introduction to a file distribution method and system provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core ideas. At the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A file distribution method, characterized in that: Including steps: The server obtains the program file uploaded by the client through the preset CNC management system; The server obtains input information sent by the client; the input information includes a target machine tool and a target program file; the target program file is a program file to be sent to the target machine tool; The server determines whether the input information is legal, and if so, triggers the transmission of the target program file to a wireless gateway connected to the target machine tool; The wireless gateway is connected to the target machine tool, and the target machine tool is installed with a collection script for collecting the program file; The wireless gateway obtains the target program file through the acquisition script and sends it to the target root directory for storage; The wireless gateway obtains the target program file through the acquisition script and sends it to the target root directory for storage, including the following steps: The wireless gateway obtains the data to be identified received from the server; The wireless gateway parses the data to be identified through the acquisition script to determine whether the data to be identified belongs to a program file type; If the data to be identified is of a program file type, the wireless gateway sends the target program file to a target root directory for storage.
2. The file distribution method according to claim 1, characterized in that: The server obtains the program file uploaded by the client through the preset numerical control management system, including the following steps: The server obtains a login request sent by the client; the login request includes account information; After the server verifies the account information, it logs into the preset CNC management system according to the account information; The server opens the file transmission channel of the preset numerical control management system to obtain the program file uploaded by the client and stores it.
3. The file distribution method according to claim 1, characterized in that: The server obtains the input information sent by the client, including the following steps: The server obtains first memory information of the target machine tool; The server obtains second memory information of an external storage device connected to a data interface of the target machine tool from the wireless gateway; The server obtains the target root directory according to the first memory information and the second memory information.
4. The file distribution method according to claim 3, characterized in that: The server obtains the target root directory according to the first memory information and the second memory information, comprising the steps of: The server matches the file space occupied by the target program file with the remaining storage space of the first memory information; If the remaining storage space of the first memory information is greater than the space occupied by the file, the first preset root directory in the target machine tool is determined to be the target root directory.
5. The file distribution method according to claim 4, characterized in that: The server obtains the target root directory according to the first memory information and the second memory information, comprising the steps of: If the remaining storage space of the first memory information is less than the space occupied by the file, the server obtains a judgment result from the wireless gateway; the judgment result is to determine whether the data interface of the target machine tool is connected to the external storage device; If the judgment result is that the data interface on the target machine tool is connected to the external storage device, the server matches the file occupied space of the target program file with the remaining storage space of the second memory information; If the remaining storage space of the second memory information is greater than the space occupied by the file, a second preset root directory in the external storage device is determined to be the target root directory.
6. The file distribution method according to claim 3, characterized in that: The server obtains the target root directory according to the first memory information and the second memory information, comprising the steps of: The server obtains historical directory information corresponding to the target program file being loaded and run recently from the wireless gateway; The server determines the historical directory information as the target root directory.
7. The file distribution method according to claim 1, characterized in that: The server obtains the input information sent by the client, including the following steps: The wireless gateway obtains directory information of the connected target machine tool through a network cable interface or a wireless port connected to the target machine tool; The wireless gateway synchronously uploads the directory information to the server so that the server displays the directory information.
8. A program file management system, characterized in that: include: Server, client, wireless gateway; The server is used to obtain the program file uploaded by the client through a preset numerical control management system; The server is further configured to obtain input information sent by the client; the input information includes a target machine tool and a target program file; the target program file is a program file to be sent to the target machine tool; The server is further configured to obtain confirmation information to trigger transmission of the target program file to the wireless gateway connected to the target machine tool; The wireless gateway is connected to the target machine tool, and the target machine tool is installed with a collection script for collecting the program file; The wireless gateway is used to obtain the target program file through the acquisition script and send it to the target root directory for storage; The wireless gateway is further configured to obtain the data to be identified received from the server; parse the data to be identified using the acquisition script to determine whether the data to be identified belongs to a program file type; If the data to be identified is of a program file type, the target program file is sent to a target root directory for storage.
9. The management system according to claim 8, characterized in that: The wireless gateway includes: an acquiring unit, configured to acquire directory information of the target machine tool connected thereto through a network cable interface or a wireless port connected thereto; A communication unit is used for the wireless gateway to synchronously upload the directory information to the server so that the server displays the directory information.
Citation Information
Patent Citations
Program file transmission method, gateway equipment and numerical control system
CN117278545A