A relay data exchange method, device, equipment and medium
By introducing a relay data exchange device into the tamping vehicle control system, using the communication drive management module and the subsystem management module, the problems of poor data flexibility, cumbersome subsystem optimization and expansion and complex network communication are solved, and more efficient data exchange and more convenient system maintenance are achieved.
Patent Information
- Application Number
- CN202510157291.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-02-13
AI Technical Summary
The data flexibility of the tampering vehicle control system is poor, the subsystem optimization and expansion are cumbersome, and the network communication during development is complicated.
A relay data exchange device is designed, including a communication driver management module and a subsystem management module. Through a data subscription mechanism and a unified communication driver interface, data exchange and communication configuration between subsystems are simplified.
The communication network topology of the tampered vehicle control system is simplified, the flexibility of data acquisition and the convenience of subsystem data sharing are improved, and the development and maintenance costs are reduced.
Smart Images

Figure CN119629135B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of railway maintenance of large track maintenance machinery, and particularly relates to a relay data exchange method, device, equipment and medium. Background Art
[0002] A tamping car is a main large track maintenance mechanical equipment for the construction and maintenance of railway lines. Before the tamping car, railway maintenance generally needed to be carried out manually. Manual maintenance has problems such as high labor intensity, low efficiency, and poor operation accuracy. Compared with manual maintenance, the tamping car can greatly improve the work efficiency and accuracy of maintenance. Among them, the electrical control system of the tamping car plays an important role.
[0003] The tamping car is characterized by a large number of sensors, many subsystem modules, complex control logic, and requires fast data communication response between each subsystem and high operation accuracy requirements for the whole machine. The control system of the tamping car needs to process a lot of data items of subsystems, including slave station IO (Input / Output) modules, track geometry parameter computers, upper computer display modules, engine communication modules, auxiliary generator control modules, operation system modules, remote data platforms, etc. With the demand for the intelligence of the tamping car, the division of labor and cooperation of each system and the number of subsystems will be more and more, and the communication requirements are also diverse.
[0004] In order to meet the requirements of data communication between each subsystem and module, most of the existing technologies select an electrical control system in the same environment at the beginning of designing the control system of the tamping car, so as to ensure the best communication efficiency between subsystems. For example, Siemens' SIMATIC S7-1500 platform and the embedded platform based on the CODESYS environment. At present, the existing technologies have the following deficiencies:
[0005] 1) The interfaces between the electrical control system of the tamping car and many subsystems only meet the requirements of conventional control. Many data items cannot be transmitted to the electrical control system of the tamping car due to various reasons (such as insufficient data point planning, communication interface mismatch, etc.), resulting in reduced data flexibility;
[0006] 2) After the electrical control system of the tamping car is released, if it is necessary to appropriately modify some subsystems for engineering optimization, various problems may occur during the optimization process according to the different electrical control system environments and operator capabilities, thus increasing the after-sales cost;
[0007] 3) When developing the electrical control system of the tamping car, due to the need to connect to various subsystems, developers need to spend a lot of energy dealing with communication problems and have no time to take care of their own control logic, thus affecting the development efficiency.
[0008] Therefore, how to provide a solution to the above technical problems is an issue that those skilled in the art need to solve currently. Summary of the Invention
[0009] In view of this, an object of the present invention is to provide a relay data exchange method, device, equipment and medium, which can solve the problems of poor data flexibility in the tamper control system, cumbersome optimization and expansion of subsystems, and complex network communication during development. The specific solutions are as follows:
[0010] In a first aspect, the present application discloses a relay data exchange device, which is applied to a tamper control system. The tamper control system includes at least one subsystem. Among them, the relay data exchange device includes:
[0011] A communication driver management module, configured to configure corresponding communication drivers and data addresses according to the target subsystems managed by the subsystem management module;
[0012] The subsystem management module is configured to load the communication driver to establish a communication connection with the target subsystem, and based on a data subscription mechanism, obtain the system data of the target subsystem and / or execute data operation instructions on the target subsystem according to the data address.
[0013] Optionally, the communication driver management module is specifically configured to:
[0014] Obtain configuration parameters through a preset configuration interface, and generate a driver configuration file according to the configuration parameters; configure the communication driver and data address corresponding to the target subsystem according to the driver configuration file;
[0015] Correspondingly, the subsystem management module is specifically configured to:
[0016] Call the driver configuration file to load the communication driver to establish a communication connection with the target subsystem, and based on a data subscription mechanism, obtain the system data of the target subsystem and / or execute data operation instructions on the target subsystem according to the data address.
[0017] Optionally, the subsystem management module includes:
[0018] A mapping relationship acquisition module, configured to call the data variable configuration file of the target subsystem to automatically obtain the mapping relationship between the system data and the data address;
[0019] An instruction processing module, configured to send the data operation instruction to the target subsystem based on a first preset time interval, and create an independent thread to execute the data operation instruction;
[0020] A data subscription and forwarding module, which is used to obtain a data exchange request of a first subsystem through a communication interface based on a preset transmission protocol, and determine a second subsystem for which the first subsystem requests data exchange according to the data exchange request; obtain system data of the second subsystem based on the data subscription mechanism, and forward the system data of the second subsystem to the first subsystem.
[0021] Optionally, the subsystem management module further includes:
[0022] An event alarm service module, which is used to obtain a preset event alarm rule and monitor the target subsystem according to the preset event alarm rule;
[0023] When it is monitored that the target subsystem triggers the preset event alarm rule, notify the target subsystem of the corresponding alarm event in real time.
[0024] Optionally, the relay data exchange device further includes:
[0025] A historical data archiving service module, which is used to obtain the system data of the target subsystem and the alarm event corresponding to when the target subsystem triggers the preset event alarm rule; record the system data and the alarm event in a local database in real time, and provide a preset query interface to the target subsystem to query the local database.
[0026] Optionally, the subsystem management module further includes a data refresh module; wherein, the data refresh module is used for:
[0027] Poll and obtain the data status of the target subsystem at a second preset time interval, and cache the data status in the local database;
[0028] Detect whether there is a change in the data status in the local database;
[0029] When there is a change in the data status, obtain the current system data corresponding to the change in the data status, and determine whether the current system data is subscribed;
[0030] If the current system data is subscribed, trigger the data subscription mechanism to batch obtain the system data currently pushed by the target subsystem, and then use the system data currently pushed by the target subsystem to refresh the current system data; if the current system data is not subscribed, directly refresh the current system data;
[0031] When there is no change in the data status, jump to the step of polling and obtaining the data status of the target subsystem at a second preset time interval.
[0032] Optionally, the relay data exchange device further includes:
[0033] A redundancy function module, configured to configure a primary service and a secondary service; send a heartbeat signal to the secondary service through the primary service based on a preset time period, so that the secondary service monitors the primary service; when the secondary service can receive the heartbeat signal, place the secondary service in a silent state; when the secondary service cannot receive the heartbeat signal, start the secondary service.
[0034] In a second aspect, the present application discloses a relay data exchange method, which is applied to a relay data exchange device installed in a tamping car control system. The tamping car control system includes at least one subsystem. Wherein, the relay data exchange method includes:
[0035] Through the communication driver management module in the relay data exchange device, configure corresponding communication drivers and data addresses according to the target subsystem managed by the subsystem management module;
[0036] Through the subsystem management module, load the communication driver to establish a communication connection with the target subsystem, and based on a data subscription mechanism, obtain the system data of the target subsystem and / or execute a data operation instruction on the target subsystem according to the data address.
[0037] In a third aspect, the present application discloses an electronic device, which includes a processor and a memory; wherein, the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the relay data exchange method as described above.
[0038] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the relay data exchange method as described above.
[0039] The present application provides a relay data exchange device, which is applied to a tamping car control system. The tamping car control system includes at least one subsystem. The relay data exchange device includes: a communication driver management module, configured to configure corresponding communication drivers and data addresses according to the target subsystem managed by the subsystem management module; the subsystem management module, configured to load the communication driver to establish a communication connection with the target subsystem, and based on a data subscription mechanism, obtain the system data of the target subsystem and / or execute a data operation instruction on the target subsystem according to the data address.
[0040] The beneficial technical effects of this application are as follows: By configuring a relay data exchange device in the tamping car control system, the communication network topology of the tamping car control system can be simplified. The data of all subsystems can be obtained by the relay data exchange device, and the communication drivers adapted to each subsystem have been integrated in the relay data exchange device. Designers do not need to write communication programs, but only need to configure the communication drivers and data addresses of relevant data. Without destroying the independence of each subsystem, the data of the subsystem can be conveniently obtained, making the sharing of their respective data easier and the acquisition of data more flexible. For the target subsystems managed by the subsystem management module, the data to be accessed and the data operation instructions for the target subsystems can be obtained based on the data subscription mechanism. When adding a subsystem or optimizing a certain subsystem, there is no need to optimize the entire control project. Only by configuring and managing through the relay data exchange device, it will basically not affect the vehicle control system, thereby reducing the costs of inspection and after-sales maintenance. Developers can focus on the development of the tamping car control system, and the data exchange of the subsystem is handed over to the relay device, thereby improving work efficiency.
[0041] In addition, a relay data exchange method, device, and storage medium provided by this application correspond to the above relay data exchange device, and the effects are the same. Brief Description of the Drawings
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0043] Figure 1 It is a block diagram of a tamping car control system without a relay data exchange device in the prior art;
[0044] Figure 2 It is a schematic structural diagram of a relay data exchange device disclosed in this application;
[0045] Figure 3 It is a block diagram of a tamping car control system based on a relay data exchange device disclosed in this application;
[0046] Figure 4 It is a schematic diagram of an example process of a relay data exchange device subscribing and forwarding data;
[0047] Figure 5 It is a block diagram of a relay data exchange device disclosed in this application;
[0048] Figure 6Schematic diagram of an example process for data exchange between a relay data exchange device and a subsystem in the present application;
[0049] Figure 7 Flowchart of a relay data exchange method disclosed in the present application;
[0050] Figure 8 Structural diagram of an electronic device disclosed in the present application. Detailed implementation manners
[0051] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments 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. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0052] As Figure 1 shown, it is a block diagram of the current tamping car control system. This technology relies on the main control CPU (Central Processing Unit) unit. The overall vehicle control, auxiliary control, extended functions, etc. all need to be processed by the main control CPU unit. Therefore, the performance requirements for the main control CPU unit are relatively high. At the same time, whether the main control CPU unit can meet the requirements also requires specific control requirements to be put forward for each subsystem. For example, for the upper computer display module, if many modules access the main control CPU unit, an ordinary main control CPU unit cannot meet the real-time communication rate. Therefore, the access quantity of the upper computer is generally limited by the existing technology. Another example is the track geometry parameter computer. If the main control CPU unit of the existing technology cannot exchange data with it in real time, it generally requires the track geometry parameter computer to directly enter the control system with analog signals. In the above two examples, in the era of continuous development of intelligence, it can no longer meet the flexibility of data acquisition, the convenience of function expansion, and the development time consumed by the complex interaction between a large number of subsystems.
[0053] Therefore, the present application provides a relay data exchange solution, which can solve the problems of poor data flexibility in the tamping car control system, cumbersome optimization and expansion of subsystems, and complex network communication during development.
[0054] An embodiment of the present application discloses a relay data exchange device. Refer to Figure 2 shown, which is applied to the tamping car control system. The tamping car control system includes at least one subsystem. Among them, the device includes:
[0055] A communication driver management module 11, configured to configure corresponding communication drivers and data addresses according to the target subsystem managed by the subsystem management module.
[0056] In the embodiment of the present application, a relay data exchange device that is easy to set up, accurate, powerful and reliable is designed. This device can be placed in the control system of a tamping car. For example, the relay data exchange device is installed in the DNCS system of the tamping car control system. The DNCS system is developed based on Siemens' SIMATIC S7-1500, which features centralized control and has rich interface modules. DNCS can configure highly efficient substations for rapid data exchange with each subsystem.
[0057] In the embodiment of the present application, the relay data exchange device defines a unified communication driver interface. Among them, the software interface is used to describe the connectivity and read / write ability to each subsystem, and the hardware interface can be directly connected to each subsystem. Developers do not need to write communication programs. They only need to configure in the relay data exchange device to obtain the data of each subsystem in real time.
[0058] Specifically, the communication drive management module is specifically used for: obtaining configuration parameters through a preset configuration interface, and generating a drive configuration file according to the configuration parameters; configuring the communication drive and data address corresponding to the target subsystem according to the drive configuration file.
[0059] It can be understood that the preset configuration interface is the software interface for docking each subsystem. Through the preset configuration interface, a communication connection can be established with each subsystem in a synchronous or asynchronous form. Among them, the subsystem is a subsystem with different communication technologies. After obtaining the configuration parameters related to the subsystem through the preset configuration interface, a drive configuration file is generated according to the configuration parameters. Through the configuration file of the communication drive, without separate programming, the drive program can be automatically registered, the communication drive and data address corresponding to the target subsystem to be managed can be configured, and the communication drive that conforms to the interface definition can be called.
[0060] The subsystem management module 12 is used to load the communication drive to establish a communication connection with the target subsystem, and based on the data subscription mechanism, obtain the system data of the target subsystem and / or execute data operation instructions on the target subsystem according to the data address.
[0061] In the embodiment of the present application, the communication network topology of the tamping car control system can be simplified. Through the subsystem management module in the relay data exchange device, the data of all subsystems can be obtained. Since the communication drives adapted to each subsystem have been integrated in the relay data exchange device, designers only need to configure the communication drives and data addresses of relevant data to conveniently obtain the data of the subsystems. They only need to call the drive configuration file to load the communication drive to establish a communication connection with the target subsystem they want to connect to.
[0062] For a subsystem, by using a unified data subscription method, it can obtain the data it wants to access in real time or batch obtain all the data of another subsystem. At the same time, the subsystem management module can execute relevant data operation instructions on the target subsystem, such as read and write operations, etc.
[0063] It can be understood that after the electrical control system of the tamping machine passes the factory inspection, if it is necessary to appropriately modify some subsystem functions, it is necessary to optimize the entire control project. At this time, according to the different control system environments and operator capabilities, various problems will inevitably be encountered during the optimization process. Therefore, it is necessary to re-conduct the factory inspection after the rectification. In the embodiment of the present application, based on the initial design of the subsystem management module, all subsystems have completed the testing work on the relay data exchange device. The optimization and modification work for a certain subsystem can be safely optimized. As long as the optimized subsystem has no problems, it will basically not affect the vehicle control system, thus reducing the costs of inspection and after-sales maintenance.
[0064] In a specific implementation manner, the relay data exchange device has a redundancy function, and its purpose is to ensure the reliability of the relay data exchange device. Specifically, the relay data exchange device further includes: a redundancy function module for configuring a primary service and a secondary service; sending a heartbeat signal from the primary service to the secondary service based on a preset time period, so that the secondary service monitors the primary service; when the secondary service can receive the heartbeat signal, putting the secondary service in a silent state; when the secondary service cannot receive the heartbeat signal, starting the secondary service.
[0065] It should be noted that the redundancy function module will start two instances for the communication service, one primary service and one secondary service. When the primary service is normal, the secondary service is in a silent state and only conducts heartbeat communication with the primary service; when the secondary service no longer receives the heartbeat from the primary service, all functions of the secondary service are started.
[0066] As Figure 3 shown is a schematic structural diagram of a subsystem connected to a relay data exchange device provided exemplarily in the embodiment of the present application. Those of ordinary skill in the art can understand that this connection structure is only for illustration and does not limit it. For example, in Figure 3 the engine communication module can also be directly connected to the relay data exchange device and then forwarded to the main control CPU (Central Processing Unit), so that the main control CPU unit does not need to spend energy obtaining engine-related data.
[0067] Furthermore, in the embodiment of the present application, the subsystem management module includes:
[0068] A mapping relationship acquisition module, which is used to call the data variable configuration file of the target subsystem to automatically obtain the mapping relationship between the system data and the data address;
[0069] An instruction processing module, which is used to send the data operation instruction to the target subsystem based on a first preset time interval, and create an independent thread to execute the data operation instruction;
[0070] A data subscription and forwarding module, which is used to obtain the data exchange request of the first subsystem through the communication interface based on a preset transmission protocol, and determine the second subsystem that the first subsystem requests for data exchange according to the data exchange request; obtain the system data of the second subsystem based on the data subscription mechanism, and forward the system data of the second subsystem to the first subsystem.
[0071] Among them, the mapping relationship acquisition module does not require separate programming. It can automatically obtain the mapping relationship between data and addresses through the configuration files of the data variables of each subsystem, and automatically generate a bound database object. After the device runs and automatically loads the communication drivers of each subsystem, the instruction processing module separately creates a thread to access the subsystem at fixed time intervals to execute data operation instructions, such as read or write operations. It should be noted that the subsystem management module can separately set a timing task. After the timing task is started, it can start obtaining the data of each subsystem, or forwarding data and instructions between each subsystem. It can be seen that the relay data exchange device and the subsystem perform real-time data exchange in a polling + subscription manner. The data reading and data refreshing respectively use independent threads and do not affect each other.
[0072] Among them, the data subscription and forwarding module is used to execute subscription and forwarding of data, such as Figure 4 The figure shows an example process diagram executed by the data subscription and forwarding module. The work between the data subscription and forwarding module and the subsystem is independent, and only maintains the connection through the communication interface based on a preset transmission protocol, such as the communication interface based on TCP / IP (Transmission Control Protocol / Internet Protocol). Since the subsystem management module can manage the data of multiple subsystems, when the first subsystem wants to request the data of the second subsystem managed in the subsystem management module, based on the data subscription mechanism, the subsystem management module pushes the relevant data of the second subsystem to the first subsystem. As Figure 4 shown, the subsystem receives the pushed data and judges whether there is data, that is, judges whether the data is received. If the received data is not received, the pushed data will be suspended; if the data is received, the data will be parsed according to the agreed rules to obtain the parsed value, and then the subscription event inside the subsystem will be triggered, and the data will be updated when the data is subscribed.
[0073] It should be noted that after the subsystem runs, there are various ways to request data in the relay data exchange device. The main APIs (Application Programming Interfaces) include batch read / write, single-point read / write, and subscription read. Any of these methods can be adopted. Additionally, when forwarding data, a data transformation push mechanism is supported, effectively saving communication resource consumption.
[0074] In a specific implementation manner, the subsystem management module further includes:
[0075] An event alarm service module, configured to obtain a preset event alarm rule, and monitor the target subsystem according to the preset event alarm rule; when it is monitored that the target subsystem triggers the preset event alarm rule, notify the corresponding alarm event to the target subsystem in real time.
[0076] For the event alarm service module, the designer can set specific event alarm rules in the configuration tool software in advance and associate them with each subsystem. The subsystem only needs to register the event alarm in the relay data transmission device to obtain the service. After the device runs, the event alarm service module will monitor such event alarms. If a subsystem subscribes, it will notify each subsystem in real time. At the same time, the relevant data generated by the alarm event will be backed up to the database of the device for query use.
[0077] As Figure 5 shown, it is an exemplary block diagram of a relay data exchange device. This device includes a communication driver management module, a subsystem management module, a redundancy function module, a historical data archiving service module, an event alarm service module, and a local database. It can be understood that the tamper control system usually involves a large number of sensors, subsystem devices, and various switch devices. The traditional control system focuses on completing the functions of the tamper itself, and each system is relatively independent with limited interface definitions. The relay data exchange device of the present invention can make the sharing of respective data easier and the acquisition of data more flexible without destroying the independence of each subsystem.
[0078] Among them, the communication driver management module includes the generation and invocation of communication driver configuration files and communication driver registration management. The subsystem management module includes the generation and invocation of data variable configuration files, a data subscription and forwarding module, an instruction processing module, event alarms, and a historical data synchronization and update module.
[0079] It should be noted that the relay data exchange device has an event data alarm update synchronization function. For the update function, it can update the event data of each subsystem to the relay device server. For the synchronization function, it can synchronize the event data with the standby server of the relay device.
[0080] Among them, for the historical data archiving service, its purpose is to archive and back up the data passing through the relay data exchange device. Specifically, the historical data archiving service module is used to obtain the system data of the target subsystem and the alarm event corresponding to when the target subsystem triggers the preset event alarm rule; record the system data and the alarm event in real time to the local database, and provide a preset query interface to the target subsystem to query the local database. It can be seen that the historical data archiving service module has the historical data archiving service function, and can record the data and alarm events of each subsystem connected to the relay data device in the database in real time according to a timed or variable trigger rule. At the same time, it provides a query method for the data in the database, and each subsystem can access it through a specific API.
[0081] Furthermore, for the subsystem management module, it also includes a data refresh module; among them, the data refresh module can implement the following steps today:
[0082] Poll and obtain the data status of the target subsystem based on the second preset time interval, and cache the data status to the local database;
[0083] Detect whether there is a change in the data status in the local database;
[0084] When there is a change in the data status, obtain the current system data corresponding to the change in the data status, and determine whether the current system data is subscribed;
[0085] If the current system data is subscribed, trigger the data subscription mechanism to batch obtain the system data currently pushed by the target subsystem, and then use the system data currently pushed by the target subsystem to refresh the current system data; if the current system data is not subscribed, directly refresh the current system data;
[0086] When there is no change in the data status, jump to the step of polling and obtaining the data status of the target subsystem based on the second preset time interval.
[0087] In the embodiments of the present application, the data refresh module adopts a subscription and push mode for changed data items to reduce communication load. After the device runs, the refresh module can temporarily store the data status of the subsystems obtained by polling in the system buffer area, that is, the local database. Each polling updates the buffer area and detects the changed areas at the same time, thereby triggering a subscription event to refresh the data. As Figure 6 shown is a schematic diagram of an example process for the data exchange between the refresh module and the subsystems. The subsystems are polled at fixed time intervals and corresponding read and write operations are performed on them. Further, it is monitored whether the data status judgment value in the subsystems changes. If there is no change, continuous monitoring is carried out; if there is a change, it is further judged whether the data is subscribed. If the data is subscribed, the current data is pushed in batches to the relay data exchange device to refresh the data; if it is not subscribed, the data is directly refreshed to update the data again.
[0088] In summary, the tamper control system itself is a complex system, involving the collaborative work of a large number of devices and systems, and its own control logic is extremely complex. With the development of digitalization and intelligence, many subsystems will be added to the tamper in the future. Each addition or optimization of a subsystem brings a large amount of adaptation and testing work to the designers. When combined with the corresponding modules disclosed in the above content, developers can focus on the development of the tamper control system, and the data exchange of the subsystems is handed over to the relay device, thereby improving work efficiency.
[0089] The present application provides a relay data exchange device applied to a tamper control system. The tamper control system includes at least one subsystem. The relay data exchange device includes: a communication driver management module for configuring corresponding communication drivers and data addresses according to the target subsystems managed by the subsystem management module; the subsystem management module for loading the communication drivers to establish a communication connection with the target subsystems, and based on a data subscription mechanism, obtaining the system data of the target subsystems and / or executing data operation instructions on the target subsystems according to the data addresses.
[0090] The beneficial technical effects of this application are as follows: By configuring a relay data exchange device in the tamper control system, the communication network topology of the tamper control system can be simplified. The data of all subsystems can be obtained by the relay data exchange device, and the communication drivers adapted to each subsystem have been integrated in the relay data exchange device. Designers do not need to write communication programs, but only need to configure the communication drivers and data addresses of relevant data. Without destroying the independence of each subsystem, the data of the subsystems can be easily obtained, making the sharing of their respective data easier and the acquisition of data more flexible. For the target subsystems managed by the subsystem management module, the data to be accessed and the data operation instructions for the target subsystems can be obtained based on the data subscription mechanism. When a subsystem needs to be added or optimized for a certain subsystem, there is no need to optimize the entire control project. Only configuration and management through the relay data exchange device are required, which basically does not affect the vehicle control system, thereby reducing the costs of inspection and after-sales maintenance. Developers can focus on the development of the tamper control system, and the data exchange of the subsystems is handed over to the relay device, thus improving work efficiency.
[0091] Correspondingly, an embodiment of the present invention discloses a relay data exchange method. Refer to Figure 7 as shown, which is applied to a relay data exchange device. The relay data exchange device is installed in a tamper control system, and the tamper control system includes at least one subsystem. Among them, the method includes:
[0092] Step S11: Through the communication driver management module in the relay data exchange device, configure the corresponding communication driver and data address according to the target subsystem managed by the subsystem management module;
[0093] Step S12: Through the subsystem management module, load the communication driver to establish a communication connection with the target subsystem, and based on the data subscription mechanism, obtain the system data of the target subsystem and / or execute data operation instructions on the target subsystem according to the data address.
[0094] Among them, for the more specific processing procedures of the above steps, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.
[0095] It can be seen that through the above solution of this embodiment, which is applied to a relay data exchange device installed in a tamping car control system, the tamping car control system includes at least one subsystem. Among them, the method includes: through the communication driver management module in the relay data exchange device, configuring corresponding communication drivers and data addresses according to the target subsystem managed by the subsystem management module; through the subsystem management module, loading the communication driver to establish a communication connection with the target subsystem, and based on the data subscription mechanism, obtaining the system data of the target subsystem and / or executing data operation instructions on the target subsystem according to the data address.
[0096] The beneficial technical effects of this application are as follows: By configuring a relay data exchange device in the tamping car control system, the communication network topology of the tamping car control system can be simplified. The data of all subsystems will be obtained by the relay data exchange device, and the communication drivers adapted to each subsystem have been integrated in the relay data exchange device. Designers do not need to write communication programs, but only need to configure the communication drivers and data addresses of relevant data. Without destroying the independence of each subsystem, it is convenient to obtain the data of the subsystem, making the sharing of their respective data easier and the acquisition of data more flexible. For the target subsystem managed by the subsystem management module, the data to be accessed and the data operation instructions for the target subsystem can be obtained based on the data subscription mechanism. When adding a subsystem or optimizing a certain subsystem, there is no need to optimize the entire control project. Only configuration and management through the relay data exchange device are required, which basically does not affect the vehicle control system, thereby reducing the costs of inspection and after-sales maintenance. Developers can focus on the development of the tamping car control system, and the data exchange of the subsystem is handed over to the relay device, thereby improving work efficiency.
[0097] Furthermore, the embodiment of this application also discloses an electronic device Figure 8 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure cannot be regarded as any limitation on the scope of use of this application.
[0098] Figure 8 It is a schematic structural diagram of an electronic device 20 provided by an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the relay data exchange method disclosed in any of the foregoing embodiments.
[0099] In this embodiment, the power supply 23 is used to provide operating voltages for the various hardware devices on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and no specific limitation is imposed thereon here; the input / output interface 25 is used to obtain external input data or output data to the outside, and the specific interface type thereof can be selected according to specific application requirements, and no specific limitation is imposed here.
[0100] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, a random access memory, a magnetic disk, or an optical disc, etc. The resources stored thereon can include an operating system 221, a computer program 222, and data 223, etc. The data 223 can include various kinds of data. The storage method can be transient storage or permanent storage.
[0101] Among them, the operating system 221 is used to manage and control the various hardware devices and the computer program 222 on the electronic device 20, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the relay data exchange method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0102] Furthermore, the embodiments of this application also disclose a computer-readable storage medium. The computer-readable storage medium mentioned here includes a random access memory (RAM), an internal memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic disk, or an optical disc, or any other form of storage medium well-known in the technical field. Among them, when the computer program is executed by a processor, the foregoing relay data exchange method is implemented. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.
[0103] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and reference can be made to the description of the method part for related parts.
[0104] The steps of the relay data exchange method or algorithm described in combination with the embodiments disclosed in this article can be implemented directly by hardware, software modules executed by a processor, or a combination of both. The software module can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0105] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the presence of additional identical elements in the process, method, article or device including the said element.
[0106] The above has introduced in detail a relay data exchange method, device, equipment and medium provided by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A relay data exchange device, characterized in that: Applied to a tamping vehicle control system, the tamping vehicle control system includes at least one subsystem, wherein the relay data exchange device includes: The communication driver management module is used to configure the corresponding communication driver and data address according to the target subsystem managed by the subsystem management module; specifically, it is used to connect each subsystem through a preset configuration interface to obtain the configuration parameters of the subsystem, generate a driver configuration file according to the configuration parameters, automatically register the driver, and configure the communication driver and data address of the target subsystem; The subsystem management module is used to load the communication driver to establish a communication connection with the target subsystem, and based on a data subscription mechanism, obtain system data of the target subsystem according to the data address and / or execute data operation instructions on the target subsystem; The subsystem management module comprises: A data subscription forwarding module, configured to obtain a data exchange request from the first subsystem based on a communication interface of a preset transmission protocol, and determine a second subsystem with which the first subsystem requests data exchange according to the data exchange request; obtain system data of the second subsystem based on the data subscription mechanism, and forward the system data of the second subsystem to the first subsystem; The data refresh module is used to adopt the subscription push mode of the changed data items. The data status of the subsystem is obtained by polling and temporarily stored in the cache area. When there is a change in the cache area, the subscription event is triggered to refresh the data.
2. The relay data exchange device according to claim 1, characterized in that: The communication driver management module is specifically used for: Acquire configuration parameters through a preset configuration interface, and generate a driver configuration file according to the configuration parameters; configure a communication driver and a data address corresponding to the target subsystem according to the driver configuration file; Accordingly, the subsystem management module is specifically used for: The driver configuration file is called to load the communication driver to establish a communication connection with the target subsystem, and based on a data subscription mechanism, the system data of the target subsystem is obtained according to the data address and / or a data operation instruction is executed on the target subsystem.
3. The relay data exchange device according to claim 1, characterized in that: The subsystem management module includes: A mapping relationship acquisition module, used for calling the data variable configuration file of the target subsystem to automatically acquire the mapping relationship between the system data and the data address; The instruction processing module is used to send the data operation instruction to the target subsystem based on a first preset time interval and create an independent thread to execute the data operation instruction.
4. The relay data exchange device according to claim 1, characterized in that: The subsystem management module further includes: The event alarm service module is used to obtain preset event alarm rules and monitor the target subsystem according to the preset event alarm rules; when the target subsystem is monitored to trigger the preset event alarm rules, the corresponding alarm event is notified to the target subsystem in real time.
5. The relay data exchange device according to claim 4, characterized in that: Also includes: A historical data archiving service module, used to obtain the system data of the target subsystem and the alarm event corresponding to the target subsystem when the preset event alarm rule is triggered; The system data and the alarm events are recorded in real time to a local database, and a preset query interface is provided to the target subsystem to query the local database.
6. The relay data exchange device according to claim 5, characterized in that: The subsystem management module further includes a data refresh module; wherein the data refresh module is used to: Polling and acquiring the data status of the target subsystem based on a second preset time interval, and caching the data status in the local database; Detecting whether the data state in the local database has changed; When the data state changes, the current system data corresponding to the data state change is obtained, and whether the current system data is subscribed is determined; If the current system data is subscribed, the data subscription mechanism is triggered to batch obtain the system data currently pushed by the target subsystem, and then the current system data is refreshed using the system data currently pushed by the target subsystem; if the current system data is not subscribed, the current system data is directly refreshed; When there is no change in the data status, the process jumps to the step of obtaining the data status of the target subsystem through polling based on a second preset time interval.
7. The relay data exchange device according to any one of claims 1 to 6, characterized in that: Also includes: Redundancy function module, used to configure the master service and the slave service; Sending a heartbeat signal to the slave service through the master service based on a preset time period, so that the slave service monitors the master service; When the slave service can receive the heartbeat signal, placing the slave service in a silent state; When the slave service fails to receive the heartbeat signal, the slave service is started.
8. A relay data exchange method, characterized in that: Applied to a relay data exchange device, the relay data exchange device is installed in a tamping vehicle control system, the tamping vehicle control system includes at least one subsystem, wherein the relay data exchange method includes: Through the communication driver management module in the relay data exchange device, the corresponding communication driver and data address are configured according to the target subsystem managed by the subsystem management module; the communication driver management module connects to each subsystem through a preset configuration interface to obtain the configuration parameters of the subsystem, generates a driver configuration file according to the configuration parameters, automatically registers the driver, and configures the communication driver and data address of the target subsystem; Loading the communication driver to establish a communication connection with the target subsystem through the subsystem management module, and acquiring system data of the target subsystem according to the data address and / or executing data operation instructions on the target subsystem based on a data subscription mechanism; Wherein, the subsystem management module includes: A data subscription forwarding module, configured to obtain a data exchange request from the first subsystem based on a communication interface of a preset transmission protocol, and determine a second subsystem with which the first subsystem requests data exchange according to the data exchange request; obtain system data of the second subsystem based on the data subscription mechanism, and forward the system data of the second subsystem to the first subsystem; The data refresh module is used to adopt the subscription push mode of the changed data items. The data status of the subsystem is obtained by polling and temporarily stored in the cache area. When there is a change in the cache area, the subscription event is triggered to refresh the data.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the relay data exchange method as claimed in claim 8.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein the computer program, when executed by the processor, implements the relay data exchange method as claimed in claim 8.
Citation Information
Patent Citations
Equipment networking system based on industrial protocol
CN118573701A