Interface Drawing Method, Device, Medium and Rail Vehicle of Train Display
By obtaining the interface configuration file and network data analysis configuration file, and calling the C++ base class to process the variable value to be displayed on the train monitor, the problem of low efficiency in the development of the new interface of the train monitor is solved and efficient interface development is achieved.
Patent Information
- Application Number
- CN202210906748.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-07-29
AI Technical Summary
The prior art is inefficient when developing a new interface for train displays, and it is necessary to redetermine the data processing logic and display interface data interface, which has more repetitive work.
By receiving user operation instructions, obtaining interface configuration files and network data analysis configuration files, calling pre-created C++ base class to process the displayed variable values, drawing the car interface, and the data processing result is a variable-length data packet in a fixed format.
In the case of complicated train models, the repetitive work when developing new interfaces is reduced, interface development efficiency is improved, and data interface interfaces are not required to be re-determined.
Smart Images

Figure CN115291848B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and particularly to a method, device, medium and rail vehicle for drawing an interface of a train display. Background Art
[0002] With the development of rail transit technology, train displays are widely used. Train displays are mainly used to display train operation status information, car layout information, etc., and can also implement some control functions of the train.
[0003] When developing a new interface for a train display currently, it is necessary to re-determine the data processing logic and the display interface data interface. After processing the data required for the new interface one by one or in groups, it is also necessary to encapsulate the data according to the interface, resulting in a large amount of repetitive work and low efficiency.
[0004] Therefore, how to improve the interface development efficiency of train displays is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of the present application is to provide a method, device, medium and rail vehicle for drawing an interface of a train display, which is used to improve the interface development efficiency of train displays.
[0006] To solve the above technical problems, the present application provides a method for drawing an interface of a train display, including:
[0007] Receiving a first operation instruction input by a user, and obtaining an interface configuration file corresponding to the first operation instruction; wherein, each interface configuration file includes variable names of all variables of a train.
[0008] Obtaining the variable values to be displayed according to the interface configuration file and by parsing the configuration file of network data; wherein, the configuration file of network data parsing includes variable names of all variables of trains of multiple vehicle types and port offsets corresponding to each variable.
[0009] Invoking a pre-created C++ base class to process the variable values to be displayed to obtain a data processing result, and drawing a car interface according to the data processing result; wherein, the C++ base class is created according to the data processing logic common to each car, and the data processing result is a variable-length data packet in a fixed format.
[0010] Preferably, obtaining the variable values to be displayed according to the interface configuration file and by parsing the configuration file of network data includes:
[0011] Taking the variables with the same name in the interface configuration file and the configuration file of network data parsing as the variables to be displayed, and obtaining the variable values to be displayed from the data center according to the port offsets corresponding to the variables to be displayed; wherein, the data center includes Ethernet data and MVB data.
[0012] Preferably, obtaining the variable value to be displayed according to the interface configuration file and the network data parsing configuration file includes:
[0013] Parsing the data in the data center using the network data parsing configuration file to obtain the correspondence between each variable name in the network data parsing configuration file and the data in the data center;
[0014] Obtaining the variable value to be displayed according to each variable name and the correspondence in the interface configuration file.
[0015] Preferably, calling the pre-created C++ base class to process the variable value to be displayed to obtain the data processing result includes:
[0016] Using the C++ base class to perform a primary process on the variable value to be displayed, and using the derived class of the C++ base class to perform a secondary process on the variable value to be displayed after the primary process to obtain the data processing result.
[0017] Preferably, drawing the car body interface according to the data processing result includes:
[0018] Determining the number of car bodies according to the data length of the data processing result, and determining the train type according to the data flag bit of the data processing result;
[0019] Determining the arrangement order of the variables to be displayed in the car body interface according to the interface configuration file;
[0020] Drawing the car body interface of the train corresponding to the interface configuration file through the number of car bodies, the train type, the data processing result, and the arrangement order of the variables to be displayed in the car body interface.
[0021] Preferably, after drawing the car body interface according to the data processing result, it further includes: displaying the car body interface.
[0022] Preferably, after displaying the car body interface, it further includes:
[0023] Receiving the second operation instruction input by the user, and modifying the interface configuration file according to the second operation instruction;
[0024] Obtaining the target variable value to be displayed according to the modified interface configuration file and the network data parsing configuration file;
[0025] Calling the C++ base class to process the target variable value to be displayed to obtain the target data processing result, and changing the car body interface according to the target data processing result.
[0026] To solve the above technical problems, the present application also provides an interface drawing device for a train display, including:
[0027] A receiving module, configured to receive a first operation instruction input by a user and obtain an interface configuration file corresponding to the first operation instruction; wherein each interface configuration file includes the variable names of all variables of a train.
[0028] An obtaining module, configured to obtain the variable values to be displayed by parsing the configuration file according to the interface configuration file and the network data parsing configuration file; wherein the network data parsing configuration file includes the variable names of all variables of trains of multiple vehicle types and the port offsets corresponding to each variable.
[0029] An invocation module, configured to invoke a pre-created C++ base class to process the variable values to be displayed to obtain a data processing result, and draw a car interface according to the data processing result; wherein the C++ base class is created according to the common data processing logic of each car, and the data processing result is a variable-length data packet in a fixed format.
[0030] To solve the above technical problems, the present application further provides an interface drawing device for a train display, including:
[0031] A memory, configured to store a computer program;
[0032] A processor, configured to implement the steps of the above interface drawing method for a train display when executing the computer program.
[0033] To solve the above technical problems, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above interface drawing method for a train display are implemented.
[0034] To solve the above technical problems, the present application further provides a rail vehicle, including the above interface drawing device for a train display.
[0035] The present application provides an interface drawing method for a train display, including obtaining an interface configuration file corresponding to a first operation instruction input by a user; wherein, each interface configuration file includes the variable names of all variables of a train; parsing the configuration file according to the interface configuration file and network data to obtain the variable values to be displayed; wherein, the network data parsing configuration file includes the variable names of all variables of trains of multiple models and the port offsets corresponding to each variable; calling a pre-created C++ base class to process the variable values to be displayed to obtain a data processing result, and drawing a car body interface according to the data processing result; wherein, the C++ base class is created according to the common data processing logic of each car body, and the data processing result is a variable-length data packet in a fixed format. It can be seen that in the context of a variety of train models, this method can obtain the variable values to be displayed of trains of different models by replacing the interface configuration file. In addition, this method integrates the common data processing logic of each car body into the C++ base class. Therefore, when developing a new interface, there is no need to re-determine the data processing logic, effectively reducing the repetitive work in developing a new interface. And since the data processing result of the C++ base class is a variable-length data packet in a fixed format, the data processing result can be transmitted according to a standardized interface, and there is no need to re-determine the data interface, further improving the interface development efficiency of the train display.
[0036] In addition, the interface drawing device, medium and rail vehicle provided by the present application have the same beneficial effects as the above-mentioned interface drawing method for a train display. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0038] Figure 1 It is a flowchart of an interface drawing method for a train display provided by the present application;
[0039] Figure 2 It is a structural diagram of an interface drawing device for a train display provided by the present application;
[0040] Figure 3 It is a structural diagram of another interface drawing device for a train display provided by the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0041] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.
[0042] The core of the present application is to provide a method, device, medium and rail vehicle for drawing an interface of a train display, which is used to improve the interface development efficiency of the train display.
[0043] In order to enable those skilled in the art to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0044] Figure 1 For the flowchart of a method for drawing an interface of a train display provided by the present application, as Figure 1 shown, the method includes:
[0045] S1: Receive a first operation instruction input by a user, and obtain an interface configuration file corresponding to the first operation instruction; wherein, each interface configuration file includes the variable names of all variables of a train.
[0046] In specific implementation, the user can input a first operation instruction through an operation in the interface management center. The interface management center can pull up a corresponding interface logic processing program, that is, a script language (QML) program, according to the first operation instruction. The QML program can obtain a corresponding interface configuration file from the configuration file center according to the first operation instruction input by the user.
[0047] The configuration file center stores a network data parsing configuration file and multiple interface configuration files. Each interface configuration file contains the variable names of all variables of a train, such as the variable names of variables like train speed, on / off state of the headlight, etc. The variable names contained in the interface configuration file obtained according to the first operation instruction are the variable names of the variables to be displayed on the interface. To facilitate interface drawing, the variables to be displayed can be two-dimensionally laid out in the interface configuration file according to the arrangement order of the variables to be displayed in the carriage interface. Specifically, taking the interface configuration file as an Excel-format file as an example, the number of rows of the interface configuration file can be used to represent the types of variables to be displayed, that is, each row of the interface configuration file represents a type of variable to be displayed, and the number of columns of the interface configuration file represents the formation number of the train, that is, each column of the interface configuration file represents a carriage of the train. After obtaining the values of the variables to be displayed, the values of the variables to be displayed in each carriage can be correspondingly filled into the interface configuration file according to the formation of the train and the variable names of the variables to be displayed, and the order of the values of the variables to be displayed in each column can be adjusted according to the arrangement order of the variables to be displayed in the carriage interface, so that the values of the variables to be displayed in each column of the interface configuration file are all arranged in the arrangement order of the variables to be displayed in the carriage interface. It should be noted that in specific implementation, the interface configuration file can be an Excel-format file or a Word-format file, and this embodiment does not limit the format of the interface configuration file.
[0048] S2: Obtain the values of the variables to be displayed according to the interface configuration file and the network data parsing configuration file; wherein, the network data parsing configuration file includes the variable names of all variables of trains of multiple models and the port offsets corresponding to each variable.
[0049] To facilitate querying the corresponding port offset according to the variable name, the variable name of each variable in the network data parsing configuration file can be concatenated or combined with the port offset corresponding to the variable, so that the corresponding port offset can be directly found from the network data parsing configuration file according to the variable name. In specific implementation, the data, that is, the values of the variables to be displayed, can be obtained from the data center according to the port offsets corresponding to the same-name variables in the network data parsing configuration file and the interface configuration file, and then the obtained values of the variables to be displayed are correspondingly filled into the interface configuration file according to the variable names of the variables to be displayed in the interface configuration file, and the order of each variable to be displayed is adjusted according to the arrangement order of the variables to be displayed in the carriage interface. It can be understood that both the network data parsing configuration file and the interface configuration file are files pre-filled by the user. Due to the complexity of train models, the user can fill the variable names of all variables in the train of the corresponding model and the port offsets corresponding to each variable in the data center into the network data parsing configuration file as long as the network data parsing configuration file includes the variable names of all variables in all interface configuration files.
[0050] S3: Call the pre-created C++ base class to process the value of the variable to be displayed to obtain a data processing result, and draw the car interface according to the data processing result; wherein, the C++ base class is created according to the common data processing logic of each car, and the data processing result is a variable-length data packet in a fixed format.
[0051] The C++ base class is a mathematical model created according to the common data processing logic of each car obtained by summarizing the commonalities of the train display interface. All interfaces are derived from this C++ base class to implement a set of mathematical models shared by all interfaces. In a specific implementation, after filling the value of the variable to be displayed into the interface configuration file, the factory pattern in the design pattern can be used to uniformly manage the instantiated objects of the C++ base class in the actual car forms such as motor cars and trailers, and the C++ base class is used to process the value of the variable to be displayed to obtain a data processing result, and then the data processing result is returned to the QML program so that the QML program can draw the interface according to the data processing result. Specifically, to facilitate adding the value of the variable to be displayed to the data packet subsequently, the value of the variable to be displayed in each car can be encapsulated into a variable-length data packet to obtain the data processing result, thus realizing the variable-length design of the logical processing; after receiving the variable-length data packet, the QML program can draw the interface of the train display by synthesizing the data in the data packet.
[0052] This embodiment provides a method for drawing the interface of a train display, including receiving a first operation instruction input by a user and obtaining an interface configuration file corresponding to the first operation instruction; wherein, each interface configuration file includes the variable names of all variables of a train; obtaining the value of the variable to be displayed according to the interface configuration file and the network data parsing configuration file; wherein, the network data parsing configuration file includes the variable names of all variables of trains of multiple vehicle types and the port offsets corresponding to each variable; calling the pre-created C++ base class to process the value of the variable to be displayed to obtain a data processing result, and drawing the car interface according to the data processing result; wherein, the C++ base class is created according to the common data processing logic of each car, and the data processing result is a variable-length data packet in a fixed format. It can be seen that in the context of a complex train vehicle type, this method can obtain the value of the variable to be displayed of trains of different vehicle types by replacing the interface configuration file. In addition, this method integrates the common data processing logic of each car into the C++ base class. Therefore, when developing a new interface, there is no need to re-determine the data processing logic, effectively reducing the repetitive work when developing a new interface. And since the data processing result of the C++ base class is a variable-length data packet in a fixed format, the data processing result can be transmitted according to a standardized interface, and there is no need to re-determine the data interface, further improving the interface development efficiency of the train display.
[0053] Based on the above embodiment, this embodiment provides a preferred implementation manner for obtaining the value of the variable to be displayed. This step includes:
[0054] Take the variables with the same name in the interface configuration file and the network data parsing configuration file as the variables to be displayed, and obtain the values of the variables to be displayed from the data center according to the port offsets corresponding to the variables to be displayed; wherein, the data center includes Ethernet data and MVB data.
[0055] In this embodiment, the data center is used to store Ethernet data and Multifunction Vehicle Bus (MVB) data. It should be noted that for the convenience of obtaining data from the data center, the Ethernet data and MVB data in the data center can be formatted so that data can be obtained from the data center through a standardized interface.
[0056] Based on the above embodiment, this embodiment provides another preferred implementation manner for obtaining the values of the variables to be displayed. This step includes:
[0057] Use the network data parsing configuration file to parse the data in the data center to obtain the correspondence between each variable name in the network data parsing configuration file and the data in the data center;
[0058] Obtain the values of the variables to be displayed according to each variable name and the correspondence in the interface configuration file.
[0059] Specifically, the corresponding variable values can be found in the data center using the port offsets in the network data parsing configuration file. Since each port offset corresponds to each variable name in the network data parsing configuration file, a correspondence between each variable name and each variable value can be established. Therefore, after obtaining the interface configuration file, the variable values corresponding to each variable name in the interface configuration file can be obtained according to each variable name in the interface configuration file and the correspondence between each variable name and each variable value.
[0060] Based on the above embodiment, for the convenience of drawing the carriage interface, it is necessary to call the pre-created C++ base class and the derived class of the C++ base class to process the obtained values of the variables to be displayed. This step includes:
[0061] Use the C++ base class to perform a primary processing on the values of the variables to be displayed, and use the derived class of the C++ base class to perform a secondary processing on the values of the variables to be displayed after the primary processing to obtain a data processing result.
[0062] In this embodiment, the obtained values of variables to be displayed can be encapsulated by a C++ base class for one-time processing, and then the encapsulated values of variables to be displayed can be further processed by a derived class of the C++ base class. The secondary processing methods include, but are not limited to, flipping, arithmetic operations, etc. To facilitate the distinction of the values of variables to be displayed in each carriage, it is assumed that the number of columns in the interface configuration file represents the formation number of the train. After the values of variables to be displayed are correspondingly filled into the interface configuration file, each column of data in the interface configuration file can be encapsulated, so as to realize the data encapsulation for each carriage.
[0063] It should be noted that in the specific implementation, variable-length data structures such as QMap and QList in the application development framework (Qt) can be relied on to encapsulate the carriages, and the processing method of secondary processing can be selected according to the user's needs, so as to obtain the data processing result, that is, a variable-length data packet in a fixed format.
[0064] On the basis of the above embodiment, to facilitate the drawing of the carriage interface, parameters such as the train type and the number of carriages need to be determined. This embodiment makes a supplementary description of the steps for drawing the carriage interface based on this. The steps include:
[0065] Determine the number of carriages according to the data length of the data processing result, and determine the train type according to the data flag bit of the data processing result;
[0066] Determine the arrangement order of the variables to be displayed in the carriage interface according to the interface configuration file;
[0067] Draw the carriage interface of the train corresponding to the interface configuration file through the number of carriages, the train type, the data processing result, and the arrangement order of the variables to be displayed in the carriage interface.
[0068] Specifically, it is assumed that the number of columns in the interface configuration file represents the formation number of the train, and the one-time processing method of the C++ base class is to encapsulate each column of data in the interface configuration file. Then the data length of the data processing result represents the number of carriages. Therefore, the number of carriages can be determined according to the data length of the data processing result, and the train type can be determined according to the encapsulated data flag bit, such as a motor car or a trailer. In addition, the arrangement order of the variables to be displayed in the interface of each carriage can be determined according to the arrangement order of each column of data in the interface configuration file. Thus, the corresponding carriage interface can be drawn through the number of carriages, the train type, the values of the variables to be displayed, and the arrangement order of the variables to be displayed in the carriage interface.
[0069] It should be noted that to improve the design efficiency of the car body interface, all variables to be displayed in the interface of each car body can be statistically summarized according to the principle of the most comprehensive listing, so as to draw a car body with the most complete data as the basic car body, and copy the basic car body according to the number of car bodies to use the basic car body as the template for each car body. Then, the QML program processes each basic car body according to the variable values to be displayed in each car body and the arrangement order of the variables to be displayed in the car body interface, and the display interfaces of each car body can be obtained.
[0070] On the basis of the above embodiments, to facilitate the user to learn about the drawn car body interface, after the QML program draws the car body interface according to the data processing result in this embodiment, it further includes: displaying the car body interface.
[0071] In specific implementation, it can be uniformly displayed after all interfaces are drawn, or each car body interface can be displayed after it is drawn. This embodiment does not limit this. In addition, for the convenience of the user to query, the display method can be set to display each car body interface one by one in a certain order. For example, the car body interfaces are displayed in the car body order.
[0072] After the car body interface is drawn in this embodiment, the train status is displayed by displaying the car body interface, so that the user can learn about the train status.
[0073] On the basis of the above embodiments, to facilitate the user to modify the drawn interface, after the car body interface is displayed in this embodiment, the drawn interface is modified according to the user operation. This step includes:
[0074] Receiving a second operation instruction input by the user, and modifying the interface configuration file according to the second operation instruction;
[0075] Obtaining target variable values to be displayed according to the modified interface configuration file and the network data parsing configuration file;
[0076] Invoking the C++ base class to process the target variable values to be displayed to obtain a target data processing result, and changing the car body interface according to the target data processing result.
[0077] In specific implementation, the user can modify the interface configuration file through the input second operation instruction. For example, the variable values to be displayed are added or deleted, the variable values to be displayed are modified, and the arrangement order of the variable values to be displayed in the interface configuration file is modified. After the interface configuration file is modified, the variable values to be displayed, that is, the target variable values to be displayed, can be re-obtained according to the network data parsing configuration file and the modified interface configuration file, and then the target variable values to be displayed are correspondingly filled into the modified interface configuration file. The C++ base class processes the target variable values to be displayed filled into the modified interface configuration file to obtain a target data processing result, and further changes the car body interface according to the target data processing result.
[0078] After presenting the car body interface in this embodiment, the drawn car body interface is changed according to user requirements to control the train status according to user requirements.
[0079] In the above embodiment, the method for drawing the interface of the train display is described in detail. The present application also provides an embodiment corresponding to the device for drawing the interface of the train display. It should be noted that the present application describes the embodiments of the device part from two perspectives, one is from the perspective of functional modules, and the other is from the perspective of hardware.
[0080] Figure 2 The structure diagram of a device for drawing the interface of a train display provided by the present application is as Figure 2 shown. The device includes:
[0081] A receiving module 10, configured to receive a first operation instruction input by a user and obtain an interface configuration file corresponding to the first operation instruction; wherein, each interface configuration file includes the variable names of all variables of a train.
[0082] An obtaining module 11, configured to parse the configuration file according to the interface configuration file and network data to obtain the variable values to be displayed; wherein, the network data parsing configuration file includes the variable names of all variables of trains of multiple models and the port offsets corresponding to the variables.
[0083] An invocation module 12, configured to invoke a pre-created C++ base class to process the variable values to be displayed to obtain a data processing result, and draw a car body interface according to the data processing result; wherein, the C++ base class is created according to the common data processing logic of each car body, and the data processing result is a variable-length data packet in a fixed format.
[0084] Since the embodiments of the device part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the device part, and details are not described here for the time being.
[0085] The interface drawing device of the train display provided in this embodiment receives a first operation instruction input by a user through a receiving module, and obtains an interface configuration file corresponding to the first operation instruction; wherein, each interface configuration file includes the variable names of all variables of a train; the obtaining module parses the configuration file according to the interface configuration file and network data to obtain the variable values to be displayed; wherein, the network data parsing configuration file includes the variable names of all variables of trains of multiple vehicle types and the port offsets corresponding to each variable; the calling module calls a pre-created C++ base class to process the variable values to be displayed to obtain a data processing result, and draws the carriage interface according to the data processing result; wherein, the C++ base class is created according to the data processing logic common to each carriage, and the data processing result is a variable-length data packet in a fixed format. It can be seen that this device can obtain the variable values to be displayed of trains of different vehicle types by replacing the interface configuration file. In addition, this device integrates the data processing logic common to each carriage into the C++ base class. Therefore, when developing a new interface, it is not necessary to re-determine the data processing logic, effectively reducing the repetitive work when developing a new interface. And because the data processing result of the C++ base class is a variable-length data packet in a fixed format, the data processing result can be transmitted according to a standardized interface without re-determining the data interface, further improving the interface development efficiency of the train display.
[0086] Figure 3 The structural diagram of another interface drawing device of the train display provided in this application is as Figure 3 shown, and this device includes:
[0087] A memory 20 for storing a computer program;
[0088] A processor 21 for implementing the steps of the interface drawing method of the train display mentioned in the above embodiment when executing the computer program.
[0089] The interface drawing device of the train display provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.
[0090] Among them, the processor 21 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 21 may be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may further include an artificial intelligence (AI) processor, and the AI processor is used to process computational operations related to machine learning.
[0091] The memory 20 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 20 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201. After the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the interface drawing method of the train display disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, variable values to be displayed, etc.
[0092] In some embodiments, the interface drawing device of the train display may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0093] Those skilled in the art can understand that Figure 3 the structure shown in
[0094] The interface drawing device of the train display provided in this embodiment includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the above-mentioned interface drawing method of the train display, and the effect is the same as above.
[0095] Secondly, the present application also provides an embodiment corresponding to a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, it implements the steps of the interface drawing method of the train display described in the above method embodiment.
[0096] It can be understood that if the method in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0097] The computer-readable storage medium provided in this embodiment includes the above-mentioned interface drawing method of the train display, and the effect is the same as above.
[0098] Finally, the present application also provides an embodiment corresponding to a rail vehicle, including the above-mentioned interface drawing device of the train display. For the specific embodiments of the interface drawing method of the reference train display, details are not described here.
[0099] The rail vehicle provided in this embodiment includes the above-mentioned interface drawing device of the train display, and the effect is the same as above.
[0100] The above has introduced in detail the interface drawing method, device, medium, and rail vehicle provided by the present application. The various embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For the relevant parts, refer to the description in the method part. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
[0101] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.
Claims
1. A method for drawing an interface of a train display, characterized in that, It includes: Receiving a first operation instruction input by a user and obtaining an interface configuration file corresponding to the first operation instruction; wherein, each of the interface configuration files includes variable names of all variables of a train. Obtaining a variable value to be displayed according to the interface configuration file and a network data parsing configuration file; wherein, the network data parsing configuration file includes variable names of all variables of trains of multiple models and port offsets corresponding to each variable. Invoking a pre-created C++ base class to process the variable value to be displayed to obtain a data processing result, and drawing a carriage interface according to the data processing result; wherein, the C++ base class is created according to the data processing logic common to each carriage, and the data processing result is a variable-length data packet in a fixed format.
2. The method for drawing an interface of a train display according to claim 1, characterized in that, The obtaining the variable value to be displayed according to the interface configuration file and the network data parsing configuration file includes: Taking the variables with the same name in the interface configuration file and the network data parsing configuration file as the variables to be displayed, and obtaining the variable value to be displayed from a data center according to the port offset corresponding to the variable to be displayed; wherein, the data center includes Ethernet data and MVB data.
3. The method for drawing the interface of the train display according to claim 2, wherein The obtaining the variable value to be displayed according to the interface configuration file and the network data parsing configuration file includes: Using the network data parsing configuration file to parse the data in the data center to obtain the correspondence between each variable name in the network data parsing configuration file and the data in the data center. Obtaining the variable value to be displayed according to each variable name in the interface configuration file and the correspondence.
4. The method for drawing the interface of the train display according to claim 1, characterized in that, The invoking the pre-created C++ base class to process the variable value to be displayed to obtain a data processing result includes: Using the C++ base class to perform a first processing on the variable value to be displayed, and using a derived class of the C++ base class to perform a second processing on the variable value to be displayed after the first processing to obtain the data processing result.
5. The method for drawing the interface of the train display according to claim 1, wherein The drawing the carriage interface according to the data processing result includes: Determining the number of carriages according to the data length of the data processing result, and determining the train type according to the data flag bit of the data processing result. Determining the arrangement order of the variables to be displayed in the carriage interface according to the interface configuration file. Drawing the carriage interface of the train corresponding to the interface configuration file through the number of carriages, the train type, the data processing result, and the arrangement order of the variables to be displayed in the carriage interface.
6. The method for drawing an interface of a train display according to any one of claims 1-5, characterized in that, After the drawing the carriage interface according to the data processing result, it further includes: displaying the carriage interface.
7. The method for drawing an interface of a train display according to claim 6, wherein After the displaying the carriage interface, it further includes: Receiving a second operation instruction input by the user, and modifying the interface configuration file according to the second operation instruction. Obtaining a target variable value to be displayed according to the modified interface configuration file and the network data parsing configuration file. Invoking the C++ base class to process the target variable value to be displayed to obtain a target data processing result, and changing the carriage interface according to the target data processing result.
8. An interface drawing device for a train display, characterized in that, It includes: A receiving module, configured to receive a first operation instruction input by a user and obtain an interface configuration file corresponding to the first operation instruction; wherein, each of the interface configuration files includes variable names of all variables of a train. An obtaining module, configured to obtain a variable value to be displayed by parsing a configuration file according to the interface configuration file and network data; wherein, the network data parsing configuration file includes variable names of all variables of trains of multiple models and port offsets corresponding to each variable. An invoking module, configured to invoke a pre-created C++ base class to process the variable value to be displayed to obtain a data processing result, and draw a carriage interface according to the data processing result; wherein, the C++ base class is created according to the data processing logic common to each carriage, and the data processing result is a variable-length data packet in a fixed format.
9. An interface drawing device for a train display, characterized in that, Comprising: A memory, configured to store a computer program. A processor, configured to implement the steps of the method for drawing an interface of a train display as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for drawing an interface of a train display as described in any one of claims 1 to 7 are implemented.
11. An orbital vehicle, characterized in that, Comprising the apparatus for drawing an interface of a train display as described in claim 9.
Citation Information
Patent Citations
Configurable type memory management method
CN103729443A
Data analysis
WO2012149610A1