CN110569031B - Programming implementation method and device - Google Patents

Programming implementation method and device Download PDF

Info

Publication number
CN110569031B
CN110569031B CN201910858034.7A CN201910858034A CN110569031B CN 110569031 B CN110569031 B CN 110569031B CN 201910858034 A CN201910858034 A CN 201910858034A CN 110569031 B CN110569031 B CN 110569031B
Authority
CN
China
Prior art keywords
field
node
structured data
current
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910858034.7A
Other languages
Chinese (zh)
Other versions
CN110569031A (en
Inventor
陈鹏
虞文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201910858034.7A priority Critical patent/CN110569031B/en
Publication of CN110569031A publication Critical patent/CN110569031A/en
Application granted granted Critical
Publication of CN110569031B publication Critical patent/CN110569031B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides a programming implementation method, including: acquiring a target flow chart which characterizes an execution sequence of a plurality of interface components for forming a target scheme, wherein the target flow chart comprises a plurality of nodes and a plurality of connecting lines for connecting the nodes, and each node corresponds to one interface component in the target scheme; the target flow diagram is traversed and programming of the target solution is achieved by performing the following operations: converting each of the plurality of nodes into corresponding first structured data; and converting each of the plurality of wires into corresponding second structured data. The disclosure also provides a programming realization device, an electronic device and a computer readable storage medium.

Description

Programming implementation method and device
Technical Field
The present disclosure relates to a programming implementation method and apparatus.
Background
For the visual programming scheme, it is a technical vacancy how to represent and convert visual interface components (such as video input "video", audio extractor ", key image extractor" keyFrameExtractor ", etc.) and the relationships between the interface components (such as" video "and" audio extractor "," video "and" keyFrameExtractor ", etc.) with structured data into platform-parsable, executable white-point scripts.
Disclosure of Invention
One aspect of the present disclosure provides a programming implementation method, including: acquiring a target flow chart representing an execution sequence of a plurality of interface components for forming a target scheme, wherein the target flow chart comprises a plurality of nodes and a plurality of connecting lines for connecting the nodes, and each node corresponds to one interface component in the target scheme; traversing the target flow chart and programming the target scheme by executing the following operations: converting each of the plurality of nodes into corresponding first structured data; and converting each of the plurality of links into corresponding second structured data.
Optionally, the converting each of the plurality of nodes into corresponding first structured data includes, for each of the plurality of nodes: determining the node type of the current node; if the node type of the current node represents that the current node is an input node, acquiring a predefined first structure body, wherein the first structure body comprises at least one first field and a second field, each first field represents the type of content output by one output end of the current node, and the second field represents the identifier of the current node; and assigning values to the at least one first field and the second field to convert the current node into corresponding first structured data.
Optionally, the converting each of the plurality of nodes into corresponding first structured data further includes: if the node type of the current node represents that the current node is a functional node, acquiring a predefined second structure body, wherein the second structure body comprises at least one third field, at least one fourth field and a fifth field, each third field represents the type of content input by one input end of the current node, each fourth field represents the type of content output by one output end of the current node, and the fifth field represents the identifier of the current node; and assigning values to the at least one third field, the at least one fourth field, and the fifth field to convert the current node into corresponding first structured data.
Optionally, the method further includes: predefining a function for each functional node, each function comprising: inputting a parameter type, a function name and a return value type; determining an input parameter and a return value of each function based on first structured data converted from each functional node and second structured data converted from the plurality of connecting lines; and determining a script of the target solution based on the determined input parameter and the return value and each function.
Optionally, the method further includes: and returning the calling relation among the plurality of interface components based on the script of the target scheme.
Optionally, the converting each of the plurality of wires into corresponding second structured data includes, for each of the plurality of wires: acquiring a predefined third structure, where the third structure includes a sixth field, a seventh field, an eighth field, and a ninth field, the sixth field represents a node to which an input end of a current connection is connected, the seventh field represents a node to which an output end of the current connection is connected, the eighth field represents an output end of a node to which an input end of the current connection is connected, and the ninth field represents an input end of a node to which an output end of the current connection is connected; and assigning values to the sixth field, the seventh field, the eighth field, and the ninth field to convert the current connection to corresponding second structured data.
Optionally, the method further includes: determining the incidence relation between the first structured data and the second structured data; and returning the calling relation among the plurality of interface components based on the association relation.
Another aspect of the present disclosure provides a program-implemented apparatus, comprising: an obtaining module, configured to obtain a target flowchart, where the target flowchart represents an execution sequence of a plurality of interface components used to form a target scheme, where the target flowchart includes a plurality of nodes and a plurality of connection lines used to connect the plurality of nodes, and each node corresponds to one interface component in the target scheme; the programming module is used for traversing the target flow chart and realizing the programming of the target scheme through the first conversion unit and the second conversion unit: the first conversion unit is configured to convert each of the plurality of nodes into corresponding first structured data; and the second conversion unit is used for converting each of the connecting lines into corresponding second structured data.
Another aspect of the present disclosure provides an electronic device including: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods of embodiments of the present disclosure.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, implement the method of embodiments of the present disclosure.
Another aspect of the present disclosure provides a computer program comprising computer executable instructions that when executed perform the method of embodiments of the present disclosure.
Drawings
For a more complete understanding of the present disclosure and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario of a programming implementation method and apparatus in accordance with an embodiment of the present disclosure;
FIG. 2 schematically shows a flow chart of a programming implementation method according to an embodiment of the disclosure;
FIG. 3A schematically illustrates a structure of an input node according to an embodiment of the disclosure;
FIG. 3B schematically illustrates a structure of a tool node according to an embodiment of the disclosure;
FIG. 3C schematically illustrates a structure of artificial intelligence nodes, in accordance with an embodiment of the disclosure;
FIG. 3D schematically illustrates a structure of a wire according to an embodiment of the disclosure;
FIG. 4 schematically shows a block diagram of a programming implementation apparatus according to an embodiment of the disclosure; and
fig. 5 schematically shows a block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, which execute via the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). In addition, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon for use by or in connection with an instruction execution system.
The embodiment of the disclosure provides a programming implementation method and a programming implementation device capable of applying the method. The method comprises the steps of obtaining a target flow chart which indicates an execution sequence of a plurality of interface components for forming a target scheme, wherein the target flow chart comprises a plurality of nodes and a plurality of connecting lines for connecting the nodes, and each node corresponds to one interface component in the target scheme; the target flow diagram is traversed and programming of the target solution is achieved by performing the following operations: converting each of the plurality of nodes into corresponding first structured data; and converting each of the plurality of wires into corresponding second structured data.
Fig. 1 schematically illustrates an application scenario of a programming implementation method and apparatus according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
Simple interface components can be used in simple application scenarios to handle underlying problems. Complex interface components can be constructed by combining a plurality of simple interface components. Complex interface components can be used in complex application scenarios to handle complex problems.
For a complex interface component, in order to facilitate a user to intuitively know the structure of the interface component and the calling relationship between simple interface components therein, the disclosed embodiment provides a corresponding visual programming scheme, i.e. a visual flowchart is used for representing a complex interface component (i.e. a scheme). As shown in fig. 1, the flow chart represents a visual programming scheme for authenticating video content.
It should be noted that, although the visual programming scheme can intuitively display the calling relationship between the interface components in a complex scheme, the scheme cannot be parsed and run by the platform.
In view of the above, the disclosed embodiments provide a programming implementation method. The method can convert the scheme represented by the flow chart into structured data and scripts which can be analyzed and executed by a platform.
The present disclosure will be described in detail below with reference to specific embodiments with reference to the attached drawings.
FIG. 2 schematically shows a flow chart of a programming implementation method according to an embodiment of the disclosure.
As shown in fig. 2, the method includes operations S210 to S220, in which:
in operation S210, a target flow chart characterizing an execution order of a plurality of interface components constituting a target solution is obtained, where the target flow chart may include a plurality of nodes and a plurality of links for connecting the plurality of nodes, for example, where each node corresponds to one interface component in the target solution.
Specifically, for operation S210, for example, a flowchart drawn by the user through a specific platform may be acquired.
Referring back to fig. 1, the scheme characterized by the flowchart can be viewed as a visualization scheme, which includes 9 nodes and 9 links. These 9 nodes correspond to 9 interface components, where the "start" node and "end" node do not process data, and the remaining nodes process data in the flow direction of the data flow from left to right in the flowchart sequentially.
In operation S220, the target flowchart is traversed and programming of the target solution is achieved by performing the following operations: each of the plurality of nodes is converted to corresponding first structured data and each of the plurality of wires is converted to corresponding second structured data.
Specifically, the entire flow diagram may be traversed according to the flow direction of the data flow in the flow diagram, thereby converting each node and each line into corresponding structured data. For example, the nodes in the flowchart can be divided into different node types, different structures are defined for the different node types, and finally, the purpose of converting the visualization graph into the structured data is realized by assigning values to related fields defined in the structures. Similarly, for the connecting lines in the flow chart, corresponding structural bodies can be defined.
According to the embodiment of the disclosure, since the server cannot execute one flowchart, but can execute the corresponding method logic based on the structured data, the scheme corresponding to the flowchart is converted into the structured data, so that the visualization scheme is programmed.
The method shown in fig. 2 is further described with reference to fig. 3A-3D in conjunction with specific embodiments.
As an alternative embodiment, the converting each of the plurality of nodes into corresponding first structured data may include, for example, performing the following for each of the plurality of nodes.
The node type of the current node is determined.
Specifically, in the embodiment of the present disclosure, the node type of each node may be determined according to the position of each node in the flowchart and the role of each node in the data processing process.
Referring back to fig. 1, the node "video" represents a video output node, and provides input data for the nodes "audioextrator" and "keyframeextrator", and thus the node "video" is an input type node. Wherein the node "audioExtractor" corresponds to the speech extraction model and the node "keyFrameExtractor" corresponds to the image extraction model. The node "audioExtractor" extracts corresponding voice data for the input video data, and the node "keyFrameExtractor" extracts corresponding image data for the input video data, so that both the nodes "audioExtractor" and "keyFrameExtractor" are functional nodes.
If the node type of the current node represents that the current node is an input node, a predefined first structure body is obtained, the first structure body comprises at least one first field and at least one second field, each first field represents the type of content output by one output end of the current node, and the second field represents the identification of the current node.
Specifically, in the embodiment of the present disclosure, for an input type node, a structure body including at least two fields may be defined. One of the fields represents the type of content output by an output of the current node, and the other field represents the identity of the current node. It should be noted that the structure may further include other fields, which are not limited herein. And the current node may include one or more outputs, also not limited herein.
The at least one first field and the second field are assigned values to convert the current node into corresponding first structured data.
Fig. 3A schematically illustrates a structure of an input node according to an embodiment of the disclosure.
As shown in fig. 3A, the structure can be used to represent the structure (i.e., structured data) corresponding to the "video" node in fig. 1. From top to bottom, the string in the first box represents the assignment to the first field in the structure, and the string in the second box represents the assignment to the second field in the structure.
In addition, in the structure, the character string "video" in the first row is used as a field to represent the node name of the input node, the character string "input" in the second row is used as a field to represent the node classification of the input node (also called a primary classification, which may include, for example, input (i.e., input node), process (i.e., tool node, also called functional node), and availability (i.e., artificial intelligence node, also called functional node)), the character string "video" in the third row is used as a field to represent the secondary classification of the input node (for example, for the input node, the secondary classification may include video, audio, image, text, json … …), the character string "input" in the fourth row is used as a field to represent the model classification of the input node (i.e., interface component classification, which may include, for example, input, vo, inp, ca, video, and the like), the character string "video" in the fifth row serves as a field indicating a model key, and the character string "input _ 1" in the sixth row serves as a field indicating a unique identifier of an input type node.
By the aid of the method and the device, the structure body of the input type node can be predefined, and some fields in the structure body are assigned with values, so that the input type node can be converted into corresponding structured data.
As an alternative embodiment, the converting each of the plurality of nodes into the corresponding first structured data may further include, for example, the following operations.
If the node type of the current node indicates that the current node is a functional node, a predefined second structure is obtained, where the second structure may include, for example, at least one third field, at least one fourth field, and a fifth field, where each third field indicates a type of content input at one input end of the current node, each fourth field indicates a type of content output at one output end of the current node, and the fifth field indicates an identifier of the current node.
Referring back to fig. 1, the nodes "audioExtractor" and "keyFrameExtractor", as well as the nodes "ASR" (i.e., speech recognition model), "Imageidentification" (i.e., image recognition model), "sensorrecognition" (i.e., sensitive word recognition model), and "fusion" (fusion model) are functional nodes. Among them, "audioExtractor" and "keyFrameExtractor" and "fusion" may also be referred to as tool models. "ASR", "Imageidentification" and "sensityrecognation" may also be referred to as artificial intelligence models.
Specifically, in the embodiment of the present disclosure, for a functional node, a structure body including at least three fields may be defined. One field represents the type of the content input by one input end of the current node, one field represents the type of the content output by one output end of the current node, and the other field represents the identification of the current node. It should be noted that the structure may further include other fields, which are not limited herein. And the current node may include one or more outputs and one or more inputs, also not limited herein.
Values are assigned to the at least one third field, the at least one fourth field, and the fifth field to convert the current node into corresponding first structured data.
Fig. 3B schematically illustrates a structure of a tool node according to an embodiment of the disclosure.
As shown in fig. 3B, this structure can be used to represent a structure corresponding to the "audioExtractor" node in fig. 1. From top to bottom, the character string in the first box represents the assignment to the third field in the structure, the character string in the second box represents the assignment to the fourth field in the structure, and the character string in the third box represents the assignment to the fifth field in the structure.
In addition, in this structure, the character string "audioExtractor" in the first row is used as a field to indicate the node name of the tool node, the character string "preprocessor" in the second row is used as a field to indicate the node classification of the tool node (also called a primary classification, which may include, for example, input (i.e., input node), preprocess (i.e., tool node, also called functional node), and availability (i.e., artificial intelligence node, also called functional node)), the character string "video" in the third row is used as a field to indicate the secondary classification of the tool node, the character string "video" in the fourth row is used as a field to indicate the model classification of the tool node, the character string "audioExtractor" in the fifth row is used as a field to indicate a model key, the character string "tools _ 1" in the sixth row is used as a field to indicate a unique identifier of the tool node, and the character string "audioExtractor" in the seventh to tenth rows corresponds to the field, the node input parameters of the tool nodes are represented, and the fields corresponding to the character strings "result" and "json" in the twelfth to sixteenth rows represent the node output parameters of the tool nodes.
FIG. 3C schematically illustrates a structure of artificial intelligence nodes, according to an embodiment of the disclosure.
As shown in fig. 3C, this structure can be used to represent the structure corresponding to the "ASR" node in fig. 1. From top to bottom, the character string in the first box represents the assignment to the third field in the structure, the character string in the second box represents the assignment to the fourth field in the structure, and the character string in the third box represents the assignment to the fifth field in the structure.
In addition, in this structure, the character string "ASR" in the first row is used as a field to indicate the node name of the artificial intelligence node, the character string "ability" in the second row is used as a field to indicate the node classification of the artificial intelligence node (also called a first-class classification, which may include, for example, input (i.e., input node), process (i.e., artificial intelligence node, also called functional node), and ability (i.e., artificial intelligence node, also called functional node)), the character string "voice" in the third row is used as a field to indicate the second-class classification of the artificial intelligence node, the character string "voice" in the fourth row is used as a field to indicate the model classification of the artificial intelligence node, the character string "auto-speech-recognition" in the fifth row is used as a field to indicate a model key, the character string "node _ 125" in the sixth row is used as a field, the unique identifier of the artificial intelligence node is represented, the field corresponding to the character string 'audio' in the seventh row to the eleventh row represents the node input parameter of the artificial intelligence node, and the fields corresponding to the character strings 'result' and 'json' in the twelfth row to the sixteenth row represent the node output parameter of the artificial intelligence node.
Through the embodiment of the disclosure, the tool node and the artificial intelligence node can be converted into corresponding structured data by predefining the structural body of the functional node and assigning values to certain fields in the structural body.
As an alternative embodiment, the converting each of the plurality of wires into the corresponding second structured data may include, for example, performing the following for each of the plurality of wires.
A predefined third structure is obtained, where the third structure may include, for example, a sixth field, a seventh field, an eighth field, and a ninth field, where the sixth field represents a node to which an input end of the current connection is connected, the seventh field represents a node to which an output end of the current connection is connected, the eighth field represents an output end of a node to which an input end of the current connection is connected, and the ninth field represents an input end of a node to which an output end of the current connection is connected.
Specifically, in the embodiment of the present disclosure, for the connection line, a structure body including at least four fields may be defined. One of the fields represents a node to which an input end of the current connection line is connected, one of the fields represents a node to which an output end of the current connection line is connected, the other field represents an output end of a node to which an input end of the current connection line is connected, and the other field represents an input end of a node to which an output end of the current connection line is connected. It should be noted that the structure may further include other fields, which are not limited herein.
Values are assigned to the sixth field, the seventh field, the eighth field, and the ninth field to convert the current connection into corresponding second structured data.
Fig. 3D schematically illustrates a structure of a wire according to an embodiment of the disclosure.
As shown in fig. 3D, this structure can be used to represent a structure corresponding to any one of the connection lines in fig. 1. From top to bottom, the character string in the first box represents the assignment to the sixth field in the structure, the character string in the second box represents the assignment to the seventh field in the structure, the character string in the third box represents the assignment to the eighth field in the structure, and the character string in the fourth box represents the assignment to the ninth field in the structure.
Through the embodiment of the disclosure, each wire can be converted into corresponding structured data by predefining the structure body of the wire and assigning values to some fields in the structure body.
As an alternative embodiment, the method may further include the following operations, for example.
An incidence relation between the first structured data and the second structured data is determined.
Based on the association relationship, returning a calling relationship between the plurality of interface components.
For example, structured data 1 is
Figure BDA0002197685710000111
The structured data 2 is
Figure BDA0002197685710000112
Figure BDA0002197685710000121
It can be seen that interface component 2, which is characterized by structured data 2, has a calling relationship to interface component 1, which is characterized by structured data 1. Specifically, the data output by the interface component 1 is input data of the interface component 2.
As an alternative embodiment, the method may further include the following operations, for example.
A function is predefined for each functional node, and each function may include, for example: the parameter type, function name, and return value type are input.
And determining the input parameter and the return value of each function based on the first structured data converted by each functional node and the second structured data converted by the connecting lines.
Based on the determined input parameters and the return values and the each function, determining a script of the target solution.
Specifically, in order to convert the structured data model into a script recognizable by the interface management platform engine, for example, a script function recognizable by the engine may be defined for each functional node (including tool nodes and artificial intelligence nodes), and the format of the function is
A value type function name (parameter 1 type, parameter 2 type, a.
For example:
audio audioExtractor(video)
json imageIdentification(image)
json fusion(json,json,……)
and the output result of one tool node or artificial intelligence node function can be used as the input parameter of other tool nodes or artificial intelligence nodes.
For example:
auto-speech-recognition(audioExtractor(video))
based on this, the flow of converting the structured data of each node and connecting line in the flowchart shown in fig. 1 into a script recognizable by the platform engine is as follows:
a) the search starts from the start node.
b) All links (i.e., links) from which the start value is found in the linkArrayList (i.e., the link form).
c) Find all nodes (i.e., nodes) with key value b) for link.to value from nodeArrayList (i.e., node form).
d) Converting all the nodes obtained in the step c) into script functions, wherein preprcessKey/abilityKey of the node (namely unique identification of the tool node/unique identification of the artificial intelligence node) is used as a function name, and fromNode of the corresponding link is used as a function parameter.
e) Find all links from which value is node in linkArrayList, starting with the node obtained in d), respectively.
f) C), d), e) are repeated until the node is fusion.
Finally, for the flowchart shown in fig. 1, the script that the platform engine can recognize after converting the corresponding structured data is:
json fusion(sensitiveRecognition(autoSpeechRecognition(audioExtractor(video))),
imageIdentification(keyFrameExtractor(video)))。
or specifically, all node elements and all connection elements in the flowchart can be extracted, and all script files corresponding to the elements can be found out according to the corresponding relationship between the elements and the predefined script files.
As an alternative embodiment, the method may further include the following operations, for example.
Based on the script of the target solution, a calling relationship between the plurality of interface components is returned.
For example, it can be determined by the script converted with respect to the flowchart shown in fig. 1 that fusion calls presentiticerocognition and imageIdentification, presentiticerocognition calls autospeciecrection, autospeciecrection calls audioExtractor, and audioExtractor and imageIdentification both call video.
FIG. 4 schematically shows a block diagram of a programming implementation apparatus according to an embodiment of the disclosure.
As shown in fig. 4, the programming implementation 400 may include, for example, an acquisition module 410 and a programming module 420. The programming module 420 may include, for example, a first conversion unit 421 and a second conversion unit 422.
The programming implementation device 400 can perform the method described above with reference to fig. 2 and fig. 3A to 3D to implement the programming based on the visual flow chart.
Specifically, the obtaining module 410 is configured to obtain a target flowchart characterizing an execution sequence of a plurality of interface components used for forming a target scheme, where the target flowchart includes a plurality of nodes and a plurality of connection lines used for connecting the plurality of nodes, and each node corresponds to one interface component in the target scheme.
The programming module 420 is used for traversing the target flowchart and implementing the programming of the target scheme through the first converting unit 421 and the second converting unit 422.
The first conversion unit 421 is configured to convert each of the plurality of nodes into corresponding first structured data.
The second converting unit 422 is configured to convert each of the plurality of connection lines into corresponding second structured data.
According to the embodiment of the disclosure, since the server cannot execute one flowchart, but can execute the corresponding method logic based on the structured data, the scheme corresponding to the flowchart is converted into the structured data, so that the visualization scheme is programmed.
It should be understood that, in the embodiments of the present disclosure, technical means used in the embodiments of the apparatus portion and the embodiments of the method portion are the same or similar, and technical problems to be solved and technical effects to be achieved are also the same or similar, and are not described herein again.
Any of the modules, units, or at least part of the functionality of any of them according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules and units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, units according to the embodiments of the present disclosure may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by any other reasonable means of hardware or firmware by integrating or packaging the circuits, or in any one of three implementations of software, hardware and firmware, or in any suitable combination of any of them. Alternatively, one or more of the modules, units according to embodiments of the present disclosure may be implemented at least partly as computer program modules, which, when executed, may perform the respective functions.
For example, any number of the obtaining module 410 and the programming module 420 may be combined in one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the obtaining module 410 and the programming module 420 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in any suitable combination of any of them. Alternatively, at least one of the obtaining module 410 and the programming module 420 may be at least partially implemented as a computer program module, which when executed may perform the respective functions.
Fig. 5 schematically shows a block diagram of an electronic device according to an embodiment of the disclosure. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device 500 includes a processor 510, a computer-readable storage medium 520. The electronic device 500 may perform a method according to an embodiment of the present disclosure.
In particular, processor 510 may include, for example, a general purpose microprocessor, an instruction set processor and/or related chip set and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), and/or the like. The processor 510 may also include on-board memory for caching purposes. Processor 510 may be a single processing unit or a plurality of processing units for performing different actions of a method flow according to embodiments of the disclosure.
Computer-readable storage media 520, for example, may be non-volatile computer-readable storage media, specific examples including, but not limited to: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and so on.
The computer-readable storage medium 520 may include a computer program 521, which computer program 521 may include code/computer-executable instructions that, when executed by the processor 510, cause the processor 510 to perform a method according to an embodiment of the disclosure, or any variation thereof.
The computer program 521 may be configured with, for example, computer program code comprising computer program modules. For example, in an example embodiment, code in computer program 521 may include one or more program modules, including for example 521A, modules 521B, … …. It should be noted that the division and number of modules are not fixed, and those skilled in the art may use suitable program modules or program module combinations according to actual situations, and when these program modules are executed by the processor 510, the processor 510 may execute the method according to the embodiment of the present disclosure or any variation thereof.
According to an embodiment of the present disclosure, at least one of the obtaining module 410 and the programming module 420 may be implemented as a computer program module as described with reference to fig. 5, which, when executed by the processor 510, may implement the respective operations described above.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
While the disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims and their equivalents. Accordingly, the scope of the present disclosure should not be limited to the above-described embodiments, but should be defined not only by the appended claims, but also by equivalents thereof.

Claims (8)

1. A programming implementation method, comprising:
acquiring a target flow chart characterizing an execution sequence of a plurality of interface components used for forming a target scheme, wherein the target flow chart comprises a plurality of nodes and a plurality of connecting lines used for connecting the nodes, and each node corresponds to one interface component in the target scheme;
traversing the target flow graph and programming the target schema is achieved by performing the following operations:
converting each of the plurality of nodes into corresponding first structured data;
converting each of the plurality of wires into corresponding second structured data, wherein for each wire of the plurality of wires:
acquiring a predefined third structural body, wherein the third structural body comprises a sixth field, a seventh field, an eighth field and a ninth field, the sixth field represents a node connected with the input end of the current connecting line, the seventh field represents a node connected with the output end of the current connecting line, the eighth field represents the output end of the node connected with the input end of the current connecting line, and the ninth field represents the input end of the node connected with the output end of the current connecting line;
assigning values to the sixth field, the seventh field, the eighth field, and the ninth field to convert a current connection into corresponding second structured data;
determining an incidence relation between the first structured data and the second structured data; and
and returning the calling relation among the plurality of interface components based on the incidence relation.
2. The method of claim 1, wherein said converting each of the plurality of nodes into corresponding first structured data comprises, for each of the plurality of nodes:
determining the node type of the current node;
if the node type of the current node represents that the current node is an input node, acquiring a predefined first structure body, wherein the first structure body comprises at least one first field and a second field, each first field represents the type of content output by one output end of the current node, and the second field represents the identifier of the current node; and
assigning values to the at least one first field and the second field to convert the current node into corresponding first structured data.
3. The method of claim 2, wherein said converting each of said plurality of nodes into corresponding first structured data further comprises:
if the node type of the current node represents that the current node is a functional node, acquiring a predefined second structure body, wherein the second structure body comprises at least one third field, at least one fourth field and a fifth field, each third field represents the type of content input at one input end of the current node, each fourth field represents the type of content output at one output end of the current node, and the fifth field represents the identifier of the current node; and
assigning values to the at least one third field, the at least one fourth field, and the fifth field to convert the current node into corresponding first structured data.
4. The method of claim 3, wherein the method further comprises:
predefining a function for each functional node, each function comprising: inputting a parameter type, a function name and a return value type;
determining an input parameter and a return value of each function based on first structured data obtained by conversion of each functional node and second structured data obtained by conversion of the plurality of connecting lines; and
determining a script for the target solution based on the determined input parameters and return values and the each function.
5. The method of claim 4, wherein the method further comprises:
and returning the calling relation among the plurality of interface components based on the script of the target scheme.
6. A programming implementation apparatus, comprising:
an obtaining module, configured to obtain a target flowchart characterizing an execution sequence of a plurality of interface components used to form a target scheme, where the target flowchart includes a plurality of nodes and a plurality of connection lines used to connect the plurality of nodes, and each node corresponds to one interface component in the target scheme;
the programming module is used for traversing the target flow chart and realizing the programming of the target scheme through the first conversion unit, the second conversion unit, the determination unit and the return unit:
the first conversion unit is used for converting each of the plurality of nodes into corresponding first structured data;
the second converting unit is configured to convert each of the plurality of connection lines into corresponding second structured data, where the second converting unit includes, for each of the plurality of connection lines:
acquiring a predefined third structural body, wherein the third structural body comprises a sixth field, a seventh field, an eighth field and a ninth field, the sixth field represents a node connected with the input end of the current connecting line, the seventh field represents a node connected with the output end of the current connecting line, the eighth field represents the output end of the node connected with the input end of the current connecting line, and the ninth field represents the input end of the node connected with the output end of the current connecting line;
assigning values to the sixth field, the seventh field, the eighth field, and the ninth field to convert a current connection into corresponding second structured data;
the determining unit is used for determining the incidence relation between the first structured data and the second structured data; and
and the return unit returns the calling relationship among the plurality of interface components based on the incidence relationship.
7. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-5.
8. A computer-readable storage medium storing computer-executable instructions for implementing the method of any one of claims 1 to 5 when executed.
CN201910858034.7A 2019-09-10 2019-09-10 Programming implementation method and device Active CN110569031B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910858034.7A CN110569031B (en) 2019-09-10 2019-09-10 Programming implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910858034.7A CN110569031B (en) 2019-09-10 2019-09-10 Programming implementation method and device

Publications (2)

Publication Number Publication Date
CN110569031A CN110569031A (en) 2019-12-13
CN110569031B true CN110569031B (en) 2021-11-16

Family

ID=68779104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910858034.7A Active CN110569031B (en) 2019-09-10 2019-09-10 Programming implementation method and device

Country Status (1)

Country Link
CN (1) CN110569031B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070074156A1 (en) * 2005-09-01 2007-03-29 Microsoft Corporation Componentization of software computer programs
CN102646035A (en) * 2012-02-17 2012-08-22 南京南瑞继保电气有限公司 Visualized code generation method based on combination of API (application programming interface) and script definition
CN103870260B (en) * 2012-12-14 2019-01-08 腾讯科技(深圳)有限公司 The method and system of business interface exploitation
CN103885782A (en) * 2014-04-03 2014-06-25 南京南瑞继保电气有限公司 Visual programming page program library function packaging and reusing method
US11200291B2 (en) * 2015-11-02 2021-12-14 International Business Machines Corporation Automated generation of web API descriptions from usage data
US11080435B2 (en) * 2016-04-29 2021-08-03 Accenture Global Solutions Limited System architecture with visual modeling tool for designing and deploying complex models to distributed computing clusters
CN107809332A (en) * 2017-11-10 2018-03-16 中国民生银行股份有限公司 Compound interface configures and compound interface call method, device
CN109189758B (en) * 2018-07-26 2021-02-09 新华三技术有限公司 Operation and maintenance flow design method, device and equipment, operation method, device and host
CN109634561B (en) * 2018-10-16 2022-03-04 创新先进技术有限公司 Online visual programming method and device
CN109862089B (en) * 2019-01-24 2021-11-09 网联清算有限公司 Data processing method, device, system and computer readable storage medium

Also Published As

Publication number Publication date
CN110569031A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
US20200073712A1 (en) Method, apparatus, device and medium for processing topological relation of tasks
US9665660B2 (en) Logical data flow mapping rules for (sub) graph isomorphism in a cluster computing environment
CN109491784B (en) Method and device for reducing memory occupation amount, electronic equipment and readable storage medium
KR100871563B1 (en) Apparatus and method for developing software based on component
KR101719278B1 (en) Deep learnig framework and image recognition method for content-based visual image recognition
JP6937659B2 (en) Software testing equipment and methods
CN110888720A (en) Task processing method and device, computer equipment and storage medium
US9418241B2 (en) Unified platform for big data processing
US10824950B2 (en) System and method for deploying a data analytics model in a target environment
US20150370541A1 (en) Verification of a model of a gui-based application
CN109815141B (en) Test method and device
US9380001B2 (en) Deploying and modifying a service-oriented architecture deployment environment model
CN110633959A (en) Method, device, equipment and medium for creating approval task based on graph structure
CN111159268B (en) Method and device for running ETL (extract-transform-load) process in Spark cluster
CN110554865B (en) Visual programming method, device, computing equipment and medium
CN110569031B (en) Programming implementation method and device
US20240086165A1 (en) Systems and methods for building and deploying machine learning applications
CN111966836A (en) Knowledge graph vector representation method and device, computer equipment and storage medium
KR20150128711A (en) Method and system for analyzing a trace timeline of computer system activity
CN110554968B (en) Interface calling method and device
CN110109697B (en) SDK output method and device of neural network model, electronic equipment and storage medium
CN112580806B (en) Neural network continuous learning method and device based on task domain knowledge migration
KR101700219B1 (en) Method and Apparatus for Component Modeling and Simulation System
US9338294B2 (en) Automated task definitions
US10175961B2 (en) Joining operator graph elements via whole program optimization

Legal Events

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