Method and system for automatically transmitting files in centralized scheduling system
By realizing automatic file transfer and cleaning from the operating terminal to the maintenance terminal in the centralized scheduling system, the problem of insufficient disk space caused by the accumulation of log and screen recording files is solved, and the work efficiency of maintenance personnel and the system's storage management are improved.
Patent Information
- Application Number
- CN202411241030.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-06-03
AI Technical Summary
The accumulation of logs and screen recording files generated by station terminals in the centralized scheduling system leads to insufficient disk space and requires frequent deletion or backup, which increases the work intensity and burden of maintenance personnel.
In the centralized scheduling system, the generated target files (such as logs and screen recording files) are transferred in real time by operating terminals to the maintenance terminal, and the local files are automatically deleted after the transmission is completed, and the file transfer is carried out using the UDP protocol.
Automatic file transfer and cleaning is realized, which reduces the working intensity of maintenance personnel, improves work efficiency, frees up storage space in a timely manner, and avoids the problem of insufficient disk space.
Smart Images

Figure CN120086188A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and a system for automatically transmitting files in a centralized traffic control system. Background Art
[0002] During the use of the station terminal of CTC (Centralized Traffic Control), a large number of log or screen recording files will be generated. These files are very meaningful for analyzing problems and the operation behaviors of station operators or dispatchers. However, with the accumulation of log and screen recording files generated every day, the available disk space on the terminal will continuously decrease, and it is necessary for maintenance personnel to regularly delete or backup file data, resulting in a large workload and high working intensity for the maintenance personnel.
[0003] The statements here only provide background art related to the present invention and do not necessarily constitute prior art. Summary of the Invention
[0004] The purpose of the present invention is to provide a method and a system for automatically transmitting files in a centralized traffic control system, which reduces the working intensity of maintenance personnel, improves work efficiency, timely releases storage space, and avoids the problem of insufficient disk space.
[0005] To achieve the above purpose, the present invention provides a method for automatically transmitting files in a centralized traffic control system. The operating terminal real-time transmits target files generated during the working process to the maintenance terminal. The maintenance terminal receives and saves the target files from the operating terminal. After the transmission of the target files is completed, the operating terminal automatically deletes the target files stored on the operating terminal.
[0006] The target files include: log files and screen recording files.
[0007] The operating terminal stores the target files in a target directory under a target path, and the operating terminal real-time detects whether there are new target files in the target directory along the target path, and automatically transmits the detected target files to the maintenance terminal.
[0008] The maintenance terminal creates a specified directory under a specified path, stores the received target files in the specified directory with new file names, and the maintenance terminal real-time displays the file transmission progress.
[0009] The new file names include: the IP address of the operating terminal that sends the target files, and the original file name of the target files.
[0010] The maintenance terminal creates a mapping table, and the mapping table includes: the new file names of the target files, the total size of the target files, and the size of the target files that have been received.
[0011] The target files are transmitted between the operating terminal and the maintenance terminal through the UDP protocol.
[0012] The present invention also provides a method for automatically transmitting files in a centralized traffic control system, which is implemented based on an operation terminal. The operation terminal transmits the target files generated during the working process to the maintenance terminal in real time. After the transmission of the target files is completed, the operation terminal automatically deletes the target files stored on the operation terminal.
[0013] The target files include: log files and screen recording files.
[0014] The operation terminal stores the target files in a target directory under a target path, and the operation terminal detects in real time whether there are new target files in the target directory along the target path, and automatically transmits the detected target files to the maintenance terminal.
[0015] The operation terminal transmits the target files through the UDP protocol.
[0016] The present invention also provides a method for automatically transmitting files in a centralized traffic control system, which is implemented based on a maintenance terminal. The maintenance terminal receives and saves the target files from the operation terminal. The maintenance terminal creates a specified directory under a specified path and stores the received target files in the specified directory with new file names. The maintenance terminal displays the file transmission progress in real time.
[0017] The new file names include: the IP address of the operation terminal that sends the target file, and the original file name of the target file.
[0018] The maintenance terminal creates a mapping table, which includes: the new file name of the target file, the total size of the target file, and the size of the target file that has been received.
[0019] The maintenance terminal receives the target files through the UDP protocol.
[0020] The present invention also provides an automatic file transmission system for implementing the method for automatically transmitting files described above, including: an operation terminal and a maintenance terminal;
[0021] The operation terminal transmits the target files generated during the working process to the maintenance terminal in real time, and the maintenance terminal receives and saves the target files from the operation terminal.
[0022] The present invention realizes the automatic transmission of files from multiple operation terminals to a maintenance terminal in a centralized traffic control system, backs up important data, reduces the work intensity of maintenance personnel, improves work efficiency, and at the same time, the operation terminal automatically clears the target files that have been transmitted, releases the storage space in time, and avoids the problem of insufficient disk space. The present invention has a wide application prospect in the centralized traffic control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1It is a structural block diagram of a system for automatically transmitting files in a centralized traffic control system provided by the present invention.
[0024] Figure 2 It is a flowchart for the operation terminal to transmit files.
[0025] Figure 3 It is a flowchart for the maintenance terminal to transmit files. Detailed implementation manners
[0026] The following is based on Figures 1 to 3 , and specifically illustrate the preferred embodiments of the present invention.
[0027] The CTC system includes a dispatching center subsystem and station subsystems arranged at each station. As Figure 1 shown, the station subsystem includes a maintenance machine, and the maintenance machine serves as the maintenance terminal 1. The operation terminal 2 of the station subsystem serves as the sending end, and data is transmitted between the operation terminal 2 and the maintenance terminal 1 through the UDP protocol (User Datagram Protocol). The UDP protocol can transmit files simply and efficiently, and is very suitable for transmitting large files such as local logs and screen recordings. The unreliability of the UDP protocol can be verified and guaranteed by the application program.
[0028] The present invention provides a method for automatically transmitting files. The operation terminal 2 automatically scans the target files to be sent and automatically transmits the target files to the maintenance terminal 1. The maintenance terminal 1 saves the received target files to the specified directory. After the target files are transmitted, the operation terminal 2 automatically deletes the local target files. The target files include log files and screen recording files generated by the CTC system. In this embodiment, the XP, WIN7, and WIN10 operating systems are used on the maintenance terminal 1 and the operation terminal 2. The method for automatically transmitting files provided by the present invention runs on the maintenance terminal 1 and the operation terminal 2 and supports the XP, WIN7, and WIN10 operating systems. By transmitting the target files generated by the operation terminal to the maintenance terminal in real time, the present invention reduces the work intensity of maintenance personnel. At the same time, the operation terminal automatically clears the target files that have been transmitted, releases the storage space in time, and avoids the problem of insufficient disk space.
[0029] The operation terminal 2 in the station subsystem of the CTC system generates log files and screen recording files with a certain naming rule every day. These target files are stored in the target directory under the local target path of the operation terminal 2. The operation terminal 2 continuously and in real time detects whether there are new target files in the target directory along the target path and sends the detected target files to the maintenance terminal 1.
[0030] As Figure 2As shown in the figure, the method for the operation terminal 2 to send the target file specifically includes the following steps:
[0031] Step S1.1: When starting up, identify itself as the sender according to the configuration (UdpTfConfig.ini configuration file in the same directory as the transfer tool, ID_FLAG = 2 in the [MAINCONFIG] configuration section), and load the IP address and port of the maintenance terminal (in the above configuration section, target IP:
[0032] DEST_IPADDR = 192.168.72.1; target port DEST_PORT = 8000, and the monitored target path of the file to be sent: SEND_FILE_PATH_DIR = D:\UDP);
[0033] Step S1.2: Create a sender UDP thread according to the configuration (create a sender UDP thread according to the above configuration, and its own IP address SELF_IPADDR = 192.168.72.6 and port SELF_PORT = 8001, and the send buffer size SEND_BUFF_SIZE);
[0034] Step S1.3: Scan the target files in the target path according to the configuration in the sender UDP thread, and send a connection request to the maintenance terminal 1;
[0035] Step S1.4: After receiving the connection request receipt or connection success message sent by the maintenance terminal 1, start transmitting the target file, and send a file transfer start message to the maintenance terminal 1;
[0036] Step S1.5: After receiving the file transfer start receipt sent by the maintenance terminal 1, start transmitting the content of the target file. After all the content of the target file is transmitted, send a file transfer end message to the maintenance terminal 1;
[0037] Step S1.6: After receiving the file transfer end receipt sent by the maintenance terminal 1, delete the local target file, and start transmitting the next target file.
[0038] The maintenance terminal 1, as the receiver, saves the multiple target files received from the maintenance terminal to the specified directory, and can display the progress of the received files in real time, enabling the user to clearly know the transfer progress at a glance. For example, when transferring large files, it sometimes takes dozens of seconds or even several minutes. The interface prompts the currently transferred file and the progress, allowing the user to master the current progress and not mistakenly think that it has frozen.
[0039] As Figure 3 shown in the figure, the method for the maintenance terminal 1 to receive the target file specifically includes the following steps:
[0040] Step S2.1: At startup, identify as the receiving end according to the configuration, and bind its own IP address and port.
[0041] Step S2.2: Create a receiving-end UDP thread according to the configuration. (Server identification in the [MAINCONFIG] configuration section: ID_FLAG = 1; Port: SELF_PORT = 8000; Own IP address: SELF_IPADDR = 192.168.72.1 and receiving buffer size RECV_BUFF_SIZE)
[0042] Step S2.3: Wait for the operation terminal 2 to send a connection request. If a connection request sent by the operation terminal 2 is received, send a connection success receipt to the operation terminal 2.
[0043] Step S2.4: Receive the file transfer start message sent by the operation terminal 2 (this message contains the file name and file size). Create a specified directory under the local specified path of the maintenance terminal 1, rename the file to be received according to the naming rule, and save the newly named file in the specified directory; the naming rule is: IP address + original file name, that is, the new file name of the file to be received contains the IP address and the original file name;
[0044] At the same time, create a mapping table (this mapping table maintains the file handles of the files being transferred by each sending terminal (the sending-end IP is the key and the file handle is the value), and the receiving end can receive files sent by multiple sending ends simultaneously). Save the new file name of the file to be received in the mapping table, add the file handle (the file handle File Handle is an abstract concept used to represent an open file. This handle is a reference to the file, which allows the program to read and write to the file) to the mapping table. Record the total size of the file to be received and the received size in the mapping table (in addition to displaying the receiving progress, it is also used to determine whether the data reception is complete, a reliability guarantee measure. If the received data is incomplete, the file application message will be sent again to request retransmission);
[0045] Reply a file transfer start receipt to the operation terminal 2;
[0046] Step S2.5: Receive the content of the target file sent by the operation terminal 2. Find the newly named file in the specified directory under the local specified path according to the mapping table, and write the received content of the target file into the newly named file.
[0047] Step S2.6: Receive the file transfer end message sent by the operation terminal 2. Remove the file name of this file from the mapping table, and send a file transfer end receipt to the operation terminal 2.
[0048] Compared with the prior art, the present invention has the following advantages:
[0049] 1. Automatically transfer the logs and screen recordings generated by the CTC system to the maintenance terminal, reducing the work intensity of maintenance personnel.
[0050] 2. The operation terminal can automatically clean the files that have been transferred, preventing the problem of insufficient disk space.
[0051] 3. The operation terminal can monitor the generation of target files in real time and send them to the maintenance machine terminal, reducing the risk of manual intervention and misoperation.
[0052] 4. The transmitted data and information are sourced from real CTC data, which can relieve the periodic work burden of signal personnel in deleting logs, screen recordings, etc., and effectively improve the work efficiency of station signal work.
[0053] It should be noted that in the embodiments of the present invention, the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the embodiments and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of the present invention. In addition, the terms "first", "second", "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0054] In the present invention, unless otherwise clearly specified and defined, the terms "install", "connect", "connection", "fix", etc. should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0055] It should be understood that when used in this specification and the appended claims, the term "comprise" indicates the presence of the described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.
[0056] It should also be understood that the terms used in the specification of this application are merely for the purpose of describing specific embodiments and are not intended to limit this application. As used in the specification of this application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0057] It should be further understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0058] As used in this specification and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining" or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]" according to the context.
[0059] Although the content of the present invention has been introduced in detail through the above preferred embodiments, it should be recognized that the above description should not be considered as a limitation of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention. After those skilled in the art have read the above content, various modifications and substitutions of the present invention will be obvious. Therefore, the scope of protection of the present invention should be defined by the appended claims.
Claims
1. A method for automatically transmitting files in a centralized scheduling system, characterized in that: The operation terminal transmits the target files generated during the working process to the maintenance terminal in real time. The maintenance terminal receives and saves the target files from the operation terminal. After the target files are transmitted, the operation terminal automatically deletes the target files stored on the operation terminal.
2. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 1, characterized in that: The target files include: log files and screen recording files.
3. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 1, characterized in that: The operation terminal stores the target file in a target directory under the target path, detects in real time along the target path whether there is a new target file in the target directory, and automatically transmits the detected target file to the maintenance terminal.
4. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 1, characterized in that: The maintenance terminal creates a designated directory under the designated path, stores the received target file in the designated directory with a new file name, and displays the file transfer progress in real time at the maintenance terminal.
5. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 4, characterized in that: The new file name includes: the IP address of the operation terminal that sends the target file, and the original file name of the target file.
6. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 4, characterized in that: The maintenance terminal creates a mapping table, which includes: a new file name of the target file, a total size of the target file, and a size of the received target file.
7. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 1, characterized in that: The target file is transmitted between the operation terminal and the maintenance terminal via the UDP protocol.
8. A method for automatically transmitting files in a centralized scheduling system, characterized in that: Based on the operation terminal implementation, the operation terminal transmits the target files generated during the working process to the maintenance terminal in real time. After the target file transmission is completed, the operation terminal automatically deletes the target file stored on the operation terminal.
9. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 8, characterized in that: The target files include: log files and screen recording files.
10. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 8, characterized in that: The operation terminal stores the target file in a target directory under the target path, detects in real time along the target path whether there is a new target file in the target directory, and automatically transmits the detected target file to the maintenance terminal.
11. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 8, characterized in that: The operation terminal transmits the target file through the UDP protocol.
12. A method for automatically transmitting files in a centralized scheduling system, characterized in that: Based on the maintenance terminal implementation, the maintenance terminal receives and saves the target file from the operation terminal, creates a specified directory under the specified path, stores the received target file with a new file name in the specified directory, and displays the file transfer progress in real time at the maintenance terminal.
13. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 12, characterized in that: The new file name includes: the IP address of the operation terminal that sends the target file, and the original file name of the target file.
14. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 12, characterized in that: The maintenance terminal creates a mapping table, which includes: a new file name of the target file, a total size of the target file, and a size of the received target file.
15. The method for automatically transmitting files in a centralized scheduling system as claimed in claim 12, characterized in that: The maintenance terminal receives the target file through the UDP protocol.
16. A system for automatically transmitting files for implementing the method for automatically transmitting files as claimed in any one of claims 1 to 7, characterized in that: Contains: operation terminal and maintenance terminal; The operation terminal transmits the target files generated during the working process to the maintenance terminal in real time, and the maintenance terminal receives and saves the target files from the operation terminal.