Simulation test message manufacturing method based on rail transit industry signal equipment
The method and device improve maintenance efficiency in simulation test message manufacturing by using a message module to generate and manage simulation messages across multiple protocols and formats, addressing the inefficiencies of manual source code updates.
Patent Information
- Application Number
- CN202411130128.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2025-01-03
AI Technical Summary
The existing simulation test message manufacturing methods in the rail transit industry suffer from low maintenance efficiency, particularly when interface protocols change, requiring manual source code updates by script users.
A method and device that utilize a message module to define and store frame structures, generate simulation messages based on a target frame structure, read and overwrite message content using a text file, and output messages to a command line interface, supporting multiple protocols and formats to improve maintenance efficiency.
Enhances maintenance efficiency by allowing flexible configuration and automatic message generation, supporting multiple protocols and formats, and simplifying the process of updating interface protocols.
Smart Images

Figure CN119247916A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of simulation test technology, and in particular to a method for manufacturing simulation test messages based on signal equipment in rail transit industry. Background Art
[0002] The signal equipment simulation test message manufacturing tool mainly uses a program editing language to edit messages. In view of the needs of signal systems with multiple communication protocols, multiple types and multiple formats of messages, the signal message sending needs of different communication protocols can be realized by configuring the messages.
[0003] However, in the related art, when performing signal equipment simulation testing, messages are usually edited through a program editing language or manually generated. When the interface protocol changes, script users need to actively maintain the source code, which is inconvenient for others to maintain.
[0004] It can be seen that the simulation test message manufacturing method in the related art has the technical problem of low maintenance efficiency. Summary of the invention
[0005] The present invention provides a method for manufacturing a simulation test message based on a signal device in the rail transit industry, so as to solve the defect of low maintenance efficiency in the simulation test message manufacturing method in the prior art, meet various types of message manufacturing needs of different users, and improve message maintenance efficiency.
[0006] The present invention provides a method for manufacturing a simulation test message based on a signal device in the rail transit industry, comprising the following steps: Inputting a target frame structure into a preset message module, wherein the message module is used to define and store frame structures of different protocols and different types; generating a simulation message of the target frame structure according to the output table of the message module based on the target frame structure; reading the simulation message and the input message of the console of the command line interface through a preset text file; when the simulation message has been read in the text file and the input message is a non-null value, overwriting the keyword content of the simulation message based on the keyword content of the input message to obtain a first simulation test message, wherein the format type of the first simulation test message is the target frame structure; outputting the first simulation test message to the console of the command line interface, wherein the first simulation test message includes actual message content and frame structure annotations.
[0007] According to a method for manufacturing a simulation test message based on rail transit industry signal equipment provided by the present invention, the configuration information of the message module includes at least one of the following: byte length, loop body type, message name, input message priority, comments, message name type and loop body information.
[0008] According to a method for manufacturing a simulation test message based on rail transit industry signal equipment provided by the present invention, before generating a simulation message of a target frame structure based on the target frame structure according to the output table of the message module, the method also includes: generating an output table based on the target frame structure according to a preset template of the message module, wherein the default value of the output table is listed as the message value displayed by the console of the command line interface, and the default value of the output table is the first value of the loop body information.
[0009] According to a method for manufacturing simulation test messages based on rail transit industry signal equipment provided by the present invention, after reading the simulation message and the input message of the console of the command line interface through a preset text file, the method also includes: when the simulation message is not read in the text file, determining the input message of the console of the command line interface; when the input message is a non-null value, overwriting the simulation message based on the input message as a second simulation test message; and outputting the second simulation test message to the console of the command line interface.
[0010] According to a method for manufacturing simulation test messages based on signal equipment in the rail transit industry provided by the present invention, after determining the input message of the console of the command line interface, the method also includes: when the input message is a null value, determining whether the default value column of the output table is a null value; when the default value column of the output table is a null value, generating a default value based on the number of bytes of the input message to overwrite the simulation message to obtain a third simulation test message, and outputting the third simulation test message to the console of the command line interface; when the default value column of the output table is a non-null value, overwriting the simulation message based on the default value column of the output table to obtain a fourth simulation test message, and outputting the fourth simulation test message to the console of the command line interface.
[0011] According to a method for manufacturing a simulation test message based on a rail transit industry signaling device provided by the present invention, after reading the simulation message and the input message of the console of the command line interface through a preset text file, the method also includes: when the simulation message has been read in the text file and the input message is a null value, outputting the simulation message as the fifth simulation test message to the console of the command line interface.
[0012] The present invention also provides a simulation test message manufacturing device based on rail transit industry signal equipment, comprising the following modules: An input module, used to input a target frame structure into a preset message module, wherein the message module is used to define and store different protocols and different types of frame structures; a generation module, used to generate a simulation message of a target frame structure based on the target frame structure and according to an output table of the message module; a reading module, used to read the simulation message and an input message of a console of a command line interface through a preset text file; an overwriting module, used to overwrite the keyword content of the simulation message based on the keyword content of the input message when the simulation message has been read in the text file and the input message is a non-null value, to obtain a first simulation test message, wherein the format type of the first simulation test message is the target frame structure; an output module, used to output the first simulation test message to the console of the command line interface, wherein the first simulation test message includes actual message content and frame structure annotations.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the above-described methods for manufacturing simulation test messages based on signal equipment in the rail transit industry.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for manufacturing a simulation test message based on signal equipment in the rail transit industry as described in any one of the above is implemented.
[0015] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for manufacturing simulation test messages based on signal equipment in the rail transit industry.
[0016] The present invention provides a method for manufacturing simulation test messages based on rail transit industry signal equipment. The method uses a target frame structure as input to define and store message modules of different protocols and different types, and generates a simulation message of the target frame structure according to an output table of the message module, thereby enabling subsequently generated messages to meet the target frame structure; the simulation message and the user input message in the console of the command line interface are read through a preset text file, and when the simulation message is read and the input message is a non-null value, the corresponding keyword content of the simulation message is overwritten by the keyword content of the input message to obtain a first simulation message with the same target frame structure, and the first simulation message is returned to the console of the command line interface, thereby satisfying the various types of message manufacturing needs of different users, thereby solving the technical problem of low maintenance efficiency in the simulation test message manufacturing method in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is a flow chart of a method for manufacturing a simulation test message based on signal equipment in the rail transit industry provided by the present invention.
[0019] Figure 2 It is a schematic diagram of the main components of the message creation tool provided by the present invention.
[0020] Figure 3 It is a schematic diagram of a template of an output table of a message module provided by the present invention.
[0021] Figure 4 It is a processing flow chart of the message manufacturing tool provided by the present invention.
[0022] Figure 5 It is a diagram showing the effect of simulating a signal message by the message manufacturing tool provided by the present invention.
[0023] Figure 6 It is a structural schematic diagram of a simulation test message manufacturing device based on rail transit industry signal equipment provided by the present invention.
[0024] Figure 7 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] The signal equipment simulation test message manufacturing tool mainly uses Python3.10 (a programming language for writing scripts and rapidly developing applications). In view of the needs of signal systems with multiple communication protocols, multiple types and multiple formats of messages, by configuring the message module (Message Module), the signal message sending needs of different communication protocols can be realized; by configuring the "circulateType", "name", "defaultValue" and other values in the message module table, messages of various formats and types can be realized; by modifying the content of the message module, the messages that need to be changed when the interface protocol is upgraded can be realized.
[0027] However, currently, when conducting signal equipment simulation tests, Python and Pycharm (a Python integrated development environment) are used or messages are manually generated. When the interface protocol changes, script users need to actively maintain the source code, which is inconvenient for others to maintain.
[0028] In the embodiment of the present invention, the signal equipment simulation test message manufacturing tool can flexibly input various types of interface protocol frame formats (frame structures), realize the usability requirements of signal messages of different protocols, realize the requirements of different people maintaining interface protocol upgrade scripts, and improve test efficiency. The tool mainly uses Python programming language to process business logic, and writes the front-end interface through EXCEL table to manufacture signal messages, wherein the signal equipment simulation test message manufacturing tool mainly includes message module, output table, input message and main application (main).
[0029] Figure 1 It is a flow chart of a method for manufacturing a simulation test message based on a signal device in the rail transit industry provided by the present invention, such as Figure 1 As shown, the method includes the following steps.
[0030] Step 101: input the target frame structure into a preset message module, wherein the message module is used to define and store different protocols and different types of frame structures.
[0031] In the embodiment of the present invention, the message module (messageModule) is used to define and configure the structure and attributes of the signal message and how they are mapped to modular components or configuration sets on different communication protocols.
[0032] Specifically, the message module includes communication protocol definition, message format and structure, data fields, dynamic configuration and expansion, and multi-protocol support.
[0033] The communication protocol definition is used to indicate the communication protocol (such as TCP / IP, UDP, etc.) that the message should follow and the specific parameters of the protocol (such as port number, baud rate, data packet format, etc.).
[0034] The message format and structure are used to define the format of the message, including the message start character, end character, checksum calculation method, data field location and type, etc. This part of information is usually configured through fields such as "circulateType" (indicating the circulation type or message type), "name" (field name or message name), and "defaultValue" (the default value of the field).
[0035] The data field lists the various data fields in the message in detail. Each field may contain information such as name, type (such as integer, floating point, string, Boolean value, etc.), length, whether it is required, and default value.
[0036] Dynamic configuration and expansion allow users to adjust the format and content of messages according to actual needs without modifying the core code of the tool.
[0037] Multi-protocol support By configuring different message modules for different communication protocols, the tool can support message generation under multiple communication protocols, thus meeting the complex and changing signal system testing needs.
[0038] In computer networks and data communications, frame structure refers to the organization and arrangement of the various components within a frame. A frame usually contains multiple parts, each of which has its own specific function and role, and together constitutes the overall structure of the frame. These parts may include a frame header, frame data, and a frame trailer, among which the frame header contains control information, such as the start identifier of the frame, frame length, source address, destination address, etc. The frame data contains the actual data that the user needs to transmit. The frame trailer contains information such as the checksum and frame end identifier to ensure the integrity and correctness of the data.
[0039] Step 102: Generate a simulated message of the target frame structure based on the target frame structure according to the output table of the message module.
[0040] In an embodiment of the present invention, the message module part includes inputting different protocols, different types of structures (frame formats), configuring byte length, loop body type, name, input message priority, comments, name type, judging whether the loop body is incremented, and other information.
[0041] In the output table, a table will be created according to the template of the message module, and the message value displayed in the console of the command line interface will be used as the defaultValue column of this table. The loop body only takes the value of the first loop body as the default value of the output table. And based on the target frame structure and the output table of the message module, a simulated message of the target frame structure is generated.
[0042] Through the embodiments of the present invention, it is possible to implement switching operations among multiple protocols (UDP, TCP Server, TCP Client) based on simulated messages of a target frame structure.
[0043] Step 103, reading the simulation message and the input message of the console of the command line interface through a preset text file.
[0044] Step 104, when the simulated message has been read from the text file and the input message is a non-empty value, the keyword content of the simulated message is overwritten based on the keyword content of the input message to obtain a first simulated test message, wherein the format type of the first simulated test message is a target frame structure.
[0045] refer to Figure 2 , Figure 2 It is a schematic diagram of the main components of the message creation tool provided by the present invention, which includes a main application (main.exe), a message module (messageModule.xlsx), an input message (txt), an output table (xlsx) and instructions for use (txt).
[0046] In an embodiment of the present invention, when a simulated message has been read from a text file (txt) and the input message (txt) is a non-empty value, Python programming technology is used to modify the input message, realize the interaction between the message module and the background (for example, a text file), and overwrite the keyword content of the simulated message based on the keyword content of the input message to obtain a first simulated test message and realize the business processing of the input message and the need for console output message parsing.
[0047] Step 105: output the first simulation test message to the console of the command line interface, wherein the first simulation test message includes actual message content and frame structure annotations.
[0048] In the embodiment of the present invention, a console interface is popped up by running a preset main application (main.exe) to output a manufactured or parsed signal message (ie, a first simulation test message).
[0049] Among them, the above-mentioned main application can be obtained by editing in Python, used to start the command line interface console, and output the manufactured or parsed signal message in the console. For example, the signal message can be a first simulation test message and an annotation of the frame structure corresponding to the first simulation test message, etc.
[0050] Through the embodiment of the present invention, message creation and message interpretation are realized and displayed on the console interface.
[0051] In the embodiment of the present invention, the above objective can be achieved through the following steps.
[0052] Step 1: Write the signal equipment simulation test message manufacturing tool requirements specification.
[0053] In the embodiments of the present invention, the functional requirements, performance requirements, user interface requirements, etc. of the tool are clarified, wherein the functional requirements are used to describe the protocols, frame structures, message creation and parsing functions, etc. that the tool needs to support. The performance requirements are used to define the tool's response time, processing speed, concurrency, etc. The user interface requirements are used to describe the front-end interface design, user interaction methods, etc.
[0054] Step 2: Write the design specification of the signal equipment simulation test message manufacturing tool.
[0055] In the embodiment of the present invention, according to the signal equipment simulation test message manufacturing tool requirement specification, the overall architecture, module division, interface definition, etc. of the tool are designed, wherein the system architecture design is used to describe the overall architecture of the tool, including the front end, back end, database, etc. The module division is used to clarify the specific responsibilities and interaction methods of the message module, output table, input message, main application, etc. The interface definition is used to define the interface specifications between modules and between the system and the external system.
[0056] Step 3: Build the project framework.
[0057] In the embodiment of the present invention, according to the signal device simulation test message manufacturing tool requirement specification, the basic framework of the project is built. For example, Python's virtual environment is used to manage dependencies. The project directory structure is built, including source code, test code, documents, etc.
[0058] Step 4: Encoding function implementation.
[0059] In the embodiment of the present invention, the functions of each module are implemented according to the signal equipment simulation test message manufacturing tool requirement specification, wherein the message module (messageModule) is used to implement the configuration, parsing and generation functions of the protocol and frame structure. The output table is used to generate an Excel table according to the configuration of the message module and fill in the default values. The input message is used to implement the function that the user modifies the message through the front-end interface and interacts with the background. The main application (main) is used to write the main program, start the console interface, process user input, and call other module functions.
[0060] Step 5: Submit the test to verify the functional logic.
[0061] In the embodiment of the present invention, test data is used to verify various functions of the tool to ensure that the functions of the tool meet the requirements, the performance is up to standard, and there are no major defects.
[0062] Step 6: Write the user instructions for the signal equipment simulation test message manufacturing tool and output the project results.
[0063] In the embodiment of the present invention, the user instructions are used to describe in detail the installation, configuration, usage, FAQs, etc. of the tool. The project output includes source code, executable files, documents (requirements specification, design specification, user instructions, test reports, etc.), demonstration videos, etc.
[0064] Through the above steps of the embodiment of the present invention, the target frame structure is input into a preset message module, wherein the message module is used to define and store different protocols and different types of frame structures; based on the target frame structure, a simulation message of the target frame structure is generated according to the output table of the message module; the simulation message and the input message of the console of the command line interface are read through a preset text file; when the text file has read the simulation message and the input message is a non-null value, the keyword content of the simulation message is overwritten based on the keyword content of the input message to obtain a first simulation test message, wherein the format type of the first simulation test message is the target frame structure; the first simulation test message is output to the console of the command line interface, wherein the first simulation test message includes the actual message content and the frame structure annotation. It can meet the various types of message manufacturing needs of different users, thereby solving the technical problem of low maintenance efficiency in the simulation test message manufacturing method in the related art.
[0065] According to a method for manufacturing a simulation test message based on signal equipment in the rail transit industry provided by the present invention, the configuration information of the message module includes at least one of the following: byte length, loop body type, message name, input message priority, comments, message name type and loop body information.
[0066] Among them, the message module part inputs different protocols, different types of frame structures, configures byte length, loop body type, name, input message priority, comments, name type, and determines whether the loop body is incremented.
[0067] In an embodiment of the present invention, byte length is used to indicate the byte size of each field in a frame. Protocol ID / name is used to identify different communication protocols. Loop body type is used to indicate whether there is a field part that needs to be repeated or looped, and the loop mode (such as a fixed number of times, until a certain condition is met, etc.). Input message priority is used to specify the priority of the message when multiple messages are processed simultaneously and need to be sorted. Comments indicate additional explanatory information about a field or frame. Message name type indicates further classification or type identification of the field name (such as integer, floating point number, string, etc.). Loop body increment indicates whether the value of each loop body needs to be incremented (and the rules for incrementing) for the loop body.
[0068] According to a method for manufacturing a simulation test message based on a rail transit industry signal device provided by the present invention, before generating a simulation message of a target frame structure according to an output table of a message module based on a target frame structure, the method further includes: Based on the target frame structure and according to the preset template of the message module, an output table is generated, wherein the default value of the output table is the message value displayed by the console of the command line interface, and the default value of the output table is the first value of the loop body information.
[0069] In the embodiment of the present invention, the command line interface may be an interactive interface of a programming language such as Python, etc., which is used to obtain message content for input.
[0070] refer to Figure 3 , Figure 3 It is a schematic diagram of a template of an output table of a message module provided by the present invention, which includes order, bytes, loop type, input message, default column value, note, dictionary, type, and isIncrease.
[0071] In the embodiment of the present invention, in the output table, a table will be established according to the template of messageModule, and the message value displayed in the console will be used as the defaultValue column of this table. The loop body only takes the value of the first loop body as the default value of the output table.
[0072] refer to Figure 4 , Figure 4 It is a processing flow chart of the message manufacturing tool provided by the present invention.
[0073] According to a method for manufacturing a simulation test message based on a rail transit industry signal device provided by the present invention, after reading the simulation message and the input message of the console of the command line interface through a preset text file, the method further includes: When no simulation message is read from the text file, an input message of the console of the command line interface is determined; When the input message is a non-null value, overwrite the simulated message based on the input message as the second simulated test message; Output the second simulation test message to the console of the command line interface.
[0074] like Figure 4 As shown, in the embodiment of the present invention, the message module (messageMoudule) is opened to input the frame structure, and the message is constructed according to the frame structure; then, it is determined whether the text file (txt) has read the message.
[0075] When the simulated message has been read in the text file and the input message is a non-empty value, the keyword content of the simulated message is overwritten based on the keyword content of the input message to obtain the first simulated test message, and the message (for example, the first simulated test message, etc.) and the annotations corresponding to the frame structure are output to the console.
[0076] When no simulation message is read in the text file, the input message (standMessage) of the console of the command line interface is determined; when the input message is a non-null value, the simulation message is overwritten based on the input message as a second simulation test message; the second simulation test message is output to the console of the command line interface.
[0077] According to a method for manufacturing a simulation test message based on a rail transit industry signal device provided by the present invention, after determining an input message of a console of a command line interface, the method further comprises: When the input message is a null value, determine whether the default value column of the output table is a null value; When the default value column of the output table is a null value, a default value overwriting simulation message is generated based on the number of bytes of the input message to obtain a third simulation test message, and the third simulation test message is output to the console of the command line interface; When the default value column of the output table is a non-empty value, the simulation message is overwritten based on the default value column of the output table to obtain a fourth simulation test message, and the fourth simulation test message is output to the console of the command line interface.
[0078] In an embodiment of the present invention, when no simulation message is read from the text file and the default value column of the output table is an empty value, a default value is generated based on the number of bytes of the input message to overwrite the simulation message, obtain a third simulation test message, and output the third simulation test message to the console of the command line interface.
[0079] When no simulation message is read from the text file and the default value column of the output table is a non-empty value, the simulation message is overwritten based on the default value column of the output table to obtain a fourth simulation test message, and the fourth simulation test message is output to the console of the command line interface.
[0080] According to a method for manufacturing a simulation test message based on a rail transit industry signal device provided by the present invention, after reading the simulation message and the input message of the console of the command line interface through a preset text file, the method further includes: When the simulated message has been read from the text file and the input message is a null value, the simulated message is output to the console of the command line interface as the fifth simulated test message.
[0081] refer to Figure 5 , Figure 5 It is a diagram showing the effect of simulating a signal message by the message manufacturing tool provided by the present invention.
[0082] In an embodiment of the present invention, a signal equipment simulation test message manufacturing tool mainly adopts Python3.10. In view of the needs of the signal system for multiple communication protocols, multiple types and multiple formats of messages, by configuring messageModule, the signal message sending needs of different communication protocols can be realized; by configuring the circulateType, name, defaultValue and other values in the messageModule table, messages of various formats and types can be realized; by modifying the content of messageModule, the messages that need to be changed when the interface protocol is upgraded can be realized.
[0083] Through the embodiments of the present invention, it is possible to support the switchability of UDP protocol and TCP protocol (Tcp Server, Tcp Client) message manufacturing; support copying the content in the console to a txt file for modification, support modifying a single message in a txt file; support inputting messages in a txt file and displaying them on an interface; support generating corresponding messages according to a frame structure.
[0084] In summary, the embodiments of the present invention implement the support of multiple protocols (UDP, TCP Server, TCP Client). One tool meets the message manufacturing needs of multiple protocols; it supports the input of messages with multiple frame structures to meet the message parsing needs; testers use it for product and engineering line testing, which greatly improves the test efficiency; testers of different levels are easier to maintain when the interface protocol is upgraded; R&D personnel use the tool to perform self-manufacturing and self-testing of messages and message parsing during the product development stage.
[0085] The following describes the simulation test message manufacturing device based on the rail transit industry signal equipment provided by the present invention. The simulation test message manufacturing device based on the rail transit industry signal equipment described below and the simulation test message manufacturing method based on the rail transit industry signal equipment described above can be referenced to each other.
[0086] refer to Figure 6 , Figure 6 It is a structural schematic diagram of a simulation test message manufacturing device based on rail transit industry signal equipment provided by the present invention, which includes: an input module 601, a generation module 602, a reading module 603, a coverage module 604 and an output module 605.
[0087] An input module 601 is used to input the target frame structure into a preset message module, wherein the message module is used to define and store frame structures of different protocols and different types; A generating module 602, configured to generate a simulated message of a target frame structure based on the target frame structure according to an output table of a message module; The reading module 603 is used to read the simulation message and the input message of the console of the command line interface through a preset text file; The overwriting module 604 is used to overwrite the keyword content of the simulated message based on the keyword content of the input message when the simulated message has been read into the text file and the input message is a non-null value, so as to obtain a first simulated test message, wherein the format type of the first simulated test message is a target frame structure; The output module 605 is used to output the first simulation test message to the console of the command line interface, wherein the first simulation test message includes actual message content and frame structure annotations.
[0088] Specifically, the above-mentioned simulation test message manufacturing device based on rail transit industry signal equipment provided by the present invention can implement all the method steps implemented by the above-mentioned simulation test message manufacturing method embodiment based on rail transit industry signal equipment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0089] Figure 7is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 7 As shown, the electronic device may include: a processor (processor) 710 , a communication interface (Communications Interface) 720 , a memory (memory) 730 and a communication bus 740 , wherein the processor 710 , the communication interface 720 , and the memory 730 communicate with each other through the communication bus 740 . The processor 710 can call the logic instructions in the memory 730 to execute a simulation test message manufacturing method based on the rail transit industry signal equipment, the method comprising: inputting the target frame structure into a preset message module, wherein the message module is used to define and store different protocols and different types of frame structures; generating a simulation message of the target frame structure according to the output table of the message module based on the target frame structure; reading the simulation message and the input message of the console of the command line interface through a preset text file; when the simulation message has been read in the text file and the input message is a non-null value, overwriting the keyword content of the simulation message based on the keyword content of the input message to obtain a first simulation test message, wherein the format type of the first simulation test message is the target frame structure; outputting the first simulation test message to the console of the command line interface, wherein the first simulation test message includes actual message content and frame structure annotations.
[0090] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0091] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the simulation test message manufacturing method based on the rail transit industry signal equipment provided by the above methods, the method including: inputting the target frame structure into a preset message module, wherein the message module is used to define and store different protocols and different types of frame structures; based on the target frame structure, generating a simulation message of the target frame structure according to the output table of the message module; reading the simulation message and the input message of the console of the command line interface through a preset text file; when the simulation message has been read in the text file and the input message is a non-null value, overwriting the keyword content of the simulation message based on the keyword content of the input message to obtain a first simulation test message, wherein the format type of the first simulation test message is the target frame structure; outputting the first simulation test message to the console of the command line interface, wherein the first simulation test message includes actual message content and frame structure annotations.
[0092] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute a simulation test message manufacturing method based on rail transit industry signal equipment provided by the above-mentioned methods, the method comprising: inputting a target frame structure into a preset message module, wherein the message module is used to define and store different protocols and different types of frame structures; generating a simulation message of the target frame structure according to an output table of the message module based on the target frame structure; reading the simulation message and the input message of the console of the command line interface through a preset text file; when the simulation message has been read in the text file and the input message is a non-null value, overwriting the keyword content of the simulation message based on the keyword content of the input message to obtain a first simulation test message, wherein the format type of the first simulation test message is the target frame structure; outputting the first simulation test message to the console of the command line interface, wherein the first simulation test message includes actual message content and frame structure annotations.
[0093] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for manufacturing a simulation test message based on a signal device in the rail transit industry, characterized in that: include: Inputting the target frame structure into a preset message module, wherein the message module is used to define and store frame structures of different protocols and different types; Generate a simulated message of a target frame structure based on the target frame structure and according to an output table of the message module; Reading the simulation message and the input message of the console of the command line interface through a preset text file; When the simulation message has been read from the text file and the input message is a non-null value, the keyword content of the simulation message is overwritten based on the keyword content of the input message to obtain a first simulation test message, wherein the format type of the first simulation test message is the target frame structure; The first simulation test message is output to the console of the command line interface, wherein the first simulation test message includes actual message content and frame structure annotations.
2. The method for manufacturing a simulation test message based on a signal device in the rail transit industry according to claim 1, characterized in that: The configuration information of the message module includes at least one of the following: byte length, loop body type, message name, input message priority, comment, message name type and loop body information.
3. The method for manufacturing a simulation test message based on a signal device in the rail transit industry according to claim 2, characterized in that: Before generating a simulated message of a target frame structure based on the target frame structure according to the output table of the message module, the method further includes: Based on the target frame structure and according to the preset template of the message module, an output table is generated, wherein the default value of the output table is listed as the message value displayed by the console of the command line interface, and the default value of the output table is the first value of the loop body information.
4. The method for manufacturing a simulation test message based on a signal device in the rail transit industry according to claim 1, characterized in that: After reading the simulation message and the input message of the console of the command line interface through the preset text file, the method further includes: When the simulated message is not read in the text file, determining the input message of the console of the command line interface; When the input message is a non-null value, overwriting the simulation message based on the input message as a second simulation test message; Output the second simulation test message to the console of the command line interface.
5. The method for manufacturing a simulation test message based on a signal device in the rail transit industry according to claim 4, characterized in that: After determining the input message of the console of the command line interface, the method further includes: When the input message is a null value, determining whether the default value column of the output table is a null value; When the default value column of the output table is a null value, a default value is generated based on the number of bytes of the input message to overwrite the simulation message, to obtain a third simulation test message, and the third simulation test message is output to the console of the command line interface; When the default value column of the output table is a non-empty value, the simulation message is overwritten based on the default value column of the output table to obtain a fourth simulation test message, and the fourth simulation test message is output to the console of the command line interface.
6. The method for manufacturing a simulation test message based on a signal device in the rail transit industry according to claim 1, characterized in that: After reading the simulation message and the input message of the console of the command line interface through the preset text file, the method further includes: When the simulation message has been read from the text file and the input message is a null value, the simulation message is output to the console of the command line interface as the fifth simulation test message.
7. A simulation test message manufacturing device based on rail transit industry signal equipment, characterized in that: include: An input module, used for inputting the target frame structure into a preset message module, wherein the message module is used for defining and storing frame structures of different protocols and different types; A generating module, configured to generate a simulated message of a target frame structure based on the target frame structure and according to an output table of the message module; A reading module, used for reading the simulation message and the input message of the console of the command line interface through a preset text file; An overwriting module, used for overwriting the keyword content of the simulation message based on the keyword content of the input message when the simulation message has been read in the text file and the input message is a non-null value, to obtain a first simulation test message, wherein the format type of the first simulation test message is the target frame structure; An output module is used to output the first simulation test message to the console of the command line interface, wherein the first simulation test message includes actual message content and frame structure annotations.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for manufacturing a simulation test message based on rail transit industry signal equipment is implemented as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for manufacturing a simulation test message based on signal equipment in the rail transit industry as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, a method for manufacturing a simulation test message based on signal equipment in the rail transit industry as described in any one of claims 1 to 6 is implemented.
