Development method and system capable of dynamically extending user interface based on software platform
The method dynamically extracts and customizes type information from software platforms to create extensible user interfaces, overcoming limitations of current platforms by enabling dynamic derivation and extension of windows and controls, enhancing creative design and functionality.
Patent Information
- Application Number
- JP2025146637
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-09
- Filing Date
- 2025-09-04
- Publication Date
- 2025-12-23
Smart Images

Figure 2025186305000001_ABST
Abstract
Description
[Technical Field]
[0001] This application claims priority from Chinese Patent Application No. 202410028558.4 filed on January 9, 2024, the entire contents of which are hereby incorporated by reference.
[0002] The present invention relates to the technical field of vehicle software development, and more particularly to a method and system for dynamically extensible development of a user interface based on a software platform. [Background technology]
[0003] Currently available user interface software platforms that allow for redevelopment only allow users to develop using the provided empty window and control list. For example, users can drag controls from the list to the empty window using the drag method, set attributes, associate control events, write event code, and complete extension development. Summary of the Invention
[0004] The present invention relates to a method and system, including: during the execution of a software platform, an interface manager dynamically extracts type information related to a window in an execution library of the software platform, and inherits the type information to form a dynamically derived base window, and at the same time generates an installation code for the software platform by the interface manager, and generates a code for dynamic creation of a one-time window according to the type information in the installation code of the software platform, and stores the software platform installation code and the code for dynamic creation of a one-time window in a one-time derived code file.
[0005] Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objectives and other advantages of the invention will be realized and obtained by the structure particularly pointed out in the description and drawings. In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. [Brief explanation of the drawings]
[0006] In order to more clearly describe the specific embodiments of the present invention or the technical solutions of the prior art, the following will briefly describe the drawings that need to be used to describe the specific embodiments or the prior art. The drawings described in the following description are some embodiments of the present invention, and it is obvious that those skilled in the art can obtain other drawings from these drawings without any creative efforts. [Figure 1] 1 is a flowchart of a method for dynamically extensible development of a user interface based on a software platform according to some embodiments. [Figure 2] FIG. 2 is a schematic diagram of an interface manager according to some embodiments. [Figure 3] FIG. 10 is a schematic diagram of a dynamically derived base window after dynamic derivation according to some embodiments. [Figure 4] 1 is a partial control list according to some embodiments. [Figure 5] 10 is a diagram illustrating some entries of design window attributes according to some embodiments. [Figure 6] 10 is a partial entry of a control attribute according to some embodiments. [Figure 7] 1 is a graphics display window titled "Graphics 1" according to some embodiments. [Figure 8] 10 is a screenshot image with a target file name of "C:\screenshots\graphics.png" according to some embodiments. [Figure 9]1 is a principle block diagram of a dynamically extensible development system for a user interface based on a software platform according to some embodiments. FIG. [Figure 10] FIG. 1 is a principle block diagram of an electronic device according to some embodiments. DETAILED DESCRIPTION OF THE INVENTION
[0007] In order to clarify the objectives, technical aspects and advantages of the embodiments of the present invention, the technical aspects of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. However, it is clear that the described embodiments are only some of the embodiments of the present invention and do not represent all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without performing creative work fall within the scope of protection of the invention.
[0008] Currently available user interface software platforms that allow for secondary development only allow users to develop using the provided empty windows and control lists. For example, users simply drag controls from the list into the empty window, set attributes, associate them with control events, and create event code to complete the extension development. This extension method limits users to the empty windows and limited controls provided by the software platform, and does not allow for extension development based on existing windows in the software platform, such as drawing windows and system message windows. It is also not possible to design new controls that do not belong to a control list from scratch. This type of user interface extension design is largely limited by the software platform itself, resulting in a single user interface pattern, simple controls, and simple functions, preventing more creative design.
[0009] Accordingly, at least one embodiment provides a method for dynamically extensible development of a user interface based on a software platform, the method including: During the execution of the software platform, the interface manager dynamically extracts type information related to a window in the execution library of the software platform, and inherits the type information to form a dynamically derived base window, and at the same time generates an installation code for the software platform by the interface manager, and generates a code for dynamically creating a one-time window according to the type information in the installation code of the software platform, and stores the software platform installation code and the code for dynamically creating a one-time window in a one-time derived code file.
[0010] Various non-limiting embodiments of examples of the present disclosure are described in detail below with reference to the accompanying drawings. As shown in Figure 1, some embodiments provide a dynamically extensible development method for a user interface based on a software platform, including: In step S101, during the execution of the software platform, type information related to a window in the execution library of the software platform is dynamically extracted by an interface manager, and the type information is inherited to form a dynamically derived base window, and at the same time, an introduction code for the software platform is generated by the interface manager. In step S102, a code for dynamic creation of a one-time window is generated based on the type information in the software platform introduction code, and the software platform introduction code and the code for dynamic creation of a one-time window are stored in a one-time derived code file.
[0011] In some embodiments, when N+1 derivative modifications are made to the attributes and / or call events of the dynamically derived base window, an N+1 derivative code file is generated, which includes N derivative code file installation code, N+1 window dynamic creation code, and / or user code, where N≧1. The N+1 derived code file is executed to form the N+1 derived user interface.
[0012] In some embodiments, during execution of the software platform, the interface manager dynamically extracting type information about the window in the software platform execution library includes: Introduce the RTTI (Run-Time Type Information) unit. That is, before using the RTTI unit, you need to install the system's Run-Time Type Information (e.g., `System.Rtti`) unit in your code within the software platform, and use the above window-related classes and methods in the RTTI unit. Create a context object using the "runtime type information context type" (e.g., `TRttiContext`) class in the system's run-time type information unit, and then obtain the window's "runtime type information" (e.g., `TRttiType`) object using the "runtime type information type acquisition" (e.g., `GetRttiType`) method. From the window's "runtime type information" (e.g., `TRttiType`) object, use the "get properties" (e.g., `GetProperties`) method to get the window's property information, and use the "get methods" (e.g., `GetMethods`) method to get the window's method information.
[0013] In this embodiment, during execution of a software platform, type information related to a window in the software platform's execution library is dynamically extracted, and a dynamically derived base window is formed by inheriting the type information, thereby achieving dynamic derivation. It should be noted that dynamic derivation refers to dynamically extracting type information for each basic window in the program's runtime environment during program execution, and dynamically creating new window types based on the basic window type information. These new window types are derived from the extracted basic window types, and new window objects can be created using these new window types. Compared with static derivation, dynamic derivation allows for dynamic creation of objects, dynamic invocation of methods, dynamic access to attributes, dynamic type conversion and compatibility checking, enumeration and set type traversal, and attribute customization. In other words, dynamic derivation allows for more flexible and dynamic programming, and the code has higher extensibility and maintainability. The dynamic extension development method of this embodiment is applied to the development of a user interface for a software platform, allowing users to develop extensions to existing windows in the software platform without modifying the software platform code or calling a compiler to compile the software. The developed window not only has various functions that the software platform assigns to the window, but is also a dedicated window that is highly customized by the user, which makes the development of user interfaces based on the software platform more efficient and simple.
[0014] Specifically, dynamic extraction refers to type information of windows (in this embodiment, windows in the execution library of the software platform) dynamically extracted from the program's runtime environment while the program is running. If dynamic extraction is required, the program is required to have an RTTI mechanism. The RTTI mechanism is explained as follows: RTTI (Run-Time Type Information) is a mechanism for obtaining relevant type information when a program is run. It can obtain detailed information about classes, interfaces, methods, attributes, etc. at run time, including names, types, access modifiers, etc.
[0015] Specifically, the type information of a window is basic information about the window itself in the execution library of the software platform, such as the window type name information, parent class information, attribute information, method information, field information, structure function and destructor information, interface information, enumeration information, etc.
[0016] As shown in Figure 2, the interface manager is used to create, list, design, save, introduce, derive, encrypt and execute user interfaces, thereby realizing full control over the designed user interfaces.
[0017] The interface manager dynamically extracts type information about windows in the software platform's implementation library (steps) as follows: The type information associated with the window in the software platform's runtime library is obtained by calling the gettype function on the context object provided to the "System Runtime Type Information" unit.
[0018] The obtained type information is used to further obtain information such as fields, attributes, and methods related to the window. The methods of inheritance and derivation are as follows: Based on the acquired window information, a new derived window type is defined, i.e., a dynamically derived base window, which is used to inherit the window-related type information in the software platform execution library, and the dynamically derived base window can call the protected and public methods of the window-related type information in the inherited software platform execution library, read and write its attributes, read and write its fields, etc. Furthermore, based on the defined dynamic derived base window, the software platform allows the user to add new fields, methods and attributes to the dynamic derived base window and controls the behavior of the dynamic derived base window, thereby dynamically inheriting the functions of the new window based on the acquired type information related to the software platform window to realize derivation.
[0019] The following example details how, during execution of the software platform, the interface manager dynamically extracts type information associated with windows in the software platform's execution library and inherits the type information to form dynamically derived base windows. Dynamic derivation is performed on a software platform's base window to form a new window type, thereby creating a new window object, i.e., the new window object is a dynamically derived base window. This requires several steps: 1. Introducing the RTTI unit. Before using the RTTI unit, you need to introduce the `System.Rtti` unit into the code inside the software platform, and use the classes and methods related to the base window in the RTTI unit. 2. To obtain window type information, create a context object using the `TRttiContext` class, and then use the `GetRttiType` method to obtain the `TRttiType` object of the base window. You can obtain the corresponding `TRttiType` object by the type name or instance of the base window. 3. Extracting window attribute and method information. Through the base window's `TRttiType` object, the `GetProperties` method is used to obtain the base window's attribute information, and the `GetMethods` method is used to obtain the base window's method information. By traversing the base window's attribute and method list, information such as the name and type of the base window's attributes can be obtained, and information such as the name and parameters of the base window's methods can be obtained. 4. Dynamically create a one-time derived type based on the extracted type information, inherit the extracted base window type information, and thereby form a window subtype. After instantiating the window subtype, the dynamically derived base window is obtained. The software platform introduction code generated in the process of forming the dynamic derived base window and the one-time window dynamic creation code generated based on the type information in the software platform introduction code are stored in a one-time derived code file.
[0020] As shown in Figure 3, the left side of Figure 3 shows the content of the saved one-time derived code file, in which frmTSForm is the basic window type of the software platform, and new_ is the window subtype after one-time derivation from the basic window type. The right side of Figure 3 shows the dynamically derived base window obtained after instantiating the window subtype new_, which inherits the base window type frmTSForm. Therefore, the new dynamically derived base window also has multiple buttons 10 and a pull-down menu in the upper right corner of the toolbar included in the base window type, and has the functions of corresponding button click events and pull-down menu operation events.
[0021] In some embodiments, the user code is code created by a user. The one-time derived code file is derived based on the software platform's construction language and forms the existing content of the software platform, so the one-time derived code file cannot be edited and does not contain user code. When making derived modifications to the attributes and / or call events of the dynamically derived base window, the user can modify the attributes and / or call events of the dynamically derived base window through a code writing method, so that the N+1-time derived code file can contain user code.
[0022] In some embodiments, the user can further modify the attributes and / or invocation events of the dynamic derived base window by adding invokable controls to the dynamic derived base window. The software platform system forms a control list based on the user's usage habits to configure the invokable controls, and the controls in the control list are called invokable controls, as shown in the right area of Figure 4. The user can embed these invokable controls in the dynamic derived base window by, but not limited to, dragging them from the control list.
[0023] In some embodiments, after a derived action is completed, a corresponding derived code file can be executed to create a derived user interface, which is used to interact with the user.
[0024] In some embodiments, the software platform import code may be in python code language and includes from software platform name import* or import software platform name.
[0025] In some embodiments, the software platform's installation code may further be in C or C++ code language and includes #include "software platform name".
[0026] As an example, the inheritance of the above type information to form a dynamic derived base window will be described in detail below, and the specific process of making derived modifications to the attributes and / or calling events of the dynamic derived base window is as follows: In the type information of the base window, if the window type is TForm, the user of the software platform uses a window design tool provided by the software platform to inherit the window type TForm, create a window subtype TBaseForm, and instantiate a window of the subtype, and then create the above-mentioned dynamically derived base window. By adding a top-display help button to the dynamic derived base window, i.e., by embedding a button control in the dynamic derived base window, the user of the software platform can then click the code generation button in the window design tool to obtain the window dynamic creation code and the corresponding control creation code for the dynamic derived base window. class TBaseForm(TForm): def __init__(self): self.btnHelp = Button(self) self.btnHelp.Parent = self self.btnHelp.Align = "alTop" self.btnHelp.Caption = 'Help' Here, "def__init__(self):" creates an event function definition for the window and modifies its attributes by automatically calling the event. In the above example, the button generation function "Button(self)" is used to assign a value to the dynamic derived base window attribute "btnHelp". Next, the button control attribute "Parent" is set to this dynamic derived base window, and the button control is displayed in the dynamic derived base window. Next, the button control attribute "Align" is set to "alTop", and the button control is aligned to the top of the dynamic derived base window. Next, the button control attribute "Caption" is set to "Help", and the title of this button control is displayed as "Help", i.e., help information.
[0027] In some embodiments, the attributes include visual elements of the window and the control, and sub-members of the window and the control, the sub-members being functional variables and / or behavioral characteristic variables of the window and the control, and the invocation events include one or more of user interaction events, window and control lifecycle events, and window and control functional events.
[0028] In some embodiments, the attributes also include visual elements and sub-members of the control, where the sub-members are function variables and / or behavioral characteristic variables of the control, and the invocation event includes one or more of a user interaction event, a control lifecycle event, and a control function event.
[0029] In some embodiments, the visual elements of the window include, but are not limited to, the color of the window body, the width of the window body, the height of the window body, text information displayed in the window body, the coordinates of the window body on the main screen, transparency, icon, cursor type, etc. The visual elements of the control include, but are not limited to, the color of the control, the width of the control, the height of the control, text information displayed in the control, the coordinates of the control on the parent control, transparency, icon, cursor type, etc.
[0030] As shown in Figure 5, the attribute entries on the right indicate some attributes of the window.
[0031] As shown in Figure 6, the attribute entries on the right indicate some of the attributes of the control.
[0032] In some embodiments, the functionality variables of a window and a control include, but are not limited to, font, drag and drop type, double buffering flag, right button menu, help file, tag value, etc. The behavioral characteristics variables of a window and a control include, but are not limited to, active state, visibility, alignment style, auto-adaptive size, etc.
[0033] In some embodiments, user interaction events include, but are not limited to, click events, cursor key press events, cursor key popup events, cursor enter events, cursor move events, cursor leave events, keyboard press events, keyboard popup events, etc. Window and control lifecycle events include, but are not limited to, create events, destroy events, etc. Window and control functionality events include, but are not limited to, timing events, show events, hide events, resize events, paint events, etc.
[0034] In some embodiments, making derivative modifications to the attributes and / or call events of the dynamic derived base window (step) includes: writing the attributes of the window by assignment and / or associating the event handling function with the call event of the window by assignment, and forming a call relationship with the user code.
[0035] In some embodiments, making derived modifications to the attributes and / or call events of the dynamic derived base window (step) includes: writing attributes of the control by assignment and / or associating an event handling function with the call event of the control by assignment, and forming a call relationship with the user code.
[0036] The following is a detailed description of an example of a specific process for writing window attributes by assignment and establishing a calling relationship with user code. If the window type in the type information of the base window is TForm, the user of the software platform can use the window design tool provided by the software platform to inherit the window type TForm, create a window subtype TBaseForm, instantiate a window of the subtype, and then create the dynamically derived base window. In the window design tool, the user of the software platform can modify the Tag attribute of the dynamically derived base window to 1, and then click the Generate Code button to obtain the window dynamic creation code for the dynamically derived base window. class TBaseForm(TForm): def __init__(self): self.Tag = 1 Here, "self.Tag=1" indicates that the Tag attribute of the dynamically derived base window is written by the substitution method.
[0037] In this example, the user can further modify the attributes and / or call events of the dynamic derived base window through user code added by the user. For example, in the user code, the user can determine the corresponding action based on the Tag attribute of the dynamic derived base window. For example, if Tag is 1, set the title bar text of the dynamic derived base window as "Run Mode=1". The user code can then: if 1 == self.Tag: self.Caption = "Run Mode = 1" and Here, "if1==self.Tag:" means that the user code forms a calling relationship with the attribute "Tag" of the dynamic derived base window, calls the attribute "Tag" of the dynamic derived base window, and further determines the next action of the dynamic derived base window.
[0038] Following the above example, the specific process of associating an event handling function with a window's calling event by assignment and forming a calling relationship with user code will be described in detail as follows: In the user code, the user can associate a customized event handling function with the display event of the dynamic derived base window, and update the title bar text of the dynamic derived base window in the display event, and the user code: def on_show(Sender): self.Caption = “Form displayed” self.OnShow = on_show, Here, "def on_show(Sender):" is a user-customized event processing function in which the user resets the title bar text of the dynamic derived base window. The assignment statement "self.OnShow=on_show" indicates that the user associates the customized event processing function with the display event of the dynamic derived base window by assignment.
[0039] As an example, the specific process of writing control attributes by assignment and establishing a calling relationship with user code will be described in detail as follows: If the window type in the type information of the base window is TForm, the user of the software platform can use the window design tool provided by the software platform to inherit the window type TForm, create a window subtype TBaseForm, instantiate a window of the subtype, and then create the dynamically derived base window. In the window design tool, the user of the software platform can add a button btnTest to the dynamically derived base window, change the Tag of the button btnTest to 1, and then click the code generation button in the window design tool to obtain the window dynamic creation code for the dynamically derived base window and the control creation code for the button btnTest. class TBaseForm(TForm): def __init__(self): self.btnTest = Button(self) self.btnTest.Tag = 1 Here, "self.btnTest=Button(self)" is the control creation code for the button btnTest. "self.btnTest.Tag=1" indicates that the Tag attribute of the button is written using the assignment method.
[0040] In this example, the user can further modify the attributes and / or call events of the control through user code added by the user. For example, in the user code, the user can determine the corresponding action based on the Tag attribute of the button btnTest. For example, if Tag is 1, set the text of the button btnTest to "Run Mode=1". The user code can be if 1 == self.btnTest.Tag: self.btnTest.Caption = "Run Mode = 1" and Here, "if1==self.btnTest.Tag:" means that the user code forms a calling relationship with the attribute "Tag" of the button btnTest, calls the attribute "Tag" of the button btnTest, and further determines the next action of the button btnTest.
[0041] As an optional embodiment of some examples, writing the attributes of a window by way of assignment and forming a calling relationship with user code includes: The function library that the window itself has is called, and the corresponding parameters are constructed and transmitted to the function of the API.
[0042] An example of a specific process for calling a function library that a window itself has, constructing corresponding parameters, and transmitting them to a function of the API will be described in detail below. The user sets the width, height, left distance and top distance of the dynamic derived base window in the window design tool, for example, width=200, height=100, left distance=50, top distance=30, and the corresponding generated code segment for dynamic creation of the window is: self.SetBounds(50, 30, 200, 100) and Here, "SetBounds" is one of the intrinsic functions of the dynamic derived base window, and its function is to set the position and size of the dynamic derived base window on the main screen. It has four parameters. Suppose the corresponding list of parameter names and parameter values is as follows: [Table 1] When the "SetBounds" function is called, the dynamically derived base window's position is set to 50 pixels from the left side of the main screen, 30 pixels from the top, and its width is set to 200 pixels and its height to 100 pixels.
[0043] As an optional embodiment of some examples, writing the attribute of the control by the manner of assignment and forming a calling relationship with the user code includes: The control calls its own function library, constructs the corresponding parameters, and transmits them to the API functions.
[0044] The following describes in detail an example of a specific process for calling a function library that a control has and transmitting corresponding parameters to a function of an API. In the window design tool, a user adds three entries to a list box control (TControl), named "Item 1", "Item 2", and "Item 3", respectively. The corresponding generated code segment for creating the control is as follows: self.ListBox1.Items.Assign(['Item 1','Item 2','Item 3']) Here, "Items.Assign" is one of the intrinsic functions of the list box control, and its function is to set the contents of the list box. It has one parameter, which is a string array. When this function is called, the contents of the list box control will be updated to three lines of text: Item 1, Item 2, and Item 3.
[0045] As an optional embodiment of some examples, writing the attributes of a window by way of assignment and forming a calling relationship with user code includes: The user's function library is called, passing the window attributes as parameters to the API functions.
[0046] An example of a specific process for calling a user's function library and introducing the attributes of the dynamic derived base window as parameters into the API functions will be described in detail below. There is one API function in the user function library “userlib” that brings a window to the front, and its python prototype is defined as follows: def set_top_most(AHandle: int) -> None: "set window to top most" The function has one parameter, which is the window handle. To use the user function library, you must first import the function library into your code, as follows: import userlib Next, the user adds a call code to call the user function to the user code as follows: userlib.set_top_most(self.Handle) When this user function is called, the handle of the dynamic derived base window is transmitted to the user function, and the dynamic derived base window is displayed in the foreground.
[0047] As an optional embodiment of some examples, writing the attribute of the control by the manner of assignment and forming a calling relationship with the user code includes: Call the user's function library and pass the control's attributes as parameters to the API's functions.
[0048] An example of a specific process for calling a user's function library and introducing control attributes as parameters into the API functions will be described in detail below. There is an API function in the user function library “userlib” that sets a text box pattern, and its python prototype is defined as follows: def set_edit_style(AEdit: TEdit) -> None: "set text edit style" This function has a parameter of a textbox object. To use the user function library, you need to first import the function library into your code, as follows: import userlib Next, the user adds a call code to call the user function to the user code as follows: userlib.set_edit_style(self.edtTitle) When the user function is called, the text box object edtTitle is sent to the user function, and the font style of the text box is changed.
[0049] As an optional embodiment of some examples, writing the attributes of a window by way of assignment and forming a calling relationship with user code includes: The function library of the software system is called, and the window attributes are passed as parameters to the functions of the API.
[0050] An example of a specific process for calling a function library of a software system and introducing the attributes of a dynamic derived base window as parameters into the functions of the API will be described in detail below. In this example, it is assumed that the dynamic derivation base window is a graphic display window provided by a software platform, and the graphic display window is a window provided by the software platform for displaying a graphic curve. There is one window screenshot function in the software system function library “app”, and its python prototype definition is as follows: def take_screenshot(ACaption: str, AFileName: str) -> None: "take screenshot of specific form and save it to disk" This function has two parameters: the first parameter is the window title name in text format, which is used to search for the corresponding design window in the software platform; the second parameter is the target file name, which is used to save the screenshot image file to the hard disk. To use the function library of the software system, you first need to import the software platform name into your code, as follows: Import software platform name Next, the user adds a call code to call the software system function to the user code as follows: app.take_screenshot(“Graphics 1”, r“C:\screenshots\graphics.png”) 7 and 8, when this software system function is called, the title name of the graphic display window "Graphics 1" and the target file name "C:\screenshots\graphics.png" are transmitted to the software system function, and the screenshot information of this graphic display window is saved on the hard disk. Also, as can be seen from Fig. 7, the derived graphic display window also has several buttons 10 and a pull-down menu in the upper right corner of the toolbar included in the base window type, and has functions corresponding to button click events and pull-down menu operation events.
[0051] As an optional embodiment of some examples, writing the attribute of the control by the manner of assignment and forming a calling relationship with the user code includes: The software system's function library is called, and the control's attributes are passed as parameters to the API's functions.
[0052] The following provides a detailed description of an example of a specific process for calling a function library of a software system and introducing the control's attributes as parameters to the API's functions. The software system function library “app” has one function that sets system variables in the software platform, and its python prototype is defined as follows: def set_system_var_generic(AName: str, AValue: str) -> None: "set system variable value from string" The function has two parameters: the first parameter is the system variable name, which is used to search for the corresponding system variable in the software platform; and the second parameter is the target setting value in string format, which sets the value of the corresponding system variable to the target setting value. To use the software system function library, the user code must first import the software platform name, as shown below: Import software platform name Next, the user adds a call code to call the software system function to the user code as follows: app.set_system_var_generic('sysvar1', self.Button1.Caption) The first entered parameter "sysvar1" specifies that the name of the corresponding system variable is "sysvar1". The second parameter entered sets the string value of the "Caption" attribute of the control "Button1" as the target setting value of the corresponding system variable. If the string value of the "Caption" attribute of the control "Button1" is "3.5", when this software system function is called, the value of the system variable "sysvar1" is rewritten to "3.5".
[0053] As an optional embodiment of some examples, writing the attributes of a window by way of assignment and forming a calling relationship with user code includes: Call the function library of your coding language and pass the window attributes as parameters to the API functions.
[0054] An example of a specific process for calling a function library of a coding language and introducing window attributes as parameters into the API functions will be described in detail below. Taking the Python language as an example, the user adds the code language function call code to the user code as follows: self.Memo1.Text = dir(self.Icon) Here, "dir" is a function provided by the code language, whose effect is to get all the contents in a class or a module, including variables, methods, functions, and classes. When this code language function is called, the input parameter "self.Icon" reads all the contents of the icon attribute of the dynamic derived base window into the multi-line text box "Memo1".
[0055] As an optional embodiment of some examples, writing the attribute of the control by the manner of assignment and forming a calling relationship with the user code includes: Call the function library of your coding language and introduce the control's attributes as parameters to the API's functions.
[0056] The following provides a detailed description of an example of a specific process for calling a function library of a coding language and introducing control attributes as parameters to the API functions. Taking the Python language as an example, the user adds the code language function call code to the user code as follows: print(self.Button1.Caption) Here, "print" is a function provided by the code language, whose effect is to print the string of the corresponding parameter in the software system. After the code language function is called, the "Caption" attribute of the control "Button1", that is, the tag content of the control "Button1", is printed to the software system according to the input parameter "Button1.Caption".
[0057] As described above, the dynamic derivation base window and the attributes and / or calling events of the controls embedded in the dynamic derivation base window can be modified to achieve modification of the dynamic derivation base window. Users can also perform multiple modifications of the dynamic derivation base window based on their needs, with each modification being based on the previous modification. For example, a vehicle factory can continuously add important signals related to the entire vehicle to the graphic display window after the first modification of the dynamic derivation base window and display them in a fixed position in the graphic display window. For example, vehicle speed, wheel speed, etc. can be displayed, forming a secondary modification-derived graphic display window. Based on the secondary modification-derived graphic display window sent from the vehicle factory, different parts manufacturers can subsequently add special signals belonging to their respective parts manufacturers to their corresponding windows and display them fixedly in the secondary modification-derived graphic display window. For example, brake deceleration, yaw angle velocity, etc. can be displayed, thereby forming three or more modification-derived graphic display windows.
[0058] 9, some embodiments further provide a dynamically extensible development system for a user interface based on a software platform, the system including: The base dynamic derivation module is configured to dynamically extract type information related to a window in the execution library of the software platform by an interface manager during execution of the software platform, and inherit the type information to form a dynamically derived base window, and simultaneously generate software platform installation code by the interface manager. The derived code obtaining module is configured to generate a code for dynamic creation of a one-time window according to type information in the software platform installation code, and store the software platform installation code and the code for dynamic creation of a one-time window in a one-time derived code file.
[0059] In some embodiments, the computer device further generates an N+1-time derived code file when performing N+1-time derived modifications to attributes and / or call events of the dynamically derived base window, wherein the N+1-time derived code file executes the N-time derived code file installation code, the N+1-time window dynamic creation code and / or user code, where N≧1, and the N+1-time derived code file to form an N+1-time derived user interface. Here, the specific implementation functions of the base dynamic derivation module and the derivation code acquisition module are realized in a processor or computer device, and for specific details, reference can be made to the content of the above-mentioned software platform-based dynamically extensible user interface development method, and the description here is omitted.
[0060] Hereinafter, electronic devices according to several embodiments will be described from the viewpoint of hardware processing, but the specific realization of the electronic devices is not limited. 10 , the electronic device includes a processor, a readable storage medium, a communication bus, and a communication interface. The processor, the readable storage medium, and the communication interface communicate with each other via the communication bus. The readable storage medium is used to store a program that executes a dynamically extensible development method for a user interface based on the software platform, and the processor is configured to execute the program for the dynamically extensible development method for a user interface based on the software platform.
[0061] In other embodiments, computer devices and industrial personal computers can also be considered as types of electronic equipment.
[0062] It should be noted that the configuration shown in FIG. 10 is not intended to limit the electronic device, which may include fewer or more components than those shown, may combine some components, or may have different component arrangements.
[0063] In some embodiments, the communication interface may be a communication interface connectable to an external bus adapter, such as RS232, RS485, a USB port, a TYPE port, etc. A wired or wireless network interface may also be included, and the network interface may optionally include a wired and / or wireless interface typically used to establish a communication connection between the computing device and other electronic devices (e.g., a WI-FI interface, a Bluetooth interface, etc.).
[0064] The readable storage medium or computer-readable storage medium includes at least one type of memory. Memory includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, it may be an internal storage unit of a computer device, such as a hard disk of the computer device. In other embodiments, the memory may be an external storage device of a computer device, such as a plug-in hard disk installed in the computer device, a SmartMedia Card (SMC)®, a Secure Digital Card (SD), a Flash Card, etc. Furthermore, the memory may include both an internal storage unit of a computer device and an external storage device. The memory is used to store various data, such as application software and computer program code installed in the computer device, as well as to temporarily store output data or data to be output.
[0065] In some embodiments, the processor may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip that executes program code stored in memory or processes data, for example, to execute a computer program.
[0066] In some embodiments, the communication bus may be an input / output bus, which may be a Peripheral Component Interconnect (PCI) bus or an Enhanced Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.
[0067] In some embodiments, a computer device includes a processor, a readable storage medium electrically connected to the processor, and a display module. The readable storage medium is used to store a program for executing a dynamically extensible development method for a user interface based on the software platform. The processor is configured to execute the program to generate a corresponding user interface. The display module is configured to display the user interface.
[0068] Optionally, the computer device may further include a user interface. The user interface may include input units such as a display and a keyboard, and optionally, the user interface may also include a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. In this case, the display is also called a display screen or a display unit, since it displays information processed in the computer device and a visualized user interface.
[0069] When the processor executes the program, it realizes the steps in the embodiment of the dynamically extensible development method for a user interface based on a software platform shown in Fig. 1. For example, steps S101 to S102 shown in Fig. 1. Alternatively, when the processor executes the computer program, it realizes the functions of each module or unit in the embodiments of each device.
[0070] This embodiment further provides a computer-readable storage medium, which stores a program for a dynamically extensible development method for a user interface based on a software platform. When the program is executed by a processor, the specific steps of the dynamically extensible development method for a user interface based on a software platform can be realized. Please refer to the specific description of the dynamically extensible development method for a user interface based on a software platform, and the description will be omitted here.
[0071] Some embodiments further provide a computer program product, comprising computer programs or commands, which, when executed by a computer, cause the computer to perform the method for dynamically extensible development of user interfaces based on any of the possible software platforms.
[0072] In some embodiments of the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely examples. For example, the flowcharts and block diagrams in the drawings illustrate possible architectures, functions, and operations of apparatuses, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, a program segment, or a portion of code. The module, program segment, or portion of code includes executable instructions for implementing one or more predetermined logical functions. Note that in some alternative implementations, the functions depicted in the blocks may occur in a different order than depicted in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented in a dedicated hardware-based system that performs the predetermined functions or operations, or in a combination of dedicated hardware and computer instructions.
[0073] Furthermore, each functional module in each embodiment of the present invention may be integrated together to form a single independent part, each module may exist independently, or two or more modules may be integrated to form a single independent part.
[0074] The above functions can be realized in the form of software functional modules and stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention essentially or a part that contributes to the prior art or a part of the technical solution can be expressed in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention.
[0075] The above-described preferred embodiments of the present invention have been enlightened, and those skilled in the art can make various changes and modifications based on the above description without departing from the technical spirit of the present invention. The technical scope of the present invention is not limited to the content of the specification, but should be determined based on the claims.
Claims
1. A dynamically extensible development method for a user interface based on a software platform, comprising: During execution of the software platform, dynamically extracting type information for a window in an execution library of the software platform by an interface manager, and inheriting the type information to form a dynamically derived base window; When N+1 times derivative modifications are made to the attributes and / or call events of the dynamic derived base window, an N+1 times derivative code file is generated, and the N+1 times derivative code file includes N times derivative code file installation code, N+1 times window dynamic creation code and / or user code, where N≧1; A dynamically extensible development method for a user interface based on a software platform, comprising: executing an N+1-times derived code file to form an N+1-times derived user interface.
2. During execution of the software platform, the interface manager dynamically extracts type information about windows in the software platform execution library. introducing a system runtime type information unit into code within the software platform and using classes and methods related to said window in said unit; Creating a context object using the "runtime type information context type" class in the system's run-time type information unit, and then obtaining the "runtime type information" object of the window by the "runtime type information type obtain" method; 2. The dynamically extensible development method for a user interface based on a software platform as described in claim 1, further comprising: obtaining property information of the window using a "get property" method from a "runtime type information" object of the window; and obtaining method information of the window using a "get method" method.
3. The dynamically extensible development method for user interfaces based on a software platform according to claim 1, characterized in that the interface manager is used to create, list, design, save, introduce, derive, encrypt and execute user interfaces.
4. The attributes include the visual elements and sub-members of the window; The sub-members are function variables and / or behavioral characteristic variables of the window; 2. The method for dynamically extensible development of a user interface based on a software platform according to claim 1, wherein the calling event is one or more of a user interaction event, a window life cycle event, and a window function event.
5. Making derived modifications to the attributes and / or invoke events of a dynamic derived base window includes: Write window attributes by assignment and establish a call relationship with user code; 2. The method for dynamically extensible development of a user interface based on a software platform according to claim 1, further comprising: associating an event handling function with a window's calling event by way of assignment.
6. Write the window attributes by assignment and establish a calling relationship with the user code. Call the function library that the window itself has, and construct the corresponding parameters and pass them to the API functions; Alternatively, the user can call a function library and pass the window attributes as parameters to the API functions. Alternatively, by calling a function library of the software system and passing the window attributes as parameters to the API functions, Alternatively, the dynamically extensible development method for a user interface based on a software platform according to claim 5, further comprising the step of calling a function library of a code language and introducing the window attributes as parameters into the API functions.
7. A dynamically extensible development system for a user interface based on a software platform, comprising: a computer device, the computer device comprising: a base dynamic derivation module configured to dynamically extract, during execution of the software platform, type information for a window in an execution library of the software platform by an interface manager, and inherit the type information to form a dynamically derived base window; The computer device further comprises: when N+1 derivative modifications are made to attributes and / or call events of the dynamically derived base window, creating an N+1-times derived code file, the N+1-times derived code file including N-times derived code file installation code, N+1-times window dynamic creation code and / or user code, where N≧1; and executing the N+1-times derived code file to form an N+1-times derived user interface.
8. The attributes include the visual elements and sub-members of the window; The sub-members are function variables and / or behavioral characteristic variables of the window; 8. The dynamically extensible development system for a user interface based on a software platform according to claim 7, wherein the invocation event includes one or more of a user interaction event, a window life cycle event, and a window function event.
9. A computer-readable storage medium, comprising: The computer-readable storage medium stores a program for executing a dynamically extensible development method for a user interface based on the software platform according to any one of claims 1 to 6. A computer-readable storage medium.
10. 1. A processor, comprising: A processor, characterized in that the processor is configured to execute a program of the dynamically extensible development method for a user interface based on a software platform according to any one of claims 1 to 6.
11. An electronic device, a processor, a readable storage medium, a communication bus, and a communication interface; the processor, the readable storage medium, and the communication interface communicate with each other via the communication bus; The electronic device is characterized in that the readable storage medium is used to store a program that executes a dynamically extensible development method for a user interface based on the software platform described in any one of claims 1 to 6, and the processor is configured to execute the program of the dynamically extensible development method for a user interface.
12. 1. A computer device comprising: a processor; a readable storage medium and a display module electrically connected to the processor; The readable storage medium is used to store a program for executing a dynamically extensible development method for a user interface based on a software platform according to any one of claims 1 to 6, the processor is configured to execute the program to generate a corresponding user interface; The computer device, wherein the display module is configured to display the user interface.
13. A program for causing a computer to execute the dynamically extensible development method for a user interface based on the software platform according to any one of claims 1 to 6.
14. A computer-readable recording medium having recorded thereon a program for causing a computer to execute the dynamically extensible development method for a user interface based on the software platform according to any one of claims 1 to 6.
15. A computer-implemented software platform, characterized in that the computer-implemented software platform executes the dynamically extensible development method for user interfaces based on the software platform according to any one of claims 1 to 6.