IP Library Granted Patent US 12669982
Granted Patent B2
US 12669982 · App. 18/567,556 · Granted Jun 30, 2026

Script generation method, electronic device and storage medium

Inventors: Ruifeng Ma (Beijing, CN); Weifeng Huang (Beijing, CN); Xiaobo Huang (Beijing, CN)
Assignee: BEIJING ZITIAO NETWORK TECHNOLOGY CO., LTD.
G06F8/30
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12669982
App. No.
18/567,556
Granted
Jun 30, 2026
Kind
B2
Abstract

A script generation method and apparatus, a device and a medium, wherein the method comprises: acquiring a node connection line diagram for implementing a target function; according to connection lines between node ports in the node connection line diagram, generating a splicing code representing a call relationship between nodes; and according to the splicing code and script codes written by the nodes in advance, generating a target script file corresponding to the target function.

Claims (75)

1 . A script generation method, comprising the following operations that are executable by one or more processors:

in response to a triggering operation on multiple pieces of node information for implementing a target function, displaying each node corresponding to each node information on a visual panel,

wherein the target function comprises a function for a face recognition business, and the node corresponds to a script code related to the target function;

in response to a triggering operation on connection lines between ports of the nodes based on an execution logic of the target function, generating a connection diagram of nodes for implementing the target function;

based on connection lines among node ports in the connection diagram of nodes, generating splicing codes representing call relationships among the nodes;

generating a target script file corresponding to the target function based on the splicing codes and the script code pre-written for each node,

wherein in response to the triggering operation on multiple pieces of node information for implementing the target function, displaying each node corresponding to each node information on the visual panel, comprises at least one of:

searching a plurality of pre-created names of nodes for implementing the target function, and in respondence to a triggering operation on each node name, displaying each node corresponding to each node name on the visual panel, or,

searching extensible data types of a current display node on the visual panel, and in respondence to a triggering operation on a target data type in the extensible data types, switching the current display node to a node matching the target data type,

wherein before in response to a triggering operation on multiple pieces of node information for implementing a target function, displaying each node corresponding to each node information on a visual panel, the method further comprises:

acquiring a script code corresponding to a business function;

creating a node corresponding to the script code for displaying on the visual panel, wherein the node comprises at least one of a node name, at least one input port, or at least one output port.

2 . The method of claim 1 wherein,

the at least one input port comprises at least one of a data type input port or a control type input port;

the at least one output port comprises at least one of a data type output port or a control type output port.

3 . The method of claim 2 , wherein two nodes with a connection relationship therebtween comprise a first node and a second node, wherein,

a data type output port on the first node is of a data type consistent with that of a data type input port to be connected on the second node;

one data type output port on the first node is connected to one or more data type input ports on the second node, and one data type input port on the second node is connected to one data type output port on the first node;

one control type output port on the first node is connected to one control type input port on the second node, and one control type input port on the second node is connected to one or more control type output ports on the first node.

4 . The method of claim 1 , wherein the based on connection lines among node ports in the connection diagram of nodes, generating a splicing code representing call relationships among the nodes, comprises:

performing topological sorting for the connection diagram of nodes, and sequentially traversing and detecting the port type of each node in the connection diagram of nodes based on the sorting result;

generating the splicing code representing the call relationships among the nodes based on the port types and corresponding connection conditions.

5 . The method of claim 4 , wherein the generating the splicing code representing the call relationships among the nodes based on the port types and corresponding connection conditions, comprises:

in response to a current node contains a data type input port, detecting whether there exists a connection line to the data type input port or not;

in response to there exists a connection line to the data type input port, generating a corresponding splicing code according to an output port of an upstream node connected to the data type input port of the current node;

in response to there does not exist a connection line to the data type input port, generating a corresponding splicing code according to an input value by the user at the data type input port of the current node.

6 . The method of claim 5 , further comprising:

in response to the current node contains a control type output port, detecting whether there exists a connection line to the data type output port or not;

in response to there exists a connection line to the data type output port, generating a corresponding splicing code according to an input port of a downstream node connected to the data type output port of the current node.

7 . The method of claim 1 , before the generating a target script file corresponding to the target function based on the splicing code and a script code pre-written for each node, further comprises:

detecting whether the splicing code matches the language of the script code pre-written for each node;

in response to not match, converting the splicing code into a code language matching the script code pre-written for each node.

8 . An electronic device comprising:

a processor;

a memory for storing instructions executable by the processor;

the processor is used for reading the executable instructions from the memory and executing the instructions to implement:

in response to a triggering operation on multiple pieces of node information for implementing a target function, displaying each node corresponding to each node information on a visual panel,

wherein the target function comprises a function for a face recognition business, and the node corresponds to a script code related to the target function;

in response to a triggering operation on connection lines between ports of the nodes based on an execution logic of the target function, generating a connection diagram of nodes for implementing the target function;

based on connection lines among node ports in the connection diagram of nodes, generating splicing codes representing call relationships among the nodes;

generating a target script file corresponding to the target function based on the splicing codes and the script code pre-written for each node,

wherein in response to the triggering operation on multiple pieces of node information for implementing the target function, displaying each node corresponding to each node information on the visual panel, comprises at least one of:

searching a plurality of pre-created names of nodes for implementing the target function, and in respondence to a triggering operation on each node name, displaying each node corresponding to each node name on the visual panel, or,

searching extensible data types of a current display node on the visual panel, and in respondence to a triggering operation on a target data type in the extensible data types, switching the current display node to a node matching the target data type,

wherein the processor is used for reading the executable instructions from the memory and executing the instructions to, before in response to a triggering operation on multiple pieces of node information for implementing a target function, displaying each node corresponding to each node information on a visual panel, further implement:

acquiring a script code corresponding to a business function;

creating a node corresponding to the script code for displaying on the visual panel, wherein the node comprises at least one of a node name, at least one input port, or at least one output port.

9 . The electronic device of claim 8 , wherein the based on connection lines among node ports in the connection diagram of nodes, generating a splicing code representing call relationships among the nodes, comprises:

performing topological sorting for the connection diagram of nodes, and sequentially traversing and detecting the port type of each node in the connection diagram of nodes based on the sorting result;

generating the splicing code representing the call relationships among the nodes based on the port types and corresponding connection conditions.

10 . The electronic device of claim 9 , wherein the generating the splicing code representing the call relationships among the nodes based on the port types and corresponding connection conditions, comprises:

in response to a current node contains a data type input port, detecting whether there exists a connection line to the data type input port or not;

in response to there exists a connection line to the data type input port, generating a corresponding splicing code according to an output port of an upstream node connected to the data type input port of the current node;

in response to there does not exist a connection line to the data type input port, generating a corresponding splicing code according to an input value by the user at the data type input port of the current node.

11 . The electronic device of claim 10 , wherein the processor is used for reading the executable instructions from the memory and executing the instructions to further implement:

in response to the current node contains a control type output port, detecting whether there exists a connection line to the data type output port or not;

in response to there exists a connection line to the data type output port, generating a corresponding splicing code according to an input port of a downstream node connected to the data type output port of the current node.

12 . The electronic device of claim 8 , wherein the processor is used for reading the executable instructions from the memory and executing the instructions to further implement:

before the generating a target script file corresponding to the target function based on the splicing code and a script code pre-written for each node,

detecting whether the splicing code matches the language of the script code pre-written for each node;

in response to not match, converting the splicing code into a code language matching the script code pre-written for each node.

13 . A non-transitory computer-readable storage medium storing a computer program, which is executed by a processor to cause the processor to implement the following:

in response to a triggering operation on multiple pieces of node information for implementing a target function, displaying each node corresponding to each node information on a visual panel, wherein the target function comprises a function for a face recognition business, and the node corresponds to a script code related to the target function;

in response to a triggering operation on connection lines between ports of the nodes based on an execution logic of the target function, generating a connection diagram of nodes for implementing the target function;

based on connection lines among node ports in the connection diagram of nodes, generating splicing codes representing call relationships among the nodes;

generating a target script file corresponding to the target function based on the splicing codes and the script code pre-written for each node,

wherein in response to the triggering operation on multiple pieces of node information for implementing the target function, displaying each node corresponding to each node information on the visual panel, comprises at least one of:

searching a plurality of pre-created names of nodes for implementing the target function, and in respondence to a triggering operation on each node name, displaying each node corresponding to each node name on the visual panel, or,

searching extensible data types of a current display node on the visual panel, and in respondence to a triggering operation on a target data type in the extensible data types, switching the current display node to a node matching the target data type,

wherein the computer program is executed by a processor to cause the processor to, before in response to a triggering operation on multiple pieces of node information for implementing a target function, displaying each node corresponding to each node information on a visual panel, further implement:

acquiring a script code corresponding to a business function;

creating a node corresponding to the script code for displaying on the visual panel, wherein the node comprises at least one of a node name, at least one input port, or at least one output port.

14 . The non-transitory computer-readable storage medium of claim 13 , wherein the based on connection lines among node ports in the connection diagram of nodes, generating a splicing code representing call relationships among the nodes, comprises:

performing topological sorting for the connection diagram of nodes, and sequentially traversing and detecting the port type of each node in the connection diagram of nodes based on the sorting result;

generating the splicing code representing the call relationships among the nodes based on the port types and corresponding connection conditions.