Human-computer interaction interface control method and device, equipment, medium and product
By combining the GLUT library with SCADE Display to implement information conversion, interface drawing, and hardware device acquisition functions, the cross-platform compatibility and platform adaptability issues of SCADE Display in human-computer interaction interface design are solved, and development efficiency is improved.
Patent Information
- Application Number
- CN202510770006.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-19
AI Technical Summary
In the existing technology, SCADE Display has cross-platform compatibility and platform adaptability issues in human-computer interaction interface design, which affects development efficiency.
By using the human-computer interface design software SCADE Display and the cross-platform tool library GLUT library, the information conversion, interface drawing and hardware device acquisition functions are realized. When the interface refresh function in the cross-platform tool library GLUT library detects that the interface drawing function generates interface drawing elements, it calls the interface drawing function to draw and display the target interface, and when it detects that the user triggers an action, it calls the hardware device acquisition function to convert it into an operation instruction.
It combines the GLUT library on the basis of SCADE Display to achieve high adaptability on multiple platforms and improve the cross-platform development efficiency of the human-computer interaction interface.
Smart Images

Figure CN120669982A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a human-computer interaction interface control method, device, equipment, medium and product. Background Art
[0002] SCADE Display is a model-based human-computer interaction design software that supports graphical programming, significantly accelerating development. The KCG module in SCADE Display can generate C code from designed models and resources. This code meets industry safety standards and also generates corresponding development files for configuration management and safety certification review.
[0003] Software platform compatibility is a major challenge in human-computer interaction interface (HMI) software development. Issues such as functional verification in Windows environments, platform adaptation issues on embedded platforms, and even platform porting issues caused by changes in embedded platforms due to technical solutions can significantly impact development efficiency. Therefore, developers are focusing on how to achieve cross-platform compatibility while using SCADE Display for HMI design. Summary of the Invention
[0004] The present invention provides a human-computer interaction interface control method, device, equipment, medium and product to achieve a cross-platform effect of an application program.
[0005] According to one aspect of the present invention, a human-computer interaction interface control method is provided, comprising:
[0006] In response to the information to be displayed sent by the train-related peripheral device, the information to be displayed is converted into interface drawing elements through the interface drawing function provided by the human-machine interface design software SCADEDisplay;
[0007] When the interface drawing function generates an interface drawing element, the interface refresh function in the cross-platform tool library GLUT library calls the interface drawing function and draws and displays the target interface based on the interface drawing element;
[0008] When the hardware trigger acquisition function in the GLUT library detects a trigger action initiated by the user based on the target interface, it calls the hardware device acquisition function in SCADE Display to convert the trigger action into a corresponding operation instruction; the operation instruction is used to instruct the peripheral device to perform the operation associated with the user trigger action.
[0009] According to another aspect of the present invention, a human-computer interaction interface control device is provided, comprising:
[0010] An information conversion module is configured to respond to information to be displayed sent by a train-related peripheral device and convert the information to be displayed into interface drawing elements using an interface drawing function provided by the human-machine interface design software SCADE Display;
[0011] An interface drawing module is used for calling the interface drawing function in the cross-platform tool library GLUT library when detecting that the interface drawing function generates interface drawing elements, and drawing and displaying the target interface based on the interface drawing elements;
[0012] The instruction generation module is used for the hardware trigger acquisition function in the GLUT library to call the hardware device acquisition function in SCADE Display when detecting a trigger action initiated by the user based on the target interface, and convert the trigger action into a corresponding operation instruction; the operation instruction is used to instruct the peripheral device to perform an operation associated with the user trigger action.
[0013] According to another aspect of the present invention, an electronic device is provided, comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the human-computer interaction interface control method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the human-computer interaction interface control method according to any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the human-computer interaction interface control method of any embodiment of the present disclosure is implemented.
[0019] The technical solution of an embodiment of the present invention is to respond to the information to be displayed sent by the train-associated peripheral equipment, convert the information to be displayed into interface drawing elements through the interface drawing function provided by the human-machine interface design software SCADE Display, and the interface refresh function in the cross-platform tool library GLUT library calls the interface drawing function when it detects that the interface drawing function generates the interface drawing elements, and draws and displays the target interface based on the interface drawing elements. Then, when the hardware trigger acquisition function in the GLUT library detects the trigger action initiated by the user based on the target interface, it calls the hardware device acquisition function in SCADEDisplay, and converts the trigger action into a corresponding operation instruction for instructing the peripheral equipment to perform the operation associated with the user trigger action. By combining the GLUT library with the interface drawing performed by SCADE Display, high adaptability to multiple platforms is achieved.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1a This is a flowchart of a human-computer interaction interface control method provided according to the first embodiment of the present invention;
[0023] Figure 1b This is a schematic diagram of the human-computer interaction software design provided according to the first embodiment of the present invention;
[0024] Figure 2 This is a flow chart of a human-computer interaction interface control method provided according to the second embodiment of the present invention;
[0025] Figure 3 This is a structural diagram of a human-computer interaction interface control device provided according to a third embodiment of the present invention;
[0026] Figure 4 It is a structural diagram of an electronic device for implementing the human-computer interaction interface control method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only 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 making creative efforts should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Example 1
[0030] Figure 1a A flowchart of a human-machine interface control method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where the human-machine interface control is performed at a train control terminal through SCADE Display human-machine interface design software and the cross-platform tool library GLUT library. The method can be executed by a human-machine interface control device, which can be implemented in the form of hardware and / or software. The human-machine interface control device can be configured in various general-purpose computing devices, for example, the general-purpose computing device is a train control terminal in a train. Figure 1a As shown, the method includes:
[0031] S110 , in response to the train-associated peripheral device sending the information to be displayed, converting the information to be displayed into interface drawing elements through the interface drawing function provided by the human-machine interface design software SCADEDisplay.
[0032] Train-related peripheral devices are devices that communicate with the train control terminal and can send information to the train control terminal for display and receive operation instructions from the train control terminal. For example, peripheral devices can be train control equipment such as the Automatic Train Protection (ATP) system and the Automatic Train Operation (ATO) system.
[0033] SCADE Display is human-machine interface design software that supports graphical programming, significantly accelerating development. The KCG module within SCADE Display generates C code from designed models and resources. This code meets industry safety standards and also generates corresponding development files for configuration management and safety certification review. SCADE Display provides interface drawing functions for interface creation.
[0034] Interface drawing elements are the elements required to display the information to be displayed. For example, if the information to be displayed is train speed, the speed information will be converted into the deflection angle of the speedometer pointer as an interface drawing element. For another example, if the information to be displayed is a train overspeed warning message, the train overspeed warning message will be converted into an overspeed warning sign graphic and warning text as interface drawing elements.
[0035] like Figure 1b As shown in the figure, the train control terminal runs human-computer interaction software, which consists of handwritten C language code and C language code generated by SCADE Display using the KCG module. The handwritten C language code enables information exchange between the human-computer interaction software and peripheral devices, including receiving information to be displayed or processed from peripheral devices and sending information processing results or information-related operation instructions to peripheral devices. The C language code generated by SCADE Display completes the processing and display of information to be displayed and is also used to collect human-computer interaction information.
[0036] In this embodiment of the present invention, after a train-associated peripheral device transmits information to be displayed, the interface drawing function provided by the human-machine interface design software SCADE Display converts this information into interface drawing elements. Specifically, handwritten C language code retrieves the information to be displayed from the peripheral device and assigns values to the C language code generated by SCADE Display based on the information to be displayed. This information is then input as a parameter into the C language code generated by SCADE Display. Furthermore, the interface drawing function in the C language code generated by SCADE Display performs logical processing on the information to be displayed, converting it into interface drawing elements.
[0037] In one specific example, handwritten C code captures train speeding warning information input from ATP and assigns it to the C code generated by SCADE Display. This information is then input as a parameter into the C code generated by SCADE Display. Furthermore, the interface drawing function within the SCADE Display-generated C code performs logical processing on the train speeding warning information, converting it into an overspeed warning sign graphic and text, which serve as interface drawing elements.
[0038] In another specific example, handwritten C code captures the train speed input from ATP and assigns it to the C code generated by SCADE Display. This input is then used as a parameter in the C code generated by SCADE Display. Furthermore, the interface drawing function within the SCADE Display-generated C code performs logical processing on the train speed, converting it into information such as the deflection angle of the speedometer pointer, which serves as an interface drawing element.
[0039] S120. When the interface refresh function in the cross-platform tool library GLUT library detects that the interface drawing function generates interface drawing elements, the interface refresh function calls the interface drawing function and draws and displays the target interface based on the interface drawing elements.
[0040] GLUT is an auxiliary library of OpenGL. Based on the GLUT library, developers can call various interface construction and drawing functions in OpenGL. In the embodiment of the present invention, window creation and management are performed through the GLUT library.
[0041] In an embodiment of the present invention, when the interface refresh function in the GLUT library detects that the interface drawing function generates an interface drawing element, the interface drawing function is called, and the target interface is drawn and displayed based on the interface drawing element. Specifically, the interface drawing function serves as a callback function of the interface refresh function in the GLUT library. When the interface refresh function in the GLUT library detects that the interface drawing function generates an interface drawing element, the interface drawing function as the callback function is called, and the interface drawing function performs interface drawing and display based on the interface drawing element generated in S110.
[0042] In a specific example, the interface refresh function glutDisplayFunc(display_callback) provided by the GLUT library is called in a loop. When the interface refresh function detects that the interface display needs to change (that is, when the interface drawing function provided by SCADE Display converts the information to be displayed into interface drawing elements), it will update the interface display. The specific update method is to call display_callback (an interface drawing function provided by SCADE Display) as a callback function, and based on the interface drawing elements such as the deflection angle of the pointer in the speedometer, it draws the target interface for displaying the speedometer and displays it.
[0043] The interface drawing functions provided by SCADE Display include the variable context assignment function, the display interface display and logic processing function, and the context output function after the interface processing. The variable context assignment function is used to obtain the information to be displayed sent by the peripheral device; the display interface display and logic processing function is used to convert the information to be displayed into interface drawing elements and display the target interface drawn based on the interface drawing elements; the context output function after the interface processing is used to collect human-computer interaction information initiated by the user on the target interface.
[0044] In addition, users can add the function of receiving and processing the input of the peripheral device before the assignment function of the variable context, and add the function of outputting to the peripheral device after the output function of the context.
[0045] S130. When the hardware trigger acquisition function in the GLUT library detects a trigger action initiated by the user based on the target interface, it calls the hardware device acquisition function in SCADE Display to convert the trigger action into a corresponding operation instruction; the operation instruction is used to instruct the peripheral device to perform an operation associated with the user trigger action.
[0046] In this embodiment of the present invention, the GLUT library provides at least one hardware trigger acquisition function for collecting hardware trigger events initiated by users on external devices within the train control terminal. For example, these functions can include mouse event acquisition, keyboard event acquisition, and touch screen event acquisition. Upon detecting a user trigger action on the target interface, the hardware device acquisition function in SCADE Display is called to convert the trigger action into a corresponding operation instruction. This operation instruction is then sent to the external device, instructing it to perform the operation associated with the user trigger action.
[0047] More specifically, the hardware device acquisition function in the C language code generated by SCADE Display obtains the hardware trigger event sent by the GLUT library when it is called, performs logical processing on the hardware trigger event, and sends the logical processing result to the handwritten C language code.
[0048] In a specific example, when the keyboard event acquisition function in the GLUT library detects a user pressing the "slow down" key on the keyboard based on the target interface, it calls the keyboard acquisition function (provided by SCADEDisplay) as a callback function. The keyboard acquisition function converts the "slow down" key press into a corresponding operation instruction. Furthermore, the operation instruction is sent to the handwritten C language code, which then sends the operation instruction to the peripheral device.
[0049] In another specific example, when the mouse event acquisition function in the GLUT library detects a user-initiated left-mouse-button-press action based on an "overspeed warning" indicator on the target interface, it calls a mouse acquisition function (provided by SCADE Display) as a callback function. The mouse acquisition function converts the left-mouse-button-press action based on the "overspeed warning" indicator on the target interface into a corresponding operation instruction. Furthermore, the operation instruction is sent to handwritten C language code, which then sends the operation instruction to a peripheral device.
[0050] The technical solution of an embodiment of the present invention is to respond to the information to be displayed sent by the train-associated peripheral equipment, convert the information to be displayed into interface drawing elements through the interface drawing function provided by the human-machine interface design software SCADE Display, and the interface refresh function in the cross-platform tool library GLUT library calls the interface drawing function when it detects that the interface drawing function generates the interface drawing elements, and draws and displays the target interface based on the interface drawing elements. Then, when the hardware trigger acquisition function in the GLUT library detects the trigger action initiated by the user based on the target interface, it calls the hardware device acquisition function in SCADEDisplay, and converts the trigger action into a corresponding operation instruction for instructing the peripheral equipment to perform the operation associated with the user trigger action. By combining the GLUT library with the interface drawing performed by SCADE Display, high adaptability to multiple platforms is achieved.
[0051] Example 2
[0052] Figure 2This is a flowchart of a human-computer interaction interface control method provided by the second embodiment of the present invention. This embodiment further refines the above embodiment and provides specific steps for calling the interface drawing function, drawing and displaying the target interface based on the interface drawing elements, and calling the hardware device acquisition function in SCADE Display to convert the trigger action into the corresponding operation instruction when the hardware trigger acquisition function in the GLUT library detects the trigger action initiated by the user based on the target interface. Figure 2 As shown, the method includes:
[0053] S210 , in response to the train-associated peripheral device sending the information to be displayed, converting the information to be displayed into interface drawing elements through the interface drawing function provided by the human-machine interface design software SCADEDisplay.
[0054] Optionally, before converting the information to be displayed into interface drawing elements by using an interface drawing function provided by human-machine interface design software SCADE Display in response to the information to be displayed being sent by the train-related peripheral device, the method further includes:
[0055] Call at least one window initialization function provided by the GLUT library to initialize window parameters and create a window;
[0056] Call the OGLX initialization function provided by SCADE Display to initialize the OGLX parameters;
[0057] Call the symbol layer initialization function provided by SCADE Display to initialize the Display parameters, and call the resource initialization function provided by SCADE Display to initialize the Display resources.
[0058] This optional embodiment provides specific steps for initializing the program before converting information to be displayed sent by a train-related peripheral device into interface drawing elements using interface drawing functions provided by the human-machine interface design software SCADE Display. First, at least one window initialization function provided by the GLUT library is called to initialize window parameters and create a window. Specifically, the GLUT library can be initialized first, followed by initializing the window display model, then initializing the window size, and finally creating the window.
[0059] Furthermore, the OGLX initialization function oglx_init() provided by SCADE Display is called to initialize the OGLX parameters. OGLX is a dynamic graphics library used by SCADE Display to associate with OpenGL. It is responsible for converting the Simple Graphics Library (SGL) command calls in the C code generated by the KCG module in SCADE Display into underlying command calls that comply with specific OpenGL standards. By modifying the version of the OGLX library, different OpenGLs can be adapted, and different OpenGL versions on different platforms can be adapted without modifying the software. Call the symbol layer initialization function provided by SCADE Display to initialize the Display parameters, and call the resource initialization function provided by SCADE Display to initialize the Display resources.
[0060] Furthermore, the symbol layer initialization function provided by SCADE Display is called to initialize the display parameters. Specifically, the symbol layer initialization function aol_symbology_layer_init(&context) provided by SCADE Display is called to initialize the SCADE Display parameters. The context parameter in this function contains the input variables, output variables, and local variables required for SCADE Display drawing.
[0061] Furthermore, the resource initialization functions provided by SCADE Display are called to initialize the display resources. The texture table initialization function aol_texture_table() is called to initialize the texture table, the gradient table initialization function aol_gradient_table() is called to initialize the gradient table, and the static image initialization function aol_static_sequences() is called to initialize the static graphics. By initializing the resources, the initialized drawing resources can be directly used when drawing images later.
[0062] In addition, during the initialization process, you can also perform custom parameter initialization operations based on user-defined functions, such as the brightness and sound of the embedded platform. Through the above initialization operations, you can complete window creation and provide the necessary drawing resources for the interface drawing function of the subsequent cross-platform human-computer interaction software.
[0063] Optionally, call at least one window initialization function provided by the GLUT library to initialize window parameters and create the window, including:
[0064] Call the GLUT library initialization function to initialize the GLUT library;
[0065] Call the window display mode initialization function to initialize the GLUT window display mode;
[0066] Call the window size initialization function to initialize the window size;
[0067] Call the window creation function to create the window, and name the window by calling the window naming function.
[0068] In this optional embodiment, a specific method for calling at least one window initialization function provided by the GLUT library to initialize window parameters and create a window is provided: calling the GLUT library initialization function glutInit(&argc, argv) to initialize the GLUT library, and the function needs to obtain the two parameters contained therein from the main function. Calling the window display mode initialization function glutInitDisplayMode(GLUT_ALPHA|GLUT_DOUBLE|GLUT_RGB|GLUT_DEPTH|GLUT_STENCIL) to initialize the GLUT window display mode, wherein GLUT_ALPHA represents the color component of the window, including the alpha value, GLUT_DOUBLE represents whether double buffering is used, GLUT_RGB represents that the current window is a window in RGB color mode, and GLUT_DEPTH represents that the window uses a depth buffer. Calling the window size initialization function glutInitWindowSize(getW(), getH()) to initialize the window size, wherein the return value of getW() is the window width drawn by Display in pixels, and the return value of getH() is the window height drawn by Display in pixels. Call the window creation function glutCreateWindow(getSpecName()) to create the window, where the return value of the window naming function getSpecName() as the callback function is the window name.
[0069] Additionally, if you need to set the window position, you can call the glutInitWindowPosition(x,y) function. x is the number of pixels from the left edge of the screen, and y is the number of pixels from the top edge. Since the embedded display software for train control systems is full-screen, this function is generally not called.
[0070] Optionally, the technical solution of the embodiment of the present invention further includes:
[0071] When the window size update function provided by the GLUT library detects that the user has initiated a window adjustment operation, it calls the window change function provided by Display with the target window size associated with the window adjustment operation as a parameter to change the current window from the initial window size to the target window size.
[0072] In this optional embodiment, the technical solution of the embodiment of the present invention also provides a specific operation for changing the window size: the window size update function glutReshapeFunc (reshape_callback) provided by the GLUT library performs a loop detection. For example, when adjusting the window size by touching the screen, the sliding trajectory of the user's finger in the width and length directions of the screen can be recorded, and the target window size is determined based on the sliding trajectory. If the user initiates a window adjustment operation, the window change function reshape_callback provided by Display is called with the target window size associated with the window adjustment operation as a parameter to change the current window from the initial window size to the target window size. Among them, the callback function reshape_callback synchronizes the target window size to the Display when the window changes, and calls the screen drawing function display_callback to update the interface content once.
[0073] S220. When the interface refresh function in the cross-platform tool library GLUT library detects that the interface drawing function generates interface drawing elements, it calls the interface drawing function to instruct the interface drawing function to call the OGLX image library based on the interface drawing elements to draw and display the target interface; the OGLX image library is associated with the OpenGL version adapted to the current program running platform.
[0074] The OGLX image library is associated with the OpenGL version adapted to the current program running platform. When SCADE Display calls the OGLX image library, OGLX internally converts the instructions into standard OpenGL call instructions, which can realize the call of the drawing tools in OpenGL.
[0075] In an embodiment of the present invention, when the interface refresh function in the GLUT library detects that the interface drawing function generates interface drawing elements, the interface drawing function is called to instruct the interface drawing function to call the OGLX image library based on the interface drawing elements to draw and display the target interface, thereby realizing the use of the drawing tools in OpenGL during the interface drawing process based on SCADE Display, and the OGLX image library version can be flexibly modified in the program adaptation stage according to the OpenGL version adapted by the current program running platform to adapt it to the OpenGL version adapted by the current program running platform, thereby achieving a cross-platform effect.
[0076] S230 , when the hardware trigger acquisition function in the GLUT library detects a trigger action initiated by the user based on the target interface, the hardware device acquisition function in the SCADE Display is called to convert the trigger action into a corresponding operation instruction.
[0077] Optionally, when the hardware trigger acquisition function in the GLUT library detects a trigger action initiated by the user based on the target interface, it calls the hardware device acquisition function in SCADE Display to convert the trigger action into a corresponding operation instruction, including:
[0078] When the mouse event acquisition function provided by the GLUT library detects a mouse event initiated by the user based on the target interface, it calls the mouse acquisition function provided by SCADE Display to convert the mouse event into a control instruction for the peripheral device.
[0079] This optional embodiment provides a specific method for the hardware trigger acquisition function in the GLUT library, upon detecting a trigger action initiated by a user based on a target interface, to call a hardware device acquisition function in SCADE Display to convert the trigger action into a corresponding operation instruction. The mouse event acquisition function glutMouseFunc(mouse) provided by the GLUT library, upon detecting a mouse event initiated by a user based on a target interface, calls the mouse acquisition function mouse provided by SCADE Display to convert the mouse event into a control instruction for a peripheral device. Mouse events include pressing and releasing the left button, pressing and releasing the right button, and so on.
[0080] In a specific example, when the mouse event acquisition function glutMouseFunc(mouse) in the GLUT library detects the user's left mouse button pressing action based on the "speeding prompt logo" in the target interface, it calls the mouse acquisition function mouse as a callback function, and the mouse function converts the left mouse button pressing action initiated based on the "speeding prompt logo" in the target interface into a corresponding operation instruction.
[0081] Optionally, when the hardware trigger acquisition function in the GLUT library detects a trigger action initiated by the user based on the target interface, it calls the hardware device acquisition function in SCADE Display to convert the trigger action into a corresponding operation instruction, and also includes:
[0082] When the GLUT library's keyboard event collection function detects a user-initiated keyboard event on the target interface, it calls the SCADE Display keyboard collection function to convert the keyboard event into control commands for peripheral devices. Keyboard events include key presses, key releases, and key presses. The keyboard event collection function returns the keyboard event and the corresponding ASCII code.
[0083] In this optional embodiment, another specific method is provided in which the hardware trigger acquisition function in the GLUT library calls the hardware device acquisition function in SCADE Display to convert the trigger action into a corresponding operation instruction when it detects a trigger action initiated by the user based on the target interface: the keyboard event acquisition function glutKeyboardFunc (keyboard_callback) provided by the GLUT library detects a keyboard event initiated by the user based on the target interface, and calls the keyboard acquisition function keyboard_callback provided by SCADEDisplay to convert the keyboard event into a control instruction for the peripheral device.
[0084] In a specific example, when the keyboard event collection function glutKeyboardFunc (keyboard_callback) in the GLUT library detects that the user presses the "slow down" key on the keyboard based on the target interface, it calls the keyboard collection function keyboard_callback as a callback function, and the keyboard_callback function converts the action of pressing the "slow down" key on the keyboard into the corresponding operation instruction.
[0085] It is worth noting that the interface refresh function, window size update function, mouse event collection function and keyboard event collection function provided by GLUT mentioned in the embodiment of the present invention are executed cyclically during the program running process until the program ends.
[0086] S240: Send an operation instruction to the peripheral device to instruct the peripheral device to perform an operation associated with the user-triggered action.
[0087] The technical solution of an embodiment of the present invention is that in response to the information to be displayed sent by the train-associated peripheral equipment, the interface drawing function provided by the human-machine interface design software SCADE Display converts the information to be displayed into interface drawing elements. When the interface refresh function in the cross-platform tool library GLUT library detects that the interface drawing function generates the interface drawing elements, the interface drawing function is called to instruct the interface drawing function to call the OGLX image library based on the interface drawing elements to draw and display the target interface. Then, when the hardware trigger acquisition function in the GLUT library detects a trigger action initiated by the user based on the target interface, the hardware device acquisition function in SCADE Display is called to convert the trigger action into a corresponding operation instruction to instruct the peripheral device to perform the operation associated with the user trigger action. By combining the GLUT library with the interface drawing in SCADEDisplay, high adaptability to multiple platforms is achieved.
[0088] Example 3
[0089] Figure 3 This is a schematic diagram of the structure of a human-computer interaction interface control device provided by the third embodiment of the present invention. Figure 3 As shown, the device includes:
[0090] An information conversion module 310 is configured to convert the information to be displayed sent by the train-related peripheral device into interface drawing elements using an interface drawing function provided by the human-machine interface design software SCADE Display;
[0091] The interface drawing module 320 is used for calling the interface drawing function in the cross-platform tool library GLUT library when detecting that the interface drawing function generates interface drawing elements, and drawing and displaying the target interface based on the interface drawing elements;
[0092] The instruction generation module 330 is used for the hardware trigger acquisition function in the GLUT library to call the hardware device acquisition function in SCADE Display when detecting a trigger action initiated by the user based on the target interface, and convert the trigger action into a corresponding operation instruction; the operation instruction is used to instruct the peripheral device to perform the operation associated with the user trigger action.
[0093] The technical solution of an embodiment of the present invention is to respond to the information to be displayed sent by the train-associated peripheral equipment, convert the information to be displayed into interface drawing elements through the interface drawing function provided by the human-machine interface design software SCADE Display, and the interface refresh function in the cross-platform tool library GLUT library calls the interface drawing function when it detects that the interface drawing function generates the interface drawing elements, and draws and displays the target interface based on the interface drawing elements. Then, when the hardware trigger acquisition function in the GLUT library detects the trigger action initiated by the user based on the target interface, it calls the hardware device acquisition function in SCADEDisplay, and converts the trigger action into a corresponding operation instruction for instructing the peripheral equipment to perform the operation associated with the user trigger action. By combining the GLUT library with the interface drawing performed by SCADE Display, high adaptability to multiple platforms is achieved.
[0094] Optionally, the interface drawing module 320 is specifically configured to:
[0095] Calling the interface drawing function to instruct the interface drawing function to call the OGLX image library based on the interface drawing elements to draw and display the target interface;
[0096] The OGLX image library is associated with the OpenGL version adapted by the current program running platform.
[0097] Optionally, the instruction generation module 330 is specifically configured to:
[0098] When the mouse event acquisition function provided by the GLUT library detects a mouse event initiated by the user based on the target interface, the mouse event acquisition function provided by SCADE Display is called to convert the mouse event into a control instruction for the peripheral device.
[0099] Optionally, the instruction generation module 330 is further configured to:
[0100] When the keyboard event acquisition function provided by the GLUT library detects a keyboard event initiated by the user based on the target interface, the keyboard acquisition function provided by SCADE Display is called to convert the keyboard event into a control instruction for the peripheral device.
[0101] Optionally, the human-machine interaction interface control device further includes:
[0102] The window size change module is used to call the window change function provided by Display with the target window size associated with the window adjustment operation as a parameter when the window size update function provided by the GLUT library detects that the user has initiated a window adjustment operation, and changes the current window from the initial window size to the target window size.
[0103] Optionally, the human-machine interaction interface control device further includes:
[0104] a window creation module for, in response to information to be displayed sent by a train-related peripheral device, calling at least one window initialization function provided by the GLUT library to initialize window parameters and create a window before converting the information to be displayed into interface drawing elements using an interface drawing function provided by the human-machine interface design software SCADE Display;
[0105] OGLX parameter initialization module, used to call the OGLX initialization function provided by SCADE Display to initialize OGLX parameters;
[0106] The resource initialization module is used to call the symbol layer initialization function provided by SCADE Display to initialize the Display parameters, and call the resource initialization function provided by SCADE Display to initialize the Display resources.
[0107] Optional, window creation module, specifically used for:
[0108] Call the GLUT library initialization function to initialize the GLUT library;
[0109] Call the window display mode initialization function to initialize the GLUT window display mode;
[0110] Call the window size initialization function to initialize the window size;
[0111] Call the window creation function to create the window, and name the window by calling the window naming function.
[0112] The human-computer interaction interface control device provided in the embodiment of the present invention can execute the human-computer interaction interface control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0113] In the technical solution of the present invention, the information collected is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0114] Example 4
[0115] According to an embodiment of the present invention, the present invention further provides an electronic device, a readable storage medium and a computer program product.
[0116] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, appliances, blade appliances, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0117] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0118] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0119] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the human-computer interaction interface control method.
[0120] In some embodiments, the human-computer interaction interface control method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the human-computer interaction interface control method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the human-computer interaction interface control method in any other appropriate manner (for example, by means of firmware).
[0121] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0122] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or application.
[0123] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0124] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0125] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data applier), or a computing system that includes middleware components (e.g., an application applier), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0126] A computing system may include clients and applications. These clients and applications are typically remote from each other and typically interact via a communication network. This client-application relationship is established by computer programs running on the respective computers, establishing a client-application relationship. The application can be a cloud application, also known as a cloud computing application or cloud host. This is a host product within a cloud computing application ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS applications.
[0127] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0128] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A human-computer interaction interface control method, characterized in that: include: In response to the information to be displayed sent by the train-related peripheral device, the information to be displayed is converted into interface drawing elements through the interface drawing function provided by the human-machine interface design software SCADE Display; When the interface drawing function generates an interface drawing element, the interface refresh function in the cross-platform tool library GLUT library calls the interface drawing function and draws and displays the target interface based on the interface drawing element; When the hardware trigger acquisition function in the GLUT library detects a trigger action initiated by the user based on the target interface, it calls the hardware device acquisition function in SCADE Display to convert the trigger action into a corresponding operation instruction; the operation instruction is used to instruct the peripheral device to perform the operation associated with the user trigger action.
2. The method according to claim 1, characterized in that The calling of the interface drawing function to draw and display the target interface based on the interface drawing elements includes: Calling the interface drawing function to instruct the interface drawing function to call the OGLX image library based on the interface drawing elements to draw and display the target interface; The OGLX image library is associated with the OpenGL version adapted by the current program running platform.
3. The method according to claim 1, characterized in that When the hardware trigger acquisition function in the GLUT library detects a trigger action initiated by the user based on the target interface, it calls the hardware device acquisition function in the SCADE Display to convert the trigger action into a corresponding operation instruction, including: When the mouse event acquisition function provided by the GLUT library detects a mouse event initiated by the user based on the target interface, the mouse event acquisition function provided by SCADE Display is called to convert the mouse event into a control instruction for the peripheral device.
4. The method according to claim 1, wherein When the hardware trigger acquisition function in the GLUT library detects a trigger action initiated by the user based on the target interface, the hardware device acquisition function in the SCADE Display is called to convert the trigger action into a corresponding operation instruction, further comprising: When the keyboard event acquisition function provided by the GLUT library detects a keyboard event initiated by the user based on the target interface, the keyboard acquisition function provided by SCADE Display is called to convert the keyboard event into a control instruction for the peripheral device.
5. The method according to claim 1, wherein Also includes: When the window size update function provided by the GLUT library detects that the user has initiated a window adjustment operation, it calls the window change function provided by Display with the target window size associated with the window adjustment operation as a parameter to change the current window from the initial window size to the target window size.
6. The method according to claim 1, characterized in that In response to the train-related peripheral device sending the information to be displayed, before converting the information to be displayed into interface drawing elements through the interface drawing function provided by the human-machine interface design software SCADE Display, the method further includes: Call at least one window initialization function provided by the GLUT library to initialize window parameters and create a window; Call the OGLX initialization function provided by SCADE Display to initialize the OGLX parameters; Call the symbol layer initialization function provided by SCADE Display to initialize the Display parameters, and call the resource initialization function provided by SCADEDisplay to initialize the Display resources.
7. The method according to claim 6, characterized in that Call at least one window initialization function provided by the GLUT library to initialize window parameters and create the window, including: Call the GLUT library initialization function to initialize the GLUT library; Call the window display mode initialization function to initialize the GLUT window display mode; Call the window size initialization function to initialize the window size; Call the window creation function to create the window, and name the window by calling the window naming function.
8. A human-computer interaction interface control device, characterized in that: include: An information conversion module is configured to respond to information to be displayed sent by a train-related peripheral device and convert the information to be displayed into interface drawing elements using an interface drawing function provided by the human-machine interface design software SCADE Display; An interface drawing module is used for calling the interface drawing function in the cross-platform tool library GLUT library when detecting that the interface drawing function generates interface drawing elements, and drawing and displaying the target interface based on the interface drawing elements; The instruction generation module is used for the hardware trigger acquisition function in the GLUT library to call the hardware device acquisition function in SCADE Display when detecting a trigger action initiated by the user based on the target interface, and convert the trigger action into a corresponding operation instruction; the operation instruction is used to instruct the peripheral device to perform an operation associated with the user trigger action.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the human-computer interaction interface control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the human-computer interaction interface control method according to any one of claims 1 to 7 when executed.
11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the human-computer interaction interface control method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Model-based flight management system man-machine interaction method and device
CN118131908A