Secure platform emulation system and secure platform emulation system application method
By introducing logic simulation software, drive and acquisition simulation software, and API files into the JD-II computer interlocking system, a safety platform simulation system was realized, solving the high cost problem caused by hardware dependence and improving development and production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING JIAODA MICROUNION TECH
- Filing Date
- 2023-04-06
- Publication Date
- 2026-05-29
AI Technical Summary
The existing JD-FS security platform requires hardware to implement its functions, which leads to high R&D, production and testing costs and complex operation, and cannot meet the actual requirements of development, production and system testing.
A safety platform simulation system is provided. The simulation system is generated on the hardware basis of the JD-II type computer interlocking system by using logic department simulation software, drive and acquisition department simulation software and API files. The simulation system achieves the same functions as the hardware system, reducing the research and development, production and testing costs.
By implementing hardware functions through software, research and development, production, and testing costs are reduced, work efficiency is improved, and the actual requirements of development, production, and system testing are met.
Smart Images

Figure CN116449728B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of rail transit technology, and in particular relates to a safety platform simulation system and a method for applying the safety platform simulation system. Background Technology
[0002] The JD-II computer interlocking system for urban rail transit applications includes an interlocking unit (ILC), an interlocking controller (IOC), an operating unit (OW), and a maintenance unit (MW). It primarily performs basic interlocking functions, controlling routes, signals, and turnouts under specified interlocking conditions and timing sequences. It also has communication interfaces with ATS, ZC, VOBC, LEU, and other interlocking systems. The JD-FS safety platform includes a logic unit (LGU) and an interlocking controller (IOU), which are used in the interlocking unit and interlocking controller, respectively.
[0003] In related technologies, the functionality of the JD-FS security platform is often implemented through hardware. That is, the system software of the target machine is generated by compiling and linking the application software and the JD-FS security platform system library together. This method involves a lot of hardware structure, and the research, development, production and testing costs are high and the operation is relatively complicated. It cannot meet the actual requirements of development, production and system testing, and affects work efficiency to a certain extent. Summary of the Invention
[0004] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a security platform simulation system and a method for applying the security platform simulation system, which can reduce research and development, production and testing costs, and improve work efficiency.
[0005] Firstly, this application provides a security platform simulation system applied to a JD-II type computer interlocking system. The JD-II type computer interlocking system includes an interlocking machine, a drive and acquisition machine, and a JD-FS security platform. The JD-FS security platform includes a logic unit, a drive and acquisition unit, and a COMM interface. The logic unit is applied to the interlocking machine, and the drive and acquisition unit is applied to the drive and acquisition machine. The security platform simulation system includes:
[0006] Logic unit simulation software, which is used to load the functions corresponding to the logic unit;
[0007] Simulation software for the mining drive unit, wherein the simulation software for the mining drive unit is used to load the functions corresponding to the mining drive unit;
[0008] API files, which include interface functions for calling the COMM interface.
[0009] According to the security platform simulation system of this application, by setting up matching logic simulation software, drive acquisition simulation software and API files on the hardware of the JD-II type computer interlocking system, a corresponding security platform simulation system is generated. The software can achieve the same functions as the hardware system of the JD-II type computer interlocking system, without the need for additional hardware, effectively reducing R&D, production and testing costs. It is also highly flexible and powerful, able to meet the actual requirements of development, production and system testing, and helps to improve work efficiency.
[0010] According to one embodiment of this application, the API file further includes an interface function for calling Ethernet communication, which is applied to the inter-system communication interface and / or drive acquisition communication interface of the JD-II type computer interlocking system.
[0011] According to one embodiment of this application, the security platform simulation system further includes an Ethernet communication module corresponding to the Ethernet communication interface of the JD-II type computer interlocking system. The Ethernet communication interface has 6 network ports and supports a maximum of 5 boards.
[0012] According to one embodiment of this application, the security platform simulation system further includes a serial communication module corresponding to the serial communication interface of the JD-II type computer interlocking system. The serial communication interface supports a maximum of 5 serial port cards, and each serial port card supports 4 serial ports.
[0013] According to one embodiment of this application, the security platform simulation system further includes an acquisition drive communication module corresponding to the acquisition drive communication interface of the JD-II type computer interlocking system, wherein the acquisition drive communication interface has 32 acquisition channels and 16 drive channels.
[0014] According to one embodiment of this application, the interlocking mechanism includes a first interlocking mechanism and a second interlocking mechanism, and the safety platform simulation system further includes at least two first shared memory modules. The first shared memory modules are respectively communicatively connected to the first interlocking mechanism and the second interlocking mechanism, and the at least two first shared memory modules are respectively protected by a mutex core object.
[0015] According to one embodiment of this application, the first shared memory module includes:
[0016] The working status module is communicatively connected to the first interlocking machine and the second interlocking machine, and is used to store the working status of the first interlocking machine and the second interlocking machine.
[0017] The primary status module is used to acquire and store the current primary status of the dual-system interlocking system.
[0018] Secondly, this application provides a method for applying a security platform simulation system, which is applied to the security platform simulation system as described in the first aspect. The method includes:
[0019] The security platform simulation system is initialized.
[0020] If the initialization process is successful, the security platform simulation system is controlled to enter a periodic processing state;
[0021] In the fixed-period processing state, a fixed-period task is executed in the security platform simulation system based on the objective function.
[0022] According to the application method of the security platform simulation system in this application, by using the security platform simulation system, the same periodic processing tasks as the hardware system can be executed, thereby realizing the platform scheduling function. It is simple, reliable and does not require additional configuration, which helps to reduce design costs.
[0023] Thirdly, this application provides a security platform simulation system application device, applied to the security platform simulation system as described in the first aspect, the device comprising:
[0024] The first processing module is used to initialize the security platform simulation system;
[0025] The second processing module is used to control the security platform simulation system to enter a periodic processing state if the initialization process is successful.
[0026] The third processing module is used to execute a periodic task in the security platform simulation system based on an objective function under the periodic processing state.
[0027] According to the application of the security platform simulation system, the security platform simulation system can perform the same periodic processing tasks as the hardware system, thereby realizing the platform scheduling function. It is simple, reliable and does not require additional configuration, which helps to reduce design costs.
[0028] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the security platform simulation system application method as described in the first aspect above.
[0029] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the security platform simulation system application method as described in the first aspect above.
[0030] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects:
[0031] By setting up matching logic simulation software, drive acquisition simulation software, and API files to generate a corresponding safety platform simulation system based on the hardware of the JD-II computer interlocking system, the same functions as the hardware system of the JD-II computer interlocking system can be achieved through software, without the need for additional hardware. This effectively reduces R&D, production, and testing costs. Furthermore, it offers high flexibility and powerful functionality, meeting the actual requirements of development, production, and system testing, and contributing to improved work efficiency.
[0032] Furthermore, by setting up a shared module to achieve optical communication between the two systems, it is simple, reliable, and requires no additional configuration, which helps to reduce design costs.
[0033] Furthermore, by setting up a working state module and a primary state module within the first shared memory module to provide a shutdown function, shutdown simulation can be achieved, which is highly functional and further reduces testing costs, thus helping to improve work efficiency.
[0034] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0035] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0036] Figure 1 This is one of the structural schematic diagrams of the security platform simulation system provided in the embodiments of this application;
[0037] Figure 2 This is the second structural schematic diagram of the security platform simulation system provided in the embodiments of this application;
[0038] Figure 3 This is the third structural schematic diagram of the security platform simulation system provided in the embodiments of this application;
[0039] Figure 4 This is the fourth structural schematic diagram of the security platform simulation system provided in the embodiments of this application;
[0040] Figure 5 This is one of the flowcharts illustrating the application method of the security platform simulation system provided in this application embodiment;
[0041] Figure 6 This is the second flowchart illustrating the application method of the security platform simulation system provided in this application embodiment;
[0042] Figure 7 This is a schematic diagram of the structure of the security platform simulation system application device provided in the embodiments of this application. Detailed Implementation
[0043] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0044] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0045] The following description, in conjunction with the accompanying drawings, details the security platform simulation system, security platform simulation system application method, security platform simulation system application device, and readable storage medium provided in this application through specific embodiments and application scenarios.
[0046] like Figure 1 As shown, the security platform simulation system is applied to the JD-II type computer interlocking system. The security platform simulation system includes: logic department simulation software (JD2E4ILC.LIB), drive and acquisition department simulation software (JD2E4IOC.LIB) and API files.
[0047] It should be noted that the JD-II type computer interlocking system includes: interlocking machine (ILC), drive and mining machine (IOC), operator machine (OW), and maintenance machine (MW).
[0048] The Interlocking Machine (ILC) includes the JD-FS security platform and the interlocking machine application software.
[0049] The interlocking machine software is generated by compiling and linking the interlocking machine application software and the JD-FS security platform system software, and then burned into the CPU board.
[0050] The IOC (Initial Control Center) includes the JD-FS security platform and the IOC application software.
[0051] The platform interface (API) is the software interface provided by the JD-FS security platform to the interlocking machine application software. The JD-FS security platform consists of platform system software and hardware.
[0052] The operator (OW) and maintenance (MW) machines are generally industrial control computers (with Windows operating system).
[0053] In actual operation, the JD-FS security platform and various application software communicate with each other based on the platform interface (API).
[0054] The JD-FS security platform consists of two parts: the Logic Unit (LGU) and the Drive-and-Acquire Unit (IOU). The Logic Unit is used in the interlocking machine, and the Drive-and-Acquire Unit is used in the drive-and-acquire machine.
[0055] The logic section consists of two systems, which together with the shutdown unit (SU) form a 2×2 dual-machine hot standby redundancy structure. The main boards are shown in Table 1.
[0056] Table 1
[0057]
[0058] The main functions of the logic section are as follows:
[0059] 1) Provide a safe and reliable computing platform.
[0060] 2) Provides three types of communication interfaces: Ethernet electrical port, Ethernet optical port, and RS422.
[0061] 3) Two inter-system communication interfaces are provided (the platform is protected by a secure communication protocol).
[0062] 4) Supports the control and status acquisition functions of the reversing related relays, and can be used with application software to realize dual-machine hot standby of the logic unit I / II system.
[0063] 5) Provide two Ethernet optical ports to enable communication with the drive and acquisition department, and the communication data is protected by a secure communication protocol.
[0064] 6) Diagnose, monitor, and report the operating status of the equipment.
[0065] The drive unit consists of two systems forming a 2×2 dual-machine redundant structure; the main boards are shown in Table 2.
[0066] Table 2
[0067]
[0068] The main functions of the mining unit are as follows:
[0069] 1) Provide a safe and reliable computing platform.
[0070] 2) Provides three types of communication interfaces: Ethernet electrical port, Ethernet optical port, and RS422, to enable communication with other systems. Since the security of the communication interfaces is guaranteed by a secure communication protocol, and the processing of the secure communication protocol is handled by the application software, the security platform is only responsible for the data transmission and reception of the relevant communication interfaces.
[0071] 3) Provide two Ethernet optical ports to enable communication with the logic unit or with another driver unit. The communication data is protected by a secure communication protocol.
[0072] 4) Provides I / O digital quantity acquisition and drive interfaces to realize status acquisition and output control of trackside equipment.
[0073] 5) Diagnose, monitor, and report the operating status of the equipment.
[0074] In some embodiments, continue to refer to Figure 1 The JD-FS security platform may also include a COMM interface for COMM communication.
[0075] In this application, it should be noted that the security platform simulation system is a simulation implementation of the JD-FS security platform on the Windows platform, and the security platform simulation system has the same application interface (JD-FS APIs) as the JD-FS security platform.
[0076] For example, this security platform simulation system could be the JD-FS security platform simulation system.
[0077] Of course, in other embodiments, this security platform simulation system can also be applied to other systems similar to the JD-II type computer interlocking system, such as the TIS type security host system and the JDIE type security host system. Those skilled in the art will understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of this application.
[0078] When the security platform simulation system is applied to the TIS type security host system and the JDIIE type security host system, its design principle is similar to that applied to the JD-II type computer interlocking system. The following will take the JD-II type computer interlocking system as an example to explain the security platform simulation system.
[0079] The security platform simulation system has a built-in main function, main().
[0080] The security platform simulation system includes: logic unit simulation software (JD2E4ILC.LIB) and drive and acquisition unit simulation software (JD2E4IOC.LIB), which correspond to the logic unit and simulation unit in the JD-FS security platform, respectively.
[0081] The logic department simulation software and the driver / collection department simulation software are static library files.
[0082] The logic department simulation software is used to load the functions corresponding to the logic department; the drive and acquisition department simulation software is used to load the functions corresponding to the drive and acquisition department. The specific functions have been explained above and will not be repeated here.
[0083] The security platform simulation system also includes API files, which are the files corresponding to the platform interfaces.
[0084] The API file includes interface functions for calling the COMM interface.
[0085] In some embodiments, the interlocking machine communicates with the drive and mining machine via a COMM board. In this embodiment, communication between the interlocking machine and the drive and mining machine is achieved through memory sharing. The specific communication method will be described in the embodiments below and will not be repeated here.
[0086] It should be noted that each time the application software finishes receiving data from the shared memory via the API, the security platform simulation system automatically clears the corresponding data in the shared memory to prevent data residue.
[0087] In some embodiments, a protection mechanism can be added to the shared data to ensure data integrity.
[0088] In some embodiments, the API file may also include interface functions for invoking Ethernet communication.
[0089] In this embodiment, the Ethernet communication interface functions are applied to the inter-system communication interface and / or drive acquisition communication interface of the JD-II type computer interlocking system, and communication is carried out through redundant fiber optic Ethernet.
[0090] Of course, in some embodiments, the API file may include the interface functions corresponding to all the communication interfaces involved.
[0091] Table 3 provides an example of the list of files included in the API documentation.
[0092] Table 3
[0093]
[0094] In this application, it is understood that the target machine's system software is generated by compiling and linking the application software together with the JD-FS security platform system library, while the application software based on the security platform simulation system is generated by compiling and linking the application software together with the security platform simulation system. The final generated directory is shown in Table 4.
[0095] The target machine's system software and the security platform simulation system's application software perform the same functions and have the same upper-level application software, but the platform libraries, compilers, and runtime environments they use are different.
[0096] Table 4
[0097] Serial Number Standard Catalog Brief 1 JDIIE4ILC / JD2E4IOC Engineering simulation library software root directory 2 ├─src General-purpose simulation library software, functional modules (*.c / h) 3 ├─include Global header files (including API files for each module and other common header files) 4 ├─lib Compile and output LIB directory
[0098] Referring again to Table 4, in some embodiments, the security platform simulation system may provide at least one of the following: an engineering simulation library software root directory, a simulation library general software, global header files, and a compiled output LIB directory.
[0099] According to the security platform simulation system provided in this application, a corresponding security platform simulation system is generated by setting up matching logic simulation software, drive and acquisition simulation software, and API files on the hardware of the JD-II type computer interlocking system. This allows the software to achieve the same functions as the hardware system of the JD-II type computer interlocking system, without the need for additional hardware, effectively reducing R&D, production, and testing costs. Furthermore, it offers high flexibility and powerful functionality, meeting the actual requirements of development, production, and system testing, and helping to improve work efficiency.
[0100] like Figure 2 As shown, in some embodiments, the interlocking mechanism may include a first interlocking mechanism and a second interlocking mechanism, and the safety platform simulation system may also include at least two first shared memory modules.
[0101] In this embodiment, the first interlocking machine and the second interlocking machine can correspond to the I-series interlocking machine and the II-series interlocking machine, respectively.
[0102] At least two first shared memory modules include SM_I and SM_II.
[0103] The first shared memory module is communicatively connected to the first interlocking machine and the second interlocking machine respectively. SM_I is used to realize one-way communication from the I-series interlocking machine to the II-series interlocking machine, and SM_II is used to realize one-way communication from the II-series interlocking machine to the I-series interlocking machine.
[0104] It should be noted that in this embodiment, at least two first shared memory modules are protected by mutex core objects to ensure exclusive access of shared memory by a process; that is, when a write operation of a certain interlock is not completed, the other interlock cannot access the buffer due to the protection of the mutex core object, thereby ensuring data integrity.
[0105] Understandably, in the JD-FS security platform, inter-system communication is accomplished by two redundant fiber optic Ethernet connections provided by the platform, and secure communication is also handled by the platform. For application software, it can simply call the corresponding API functions to send and receive data.
[0106] When using a safety platform simulation system, the two systems of equipment (such as two systems of interlocking machines) are actually two processes of application software (such as ILC.EXE). The difference lies in the different parameters used to start these two processes (these parameters are used to identify the system ID of different devices). The inter-system communication based on the safety platform simulation system is essentially the communication between these two processes.
[0107] It should be noted that when using shared memory, the two processes corresponding to the two devices should run on the same computer.
[0108] For example, in actual operation, when the I-series interlocking machine sends data to the II-series interlocking machine, it only needs to send the data to the first shared memory module SM_I. When the II-series interlocking machine receives inter-system data through the API, it can directly read the data from the first shared memory module SM_I.
[0109] Similarly, when the II-series interlocking machine sends data to the I-series interlocking machine, it only needs to send the data to the first shared memory module SM_II. When the I-series interlocking machine receives data, it can also directly obtain the relevant data from the first shared memory module SM_II.
[0110] The security platform simulation system provided in the embodiments of this application realizes optical communication between two systems by setting up a shared module. It is simple, reliable and does not require additional configuration, which helps to reduce design costs.
[0111] like Figure 3 As shown, in some embodiments, the first shared memory module may include a working state module and a primary state module.
[0112] In this embodiment, the working status module is used to receive and store the working status of the I-series interlocking machine corresponding to the first interlocking machine and the working status of the II-series interlocking machine corresponding to the second interlocking machine.
[0113] The working status includes normal working status and abnormal working status.
[0114] Understandably, in a real platform, the two interlocking systems output their operating status to the reversing unit via control commands. The reversing unit is responsible for completing the primary decision-making function (i.e., ensuring that only one interlocking system is the primary one), and returns the decision result (i.e., primary information) to the two interlocking systems via the reversing unit's status information.
[0115] In a secure platform simulation system, the function of a failover unit can be implemented by setting up shared memory.
[0116] The simulated reversing unit in the shared memory sets the working status (i.e., working status module) and decision result (i.e., main status module) of the two interlocking systems.
[0117] The working status module is communicatively connected to the first interlocking machine and the second interlocking machine to monitor and receive the working status information of each interlocking machine.
[0118] The primary status module is used to acquire and store the current primary status of the dual-system interlocking system.
[0119] In this context, the primary state refers to the dual-system interlocking system obtaining the decision result from shared memory via API.
[0120] For example, in actual execution, when a certain interlocking machine sets its own working state through the API (i.e., when it sends a shutdown unit control command to the working state module), the safety platform simulation system makes a real-time judgment and refreshes the current primary state based on the working state of the other system and the primary state stored in the current primary state module; the dual-system interlocking obtains the judgment result (primary state) from the first shared memory module through the API and refreshes its own primary state.
[0121] In some embodiments, if no control command is received within a continuous target number of cycles, the operating state of the system can be automatically set to a non-operating state and the corresponding shutdown logic can be started to refresh the corresponding primary state, so as to monitor the effectiveness of the shutdown unit control command in real time.
[0122] In some embodiments, the first shared memory module may further include a synchronization protection module to provide a synchronization protection mechanism to ensure data integrity.
[0123] The security platform simulation system provided in the embodiments of this application provides a shutdown function by setting up a working state module and a primary state module in the first shared memory module. This enables shutdown simulation, which has high functionality and further reduces testing costs, thus helping to improve work efficiency.
[0124] Continue to refer to Figure 1 In some embodiments, the security platform simulation system may further include: a general-purpose PC, an operating system driver, and an emulator system library.
[0125] In this embodiment, the operating system driver is communicatively connected to a general-purpose PC, and the emulator system library is communicatively connected to the operating system driver.
[0126] Among them, the simulator system library corresponds to the JD-FS system library in the JD-II type computer interlocking system, and the operating system driver corresponds to the OS / Driver in the JD-II type computer interlocking system.
[0127] Continue to refer to Figure 1 In some embodiments, the JD-II type computer interlocking system may further include an Ethernet communication interface, and the security platform simulation system may further include an Ethernet communication module corresponding to the Ethernet communication interface of the JD-II type computer interlocking system.
[0128] In this embodiment, the Ethernet communication interface has 6 network ports and supports a maximum of 5 boards.
[0129] Continue to refer to Figure 1 In some embodiments, the JD-II type computer interlocking system may further include a serial communication interface, and the safety platform simulation system may further include a serial communication module corresponding to the serial communication interface of the JD-II type computer interlocking system.
[0130] In this embodiment, the serial communication interface supports a maximum of 5 serial port cards, and each serial port card supports 4 serial ports.
[0131] In actual operation, the serial communication interface can support RS422 interface.
[0132] In the security platform simulation system, the RS422 communication function is mainly performed by the communication module corresponding to the RS422 board, including initialization, sending, and receiving functions.
[0133] Initialization includes configuring the baud rate, data bits, stop bits, and parity check method.
[0134] Sending means sending data out through a specified port.
[0135] Receive the data that is about to be received and return it to the caller.
[0136] like Figure 4 As shown, the security platform simulation system provides various simulation implementation schemes based on practical applications. The specific scheme can be implemented by modifying the configuration of the security platform simulation system as needed.
[0137] 1) Use Ethernet to simulate a serial port
[0138] 2) Use the RS422 in the PC to simulate the RS422 in the security platform.
[0139] It should be noted that in both methods, the interlocking machine software calls the same API, which is the API output by the JD-FS platform to the application software. The only difference is that the safety platform simulation system uses two different implementations of this interface. That is, regardless of the method used, the application software code remains unchanged; only the configuration of the safety platform simulation system differs.
[0140] In some embodiments, the JD-II type computer interlocking system may further include a data acquisition and drive communication interface, and the safety platform simulation system may further include a data acquisition and drive communication module corresponding to the data acquisition and drive communication interface of the JD-II type computer interlocking system.
[0141] In this embodiment, the acquisition driver communication interface has 32 acquisition channels and 16 driver channels.
[0142] Understandably, in the JD-II type computer interlocking system, the status acquisition and output control of the trackside equipment are realized by the drive acquisition machine, mainly through the drive board (OUT16) and the acquisition board (IN32D); the system can support up to 8 sets of drive acquisition machines, and the number of drive acquisition machines depends on the scale of the station.
[0143] The trackside equipment is implemented by trackside simulation software. The trackside simulation software can display the status of station equipment (turnouts, signals, and sections, etc.) and also manually set the status of each piece of equipment, such as setting filament breakage or section occupancy.
[0144] In the safety platform simulation system, communication between the mining machine and the trackside simulation software can be achieved using shared memory. That is, the safety platform simulation system can also include a second shared memory module, and the second shared memory module is communicatively connected to both the mining machine and the trackside simulation module.
[0145] In actual execution, each drive unit sends the drive command to its own second shared memory module, and the trackside simulation then obtains the drive information from the corresponding shared memory. The specific implementation method is the same as the inter-system optical port communication mentioned above, and will not be described in detail in this application.
[0146] Similarly, the trackside simulation also outputs the collected information to the corresponding second shared memory module, and each drive and acquisition machine obtains it from the corresponding second shared memory module.
[0147] In some embodiments, in addition to driving and acquisition information, the configuration information of each driver and acquisition unit can also be updated to the second shared memory module in order to aggregate driving commands and disassemble acquisition information.
[0148] In some embodiments, the driver commands in the second shared memory module of the security platform simulation system are set with a "shelf life". If the driver commands are not updated before the "shelf life" expires, they will be cleared to 0. The information collection is similar.
[0149] In some embodiments, the second shared memory module may further include a synchronization protection mechanism module to ensure data integrity.
[0150] According to the safety platform simulation system provided in the embodiments of this application, the communication between the drive mining machine and the trackside simulation software is realized by setting a second shared memory module, thereby providing the same IO function as the hardware device. It is simple, reliable and does not require additional configuration, which helps to reduce design costs.
[0151] This application also provides a method for applying a security platform simulation system, which is applied to the security platform simulation system described in any of the above embodiments.
[0152] like Figure 5 As shown, the application method of the security platform simulation system includes steps 510, 520 and 530.
[0153] Step 510: Initialize the security platform simulation system;
[0154] In this step, it can be understood that after power-on or reset, the JD-FS security platform first executes an "initialization" process. During this process, the system platform initializes the application software through the callback usr_init(). After successful initialization, the platform enters periodic processing and completes the periodic processing tasks of the application software through the callback usr_proc_cycle(). Both the initialization interface function usr_init() and the periodic processing interface function usr_proc_cycle() are implemented by the application layer, and the JD-FS security platform is responsible for calling and executing them.
[0155] The scheduling mechanism of the JD-FS security platform dictates that the entry point for application software must be implemented within the platform rather than within the application software. In this application, the security platform simulation system is also implemented based on this mechanism, with main() encapsulated in the security platform simulation system library.
[0156] In actual implementation, such as Figure 6 As shown, similar to the real platform, before calling usr_init() to initialize the application layer, the security platform simulation system calls the initialization functions of each module inside the security platform simulation system to complete the initialization process of the security platform simulation system itself.
[0157] For example, the device ID can be set by simulating a jumper through parameter settings; the RS422 simulation implementation can be set and initialized by reading the configuration file (Note: RS422 can be used as Ethernet or a real RS422 in Windows to simulate the RS422 communication function of the security platform system).
[0158] Step 520: If the initialization process is successful, control the safety platform simulation system to enter the periodic processing state;
[0159] In this step, if the initialization process is successful, the control safety platform simulation system will enter a periodic processing state.
[0160] Step 530: Under the fixed-period processing state, execute the fixed-period task in the safety platform simulation system based on the objective function.
[0161] In this step, continue to refer to Figure 6 Once the application enters the periodic processing state, the periodic processing task can be completed by calling usr_proc_cycle().
[0162] According to the application method of the security platform simulation system provided in the embodiments of this application, by using the security platform simulation system, the same periodic processing tasks as the hardware system can be executed, thereby realizing the platform scheduling function. It is simple, reliable and does not require additional configuration, which helps to reduce design costs.
[0163] Continue to refer to Figure 6 In some embodiments, after step 530, the method may further include:
[0164] Based on the start and end times corresponding to the periodic processing state, the first duration of the periodic processing state is determined.
[0165] If the first duration is less than the target running cycle duration of the safety platform simulation system, the safety platform simulation system is controlled to enter the idle time processing state.
[0166] If the first duration is not less than the target running cycle duration, the control safety platform simulation system library enters the next round of idle time processing state.
[0167] In this embodiment, the target running cycle duration can be user-defined, and this application does not limit it here.
[0168] The idle time processing state is used to put the security platform simulation system into a timed sleep state and to enable the JD-FS security platform to perform system self-checks and other necessary processing.
[0169] For example, in actual execution, in the security platform simulation system, when the fixed-cycle processing is re-entered each time, the timing is started and ends after the usr_proc_cycle() callback processing is completed. The time difference before and after (i.e. the first duration) is compared with the set cycle value (i.e. the target running cycle duration).
[0170] If there is still time remaining, the process is put into an idle time processing state.
[0171] If there is no remaining time, the system will process the idle time according to the over-cycle processing strategy set by the security platform simulation system. After the idle time is completed, the system will start the fixed-cycle processing again, and the process will repeat.
[0172] In some embodiments, the method may further include:
[0173] Store the received first data into the target buffer;
[0174] Receive request instructions for retrieving data;
[0175] In response to the request command, the second data stored in the target buffer is sent; the second data is all of the first data stored in the target buffer.
[0176] In this embodiment, the security platform simulation system may also include a communication module corresponding to the 6FE (RJ45 electrical interface) and a communication module corresponding to the 4FX (SC optical interface) board, for implementing Ethernet communication functions.
[0177] The 6FE and 4FX boards have different physical interfaces, but the functions and APIs are the same, including initialization, sending and receiving functions.
[0178] Initialization is used to configure IP addresses, subnet masks, routes, and create sockets.
[0179] Sending means sending data to the outside world through the specified socket.
[0180] Receive the data that is about to be received and return it to the caller.
[0181] The target buffer can be the buffer of the corresponding socket.
[0182] It should be noted that in the security platform simulation system, Ethernet data reception is handled by a separate thread, which receives data from the network in real time without being constrained by the platform cycle, and saves the received data to the corresponding socket's buffer.
[0183] When receiving data, if the application software obtains the received data through the API, the security platform simulation system will simultaneously return all the data in the target buffer to the caller.
[0184] When sending data, the process is immediate; that is, when the application calls the platform interface to send data, the security platform simulation system immediately sends the data to the network.
[0185] The characteristics of sending and receiving data are consistent with the actual platform behavior.
[0186] In some embodiments, state management of TCP-type sockets (including Server and Client) is also performed in the thread receiving data.
[0187] In the specific implementation, multiplexing technology is mainly adopted, that is, the select system call is used to monitor and wait for changes in the attributes of all sockets. The monitored attributes include: readfds (readable), writefds (writable), and exceptfds (exceptions).
[0188] After the select function is called, it will block (the thread will be in a sleep state) until a socket is ready (data can be read, written, or an error exception occurs), or the timeout (timeout specifies the waiting time) occurs, at which point the function will return and wake up the thread.
[0189] After the select() function returns, if there is a ready socket (i.e., the select return value is greater than 0), you can use FD_ISSET to query the socket whose status has changed and perform the corresponding processing on that socket.
[0190] According to the application method of the security platform simulation system provided in the embodiments of this application, the same Ethernet communication function as the hardware platform can be realized by using the security platform simulation system. It is simple, reliable and does not require additional configuration, which helps to reduce design costs.
[0191] Through numerous experiments by the inventors, the security platform simulation system provided in this application can improve users' work efficiency in multiple aspects, including development, production and testing, and training.
[0192] First, a convenient and efficient development environment can be built for R&D personnel in the following ways:
[0193] 1) Developers can complete development, debugging and testing on ordinary PCs or laptops, reducing dependence on hardware platforms and requirements for laboratory environments, thus reducing the company's R&D costs.
[0194] 2) Compared to the development in DOS mode using JD-IA in related technologies, the convenience of Windows can greatly improve work efficiency. In addition, the available memory of Windows application software far exceeds 640K of memory, so there is no situation where debugging is impossible due to memory limitations.
[0195] 3) Windows offers a wealth of mature and advanced testing tools, providing more technologies and measures to ensure software quality. For example, by introducing the C++Test testing tool during development, developers can check at any time whether the code they write conforms to the company's specifications.
[0196] Second, after using the safety platform simulation system, production personnel (referring to the process of creating station software using general-purpose software) can perform the work entirely on ordinary PCs or laptops, without occupying the laboratory testing environment. This avoids situations where personnel have to wait for each other due to insufficient resources, saves company costs, and improves work efficiency. Furthermore, production personnel can set up a testing environment on their own computers to perform preliminary testing on the generated station software, avoiding unnecessary rework due to typos.
[0197] Third, a training system can also be built using a safety platform simulation system, so that the interlocking logic is exactly the same as that of the actual station. This allows for practical application of knowledge, is highly targeted, and can achieve good training results. It is also low-cost and easy to promote.
[0198] The training system built on a safety platform simulation system can greatly reduce the cost of the training system and eliminate safety hazards caused by inadequate training of operators. It is of positive significance for strengthening the construction of station and section training bases and meeting the training requirements of front-line employees.
[0199] The security platform simulation system application method provided in this application embodiment can be executed by a security platform simulation system application device. This application embodiment uses the execution of the security platform simulation system application method by a security platform simulation system application device as an example to illustrate the security platform simulation system application device provided in this application embodiment.
[0200] This application also provides a security platform simulation system application device.
[0201] like Figure 7 As shown, the security platform simulation system application device is applied to the security platform simulation system described in any of the above embodiments. The device includes: a first processing module 710, a second processing module 720, and a third processing module 730.
[0202] The first processing module 710 is used to initialize the security platform simulation system library and the application module in sequence.
[0203] The second processing module 720 is used to control the safety platform simulation system to enter a periodic processing state if the initialization process is successful.
[0204] The third processing module 730 is used to execute periodic tasks in the safety platform simulation system based on the objective function under periodic processing state.
[0205] According to the security platform simulation system application device provided in the embodiments of this application, by adopting the security platform simulation system, it is possible to execute the same periodic processing tasks as the hardware system, thereby realizing the platform scheduling function. It is simple, reliable and does not require additional configuration, which helps to reduce design costs.
[0206] In some embodiments, the device may further include:
[0207] The fourth processing module is used to determine the first duration of the periodic processing state based on the start and end times corresponding to the periodic processing state after executing a periodic task in the security platform simulation system based on the objective function.
[0208] The fifth processing module is used to control the security platform simulation system to enter the idle time processing state when the first duration is less than the target running cycle duration corresponding to the security platform simulation system.
[0209] The sixth processing module is used to control the safety platform simulation system library to enter the next round of idle time processing state when the first duration is not less than the target running cycle duration.
[0210] In some embodiments, the device may further include:
[0211] The seventh processing module is used to store the received first data into the target buffer;
[0212] The eighth processing module is used to receive request instructions for obtaining data;
[0213] The ninth processing module is used to send the second data stored in the target buffer in response to the request command; the second data is all the first data stored in the target buffer.
[0214] The security platform simulation system application device provided in this application embodiment can achieve... Figures 5 to 6 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0215] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described security platform simulation system application method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0216] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0217] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described security platform simulation system application method.
[0218] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0219] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described security platform simulation system application method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0220] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0221] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0222] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0223] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0224] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0225] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. A security platform simulation system, characterized in that, This is applied to the JD-II type computer interlocking system, which includes an interlocking machine, a drive and acquisition machine, and a JD-FS security platform. The JD-FS security platform includes a logic unit, a drive and acquisition unit, and a COMM interface. The logic unit is used in the interlocking machine, and the drive and acquisition unit is used in the drive and acquisition machine. The security platform simulation system includes: Logic unit simulation software, which is used to load the functions corresponding to the logic unit; Simulation software for the mining drive unit, wherein the simulation software for the mining drive unit is used to load the functions corresponding to the mining drive unit; The API file includes interface functions for calling the COMM interface; the API file also includes interface functions for calling Ethernet communication, which are applied to the inter-system communication interface and / or drive acquisition communication interface of the JD-II computer interlocking system; the safety platform simulation system also includes an Ethernet communication module corresponding to the Ethernet communication interface of the JD-II computer interlocking system, the Ethernet communication interface having 6 network ports and supporting a maximum of 5 boards; the safety platform simulation system also includes a serial communication module corresponding to the serial communication interface of the JD-II computer interlocking system, the serial port... The communication interface supports a maximum of 5 serial port cards, and each serial port card supports 4 serial ports; the safety platform simulation system also includes a data acquisition and driving communication module corresponding to the data acquisition and driving communication interface of the JD-II type computer interlocking system, the data acquisition and driving communication interface having 32 data acquisition channels and 16 driving channels; characterized in that the interlocking machine includes a first interlocking machine and a second interlocking machine, the safety platform simulation system also includes at least two first shared memory modules, the first shared memory modules are respectively communicatively connected to the first interlocking machine and the second interlocking machine, and the at least two first shared memory modules are respectively protected by a mutex core object; the first shared memory module includes: The working status module is communicatively connected to the first interlocking machine and the second interlocking machine, and is used to store the working status of the first interlocking machine and the second interlocking machine. The primary status module is used to acquire and store the current primary status of the dual-system interlocking system.
2. A method for applying a security platform simulation system, characterized in that, Applied to the security platform simulation system as described in claim 1, the method includes: The security platform simulation system is initialized. If the initialization process is successful, the security platform simulation system is controlled to enter a periodic processing state; In the fixed-period processing state, a fixed-period task is executed in the security platform simulation system based on the objective function.
3. The application method of the security platform simulation system according to claim 2, characterized in that, In the fixed-period processing state, after executing the fixed-period task in the security platform simulation system based on the objective function, the method further includes: Based on the start and end times corresponding to the fixed-period processing state, the first duration of the fixed-period processing state is determined; If the first duration is less than the target operating cycle duration corresponding to the security platform simulation system, the security platform simulation system is controlled to enter the idle time processing state. If the first duration is not less than the target running cycle duration, the security platform simulation system is controlled to enter the next round of idle time processing state.
4. The application method of the security platform simulation system according to claim 2 or 3, characterized in that, Also includes: Store the received first data into the target buffer; Receive request instructions for retrieving data; In response to the request instruction, second data stored in the target buffer is sent; the second data is all of the first data stored in the target buffer.