CN116909879A - Method and device for testing train control program based on general purpose computer - Google Patents

Method and device for testing train control program based on general purpose computer Download PDF

Info

Publication number
CN116909879A
CN116909879A CN202310701601.4A CN202310701601A CN116909879A CN 116909879 A CN116909879 A CN 116909879A CN 202310701601 A CN202310701601 A CN 202310701601A CN 116909879 A CN116909879 A CN 116909879A
Authority
CN
China
Prior art keywords
control program
train control
purpose computer
instruction
simulator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310701601.4A
Other languages
Chinese (zh)
Inventor
周伯尼
孙晓光
李亨飞
王中林
方伟
徐硕
宋健健
孙鹏远
闫博
张帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CRSC Urban Rail Transit Technology Co Ltd
Original Assignee
CRSC Urban Rail Transit Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CRSC Urban Rail Transit Technology Co Ltd filed Critical CRSC Urban Rail Transit Technology Co Ltd
Priority to CN202310701601.4A priority Critical patent/CN116909879A/en
Publication of CN116909879A publication Critical patent/CN116909879A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Train Traffic Observation, Control, And Security (AREA)
  • Electric Propulsion And Braking For Vehicles (AREA)

Abstract

The application provides a method and a device for testing a train control program based on a general purpose computer, which are used for installing the general purpose computer of a non-real-time operating system, wherein the method comprises the following steps: receiving initial parameters input by a user; running a simulator installed by a general computer, loading a train control program in the simulator, and calculating based on initial parameters to obtain a test result of the train control program; the scheduling mode and the processing time sequence of the train control program when running in the simulator are the same as those when running on the vehicle-mounted computer. According to the method and the device for testing the train control program based on the general purpose computer, the train control program is tested by utilizing the computing resources of the general purpose computer, so that the cost of testing can be reduced, the cost is lower, multiple tests can be simultaneously performed, and the economy is better. And the processing time sequence of the simulator is consistent with that of the vehicle-mounted computer, so that the simulator can be seamlessly transferred into engineering use after the test is completed, and the stability is higher.

Description

Method and device for testing train control program based on general purpose computer
Technical Field
The application relates to the technical field of rail transit, in particular to a method and a device for testing a train control program based on a general purpose computer.
Background
The signal system of the rail transit is a command system with high automation degree, and along with the continuous deep operation of the refinement degree, the functional requirements on the vehicle-mounted computer are more and more abundant, so that the production capacity of the vehicle-mounted control program running on the vehicle-mounted computer is more and more required.
The train control program is a vehicle-mounted control program of a signal system of rail transit and is used for a vehicle-mounted computer. The train control program needs real-time response, and the real-time property of acquisition and processing is ensured. In the production process of the train control program, debugging, testing and other works are required before the train control program is on line in the formal engineering, so that the safety and effectiveness of the train control program are ensured.
Currently, two conventional test modes can perform the testing of train control programs.
One is to install the train control program on a vehicle-mounted computer that is consistent with the field. The method has good verification accuracy, and the time delay of the program operation process is completely consistent with the engineering environment. However, it is this consistency that makes it difficult to acquire the running state of the program in real time. Because of the many intermediate states of program operation, such as intermediate data interacted between CPU and memory during program operation, the on-board computer of the engineering environment will not save all states, and typically only the final data or communication data is monitored. The working frequency of the vehicle-mounted computer cannot be accelerated, real-time processing playback is difficult, if a certain scene needs to be reproduced, the original state needs to be reset, and each function has long debugging and testing time. Meanwhile, the vehicle-mounted computer belongs to a special computer carrying a real-time operating system, so that the customization price is higher, the maintenance amount of debugging and testing is smaller, and the production capacity is further improved.
Another is to migrate the train control program to a general purpose computer-installed non-real time operating system, such as a personal computer (PC, personal Computer), etc. The method has lower debugging and testing cost and plays a certain role in function verification, but the time delay is different from that of an actual vehicle-mounted computer, so that the reason for transplanting or the reason for realizing the function is difficult to determine, and the method brings trouble.
In conclusion, the existing train control program has the defects of high cost, poor economy and the like.
Disclosure of Invention
The application provides a method and a device for testing a train control program based on a general purpose computer, which are used for solving the defect of poor economy of the train control program test in the prior art and realizing the reduction of the cost of the train control program test.
The application provides a method for testing train control program based on general purpose computer, which is used for installing general purpose computer of non-real time operation system, comprising:
receiving initial parameters input by a user;
running a simulator installed by the general-purpose computer, loading the train control program in the simulator, and calculating based on the initial parameters to obtain a test result of the train control program;
the scheduling mode and the processing time sequence of the train control program when running in the simulator are the same as those when running on the vehicle-mounted computer.
According to the method for testing the train control program based on the general purpose computer, the simulator installed by the general purpose computer is operated, the train control program is loaded in the simulator, calculation based on the initial parameters is carried out, and a test result of the train control program is obtained, and the method comprises the following steps:
running the simulator, loading the train control program in the simulator, and converting a first instruction of the train control program into a second instruction with the same function as the first instruction;
and executing the second instruction, and calculating based on the initial parameters to obtain the test result.
According to the method for testing the train control program based on the general purpose computer provided by the application, after executing the second instruction and calculating the initial parameters, the method further comprises the following steps:
the intermediate state of the calculation is obtained and stored.
According to the method for testing the train control program based on the general purpose computer, which is provided by the application, after the calculated intermediate state is obtained and stored, the method further comprises the following steps:
and displaying the intermediate state and the test result.
According to the method for testing the train control program based on the general purpose computer, the method for converting the first instruction of the train control program into the second instruction with the same function as the first instruction comprises the following steps:
determining a second instruction which is identical to the first instruction based on the function of the first instruction;
converting the first instruction into the second instruction.
According to the method for testing the train control program based on the general purpose computer, the initial parameters comprise a first multiple and parameters of a test scene;
the first multiple is a multiple of the working frequency of the CPU simulated by the simulator compared with the working frequency of the CPU of the vehicle-mounted computer; the first multiple is greater than 1.
The application also provides a testing device of the train control program based on the general-purpose computer, which is used for installing the general-purpose computer of the non-real-time operating system and comprises the following components:
the receiving module is used for receiving initial parameters input by a user;
the simulation module is used for running the simulator installed by the general-purpose computer, calculating based on the initial parameters and obtaining the test result of the train control program;
the simulator is used for simulating the train control program.
The application also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the method for testing the train control program based on the general purpose computer when executing the program.
The present application also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of testing a general purpose computer based train control program as described in any one of the above.
The application also provides a computer program product comprising a computer program which when executed by a processor implements a method of testing a general purpose computer based train control program as described in any one of the above.
According to the method and the device for testing the train control program based on the general purpose computer, the train control program is tested by utilizing the computing resources of the general purpose computer, so that the cost of testing can be reduced, the cost is lower, multiple tests can be simultaneously performed, and the economy is better. And the processing time sequence of the simulator is consistent with that of the vehicle-mounted computer, and after the test is completed on the simulator, the simulator can be seamlessly transferred into engineering use, so that the stability is higher.
Drawings
In order to more clearly illustrate the application or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the application, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for testing a train control program based on a general purpose computer;
FIG. 2 is a workflow diagram of a method for testing a general purpose computer-based train control program provided by the present application;
FIG. 3 is a workflow diagram of a core process in the method for testing a general purpose computer-based train control program provided by the present application;
fig. 4 is a schematic structural diagram of a test device for a train control program based on a general-purpose computer according to the present application;
fig. 5 is a schematic structural diagram of an electronic device provided by the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of embodiments of the present application, the terms "first," "second," "third," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance and not order.
The following describes a method and a device for testing a train control program based on a general purpose computer with reference to fig. 1 to 5.
Fig. 1 is a flow chart of a testing method of a train control program based on a general purpose computer. As shown in fig. 1, an execution subject of a method for testing a train control program based on a general purpose computer according to an embodiment of the present application may be a test device for testing a train control program based on a general purpose computer, where the method is used for installing a general purpose computer of a non-real-time operating system, and the method includes: step 101 and step 102.
The embodiment of the application utilizes the stronger hardware capability of the general-purpose computer with the non-real-time operating system to simulate the processing of the special-purpose computer with strong real-time performance and lower processing speed at higher processing speed.
Step 101, receiving initial parameters input by a user.
Specifically, the initial parameters are parameters required for testing the train control program.
Alternatively, the initial parameters may include a first multiple and parameters of the test scenario.
The first multiple is a multiple of the working frequency of the CPU simulated by the simulator compared with the working frequency of the CPU of the vehicle-mounted computer; the first multiple is greater than 1.
Step 102, running a simulator installed by a general computer, loading a train control program in the simulator, and calculating based on initial parameters to obtain a test result of the train control program; the scheduling mode and the processing time sequence of the train control program when running in the simulator are the same as those when running on the vehicle-mounted computer.
Specifically, when the train control software runs on the simulator of the vehicle-mounted computer, the scheduling mode and the processing time sequence are consistent with those of the original vehicle-mounted computer, so that the train control software is simulated to run in a non-real-time operating system, and the train control software is not directly transplanted to the general-purpose computer.
The simulator is used for loading and running the train control program, so that calculation based on initial parameters can be performed, and a test result of the train control program can be obtained.
According to the embodiment of the application, the train control program is tested by utilizing the computing resource of the general-purpose computer, so that the cost of the test can be reduced, the cost is lower, a plurality of tests can be simultaneously carried out, and the economy is better. And the processing time sequence of the simulator is consistent with that of the vehicle-mounted computer, and after the test is completed on the simulator, the simulator can be seamlessly transferred into engineering use, so that the stability is higher.
Based on the foregoing any of the embodiments, running a simulator installed by a general-purpose computer, loading a train control program in the simulator, performing calculation based on initial parameters, and obtaining a test result of the train control program, including: and running a simulator, loading a train control program in the simulator, and converting a first instruction of the train control program into a second instruction with the same function as the first instruction.
Specifically, the capability of real-time scheduling of the vehicle-mounted computer can be realized by utilizing the multithreading, multiprocessing and various storage sharing modes of the non-real-time operating system of the general-purpose computer, and instruction conversion can be performed.
Alternatively, the simulation calculation may be accomplished by converting the first instruction of the original binary program (i.e., the train control program) into the second instruction of the general-purpose computer by the simulator
And executing a second instruction, performing calculation based on the initial parameters, and obtaining a test result.
Specifically, by executing the second instruction, the same function as the first instruction can be realized, so that calculation based on the initial parameters can be performed, and the test result can be obtained.
Based on the foregoing any of the embodiments, executing the second instruction, after performing the calculation based on the initial parameter, further includes: the intermediate state of the calculation is obtained and stored.
Specifically, the intermediate state of the train control program operation can be acquired in real time through simulation, so that the state of each step of processing of the train control program is monitored and used as the acquired intermediate state.
Optionally, the intermediate states of train control program processing, calculation and communication can be stored by utilizing the advantage of more calculation resources of the general-purpose computer.
Optionally, the state can be monitored in real time, playback, speed regulation playback and single-step playback can be performed on the basis of the state, the fault processing speed is increased, meanwhile, a report can be automatically generated, the automation level of the test is improved, and the usability is outstanding.
Based on the content of any of the above embodiments, after acquiring and storing the calculated intermediate state, the method further includes: and displaying the intermediate state and the test result.
Specifically, after the calculated intermediate state is obtained, the intermediate state and the test result may be displayed so that the worker knows the result of the process of testing the train control program.
Based on the content of any of the above embodiments, converting a first instruction of a train control program into a second instruction having the same function as the first instruction includes: based on the function of the first instruction, a second instruction that is identical to the function of the first instruction is determined.
Specifically, for each first instruction, a second instruction that is the same as the first instruction in the second instructions of the non-real-time operating system may be determined based on the function of the first instruction.
The first instruction is converted into a second instruction.
Specifically, a first instruction for executing the train control program is converted into a second instruction having the same function as the first instruction.
In order to facilitate the understanding of the above embodiments of the present application, the implementation of the method for testing a train control program based on a general purpose computer will be described by way of an example.
Fig. 2 is a workflow diagram of a method for testing a train control program based on a general purpose computer provided by the present application. The test method of the train control program based on the general purpose computer can be realized based on the non-real-time operating system multithreading, multiprocessing and various storage sharing modes of the general purpose computer so as to simulate the real-time scheduling capability of the vehicle-mounted computer.
Illustratively, the general-purpose computer CPU has a single core computing performance that is 10 times that of the vehicle-mounted computer CPU.
Illustratively, the number of general purpose computer cores may be 4 or 8 or 16 or more.
Illustratively, as shown in fig. 2, the simulator operates in a multi-process manner, including an interaction process, a management process, a data process, a display process, an acquisition process, and a core process;
the interaction process is responsible for setting various parameters, setting working modes and the like, and can automatically set contents to other processes according to the planned tasks, so that the interaction process is the input of simulator man-machine interaction.
And managing a process high-precision time shaft, and responsible for multi-process scheduling execution, and setting a time system for other processes according to the working frequency set by the interactive process.
The data process provides access to the data state, responds to the operating frequency set by the management process, performs data processing according to the operating frequency requirements, and responds to commands for data storage specified by the interactive process.
The display process is responsible for drawing a real-time curve or other real-time information according to the real-time data of the data process, the process only needs to reflect the whole content of the data process in one direction, the set command of the interaction process and the clock setting of the management process are the output of the human-computer interaction of the simulator, and the process can be set to be not started by the management process.
The acquisition process generates simulation data according to the working mode appointed by the interaction process, responds to the data frequency of the management process, and transfers the generated data to the data process.
The core process is used for loading the target binary program of the vehicle-mounted computer, processing according to the working frequency set by the management process, receiving the data input by the acquisition process of the data process, and transferring the intermediate data state calculated by the target binary program into the data process, wherein the intermediate data state not only comprises the calculation result, but also can store various intermediate working states, and can accept the interaction process command, thereby realizing the functions of suspending, stopping, loading the intermediate state operation and the like.
Fig. 3 is a workflow diagram of a core process in the method for testing a train control program based on a general-purpose computer provided by the application. The workflow of the core process may be as shown in fig. 3.
The above is a way of interaction between the main functions of the process and the process, wherein the core process is more complicated to process due to the need to load the target binary program.
The core process simulates various driving response programs and is used for simulating original hardware equipment which needs to be checked and interacted when a target binary program of the vehicle-mounted computer runs, and the original hardware equipment comprises a computing device, a speed measuring device, a storage device, a communication device, a clock device and the like.
The core process simulation peripheral is a peripheral simulating the vehicle-mounted computer, and the storage and communication processes of the target binary program data interaction are converted into the interaction of the data process, so that the scheduling operation of the vehicle-mounted computer is simulated.
The core process simulation calculation is to simulate the CPU calculation process of the vehicle-mounted computer, and convert the instruction of the target binary program to the vehicle-mounted computer into the instruction of the general computer system, so as to realize the calculation of the simulated vehicle-mounted computer.
In the process, the core process receives the working frequency set by the management process, so that the instruction conversion time is adjusted, and the response speed of the analog peripheral is adjusted, so that the multi-speed processing is realized.
For example, the process of a single test may include the steps of:
loading a train control program of a certain version by the simulator;
the working scene is stop-in and stop-off, and the first multiple is set to be 5 times;
the version adds the linkage shielding door treatment for the station entering and stopping functions;
the interaction process sets the working scene to be 1km in advance, and sets the first multiple to be 5 times after passing through 3 sections, two annunciators and four transponders;
the management process receives 5 times of the interactive process setting, starts all other processes, sets the working frequency to the other processes, and determines that the processes needing to be started are started;
starting a data process, starting an acquisition process, setting the distance to be moved of a train according to the setting of an interaction process, setting the number and the positions of annunciators and setting the number and the positions of transponders;
the display process is started to display the set parameters, the train position, the corresponding operation parameters and the like
The core process is started, the train control program of the version is loaded, and the core process converts a self-checking instruction of the train control program into an instruction for checking the starting of related simulation equipment;
after the related devices are started, the core process converts the communication instruction of the train control program into a data process interaction instruction, and information such as a map simulation position, a simulation speed value and the like is obtained;
the core process converts the self processing logic of the train control program into a general calculation instruction to carry out relevant cycle check;
the core process converts the output instruction of the train control program into a data process interaction instruction and outputs the internal state to the data process;
it should be noted that, because the first multiple is set to be 5 times, the running speed of the process is 5 times that of the original process;
the simulator is faster than the running speed on an actual vehicle-mounted computer by 5 times, the acquisition speed is also faster by 5 times, the moving speed is provided by the simulation speed measurement, and the acceleration and the deceleration are both improved by 5 times;
logic added by a train control program can be converted into a mode that a group of shielding gate states are acquired for a data process, and other processes are similar;
the core process converts and sends various intermediate states of the train control program to the data process;
assuming that suspension is needed, the core process stops processing, the intermediate state is saved, if the intermediate state needs to be continued, the intermediate state is restored, and the processing after the completion of the content saved by the data process is completed;
if the state of the shielding door is set to be open through the interactive program, after the train control program runs, the shielding door is found to be not normally closed, other processing is caused, the state can be sent to a data process, and an electronic report is formed by the specification of the interactive process, so that the added function of the train control program is determined to be effective;
if the state of the shielding door is set to be open through the interactive program, after the train control program runs, the shielding door is found to be not normally closed and is not subjected to corresponding processing, the state can be sent to a data process, and an electronic report is formed through the specification of the interactive process, so that the abnormal function of the train control program is determined.
The following describes a test device for a train control program based on a general purpose computer, and the test device for the train control program based on the general purpose computer and the test method for the train control program based on the general purpose computer described below can be referred to correspondingly.
Fig. 4 is a schematic diagram of a structure of a test device for a train control program based on a general-purpose computer. Based on the foregoing, as shown in fig. 4, the apparatus is used for installing a general-purpose computer of a non-real-time operating system, and the apparatus may include a receiving module 401 and an analog module 402, where:
a receiving module 401, configured to receive an initial parameter input by a user;
the simulation module 402 is used for running a simulator installed by a general-purpose computer, calculating based on initial parameters, and obtaining a test result of a train control program;
the simulator is used for simulating a train control program.
In particular, the receiving module 401 and the analog module 402 may be electrically connected.
Optionally, the simulation module 402 may include:
the switching unit is used for running a simulator, loading a train control program in the simulator and switching a first instruction of the train control program into a second instruction with the same function as the first instruction;
and the execution unit is used for executing the second instruction, calculating based on the initial parameters and acquiring a test result.
Optionally, the simulation module 402 may further include:
and the acquisition unit is used for acquiring and storing the calculated intermediate state.
Optionally, the apparatus may further include:
and the display module is used for displaying the intermediate state and the test result.
Alternatively, the conversion unit may include:
a determining subunit configured to determine, based on the function of the first instruction, a second instruction that is identical to the function of the first instruction;
and the conversion subunit is used for converting the first instruction into the second instruction.
According to the method for testing the train control program based on the general purpose computer, the initial parameters comprise a first multiple and parameters of a test scene;
the first multiple is a multiple of the working frequency of the CPU simulated by the simulator compared with the working frequency of the CPU of the vehicle-mounted computer; the first multiple is greater than 1.
The test device for the train control program based on the general computer provided by the embodiment of the application is used for executing the test method for the train control program based on the general computer, the implementation mode of the test device is consistent with the implementation mode of the test method for the train control program based on the general computer provided by the application, and the same beneficial effects can be achieved, and the detailed description is omitted.
The test device of the train control program based on the general purpose computer is used for the test method of the train control program based on the general purpose computer of each embodiment. Therefore, the description and definition in the test method of the train control program based on the general-purpose computer in the foregoing embodiments can be used for understanding each execution module in the embodiments of the present application.
Embodiments of the application
Fig. 5 is a schematic structural diagram of an electronic device according to the present application, and as shown in fig. 5, the electronic device may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a method of testing a general purpose computer-based train control program, the method comprising: receiving initial parameters input by a user; running a simulator installed by a general computer, loading a train control program in the simulator, and calculating based on initial parameters to obtain a test result of the train control program; the scheduling mode and the processing time sequence of the train control program when running in the simulator are the same as those when running on the vehicle-mounted computer.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The processor 510 in the electronic device provided by the embodiment of the present application may call the logic instruction in the memory 530, and its implementation manner is consistent with the implementation manner of the test method of the train control program based on the general purpose computer provided by the present application, and may achieve the same beneficial effects, which are not described herein again.
In another aspect, the present application also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method of testing a general purpose computer based train control program provided by the methods described above, the method comprising: receiving initial parameters input by a user; running a simulator installed by a general computer, loading a train control program in the simulator, and calculating based on initial parameters to obtain a test result of the train control program; the scheduling mode and the processing time sequence of the train control program when running in the simulator are the same as those when running on the vehicle-mounted computer.
When the computer program product provided by the embodiment of the application is executed, the method for testing the train control program based on the general purpose computer is realized, the specific implementation mode of the method is consistent with the implementation mode recorded in the embodiment of the method, and the same beneficial effects can be achieved, and the detailed description is omitted herein.
In yet another aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon a computer program which when executed by a processor is implemented to perform the above-provided method of testing a general purpose computer-based train control program, the method comprising: receiving initial parameters input by a user; running a simulator installed by a general computer, loading a train control program in the simulator, and calculating based on initial parameters to obtain a test result of the train control program; the scheduling mode and the processing time sequence of the train control program when running in the simulator are the same as those when running on the vehicle-mounted computer.
When the computer program stored on the non-transitory computer readable storage medium provided by the embodiment of the application is executed, the method for testing the train control program based on the general purpose computer is realized, and the specific implementation manner is consistent with the implementation manner recorded in the embodiment of the method, and the same beneficial effects can be achieved, and the detailed description is omitted herein.
The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present application without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product, which may be stored in a computer-readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the various embodiments or methods of some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method for testing a train control program based on a general purpose computer for installing a non-real time operating system, comprising:
receiving initial parameters input by a user;
running a simulator installed by the general-purpose computer, loading the train control program in the simulator, and calculating based on the initial parameters to obtain a test result of the train control program;
the scheduling mode and the processing time sequence of the train control program when running in the simulator are the same as those when running on the vehicle-mounted computer.
2. The method for testing a train control program based on a general purpose computer according to claim 1, wherein the running the simulator installed by the general purpose computer, loading the train control program in the simulator, performing calculation based on the initial parameters, and obtaining a test result of the train control program, comprises:
running the simulator, loading the train control program in the simulator, and converting a first instruction of the train control program into a second instruction with the same function as the first instruction;
and executing the second instruction, and calculating based on the initial parameters to obtain the test result.
3. The method for testing a general-purpose computer-based train control program according to claim 2, wherein the executing the second instruction, after performing the calculation based on the initial parameters, further comprises:
the intermediate state of the calculation is obtained and stored.
4. The method for testing a general-purpose computer-based train control program according to claim 3, further comprising, after acquiring and storing the calculated intermediate state:
and displaying the intermediate state and the test result.
5. The method for testing a general-purpose computer-based train control program according to claim 2, wherein the converting a first instruction of the train control program into a second instruction having the same function as the first instruction comprises:
determining a second instruction which is identical to the first instruction based on the function of the first instruction;
converting the first instruction into the second instruction.
6. The method of testing a general purpose computer based train control program according to any one of claims 1 to 5, wherein the initial parameters include a first multiple and parameters of a test scenario;
the first multiple is a multiple of the working frequency of the CPU simulated by the simulator compared with the working frequency of the CPU of the vehicle-mounted computer; the first multiple is greater than 1.
7. A test device for a train control program based on a general purpose computer for installing a non-real time operating system, comprising:
the receiving module is used for receiving initial parameters input by a user;
the simulation module is used for running the simulator installed by the general-purpose computer, calculating based on the initial parameters and obtaining the test result of the train control program;
the simulator is used for simulating the train control program.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements a method of testing a general purpose computer based train control program according to any one of claims 1 to 6.
9. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the method of testing a general purpose computer based train control program according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements a method for testing a general-purpose computer-based train control program according to any one of claims 1 to 6.
CN202310701601.4A 2023-06-13 2023-06-13 Method and device for testing train control program based on general purpose computer Pending CN116909879A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310701601.4A CN116909879A (en) 2023-06-13 2023-06-13 Method and device for testing train control program based on general purpose computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310701601.4A CN116909879A (en) 2023-06-13 2023-06-13 Method and device for testing train control program based on general purpose computer

Publications (1)

Publication Number Publication Date
CN116909879A true CN116909879A (en) 2023-10-20

Family

ID=88357191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310701601.4A Pending CN116909879A (en) 2023-06-13 2023-06-13 Method and device for testing train control program based on general purpose computer

Country Status (1)

Country Link
CN (1) CN116909879A (en)

Similar Documents

Publication Publication Date Title
CN112817872A (en) Development test system and method
CN114415630B (en) Comprehensive test platform and method for airplane management system
CN105573296A (en) Hardware-in-loop-based automation test system for automobile diagnosis, and method thereof
CN109813999B (en) Automatic test platform, method and application of power distribution network fault diagnosis algorithm
CN110704323B (en) Automatic data testing method and device based on rail transit line data
CN104750603A (en) Multi-core DSP (Digital Signal Processor) software emulator and physical layer software testing method thereof
CN107944193A (en) Avionics semi-matter simulating system
CN113221362B (en) Satellite launching field performance test subject purpose selection method and device and electronic equipment
CN115757167A (en) Intelligent driving software integration test deployment method, device, equipment and medium
CN116956790A (en) Simulation verification method, device, equipment and medium
CN109359803B (en) Reliability evaluation method and device
CN109932588A (en) A kind of Aerial Electronic Equipment validation test engine
CN103399813B (en) A kind of embedded system off-line trace analysis method based on Trace information
CN116909879A (en) Method and device for testing train control program based on general purpose computer
Wang et al. Cloud-based simulated automated testing platform for virtual coupling system
CN113726549B (en) Simulation method and device for computer interlocking system of high-speed railway and storage medium
CN107329869B (en) Simulation method and device of system on chip
CN115291585A (en) Method for acquiring fault data of VCU and related device
CN108873735B (en) Power distribution main station system component simulation test device and method
Zhang et al. Testing method of integrated modular avionics health monitoring
CN111258827B (en) Interface model determining method and device, electronic equipment and storage medium
Francois New approaches in virtualization of ECU software development
CN116069504B (en) Scheduling method and device for multi-core processor in automatic driving simulation
CN114692382B (en) Management method and device for nuclear power simulation model development data and computer equipment
CN115326406A (en) Vehicle RDE emission testing method, system, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination