WO2023273617A1 - Engine capability-based entity function implementation method and apparatus and electronic device - Google Patents

Engine capability-based entity function implementation method and apparatus and electronic device Download PDF

Info

Publication number
WO2023273617A1
WO2023273617A1 PCT/CN2022/091676 CN2022091676W WO2023273617A1 WO 2023273617 A1 WO2023273617 A1 WO 2023273617A1 CN 2022091676 W CN2022091676 W CN 2022091676W WO 2023273617 A1 WO2023273617 A1 WO 2023273617A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
target
name
function
attribute
Prior art date
Application number
PCT/CN2022/091676
Other languages
French (fr)
Chinese (zh)
Inventor
徐远
马锐锋
Original Assignee
北京字跳网络技术有限公司
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 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Publication of WO2023273617A1 publication Critical patent/WO2023273617A1/en

Links

Images

Classifications

    • 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
    • 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/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Definitions

  • the present disclosure relates to the technical field of visual programming, and in particular to a method, device and electronic device for implementing entity functions based on engine capabilities.
  • Entity Component System Entity-Component-System, ECS
  • the calling sequence of using a certain function of the engine is: entity Entity-> get component component-> use attribute or method.
  • an embodiment of the present disclosure provides a method for realizing an entity function based on an engine capability, the method comprising: in response to a trigger operation on the name of the target object, displaying on the configuration panel the Corresponding entity node; searching for a pre-built node name representing engine capability, in response to a trigger operation on at least one target node name associated with the target object name among the node names and realizing the target function, in the At least one target node corresponding to the name of the at least one target node is displayed on the configuration panel; and in response to triggering an operation on the connection between the entity node and each of the target nodes according to logical requirements, driving each of the target nodes to run Engine capabilities to achieve the stated target functionality.
  • an embodiment of the present disclosure also provides an apparatus for implementing entity functions based on engine capabilities, the apparatus including: a first display module, configured to respond to a trigger operation on the name of the target object, and configure The entity node corresponding to the name of the target object is displayed on the panel; the second display module searches the pre-built node name representing the engine capability, and responds to the node name associated with the name of the target object and achieves the goal A trigger operation of at least one target node name of the function, displaying at least one target node corresponding to the at least one target node name on the configuration panel; and a driving module, configured to respond to the physical node and the The connection between each of the target nodes triggers an operation to drive each of the target nodes to run engine capabilities to realize the target function.
  • an embodiment of the present disclosure further provides an electronic device, the electronic device comprising: a processor; a memory for storing instructions executable by the processor; The executable instruction is read from the memory, and the instruction is executed to implement the engine capability-based entity function implementation method provided by the embodiment of the present disclosure.
  • the embodiment of the present disclosure further provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute the engine capability-based engine provided by the embodiment of the present disclosure. Entity function realization method.
  • an embodiment of the present disclosure further provides a computer program, including: instructions, which when executed by a processor cause the processor to execute the engine capability-based Entity function realization method.
  • an embodiment of the present disclosure further provides a computer program product, including instructions, the instructions, when executed by a processor, cause the processor to execute the engine capability-based Entity function realization method.
  • FIG. 1 is a schematic flowchart of a method for implementing an entity function based on an engine capability provided by an embodiment of the present disclosure
  • Fig. 2A is an example Fig. 1 of searching for a node name representing an engine capability
  • Fig. 2B is an example Fig. 2 of searching for a node name representing an engine capability
  • Fig. 2C is an example Fig. 3 of searching for a node name representing an engine capability
  • FIG. 3 is a schematic flowchart of another method for implementing entity functions based on engine capabilities provided by an embodiment of the present disclosure
  • Figure 4A is an example diagram of a generated component node
  • Figure 4B is an example diagram of the generated read attribute node and set attribute node
  • Figure 4C is an example diagram of a generated function node
  • FIG. 5 is an example diagram of visual programming for realizing the function of clicking the screen to shift the position of the sticker by using the engine capability-based entity function implementation scheme provided by the present disclosure
  • FIG. 6 is a schematic structural diagram of an apparatus for realizing an entity function based on an engine capability provided by an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of another device for implementing entity functions based on engine capabilities provided by an embodiment of the present disclosure
  • FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the term “comprise” and its variations are open-ended, ie “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 further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • the inventors of the present disclosure found that in software development, there are hundreds of components, attributes, and methods in the engine. If each component, attribute, etc. is written in code, it will bring high development costs and low efficiency .
  • an embodiment of the present disclosure provides a method for implementing an entity function based on an engine capability, and the method will be introduced in conjunction with specific embodiments below.
  • Fig. 1 is a schematic flowchart of a method for realizing an entity function based on engine capability provided by an embodiment of the present disclosure.
  • the method can be executed by a device for realizing an entity function based on engine capability, wherein the device can be implemented by software and/or hardware, generally Can be integrated in electronic equipment.
  • the method includes step 101 to step 103 .
  • Step 101 in response to a trigger operation on the name of the target object, display the entity node corresponding to the name of the target object on the configuration panel.
  • the target object includes an entity
  • the name of the target object is the name of the entity
  • the target object refers to the object that needs to be operated to realize the target function.
  • the target function to be realized is to control the rotation of the camera, then the camera is the target object.
  • the target function to be realized is to control the position movement of a 2D image, then the 2D image is the target object.
  • the entity node corresponding to the name of the target object can be pre-packaged and displayed in the toolbar area of the configuration panel.
  • the developer can find the The name of the target object of the target object, and a trigger operation is performed on the name of the target object.
  • the device for realizing the entity function based on the engine capability displays the entity node corresponding to the name of the target object on the configuration panel.
  • the triggering operation includes but not limited to mouse click, touch pen click, finger click, mouse drag, touch pen drag, finger drag, etc., which is not limited in the present disclosure.
  • Step 102 Search for pre-built node names that represent engine capabilities, and respond to trigger operations on at least one target node name that is associated with the target object name and realizes the target function in the node name, and displays on the configuration panel that is related to at least one target node name At least one target node corresponding to the node name.
  • the node name representing the engine capability refers to the name of the visualization node that needs to be relied upon to realize a certain function.
  • a visualization node represents a specific engine capability.
  • Visualization nodes can include component nodes, read attribute nodes, function nodes, etc.
  • the engine capabilities of component nodes and read attribute nodes can provide data for other nodes, and the engine capabilities of function nodes can open logic control capabilities and complex engines to users Function.
  • the node names of the pre-built nodes can be searched, and at least one target node name can be determined from each node name, wherein at least one target node name is associated with the target object and used for The name of the node that implements the target function.
  • the developer performs a trigger operation on at least one target node name, and in response to the trigger operation, the entity function realization device based on the engine capability displays the target node corresponding to each target node name on the configuration panel.
  • the target function that the developer needs to achieve is to shift the position of the sticker when the screen is tapped
  • the target object is a sticker
  • the name of the target object is recorded as Sprite2D.
  • Developers know that the Transform2D component is required to implement the position offset function, so they can search the pre-built node names to find the Transform2D component.
  • different ways may be used to find the Transform2D component associated with the target object name Sprite2D, which will be introduced respectively below.
  • FIG. 2A is a first example of searching for a node name representing an engine capability.
  • the developer can input the index string "comp" of the component component in the pre-built node name to search for the existing component name, and then according to the current target object (Sprite2D ) and the target component (Transform2D) to be searched, find the target node name associated with the target object (Sprite2D) from the multiple node names displayed in the search result list, as shown in Figure 2A, the target node name is "comp:: getTransform2D(Sprite2D)".
  • FIG. 2B is a second example of searching for node names representing engine capabilities.
  • the developer can input the character string "Transform2D” or input a part of the character string of Transform2D (for example, input Tran or tran) to search.
  • the input character string tran is used as For example, according to the current target object (Sprite2D), find the target node name associated with the target object (Sprite2D) from the node names of all Transform2D components displayed in the search result list, as shown in Figure 2B, the target node name is "comp::getTransform2D(Sprite2D)".
  • Fig. 2C is an example Fig. 3 of searching for a node name representing an engine capability.
  • the developer can call up the search box by drawing a connection line from the entity node (Sprite2D) corresponding to the target object name, and all nodes associated with the target object (Sprite2D) will be displayed below the search box Name, the developer can find the name of the target node by looking it up from the list, or by entering a character string related to the Transform2D component to be found in the search box (such as entering Transform) to search, as shown in Figure 2C, the target node The name is "comp::getTransform2D(Sprite2D)", which realizes focused search and can improve search efficiency.
  • the target node corresponding to the target node name is displayed on the configuration panel.
  • Step 103 in response to triggering an operation on the connection between the entity node and each target node according to the logic requirement, driving each target node to run the engine capability to realize the target function.
  • the developer can configure the connection relationship between the entity node and each target node according to the logical requirements, and execute the connection trigger operation, such as the entity node and the target node
  • the input of the target node representing the component in the node is connected to obtain the component associated with the target object
  • the output of the target node representing the component is connected to the input of the target node representing the attribute to set the attribute information of the component, and so on.
  • the entity function realization device based on the engine capability responds to the connection trigger operation between the entity node and each target node, configures the connection relationship between each node, and then drives each target node to run the engine capability according to the connection relationship, so as to realize the target function.
  • the entity node corresponding to the target object name in response to the trigger operation on the target object name, the entity node corresponding to the target object name is displayed on the configuration panel, and the pre-built node name representing the engine capability is searched for, and the response Based on the trigger operation on at least one target node name associated with the target object name in the node name and realizing the target function, at least one target node corresponding to the at least one target node name is displayed on the configuration panel, and then in response to the logical requirement Trigger the operation on the connection between the entity node and each target node, and drive the engine capability of each target node to realize the target function.
  • the target node corresponding to the target node name can be displayed, and then the connection relationship between each node can be configured according to the logical requirements to achieve the goal Functions, developers do not need to write a large amount of code to expose engine capabilities, achieving high-efficiency development and reducing development costs.
  • the target node includes a control-type target node with a control trigger port and a data-type target node with all ports as data ports, so that each target node is driven to run the engine to realize the target function, including: when the control-type target When the node is triggered, obtain the data information provided by the data target node connected to the control target node; process according to the operation logic and data information of the control target node, and output the corresponding processing results to realize the target function.
  • a set attribute node with a control trigger port is a control type target node
  • a read attribute node for obtaining an attribute value corresponding to a certain attribute of a component node is a type of data type target node.
  • the developer executes the connection trigger operation between the entity node and the control target node and the data target node to configure the connection relationship between each node
  • the entity function realization device based on the engine capability responds to the connection trigger Operation, configure the connection relationship among entity nodes, control target nodes, and data target nodes.
  • the control target node reads data information from the data target node connected to it, and Complete the specific control task operation according to its own operation logic and read data information, and then output the corresponding processing results to achieve the target function.
  • the target function to be realized is to change the size of the sticker when the screen is clicked
  • the node corresponding to the clicked screen inputs the control flow to the control target node
  • the control target node used to change the size of the sticker is Triggered
  • the control target node obtains the data provided by the data target node connected to the control target node, so as to calculate the size of the sticker according to the operation logic of the control target node and the obtained data, and then output the calculated sticker Size to achieve sticker size change.
  • the control target node when the control target node is triggered, the data information provided by the data target node connected to the control target node is obtained, processed according to the operation logic and data information of the control target node, and the corresponding processing results are output as To realize the target function, it only needs to configure the connection relationship between each target node to realize the target function based on the engine capability of each target node, avoiding manual programming code and improving development efficiency.
  • FIG. 3 is a schematic flowchart of another method for implementing entity functions based on engine capabilities provided by an embodiment of the present disclosure. On the basis of the above embodiments, this embodiment further optimizes the method for implementing entity functions based on engine capabilities. As shown in FIG. 3 , the method includes step 201 to step 205 .
  • Step 201 acquiring a configuration file for storing engine data.
  • the engine data can be determined according to the engine running instance, and the engine running instance depends on the engine capability implemented by several components, attributes, function methods and other data. Therefore, in the embodiments of the present disclosure, the engine data can include but not limited to the engine running instance All the components, properties, function methods and other data that are dependent on time.
  • the configuration file may be pre-generated and stored locally, or obtained from the server, or generated according to the engine runtime instance, which is not limited in the present disclosure.
  • the configuration file can be generated in real time, and the configuration file for saving the engine data is obtained, including: obtaining the runtime type information RTTI (Runtime Type Information) attribute of the current engine through the engine running instance; obtaining according to the RTTI attribute
  • RTTI Realtime Type Information
  • the RTTI object contains the class name, attribute, function and inheritance relationship, and saves it as a configuration file in json format.
  • the inheritance relationship refers to the inheritance relationship between the RTTI classes of the engine, that is, which parent class a certain RTTI class inherits from, and the inherited attributes and function methods can be obtained through the inheritance relationship.
  • the engine has RTTI attributes, which can obtain information such as runtime type and object attributes.
  • RTTI attributes can obtain information such as runtime type and object attributes.
  • all RTTI information of the engine runtime can be obtained through the engine running instance, and the inheritance of each RTTI class can be obtained through the RTTI information. Relationships, as well as the properties and function methods exposed by the RTTI class, parse out the relevant information of each RTTI class, which can be recorded in the json file and saved as a configuration file in json format.
  • the configuration file in json format may include the class name of the RTTI class, the parent class inherited by the RTTI class, attribute information and function information of the RTTI class.
  • the subclass can inherit the attributes and function methods of the parent class.
  • the attribute information includes but not limited to the attribute name, the attribute RTTI type, whether the attribute is readable and writable;
  • the function information includes but not limited to the function name, the RTTI type returned by the function, the The number of parameters required by the function and the RTTI type of the parameter.
  • the runtime instance since the runtime instance includes all components, attributes and functions available in the current engine version and runtime environment, all RTTI attributes of the current engine are obtained through the engine running instance, and the class name contained in the RTTI object is obtained according to the RTTI attribute , attributes, functions, and inheritance relationships, and save them as configuration files in json format.
  • the configuration file records all engine data that meets the current engine version and operating environment. When using it, it can effectively avoid calling closed, Restricted or isolated functionality creates a risk of engine crashes.
  • saving the class name, attribute, function and inheritance relationship contained in the RTTI object as a configuration file in json format can realize flexible function configuration and distribution, and realize a fast node search function.
  • the json format of the configuration file is only 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.
  • the configuration file can be delivered by the server along with the engine version, and the server will pre-generate the configuration file corresponding to each instance according to the instances that the current version of the engine can run and send it along with the engine version. Send it to the client, and the client saves the configuration file locally when installing the engine, so that when implementing the engine capability-based entity function implementation solution of the present disclosure, the engine capability-based entity function implementation device can obtain and save the engine capability from the local Data profile.
  • Step 202 constructing node names representing engine capabilities according to the configuration file, and constructing nodes corresponding to each node name for display on the configuration panel.
  • a node name indicating the engine capability can be constructed for searching, and a node name corresponding to each node name can be constructed for display on the configuration panel. node.
  • construct node names representing engine capabilities according to the configuration files and construct nodes corresponding to each node name for display on the configuration panel, including: parsing json format configuration file to obtain the class name of the RTTI object, and generate the node name of the component node according to the class name; wherein, the component node includes: the input port for inputting the entity node to which the component node belongs and the output for outputting the functional object related to the component node port.
  • the output of the output port of the component node is related to the function of the component node.
  • the function of the component node "comp::getTransform" is to obtain the Transform component of the entity node, and the output object of the output port of the component node is the Transform component.
  • the content recorded in the configuration file in json format includes: the RTTI class name is "Transform2d", the parent class inherited by the RTTI class is "Transform”, and in the attribute information corresponding to the RTTI class, the attribute name is "Position ", the attribute RTTI type is "Vector2f”, the attribute is readable and writable, in the function information corresponding to the RTTI class, the function name is "setWorldPosition”, the function return RTTI type is "Vector3f", and the number of input parameters required by the function There are 2, and the parameter RTTI type of each input parameter is "Vector3f".
  • Parsing the configuration file in the above json format shows that the parent class of the RTTI class is Transform, and the class name of the RTTI class is "Transform2d", and the node name of the component node that can be generated according to the class name is "comp::getTransform2d".
  • RTTI objects can be used for marking. Assuming that the RTTI object corresponding to the above class name Transform2d is a 2D image, the above component node name can be recorded as "comp::getTransform2d(2D image)".
  • a component node includes an input port and an output port. The input port is used to input the entity node to which the component node belongs, and the output port is used to output the related functional object of the component. If the component does not exist in the Entity, the output is empty.
  • Figure 4A is an example diagram of the generated component node, as shown in Figure 4A, the component node only includes an input port (Entity) and an output port, the input data stream of the input port is a 2D image of the entity node, and the output data of the output port The stream is Transform2d for this component.
  • parsing the configuration file in json format can also generate attribute node names and corresponding attribute nodes. Specifically, it includes: parsing the configuration file in json format, obtaining the attribute information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating the node name of the attribute node according to the attribute name of the attribute information array; wherein, the attribute node includes the read attribute Nodes and set attribute nodes, wherein the read attribute node includes: an input port for inputting the component node to which the read attribute node belongs and an output port for outputting the corresponding attribute value of the read attribute node; the set attribute node includes: for controlling An input port for triggering, an input port for inputting the component node to which the property node belongs, an input port for obtaining the property value, an output port for controlling the trigger, and an output port for outputting the set property value.
  • the attribute node can be generated according to the attribute information in the configuration file in json format. Since the parent class of the RTTI class is recorded, the parent class of the RTTI component can be known and the inherited attributes can be obtained. 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 to provide data for other nodes, and it does not have a logic control function. Therefore, the read attribute node includes an input port and an output port.
  • the input port is used to input the component node to which the read attribute node belongs, that is, the input
  • the component that needs to get attributes the output port is used to output the attribute value corresponding to the read attribute node.
  • Setting attribute nodes needs to be open to developers to control logic, allowing developers to control under what conditions the node sets attributes. Therefore, setting attribute nodes has control flow input ports and output ports. Setting attribute nodes requires input components and attribute data, and will This data is used as the output data of the output port.
  • the setting attribute node includes three input ports, which are the input port for controlling the trigger, the input port for inputting the component node to which the setting attribute node belongs, the input port for obtaining the attribute value, and two output ports, They are the output port used to control the trigger and the output port used to output the set property value respectively.
  • the set attribute node obtains the component whose attribute needs to be set, and sets the corresponding attribute value of the component as the input value.
  • the attribute information array recorded in the configuration file it can be determined that the attribute name is "Position”, and it can be determined that the attribute is readable and writable. Parsing the configuration file shows that the attribute array inherits Based on the class name "Transform2d", the read property node name can be generated as "getPosition(Transform2d)", and the set property node name can be generated as "setPosition(Transform2d)". Moreover, a read property node and a set property node may be generated according to the configuration file, as shown in FIG. 4B .
  • the read attribute node includes an input port (Transform2d) for inputting the component node to which the read attribute node belongs and an output port for outputting the corresponding attribute value of the read attribute node.
  • the node includes three input ports and two output ports.
  • the input ports are the control port (Trigger), the port (Transform2d) used to input the component node to which the attribute node belongs, and the port to obtain the attribute value (use the attribute value type Vector2f representation).
  • parsing the configuration file in json format can also generate function node names and corresponding function nodes. Specifically, it includes: parsing the configuration file in json format, obtaining the function information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating the node name of the function node according to the function name of the function information array; wherein, the function node includes: for An input port for controlling triggering, an input port for inputting component nodes or entity nodes to which a function node belongs, an input port for obtaining one or more function parameters, an output port for controlling triggering, and an output function return Output port for attribute values.
  • Function nodes need to be open to developers for logic control capabilities, allowing developers to control the conditions under which nodes execute functions, so function nodes have control flow input ports and output ports. Function nodes need input components and function parameters, and output function return value data.
  • the function node can be generated according to the function information in the configuration file in json format. Since the parent class of the RTTI class is recorded, the parent class of the RTTI component can be known, and the inherited function method can be obtained. In the function information array It also records the function name, input parameters and return value type, and the function node port can be generated according to these information.
  • the function node includes multiple input ports, which are the input port used to control the trigger, the input port used to input the component node or entity node to which the function node belongs, and the input port used to obtain one or more function parameters.
  • the function node It includes two output ports, which are the output port used to control the trigger and the output port used to output the attribute value returned by the function.
  • the function node executes the function according to the parameters input in each input port used to obtain the function input parameters, and outputs the execution result.
  • the function name is "setWorldPosition”.
  • the function array inherits from the parent class "Transform”, then you can generate The function node name is "func::setWorldPosition(Transform)”.
  • the function array also records that the data type of the output value of the function is "Vector3f", and there are two input parameters of the function, both of type "Vector3f", so the function node func::setWorldPosition can be generated as shown in Figure 4C.
  • the function node includes four input ports and two output ports, the four input ports are the control port (Trigger), the port of the component node to which the input function node belongs (expressed by Transform) and two parameters The input port (both represented by the parameter type Vector3f), and the two output ports are the control port (Trigger) and the function return value output port (represented by the return value class Vector3f).
  • the solution of the embodiment of the present disclosure generates visual nodes by parsing configuration files in json format, realizes the use of unified rules to generate node styles, generates formatted running codes, avoids a lot of repetitive mechanical development, and can improve development efficiency.
  • steps 201-202 in FIG. 3 is only used as an example to explain the present disclosure, but not as a limitation to the present disclosure. Steps 201-202 only need to be executed before step 204.
  • Step 203 in response to the trigger operation on the name of the target object, display the entity node corresponding to the name of the target object on the configuration panel.
  • step 203 for the description of step 203, reference may be made to the description of step 101 in the foregoing embodiments, and details are not repeated here.
  • Step 204 Search for pre-built node names representing engine capabilities, and in response to a trigger operation on at least one target node name that is associated with the target object name and realizes the target function in the node name, display on the configuration panel that is related to at least one target node name At least one target node corresponding to the node name.
  • the atomized nodes generated by parsing the configuration file can be divided into three categories, component nodes, attribute nodes (including setting attribute nodes and reading attribute nodes) and function nodes, then in response to the node name and target object
  • the trigger operation of at least one target node name associated with the name and realizing the target function displaying at least one target node corresponding to the at least one target node name on the configuration panel, including: responding to the node name associated with the target object name , the trigger operation of the target component node name used to realize the target function, and display the target component node corresponding to the target component node name on the configuration panel;
  • the target property node name of , and/or, the trigger operation of the target function node name display the target property node corresponding to the target property node name on the configuration panel, and/or, display the target function node corresponding to the target function node name.
  • the developer when the developer needs to implement a certain function, he can search for the pre-built node name representing the engine capability, find out the target component node name associated with the target object name for realizing the target function, and execute the trigger Operation, the entity function implementing device based on the engine capability responds to the trigger operation, displays the target component node on the configuration panel, and continues to search for the target attribute node name and/or target associated with the target component node name and used to realize the target function name of the function node and execute a trigger operation, and the device for realizing the entity function based on the engine capability responds to the trigger operation and displays the target property node and/or the target function node on the configuration panel.
  • Step 205 in response to triggering an operation on the connection between the entity node and each target node according to the logic requirement, driving each target node to run the engine capability to realize the target function.
  • the developer can configure the connection relationship between the entity node and each target node according to the logical requirements, execute the connection trigger operation, and the entity function based on the engine capability
  • the realizing device drives each target node to run the engine capability to realize the target function.
  • driving each target node to run engine capabilities includes at least one of the following: the component node obtains the entity to which it belongs, and outputs the component object of the entity; reads the attribute The node obtains the component it belongs to, and outputs the current attribute value of the component; when the control port of the set attribute node is triggered, obtains the component whose attribute needs to be set, and sets the attribute value of the component; or when the input control port of the function node is triggered, according to the function parameter Execute the function output return value.
  • the component node when each target node is driven to run the engine capability, the component node is used to obtain the entity to which it belongs, and output the component object of the entity, read the property node to obtain the component to which it belongs, and output the current attribute value of the obtained component, for setting Property node, when the control port of the setting property node is triggered, obtain the component that needs to be set, and set the property value of the obtained component.
  • the function node when the input control port of the function node is triggered, according to the obtained The function parameter executes the corresponding function and outputs the return value.
  • the developer performs a connection trigger operation to configure the connection relationship of each target node, and responds to the connection trigger operation to drive the engine capability of each target node to achieve the target function, and completes the exposure of the engine capability without writing code, realizing The ability to control the runtime is improved, and the development efficiency is improved.
  • the implementation method of the entity function based on the engine capability obtains the configuration file for saving the engine data, constructs the node name representing the engine capability according to the configuration file, and constructs the node name corresponding to each node name for displaying on the configuration panel.
  • At least one target node in response to the trigger operation of the connection between the entity node and each target node according to the logical requirements, drives each target node to run the engine capability to achieve the target function, thereby realizing visual programming, and the required in the engine instance Components, properties and functions are reflected into atomic nodes, the runtime logic is configured through connections, and the engine capabilities can be exposed without manual coding, realizing special effect production.
  • FIG. 5 is an example diagram of visual programming for realizing the function of clicking the screen to shift the position of stickers by adopting the entity function implementation solution based on engine capability provided by the present disclosure.
  • the target function that the developer wants to achieve is to tap the screen to shift the position of the sticker during playback (x:100, y:200).
  • the configuration steps for visual programming to realize this function are: because it is necessary to set is the position attribute of the sticker, and the name of the target object is a sticker (2D picture), so you can first drag in the entity node from the special effect information panel, and the name of the entity node is the 2D picture, where the entity node is pre-packaged and What is displayed in the special effect information panel can be directly displayed on the configuration panel by dragging and dropping without searching.
  • Add the setting property node of setPosition by searching connect the output port of the component node comp::getTransform2d to the input port (Transform2d) of the setPosition node to indicate the component it belongs to, and connect the end position data output by the addition node to the setPosition node
  • the input port (Vector2f) used to obtain the attribute value, and add a click screen control node, and connect the click screen control node to the control flow input port (Trigger) of the setPosition node, thus configuring the connection relationship of each node.
  • the touch screen control node, numerical observation node, and addition operation node can be pre-packaged nodes for realizing script functions, which can be directly dragged and used without searching.
  • the setPosition node is activated. It traces back to find the data input of the node, obtains the end position of the output of the Transform2d component and the addition operation node, and then sets its own position attribute to change the sticker position from the original position (x:100, y:200) to the end position (x:200, y:400), realizing the function of offsetting the sticker position (x:100, y:200) when the screen is tapped.
  • the function of tapping the screen to shift the position of the sticker is realized without the need for developers to manually write code.
  • FIG. 6 is a schematic structural diagram of an apparatus for realizing an entity function based on an engine capability provided by an embodiment of the present disclosure.
  • the apparatus may be implemented by software and/or hardware, and may generally be integrated into an electronic device.
  • the apparatus for implementing entity functions based on engine capabilities includes: a first display module 301 , a second display module 302 and a driving module 303 .
  • the first display module 301 is configured to display an entity node corresponding to the target object name on the configuration panel in response to a trigger operation on the target object name.
  • the second display module 302 searches for pre-built node names representing engine capabilities, responds to a trigger operation on at least one target node name associated with the target object name among the node names and realizes the target function, in the At least one target node corresponding to the at least one target node name is displayed on the configuration panel.
  • the driving module 303 is configured to drive each of the target nodes to run an engine capability to realize the target function in response to triggering an operation on the connection between the entity node and each of the target nodes according to a logic requirement.
  • the target node includes a control target node with a control trigger port and a data target node with all ports being data ports
  • the driving module 303 is specifically configured to: when the control target node is triggered, Obtaining data information provided by the data target node connected to the control target node; and processing according to the operation logic of the control target node and the data information, and outputting corresponding processing results to achieve the target Function.
  • the device 30 for implementing entity functions based on engine capabilities further includes: an acquisition module 304, configured to acquire a configuration file for storing engine data; and a construction module 305, configured to construct a configuration file according to the configuration file.
  • the node names representing engine capabilities, and nodes corresponding to each node name are constructed for display on the configuration panel.
  • the obtaining module 304 is specifically used to: obtain the runtime type information RTTI attribute of the current engine through the engine running instance; and obtain the class name, attribute, function and inheritance relationship contained in the RTTI object according to the RTTI attribute, and save it as Configuration file in json format.
  • the construction module 305 is specifically configured to: parse the configuration file in the json format to obtain the class name of the RTTI object, and generate a node name of the component node according to the class name; 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 functional object related to the component node.
  • the construction module 305 is further configured to: parse the configuration file in json format, obtain the property information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and obtain the property information array of the RTTI object according to the properties of the property information array
  • the name generates the node name of the attribute node; wherein, the attribute node includes a read attribute node and a set attribute node, wherein the read attribute node includes: an input port 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; the set attribute node includes: an input port for controlling triggering, an input port for inputting the component node to which the set attribute node belongs, and an input port for obtaining An input port for the property value, an output port for controlling the trigger, and an output port for outputting the set property value.
  • the construction module 305 is further configured to: parse the configuration file in the json format, obtain the function information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generate the function information array according to the function name of the function information array
  • the node name of the function node wherein, the function node includes: an input port for controlling triggering, an input port for inputting the component node or entity node to which the function node belongs, and obtaining one or more function parameters The input port for the , the output port for controlling the trigger, and the output port for the output function to return the property value.
  • the second display module 302 is specifically configured to: respond to a trigger operation on the target component node name associated with the target object name in the node name and used to realize the target function, in the configuration
  • the target component node corresponding to the target component node name is displayed on the panel; in response to the target attribute node name associated with the target component node name in the node name and used to realize the target function, and/or , a trigger operation of the target function node name, displaying the target attribute node corresponding to the target property node name on the configuration panel, and/or displaying the target function node corresponding to the target function node name.
  • the driving module 303 is specifically configured to: the component node obtains the entity to which it belongs, and outputs the component object of the entity; the read attribute node obtains the component to which it belongs, and outputs the current attribute value of the component; the When the control port of the property setting node is triggered, obtain the component whose property needs to be set, and set the property value of the component; or when the input control port of the function node is triggered, execute the function according to the function parameter and output the return value.
  • the device for implementing an entity function based on engine capability provided by an embodiment of the present disclosure can execute the method for implementing an entity function based on engine capability provided by any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects for executing the method.
  • the present disclosure further proposes a computer program product, including computer programs/instructions, and when the computer programs/instructions are executed by a processor, the methods for implementing entity functions based on engine capabilities in the above embodiments are implemented.
  • FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 8 shows a schematic structural diagram of an electronic device 400 suitable for implementing an embodiment of the present disclosure.
  • the electronic device 400 in the embodiment of the present disclosure may include, but is not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals ( Mobile terminals such as car navigation terminals) and stationary terminals such as digital TVs, desktop computers and the like.
  • the electronic device shown in FIG. 8 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
  • an electronic device 400 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) Various appropriate actions and processes are executed by programs in the memory (RAM) 403 .
  • RAM random access memory
  • various programs and data necessary for the operation of the electronic device 400 are also stored.
  • the processing device 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404.
  • An input/output (I/O) interface 405 is also connected to bus 404 .
  • the following devices can be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 407 such as a computer; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409.
  • the communication means 409 may allow the electronic device 400 to perform wireless or wired communication with other devices to exchange data. While FIG. 8 shows electronic device 400 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 409, or from storage means 408, or from ROM 402.
  • the processing device 401 When the computer program is executed by the processing device 401, the above-mentioned functions defined in the engine capability-based entity function implementation method of the embodiment of the present disclosure are executed.
  • the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the client and the server can communicate using any currently known or future network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium
  • HTTP HyperText Transfer Protocol
  • the communication eg, communication network
  • Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), internetworks (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 of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to a trigger operation on the name of the target object, displays on the configuration panel the An entity node corresponding to the target object name; searching for a pre-built node name representing the engine capability, in response to a trigger operation on at least one target node name associated with the target object name among the node names and realizing the target function, Display at least one target node corresponding to the name of the at least one target node on the configuration panel; in response to triggering an operation on the connection between the entity node and each of the target nodes according to logical requirements, drive each of the targets The node runs the engine capability to realize the target function.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as the "C" 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.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • 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 they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of a unit does not constitute a limitation of the unit itself under certain circumstances.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • the present disclosure provides a method for implementing entity functions based on engine capabilities, including: in response to a trigger operation on the name of the target object, displaying on the configuration panel the entity node; search for pre-built node names representing engine capabilities, and in response to a trigger operation on at least one target node name associated with the target object name among the node names and realizing the target function, in the configuration Displaying on the panel at least one target node corresponding to the name of the at least one target node; and in response to triggering an operation on the connection between the entity node and each of the target nodes according to logical requirements, driving each of the target nodes to run an engine ability to achieve the stated objective functions.
  • the target node includes a control-type target node with a control trigger port and a data-type target node with all ports being data ports
  • the driving each of the target nodes to run the engine capability to realize the target function includes: when the control target node is triggered, obtaining the data provided by the data target node connected to the control target node information; and process according to the operation logic of the control target node and the data information, and output corresponding processing results to realize the target function.
  • the engine capability-based entity function implementation method provided in the present disclosure further includes: before searching for the pre-built node name representing the engine capability, obtaining a configuration file storing engine data; and Construct the node names representing engine capabilities according to the configuration file, and construct nodes corresponding to each node name for display on the configuration panel.
  • the acquisition of the configuration file saving the engine data includes: obtaining the current engine runtime type information RTTI attribute through the engine running instance ; and obtain the class name, attribute, function and inheritance relationship contained in the RTTI object according to the RTTI attribute, and save it as a configuration file in json format.
  • the node for displaying on the configuration panel includes: parsing the configuration file in the json format to obtain 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 It includes: an input port for inputting the entity node to which the component node belongs and an output port for outputting the functional object related to the component node.
  • the engine capability-based entity function implementation method provided by the present disclosure further includes: parsing the configuration file in json format, and obtaining the The attribute information array of the RTTI object generates the node name of the attribute node according to the attribute name of the attribute information array; wherein the attribute node includes a read attribute node and a set attribute node, wherein the read attribute node includes: using The input port for inputting the component node to which the read attribute node belongs and the output port for outputting the corresponding attribute value of the read attribute node; the set attribute node includes: an input port for controlling triggering, an input port for inputting the Set the input port of the component node to which the attribute node belongs, the input port used to obtain the attribute value, the output port used to control the trigger, and the output port used to output the set attribute value.
  • the engine capability-based entity function implementation method provided by the present disclosure further includes: parsing the configuration file in json format, and obtaining the function of the RTTI object according to the class and inheritance relationship of the RTTI object An information array, generating the node name of the function node according to the function name of the function information array; wherein, the function node includes: an input port for controlling triggering, and an input port for inputting the component node to which the function node belongs or the entity node to which it belongs An input port, an input port for obtaining one or more function parameters, an output port for controlling a trigger, and an output port for outputting a function return attribute value.
  • the response to at least A trigger operation of a target node name, displaying at least one target node corresponding to the at least one target node name on the configuration panel includes: responding to the use of In response to the trigger operation of the target component node name for realizing the target function, the target component node corresponding to the target component node name is displayed on the configuration panel; and in response to the node name associated with the target component node name
  • the name of the target attribute node used to realize the target function, and/or, the trigger operation of the target function node name, the target attribute node corresponding to the target attribute node name is displayed on the configuration panel, and/or , to display the objective function node corresponding to the objective function node name.
  • the driving each target node to run the engine capability to realize the target function includes at least one of the following:
  • the component node obtains the entity to which it belongs, and outputs the component object of the entity;
  • the read property node obtains the component to which it belongs, and outputs the current attribute value of the component; when the control port of the set property node is triggered, it obtains the component, and set the attribute value of the component; or when the input control port of the function node is triggered, execute the function according to the function parameter and output the return value.
  • the present disclosure provides an apparatus for implementing entity functions based on engine capabilities, including: a first display module, configured to display on the configuration panel in response to a trigger operation on the name of the target object The entity node corresponding to the name of the target object; the second display module, searching for a pre-built node name representing the engine capability, in response to at least one of the node names associated with the name of the target object and realizing the target function A trigger operation of a target node name, displaying on the configuration panel at least one target node corresponding to the at least one target node name; and a driving module, configured to respond to the logical requirements of the entity node and each of the The connection between the target nodes triggers an operation, and drives each target node to run an engine capability to realize the target function.
  • the target nodes include a control target node with a control trigger port and a data target node with all ports being data ports
  • the driving module is specifically configured to: when the control target node is triggered, obtain the data information provided by the data target node connected to the control target node; and according to the control target node The operation logic and the data information are processed, and corresponding processing results are output to realize the target function.
  • the device for implementing entity functions based on engine capabilities further includes: an acquisition module, configured to acquire a configuration file that saves engine data; and a construction module, configured to The configuration file constructs the node names representing engine capabilities, and constructs nodes corresponding to each node name for display on the configuration panel.
  • the obtaining module is specifically configured to: obtain the RTTI attribute of the current engine runtime type information through the engine running instance; and according to the The above RTTI attribute obtains the class name, attribute, function and inheritance relationship contained in the RTTI object, and saves it as a configuration file in json format.
  • the building module is specifically configured to: parse the configuration file in json format to obtain the class name of the RTTI object , generating a node name of the component node according to the class name; wherein, the component node includes: an input port for inputting an entity node to which the component node belongs and an output port for outputting a functional object related to the component node.
  • the building module is further configured to: parse the configuration file in json format, according to the class of the RTTI object and The inheritance relationship acquires the attribute information array of the RTTI object, and generates the node name of the attribute node according to the attribute name of the attribute information array; wherein, the attribute node includes a read attribute node and a set attribute node, wherein the read
  • the attribute node includes: an input port for inputting the component node to which the read attribute node belongs and an output port for outputting the corresponding attribute value of the read attribute node
  • the set attribute node includes: an input port for controlling triggering , an input port for inputting the component node to which the set attribute node belongs, an input port for obtaining the attribute value, an output port for controlling the trigger, and an output port for outputting the set attribute value.
  • the building module is further configured to: parse the configuration file in json format, according to the class of the RTTI object and The inheritance relationship acquires the function information array of the RTTI object, and generates the node name of the function node according to the function name of the function information array; wherein, the function node includes: an input port for controlling triggering, and an The input port of the component node or the entity node it belongs to, and the input port used to obtain one or more function parameters, the output port used to control the trigger, and the output port used to output the property value returned by the function.
  • the second display module is specifically configured to: respond to the association between the node name and the target object name The trigger operation of the target component node name for realizing the target function, displaying the target component node corresponding to the target component node name on the configuration panel; and responding to the target component node in the node name The target attribute node name associated with the node name for realizing the target function, and/or, the trigger operation of the target function node name, displaying the target attribute node corresponding to the target attribute node name on the configuration panel, And/or, displaying an objective function node corresponding to the name of the objective function node.
  • the driving module is specifically configured to: the component node obtains the entity to which it belongs, and outputs the component object of the entity;
  • the read attribute node obtains the component to which it belongs, and outputs the current attribute value of the component; when the control port of the set attribute node is triggered, obtains the component whose attribute needs to be set, and sets the attribute value of the component; or the function
  • the function is executed according to the function parameters and the return value is output.
  • the present disclosure provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; The executable instructions are read, and executed to implement any method for implementing entity functions based on engine capabilities as provided in the present disclosure.
  • the present disclosure provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute any one of the methods based on the present disclosure. Entity function implementation method of engine capability.
  • the present disclosure provides a computer program, including: instructions, which, when executed by a processor, cause the processor to perform any one of the methods based on the present disclosure. Entity function implementation method of engine capability.
  • the present disclosure provides a computer program product, including instructions, which, when executed by a processor, cause the processor to perform any one of the methods based on the present disclosure.
  • Entity function implementation method of engine capability The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the disclosure scope involved in this disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but also covers the technical solutions formed by the above-mentioned technical features or Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

An engine capability-based entity function implementation method and apparatus and an electronic device, the method comprising: in response to a triggering operation on a target object name, displaying an entity node corresponding to the target object name in a configuration panel (101); searching for pre-built node names representing engine capability, and in response to a triggering operation on at least one target node name in the node names that is associated with the target object name and that implements a target function, displaying the least one target node corresponding to the at least one target node name in the configuration panel (102); and in response to a triggering operation on the connection between an entity node and each target node according to a logical requirement, driving each target node to run the engine capability so as to achieve the target function (103). By using the described technical solution, developers do not need to write a large amount of code to expose engine capability, which achieves high-efficiency development and reduces development costs.

Description

基于引擎能力的实体功能实现方法、装置及电子设备Entity function realization method, device and electronic equipment based on engine capability
相关申请的交叉引用Cross References to Related Applications
本申请是以申请号为202110729945.7,申请日为2021年6月29日的中国申请为基础,并主张其优先权,该中国申请的公开内容在此作为整体引入本申请中。This application is based on the Chinese application with the application number 202110729945.7 and the filing date is June 29, 2021, and claims its priority. The disclosure content of the Chinese application is hereby incorporated into this application as a whole.
技术领域technical field
本公开涉及可视化编程技术领域,尤其涉及一种基于引擎能力的实体功能实现方法、装置及电子设备。The present disclosure relates to the technical field of visual programming, and in particular to a method, device and electronic device for implementing entity functions based on engine capabilities.
背景技术Background technique
在实体组件系统(Entity-Component-System,ECS)架构下,使用引擎的某种功能的调用顺序为:实体Entity->获取组件component->使用属性或方法。Under the Entity Component System (Entity-Component-System, ECS) architecture, the calling sequence of using a certain function of the engine is: entity Entity-> get component component-> use attribute or method.
发明内容Contents of the invention
根据本公开的一个方面,本公开实施例提供了一种基于引擎能力的实体功能实现方法,所述方法包括:响应于对目标对象名称的触发操作,在配置面板上显示与所述目标对象名称对应的实体节点;搜索预先构建的表示引擎能力的节点名称,响应于对所述节点名称中与所述目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在所述配置面板上显示与所述至少一个目标节点名称对应的至少一个目标节点;和响应于根据逻辑需求对所述实体节点和各所述目标节点之间的连接触发操作,驱动各所述目标节点运行引擎能力以实现所述目标功能。According to one aspect of the present disclosure, an embodiment of the present disclosure provides a method for realizing an entity function based on an engine capability, the method comprising: in response to a trigger operation on the name of the target object, displaying on the configuration panel the Corresponding entity node; searching for a pre-built node name representing engine capability, in response to a trigger operation on at least one target node name associated with the target object name among the node names and realizing the target function, in the At least one target node corresponding to the name of the at least one target node is displayed on the configuration panel; and in response to triggering an operation on the connection between the entity node and each of the target nodes according to logical requirements, driving each of the target nodes to run Engine capabilities to achieve the stated target functionality.
根据本公开的另一个方面,本公开实施例还提供了一种基于引擎能力的实体功能实现装置,所述装置包括:第一显示模块,用于响应于对目标对象名称的触发操作,在配置面板上显示与所述目标对象名称对应的实体节点;第二显示模块,搜索预先构建的表示引擎能力的节点名称,响应于对所述节点名称中与所述目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在所述配置面板上显示与所述至少一个目标节点名称对应的至少一个目标节点;和驱动模块,用于响应于根据逻辑需求对所述实体节点和各所述目标节点之间的连接触发操作,驱动各所述目标节点运行引擎能力以实现所述目标功能。According to another aspect of the present disclosure, an embodiment of the present disclosure also provides an apparatus for implementing entity functions based on engine capabilities, the apparatus including: a first display module, configured to respond to a trigger operation on the name of the target object, and configure The entity node corresponding to the name of the target object is displayed on the panel; the second display module searches the pre-built node name representing the engine capability, and responds to the node name associated with the name of the target object and achieves the goal A trigger operation of at least one target node name of the function, displaying at least one target node corresponding to the at least one target node name on the configuration panel; and a driving module, configured to respond to the physical node and the The connection between each of the target nodes triggers an operation to drive each of the target nodes to run engine capabilities to realize the target function.
根据本公开的另一个方面,本公开实施例还提供了一种电子设备,所述电子设备包括:处理器;用于存储所述处理器可执行指令的存储器;所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现如本公开实施例提供的基于引擎能力的实体功能实现方法。According to another aspect of the present disclosure, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising: a processor; a memory for storing instructions executable by the processor; The executable instruction is read from the memory, and the instruction is executed to implement the engine capability-based entity function implementation method provided by the embodiment of the present disclosure.
根据本公开的另一个方面,本公开实施例还提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行如本公开实施例提供的基于引擎能力的实体功能实现方法。According to another aspect of the present disclosure, the embodiment of the present disclosure further provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute the engine capability-based engine provided by the embodiment of the present disclosure. Entity function realization method.
根据本公开的另一个方面,本公开实施例还提供了一种计算机程序,包括:指令,所述指令当由处理器执行时使所述处理器执行如本公开实施例提供的基于引擎能力的实体功能实现方法。According to another aspect of the present disclosure, an embodiment of the present disclosure further provides a computer program, including: instructions, which when executed by a processor cause the processor to execute the engine capability-based Entity function realization method.
根据本公开的另一个方面,本公开实施例还提供了一种计算机程序产品,包括指令,所述指令当由处理器执行时使所述处理器执行如本公开实施例提供的基于引擎能力的实体功能实现方法。According to another aspect of the present disclosure, an embodiment of the present disclosure further provides a computer program product, including instructions, the instructions, when executed by a processor, cause the processor to execute the engine capability-based Entity function realization method.
附图说明Description of drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
图1为本公开实施例提供的一种基于引擎能力的实体功能实现方法的流程示意图;FIG. 1 is a schematic flowchart of a method for implementing an entity function based on an engine capability provided by an embodiment of the present disclosure;
图2A为搜索表示引擎能力的节点名称的示例图一;Fig. 2A is an example Fig. 1 of searching for a node name representing an engine capability;
图2B为搜索表示引擎能力的节点名称的示例图二;Fig. 2B is an example Fig. 2 of searching for a node name representing an engine capability;
图2C为搜索表示引擎能力的节点名称的示例图三;Fig. 2C is an example Fig. 3 of searching for a node name representing an engine capability;
图3为本公开实施例提供的另一种基于引擎能力的实体功能实现方法的流程示意图;FIG. 3 is a schematic flowchart of another method for implementing entity functions based on engine capabilities provided by an embodiment of the present disclosure;
图4A为生成的组件节点的示例图;Figure 4A is an example diagram of a generated component node;
图4B为生成的读取属性节点和设置属性节点的示例图;Figure 4B is an example diagram of the generated read attribute node and set attribute node;
图4C为生成的函数节点的示例图;Figure 4C is an example diagram of a generated function node;
图5为采用本公开提供的基于引擎能力的实体功能实现方案实现点击屏幕使贴纸位置偏移功能的可视化编程示例图;FIG. 5 is an example diagram of visual programming for realizing the function of clicking the screen to shift the position of the sticker by using the engine capability-based entity function implementation scheme provided by the present disclosure;
图6为本公开实施例提供的一种基于引擎能力的实体功能实现装置的结构示意图;FIG. 6 is a schematic structural diagram of an apparatus for realizing an entity function based on an engine capability provided by an embodiment of the present disclosure;
图7为本公开实施例提供的另一种基于引擎能力的实体功能实现装置的结构示意图;FIG. 7 is a schematic structural diagram of another device for implementing entity functions based on engine capabilities provided by an embodiment of the present disclosure;
图8为本公开实施例提供的一种电子设备的结构示意图。FIG. 8 is a schematic structural diagram of an electronic device provided by 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. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein; A more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the protection scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the various steps described in the method implementations of the present disclosure may be executed in different orders, and/or executed in parallel. Additionally, method embodiments may include additional steps and/or omit performing illustrated steps. The scope of the present disclosure is not limited in this respect.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "comprise" and its variations are open-ended, ie "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 further embodiment"; the term "some embodiments" means "at least some embodiments." Relevant definitions of other terms will be given in the description below.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that concepts such as "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the sequence of functions performed by these devices, modules or units or interdependence.
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more" multiple".
本公开的发明人发现,在软件开发中,引擎中的组件、属性、方法成百上千,如果每个组件、属性等均用代码编写,则会带来较高的开发成本,效率较低。The inventors of the present disclosure found that in software development, there are hundreds of components, attributes, and methods in the engine. If each component, attribute, etc. is written in code, it will bring high development costs and low efficiency .
鉴于此,本公开实施例提供了一种基于引擎能力的实体功能实现方法,下面结合具体的实施例对该方法进行介绍。In view of this, an embodiment of the present disclosure provides a method for implementing an entity function based on an engine capability, and the method will be introduced in conjunction with specific embodiments below.
图1为本公开实施例提供的一种基于引擎能力的实体功能实现方法的流程示意图,该方法可以由基于引擎能力的实体功能实现装置执行,其中该装置可以采用软件和/或硬件实现,一般可集成在电子设备中。如图1所示,该方法包括步骤101至步骤103。Fig. 1 is a schematic flowchart of a method for realizing an entity function based on engine capability provided by an embodiment of the present disclosure. The method can be executed by a device for realizing an entity function based on engine capability, wherein the device can be implemented by software and/or hardware, generally Can be integrated in electronic equipment. As shown in FIG. 1 , the method includes step 101 to step 103 .
步骤101、响应于对目标对象名称的触发操作,在配置面板上显示与目标对象名称对应的实体节点。 Step 101 , in response to a trigger operation on the name of the target object, display the entity node corresponding to the name of the target object on the configuration panel.
其中,目标对象包括实体,目标对象名称即实体名称,目标对象是指实现目标功能需 要被操作的对象。比如待实现的目标功能是控制摄像机旋转,则摄像机是目标对象。又比如,待实现的目标功能是控制2维图像的位置移动,则该2维图像是目标对象。Wherein, the target object includes an entity, the name of the target object is the name of the entity, and the target object refers to the object that needs to be operated to realize the target function. For example, the target function to be realized is to control the rotation of the camera, then the camera is the target object. For another example, if the target function to be realized is to control the position movement of a 2D image, then the 2D image is the target object.
本公开实施例中,与目标对象名称对应的实体节点可以预先封装好并显示在配置面板的工具栏区域中,当需要控制该目标对象实现某个功能时,开发人员可以从工具栏区域找到该目标对象的目标对象名称,并对该目标对象名称执行触发操作,基于引擎能力的实体功能实现装置响应于该触发操作,在配置面板上显示出与该目标对象名称对应的实体节点。In the embodiment of the present disclosure, the entity node corresponding to the name of the target object can be pre-packaged and displayed in the toolbar area of the configuration panel. When it is necessary to control the target object to achieve a certain function, the developer can find the The name of the target object of the target object, and a trigger operation is performed on the name of the target object. In response to the trigger operation, the device for realizing the entity function based on the engine capability displays the entity node corresponding to the name of the target object on the configuration panel.
其中,触发操作包括但不限于鼠标点击、触摸笔点击、手指点击、鼠标拖拽、触摸笔拖拽、手指拖拽等,本公开对此不作限制。Wherein, the triggering operation includes but not limited to mouse click, touch pen click, finger click, mouse drag, touch pen drag, finger drag, etc., which is not limited in the present disclosure.
步骤102、搜索预先构建的表示引擎能力的节点名称,响应于对节点名称中与目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在配置面板上显示与至少一个目标节点名称对应的至少一个目标节点。Step 102: Search for pre-built node names that represent engine capabilities, and respond to trigger operations on at least one target node name that is associated with the target object name and realizes the target function in the node name, and displays on the configuration panel that is related to at least one target node name At least one target node corresponding to the node name.
其中,表示引擎能力的节点名称,是指实现某个功能所需要依赖的可视化节点的名称。一个可视化节点代表了一个具体的引擎能力。可视化节点可以包括组件节点、读取属性节点、函数节点等,其中,组件节点和读取属性节点的引擎能力可以为其他节点提供数据,函数节点的引擎能力可以向用户开放逻辑控制能力以及复杂引擎功能。Among them, the node name representing the engine capability refers to the name of the visualization node that needs to be relied upon to realize a certain function. A visualization node represents a specific engine capability. Visualization nodes can include component nodes, read attribute nodes, function nodes, etc. Among them, the engine capabilities of component nodes and read attribute nodes can provide data for other nodes, and the engine capabilities of function nodes can open logic control capabilities and complex engines to users Function.
能够理解的是,对于开发人员而言,实现某个功能需要依赖哪些引擎能力是开发人员所具备的基础知识,本公开实施例中,可以预先构建出表示引擎能力的节点名称,当开发人员需要对目标对象实现目标功能时,可以搜索预先构建的各节点的节点名称,并从各节点名称中确定出至少一个目标节点名称,其中,至少一个目标节点名称是与目标对象关联的、且用于实现目标功能的节点名称。开发人员对至少一个目标节点名称执行触发操作,响应于该触发操作,基于引擎能力的实体功能实现装置在配置面板上显示与每个目标节点名称对应的目标节点。It can be understood that for developers, it is the basic knowledge of which engine capabilities to implement a certain function. When the target function is realized for the target object, the node names of the pre-built nodes can be searched, and at least one target node name can be determined from each node name, wherein at least one target node name is associated with the target object and used for The name of the node that implements the target function. The developer performs a trigger operation on at least one target node name, and in response to the trigger operation, the entity function realization device based on the engine capability displays the target node corresponding to each target node name on the configuration panel.
举例而言,假设开发人员需要实现的目标功能是点击屏幕时贴纸位置偏移,则目标对象为贴纸,目标对象名称记为Sprite2D。开发人员已知实现该位置偏移功能需要Transform2D这个组件控制,则可以搜索预先构建的各节点名称以查找Transform2D组件。本公开实施例中,可以采用不同的方式来查找与目标对象名称Sprite2D关联的Transform2D组件,下面分别进行介绍。For example, assuming that the target function that the developer needs to achieve is to shift the position of the sticker when the screen is tapped, the target object is a sticker, and the name of the target object is recorded as Sprite2D. Developers know that the Transform2D component is required to implement the position offset function, so they can search the pre-built node names to find the Transform2D component. In the embodiment of the present disclosure, different ways may be used to find the Transform2D component associated with the target object name Sprite2D, which will be introduced respectively below.
作为一种示例,图2A为搜索表示引擎能力的节点名称的示例图一。如图2A所示,因为要查找的是组件,则开发人员可以输入组件component在预先构建的节点名称中的索引字符串“comp”来搜索已有的组件名称,再根据当前的目标对象(Sprite2D)和需要搜索 的目标组件(Transform2D),从搜索结果列表展示的多个节点名称中,找到与目标对象(Sprite2D)关联的目标节点名称,如图2A所示,目标节点名称为“comp::getTransform2D(Sprite2D)”。As an example, FIG. 2A is a first example of searching for a node name representing an engine capability. As shown in Figure 2A, because the component is to be searched, the developer can input the index string "comp" of the component component in the pre-built node name to search for the existing component name, and then according to the current target object (Sprite2D ) and the target component (Transform2D) to be searched, find the target node name associated with the target object (Sprite2D) from the multiple node names displayed in the search result list, as shown in Figure 2A, the target node name is "comp:: getTransform2D(Sprite2D)".
作为另一种示例,图2B为搜索表示引擎能力的节点名称的示例图二。如图2B所示,因为要查找的是Transform2D组件,则开发人员可以输入字符串“Transform2D”或者输入Transform2D的部分字符串(比如输入Tran或者tran)来搜索,图2B中以输入字符串tran作为示例,再根据当前的目标对象(Sprite2D),从搜索结果列表中展示的所有Transform2D组件的节点名称中,找到与目标对象(Sprite2D)关联的目标节点名称,如图2B所示,目标节点名称为“comp::getTransform2D(Sprite2D)”。As another example, FIG. 2B is a second example of searching for node names representing engine capabilities. As shown in Figure 2B, since the Transform2D component is to be searched, the developer can input the character string "Transform2D" or input a part of the character string of Transform2D (for example, input Tran or tran) to search. In Figure 2B, the input character string tran is used as For example, according to the current target object (Sprite2D), find the target node name associated with the target object (Sprite2D) from the node names of all Transform2D components displayed in the search result list, as shown in Figure 2B, the target node name is "comp::getTransform2D(Sprite2D)".
作为另一种示例,图2C为搜索表示引擎能力的节点名称的示例图三。如图2C所示,开发人员可以通过从目标对象名称对应的实体节点(Sprite2D)引出连接线的方式来调出搜索框,则搜索框下方会显示出与该目标对象(Sprite2D)关联的所有节点名称,开发人员可以通过从列表中查找,或者在搜索框中输入与待查找的Transform2D组件相关的字符串(比如输入Transform)进行搜索的方式来查找目标节点名称,如图2C所示,目标节点名称为“comp::getTransform2D(Sprite2D)”,实现了聚焦搜索,能够提高搜索效率。As another example, Fig. 2C is an example Fig. 3 of searching for a node name representing an engine capability. As shown in Figure 2C, the developer can call up the search box by drawing a connection line from the entity node (Sprite2D) corresponding to the target object name, and all nodes associated with the target object (Sprite2D) will be displayed below the search box Name, the developer can find the name of the target node by looking it up from the list, or by entering a character string related to the Transform2D component to be found in the search box (such as entering Transform) to search, as shown in Figure 2C, the target node The name is "comp::getTransform2D(Sprite2D)", which realizes focused search and can improve search efficiency.
之后,当开发人员触发(比如鼠标点击)搜索到的目标节点名称时,在配置面板上显示与该目标节点名称对应的目标节点。Afterwards, when the developer triggers (for example, mouse clicks) the searched target node name, the target node corresponding to the target node name is displayed on the configuration panel.
步骤103、响应于根据逻辑需求对实体节点和各目标节点之间的连接触发操作,驱动各目标节点运行引擎能力以实现目标功能。 Step 103 , in response to triggering an operation on the connection between the entity node and each target node according to the logic requirement, driving each target node to run the engine capability to realize the target function.
本公开实施例中,在配置面板上显示了实体节点以及多个目标节点之后,开发人员可以根据逻辑需求配置实体节点与各目标节点之间的连接关系,执行连接触发操作,比如实体节点与目标节点中代表组件的目标节点的输入连接以获取与目标对象关联的组件,代表组件的目标节点的输出与代表属性的目标节点的输入相连,以设置该组件的属性信息,等等。基于引擎能力的实体功能实现装置响应于实体节点与各目标节点之间的连接触发操作,配置好各节点之间的连接关系,进而根据连接关系驱动各目标节点运行引擎能力,从而实现目标功能。In the embodiment of the present disclosure, after the entity node and multiple target nodes are displayed on the configuration panel, the developer can configure the connection relationship between the entity node and each target node according to the logical requirements, and execute the connection trigger operation, such as the entity node and the target node The input of the target node representing the component in the node is connected to obtain the component associated with the target object, the output of the target node representing the component is connected to the input of the target node representing the attribute to set the attribute information of the component, and so on. The entity function realization device based on the engine capability responds to the connection trigger operation between the entity node and each target node, configures the connection relationship between each node, and then drives each target node to run the engine capability according to the connection relationship, so as to realize the target function.
本公开实施例的基于引擎能力的实体功能实现方法,响应于对目标对象名称的触发操作,在配置面板上显示与目标对象名称对应的实体节点,搜索预先构建的表示引擎能力的节点名称,响应于对节点名称中与目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在配置面板上显示与至少一个目标节点名称对应的至少一个目标节 点,进而响应于根据逻辑需求对实体节点和各目标节点之间的连接触发操作,驱动各目标节点运行引擎能力实现目标功能。采用上述技术方案,只需搜索预先构建的节点名称并触发所需的目标节点名称,即可显示与目标节点名称对应的目标节点,进而根据逻辑需求配置各节点之间的连接关系即可实现目标功能,无需开发人员编写大量的代码来暴露引擎能力,实现了高效率开发,降低了开发成本。In the implementation method of the entity function based on the engine capability in the embodiment of the present disclosure, in response to the trigger operation on the target object name, the entity node corresponding to the target object name is displayed on the configuration panel, and the pre-built node name representing the engine capability is searched for, and the response Based on the trigger operation on at least one target node name associated with the target object name in the node name and realizing the target function, at least one target node corresponding to the at least one target node name is displayed on the configuration panel, and then in response to the logical requirement Trigger the operation on the connection between the entity node and each target node, and drive the engine capability of each target node to realize the target function. With the above technical solution, only need to search for the pre-built node name and trigger the required target node name, the target node corresponding to the target node name can be displayed, and then the connection relationship between each node can be configured according to the logical requirements to achieve the goal Functions, developers do not need to write a large amount of code to expose engine capabilities, achieving high-efficiency development and reducing development costs.
在一些实施例中,目标节点包括具有控制触发端口的控制类目标节点和所有端口为数据端口的数据类目标节点,从而,驱动各目标节点运行引擎能力以实现目标功能,包括:当控制类目标节点被触发时,获取控制类目标节点所连接的数据类目标节点提供的数据信息;和根据控制类目标节点的运行逻辑和数据信息进行处理,输出对应的处理结果以实现目标功能。In some embodiments, the target node includes a control-type target node with a control trigger port and a data-type target node with all ports as data ports, so that each target node is driven to run the engine to realize the target function, including: when the control-type target When the node is triggered, obtain the data information provided by the data target node connected to the control target node; process according to the operation logic and data information of the control target node, and output the corresponding processing results to realize the target function.
示例性地,具有控制触发端口的设置属性节点即为一种控制类目标节点,用于获取组件节点的某个属性对应的属性值的读取属性节点则为一种数据类目标节点。Exemplarily, a set attribute node with a control trigger port is a control type target node, and a read attribute node for obtaining an attribute value corresponding to a certain attribute of a component node is a type of data type target node.
本公开实施例中,开发人员执行实体节点与控制类目标节点、数据类目标节点之间的连接触发操作以配置各节点之间的连接关系,基于引擎能力的实体功能实现装置响应于该连接触发操作,配置实体节点、控制类目标节点、数据类目标节点之间的连接关系在控制类目标节点被触发的情况下,控制类目标节点从与之连接的数据类目标节点读取数据信息,并根据自身的运行逻辑和读取的数据信息完成具体的控制任务运行,进而输出对应的处理结果以实现目标功能。In the embodiment of the present disclosure, the developer executes the connection trigger operation between the entity node and the control target node and the data target node to configure the connection relationship between each node, and the entity function realization device based on the engine capability responds to the connection trigger Operation, configure the connection relationship among entity nodes, control target nodes, and data target nodes. When the control target node is triggered, the control target node reads data information from the data target node connected to it, and Complete the specific control task operation according to its own operation logic and read data information, and then output the corresponding processing results to achieve the 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, then when the screen is clicked, the node corresponding to the clicked screen inputs the control flow to the control target node, and the control target node used to change the size of the sticker is Triggered, at this time, the control target node obtains the data provided by the data target node connected to the control target node, so as to calculate the size of the sticker according to the operation logic of the control target node and the obtained data, and then output the calculated sticker Size to achieve sticker size change.
上述方案中,当控制类目标节点被触发时,获取控制类目标节点所连接的数据类目标节点提供的数据信息,根据控制类目标节点的运行逻辑和数据信息进行处理,输出对应的处理结果以实现目标功能,仅需配置好各目标节点之间的连接关系即可基于各目标节点的引擎能力实现目标功能,避免了手动编写程序代码,提高了开发效率。In the above scheme, when the control target node is triggered, the data information provided by the data target node connected to the control target node is obtained, processed according to the operation logic and data information of the control target node, and the corresponding processing results are output as To realize the target function, it only needs to configure the connection relationship between each target node to realize the target function based on the engine capability of each target node, avoiding manual programming code and improving development efficiency.
图3为本公开实施例提供的另一种基于引擎能力的实体功能实现方法的流程示意图,本实施例在上述实施例的基础上,进一步优化了上述基于引擎能力的实体功能实现方法。如图3所示,该方法包括步骤201至步骤205。FIG. 3 is a schematic flowchart of another method for implementing entity functions based on engine capabilities provided by an embodiment of the present disclosure. On the basis of the above embodiments, this embodiment further optimizes the method for implementing entity functions based on engine capabilities. As shown in FIG. 3 , the method includes step 201 to step 205 .
步骤201、获取保存引擎数据的配置文件。 Step 201, acquiring a configuration file for storing engine data.
其中,引擎数据可以根据引擎运行实例确定,引擎运行实例依赖于若干个组件、属性、函数方法等数据所运行的引擎能力实现,因此本公开实施例中,引擎数据可以包括但不限于引擎运行实例时所依赖的所有的组件、属性、函数方法等数据。Among them, the engine data can be determined according to the engine running instance, and the engine running instance depends on the engine capability implemented by several components, attributes, function methods and other data. Therefore, in the embodiments of the present disclosure, the engine data can include but not limited to the engine running instance All the components, properties, function methods and other data that are dependent on time.
本公开实施例中,配置文件可以是预先生成并存储在本地的,也可以是从服务端获取的,还可以是根据引擎运行时实例生成的,本公开对此不作限制。In the embodiment of the present disclosure, the configuration file may be pre-generated and stored locally, or obtained from the server, or generated according to the engine runtime instance, which is not limited in the present disclosure.
作为一种可能的实现方式,配置文件可以是实时生成的,获取保存引擎数据的配置文件,包括:通过引擎运行实例获取当前引擎的运行时类型信息RTTI(Runtime Type Information)属性;根据RTTI属性获取RTTI对象包含的类名、属性、函数和继承关系,并保存成json格式的配置文件。As a possible implementation, the configuration file can be generated in real time, and the configuration file for saving the engine data is obtained, including: obtaining the runtime type information RTTI (Runtime Type Information) attribute of the current engine through the engine running instance; obtaining according to the RTTI attribute The RTTI object contains the class name, attribute, function and inheritance relationship, and saves it as a configuration file in json format.
其中,继承关系是指引擎的RTTI类之间的继承关系,即某个RTTI类继承于哪个父类,通过继承关系可以获取继承下来的属性和函数方法。Among them, the inheritance relationship refers to the inheritance relationship between the RTTI classes of the engine, that is, which parent class a certain RTTI class inherits from, and the inherited attributes and function methods can be obtained through the inheritance relationship.
能够理解的是,引擎具有RTTI属性,能够获取运行时类型、对象属性等信息,当引擎加载时,通过引擎运行实例获取引擎运行时所有的RTTI信息,通过RTTI信息可以获得每个RTTI类的继承关系,以及RTTI类暴露出的属性和函数方法,解析出每个RTTI类的相关信息,可以记录在json文件中,保存成json格式的配置文件。It can be understood that the engine has RTTI attributes, which can obtain information such as runtime type and object attributes. When the engine is loaded, all RTTI information of the engine runtime can be obtained through the engine running instance, and the inheritance of each RTTI class can be obtained through the RTTI information. Relationships, as well as the properties and function methods exposed by the RTTI class, parse out the relevant information of each RTTI class, which can be recorded in the json file and saved as a configuration file in json format.
作为一种示例,json格式的配置文件中可以包括RTTI类的类名、该RTTI类继承的父类、该RTTI类的属性信息和函数信息。其中,子类可以继承父类的属性和函数方法,属性信息包括但不限于属性名称、属性RTTI类型、该属性是否可读可写;函数信息包括但不限于函数名称、函数返回RTTI类型、该函数所需参数个数和参数RTTI类型。As an example, the configuration file in json format may include the class name of the RTTI class, the parent class inherited by the RTTI class, attribute information and function information of the RTTI class. Among them, the subclass can inherit the attributes and function methods of the parent class. The attribute information includes but not limited to the attribute name, the attribute RTTI type, whether the attribute is readable and writable; the function information includes but not limited to the function name, the RTTI type returned by the function, the The number of parameters required by the function and the RTTI type of the parameter.
上述技术方案中,由于运行时实例包含了当前引擎版本和运行环境可用的所有组件、属性和函数,因此,通过引擎运行实例获取当前引擎所有的RTTI属性,根据RTTI属性获取RTTI对象包含的类名、属性、函数和继承关系,并保存成json格式的配置文件的方式获取的配置文件,记录了满足当前引擎版本和运行环境的所有引擎数据,在使用时,能够有效避免因调用了已关闭、限制或隔离的功能导致引擎崩溃的风险。并且,将RTTI对象包含的类名、属性、函数和继承关系保存成json格式的配置文件,可以实现灵活的功能配置和下发,实现快捷的节点搜索功能。In the above technical solution, since the runtime instance includes all components, attributes and functions available in the current engine version and runtime environment, all RTTI attributes of the current engine are obtained through the engine running instance, and the class name contained in the RTTI object is obtained according to the RTTI attribute , attributes, functions, and inheritance relationships, and save them as configuration files in json format. The configuration file records all engine data that meets the current engine version and operating environment. When using it, it can effectively avoid calling closed, Restricted or isolated functionality creates a risk of engine crashes. Moreover, saving the class name, attribute, function and inheritance relationship contained in the RTTI object as a configuration file in json format can realize flexible function configuration and distribution, and realize a fast node search function.
需要说明的是,配置文件为json格式仅作为示例,配置文件还可以是其他格式的文件,比如YAML格式、INI格式等,本公开对此不作限制。It should be noted that the json format of the configuration file is only 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, the configuration file can be delivered by the server along with the engine version, and the server will pre-generate the configuration file corresponding to each instance according to the instances that the current version of the engine can run and send it along with the engine version. Send it to the client, and the client saves the configuration file locally when installing the engine, so that when implementing the engine capability-based entity function implementation solution of the present disclosure, the engine capability-based entity function implementation device can obtain and save the engine capability from the local Data profile.
步骤202、根据配置文件构建表示引擎能力的节点名称,以及构建与各节点名称对应的用于展示在配置面板上的节点。 Step 202, constructing node names representing engine capabilities according to the configuration file, and constructing nodes corresponding to each node name for display on the configuration panel.
本公开实施例中,获取了保存引擎数据的配置文件之后,可以根据配置文件,构建出表示引擎能力的节点名称供搜索,以及可以构建出与各节点名称对应的用于展示在配置面板上的节点。In the embodiment of the present disclosure, after obtaining the configuration file for saving engine data, according to the configuration file, a node name indicating the engine capability can be constructed for searching, and a node name corresponding to each node name can be constructed for display on the configuration panel. node.
作为一种可能的实现方式,可以根据配置文件中记录的类名、属性和函数,生成对应的类节点名称、属性节点名称和函数节点名称,根据配置文件中记录的属性名称、属性类型,生成属性节点名称对应的属性节点,根据函数名称、返回类型和函数的参数,生成函数节点名称对应的函数节点。As a possible implementation, you can generate the corresponding class node name, attribute node name and function node name according to the class name, attribute and function recorded in the configuration file, and generate The property node corresponding to the property node name generates a function node corresponding to the function node name according to the function name, return type and function parameters.
作为另一种可能的实现方式,当配置文件为json格式时,根据配置文件构建表示引擎能力的节点名称,以及构建与各节点名称对应的用于展示在配置面板上的节点,包括:解析json格式的配置文件以获取RTTI对象的类名,根据类名生成组件节点的节点名称;其中,组件节点包括:用于输入组件节点所属实体节点的输入端口和用于输出组件节点相关功能对象的输出端口。As another possible implementation, when the configuration file is in json format, construct node names representing engine capabilities according to the configuration files, and construct nodes corresponding to each node name for display on the configuration panel, including: parsing json format configuration file to obtain the class name of the RTTI object, and generate the node name of the component node according to the class name; wherein, the component node includes: the input port for inputting the entity node to which the component node belongs and the output for outputting the functional object related to the component node port.
其中,组件节点的输出端口的输出与组件节点的功能相关,比如组件节点“comp::getTransform”的功能为获取实体节点的Transform组件,则该组件节点的输出端口的输出对象为Transform组件。Among them, 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 the Transform component of the entity node, and the output object of the output port of the component node is the Transform component.
举例而言,假设json格式的配置文件中记录的内容包括:RTTI类名为“Transform2d”,该RTTI类继承的父类为“Transform”,该RTTI类对应的属性信息中,属性名称为“Position”,属性RTTI类型为“Vector2f”,属性可读且可写,该RTTI类对应的函数信息中,函数名称为“setWorldPosition”、函数返回RTTI类型为“Vector3f”、该函数所需输入参数个数为2个,且每个输入参数的参数RTTI类型均为“Vector3f”。解析上述json格式的配置文件可知,RTTI类的父类为Transform,RTTI类的类名为“Transform2d”,则根据类名可以生成组件节点的节点名称为“comp::getTransform2d”。为了方便开发人员区分组件所属的实体,可以用RTTI对象进行标记,假设上述类名Transform2d对应的RTTI对象为2D图片,则上述组件节点名称可以记为“comp::getTransform2d(2D图片)”。For example, assume that the content recorded in the configuration file in json format includes: the RTTI class name is "Transform2d", the parent class inherited by the RTTI class is "Transform", and in the attribute information corresponding to the RTTI class, the attribute name is "Position ", the attribute RTTI type is "Vector2f", the attribute is readable and writable, in the function information corresponding to the RTTI class, the function name is "setWorldPosition", the function return RTTI type is "Vector3f", and the number of input parameters required by the function There are 2, and the parameter RTTI type of each input parameter is "Vector3f". Parsing the configuration file in the above json format shows that the parent class of the RTTI class is Transform, and the class name of the RTTI class is "Transform2d", and the node name of the component node that can be generated according to the class name is "comp::getTransform2d". In order to facilitate developers to distinguish the entity to which the component belongs, RTTI objects can be used for marking. Assuming that the RTTI object corresponding to the above class name Transform2d is a 2D image, the above component node name can be recorded as "comp::getTransform2d(2D image)".
由于组件节点本身不需要具有逻辑控制功能,只要提供数据即可,这些纯数据节点不提供控制流输入和输出,因此组件节点不包含控制输入,组件节点输入持有该组件的实体Entity(RTTI对象),输出想要获取的组件对象。也就是说,组件节点包括一个输入端口和一个输出端口,输入端口用于输入组件节点所属的实体节点,输出端口用于输出该组件相关功能对象,如果Entity中不存在该组件则输出为空。图4A为生成的组件节点的示例图,如图4A所示,该组件节点仅包括一个输入端口(Entity)和一个输出端口,输入端口的输入数据流为实体节点2D图片,输出端口的输出数据流为该组件Transform2d。Since the component node itself does not need to have logic control functions, as long as it provides data, these pure data nodes do not provide control flow input and output, so the component node does not contain control input, and the component node input holds the entity Entity of the component (RTTI object ), output the component object you want to get. That is to say, a component node includes an input port and an output port. The input port is used to input the entity node to which the component node belongs, and the output port is used to output the related functional object of the component. If the component does not exist in the Entity, the output is empty. Figure 4A is an example diagram of the generated component node, as shown in Figure 4A, the component node only includes an input port (Entity) and an output port, the input data stream of the input port is a 2D image of the entity node, and the output data of the output port The stream is Transform2d for this component.
可选地,解析json格式的配置文件还可以生成属性节点名称和对应的属性节点。具体地,包括:解析json格式的配置文件,根据RTTI对象的类及继承关系获取RTTI对象的属性信息数组,根据属性信息数组的属性名称生成属性节点的节点名称;其中,属性节点包括读取属性节点和设置属性节点,其中,读取属性节点包括:用于输入读取属性节点所属组件节点的输入端口和用于输出读取属性节点对应属性值的输出端口;设置属性节点包括:用于控制触发的输入端口、用于输入设置属性节点所属组件节点的输入端口、以及用于获取属性值的输入端口、用于控制触发的输出端口和用于输出所设置属性值的输出端口。Optionally, parsing the configuration file in json format can also generate attribute node names and corresponding attribute nodes. Specifically, it includes: parsing the configuration file in json format, obtaining the attribute information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating the node name of the attribute node according to the attribute name of the attribute information array; wherein, the attribute node includes the read attribute Nodes and set attribute nodes, wherein the read attribute node includes: an input port for inputting the component node to which the read attribute node belongs and an output port for outputting the corresponding attribute value of the read attribute node; the set attribute node includes: for controlling An input port for triggering, an input port for inputting the component node to which the property node belongs, an input port for obtaining the property value, an output port for controlling the trigger, and an output port for outputting the set property value.
具体地,属性节点可以根据json格式的配置文件中的属性信息生成,由于记录了RTTI类的父类,因此可以知道RTTI组件的父类,获取继承下来的属性。根据属性是否可读可写,可以生成读取属性节点(属性可读时)和设置属性节点(属性可写时)。读取属性节点用于为其他节点提供数据,本身不带有逻辑控制功能,因此读取属性节点包括一个输入端口和一个输出端口,输入端口用于输入读取属性节点所属的组件节点,即输入需要获取属性的组件,输出端口用于输出读取属性节点对应的属性值。设置属性节点需要开放给开发人员逻辑控制能力,让开发人员控制节点在何种条件下设置属性,因此设置属性节点具有控制流输入端口和输出端口,设置属性节点需要输入组件和属性数据,并且将该数据作为输出端口的输出数据。因此,设置属性节点包括三个输入端口,分别为用于控制触发的输入端口、用于输入设置属性节点所属组件节点的输入端口、以及用于获取属性值的输入端口,以及两个输出端口,分别为用于控制触发的输出端口和用于输出所设置属性值的输出端口。当设置属性节点用于控制触发的输入端口有数据流输入时,设置属性节点获取需要设置属性的组件,并将组件对应的属性值设为输入值。Specifically, the attribute node can be generated according to the attribute information in the configuration file in json format. Since the parent class of the RTTI class is recorded, the parent class of the RTTI component can be known and the inherited attributes can be obtained. 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 to provide data for other nodes, and it does not have a logic control function. Therefore, the read attribute node includes an input port and an output port. The input port is used to input the component node to which the read attribute node belongs, that is, the input The component that needs to get attributes, the output port is used to output the attribute value corresponding to the read attribute node. Setting attribute nodes needs to be open to developers to control logic, allowing developers to control under what conditions the node sets attributes. Therefore, setting attribute nodes has control flow input ports and output ports. Setting attribute nodes requires input components and attribute data, and will This data is used as the output data of the output port. Therefore, the setting attribute node includes three input ports, which are the input port for controlling the trigger, the input port for inputting the component node to which the setting attribute node belongs, the input port for obtaining the attribute value, and two output ports, They are the output port used to control the trigger and the output port used to output the set property value respectively. When the input port of the set attribute node used to control the trigger has data stream input, the set attribute node obtains the component whose attribute needs to be set, and sets the corresponding attribute value of the component as the input value.
继续以前述json格式的配置文件为例,根据该配置文件中记录的属性信息数组,可以确定属性名称为“Position”,并能够确定该属性可读可写,解析该配置文件可知该属性数组继承于类名“Transform2d”,则可以生成读取属性节点名称为“getPosition(Transform2d)”, 生成设置属性节点名称为“setPosition(Transform2d)”。并且,根据该配置文件可以生成读取属性节点和设置属性节点,如图4B所示。从图4B可以看出,读取属性节点(getPosition)包括一个用于输入读取属性节点所属组件节点的输入端口(Transform2d)和一个用于输出读取属性节点对应属性值的输出端口,设置属性节点(setPosition)则包括三个输入端口和两个输出端口,输入端口分别为控制端口(Trigger)、用于输入设置属性节点所属组件节点的端口(Transform2d)和获取属性值端口(用属性值类型Vector2f表示)。Continuing to take the aforementioned configuration file in json format as an example, according to the attribute information array recorded in the configuration file, it can be determined that the attribute name is "Position", and it can be determined that the attribute is readable and writable. Parsing the configuration file shows that the attribute array inherits Based on the class name "Transform2d", the read property node name can be generated as "getPosition(Transform2d)", and the set property node name can be generated as "setPosition(Transform2d)". Moreover, a read property node and a set property node may be generated according to the configuration file, as shown in FIG. 4B . As can be seen from Figure 4B, the read attribute node (getPosition) includes an input port (Transform2d) for inputting the component node to which the read attribute node belongs and an output port for outputting the corresponding attribute value of the read attribute node. The node (setPosition) includes three input ports and two output ports. The input ports are the control port (Trigger), the port (Transform2d) used to input the component node to which the attribute node belongs, and the port to obtain the attribute value (use the attribute value type Vector2f representation).
可选地,解析json格式的配置文件还可以生成函数节点名称和对应的函数节点。具体地,包括:解析json格式的配置文件,根据RTTI对象的类及继承关系获取RTTI对象的函数信息数组,根据函数信息数组的函数名称生成函数节点的节点名称;其中,函数节点包括:用于控制触发的输入端口、用于输入函数节点所属组件节点或所属实体节点的输入端口、以及用于获取一个或多个函数参数的输入端口、用于控制触发的输出端口、以及用于输出函数返回属性值的输出端口。Optionally, parsing the configuration file in json format can also generate function node names and corresponding function nodes. Specifically, it includes: parsing the configuration file in json format, obtaining the function information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating the node name of the function node according to the function name of the function information array; wherein, the function node includes: for An input port for controlling triggering, an input port for inputting component nodes or entity nodes to which a function node belongs, an input port for obtaining one or more function parameters, an output port for controlling triggering, and an output function return Output port for attribute values.
函数节点需要开放给开发人员逻辑控制能力,让开发人员控制节点在何种条件下执行函数,因此函数节点具有控制流输入端口和输出端口。函数节点需要输入组件和函数参数,输出函数返回值数据。在生成函数节点时,函数节点可以根据json格式的配置文件中的函数信息生成,由于记录了RTTI类的父类,因此可以知道RTTI组件的父类,获取继承下来的函数方法,函数信息数组中还记录了函数的名字、输入参数和返回值类型,可以根据这些信息生成函数节点端口。函数节点包括多个输入端口,分别为用于控制触发的输入端口、用于输入函数节点所属组件节点或所属实体节点的输入端口、以及用于获取一个或多个函数参数的输入端口,函数节点包括两个输出端口,分别为用于控制触发的输出端口、以及用于输出函数返回属性值的输出端口。当用于控制触发的输入端口被激活时,函数节点根据各个用于获取函数入参的输入端口中输入的参数执行函数,并输出执行结果。Function nodes need to be open to developers for logic control capabilities, allowing developers to control the conditions under which nodes execute functions, so function nodes have control flow input ports and output ports. Function nodes need input components and function parameters, and output function return value data. When generating a function node, the function node can be generated according to the function information in the configuration file in json format. Since the parent class of the RTTI class is recorded, the parent class of the RTTI component can be known, and the inherited function method can be obtained. In the function information array It also records the function name, input parameters and return value type, and the function node port can be generated according to these information. The function node includes multiple input ports, which are the input port used to control the trigger, the input port used to input the component node or entity node to which the function node belongs, and the input port used to obtain one or more function parameters. The function node It includes two output ports, which are the output port used to control the trigger and the output port used to output the attribute value returned by the function. When the input port used to control the trigger is activated, the function node executes the function according to the parameters input in each input port used to obtain the function input parameters, and outputs the execution result.
继续以前述json格式的配置文件为例,根据该配置文件中记录的函数信息数组,可以确定函数名称为“setWorldPosition”,解析该配置文件可知该函数数组继承于父类“Transform”,则可以生成函数节点名称为“func::setWorldPosition(Transform)”。该函数数组还记录了函数的输出值的数据类型为“Vector3f”,函数入参为两个,类型均为“Vector3f”,因此可以生成函数节点func::setWorldPosition如图4C所示。从图4C可以看出,该函数节点包括四个输入端口和两个输出端口,四个输入端口分别为控制端口(Trigger)、输入函数节点所属组件节点的端口(用Transform表示)和两个参数输入端口(均用参数类型Vector3f表示),两个输出端口分别为控制端口(Trigger)和函数返回 值输出端口(用返回值类Vector3f表示)。Continuing to take the aforementioned configuration file in json format as an example, according to the function information array recorded in the configuration file, it can be determined that the function name is "setWorldPosition". After parsing the configuration file, it can be known that the function array inherits from the parent class "Transform", then you can generate The function node name is "func::setWorldPosition(Transform)". The function array also records that the data type of the output value of the function is "Vector3f", and there are two input parameters of the function, both of type "Vector3f", so the function node func::setWorldPosition can be generated as shown in Figure 4C. As can be seen from Figure 4C, the function node includes four input ports and two output ports, the four input ports are the control port (Trigger), the port of the component node to which the input function node belongs (expressed by Transform) and two parameters The input port (both represented by the parameter type Vector3f), and the two output ports are the control port (Trigger) and the function return value output port (represented by the return value class Vector3f).
本公开实施例的方案,通过解析json格式的配置文件生成可视化节点,实现了运用统一的规则生成节点样式,生成格式化的运行代码,避免了大量重复的机械性开发,能够提高开发效率。The solution of the embodiment of the present disclosure generates visual nodes by parsing configuration files in json format, realizes the use of unified rules to generate node styles, generates formatted running codes, avoids a lot of repetitive mechanical development, and can improve development efficiency.
需要说明的是,步骤201-步骤202的执行顺序在图3中仅作为示例来解释说明本公开,而不能作为对本公开的限制,步骤201-步骤202仅需在步骤204之前执行即可。It should be noted that the execution sequence of steps 201-202 in FIG. 3 is only used as an example to explain the present disclosure, but not as a limitation to the present disclosure. Steps 201-202 only need to be executed before step 204.
步骤203、响应于对目标对象名称的触发操作,在配置面板上显示与所述目标对象名称对应的实体节点。 Step 203, in response to the trigger operation on the name of the target object, display the entity node corresponding to the name of the target object on the configuration panel.
需要说明的是,本公开实施例中,对步骤203的描述可以参见前述实施例中有关步骤101的描述,此处不再赘述。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 embodiments, and details are not repeated here.
步骤204、搜索预先构建的表示引擎能力的节点名称,响应于对节点名称中与目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在配置面板上显示与至少一个目标节点名称对应的至少一个目标节点。Step 204: Search for pre-built node names representing engine capabilities, and in response to a trigger operation on at least one target node name that is associated with the target object name and realizes the target function in the node name, display on the configuration panel that is related to at least one target node name At least one target node corresponding to the node name.
需要说明的是,本公开实施例中,对搜索预先构建的表示引擎能力的节点名称的描述可以参见前述实施例的相关内容,此处不再赘述。It should be noted that, in the embodiment of the present disclosure, the description of searching for the pre-built node name representing the engine capability may refer to the relevant content of the foregoing embodiments, and details are not repeated here.
本公开实施例中,解析配置文件生成的原子化节点可以分为三类,组件节点、属性节点(包括设置属性节点和读取属性节点)以及函数节点,则响应于对节点名称中与目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在配置面板上显示与至少一个目标节点名称对应的至少一个目标节点,包括:响应于对节点名称中与目标对象名称关联的、用于实现目标功能的目标组件节点名称的触发操作,在配置面板上显示与目标组件节点名称对应的目标组件节点;响应于对节点名称中与目标组件节点名称关联的、用于实现目标功能的目标属性节点名称,和/或,目标函数节点名称的触发操作,在配置面板上显示与目标属性节点名称对应的目标属性节点,和/或,显示与目标函数节点名称对应的目标函数节点。In the embodiment of the present disclosure, the atomized nodes generated by parsing the configuration file can be divided into three categories, component nodes, attribute nodes (including setting attribute nodes and reading attribute nodes) and function nodes, then in response to the node name and target object The trigger operation of at least one target node name associated with the name and realizing the target function, displaying at least one target node corresponding to the at least one target node name on the configuration panel, including: responding to the node name associated with the target object name , the trigger operation of the target component node name used to realize the target function, and display the target component node corresponding to the target component node name on the configuration panel; The target property node name of , and/or, the trigger operation of the target function node name, display the target property node corresponding to the target property node name on the configuration panel, and/or, display the target function node corresponding to the target function node name.
本公开实施例中,当开发人员需要实现某个功能时,可以搜索预先构建的表示引擎能力的节点名称,查找出与目标对象名称关联的、用于实现目标功能的目标组件节点名称并执行触发操作,基于引擎能力的实体功能实现装置响应于该触发操作,在配置面板上显示目标组件节点,继续查找与目标组件节点名称关联的、且用于实现目标功能的目标属性节点名称和/或目标函数节点名称并执行触发操作,基于引擎能力的实体功能实现装置响应于该触发操作,在配置面板上显示目标属性节点和/或目标函数节点。In the embodiment of the present disclosure, when the developer needs to implement a certain function, he can search for the pre-built node name representing the engine capability, find out the target component node name associated with the target object name for realizing the target function, and execute the trigger Operation, the entity function implementing device based on the engine capability responds to the trigger operation, displays the target component node on the configuration panel, and continues to search for the target attribute node name and/or target associated with the target component node name and used to realize the target function name of the function node and execute a trigger operation, and the device for realizing the entity function based on the engine capability responds to the trigger operation and displays the target property node and/or the target function node on the configuration panel.
步骤205、响应于根据逻辑需求对实体节点和各目标节点之间的连接触发操作,驱动各目标节点运行引擎能力以实现目标功能。 Step 205 , in response to triggering an operation on the connection between the entity node and each target node according to the logic requirement, driving each target node to run the engine capability to realize the target function.
本公开实施例中,配置面板中显示了实现目标功能所需的各目标节点之后,开发人员可以根据逻辑需求配置实体节点和各目标节点的连接关系,执行连接触发操作,基于引擎能力的实体功能实现装置响应于该连接触发操作,驱动各目标节点运行引擎能力以实现目标功能。In the embodiment of the present disclosure, after the target nodes required to realize the target function are displayed in the configuration panel, the developer can configure the connection relationship between the entity node and each target node according to the logical requirements, execute the connection trigger operation, and the entity function based on the engine capability In response to the connection triggering operation, the realizing device drives each target node to run the engine capability to realize the target function.
能够理解的是,不同的目标节点运行的引擎能力不同,本公开实施例中,驱动各目标节点运行引擎能力,包括以下至少一种:组件节点获取所属实体,输出实体的组件对象;读取属性节点获取所属组件,输出组件当前的属性值;设置属性节点的控制端口被触发时,获取需要设置属性的组件,并设置组件的属性值;或者函数节点的输入控制端口被触发时,根据函数参数执行函数输出返回值。It can be understood that different target nodes have different engine capabilities. In the embodiment of the present disclosure, driving each target node to run engine capabilities includes at least one of the following: the component node obtains the entity to which it belongs, and outputs the component object of the entity; reads the attribute The node obtains the component it belongs to, and outputs the current attribute value of the component; when the control port of the set attribute node is triggered, obtains the component whose attribute needs to be set, and sets the attribute value of the component; or when the input control port of the function node is triggered, according to the function parameter Execute the function output return value.
本公开实施例中,驱动各目标节点运行引擎能力时,组件节点用于获取所属实体,并输出实体的组件对象,读取属性节点获取所属组件,并输出所获取组件当前的属性值,对于设置属性节点,当设置属性节点的控制端口被触发时,获取需要设置属性的组件,并设置所获取组件的属性值,对于函数节点,当函数节点的输入控制端口被触发时,根据函数节点获取的函数参数执行对应的函数,并输出返回值。In the embodiment of the disclosure, when each target node is driven to run the engine capability, the component node is used to obtain the entity to which it belongs, and output the component object of the entity, read the property node to obtain the component to which it belongs, and output the current attribute value of the obtained component, for setting Property node, when the control port of the setting property node is triggered, obtain the component that needs to be set, and set the property value of the obtained component. For the function node, when the input control port of the function node is triggered, according to the obtained The function parameter executes the corresponding function and outputs the return value.
上述技术方案中,通过开发人员执行连接触发操作来配置各目标节点的连接关系,响应于连接触发操作驱动各目标节点运行引擎能力以实现目标功能,无需编写代码即完成了引擎能力的暴露,实现了运行时控制的能力,提高了开发效率。In the above technical solution, the developer performs a connection trigger operation to configure the connection relationship of each target node, and responds to the connection trigger operation to drive the engine capability of each target node to achieve the target function, and completes the exposure of the engine capability without writing code, realizing The ability to control the runtime is improved, and the development efficiency is improved.
本公开实施例提供的基于引擎能力的实体功能实现方法,通过获取保存引擎数据的配置文件,根据配置文件构建表示引擎能力的节点名称,以及构建与各节点名称对应的用于展示在配置面板上的节点,进而通过搜索各节点名称,响应于对节点名称中与目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在配置面板上显示与至少一个目标节点名称对应的至少一个目标节点,响应于根据逻辑需求对实体节点和各目标节点之间的连接触发操作,驱动各目标节点运行引擎能力以实现目标功能,由此,实现了可视化编程,将引擎实例中所需的组件、属性和函数反射成原子化节点,通过连线配置运行时逻辑,无需手动编写代码即可暴露引擎能力,实现了特效生产。The implementation method of the entity function based on the engine capability provided by the embodiment of the present disclosure obtains the configuration file for saving the engine data, constructs the node name representing the engine capability according to the configuration file, and constructs the node name corresponding to each node name for displaying on the configuration panel. , and then by searching each node name, in response to a trigger operation on at least one target node name associated with the target object name in the node name and realizing the target function, the corresponding node name corresponding to the at least one target node name is displayed on the configuration panel At least one target node, in response to the trigger operation of the connection between the entity node and each target node according to the logical requirements, drives each target node to run the engine capability to achieve the target function, thereby realizing visual programming, and the required in the engine instance Components, properties and functions are reflected into atomic nodes, the runtime logic is configured through connections, and the engine capabilities can be exposed without manual coding, realizing special effect production.
为了便于理解本公开提供的基于引擎能力的实体功能实现方案,下面举例进行说明。In order to facilitate the understanding of the engine capability-based entity function implementation solution provided by the present disclosure, an example is given below for illustration.
图5为采用本公开提供的基于引擎能力的实体功能实现方案实现点击屏幕使贴纸位置偏移功能的可视化编程示例图。FIG. 5 is an example diagram of visual programming for realizing the function of clicking the screen to shift the position of stickers by adopting the entity function implementation solution based on engine capability provided by the present disclosure.
如图5所示,开发人员想要实现的目标功能是点击屏幕,让播放中的贴纸位置偏移(x:100,y:200),实现该功能的可视化编程的配置步骤为:因为需要设置的是贴纸的位置属性,则目标对象名称为贴纸(2D图片),因此可以先从特效信息面板中拖入实体节点,该实体节点的名称为2D图片,其中,该实体节点是预先封装好并展示在特效信息面板中的,可以直接通过拖拽的方式显示在配置面板上,无需搜索。开发人员知悉,设置的位置属性由Transform2d这个组件控制,因此在配置面板上搜索并查找Transform2d,添加组件节点“comp::getTransform2d”,并将实体节点(2D图片)与组件节点comp::getTransform2d的Entity端口连接。想要实现贴纸位置偏移,则需要获取贴纸的当前位置,可以通过getPosition这一读取属性节点从组件Transform2d中获取贴纸的当前位置;添加一个数值观测节点,并输入观测值X为100,Y为200;通过加法运算节点将贴纸的当前位置与数值观测节点输入的观测值相加,得到想要设置的终点位置,其中,加法运算节点中,数值A为获取的当前位置,数值B为输入的观测值。通过搜索添加setPosition这一设置属性节点,将组件节点comp::getTransform2d的输出端口与setPosition节点的用于表示所属组件的输入端口(Transform2d)连接,将加法运算节点输出的终点位置数据连入setPosition节点的用于获取属性值的输入端口(Vector2f),并添加一个点击屏幕控制节点,将点击屏幕控制节点与setPosition节点的控制流输入端口(Trigger)连接,由此,配置完成各节点的连接关系。As shown in Figure 5, the target function that the developer wants to achieve is to tap the screen to shift the position of the sticker during playback (x:100, y:200). The configuration steps for visual programming to realize this function are: because it is necessary to set is the position attribute of the sticker, and the name of the target object is a sticker (2D picture), so you can first drag in the entity node from the special effect information panel, and the name of the entity node is the 2D picture, where the entity node is pre-packaged and What is displayed in the special effect information panel can be directly displayed on the configuration panel by dragging and dropping without searching. Developers know that the set position attribute is controlled by the Transform2d component, so search and find Transform2d on the configuration panel, add the component node "comp::getTransform2d", and connect the entity node (2D image) with the component node comp::getTransform2d Entity port connection. If you want to offset the position of the sticker, you need to get the current position of the sticker. You can get the current position of the sticker from the component Transform2d through the read attribute node getPosition; add a numerical observation node, and input the observation value X to 100, Y is 200; through the addition operation node, add the current position of the sticker to the observation value input by the numerical observation node to obtain the desired end position, where, in the addition operation node, the value A is the current position obtained, and the value B is the input observation value. Add the setting property node of setPosition by searching, connect the output port of the component node comp::getTransform2d to the input port (Transform2d) of the setPosition node to indicate the component it belongs to, and connect the end position data output by the addition node to the setPosition node The input port (Vector2f) used to obtain the attribute value, and add a click screen control node, and connect the click screen control node to the control flow input port (Trigger) of the setPosition node, thus configuring the connection relationship of each node.
图5中,点击屏幕控制节点、数值观测节点和加法运算节点可以是预先封装好的用于实现脚本功能的节点,可以直接拖拽使用,无需进行搜索。当开发人员点击屏幕时,setPosition节点被激活,其回溯寻找节点的数据输入,得到Transform2d组件和加法运算节点输出的终点位置,之后设置自身的位置属性,将贴纸位置从原位置(x:100,y:200)处移动至终点位置(x:200,y:400)处,实现了点击屏幕时将贴纸位置偏移(x:100,y:200)的功能。由此,无需开发人员手动编写代码,即实现了点击屏幕使贴纸位置偏移的功能。In Figure 5, the touch screen control node, numerical observation node, and addition operation node can be pre-packaged nodes for realizing script functions, which can be directly dragged and used without searching. When the developer clicks on the screen, the setPosition node is activated. It traces back to find the data input of the node, obtains the end position of the output of the Transform2d component and the addition operation node, and then sets its own position attribute to change the sticker position from the original position (x:100, y:200) to the end position (x:200, y:400), realizing the function of offsetting the sticker position (x:100, y:200) when the screen is tapped. As a result, the function of tapping the screen to shift the position of the sticker is realized without the need for developers to manually write code.
图6为本公开实施例提供的一种基于引擎能力的实体功能实现装置的结构示意图,该装置可由软件和/或硬件实现,一般可集成在电子设备中。如图6所示,该基于引擎能力的实体功能实现装置包括:第一显示模块301、第二显示模块302和驱动模块303。FIG. 6 is a schematic structural diagram of an apparatus for realizing an entity function based on an engine capability provided by an embodiment of the present disclosure. The apparatus may be implemented by software and/or hardware, and may generally be integrated into an electronic device. As shown in FIG. 6 , the apparatus for implementing entity functions based on engine capabilities includes: a first display module 301 , a second display module 302 and a driving module 303 .
第一显示模块301,用于响应于对目标对象名称的触发操作,在配置面板上显示与所述目标对象名称对应的实体节点。The first display module 301 is configured to display an entity node corresponding to the target object name on the configuration panel in response to a trigger operation on the target object name.
第二显示模块302,搜索预先构建的表示引擎能力的节点名称,响应于对所述节点名称中与所述目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作, 在所述配置面板上显示与所述至少一个目标节点名称对应的至少一个目标节点。The second display module 302 searches for pre-built node names representing engine capabilities, responds to a trigger operation on at least one target node name associated with the target object name among the node names and realizes the target function, in the At least one target node corresponding to the at least one target node name is displayed on the configuration panel.
驱动模块303,用于响应于根据逻辑需求对所述实体节点和各所述目标节点之间的连接触发操作,驱动各所述目标节点运行引擎能力以实现所述目标功能。The driving module 303 is configured to drive each of the target nodes to run an engine capability to realize the target function in response to triggering an operation on the connection between the entity node and each of the target nodes according to a logic requirement.
可选地,所述目标节点包括具有控制触发端口的控制类目标节点和所有端口为数据端口的数据类目标节点,所述驱动模块303具体用于:当所述控制类目标节点被触发时,获取所述控制类目标节点所连接的所述数据类目标节点提供的数据信息;和根据所述控制类目标节点的运行逻辑和所述数据信息进行处理,输出对应的处理结果以实现所述目标功能。Optionally, the target node includes a control target node with a control trigger port and a data target node with all ports being data ports, and the driving module 303 is specifically configured to: when the control target node is triggered, Obtaining data information provided by the data target node connected to the control target node; and processing according to the operation logic of the control target node and the data information, and outputting corresponding processing results to achieve the target Function.
可选地,如图7所示,该基于引擎能力的实体功能实现装置30还包括:获取模块304,用于获取保存引擎数据的配置文件;和构建模块305,用于根据所述配置文件构建所述表示引擎能力的节点名称,以及构建与各节点名称对应的用于展示在所述配置面板上的节点。Optionally, as shown in FIG. 7 , the device 30 for implementing entity functions based on engine capabilities further includes: an acquisition module 304, configured to acquire a configuration file for storing engine data; and a construction module 305, configured to construct a configuration file according to the configuration file. The node names representing engine capabilities, and nodes corresponding to each node name are constructed for display on the configuration panel.
可选地,获取模块304具体用于:通过引擎运行实例获取当前引擎的运行时类型信息RTTI属性;和根据所述RTTI属性获取RTTI对象包含的类名、属性、函数和继承关系,并保存成json格式的配置文件。Optionally, the obtaining module 304 is specifically used to: obtain the runtime type information RTTI attribute of the current engine through the engine running instance; and obtain the class name, attribute, function and inheritance relationship contained in the RTTI object according to the RTTI attribute, and save it as Configuration file in json format.
可选地,所述构建模块305具体用于:解析所述json格式的配置文件以获取所述RTTI对象的类名,根据所述类名生成组件节点的节点名称;所述组件节点包括:用于输入所述组件节点所属实体节点的输入端口和用于输出所述组件节点相关功能对象的输出端口。Optionally, the construction module 305 is specifically configured to: parse the configuration file in the json format to obtain the class name of the RTTI object, and generate a node name of the component node according to the class name; 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 functional object related to the component node.
可选地,所述构建模块305还用于:解析所述json格式的配置文件,根据所述RTTI对象的类及继承关系获取所述RTTI对象的属性信息数组,根据所述属性信息数组的属性名称生成属性节点的节点名称;其中,所述属性节点包括读取属性节点和设置属性节点,其中,所述读取属性节点包括:用于输入所述读取属性节点所属组件节点的输入端口和用于输出所述读取属性节点对应属性值的输出端口;所述设置属性节点包括:用于控制触发的输入端口、用于输入所述设置属性节点所属组件节点的输入端口、以及用于获取属性值的输入端口、用于控制触发的输出端口和用于输出所设置属性值的输出端口。Optionally, the construction module 305 is further configured to: parse the configuration file in json format, obtain the property information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and obtain the property information array of the RTTI object according to the properties of the property information array The name generates the node name of the attribute node; wherein, the attribute node includes a read attribute node and a set attribute node, wherein the read attribute node includes: an input port 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; the set attribute node includes: an input port for controlling triggering, an input port for inputting the component node to which the set attribute node belongs, and an input port for obtaining An input port for the property value, an output port for controlling the trigger, and an output port for outputting the set property value.
可选地,所述构建模块305还用于:解析所述json格式的配置文件,根据所述RTTI对象的类及继承关系获取RTTI对象的函数信息数组,根据所述函数信息数组的函数名称生成函数节点的节点名称;其中,所述函数节点包括:用于控制触发的输入端口、用于输入所述函数节点所属组件节点或所属实体节点的输入端口、以及用于获取一个或多个函数参数的输入端口、用于控制触发的输出端口、以及用于输出函数返回属性值的输出端口。Optionally, the construction module 305 is further configured to: parse the configuration file in the json format, obtain the function information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generate the function information array according to the function name of the function information array The node name of the function node; wherein, the function node includes: an input port for controlling triggering, an input port for inputting the component node or entity node to which the function node belongs, and obtaining one or more function parameters The input port for the , the output port for controlling the trigger, and the output port for the output function to return the property value.
可选地,所述第二显示模块302具体用于:响应于对所述节点名称中与所述目标对象名称关联的、用于实现目标功能的目标组件节点名称的触发操作,在所述配置面板上显示 与所述目标组件节点名称对应的目标组件节点;响应于对所述节点名称中与所述目标组件节点名称关联的、用于实现所述目标功能的目标属性节点名称,和/或,目标函数节点名称的触发操作,在所述配置面板上显示与所述目标属性节点名称对应的目标属性节点,和/或,显示与所述目标函数节点名称对应的目标函数节点。Optionally, the second display module 302 is specifically configured to: respond to a trigger operation on the target component node name associated with the target object name in the node name and used to realize the target function, in the configuration The target component node corresponding to the target component node name is displayed on the panel; in response to the target attribute node name associated with the target component node name in the node name and used to realize the target function, and/or , a trigger operation of the target function node name, displaying the target attribute node corresponding to the target property node name on the configuration panel, and/or displaying the target function node corresponding to the target function node name.
可选地,所述驱动模块303具体用于:所述组件节点获取所属实体,输出所述实体的组件对象;所述读取属性节点获取所属组件,输出所述组件当前的属性值;所述设置属性节点的控制端口被触发时,获取需要设置属性的组件,并设置所述组件的属性值;或者所述函数节点的输入控制端口被触发时,根据函数参数执行函数输出返回值。Optionally, the driving module 303 is specifically configured to: the component node obtains the entity to which it belongs, and outputs the component object of the entity; the read attribute node obtains the component to which it belongs, and outputs the current attribute value of the component; the When the control port of the property setting node is triggered, obtain the component whose property needs to be set, and set the property value of the component; or when the input control port of the function node is triggered, execute the function according to the function parameter and output the return value.
本公开实施例所提供的基于引擎能力的实体功能实现装置可执行本公开任意实施例所提供的基于引擎能力的实体功能实现方法,具备执行方法相应的功能模块和有益效果。The device for implementing an entity function based on engine capability provided by an embodiment of the present disclosure can execute the method for implementing an entity function based on engine capability provided by any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects for executing the method.
为了实现上述实施例,本公开还提出一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现上述实施例中的基于引擎能力的实体功能实现方法。In order to implement the above embodiments, the present disclosure further proposes a computer program product, including computer programs/instructions, and when the computer programs/instructions are executed by a processor, the methods for implementing entity functions based on engine capabilities in the above embodiments are implemented.
图8为本公开实施例提供的一种电子设备的结构示意图。FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
下面具体参考图8,其示出了适于用来实现本公开实施例中的电子设备400的结构示意图。本公开实施例中的电子设备400可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图8示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring to FIG. 8 in detail below, it shows a schematic structural diagram of an electronic device 400 suitable for implementing an embodiment of the present disclosure. The electronic device 400 in the embodiment of the present disclosure may include, but is not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals ( Mobile terminals such as car navigation terminals) and stationary terminals such as digital TVs, desktop computers and the like. The electronic device shown in FIG. 8 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
如图8所示,电子设备400可以包括处理装置(例如中央处理器、图形处理器等)401,其可以根据存储在只读存储器(ROM)402中的程序或者从存储装置408加载到随机访问存储器(RAM)403中的程序而执行各种适当的动作和处理。在RAM 403中,还存储有电子设备400操作所需的各种程序和数据。处理装置401、ROM 402以及RAM 403通过总线404彼此相连。输入/输出(I/O)接口405也连接至总线404。As shown in FIG. 8, an electronic device 400 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) Various appropriate actions and processes are executed by programs in the memory (RAM) 403 . In the RAM 403, various programs and data necessary for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input/output (I/O) interface 405 is also connected to bus 404 .
通常,以下装置可以连接至I/O接口405:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置406;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置407;包括例如磁带、硬盘等的存储装置408;以及通信装置409。通信装置409可以允许电子设备400与其他设备进行无线或有线通信以交换数据。虽然图8示出了具有各种装置的电子设备400,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices can be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 407 such as a computer; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to perform wireless or wired communication with other devices to exchange data. While FIG. 8 shows electronic device 400 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置409从网络上被下载和安装,或者从存储装置408被安装,或者从ROM 402被安装。在该计算机程序被处理装置401执行时,执行本公开实施例的基于引擎能力的实体功能实现方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 409, or from storage means 408, or from ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the engine capability-based entity function implementation method of the embodiment of the present disclosure are executed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and the server can communicate using any currently known or future network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium The communication (eg, communication network) interconnections. Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), internetworks (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 of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:响应于对目标对象名称的触发操作,在配置面板上显示与所 述目标对象名称对应的实体节点;搜索预先构建的表示引擎能力的节点名称,响应于对所述节点名称中与所述目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在所述配置面板上显示与所述至少一个目标节点名称对应的至少一个目标节点;响应于根据逻辑需求对所述实体节点和各所述目标节点之间的连接触发操作,驱动各所述目标节点运行引擎能力实现所述目标功能。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to a trigger operation on the name of the target object, displays on the configuration panel the An entity node corresponding to the target object name; searching for a pre-built node name representing the engine capability, in response to a trigger operation on at least one target node name associated with the target object name among the node names and realizing the target function, Display at least one target node corresponding to the name of the at least one target node on the configuration panel; in response to triggering an operation on the connection between the entity node and each of the target nodes according to logical requirements, drive each of the targets The node runs the engine capability to realize the target function.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as the "C" 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 cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。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 a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. 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 they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of a unit does not constitute a limitation of the unit itself under certain circumstances.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。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 Chips (SOCs), Complex Programmable Logical device (CPLD) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读 介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
根据本公开的一个或多个实施例,本公开提供了一种基于引擎能力的实体功能实现方法,包括:响应于对目标对象名称的触发操作,在配置面板上显示与所述目标对象名称对应的实体节点;搜索预先构建的表示引擎能力的节点名称,响应于对所述节点名称中与所述目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在所述配置面板上显示与所述至少一个目标节点名称对应的至少一个目标节点;和响应于根据逻辑需求对所述实体节点和各所述目标节点之间的连接触发操作,驱动各所述目标节点运行引擎能力以实现所述目标功能。According to one or more embodiments of the present disclosure, the present disclosure provides a method for implementing entity functions based on engine capabilities, including: in response to a trigger operation on the name of the target object, displaying on the configuration panel the entity node; search for pre-built node names representing engine capabilities, and in response to a trigger operation on at least one target node name associated with the target object name among the node names and realizing the target function, in the configuration Displaying on the panel at least one target node corresponding to the name of the at least one target node; and in response to triggering an operation on the connection between the entity node and each of the target nodes according to logical requirements, driving each of the target nodes to run an engine ability to achieve the stated objective functions.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现方法中,所述目标节点包括具有控制触发端口的控制类目标节点和所有端口为数据端口的数据类目标节点,所述驱动各所述目标节点运行引擎能力实现所述目标功能,包括:当所述控制类目标节点被触发时,获取所述控制类目标节点所连接的所述数据类目标节点提供的数据信息;和根据所述控制类目标节点的运行逻辑和所述数据信息进行处理,输出对应的处理结果以实现所述目标功能。According to one or more embodiments of the present disclosure, in the engine capability-based entity function implementation method provided by the present disclosure, the target node includes a control-type target node with a control trigger port and a data-type target node with all ports being data ports , the driving each of the target nodes to run the engine capability to realize the target function includes: when the control target node is triggered, obtaining the data provided by the data target node connected to the control target node information; and process according to the operation logic of the control target node and the data information, and output corresponding processing results to realize the target function.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现方法还包括:在所述搜索预先构建的表示引擎能力的节点名称之前,获取保存引擎数据的配置文件;和根据所述配置文件构建所述表示引擎能力的节点名称,以及构建与各节点名称对应的用于展示在所述配置面板上的节点。According to one or more embodiments of the present disclosure, the engine capability-based entity function implementation method provided in the present disclosure further includes: before searching for the pre-built node name representing the engine capability, obtaining a configuration file storing engine data; and Construct the node names representing engine capabilities according to the configuration file, and construct nodes corresponding to each node name for display on the configuration panel.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现方法中,所述获取保存引擎数据的配置文件,包括:通过引擎运行实例获取当前引擎运行时类型信息RTTI属性;和根据所述RTTI属性获取RTTI对象包含的类名、属性、函数和继承关系,并保存成json格式的配置文件。According to one or more embodiments of the present disclosure, in the engine capability-based entity function implementation method provided by the present disclosure, the acquisition of the configuration file saving the engine data includes: obtaining the current engine runtime type information RTTI attribute through the engine running instance ; and obtain the class name, attribute, function and inheritance relationship contained in the RTTI object according to the RTTI attribute, and save it as a configuration file in json format.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现方法中,所述根据所述配置文件构建所述表示引擎能力的节点名称,以及构建与各节点名称对应的用于展示在所述配置面板上的节点,包括:解析所述json格式的配置文件以获取所述RTTI 对象的类名,根据所述类名生成组件节点的节点名称;其中,所述组件节点包括:用于输入所述组件节点所属实体节点的输入端口和用于输出所述组件节点相关功能对象的输出端口。According to one or more embodiments of the present disclosure, in the engine capability-based entity function implementation method provided by the present disclosure, the construction of the node name representing the engine capability according to the configuration file, and the construction of the corresponding node name The node for displaying on the configuration panel includes: parsing the configuration file in the json format to obtain 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 It includes: an input port for inputting the entity node to which the component node belongs and an output port for outputting the functional object related to the component node.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现方法中,还包括:解析所述json格式的配置文件,根据所述RTTI对象的类及继承关系获取所述RTTI对象的属性信息数组,根据所述属性信息数组的属性名称生成属性节点的节点名称;其中,所述属性节点包括读取属性节点和设置属性节点,其中,所述读取属性节点包括:用于输入所述读取属性节点所属组件节点的输入端口和用于输出所述读取属性节点对应属性值的输出端口;所述设置属性节点包括:用于控制触发的输入端口、用于输入所述设置属性节点所属组件节点的输入端口、以及用于获取属性值的输入端口、用于控制触发的输出端口和用于输出所设置属性值的输出端口。According to one or more embodiments of the present disclosure, the engine capability-based entity function implementation method provided by the present disclosure further includes: parsing the configuration file in json format, and obtaining the The attribute information array of the RTTI object generates the node name of the attribute node according to the attribute name of the attribute information array; wherein the attribute node includes a read attribute node and a set attribute node, wherein the read attribute node includes: using The input port for inputting the component node to which the read attribute node belongs and the output port for outputting the corresponding attribute value of the read attribute node; the set attribute node includes: an input port for controlling triggering, an input port for inputting the Set the input port of the component node to which the attribute node belongs, the input port used to obtain the attribute value, the output port used to control the trigger, and the output port used to output the set attribute value.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现方法还包括:解析所述json格式的配置文件,根据所述RTTI对象的类及继承关系获取RTTI对象的函数信息数组,根据所述函数信息数组的函数名称生成函数节点的节点名称;其中,所述函数节点包括:用于控制触发的输入端口、用于输入所述函数节点所属组件节点或所属实体节点的输入端口、以及用于获取一个或多个函数参数的输入端口、用于控制触发的输出端口、以及用于输出函数返回属性值的输出端口。According to one or more embodiments of the present disclosure, the engine capability-based entity function implementation method provided by the present disclosure further includes: parsing the configuration file in json format, and obtaining the function of the RTTI object according to the class and inheritance relationship of the RTTI object An information array, generating the node name of the function node according to the function name of the function information array; wherein, the function node includes: an input port for controlling triggering, and an input port for inputting the component node to which the function node belongs or the entity node to which it belongs An input port, an input port for obtaining one or more function parameters, an output port for controlling a trigger, and an output port for outputting a function return attribute value.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现方法中,所述响应于对所述节点名称中与所述目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在所述配置面板上显示与所述至少一个目标节点名称对应的至少一个目标节点,包括:响应于对所述节点名称中与所述目标对象名称关联的、用于实现目标功能的目标组件节点名称的触发操作,在所述配置面板上显示与所述目标组件节点名称对应的目标组件节点;和响应于对所述节点名称中与所述目标组件节点名称关联的、用于实现所述目标功能的目标属性节点名称,和/或,目标函数节点名称的触发操作,在所述配置面板上显示与所述目标属性节点名称对应的目标属性节点,和/或,显示与所述目标函数节点名称对应的目标函数节点。According to one or more embodiments of the present disclosure, in the engine capability-based entity function realization method provided by the present disclosure, the response to at least A trigger operation of a target node name, displaying at least one target node corresponding to the at least one target node name on the configuration panel includes: responding to the use of In response to the trigger operation of the target component node name for realizing the target function, the target component node corresponding to the target component node name is displayed on the configuration panel; and in response to the node name associated with the target component node name The name of the target attribute node used to realize the target function, and/or, the trigger operation of the target function node name, the target attribute node corresponding to the target attribute node name is displayed on the configuration panel, and/or , to display the objective function node corresponding to the objective function node name.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现方法中,所述驱动各所述目标节点运行引擎能力实现所述目标功能,包括以下至少一种:所述组件节点获取所属实体,输出所述实体的组件对象;所述读取属性节点获取所属组件,输出所述组件当前的属性值;所述设置属性节点的控制端口被触发时,获取需要设置属性的组件, 并设置所述组件的属性值;或者所述函数节点的输入控制端口被触发时,根据函数参数执行函数输出返回值。According to one or more embodiments of the present disclosure, in the engine capability-based entity function realization method provided by the present disclosure, the driving each target node to run the engine capability to realize the target function includes at least one of the following: The component node obtains the entity to which it belongs, and outputs the component object of the entity; the read property node obtains the component to which it belongs, and outputs the current attribute value of the component; when the control port of the set property node is triggered, it obtains the component, and set the attribute value of the component; or when the input control port of the function node is triggered, execute the function according to the function parameter and output the return value.
根据本公开的一个或多个实施例,本公开提供了一种基于引擎能力的实体功能实现装置,包括:第一显示模块,用于响应于对目标对象名称的触发操作,在配置面板上显示与所述目标对象名称对应的实体节点;第二显示模块,搜索预先构建的表示引擎能力的节点名称,响应于对所述节点名称中与所述目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在所述配置面板上显示与所述至少一个目标节点名称对应的至少一个目标节点;和驱动模块,用于响应于根据逻辑需求对所述实体节点和各所述目标节点之间的连接触发操作,驱动各所述目标节点运行引擎能力以实现所述目标功能。According to one or more embodiments of the present disclosure, the present disclosure provides an apparatus for implementing entity functions based on engine capabilities, including: a first display module, configured to display on the configuration panel in response to a trigger operation on the name of the target object The entity node corresponding to the name of the target object; the second display module, searching for a pre-built node name representing the engine capability, in response to at least one of the node names associated with the name of the target object and realizing the target function A trigger operation of a target node name, displaying on the configuration panel at least one target node corresponding to the at least one target node name; and a driving module, configured to respond to the logical requirements of the entity node and each of the The connection between the target nodes triggers an operation, and drives each target node to run an engine capability to realize the target function.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现装置中,所述目标节点包括具有控制触发端口的控制类目标节点和所有端口为数据端口的数据类目标节点,所述驱动模块具体用于:当所述控制类目标节点被触发时,获取所述控制类目标节点所连接的所述数据类目标节点提供的数据信息;和根据所述控制类目标节点的运行逻辑和所述数据信息进行处理,输出对应的处理结果以实现所述目标功能。According to one or more embodiments of the present disclosure, in the device for implementing entity functions based on engine capabilities provided in the present disclosure, the target nodes include a control target node with a control trigger port and a data target node with all ports being data ports , the driving module is specifically configured to: when the control target node is triggered, obtain the data information provided by the data target node connected to the control target node; and according to the control target node The operation logic and the data information are processed, and corresponding processing results are output to realize the target function.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现装置中,还包括:获取模块,用于获取保存引擎数据的配置文件;和构建模块,用于根据所述配置文件构建所述表示引擎能力的节点名称,以及构建与各节点名称对应的用于展示在所述配置面板上的节点。According to one or more embodiments of the present disclosure, the device for implementing entity functions based on engine capabilities provided by the present disclosure further includes: an acquisition module, configured to acquire a configuration file that saves engine data; and a construction module, configured to The configuration file constructs the node names representing engine capabilities, and constructs nodes corresponding to each node name for display on the configuration panel.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现装置中,所述获取模块具体用于:通过引擎运行实例获取当前引擎运行时类型信息RTTI属性;和根据所述RTTI属性获取RTTI对象包含的类名、属性、函数和继承关系,并保存成json格式的配置文件。According to one or more embodiments of the present disclosure, in the apparatus for implementing entity functions based on engine capabilities provided by the present disclosure, the obtaining module is specifically configured to: obtain the RTTI attribute of the current engine runtime type information through the engine running instance; and according to the The above RTTI attribute obtains the class name, attribute, function and inheritance relationship contained in the RTTI object, and saves it as a configuration file in json format.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现装置中,所述构建模块具体用于:解析所述json格式的配置文件以获取所述RTTI对象的类名,根据所述类名生成组件节点的节点名称;其中,所述组件节点包括:用于输入所述组件节点所属实体节点的输入端口和用于输出所述组件节点相关功能对象的输出端口。According to one or more embodiments of the present disclosure, in the device for implementing entity functions based on engine capabilities provided by the present disclosure, the building module is specifically configured to: parse the configuration file in json format to obtain the class name of the RTTI object , generating a node name of the component node according to the class name; wherein, the component node includes: an input port for inputting an entity node to which the component node belongs and an output port for outputting a functional object related to the component node.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现装置中,所述构建模块还用于:解析所述json格式的配置文件,根据所述RTTI对象的类及继承关系获取所述RTTI对象的属性信息数组,根据所述属性信息数组的属性名称生成属性节点的节点名称;其中,所述属性节点包括读取属性节点和设置属性节点,其中,所述读取属 性节点包括:用于输入所述读取属性节点所属组件节点的输入端口和用于输出所述读取属性节点对应属性值的输出端口;所述设置属性节点包括:用于控制触发的输入端口、用于输入所述设置属性节点所属组件节点的输入端口、以及用于获取属性值的输入端口、用于控制触发的输出端口和用于输出所设置属性值的输出端口。According to one or more embodiments of the present disclosure, in the device for implementing entity functions based on engine capabilities provided by the present disclosure, the building module is further configured to: parse the configuration file in json format, according to the class of the RTTI object and The inheritance relationship acquires the attribute information array of the RTTI object, and generates the node name of the attribute node according to the attribute name of the attribute information array; wherein, the attribute node includes a read attribute node and a set attribute node, wherein the read The attribute node includes: an input port for inputting the component node to which the read attribute node belongs and an output port for outputting the corresponding attribute value of the read attribute node; the set attribute node includes: an input port for controlling triggering , an input port for inputting the component node to which the set attribute node belongs, an input port for obtaining the attribute value, an output port for controlling the trigger, and an output port for outputting the set attribute value.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现装置中,所述构建模块还用于:解析所述json格式的配置文件,根据所述RTTI对象的类及继承关系获取RTTI对象的函数信息数组,根据所述函数信息数组的函数名称生成函数节点的节点名称;其中,所述函数节点包括:用于控制触发的输入端口、用于输入所述函数节点所属组件节点或所属实体节点的输入端口、以及用于获取一个或多个函数参数的输入端口、用于控制触发的输出端口、以及用于输出函数返回属性值的输出端口。According to one or more embodiments of the present disclosure, in the device for implementing entity functions based on engine capabilities provided by the present disclosure, the building module is further configured to: parse the configuration file in json format, according to the class of the RTTI object and The inheritance relationship acquires the function information array of the RTTI object, and generates the node name of the function node according to the function name of the function information array; wherein, the function node includes: an input port for controlling triggering, and an The input port of the component node or the entity node it belongs to, and the input port used to obtain one or more function parameters, the output port used to control the trigger, and the output port used to output the property value returned by the function.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现装置中,所述第二显示模块具体用于:响应于对所述节点名称中与所述目标对象名称关联的、用于实现目标功能的目标组件节点名称的触发操作,在所述配置面板上显示与所述目标组件节点名称对应的目标组件节点;和响应于对所述节点名称中与所述目标组件节点名称关联的、用于实现所述目标功能的目标属性节点名称,和/或,目标函数节点名称的触发操作,在所述配置面板上显示与所述目标属性节点名称对应的目标属性节点,和/或,显示与所述目标函数节点名称对应的目标函数节点。According to one or more embodiments of the present disclosure, in the device for implementing entity functions based on engine capabilities provided by the present disclosure, the second display module is specifically configured to: respond to the association between the node name and the target object name The trigger operation of the target component node name for realizing the target function, displaying the target component node corresponding to the target component node name on the configuration panel; and responding to the target component node in the node name The target attribute node name associated with the node name for realizing the target function, and/or, the trigger operation of the target function node name, displaying the target attribute node corresponding to the target attribute node name on the configuration panel, And/or, displaying an objective function node corresponding to the name of the objective function node.
根据本公开的一个或多个实施例,本公开提供的基于引擎能力的实体功能实现装置中,所述驱动模块具体用于:所述组件节点获取所属实体,输出所述实体的组件对象;所述读取属性节点获取所属组件,输出所述组件当前的属性值;所述设置属性节点的控制端口被触发时,获取需要设置属性的组件,并设置所述组件的属性值;或者所述函数节点的输入控制端口被触发时,根据函数参数执行函数输出返回值。According to one or more embodiments of the present disclosure, in the device for implementing entity functions based on engine capabilities provided by the present disclosure, the driving module is specifically configured to: the component node obtains the entity to which it belongs, and outputs the component object of the entity; The read attribute node obtains the component to which it belongs, and outputs the current attribute value of the component; when the control port of the set attribute node is triggered, obtains the component whose attribute needs to be set, and sets the attribute value of the component; or the function When the input control port of the node is triggered, the function is executed according to the function parameters and the return value is output.
根据本公开的一个或多个实施例,本公开提供了一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现如本公开提供的任一所述的基于引擎能力的实体功能实现方法。According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; The executable instructions are read, and executed to implement any method for implementing entity functions based on engine capabilities as provided in the present disclosure.
根据本公开的一个或多个实施例,本公开提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行如本公开提供的任一所述的基于引擎能力的实体功能实现方法。According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute any one of the methods based on the present disclosure. Entity function implementation method of engine capability.
根据本公开的一个或多个实施例,本公开提供了一种计算机程序,包括:指令,所 述指令当由处理器执行时使所述处理器执行如本公开提供的任一所述的基于引擎能力的实体功能实现方法。According to one or more embodiments of the present disclosure, the present disclosure provides a computer program, including: instructions, which, when executed by a processor, cause the processor to perform any one of the methods based on the present disclosure. Entity function implementation method of engine capability.
根据本公开的一个或多个实施例,本公开提供了一种计算机程序产品,包括指令,所述指令当由处理器执行时使所述处理器执行如本公开提供的任一所述的基于引擎能力的实体功能实现方法。以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。According to one or more embodiments of the present disclosure, the present disclosure provides a computer program product, including instructions, which, when executed by a processor, cause the processor to perform any one of the methods based on the present disclosure. Entity function implementation method of engine capability. The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the disclosure scope involved in this disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but also covers the technical solutions formed by the above-mentioned technical features or Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。In addition, while operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or performed in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several specific implementation details, 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 merely example forms of implementing the claims.

Claims (14)

  1. 一种基于引擎能力的实体功能实现方法,包括:A method for implementing entity functions based on engine capabilities, including:
    响应于对目标对象名称的触发操作,在配置面板上显示与所述目标对象名称对应的实体节点;In response to a trigger operation on the name of the target object, displaying an entity node corresponding to the name of the target object on the configuration panel;
    搜索预先构建的表示引擎能力的节点名称,响应于对所述节点名称中与所述目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在所述配置面板上显示与所述至少一个目标节点名称对应的至少一个目标节点;和Searching for pre-built node names representing engine capabilities, in response to a trigger operation on at least one target node name associated with the target object name among the node names and realizing the target function, displaying on the configuration panel the same at least one target node corresponding to the at least one target node name; and
    响应于根据逻辑需求对所述实体节点和各所述目标节点之间的连接触发操作,驱动各所述目标节点运行引擎能力以实现所述目标功能。In response to triggering an operation on the connection between the entity node and each of the target nodes according to a logic requirement, each of the target nodes is driven to run an engine capability to realize the target function.
  2. 根据权利要求1所述的方法,其中,所述目标节点包括具有控制触发端口的控制类目标节点和所有端口为数据端口的数据类目标节点;The method according to claim 1, wherein the target node comprises a control target node having a control trigger port and a data target node in which all ports are data ports;
    所述驱动各所述目标节点运行引擎能力以实现所述目标功能,包括:Said driving each said target node to run engine capability to realize said target function includes:
    当所述控制类目标节点被触发时,获取所述控制类目标节点所连接的所述数据类目标节点提供的数据信息;和When the control target node is triggered, acquire data information provided by the data target node connected to the control target node; and
    根据所述控制类目标节点的运行逻辑和所述数据信息进行处理,输出对应的处理结果以实现所述目标功能。Processing is performed according to the operation logic of the control target node and the data information, and a corresponding processing result is output to realize the target function.
  3. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    在所述搜索预先构建的表示引擎能力的节点名称之前,获取保存引擎数据的配置文件;和prior to said searching for pre-built node names representing engine capabilities, obtaining a configuration file holding engine data; and
    根据所述配置文件构建所述表示引擎能力的节点名称,以及构建与各节点名称对应的用于展示在所述配置面板上的节点。Construct the node names representing engine capabilities according to the configuration file, and construct nodes corresponding to each node name for display on the configuration panel.
  4. 根据权利要求3所述的方法,其中,所述获取保存引擎数据的配置文件,包括:The method according to claim 3, wherein said obtaining the configuration file for saving engine data comprises:
    通过引擎运行实例获取当前引擎的运行时类型信息RTTI属性;和Obtain the runtime type information RTTI attribute of the current engine through the engine running instance; and
    根据所述RTTI属性获取RTTI对象包含的类名、属性、函数和继承关系,并保存成json格式的配置文件。Obtain the class name, attribute, function and inheritance relationship contained in the RTTI object according to the RTTI attribute, and save it as a configuration file in json format.
  5. 根据权利要求4所述的方法,其中,所述根据所述配置文件构建所述表示引擎能力的节点名称,以及构建与各节点名称对应的用于展示在所述配置面板上的节点,包括:The method according to claim 4, wherein said constructing the node names representing engine capabilities according to the configuration file, and constructing nodes corresponding to each node name for displaying on the configuration panel include:
    解析所述json格式的配置文件以获取所述RTTI对象的类名,根据所述类名生成组件节点的节点名称;其中,Parse the configuration file in the json format to obtain the class name of the RTTI object, and generate the node name of the component node according to the class name; wherein,
    所述组件节点包括:用于输入所述组件节点所属实体节点的输入端口和用于输出所述组件节点相关功能对象的输出端口。The component node includes: an input port for inputting an entity node to which the component node belongs and an output port for outputting a functional object related to the component node.
  6. 根据权利要求5所述的方法,还包括:The method according to claim 5, further comprising:
    解析所述json格式的配置文件,根据所述RTTI对象的类及继承关系获取所述RTTI对象的属性信息数组,根据所述属性信息数组的属性名称生成属性节点的节点名称;其中,Parsing the configuration file in the json format, obtaining the attribute information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generating the node name of the attribute node according to the attribute name of the attribute information array; wherein,
    所述属性节点包括读取属性节点和设置属性节点,其中,The attribute node includes a read attribute node and a set attribute node, wherein,
    所述读取属性节点包括:用于输入所述读取属性节点所属组件节点的输入端口和用于输出所述读取属性节点对应属性值的输出端口;The read attribute node includes: an input port for inputting a component node to which the read attribute node belongs and an output port for outputting an attribute value corresponding to the read attribute node;
    所述设置属性节点包括:用于控制触发的输入端口、用于输入所述设置属性节点所属组件节点的输入端口、以及用于获取属性值的输入端口、用于控制触发的输出端口和用于输出所设置属性值的输出端口。The setting attribute node includes: an input port for controlling triggering, an input port for inputting component nodes to which the setting attribute node belongs, an input port for obtaining attribute values, an output port for controlling triggering, and an input port for An output port that outputs the value of the property being set.
  7. 根据权利要求6所述的方法,还包括:The method of claim 6, further comprising:
    解析所述json格式的配置文件,根据所述RTTI对象的类及继承关系获取RTTI对象的函数信息数组,根据所述函数信息数组的函数名称生成函数节点的节点名称,其中,Parse the configuration file in the json format, obtain the function information array of the RTTI object according to the class and inheritance relationship of the RTTI object, and generate the node name of the function node according to the function name of the function information array, wherein,
    所述函数节点包括:用于控制触发的输入端口、用于输入所述函数节点所属组件节点或所属实体节点的输入端口、以及用于获取一个或多个函数参数的输入端口、用于控制触发的输出端口、以及用于输出函数返回属性值的输出端口。The function node includes: an input port for controlling the trigger, an input port for inputting the component node or entity node to which the function node belongs, an input port for obtaining one or more function parameters, and an input port for controlling the trigger , and the output port used to output the property value returned by the output function.
  8. 根据权利要求7所述的方法,其中,所述响应于对所述节点名称中与所述目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在所述配置面板上显示与所述至少一个目标节点名称对应的至少一个目标节点,包括:The method according to claim 7, wherein, in response to the trigger operation on at least one target node name associated with the target object name among the node names and realizing the target function, on the configuration panel Displaying at least one target node corresponding to the at least one target node name includes:
    响应于对所述节点名称中与所述目标对象名称关联的、用于实现目标功能的目标组件节点名称的触发操作,在所述配置面板上显示与所述目标组件节点名称对应的目标组件节点;和In response to a trigger operation on the target component node name associated with the target object name in the node name and used to realize the target function, displaying the target component node corresponding to the target component node name on the configuration panel ;with
    响应于对所述节点名称中与所述目标组件节点名称关联的、用于实现所述目标功能的目标属性节点名称,和/或,目标函数节点名称的触发操作,在所述配置面板上显示与所述目标属性节点名称对应的目标属性节点,和/或,显示与所述目标函数节点名称对应的目标函数节点。In response to a trigger operation on the target attribute node name associated with the target component node name in the node name and used to realize the target function, and/or the target function node name, displaying on the configuration panel A target attribute node corresponding to the name of the target attribute node, and/or, displaying a target function node corresponding to the name of the target function node.
  9. 根据权利要求8所述的方法,其中,所述驱动各所述目标节点运行引擎能力以实现所述目标功能,包括以下至少一种:The method according to claim 8, wherein said driving each of said target nodes to run an engine capability to realize said target function comprises at least one of the following:
    所述组件节点获取所属实体,输出所述实体的组件对象;The component node obtains the entity to which it belongs, and outputs the component object of the entity;
    所述读取属性节点获取所属组件,输出所述组件当前的属性值;The read attribute node obtains the component to which it belongs, and outputs the current attribute value of the component;
    所述设置属性节点的控制端口被触发时,获取需要设置属性的组件,并设置所述组件的属性值;或者When the control port of the setting attribute node is triggered, obtain the component whose attribute needs to be set, and set the attribute value of the component; or
    所述函数节点的输入控制端口被触发时,根据函数参数执行函数输出返回值。When the input control port of the function node is triggered, the function is executed according to the function parameter and the return value is output.
  10. 一种基于引擎能力的实体功能实现装置,包括:A device for implementing entity functions based on engine capabilities, comprising:
    第一显示模块,用于响应于对目标对象名称的触发操作,在配置面板上显示与所述目标对象名称对应的实体节点;The first display module is configured to display on the configuration panel the entity node corresponding to the name of the target object in response to a trigger operation on the name of the target object;
    第二显示模块,搜索预先构建的表示引擎能力的节点名称,响应于对所述节点名称中与所述目标对象名称关联的、且实现目标功能的至少一个目标节点名称的触发操作,在所述配置面板上显示与所述至少一个目标节点名称对应的至少一个目标节点;和The second display module searches for pre-built node names representing engine capabilities, responds to a trigger operation on at least one target node name associated with the target object name among the node names and realizes the target function, in the at least one target node corresponding to the at least one target node name is displayed on the configuration panel; and
    驱动模块,用于响应于根据逻辑需求对所述实体节点和各所述目标节点之间的连接触发操作,驱动各所述目标节点运行引擎能力以实现所述目标功能。The driving module is configured to drive each of the target nodes to run an engine capability to realize the target function in response to triggering an operation on the connection between the entity node and each of the target nodes according to a logic requirement.
  11. 一种电子设备,包括:An electronic device comprising:
    处理器;和processor; and
    用于存储所述处理器可执行指令的存储器;memory for storing said processor-executable instructions;
    所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现上述权利要求1-9中任一所述的基于引擎能力的实体功能实现方法。The processor is configured to read the executable instruction from the memory, and execute the instruction to implement the engine capability-based entity function implementation method according to any one of claims 1-9.
  12. 一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行上述权利要求1-9中任一所述的基于引擎能力的实体功能实现方法。A computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute the method for implementing an entity function based on an engine capability according to any one of claims 1-9.
  13. 一种计算机程序,包括:A computer program comprising:
    指令,所述指令当由处理器执行时使所述处理器执行根据权利要求1-9中任一项所述的基于引擎能力的实体功能实现方法。An instruction, when the instruction is executed by the processor, causes the processor to execute the method for realizing the entity function based on the engine capability according to any one of claims 1-9.
  14. 一种计算机程序产品,包括指令,所述指令当由处理器执行时使所述处理器执行根据权利要求1-9中任一项所述的基于引擎能力的实体功能实现方法。A computer program product, comprising instructions, which, when executed by a processor, cause the processor to execute the method for implementing entity functions based on engine capabilities according to any one of claims 1-9.
PCT/CN2022/091676 2021-06-29 2022-05-09 Engine capability-based entity function implementation method and apparatus and electronic device WO2023273617A1 (en)

Applications Claiming Priority (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
CN202110729945.7 2021-06-29

Publications (1)

Publication Number Publication Date
WO2023273617A1 true WO2023273617A1 (en) 2023-01-05

Family

ID=84692462

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/091676 WO2023273617A1 (en) 2021-06-29 2022-05-09 Engine capability-based entity function implementation method and apparatus and electronic device

Country Status (2)

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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030037119A1 (en) * 1997-11-14 2003-02-20 National Instruments Corporation Graphical programming system and method including nodes for programmatically accessing data sources and targets
US20140282364A1 (en) * 2013-03-14 2014-09-18 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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030037119A1 (en) * 1997-11-14 2003-02-20 National Instruments Corporation Graphical programming system and method including nodes for programmatically accessing data sources and targets
US20140282364A1 (en) * 2013-03-14 2014-09-18 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
CN115543262A (en) 2022-12-30

Similar Documents

Publication Publication Date Title
US10833928B1 (en) Exchanging information among system middleware and models
WO2020119485A1 (en) Page display method and device, apparatus, and storage medium
US8701085B2 (en) Graphical event and binding editor for software development
EP2518621A2 (en) User-centric widgets and dashboards
WO2023040948A1 (en) Information processing method and apparatus, and terminal and storage medium
CN106888236B (en) Session management method and session management device
WO2022111591A1 (en) Page generation method and apparatus, storage medium, and electronic device
WO2020119804A1 (en) Page view display method, apparatus, device and storage medium
CN110334109A (en) Relational database data query method, system, medium and electronic equipment
WO2018177032A1 (en) Method and device for processing response data, client device and electronic device
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN112698824A (en) View element state management method and device, electronic equipment and storage medium
WO2023030224A1 (en) Information presentation method and apparatus, and electronic device and storage medium
US9043464B1 (en) Automatically grouping resources accessed by a user
CN114356962A (en) Data query method and device, electronic equipment and storage medium
WO2021129812A1 (en) Method and system for running artificial intelligence application, and device
WO2023221795A1 (en) View generation method and apparatus, electronic device, and storage medium
WO2023273617A1 (en) Engine capability-based entity function implementation method and apparatus and electronic device
WO2023088379A1 (en) Table processing method and apparatus, electronic device, and storage medium
CN115344688B (en) Business data display method and device, electronic equipment and computer readable medium
WO2023273621A1 (en) Script generation method and apparatus, device and medium
WO2022247441A1 (en) Log file parsing method and apparatus, and device and storage medium
CN111143464A (en) Data acquisition method and device and electronic equipment
WO2023056900A1 (en) Information display method and apparatus, and electronic device and storage medium
WO2023071629A1 (en) Webpage rendering method and apparatus, device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22831444

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE