Graphical programming method and device, electronic equipment and storage medium

The graphical programming method supplements code building blocks with attribute parameters to enable complex business logic development, lowering the technical threshold and expanding application scenarios.

CN119225714APending Publication Date: 2024-12-31SHANGHAI LINGSHI COMM TECH DEV +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411379020.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing graphical programming methods are limited to fixed functional code blocks, unable to realize complex business processing logic, restricting their application in commercial applications.

Method used

A graphical programming method that supplements code building blocks with attribute parameters, allowing users to enhance business logic construction capability and implement complex logic through a graphical interface.

Benefits of technology

Reduces the technical threshold for program development and enhances the capability to construct complex business logic, expanding the application scenarios of graphical programming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225714A_ABST
    Figure CN119225714A_ABST
Patent Text Reader

Abstract

The invention discloses a graphical programming method and device, electronic equipment and a storage medium, and the method comprises the steps: determining a to-be-supplemented attribute lacked by a candidate code building block when the selection information of the candidate code building block displayed by a building block building platform is obtained; displaying an attribute configuration page corresponding to the candidate code building blocks on the building block building platform according to the to-be-supplemented attributes; attribute parameters are obtained according to the attribute configuration page, and the candidate code building blocks set through the attribute parameters are displayed in a building block building area of the building block building platform. According to the embodiment of the invention, code programming is realized through the graphical interface, the technical threshold of program development can be reduced, the technical difficulty of user programming can be reduced, the business logic construction capability of the code building block can be enhanced by supplementing the attribute parameters lacked in the code building block in a graphical interface mode, the complex business logic development is realized, and the user experience is improved. And the application scene of graphical programming can be expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer software technology, and in particular to a graphical programming method, device, electronic equipment and storage medium. Background Art

[0002] Graphical programming can replace traditional text code programming with a visual graphical interface. Graphical programming replaces complex code statements with intuitive graphic modules and icons, making the programming process more vivid and easier to understand. Graphical programming greatly reduces the programming threshold. It does not require programmers to have a deep programming foundation and professional knowledge, and can help programmers quickly understand the basic concepts and methods of programming. In addition, graphical programming tools usually provide a wealth of predefined modules and functions, allowing developers to quickly build complex applications. Compared with traditional code programming, graphical programming can greatly shorten the development cycle and improve development efficiency.

[0003] However, existing graphical programming only provides fixed functional code blocks, which can only realize fixed functions. For commercial applications, it is impossible to realize complex business processing logic. Therefore, there is an urgent need for a graphical programming method that can realize complex business logic with zero code. Summary of the invention

[0004] The present invention provides a graphical programming method, device, electronic device and storage medium, which implement code programming through a graphical interface, can lower the technical threshold for program development, reduce the technical difficulty of user programming, enhance the building block business logic construction capability by supplementing code building blocks with attribute parameters, realize complex business logic development, and expand the application scenarios of graphical programming.

[0005] According to one aspect of the present invention, a graphical programming method is provided, wherein the method comprises:

[0006] When the selection information of the candidate code building blocks displayed on the building block building platform is obtained, the attributes to be supplemented that are missing from the candidate code building blocks are determined;

[0007] Displaying a property configuration page corresponding to the candidate code building block on the building block platform according to the to-be-supplemented property;

[0008] Attribute parameters are obtained according to the attribute configuration page, and the candidate code building blocks set with the attribute parameters are displayed in the building block building area of ​​the building block building platform.

[0009] According to another aspect of the present invention, a graphical programming device is provided, wherein the device comprises:

[0010] A building block checking module, configured to determine the attributes to be supplemented that are missing from the candidate code building blocks when the selection information of the candidate code building blocks displayed on the building block building platform is obtained;

[0011] An attribute setting module, used for displaying an attribute configuration page corresponding to the candidate code building block on the building block platform according to the attributes to be supplemented;

[0012] The building block display module is used to obtain attribute parameters according to the attribute configuration page, and display the candidate code building blocks set by the attribute parameters in the building block building area of ​​the building block building platform.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the graphical programming method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the graphical programming method described in any embodiment of the present invention when executed by a processor.

[0018] The technical solution of the embodiment of the present invention obtains selection information of corresponding candidate code blocks through a building block platform, and checks the attributes to be supplemented for the candidate code blocks corresponding to the selection information, displays the corresponding attribute configuration page on the building block platform through the attributes to be supplemented, obtains attribute parameters through the attribute configuration page, configures the candidate code blocks based on the attribute parameters, and displays the configured candidate code blocks in the building block area of ​​the building block platform. The embodiment of the present invention implements code programming through a graphical interface, which can lower the technical threshold for program development and the technical difficulty of user programming. The attribute parameters missing from the code blocks can be supplemented through the graphical interface, which can enhance the business logic construction capability of the code blocks, and complex business logic development can be implemented through the code blocks, thereby expanding the application scenarios of graphical programming.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 is a flowchart of a graphical programming method provided according to the first embodiment of the present invention;

[0022] Figure 2 is a classification example diagram of a candidate code building block provided according to the first embodiment of the present invention;

[0023] Figure 3 This is an example diagram of a building block of a nestable building block type provided according to the first embodiment of the present invention;

[0024] Figure 4 is a flowchart of another graphical programming method provided according to the second embodiment of the present invention;

[0025] Figure 5 is a flowchart of another graphical programming method provided according to Embodiment 3 of the present invention;

[0026] Figure 6 is a flowchart of another graphical programming method provided according to Embodiment 4 of the present invention;

[0027] Figure 7 is an example diagram of a type of building block provided according to a fourth embodiment of the present invention;

[0028] Figure 8 This is an example diagram of an arrangement of building blocks provided according to a fourth embodiment of the present invention;

[0029] Fig. 9 is a flowchart of a block parameter setting provided according to a fourth embodiment of the present invention;

[0030] Fig.10 This is an example diagram of an algorithm flow for searching available local variables provided according to Embodiment 4 of the present invention;

[0031] Fig.11 is a structural schematic diagram of a graphical programming device provided according to Embodiment 5 of the present invention;

[0032] Fig.12 It is a schematic diagram of the structure of an electronic device for implementing the graphical programming method of an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] Embodiment 1

[0036] Figure 1 1 is a flowchart of a graphical programming method provided according to the first embodiment of the present invention. This embodiment is applicable to the case of graphical programming based on code blocks. The method can be executed by a graphical programming device. The graphical programming device can be implemented in the form of hardware and / or software. The device can be configured in a server or terminal device. Figure 1 As shown, the method includes:

[0037] Step 110: when the selection information of the candidate code building blocks displayed on the building block building platform is obtained, the attributes to be supplemented that are missing from the candidate code building blocks are determined.

[0038] Among them, the building block building platform can be a platform that provides code building block building functions, the building block building platform can include a web platform or a dedicated software platform, and the building block building platform can provide users with multiple candidate code blocks during the programming process. The candidate code blocks can be used to implement one or more code processing logics. The candidate code blocks can correspond to one or more code statements in the programming development language. For example, a function call statement constitutes a candidate code block, or an if statement constitutes a candidate code block, etc. The candidate code block can be composed of at least a visual graphic and a code statement. The selection information can be information for selecting candidate code blocks in the building block building platform. The selection information can be triggered by the user's operation on the building block building platform, and the operation can include one or more of clicking, touching, dragging, and right-clicking.

[0039] Specifically, the attributes to be supplemented may be parameters for configuring the usage of the candidate code blocks. The attributes to be supplemented may include input parameters required to control the operation of the candidate code blocks, parameters indicating the processing method of the return value of the operation of the candidate code blocks, and parameters indicating the asynchronous call of the candidate code blocks, etc. The attributes to be supplemented may be input by the user.

[0040] In an embodiment of the present invention, a user can operate candidate code blocks by using a building block platform, and can perform programming by arranging and connecting different candidate code blocks. The upper and lower order between different selected candidate code blocks can correspond to the execution order of the code statements corresponding to the candidate code blocks. In some embodiments, candidate code blocks can be nested, that is, another candidate code block can be nested in a candidate code block, and the code statement corresponding to the nested candidate code block can be located inside the code statement of the nested candidate code block for execution. In the graphical programming process, the building block platform can display one or candidate code blocks, and the user can select the candidate code blocks. The selection information of the selected candidate code blocks can be monitored in the building block platform, and the selected candidate code blocks can be determined according to the selection information, and the candidate code blocks can be verified to determine whether the candidate code blocks need to input the attributes to be supplemented, so as to enrich the usage of the candidate code blocks.

[0041] Step 120: Display the attribute configuration page of the corresponding candidate code building block on the building block platform according to the attributes to be supplemented.

[0042] The attribute configuration page may be a visual page for configuring the attributes to be supplemented that are missing from the candidate code building block, and the attribute configuration page may be one or more. In some embodiments, the attribute configuration page may be divided into multiple configuration pages according to the attribute dimensions of the attributes to be supplemented, such as a configuration page for setting input parameters, a configuration page for setting return value aliases, and a configuration page for setting callback functions.

[0043] In an embodiment of the present invention, a page configuration file of a property configuration page may be pre-configured in the building block building platform, a corresponding page configuration file may be selected according to the to-be-supplemented properties of the selected candidate code building block, and the page configuration file may be loaded into the building block building platform to realize the display of the property configuration page.

[0044] Step 130: Acquire attribute parameters according to the attribute configuration page, and display candidate code blocks with attribute parameter settings in the block building area of ​​the block building platform.

[0045] The attribute parameter may be parameter information corresponding to the attribute to be supplemented, the parameter information may be the attribute value of the attribute to be supplemented, and the attribute parameter may include parameter value, callback function or return value alias, etc. The building block construction area may be a visualization area for displaying candidate code building blocks, the building block construction area may be displayed by the building block construction platform, and the building block construction area may include a web page or a software window.

[0046] In an embodiment of the present invention, the building block building platform can display a property configuration page for the user, and the user can operate on the property configuration page to achieve parameter setting of the to-be-supplemented properties of the selected candidate code building block, and can receive the parameters input by the user as property parameters on the property configuration page, and can set the selected candidate code building block according to the property parameters. The setting may include configuring the property parameters of the code statement of the candidate code building block through the property parameters, for example, the input parameters may be configured for the code statement, the alias may be configured for the return value of the code statement, or the callback function may be set for the code statement, etc. The candidate code building block with the property parameters set may be set in the building block building area of ​​the building block building platform, thereby completing the construction of the code statement corresponding to the candidate code building block.

[0047] In the embodiment of the present invention, selection information of corresponding candidate code blocks is obtained through a building block platform, and the candidate code blocks corresponding to the selection information are checked for attributes to be supplemented, a corresponding attribute configuration page is displayed on the building block platform through the attributes to be supplemented, attribute parameters are obtained through the attribute configuration page, the candidate code blocks are configured based on the attribute parameters, and the configured candidate code blocks are displayed in a building block area of ​​the building block platform. The embodiment of the present invention implements code programming through a graphical interface, which can reduce the technical threshold for program development and the technical difficulty of user programming. By supplementing code blocks according to attribute parameters, the business logic construction capability of the code blocks can be enhanced, and complex business logic development can be implemented through code blocks, thereby expanding the application scenarios of graphical programming.

[0048] In some embodiments of the invention, the candidate code blocks include: preconfigured code blocks and user-built code blocks; the preconfigured code blocks include at least execution blocks, conditional blocks, logical conditional blocks and loop blocks, the preset configuration code blocks include nested blocks, the nested blocks include a building area for child blocks, and at least one of the execution blocks, conditional blocks and loop blocks is a nested block; the data types supported by the preconfigured code blocks include at least one of basic types, hashes, maps, collections, files, pictures, videos and custom objects; the user-built code blocks include at least one preconfigured code block.

[0049] In an embodiment of the present invention, the candidate code blocks displayed in the block building platform may include pre-configured code blocks and user-built code blocks. The user-built code blocks may be constructed by the user through pre-configured code blocks. The user-built code blocks may include one or more pre-configured code blocks. The pre-configured code blocks may be divided into execution blocks, conditional blocks, logical condition blocks, and loop blocks according to the corresponding code statements. Figure 2 , wherein the execution class blocks include candidate code blocks corresponding to function call statements, new local variable statements, assignment statements, end statements, and end and return value statements, respectively; the conditional judgment class blocks may include candidate code blocks corresponding to if statements, else if statements, and else statements, respectively; the logical conditional blocks may include candidate code blocks corresponding to comparison statements, logical and statements, logical or statements, and logical negation statements, and the loop class blocks may include candidate code blocks corresponding to statements for repeating a specified number of times, statements for repeating execution according to specified logical conditions, statements for ending a loop, and statements for immediately executing the next loop, respectively; it can be understood that the above statements may refer to one statement or a statement set of multiple statements.

[0050] Specifically, the preconfigured code blocks may also include nestable class blocks, and the nesting level of the nestable class blocks may not be limited. For example, another candidate code block may be nested in a nestable class block, which may be considered as one level of nesting, and the nestable class blocks may be nested in multiple levels. Nestable class blocks may belong to execution class blocks, conditional judgment class blocks, logical conditional blocks, and loop class blocks, etc. That is, there is a candidate code block, which may belong to the execution class block, and the candidate code block also belongs to the nestable class block, which may nest itself or other candidate code blocks. See Figure 3 ,The nestable class building blocks can include candidate code blocks for function call statements, if statements, else if statements, else statements, statements that repeat a specified number of times, and statements that repeat according to specified logical conditions.

[0051] Embodiment 2

[0052] Figure 4 is a flowchart of another graphical programming method provided according to the second embodiment of the present invention. The embodiment of the present invention is a specific embodiment based on the above embodiment, and describes the process of checking the attributes to be supplemented and collecting the attribute parameters of the attributes to be supplemented. Figure 4 The method provided in the embodiment of the present invention specifically includes the following steps:

[0053] Step 210: Receive selection information for displayed candidate code blocks on the block building platform, and determine the target code block selected by the selection information.

[0054] In an embodiment of the present invention, the selection information may carry information indicating the selected candidate code building block, and the selection information may include an identifier or a position of the candidate code building block, and the position may indicate a position where the candidate code building block is displayed in the building block construction platform.

[0055] Specifically, one or more candidate code blocks can be displayed through the building block building platform, and the candidate code blocks can include pre-configured code blocks and user-built code blocks. The user can select the candidate code blocks in the building block building platform, and the building block building platform can generate selection information based on the user's selection operation, and the selection information at least includes the identification or position of the selected candidate code block. The corresponding candidate code block can be marked as a target code block through the selection information including the identification or position.

[0056] Step 220: Determine the attributes to be supplemented that are missing from the target code building block, wherein the attributes to be supplemented include at least one of a function parameter, a function return value, and a callback function.

[0057] In an embodiment of the present invention, the target code building block may be checked to determine whether attribute information such as function parameters, function return values, and callback functions are missing, and the missing function parameters, function return values, and / or callback functions may be used as attributes to be supplemented.

[0058] Step 230: When the attributes to be supplemented include function parameters, a parameter configuration page in the attribute configuration page is displayed, candidate local variables of the target code block are obtained, and the candidate local variables are displayed on the parameter configuration page.

[0059] The parameter configuration page may be a visualization page for collecting function parameters, and the parameter configuration page may receive constant light or local variables, which may be directly input by a user or generated by selecting candidate local variables. Candidate local variables may be determined by other candidate code blocks associated with the target code block, for example, the candidate local variables may include local variables of candidate code blocks at the same level that are executed before the target code block, or local variable defects of parent code blocks nested outside the target code block.

[0060] In an embodiment of the present invention, it is determined that the attribute to be supplemented is a function parameter, and a parameter configuration page can be determined in a pre-configured attribute configuration page, and the parameter configuration page can be displayed, and the display effect can be determined by a pre-configured page display style. The corresponding candidate local variables can be determined according to the target code block, and the candidate code blocks at the same level executed before the target code block can be found, and the local variables of the found candidate code blocks can be set as the candidate local variables of the target code block, or the parent code block of the target code block can be determined, and the parent code block is nested outside the target code block, and the local variables of the parent code block can be set as the candidate local variables of the target code block. The candidate local variables of the acquired target code block can be displayed on the parameter configuration page so that the user can select the candidate local variables.

[0061] Step 240: When the attributes to be supplemented include function return values, a return value alias setting page in the attribute configuration page is displayed, wherein the return value alias setting page at least displays an interactive control for setting an alias for the return value of the target code block.

[0062] Among them, the return value alias setting page can be a page for setting an alias for the return value of the target code building block, and the interactive control can be a visual control in the return value alias setting page for interacting with the user. The interactive control may include an input box or a text box, etc.

[0063] In an embodiment of the present invention, when the attribute to be supplemented that is missing from the target code block is a function return value, a return value alias setting page in the display attribute configuration page can be displayed, and an interactive control can be displayed on the return value alias setting page, so that the user can set the alias of the return value of the target code block through the interactive control.

[0064] Step 250: When the attribute to be supplemented includes a callback function, a callback function configuration page in the attribute configuration page is displayed, wherein the callback function configuration page at least displays the asynchronous callback description information of the target code block and a nested block building area, and the nested block building area receives the code block of the callback function corresponding to the target code block.

[0065] The callback function configuration page may be a visualization page for configuring the callback function, and the callback function configuration page may include a nestable building block construction area, which may be used by the user to set the code building blocks of the callback function. It is understood that in some embodiments, the nestable building block construction area may also receive the function code of the callback function directly input by the user. The asynchronous callback description information may be information describing the role of the callback function, and the asynchronous callback description information may be used as annotation information of the code building blocks received in the nestable area.

[0066] In an embodiment of the present invention, when the attribute to be supplemented that is missing from the target code block is a callback function, the callback function configuration page in the display attribute configuration page can be displayed, and the asynchronous callback description information and the nestable block building area can be displayed on the callback function configuration page, so that the user can build the callback function of the target code block through the callback function configuration page. For example, the user can build a callback function in the form of building code blocks in the nestable blocks, and the code blocks can include candidate code blocks displayed in the block building platform, which can be specifically pre-configured code blocks and code blocks that the user has built.

[0067] It can be understood that the callback function configuration page, return value configuration page and parameter configuration page can be independent configuration pages, or they can be integrated into the property configuration page. The callback function configuration page, return value configuration page and parameter configuration page can be partial page areas of the property configuration page respectively.

[0068] Step 260: Acquire attribute parameters according to the attribute configuration page, and display the candidate code blocks with attribute parameter settings in the block building area of ​​the block building platform.

[0069] In the embodiment of the present invention, the selection information of the candidate code building block is received through the building block building platform, the target code building block corresponding to the selection information is determined, the attributes to be supplemented that the target code building block lacks are determined, the parameter configuration page is displayed when the attribute to be supplemented is a function parameter, and the candidate local variable is displayed in the parameter configuration page, the return value alias setting page is displayed when the attribute to be supplemented is a return value, and the callback function configuration page is displayed when the attribute to be supplemented is a callback function, the callback function configuration page at least includes asynchronous callback description information and a nested building block building area, attribute parameters are received on attribute configuration pages such as the parameter configuration page, the return value alias setting page, and the callback function configuration page, and the candidate code building block is set based on the attribute parameters, and the candidate code building block is displayed in the building block cost area of ​​the building block building platform. The embodiment of the present invention implements code programming based on a graphical interface, which can reduce the technical threshold of program development and the technical difficulty of user programming. By supplementing the code building blocks according to the attribute parameters, the business logic construction capability of the code building blocks can be enhanced, and complex business logic development can be implemented through the code building blocks, thereby expanding the application scenarios of graphical programming.

[0070] Further, based on the above-mentioned embodiment of the invention, candidate local variables of the target code building block are obtained, and the candidate local variables are displayed on the parameter configuration page, including:

[0071] Set the target code block as the current search block; obtain the code block located above the current search block in the block building area, and set the local variable of the code block as the candidate local variable, wherein the code block and the current search block belong to the same level of blocks; determine whether the current search block has a parent block; if so, set the found parent block as the current search block, and return to the acquisition process of executing the code block; if not, stop searching for candidate local variables, and display the candidate local variables on the parameter configuration page.

[0072] Among them, the current search block can be used to search for the current block of the local variable, and the current search block can be in a corresponding relationship with the target code block. For example, the current search block can be a code block located above the target code block, and the code block and the target code block are at the same level, that is, the same level can mean that two code blocks are at the same layer, for example, code block A is nested in code block a, and code block B is nested in code block b, and code block A and code block B can be blocks of the same level. Local variables can be variables defined in the code statements of code blocks.

[0073] In an embodiment of the present invention, the target code block can be used as the current search block, and the code blocks arranged above the current search block can be obtained in the block building area. The code blocks can be blocks of the same level as the current search block. For example, if the current search block is nested in other code blocks, it is determined that the code blocks other than the current search block nested in the other code blocks can be blocks of the same level as the current search block. If the current search block is not nested in other code blocks, all code blocks located before the current search block in the block building area can be blocks of the same level as the current search block. For the code block found by the current search block, the local variables of the code block can be used as candidate local variables of the target code block, and the parent block of the current search block is obtained. The parent block can be the code block nested by the current search block, that is, the current search block is nested inside the parent block. It can be determined whether the current search block is nested inside other code blocks. If so, the code block nested by the current search block can be used as the parent block, the found parent block can be set as the current search block, and the code blocks at the same level as the current search block can be continuously obtained, so that the local variables of the code blocks are used as candidate local variables of the target code block. The above process can be repeated until the current search block has no parent block, and all the obtained candidate local variables can be displayed on the parameter configuration page, so that the user can set local variables for the target code block through the candidate local variables.

[0074] Embodiment 3

[0075] Figure 5 is a flowchart of another graphical programming method provided according to Embodiment 3 of the present invention. The embodiment of the present invention is a specific embodiment based on the above embodiment. Figure 5 The method provided in the embodiment of the present invention specifically includes the following steps:

[0076] Step 310: When the selection information of the candidate code building blocks displayed on the building block building platform is obtained, the attributes to be supplemented that are missing from the candidate code building blocks are determined.

[0077] Step 320: Display the attribute configuration page of the corresponding candidate code building block on the building block platform according to the attributes to be supplemented.

[0078] Step 330: Acquire attribute parameters according to the attribute configuration page, and display the candidate code blocks with attribute parameter settings in the block building area of ​​the block building platform.

[0079] Step 340: receiving copy information for at least one candidate code building block in the building block construction area, and in response to the paste information, copying the candidate code building block corresponding to the copy information to a position corresponding to the paste information in the building block construction area.

[0080] Among them, the copy information can be information used to copy and select the candidate code building block, the copy information can be triggered by the user's control instruction, and the control instruction can be implemented by dragging, clicking or right-clicking. The paste information can be information used to paste the candidate code building block selected by the copy information, and the paste information can at least include the copy position of the selected candidate code building block.

[0081] In an embodiment of the present invention, a user may copy and select one or more candidate code blocks in a block building area, thereby generating copy information, which may at least include indication information of the selected candidate code block, such as an identification or position information of the candidate code block, etc. The block building area may also receive paste information triggered by the user, which may be used to determine a paste position of the copied candidate code block. The block building area may monitor the paste information, and when the paste information is obtained, the paste position in the paste information may be extracted, and the candidate code block corresponding to the copy information may be copied to the paste position, thereby pasting the selected candidate code block to other positions in the block building area.

[0082] For example, the user can right-click one or more candidate code blocks displayed in the block building area, copy the selected candidate code blocks, select one or more locations in the block building area and trigger paste information by right-clicking and pasting, so that the selected candidate code blocks are copied to the locations in the block building area that trigger paste information.

[0083] Step 350: receiving annotation information for the candidate code building block in the building block construction area, and displaying the annotation information in association with the candidate code building block in the building block construction area.

[0084] Among them, the annotation information can be annotation information added to the candidate code building block, and the annotation information can be text content used to explain the candidate code building block. The annotation information can include adding text explanations to the candidate code building block and / or setting the candidate code building block as an annotation, that is, changing the candidate code building block into an annotation text, thereby invalidating the candidate code building block. The relationship display between the annotation information and the candidate code building block can include displaying it at a default position or displaying it in text specified by the user. The default position can be a position in the configuration block building area for displaying the annotation information of the candidate code building block. The default position can be located on the right side of the candidate code building block or suspended on the upper layer of the candidate code building block, etc. The default position can be pre-configured or set according to user needs. In some embodiments, the displayed annotation information can also receive user interaction. For example, the user can change the display position of the annotation information by dragging the direction.

[0085] In an embodiment of the present invention, annotation information can be received in a building block area, and the annotation information can be used to annotate a candidate code block or set the candidate code block as a text annotation. When the annotation information is obtained, the annotation information can be displayed in association with the corresponding candidate code block in the building block area. The association can include a visual association between the annotation information and the candidate code block, for example, there is a line connecting the candidate code block and the annotation information, or the candidate code block and the visual image of the annotation information are spliced ​​together. In some embodiments, when the annotation information is added as a symbol for setting the candidate code block as an annotation text, such as " / / ", the candidate code block can be set in the building block area to the display effect of the annotation information, such as displaying the color of the candidate code block as a dark color, so that when the code statement of the candidate code block in the building block area is executed, the candidate code block marked as a comment is skipped.

[0086] Step 360: When a code view instruction is received in the block building area, code texts of candidate code blocks in the block building area are generated, and each code text is displayed in the code view display area associated with the block building area according to the arrangement order of the candidate code blocks in the block building area, and an associated display action is set for the code text and the corresponding candidate code block in the block building area, wherein the display action includes at least one of highlighting the display effect, selecting the display effect display, and modifying the display effect.

[0087] Among them, the code view instruction can be a control instruction for controlling the display of each candidate code block in the block building area in the form of code. The code view instruction can be triggered by the user. For example, the user can trigger the code view instruction by clicking a function key or directly inputting the code view instruction; the code text can be the execution code corresponding to the candidate code block, and the code text can be displayed in the form of a development language or a natural language; the display action can be an action for displaying the code text and the candidate code blocks in different formats, and the display action can include a highlighting effect, a selected display effect display, a modified display effect, etc. The highlighting effect can be an operation for controlling the code text and / or the candidate code block to be highlighted, the selected display effect can be an operation for controlling the code text and / or the candidate code block to display a selected state, and the modified display effect can be an operation for controlling the code text and / or the candidate code block to display a modified state. The display action can be achieved by changing the font, font color, font size, background color, background image, etc. of the code text and / or the candidate code block.

[0088] In an embodiment of the present invention, a code view instruction triggered or input by a user can be received through a building block area. When the code view instruction is received, the code statements of all candidate code blocks in the building block area can be processed into code texts, and the code texts can be determined by the code statements of the candidate code blocks and the set attributes to be supplemented. Each code text can be displayed in a code view display area associated with the building block area according to the arrangement order of the candidate code blocks in the building block area, so that each code text is displayed in the form of code. Furthermore, each code text can be set with an associated display action with its corresponding candidate code block, and the association can include the code text and the candidate code block responding to the same operation. For example, when the code text is selected, the code text and the candidate code block can be displayed with a selection display effect at the same time, or when the candidate code block is highlighted, the code text corresponding to the candidate code block is also set to be highlighted.

[0089] Further, based on the above-mentioned embodiment of the invention, after obtaining the function attribute parameters according to the function attribute configuration page, it also includes:

[0090] The function code of the candidate code block is set according to the function attribute parameters, and it is checked whether the function code lacks running parameters; when it is determined that the function code lacks running parameters, a warning message will be set for the corresponding candidate code block in the block building area of ​​the block building platform.

[0091] In an embodiment of the present invention, the function code of the candidate code block can be set by the received function attribute parameters. After the function code is set, the function code can be syntax checked to determine whether the function code lacks operating parameters. The operating parameters can be necessary parameters for the function code to run. If the function code lacks operating parameters, a warning message is set for the candidate code block in the block building area of ​​the block building platform. The warning message can include eye-catching colors and / or enhanced text, that is, the candidate code block can be set to a red or other eye-catching color in the block building area to indicate that the candidate code block lacks necessary operating parameters.

[0092] Embodiment 4

[0093] The graphical programming method provided in the embodiment of the present invention can be implemented by building a platform with building blocks, see Figure 6 In this building block platform, you can use the function call block to call the pre-set functions in the platform and the functions built by the building blocks. Figure 7 The building blocks corresponding to the pre-configured functions can be various types of visual building blocks that abstract the business logic, and the types are not limited to the following: execution class, conditional judgment class, loop class, etc.

[0094] Execution blocks include: function call, new local variable, assignment, end, end and return value.

[0095] Conditional judgment blocks include: If, Else If, ​​Else

[0096] Logical condition blocks include: comparison, logical AND, logical OR, logical NOT, etc.

[0097] Loop blocks include: repeat a fixed number of times, repeat according to specified conditions, end the loop, and immediately start the next loop.

[0098] It is understandable that some of the above-mentioned building blocks can support unlimited levels of nesting of other types or the same type of building blocks. Nestable building blocks can include execution building blocks, conditional judgment building blocks, logical condition building blocks, and loop building blocks.

[0099] In the embodiment of the present invention, each building block is used to represent a statement or a function in a computer program.

[0100] Specifically, after the building blocks are called, they can be displayed on the platform canvas, see Figure 8 ,The arrangement order of different building blocks can include top-down ,arrangement order of different building blocks, and for nestable building blocks, the arrangement method inside them can also be top-down ,arrangement.

[0101] In the embodiments of the present invention, see Fig. 9 If the function you choose to call has parameters, the platform will display the parameter setting interface. If the called function has a return value, the return value alias will also be displayed, and the user can modify it. If the called function has a callback function, the building block will display a nested building block area for the user to build the logic of the callback function.

[0102] Furthermore, for the "Function Call" block, when calling other functions and passing parameters, the platform displays the parameter setting interface. The parameter value can be either a constant or an available local variable provided by the blocks arranged above. If the current block is nested in a block, it has a parent block. The range of local variables available to the current block is: the local variables available to the parent + the local variables provided by the blocks arranged above at the same level. A recursive algorithm is designed for finding available local variables, see Fig.10 , the recursive algorithm includes:

[0103] Step 1: Get the upper block on the same level as the current block and located above the current block in the canvas, extract the available local variables provided by the upper block, and add them to the list of available local variables;

[0104] Step 2: Determine whether the current block has a parent block;

[0105] Step 3: If yes, get the local variable provided by the parent block and add it to the list of available local variables; if no, return the list of available local variables;

[0106] Step 4: Use the obtained parent block as the current block and return to step 1.

[0107] Furthermore, when using the function call block and selecting the called function to be configured with an asynchronous callback, the description name of the asynchronous callback and the area where blocks can be nested will be displayed below the "function call" block. The user can build blocks of the business logic that needs to be processed here in the nested block area and can use the callback parameters of the asynchronous callback function.

[0108] In addition, the building block construction platform provided by the embodiment of the present invention also has functions such as building block error checking, building block reuse, adding comments to buildings, setting buildings as comments, and code view mode.

[0109] 1. Error checking of building blocks: When a user uses a building block, if the required parameters are not entered or the entered parameters are incorrect, such as referencing a non-existent variable, the platform will detect it and the background color of the building block will be displayed in a striking color such as red.

[0110] 2. Reuse of building blocks: When multiple functions built with building blocks or the same business logic exists in the function, and one or more consecutive building block fragments need to be reused, one or more building blocks can be selected in the building block canvas, copied, and pasted to any position of any function. The entire building block function also supports overall copying to increase development efficiency.

[0111] 3. Add comments to building blocks: Select a building block and add a comment to it to explain the business function of the building block. You can also drag the comment to any position to improve the readability of the building block.

[0112] 4. Comment out blocks: In programming, commenting out code is a common practice, which can be used to temporarily block certain code segments. This block-based programming also supports commenting out blocks. The commented-out blocks are still displayed at the original position on the canvas, and the color of the blocks will be displayed in dark color. In addition, when the server generates computer program language through the blocks, the commented-out blocks will be skipped.

[0113] 5. Code view mode of building blocks: When the business is more complex, the building blocks will be piled up too long, requiring scrolling to read, and the readability becomes poor. This platform translates each building block into a very readable pseudo code, such as the assignment building block, which is translated into a=b. The code of all building blocks is displayed in the code view. When the user selects the code view mode, it will be displayed on the right side of the building block canvas. The overall height of the code view is much lower than the building block, reducing scrolling reading, and clicking on the building block will also select the corresponding line of code. Clicking on the code line will also select the corresponding building block. In the code view, selecting a local variable name will automatically highlight all the code texts that use this variable, allowing users to track and check the use of this variable, which is easy to understand and check errors.

[0114] In the above-mentioned embodiment of the invention, when creating a new variable with a new variable building block, a variety of data types are supported, such as: basic types, hashes, maps, collections, files, pictures, videos, and custom objects.

[0115] Embodiment 5

[0116] Fig.11 FIG. 1 is a schematic diagram of the structure of a graphical programming device provided according to Embodiment 5 of the present invention. Fig.11 As shown, the device comprises:

[0117] The building block checking module 410 is used to determine the attributes to be supplemented that are missing from the candidate code building blocks when the selection information of the candidate code building blocks displayed on the building block building platform is obtained.

[0118] The attribute setting module 420 is used to display the attribute configuration page of the corresponding candidate code building block on the building block platform according to the attributes to be supplemented.

[0119] The building block display module 430 is used to obtain attribute parameters according to the attribute configuration page, and display the candidate code building blocks with attribute parameter settings in the building block building area of ​​the building block building platform.

[0120] In the embodiment of the present invention, the selection information of the corresponding candidate code building blocks is obtained on the building block building platform through the building block inspection module, and the candidate code building blocks corresponding to the selection information are checked for the attributes to be supplemented. The attribute setting module displays the corresponding attribute configuration page on the building block building platform through the attributes to be supplemented, and the attribute parameters are obtained through the attribute configuration page. The building block display module configures the candidate code building blocks based on the attribute parameters, and displays the configured candidate code building blocks in the building block building area of ​​the building block building platform. The embodiment of the present invention implements code programming through a graphical interface, which can reduce the technical threshold of program development and the technical difficulty of user programming. By supplementing the code blocks according to the attribute parameters, the business logic construction capability of the code blocks can be enhanced, and complex business logic development can be implemented through the code blocks, thereby expanding the application scenarios of graphical programming.

[0121] Optionally, the building block inspection module 410 includes:

[0122] The building block determination unit is used to receive selection information for displayed candidate code building blocks on the building block construction platform, and determine the target code building block selected by the selection information.

[0123] The attribute checking unit is used to determine the attributes to be supplemented that are missing from the target code building block, wherein the attributes to be supplemented include at least one of a function parameter, a function return value, and a callback function.

[0124] Optionally, the attribute setting module 420 includes at least one of the following:

[0125] The function parameter setting unit is used to display the parameter configuration page in the property configuration page when the attributes to be supplemented include function parameters, obtain the candidate local variables of the target code building block, and display the candidate local variables on the parameter configuration page.

[0126] The return value setting unit is used to display the return value alias setting page in the property configuration page when the attribute to be supplemented includes the function return value, wherein the return value alias setting page at least displays an interactive control for setting the alias of the return value of the target code building block.

[0127] The callback function setting unit is used to display the callback function configuration page in the attribute configuration page when the attribute to be supplemented includes a callback function, wherein the callback function configuration page at least displays the asynchronous callback description information of the target code building block and the nestable building block construction area, and the nestable building block construction area receives the code building block of the callback function corresponding to the target code building block.

[0128] Optionally, the device also includes: a parameter checking module, which is used to set the function code of the candidate code block according to the function attribute parameters, and check whether the function code lacks operating parameters; when it is determined that the function code lacks operating parameters, a warning message will be set for the corresponding candidate code block in the block building area of ​​the block building platform.

[0129] Optionally, the candidate code blocks in the device include: pre-configured code blocks and user-built code blocks;

[0130] The preconfigured code blocks at least include execution blocks, conditional blocks, logical conditional blocks and loop blocks. The preset configuration code blocks include nested blocks. The nested blocks include a building area for child blocks. At least one of the execution blocks, conditional blocks and loop blocks is a nested block. The data types supported by the preconfigured code blocks include at least one of basic types, hashes, maps, collections, files, pictures, videos and custom objects.

[0131] The user-built code blocks include at least one preconfigured code block.

[0132] Optionally, the function parameter setting unit obtains candidate local variables of the target code block and displays the candidate local variables on the parameter configuration page, including:

[0133] Set the target code block to the current search block;

[0134] Obtain a code block located above the current search block in the block building area, and set the local variable of the code block as a candidate local variable, wherein the code block and the current search block belong to the same level of blocks;

[0135] Determine whether the current search block has a parent block;

[0136] If it exists, the parent block found is set as the current search block, and the acquisition process of the execution code block is returned;

[0137] If it does not exist, the search for candidate local variables will stop and the candidate local variables will be displayed on the parameter configuration page.

[0138] Optionally, the device further comprises at least one of the following:

[0139] A building block pasting module, configured to receive copy information for at least one candidate code building block in the building block construction area, and in response to the paste information, copy the candidate code building block corresponding to the copy information to a position corresponding to the paste information in the building block construction area;

[0140] A building block annotation module, used to receive annotation addition information for a candidate code building block in a building block construction area, and display the annotation addition information at a default position associated with the candidate code building block in the building block construction area;

[0141] The code view module is used to generate code texts for candidate code blocks in the block building area when a code view instruction is received in the block building area, and display each code text in a code view display area associated with the block building area according to the arrangement order of the candidate code blocks in the block building area, and set associated display actions for the code texts and the corresponding candidate code blocks in the block building area, wherein the display action includes at least one of highlighting display effects, selecting display effects for display, and modifying display effects.

[0142] The graphical programming device provided in the embodiment of the present invention can execute the graphical programming method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0143] Embodiment 6

[0144] Fig.12 It is a schematic diagram of the structure of an electronic device that implements the graphical programming method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0145] like Fig.12 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0146] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0147] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a graphical programming method.

[0148] In some embodiments, the graphical programming method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the graphical programming method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the graphical programming method in any other appropriate manner (e.g., by means of firmware).

[0149] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0150] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0151] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0152] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0153] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0154] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0155] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0156] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A graphical programming method, characterized in that: The method comprises: When the selection information of the candidate code building blocks displayed on the building block building platform is obtained, the attributes to be supplemented that are missing from the candidate code building blocks are determined; Displaying a property configuration page corresponding to the candidate code building block on the building block platform according to the to-be-supplemented property; Attribute parameters are obtained according to the attribute configuration page, and the candidate code building blocks set with the attribute parameters are displayed in the building block building area of ​​the building block building platform.

2. The method according to claim 1, characterized in that: When the selection information of the candidate code building block displayed on the building block building platform is obtained, determining the attributes to be supplemented that are missing from the candidate code building block includes: receiving, on the block building platform, the selection information for the displayed candidate code blocks, and determining a target code block selected by the selection information; Determine the attributes to be supplemented that are missing from the target code building block, wherein the attributes to be supplemented include at least one of a function parameter, a function return value, and a callback function.

3. The method according to claim 2, characterized in that: The displaying of the attribute configuration page corresponding to the candidate code building block on the building block building platform according to the attribute to be supplemented includes at least one of the following: When the attributes to be supplemented include function parameters, displaying a parameter configuration page in the attribute configuration page, acquiring candidate local variables of the target code building block, and displaying the candidate local variables on the parameter configuration page; When the attribute to be supplemented includes a function return value, displaying a return value alias setting page in the attribute configuration page, wherein the return value alias setting page at least displays an interactive control for setting an alias of the return value of the target code block; When the attribute to be supplemented includes a callback function, a callback function configuration page in the attribute configuration page is displayed, wherein the callback function configuration page at least displays the asynchronous callback description information of the target code block and a nested block building area, and the nested block building area receives the code block corresponding to the callback function of the target code block.

4. The method according to claim 1, characterized in that: After obtaining the function attribute parameters according to the function attribute configuration page, the method further includes: Setting the function code of the candidate code block according to the function attribute parameters, and checking whether the function code lacks running parameters; When it is determined that the function code lacks the running parameter, warning information is set for the corresponding candidate code building block in the building block building area of ​​the building block building platform.

5. The method according to claim 1, characterized in that: The candidate code blocks include: pre-configured code blocks and user-built code blocks; The preconfigured code blocks at least include execution blocks, conditional judgment blocks, logical conditional blocks and loop blocks; the preset configuration code blocks include nested blocks, the nested blocks include a building area for child blocks, and at least one of the execution blocks, the conditional judgment blocks and the loop blocks is the nested block; the data types supported by the preconfigured code blocks include at least one of basic types, hashes, maps, sets, files, pictures, videos and custom objects; The user-built code blocks include at least one of the preconfigured code blocks.

6. The method according to claim 3, characterized in that: The obtaining of the candidate local variables of the target code building block and displaying the candidate local variables on the parameter configuration page includes: Set the target code block as the current search block; Acquire a code block located above the current search block in the block building area, and set a local variable of the code block as the candidate local variable, wherein the code block and the current search block belong to the same level of blocks; Determine whether the currently searched building block has a parent building block; If it exists, the parent block found is set as the current search block, and the acquisition process of executing the code block is returned; If it does not exist, the search for the candidate local variable will be stopped, and the candidate local variable will be displayed on the parameter configuration page.

7. The method according to claim 1, characterized in that: Also includes at least one of the following: receiving copy information for at least one of the candidate code blocks in the block building area, and in response to paste information, copying the candidate code block corresponding to the copy information to a position corresponding to the paste information in the block building area; Receiving annotation information for the candidate code building block in the building block construction area, and displaying the annotation information at a default position associated with the candidate code building block in the building block construction area; When the block building area receives a code view instruction, a code text of the candidate code block in the block building area is generated, and each of the code texts is displayed in a code view display area associated with the block building area according to the arrangement order of the candidate code blocks in the block building area, and an associated display action is set for the code text and the candidate code block corresponding to the block building area, wherein the display action includes at least one of a highlight display effect, a selected display effect display, and a modified display effect.

8. A graphical programming device, characterized in that: The device comprises: A building block checking module, configured to determine the attributes to be supplemented that are missing from the candidate code building blocks when the selection information of the candidate code building blocks displayed on the building block building platform is obtained; An attribute setting module, used for displaying an attribute configuration page corresponding to the candidate code building block on the building block platform according to the attributes to be supplemented; The building block display module is used to obtain attribute parameters according to the attribute configuration page, and display the candidate code building blocks set by the attribute parameters in the building block building area of ​​the building block building platform.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the graphical programming method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the graphical programming method according to any one of claims 1 to 7 when executed.

Citation Information

Cited By

  • Intelligent auxiliary building method based on solid tenon-and-mortise building blocks and mobile terminal

    CN120747306A