CN115543262A - Entity function implementation method and device based on engine capability and electronic equipment - Google Patents

Entity function implementation method and device based on engine capability and electronic equipment Download PDF

Info

Publication number
CN115543262A
CN115543262A CN202110729945.7A CN202110729945A CN115543262A CN 115543262 A CN115543262 A CN 115543262A CN 202110729945 A CN202110729945 A CN 202110729945A CN 115543262 A CN115543262 A CN 115543262A
Authority
CN
China
Prior art keywords
node
target
function
name
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110729945.7A
Other languages
Chinese (zh)
Inventor
徐远
马锐锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202110729945.7A priority Critical patent/CN115543262A/en
Priority to PCT/CN2022/091676 priority patent/WO2023273617A1/en
Publication of CN115543262A publication Critical patent/CN115543262A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Abstract

The embodiment of the disclosure relates to an entity function realization method, an entity function realization device and electronic equipment based on engine capability, wherein the method comprises the following steps: responding to the trigger operation of the target object name, and displaying an entity node corresponding to the target object name on a configuration panel; searching node names which are constructed in advance and represent the engine capability, responding to the triggering operation of at least one target node name which is associated with the target object name and realizes the target function in the node names, and displaying at least one target node corresponding to the at least one target node name on a configuration panel; and responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement, and driving each target node to run the engine capability to realize the target function. By adopting the technical scheme, developers do not need to write a large amount of codes to expose the engine capability, high-efficiency development is realized, and development cost is reduced.

Description

Entity function implementation method and device based on engine capability and electronic equipment
Technical Field
The disclosure relates to the technical field of visual programming, and in particular to an entity function implementation method and device based on engine capability and an electronic device.
Background
Under an Entity-Component-System (ECS) architecture, the order of calling a certain function using an engine is: entity- > gets component- > uses property or method. In software development, hundreds of components, attributes and methods in an engine are used, and if each component, attribute and the like are written in codes, extremely high development cost is brought, and the efficiency is low.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the present disclosure provides an entity function implementation method and apparatus based on engine capability, and an electronic device.
The embodiment of the disclosure provides an entity function implementation method based on engine capability, which comprises the following steps:
responding to a trigger operation of a target object name, and displaying an entity node corresponding to the target object name on a configuration panel;
searching node names which are constructed in advance and represent engine capacity, and responding to triggering operation of at least one target node name which is associated with the target object name and realizes a target function in the node names, and displaying at least one target node corresponding to the at least one target node name on the configuration panel;
and responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement, and driving each target node to run the engine capability to realize the target function.
The embodiment of the present disclosure further provides an entity function implementing device based on engine capability, where the device includes:
the first display module is used for responding to the trigger operation of the target object name and displaying the entity node corresponding to the target object name on a configuration panel;
the second display module is used for searching node names which are constructed in advance and represent the engine capability, responding to the triggering operation of at least one target node name which is associated with the target object name and realizes the target function in the node names, and displaying at least one target node corresponding to the at least one target node name on the configuration panel;
and the driving module is used for responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement and driving each target node to run the engine capability to realize the target function.
An embodiment of the present disclosure further provides an electronic device, which includes: a processor; a memory for storing the processor-executable instructions; the processor is used for reading the executable instructions from the memory and executing the instructions to realize the entity function realization method based on the engine capability provided by the embodiment of the disclosure.
The embodiment of the present disclosure also provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is used to execute the entity function implementation method based on the engine capability provided by the embodiment of the present disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: in the entity function implementation scheme based on the engine capability provided by the embodiment of the disclosure, in response to a trigger operation on a target object name, an entity node corresponding to the target object name is displayed on a configuration panel; searching node names which are constructed in advance and represent the engine capability, responding to the triggering operation of at least one target node name which is associated with a target object name and realizes a target function in the node names, and displaying at least one target node corresponding to the at least one target node name on a configuration panel; and responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement, and driving each target node to run the engine capability to realize the target function. By adopting the technical scheme, the target node corresponding to the target node name can be displayed only by searching the pre-constructed node name and triggering the required target node name, and then the connection relation between the nodes is configured according to the logic requirement to realize the target function, so that developers do not need to write a large amount of codes to expose the engine capability, the high-efficiency development is realized, and the development cost is reduced.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a schematic flowchart of a method for implementing an entity function based on engine capability according to an embodiment of the present disclosure;
FIG. 2A is an exemplary first graph of searching for node names representing engine capabilities;
FIG. 2B is an exemplary diagram two of searching for node names representing engine capabilities;
FIG. 2C is a third exemplary diagram of searching for node names representing engine capabilities;
fig. 3 is a schematic flowchart of another method for implementing an entity function based on engine capability according to an embodiment of the present disclosure;
FIG. 4A is an exemplary diagram of a generated component node;
FIG. 4B is an exemplary diagram of a generated read attribute node and set attribute node;
FIG. 4C is an exemplary diagram of a generated function node;
FIG. 5 is a diagram of an example of a visual programming for implementing a click-screen offset-by-paste function using an engine capability based entity function implementation provided by the present disclosure;
fig. 6 is a schematic structural diagram of an entity function implementing device based on engine capability according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of another entity function implementation device based on engine capability according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein is intended to be open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
In order to solve the above problem, embodiments of the present disclosure provide a method for implementing an entity function based on engine capability, and the method is described below with reference to specific embodiments.
Fig. 1 is a flowchart illustrating a method for implementing an entity function based on engine capability according to an embodiment of the present disclosure, where the method may be performed by an entity function implementing apparatus based on engine capability, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 1, the method includes:
and 101, responding to the trigger operation of the target object name, and displaying an entity node corresponding to the target object name on a configuration panel.
The target object includes an entity, the name of the target object is an entity name, the target object refers to an object that needs to be operated to implement a target function, for example, if the target function to be implemented is to control the camera to rotate, the camera is the target object, and for example, if the target function to be implemented is to control the position of the 2-dimensional image to move, the 2-dimensional image is the target object.
In the embodiment of the present disclosure, the entity node corresponding to the target object name may be pre-packaged and displayed in a toolbar area of the configuration panel, when the target object needs to be controlled to implement a certain function, a developer may find the target object name of the target object from the toolbar area and perform a trigger operation on the target object name, and the entity function implementation device based on the engine capability displays the entity node corresponding to the target object name on the configuration panel in response to the trigger operation.
The trigger operation includes, but is not limited to, a mouse click, a touch pen click, a finger click, a mouse drag, a touch pen drag, a finger drag, and the like, which is not limited in this disclosure.
And 102, searching node names which are constructed in advance and represent the engine capability, responding to the triggering operation of at least one target node name which is associated with a target object name and realizes a target function in the node names, and displaying at least one target node corresponding to the at least one target node name on a configuration panel.
The node name representing the engine capability refers to a name of a visual node which needs to be relied on for realizing a certain function, one visual node represents a specific engine capability, the visual node can comprise a component node, a read attribute node, a function node and the like, the engine capabilities of the component node and the read attribute node can provide data for other nodes, and the engine capability of the function node can open logic control capability and complex engine functions for users.
It can be understood that, for a developer, which engine capabilities are required to be relied on for realizing a certain function is basic knowledge possessed by the developer, in the embodiment of the present disclosure, node names representing the engine capabilities may be constructed in advance, and when the developer needs to realize a target function for a target object, the node names of the nodes constructed in advance may be searched, and at least one target node name may be determined from each node name, where the at least one target node name is a node name associated with the target object and used for realizing the target function. The developer performs a trigger operation on at least one target node name, and in response to the trigger operation, the engine capability-based entity function implementation apparatus displays a target node corresponding to each target node name on the configuration panel.
For example, if the target function that the developer needs to implement is the position offset of a sticker when clicking a screen, the target object is a sticker, and the name of the target object is denoted as Sprite2D. The developer knows that Transform2D is required for implementing the position offset function, and can search each pre-constructed node name to find the Transform2D component. In the embodiment of the present disclosure, different ways may be adopted to find the Transform2D component associated with the target object name Sprite2D, which are described below respectively.
As an example, FIG. 2A is an exemplary diagram I of searching node names representing engine capabilities, as shown in FIG. 2A, since it is a component to be searched, a developer can input an index character string "comp" of the component in a pre-constructed node name to search for an existing component name, and then find a target node name associated with a target object (Sprite 2D) from a plurality of node names displayed in a search result list according to a current target object (Sprite 2D) and a target component (Transform 2D) to be searched, as shown in FIG. 2A, the target node name is "comp:: getTransform2D (Sprite 2D)".
As another example, fig. 2B is an exemplary diagram of searching for node names representing engine capabilities, as shown in fig. 2B, since a Transform2D component is to be searched, the developer may input a character string "Transform2D" or a partial character string (such as input Tran or Tran) of the Transform2D to search, and take the input character string Tran as an example in fig. 2B, and then, according to the current target object (Sprite 2D), find a target node name associated with the target object (Sprite 2D) from node names of all Transform2D components shown in the search result list, as shown in fig. 2B, the target node name is "comp:: getTransform2D (Sprite 2D)".
As another example, fig. 2C is a third example diagram of searching node names representing engine capabilities, as shown in fig. 2C, a developer may call a search box by leading out a connection line from an entity node (Sprite 2D) corresponding to a target object name, all node names associated with the target object (Sprite 2D) may be displayed below the search box, and the developer may search for the target node name by searching from a list or inputting a character string (e.g., inputting a Transform) associated with a Transform2D component to be searched in the search box, as shown in fig. 2C, the target node name is "comp:: getTransform2D (Sprite 2D)", thereby implementing a focused search and improving search efficiency.
Thereafter, when the developer triggers (e.g., mouse clicks) the searched target node name, a target node corresponding to the target node name is displayed on the configuration panel.
And 103, responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement, and driving each target node to run the engine capability to realize the target function.
In the embodiment of the present disclosure, after the entity nodes and the plurality of target nodes are displayed on the configuration panel, a developer may configure connection relationships between the entity nodes and the target nodes according to logic requirements, perform connection triggering operations, such as connecting the entity nodes with inputs of target nodes representing components in the target nodes to obtain components associated with target objects, connecting outputs of the target nodes representing components with inputs of the target nodes representing attributes to set attribute information of the components, and so on. The entity function realization device based on the engine capability responds to the connection triggering operation between the entity node and each target node, configures the connection relationship between the nodes, and then drives each target node to operate the engine capability according to the connection relationship, thereby realizing the target function.
The entity function implementation method based on the engine capability according to the embodiment of the disclosure displays entity nodes corresponding to target object names on a configuration panel in response to trigger operations on the target object names, searches node names which are constructed in advance and represent the engine capability, displays at least one target node corresponding to the at least one target node name on the configuration panel in response to trigger operations on at least one target node name which is associated with the target object names and implements the target function in the node names, and further drives each target node to operate the engine capability to implement the target function in response to trigger operations on connections between the entity nodes and each target node according to logic requirements. By adopting the technical scheme, the target node corresponding to the target node name can be displayed only by searching the pre-constructed node name and triggering the required target node name, and then the connection relation among the nodes is configured according to the logic requirement, so that the target function can be realized, developers do not need to write a large amount of codes to expose the engine capability, the high-efficiency development is realized, and the development cost is reduced.
In some embodiments, the target nodes include a control class target node having a control trigger port and a data class target node having all ports as data ports, so that driving each target node to run the engine capability realizes the target function, including:
when the control type target node is triggered, acquiring data information provided by a data type target node connected with the control type target node;
and processing according to the operation logic and the data information of the control type target node, and outputting a corresponding processing result to realize a target function.
Illustratively, a set attribute node having a control trigger port is a control type target node, and a read attribute node for obtaining an attribute value corresponding to an attribute of a component node is a data type target node.
In the embodiment of the disclosure, a developer executes a connection triggering operation between an entity node and a control target node and a data target node to configure a connection relationship between the nodes, and an entity function implementation device based on an engine capability responds to the connection triggering operation to configure the connection relationship between the entity node, the control target node and the data target node, and when the control target node is triggered, the control target node reads data information from the data target node connected thereto, and completes a specific control task operation according to an operation logic of the control target node and the read data information, and further outputs a corresponding processing result to implement a target function.
For example, assuming that the target function to be realized is to change the size of the sticker when the screen is clicked, clicking a node corresponding to the screen inputs a control flow to the control type target node, and the control type target node for changing the size of the sticker is triggered, at this time, the control type target node obtains data provided by the data type target node connected to the control type target node, calculates the size of the sticker according to the operation logic of the control type target node and the obtained data, and then outputs the calculated size of the sticker to realize the change of the size of the sticker.
According to the scheme, when the control type target node is triggered, the data information provided by the data type target node connected with the control type target node is obtained, the processing is carried out according to the operation logic and the data information of the control type target node, the corresponding processing result is output to realize the target function, the target function can be realized based on the engine capability of each target node only by configuring the connection relation among all the target nodes, the program codes are prevented from being written manually, and the development efficiency is improved.
Fig. 3 is a schematic flowchart of another method for implementing an entity function based on engine capability according to an embodiment of the present disclosure, and this embodiment further optimizes the method for implementing an entity function based on engine capability on the basis of the foregoing embodiment. As shown in fig. 3, the method includes:
step 201, obtaining a configuration file for storing engine data.
The engine data may be determined according to an engine running instance, and the engine running instance is implemented depending on engine capabilities operated by data of several components, attributes, function methods, and the like, so in the embodiment of the present disclosure, the engine data may include, but is not limited to, all data of components, attributes, function methods, and the like, which the engine runs on when the engine runs on an instance.
In the embodiment of the present disclosure, the configuration file may be generated in advance and stored locally, may also be acquired from a server, and may also be generated according to an engine runtime instance, which is not limited in this disclosure.
As a possible implementation manner, the configuration file may be generated in real time, and the obtaining of the configuration file for saving the engine data includes: acquiring a current engine Runtime Type Information RTTI (Runtime Type Information) attribute through an engine Runtime instance; and acquiring the class name, the attribute, the function and the inheritance relationship contained in the RTTI object according to the RTTI attribute, and storing the class name, the attribute, the function and the inheritance relationship into a configuration file in a json format.
The inheritance relationship refers to the inheritance relationship between RTTI classes of an engine, namely, a certain RTTI class inherits to which parent class, and the inherited attribute and function method can be obtained through the inheritance relationship.
The method includes that the engine has RTTI attributes, information such as runtime types and object attributes can be acquired, when the engine is loaded, all RTTI information during the operation of the engine is acquired through an engine operation instance, inheritance relationships of each RTTI class and exposed attributes and function methods of the RTTI classes can be acquired through the RTTI information, relevant information of each RTTI class is analyzed, and the relevant information can be recorded in a json file and stored into a configuration file in a json format.
As an example, the json-formatted configuration file may include a class name of the RTTI class, a parent class that the RTTI class inherits, attribute information and function information of the RTTI class. The subclass can inherit the attribute and the function method of the parent class, and the attribute information includes but is not limited to an attribute name, an attribute RTTI type and whether the attribute is readable and writable; the function information includes, but is not limited to, the name of the function, the type of RTTI returned by the function, the number of parameters required by the function, and the type of RTTI.
In the technical scheme, the runtime instance comprises all components, attributes and functions available for the current engine version and the running environment, so that all RTTI attributes of the current engine are obtained through the engine running instance, the class name, the attribute, the function and the inheritance relationship contained in the RTTI object are obtained according to the RTTI attributes, and the configuration file obtained in the manner of the json-format configuration file is stored, all engine data meeting the current engine version and the running environment are recorded, and when the device is used, the risk of engine crash caused by calling the closed, limited or isolated function can be effectively avoided. Moreover, the class name, the attribute, the function and the inheritance relationship contained in the RTTI object are stored into a json-format configuration file, so that flexible function configuration and issuing can be realized, and a rapid node searching function can be realized.
It should be noted that, the configuration file is in json format only as an example, and the configuration file may also be in other formats, such as YAML format, INI format, etc., which is not limited in this disclosure.
As another possible implementation manner, the configuration file may be issued by the server along with the engine version, the server generates the configuration file corresponding to each instance in advance according to the instance in which the engine of the current version can operate, and issues the configuration file to the client along with the engine version, and the client stores the configuration file locally when installing the engine, so that when the entity function implementation apparatus based on the engine capability according to the present disclosure is implemented, the configuration file in which the engine data is stored may be obtained locally by the entity function implementation apparatus based on the engine capability.
Step 202, building node names representing the engine capability according to the configuration files, and building nodes corresponding to the node names and used for being displayed on the configuration panel.
In the embodiment of the present disclosure, after the configuration file for storing the engine data is obtained, the node name representing the engine capability may be constructed for searching according to the configuration file, and the node corresponding to each node name and displayed on the configuration panel may be constructed.
As a possible implementation manner, the corresponding class node name, attribute node name, and function node name may be generated according to the class name, attribute, and function recorded in the configuration file, the attribute node corresponding to the attribute node name may be generated according to the attribute name and attribute type recorded in the configuration file, and the function node corresponding to the function node name may be generated according to the function name, the return type, and the parameter of the function.
As another possible implementation manner, when the configuration file is in a json format, building node names representing engine capabilities according to the configuration file, and building nodes corresponding to the node names for presentation on the configuration panel, includes:
analyzing the configuration file in the json format to acquire the class name of the RTTI object, and generating the node name of the component node according to the class name; wherein the component node comprises: an input port for inputting the entity node to which the component node belongs and an output port for outputting the component node-related function object.
Wherein, the output of the output port of the component node is related to the function of the component node, for example, the function of the component node "comp:: getTransform" is to obtain a Transform component of the entity node, and then the output object of the output port of the component node is the Transform component.
For example, assume that the content recorded in the json-formatted configuration file includes: the RTTI type is named as 'Transform 2 d', the parent class inherited by the RTTI type is 'Transform', the attribute name is 'Position' in the attribute information corresponding to the RTTI type, the attribute RTTI type is 'Vector 2 f', the attribute is readable and writable, the function name is 'setWorldPosition' in the function information corresponding to the RTTI type, the RTTI type returned by the function is 'Vector 3 f', the number of input parameters required by the function is 2, and the RTTI type of each input parameter is 'Vector 3 f'. When the configuration file in the json format is analyzed, the parent class of the RTTI class is Transform, the class name of the RTTI class is Transform2d, and then the node name of the component node can be generated as comp:: getTransform2d according to the class name. In order to facilitate the developer to distinguish the entity to which the component belongs, the RTTI object may be labeled, and assuming that the RTTI object corresponding to the class name Transform2D is a 2D picture, the component node name may be labeled as "comp:: getTransform2D (2D picture)".
Since the component nodes themselves do not need to have a logical control function, as long as data is provided, these data-only nodes do not provide control input and output, and therefore the component nodes do not contain control input, the component nodes input the Entity (RTTI object) holding the component, and output the component object desired to be acquired. That is, the component node includes an input port for inputting the Entity node to which the component node belongs, and an output port for outputting the component-related function object, and the output is empty if the component does not exist in the Entity. Fig. 4A is an exemplary diagram of a generated component node, and as shown in fig. 4A, the component node includes only one input port (Entity) and one output port, an input data stream of the input port is a 2D picture of the Entity node, and an output data stream of the output port is the component Transform2D.
Optionally, parsing the json format configuration file may also generate an attribute node name and a corresponding attribute node. Specifically, the method comprises the following steps:
analyzing a json format configuration file, acquiring an attribute information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating a node name of an attribute node according to the attribute name of the attribute information array; wherein the attribute nodes include a read attribute node and a set attribute node, wherein,
reading the attribute node includes: the input port is used for inputting the component node to which the read attribute node belongs and the output port is used for outputting the attribute value corresponding to the read attribute node;
setting the attribute nodes includes: the input port for controlling the trigger, the input port for inputting the component node to which the set attribute node belongs, the input port for acquiring the attribute value, the output port for controlling the trigger, and the output port for outputting the set attribute value.
Specifically, the attribute node may be generated according to the attribute information in the json-formatted configuration file, and since the parent class of the RTTI class is recorded, the parent class of the RTTI component may be known, and the inherited attribute may be acquired. According to whether the attribute is readable and writable, a read attribute node (when the attribute is readable) and a set attribute node (when the attribute is writable) can be generated. The read attribute node is used for providing data for other nodes, and has no logic control function, so the read attribute node comprises an input port and an output port, the input port is used for inputting the component node to which the read attribute node belongs, namely inputting the component needing to acquire the attribute, and the output port is used for outputting the attribute value corresponding to the read attribute node. The setting attribute node needs to be opened to the logic control capability of developers, and enables the developers to control the conditions under which the node sets the attribute, so that the setting attribute node has a control flow input port and an output port, the setting attribute node needs to input components and attribute data, and the data is used as output data of the output port. Therefore, the set attribute node includes three input ports, which are an input port for controlling a trigger, an input port for inputting a component node to which the set attribute node belongs, and an input port for acquiring an attribute value, respectively, and two output ports, which are an output port for controlling a trigger and an output port for outputting a set attribute value, respectively. When the attribute setting node is used for controlling the triggered input port to have data stream input, the attribute setting node acquires a component needing attribute setting, and sets an attribute value corresponding to the component as an input value.
Continuing with the above configuration file in json format as an example, according to the attribute information array recorded in the configuration file, the attribute name "Position" can be determined, and the attribute can be determined to be readable and writable, and the configuration file is analyzed to know that the attribute array inherits the class name "Transform2d", then the read attribute node name "getPosition (Transform 2 d)" can be generated, and the set attribute node name "setPosition (Transform 2 d)" is generated. And, a read attribute node and a set attribute node may be generated according to the configuration file, as shown in fig. 4B. As can be seen from fig. 4B, the read attribute node (getoutput) includes an input port (Transform 2 d) for inputting the component node to which the read attribute node belongs and an output port for outputting the attribute value corresponding to the read attribute node, and the set attribute node (setoutput) includes three input ports and two output ports, where the input ports are a control port (Trigger), a port (Transform 2 d) for inputting the component node to which the set attribute node belongs, and a get attribute value port (indicated by an attribute value type Vector2 f), respectively.
Optionally, parsing the json format configuration file may also generate function node names and corresponding function nodes. Specifically, the method comprises the following steps:
analyzing a configuration file in a json format, acquiring a function information array of the RTTI object according to the class and the inheritance relationship of the RTTI object, and generating a node name of a function node according to the function name of the function information array; wherein, the function node includes: the input port is used for controlling the trigger, the input port is used for inputting the component node to which the function node belongs or the entity node to which the function node belongs, the input port is used for acquiring one or more function parameters, the output port is used for controlling the trigger, and the output port is used for outputting the function return attribute value.
The function node needs to be opened to the logic control capability of a developer to enable the developer to control the condition under which the node executes the function, so that the function node is provided with a control flow input port and an output port. Function nodes need to input components and function parameters and output function return value data. When the function node is generated, the function node can be generated according to function information in a json-format configuration file, because the parent class of the RTTI class is recorded, the parent class of the RTTI component can be known, the inherited function method can be obtained, the name, the input parameter and the return value type of the function are also recorded in the function information array, and a function node port can be generated according to the information. The function node comprises a plurality of input ports, namely an input port for controlling triggering, an input port for inputting a component node or an entity node to which the function node belongs, and an input port for acquiring one or more function parameters, and comprises two output ports, namely an output port for controlling triggering and an output port for outputting a function return attribute value. When the input port for controlling the trigger is activated, the function node executes the function according to the parameters input in each input port for acquiring the function parameter, and outputs the execution result.
Continuing with the configuration file in the json format as an example, according to the function information array recorded in the configuration file, the name of the function can be determined to be "setWorldPosition", and the configuration file is analyzed to know that the function array is inherited to the parent class of "Transform", so that the name of the function node can be generated to be "function:: setWorldPosition (Transform)". The function array also records that the data type of the output value of the function is 'Vector 3 f', the function references are two, and the type is 'Vector 3 f', so that the function node function can be generated, wherein setWorldPosition is shown in FIG. 4C. As can be seen from fig. 4C, the function node includes four input ports and two output ports, where the four input ports are respectively a control port (Trigger), a port (represented by Transform) of a component node to which the input function node belongs, and two parameter input ports (both represented by parameter type Vector3 f), and the two output ports are respectively a control port (Trigger) and a function return value output port (represented by return value type Vector3 f).
According to the scheme of the embodiment of the disclosure, the visualized node is generated by analyzing the json format configuration file, so that the node style is generated by applying a uniform rule, the formatted running code is generated, a large amount of repeated mechanical development is avoided, and the development efficiency can be improved.
It should be noted that the execution sequence of step 201 to step 202 in fig. 3 is only used as an example to illustrate the present disclosure, and not as a limitation to the present disclosure, and step 201 to step 202 need only be executed before step 204.
Step 203, responding to the trigger operation of the target object name, and displaying the entity node corresponding to the target object name on a configuration panel.
It should be noted that, in the embodiment of the present disclosure, for the description of step 203, reference may be made to the description of step 101 in the foregoing embodiment, and details are not described here again.
And 204, searching node names which are constructed in advance and represent the engine capability, responding to the triggering operation of at least one target node name which is associated with the target object name and realizes the target function in the node names, and displaying at least one target node corresponding to the at least one target node name on the configuration panel.
It should be noted that, in the embodiment of the present disclosure, for the description of searching for the node name of the pre-constructed engine capability, reference may be made to relevant contents in the foregoing embodiment, and details are not repeated here.
In this embodiment of the present disclosure, the parsing an atomization node generated by a configuration file may be divided into three types, i.e., a component node, an attribute node (including a set attribute node and a read attribute node), and a function node, and then, in response to a trigger operation on at least one target node name that is associated with a target object name and that implements a target function in the node names, at least one target node corresponding to the at least one target node name is displayed on a configuration panel, where the method includes:
in response to a trigger operation on a target component node name associated with a target object name in the node names and used for realizing a target function, displaying a target component node corresponding to the target component node name on a configuration panel;
and responding to the target attribute node name which is associated with the target component node name and is used for realizing the target function in the node names and/or the target function node name, and displaying the target attribute node corresponding to the target attribute node name and/or displaying the target function node corresponding to the target function node name on the configuration panel.
In the embodiment of the disclosure, when a developer needs to implement a certain function, a node name representing an engine capability, which is constructed in advance, may be searched, a target component node name associated with a target object name and used for implementing a target function is found, and a trigger operation is executed, the entity function implementation device based on the engine capability displays the target component node on the configuration panel in response to the trigger operation, continues to find a target attribute node name and/or a target function node name associated with the target component node name and used for implementing the target function, and executes the trigger operation, and the entity function implementation device based on the engine capability displays the target attribute node and/or the target function node on the configuration panel in response to the trigger operation.
And step 205, responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement, and driving each target node to run the engine capability to realize the target function.
In the embodiment of the present disclosure, after each target node required for implementing the target function is displayed in the configuration panel, a developer may configure a connection relationship between the entity node and each target node according to a logic requirement, and execute a connection trigger operation, and the entity function implementation device based on the engine capability drives each target node to run the engine capability to implement the target function in response to the connection trigger operation.
It can be understood that different target nodes operate different engine capabilities, and in the embodiment of the present disclosure, driving each target node to operate the engine capability includes at least one of the following:
the component node acquires an entity to which the component node belongs and outputs a component object of the entity;
reading an attribute node to obtain a component to which the attribute node belongs, and outputting a current attribute value of the component;
when a control port for setting an attribute node is triggered, acquiring a component needing to set an attribute, and setting an attribute value of the component;
and when the input control port of the function node is triggered, executing the function according to the function parameters and outputting a return value.
In the embodiment of the disclosure, when each target node is driven to run the engine capability, the component node is used for acquiring the affiliated entity and outputting the component object of the entity, reading the attribute node to acquire the affiliated component and outputting the current attribute value of the acquired component, for the set attribute node, when the control port of the set attribute node is triggered, acquiring the component needing to be set with the attribute and setting the attribute value of the acquired component, and for the function node, when the input control port of the function node is triggered, executing the corresponding function according to the function parameter acquired by the function node and outputting the return value.
In the technical scheme, the connection relation of each target node is configured by executing the connection triggering operation by developers, the engine capability of each target node is driven to run in response to the connection triggering operation so as to realize the target function, the exposure of the engine capability is completed without writing codes, the capability of running control is realized, and the development efficiency is improved.
The entity function implementation method based on the engine capability provided by the embodiment of the disclosure includes the steps of obtaining a configuration file for storing engine data, constructing node names for representing the engine capability according to the configuration file, constructing nodes corresponding to the node names and used for being displayed on a configuration panel, searching the node names, responding to triggering operation of at least one target node name which is associated with a target object name and used for implementing a target function in the node names, displaying at least one target node corresponding to the at least one target node name on the configuration panel, responding to connection triggering operation between the entity node and each target node according to logic requirements, driving each target node to run the engine capability to implement the target function, and therefore, visual programming is achieved, components, attributes and functions required in an engine instance are reflected into atomic nodes, run-time logic is configured through connecting lines, the engine capability can be exposed without manually compiling codes, and special-effect production is achieved.
To facilitate understanding of the entity function implementation scheme based on engine capabilities provided by the present disclosure, the following examples are provided.
FIG. 5 is a diagram illustrating an example of a visual programming for implementing a click-to-screen offset function using an engine capability-based entity function implementation provided by the present disclosure. As shown in fig. 5, the target function that the developer wants to implement is to click the screen and shift the position of the playing sticker (x: 100, y 200), and the configuration steps of the visual programming for implementing the function are: because the position attribute of the sticker needs to be set, the name of the target object is the sticker (2D picture), so an entity node can be dragged from the special effect information panel, and the name of the entity node is the 2D picture, where the entity node is packaged in advance and displayed in the special effect information panel, and can be directly displayed on the configuration panel in a dragging manner without searching. The developer knows that the set location attribute is controlled by the component Transform2D, so that the component Transform2D is searched and searched on the configuration panel, the component node 'comp:: getTransform 2D' is added, and the Entity node (2D picture) is connected with the Entity port of the component node comp:: getTransform 2D. When the position offset of the paster is required to be realized, the current position of the paster is required to be obtained, and the current position of the paster can be obtained from a component Transform2d through a read attribute node of getPosition; adding a numerical value observation node, and inputting an observation value X of 100 and an observation value Y of 200; and adding the current position of the sticker and the observed value input by the numerical value observation node through the addition operation node to obtain the destination position to be set, wherein in the addition operation node, the numerical value A is the obtained current position, and the numerical value B is the input observed value. By searching the set attribute node of adding setPosition, the output port of the component node comp: getTransform2d is connected with the input port (Transform 2 d) of the setPosition node for representing the component to which the output port belongs, the terminal position data output by the addition operation node is connected into the input port (Vector 2 f) of the setPosition node for obtaining the attribute value, a click screen control node is added, and the click screen control node is connected with the control flow input port (Trigger) of the setPosition node, thereby configuring and completing the connection relationship of each node. In fig. 5, the click screen control node, the numerical value observation node, and the addition operation node may be nodes packaged in advance to implement a script function, and may be directly dragged for use without performing a search. When a developer clicks a screen, a setpost node is activated, the setpost node backtracks data input of a searching node, obtains a destination position output by a Transform2d component and an addition node, then sets a position attribute of the setpost node, and moves a sticker position from a home position (x: 100, y. Therefore, the function of offsetting the position of the paster by clicking the screen is realized without manually writing codes by developers.
Fig. 6 is a schematic structural diagram of an entity function implementation apparatus based on engine capability according to an embodiment of the present disclosure, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 6, the entity function implementing device based on engine capability includes:
a first display module 301, configured to display, in response to a trigger operation on a target object name, an entity node corresponding to the target object name on a configuration panel;
a second display module 302, configured to search for node names representing engine capabilities constructed in advance, and in response to a trigger operation on at least one target node name that is associated with the target object name and that implements a target function in the node names, display at least one target node corresponding to the at least one target node name on the configuration panel;
a driving module 303, configured to drive each target node to run an engine capability to implement the target function in response to a triggering operation on a connection between the entity node and each target node according to a logic requirement.
Optionally, the target nodes include a control type target node having a control trigger port and a data type target node in which all ports are data ports, and the driving module 303 is specifically configured to:
when the control type target node is triggered, acquiring data information provided by the data type target node connected with the control type target node;
and processing according to the operation logic of the control type target node and the data information, and outputting a corresponding processing result to realize the target function.
Optionally, as shown in fig. 7, the entity function implementing device 30 based on engine capability further includes:
an obtaining module 304, configured to obtain a configuration file for storing engine data;
a building module 305, configured to build node names representing the engine capabilities according to the configuration file, and build nodes corresponding to the node names for presentation on the configuration panel.
Optionally, the obtaining module 304 is specifically configured to:
obtaining the type information RTTI attribute of the current engine operation through an engine operation instance;
and acquiring the class name, the attribute, the function and the inheritance relationship contained in the RTTI object according to the RTTI attribute, and storing the class name, the attribute, the function and the inheritance relationship into a configuration file in a json format.
Optionally, the building module 305 is specifically configured to:
analyzing the configuration file in the json format to acquire the class name of the RTTI object, and generating the node name of the component node according to the class name; the component node includes: and the input port is used for inputting the entity node to which the component node belongs and the output port is used for outputting the function object related to the component node.
Optionally, the building module 305 is further configured to:
analyzing the configuration file in the json format, acquiring an attribute information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating a node name of an attribute node according to the attribute name of the attribute information array; wherein the attribute nodes include a read attribute node and a set attribute node, wherein,
the read attribute node includes: the input port is used for inputting the component node to which the read attribute node belongs and the output port is used for outputting the attribute value corresponding to the read attribute node;
the setting of the attribute node includes: the input port used for controlling the trigger, the input port used for inputting the component node to which the set attribute node belongs, the input port used for obtaining the attribute value, the output port used for controlling the trigger and the output port used for outputting the set attribute value.
Optionally, the building module 305 is further configured to:
analyzing the configuration file in the json format, acquiring a function information array of the RTTI object according to the class and the inheritance relationship of the RTTI object, and generating a node name of a function node according to the function name of the function information array; wherein the function node includes: the system comprises an input port for controlling triggering, an input port for inputting a component node or an entity node to which the function node belongs, an input port for acquiring one or more function parameters, an output port for controlling triggering, and an output port for outputting a function return attribute value.
Optionally, the second display module 302 is specifically configured to:
in response to a trigger operation on a target component node name associated with the target object name in the node names and used for realizing a target function, displaying a target component node corresponding to the target component node name on the configuration panel;
and in response to the triggering operation of the target attribute node name and/or the target function node name which are associated with the target component node name and used for realizing the target function in the node names, displaying the target attribute node corresponding to the target attribute node name and/or displaying the target function node corresponding to the target function node name on the configuration panel.
Optionally, the driving module 303 is specifically configured to:
the component node acquires an entity to which the component node belongs and outputs a component object of the entity;
the read attribute node acquires the component to which the read attribute node belongs and outputs the current attribute value of the component;
when the control port of the attribute setting node is triggered, acquiring a component needing attribute setting, and setting an attribute value of the component;
and when the input control port of the function node is triggered, executing a function output return value according to the function parameter.
The entity function implementation device based on the engine capability provided by the embodiment of the disclosure can execute the entity function implementation method based on the engine capability provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
In order to implement the above embodiments, the present disclosure also proposes a computer program product, which includes a computer program/instruction, and when executed by a processor, the computer program/instruction implements the entity function implementation method based on the engine capability in the above embodiments.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Referring now specifically to fig. 8, a schematic diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 400 in the disclosed embodiment may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle mounted terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 8, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM403 are connected to each other through a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program, when executed by the processing apparatus 401, performs the above-described functions defined in the engine capability-based entity function implementation method of the embodiments of the present disclosure.
It should be noted that the computer readable medium of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may be separate and not incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: responding to a trigger operation of a target object name, and displaying an entity node corresponding to the target object name on a configuration panel; searching node names which are constructed in advance and represent engine capacity, and responding to triggering operation of at least one target node name which is associated with the target object name and realizes a target function in the node names, and displaying at least one target node corresponding to the at least one target node name on the configuration panel; and responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement, and driving each target node to run the engine capability to realize the target function.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, the present disclosure provides an entity function implementation method based on engine capability, including:
responding to a trigger operation of a target object name, and displaying an entity node corresponding to the target object name on a configuration panel;
searching node names which are constructed in advance and represent engine capacity, and responding to triggering operation of at least one target node name which is related to the target object name and realizes a target function in the node names, and displaying at least one target node corresponding to the at least one target node name on the configuration panel;
and responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement, and driving each target node to run the engine capability to realize the target function.
According to one or more embodiments of the present disclosure, in an entity function implementation method based on engine capabilities provided by the present disclosure, the target nodes include a control class target node having a control trigger port and a data class target node having all ports as data ports, and the driving each target node to run the engine capabilities to implement the target functions includes:
when the control type target node is triggered, acquiring data information provided by the data type target node connected with the control type target node;
and processing according to the operation logic of the control type target node and the data information, and outputting a corresponding processing result to realize the target function.
According to one or more embodiments of the present disclosure, in the method for implementing an entity function based on engine capability provided by the present disclosure, before searching for a node name that is constructed in advance and represents the engine capability, the method further includes:
acquiring a configuration file for storing engine data;
and constructing node names representing the engine capability according to the configuration files, and constructing nodes corresponding to the node names and used for being displayed on the configuration panel.
According to one or more embodiments of the present disclosure, in the method for implementing an entity function based on engine capability provided by the present disclosure, the obtaining a configuration file for storing engine data includes:
obtaining the type information RTTI attribute of the current engine operation through an engine operation instance;
and acquiring the class name, the attribute, the function and the inheritance relationship contained in the RTTI object according to the RTTI attribute, and storing the class name, the attribute, the function and the inheritance relationship into a configuration file in a json format.
According to one or more embodiments of the present disclosure, in the method for implementing an entity function based on engine capability provided by the present disclosure, the constructing node names representing engine capabilities according to the configuration file and constructing nodes corresponding to the node names for displaying on the configuration panel includes:
analyzing the json format configuration file to acquire the class name of the RTTI object, and generating the node name of the component node according to the class name; wherein the component node comprises: and the input port is used for inputting the entity node to which the component node belongs and the output port is used for outputting the function object related to the component node.
According to one or more embodiments of the present disclosure, in the entity function implementation method based on engine capability provided by the present disclosure, the method further includes:
analyzing the json-format configuration file, acquiring an attribute information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating a node name of an attribute node according to the attribute name of the attribute information array; wherein the attribute nodes include a read attribute node and a set attribute node, wherein,
the read attribute node includes: the input port is used for inputting the component node to which the read attribute node belongs and the output port is used for outputting the attribute value corresponding to the read attribute node;
the setting of the attribute node includes: the input port used for controlling the trigger, the input port used for inputting the component node to which the set attribute node belongs, the input port used for obtaining the attribute value, the output port used for controlling the trigger and the output port used for outputting the set attribute value.
According to one or more embodiments of the present disclosure, in the entity function implementation method based on engine capability provided by the present disclosure, the method further includes:
analyzing the configuration file in the json format, acquiring a function information array of the RTTI object according to the class and the inheritance relationship of the RTTI object, and generating a node name of a function node according to the function name of the function information array; wherein the function node includes: the system comprises an input port for controlling triggering, an input port for inputting a component node or an entity node to which the function node belongs, an input port for acquiring one or more function parameters, an output port for controlling triggering, and an output port for outputting a function return attribute value.
According to one or more embodiments of the present disclosure, in an engine capability-based entity function implementation method provided by the present disclosure, the displaying, on the configuration panel, at least one target node corresponding to at least one target node name in response to a trigger operation on the at least one target node name that is associated with the target object name and implements a target function in the node names, includes:
in response to a trigger operation on a target component node name associated with the target object name and used for realizing a target function in the node names, displaying a target component node corresponding to the target component node name on the configuration panel;
and in response to the triggering operation of the target attribute node name and/or the target function node name which is associated with the target component node name and is used for realizing the target function in the node names, displaying the target attribute node corresponding to the target attribute node name and/or displaying the target function node corresponding to the target function node name on the configuration panel.
According to one or more embodiments of the present disclosure, in the entity function implementation method based on engine capability provided by the present disclosure, the driving each of the target nodes to run the engine capability to implement the target function includes at least one of:
the component node acquires an entity to which the component node belongs and outputs a component object of the entity;
the read attribute node acquires the component to which the read attribute node belongs and outputs the current attribute value of the component;
when the control port of the attribute setting node is triggered, acquiring a component needing attribute setting, and setting an attribute value of the component;
and when the input control port of the function node is triggered, executing a function output return value according to the function parameter.
According to one or more embodiments of the present disclosure, the present disclosure provides an entity function implementation apparatus based on engine capability, including:
the first display module is used for responding to the trigger operation of the target object name and displaying the entity node corresponding to the target object name on the configuration panel;
the second display module searches node names which are constructed in advance and represent engine capacity, responds to triggering operation on at least one target node name which is associated with the target object name and realizes a target function in the node names, and displays at least one target node corresponding to the at least one target node name on the configuration panel;
and the driving module is used for responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement and driving each target node to run the engine capability to realize the target function.
According to one or more embodiments of the present disclosure, in an entity function implementation apparatus based on engine capability provided by the present disclosure, the target nodes include a control class target node having a control trigger port and a data class target node having all ports as data ports, and the driving module is specifically configured to:
when the control type target node is triggered, acquiring data information provided by the data type target node connected with the control type target node;
and processing according to the operation logic of the control type target node and the data information, and outputting a corresponding processing result to realize the target function.
According to one or more embodiments of the present disclosure, the present disclosure provides an apparatus for implementing entity functions based on engine capabilities, further comprising:
the acquisition module is used for acquiring a configuration file for storing engine data;
and the construction module is used for constructing the node names representing the engine capability according to the configuration files and constructing nodes corresponding to the node names and used for being displayed on the configuration panel.
According to one or more embodiments of the present disclosure, in the entity function implementation apparatus based on engine capability provided by the present disclosure, the obtaining module is specifically configured to:
obtaining the type information RTTI attribute of the current engine operation through an engine operation instance;
and acquiring the class name, the attribute, the function and the inheritance relationship contained in the RTTI object according to the RTTI attribute, and storing the class name, the attribute, the function and the inheritance relationship into a configuration file in a json format.
According to one or more embodiments of the present disclosure, in the entity function implementation apparatus based on engine capability provided by the present disclosure, the building module is specifically configured to:
analyzing the configuration file in the json format to acquire the class name of the RTTI object, and generating the node name of the component node according to the class name; wherein the component node comprises: and the input port is used for inputting the entity node to which the component node belongs and the output port is used for outputting the function object related to the component node.
According to one or more embodiments of the present disclosure, in the entity function implementation apparatus based on engine capability provided by the present disclosure, the building module is further configured to:
analyzing the configuration file in the json format, acquiring an attribute information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating a node name of an attribute node according to the attribute name of the attribute information array; wherein the attribute nodes include a read attribute node and a set attribute node, wherein,
the read attribute node includes: the input port is used for inputting the component node to which the read attribute node belongs and the output port is used for outputting the attribute value corresponding to the read attribute node;
the setting of the attribute node includes: the input port used for controlling the trigger, the input port used for inputting the component node to which the set attribute node belongs, the input port used for obtaining the attribute value, the output port used for controlling the trigger and the output port used for outputting the set attribute value.
According to one or more embodiments of the present disclosure, in the entity function implementation apparatus based on engine capability provided by the present disclosure, the building module is further configured to:
analyzing the json format configuration file, acquiring a function information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating a node name of a function node according to the function name of the function information array; wherein the function node includes: the system comprises an input port for controlling triggering, an input port for inputting a component node or an entity node to which the function node belongs, an input port for acquiring one or more function parameters, an output port for controlling triggering, and an output port for outputting a function return attribute value.
According to one or more embodiments of the present disclosure, in the entity function implementation apparatus based on engine capability provided by the present disclosure, the second display module is specifically configured to:
in response to a trigger operation on a target component node name associated with the target object name in the node names and used for realizing a target function, displaying a target component node corresponding to the target component node name on the configuration panel;
and in response to the triggering operation of the target attribute node name and/or the target function node name which is associated with the target component node name and is used for realizing the target function in the node names, displaying the target attribute node corresponding to the target attribute node name and/or displaying the target function node corresponding to the target function node name on the configuration panel.
According to one or more embodiments of the present disclosure, in the entity function implementation apparatus based on engine capability provided by the present disclosure, the driving module is specifically configured to:
the component node acquires an entity to which the component node belongs and outputs a component object of the entity;
the read attribute node acquires the component to which the read attribute node belongs and outputs the current attribute value of the component;
when the control port of the attribute setting node is triggered, acquiring a component needing attribute setting, and setting an attribute value of the component;
and when the input control port of the function node is triggered, executing a function output return value according to the function parameter.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device including:
a processor;
a memory for storing the processor-executable instructions;
the processor is used for reading the executable instructions from the memory and executing the instructions to realize any one of the entity function realization methods based on the engine capability provided by the disclosure.
According to one or more embodiments of the present disclosure, a computer-readable storage medium storing a computer program for executing any one of the engine capability-based entity function implementation methods provided by the present disclosure is provided.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (12)

1. An entity function implementation method based on engine capability is characterized by comprising the following steps:
displaying entity nodes corresponding to a target object name on a configuration panel in response to a trigger operation on the target object name;
searching node names which are constructed in advance and represent engine capacity, and responding to triggering operation of at least one target node name which is related to the target object name and realizes a target function in the node names, and displaying at least one target node corresponding to the at least one target node name on the configuration panel;
and responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement, and driving each target node to run the engine capability to realize the target function.
2. The method of claim 1, wherein the target nodes include a control class target node having a control trigger port and a data class target node having all ports as data ports, and wherein the driving each target node to run an engine capability to implement the target function includes:
when the control type target node is triggered, acquiring data information provided by the data type target node connected with the control type target node;
and processing according to the operation logic of the control type target node and the data information, and outputting a corresponding processing result to realize the target function.
3. The method of claim 1, further comprising, prior to said searching for pre-built node names representing engine capabilities:
acquiring a configuration file for storing engine data;
and constructing node names representing the engine capability according to the configuration files, and constructing nodes corresponding to the node names and used for being displayed on the configuration panel.
4. The method of claim 3, wherein obtaining the configuration file of the preservation engine data comprises:
obtaining the type information RTTI attribute of the current engine operation through an engine operation instance;
and acquiring the class name, the attribute, the function and the inheritance relationship contained in the RTTI object according to the RTTI attribute, and storing the class name, the attribute, the function and the inheritance relationship into a configuration file in a json format.
5. The method of claim 4, wherein constructing node names representing the engine capabilities according to the configuration file and constructing nodes corresponding to the node names for presentation on the configuration panel comprises:
analyzing the json format configuration file to acquire the class name of the RTTI object, and generating the node name of the component node according to the class name; wherein the content of the first and second substances,
the component node includes: and the input port is used for inputting the entity node to which the component node belongs and the output port is used for outputting the function object related to the component node.
6. The method of claim 5, further comprising:
analyzing the configuration file in the json format, acquiring an attribute information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating a node name of an attribute node according to the attribute name of the attribute information array; wherein, the first and the second end of the pipe are connected with each other,
the attribute nodes include a read attribute node and a set attribute node, wherein,
the read attribute node includes: the input port is used for inputting the component node to which the read attribute node belongs and the output port is used for outputting the attribute value corresponding to the read attribute node;
the setting of the attribute node includes: the input port used for controlling the trigger, the input port used for inputting the component node to which the set attribute node belongs, the input port used for obtaining the attribute value, the output port used for controlling the trigger and the output port used for outputting the set attribute value.
7. The method of claim 6, further comprising:
analyzing the json-format configuration file, acquiring a function information array of the RTTI object according to the class and inheritance relationship of the RTTI object, generating a node name of a function node according to the function name of the function information array, wherein,
the function node includes: the system comprises an input port for controlling triggering, an input port for inputting a component node or an entity node to which the function node belongs, an input port for acquiring one or more function parameters, an output port for controlling triggering, and an output port for outputting a function return attribute value.
8. The method according to claim 7, wherein the displaying at least one target node corresponding to at least one target object name on the configuration panel in response to a trigger operation on the at least one target node name which is associated with the target object name and implements a target function, comprises:
in response to a trigger operation on a target component node name associated with the target object name and used for realizing a target function in the node names, displaying a target component node corresponding to the target component node name on the configuration panel;
and in response to the triggering operation of the target attribute node name and/or the target function node name which is associated with the target component node name and is used for realizing the target function in the node names, displaying the target attribute node corresponding to the target attribute node name and/or displaying the target function node corresponding to the target function node name on the configuration panel.
9. The method of claim 8, wherein said driving each of said target nodes to run an engine capability to perform said target function comprises at least one of:
the component node acquires an entity to which the component node belongs and outputs a component object of the entity;
the read attribute node acquires the component to which the read attribute node belongs and outputs the current attribute value of the component;
when the control port of the attribute setting node is triggered, acquiring a component needing attribute setting, and setting an attribute value of the component;
and when the input control port of the function node is triggered, executing a function output return value according to the function parameter.
10. An entity function implementation device based on engine capability, comprising:
the first display module is used for responding to the trigger operation of the target object name and displaying the entity node corresponding to the target object name on a configuration panel;
the second display module is used for searching node names which are constructed in advance and represent the engine capability, responding to the triggering operation of at least one target node name which is associated with the target object name and realizes the target function in the node names, and displaying at least one target node corresponding to the at least one target node name on the configuration panel;
and the driving module is used for responding to the triggering operation of the connection between the entity node and each target node according to the logic requirement and driving each target node to run the engine capability to realize the target function.
11. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
the processor is used for reading the executable instructions from the memory and executing the instructions to realize the entity function realization method based on the engine capability of any one of the claims 1 to 9.
12. A computer-readable storage medium, characterized in that the storage medium stores a computer program for executing the method for implementing entity function based on engine capability of any one of claims 1-9.
CN202110729945.7A 2021-06-29 2021-06-29 Entity function implementation method and device based on engine capability and electronic equipment Pending CN115543262A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110729945.7A CN115543262A (en) 2021-06-29 2021-06-29 Entity function implementation method and device based on engine capability and electronic equipment
PCT/CN2022/091676 WO2023273617A1 (en) 2021-06-29 2022-05-09 Engine capability-based entity function implementation method and apparatus and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110729945.7A CN115543262A (en) 2021-06-29 2021-06-29 Entity function implementation method and device based on engine capability and electronic equipment

Publications (1)

Publication Number Publication Date
CN115543262A true CN115543262A (en) 2022-12-30

Family

ID=84692462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110729945.7A Pending CN115543262A (en) 2021-06-29 2021-06-29 Entity function implementation method and device based on engine capability and electronic equipment

Country Status (2)

Country Link
CN (1) CN115543262A (en)
WO (1) WO2023273617A1 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6526566B1 (en) * 1997-11-14 2003-02-25 National Instruments Corporation Graphical programming system and method including nodes for programmatically accessing data sources and targets
US9342277B2 (en) * 2013-03-14 2016-05-17 Oracle International Corporation Method of searching data associated with nodes of a graphical program
CN112861059A (en) * 2021-03-17 2021-05-28 平安消费金融有限公司 Visual component generation method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
WO2023273617A1 (en) 2023-01-05

Similar Documents

Publication Publication Date Title
CN109634598B (en) Page display method, device, equipment and storage medium
US10833928B1 (en) Exchanging information among system middleware and models
CN110489101B (en) Interface simulation method, system, medium and electronic equipment
CN110489323B (en) Visual RPC API debugging method, device, medium and equipment
EP3910909A1 (en) Method and device for displaying information
US11216602B2 (en) Micro frontends with model-based state
WO2020119804A1 (en) Page view display method, apparatus, device and storage medium
JP7033165B2 (en) How and equipment to process information in parallel
CN110619100B (en) Method and apparatus for acquiring data
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN112698824A (en) View element state management method and device, electronic equipment and storage medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
WO2023273621A1 (en) Script generation method and apparatus, device and medium
CN113052942B (en) Chart generation method, device, storage medium and electronic equipment
CN115543262A (en) Entity function implementation method and device based on engine capability and electronic equipment
CN116775174A (en) Processing method, device, equipment and medium based on user interface frame
CN112445517B (en) Inlet file generation method, device, electronic equipment and computer readable medium
CN111625692B (en) Feature extraction method, device, electronic equipment and computer readable medium
CN114119806A (en) Nested flow chart generation method and device, electronic equipment and storage medium
CN113535282B (en) Special effect data processing method and device
WO2023071629A1 (en) Webpage rendering method and apparatus, device and storage medium
CN117908883A (en) Page generation method and device, electronic equipment and computer readable medium
CN113760254A (en) Data model generation method and device, electronic equipment and computer readable medium
CN115220782A (en) Activity configuration method and device, readable medium and electronic equipment
CN116825207A (en) Information processing method, device and equipment

Legal Events

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