Methods, devices, equipment, media, and program products for sharing programming blocks.

By allowing creators to select and share portions of programming blocks in sharing mode, the inefficiency caused by saving the entire template in existing technologies is solved, achieving more efficient modular sharing and privacy protection, and improving human-computer interaction efficiency.

CN119938021BActive Publication Date: 2025-11-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510013121.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-11-14
Estimated Expiration
2045-01-03

AI Technical Summary

Technical Problem

In existing technologies, the sharing method of programming blocks can only save and share the templates in the entire template library as a whole, resulting in low human-computer interaction efficiency, lack of flexibility and fine-grained permission control, and lack of fast sharing and modular support.

Method used

This invention provides a method for sharing programming blocks, allowing creators to select and share some programming blocks after entering sharing mode. Selected and unselected blocks can be distinguished by changing the display status and transparency, and the selected blocks are converted into structured data for sharing. It supports fast sharing within private domains and modular saving.

Benefits of technology

It enables more granular sharing of programming blocks, reduces the complexity and time cost of sharing operations, improves human-computer interaction efficiency, and supports flexible modular sharing and privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938021B_ABST
    Figure CN119938021B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, medium, and program product for sharing programming blocks, applied in the field of human-computer interaction. The method includes: displaying N programming blocks in a first state, where N is greater than 0; responding to entering a sharing mode, controlling the N programming blocks in the first state to switch to a second state, the display styles of the first and second states being different; responding to a selection operation, selecting M programming blocks from the N programming blocks in the second state, controlling the M programming blocks to return to the first state, where M is greater than 0 and less than or equal to N; and responding to a confirmed sharing operation, sharing the M programming blocks in the first state. This solution can improve the efficiency of human-computer interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of human-computer interaction, and in particular to a method, apparatus, device, medium and program product for sharing programming blocks. Background Technology

[0002] Visual programming is a method of programming through a graphical interface. Visual programming code editors provide programming blocks, which creators can place, drag, combine, or nest in the editor's programming area to implement code logic. Each programming block represents a basic unit of program code, such as a variable, function, condition, condition, or loop. The code editor determines the program code based on the relationships between these programming blocks, and the program code then performs the corresponding functionality.

[0003] In related technologies, programming blocks in the programming area are saved as templates in a template library to enable saving, reuse, and sharing. However, these technologies can only package and save all programming blocks in the programming area as templates in the template library, and creators can only share or import the entire template, resulting in low human-computer interaction efficiency. Summary of the Invention

[0004] This application provides a method, apparatus, device, medium, and program product for sharing programming blocks. The technical solution is as follows:

[0005] On the one hand, a method for sharing programming blocks is provided, the method including:

[0006] Display N programming blocks in the first state, where N is greater than 0;

[0007] In response to entering the sharing mode, the N programming blocks in the first state are controlled to switch to the second state, and the display styles of the first state and the second state are different;

[0008] In response to the selection operation, M programming blocks are selected from the N programming blocks in the second state, and the M programming blocks are controlled to return to the first state, wherein M is greater than 0 and less than or equal to N;

[0009] In response to the confirmation of the sharing operation, the M programming blocks in the first state are shared.

[0010] In some embodiments, the method further includes:

[0011] The scaling operation of the N programming blocks in the second state is set using the scaling field;

[0012] The zoom operation is used to instruct the N programming blocks in the second state to be viewed by zooming.

[0013] or;

[0014] The translation operation of the N programming blocks in the second state is set using the move field;

[0015] The move operation is used to instruct the N programming blocks in the second state to be viewed by moving them.

[0016] In some embodiments, the method further includes:

[0017] Adjust the cascading style sheet style of the N programming blocks to control the N programming blocks in the first state to switch to the second state, and control the M programming blocks to return to the first state.

[0018] In some embodiments, adjusting the Cascading Style Sheet styles of the N programming blocks to control the N programming blocks in the first state to switch to the second state, and controlling the M programming blocks to return to the first state, includes at least one of the following:

[0019] Decrease the transparency of the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; increase the transparency of the M programming blocks selected from the N programming blocks, and decrease the transparency of the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state.

[0020] or;

[0021] A grayscale filter is applied to the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; the grayscale filter is deactivated on the M programming blocks selected from the N programming blocks, and the grayscale filter is applied to the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state;

[0022] or;

[0023] Add dashed outlines to the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; remove the dashed outlines from the M programming blocks selected from the N programming blocks, and add dashed outlines to the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state.

[0024] In some embodiments, the method further includes:

[0025] After controlling the N programming blocks in the first state to switch to the second state, add an unselected style name to each of the N programming blocks in the second state;

[0026] After selecting the M programming blocks from the N programming blocks in the second state, remove the unselected style names of the M programming blocks; and add the M programming blocks to the share list of the block combination.

[0027] In some embodiments, converting the block information of each of the M programming blocks into structured data includes:

[0028] The block information of each of the M programming blocks is integrated into a structured data structure to obtain the structured data;

[0029] The structured data structure includes at least a connection field and an input field. The connection field is used to store the block identifiers of the sequentially connected programming blocks among the M programming blocks. The input field is used to store the block identifiers corresponding to the programming blocks that contain at least one sub-programming block among the M programming blocks.

[0030] In some embodiments, the method further includes:

[0031] Receive the file contents of the shared Q programming blocks;

[0032] Parse the file contents of the Q programming blocks and reconstruct the Q programming blocks;

[0033] or;

[0034] Receive the sharing link of the Q programming blocks to be shared;

[0035] Obtain the file content corresponding to the share link of the Q programming blocks from the server;

[0036] Parse the file contents of the Q programming blocks and restore the Q programming blocks.

[0037] In some embodiments, parsing the file content of the Q programming blocks and restoring the Q programming blocks includes:

[0038] Decrypt the file contents of the Q programming blocks to obtain structured data;

[0039] Parse the structured data to obtain the block information of each of the Q programming blocks;

[0040] Based on the block information of each of the Q programming blocks, the Q programming blocks are reconstructed.

[0041] In some embodiments, restoring the Q programming blocks based on the block information of each of the Q programming blocks includes:

[0042] Based on the block type and block parameters in the block information of each of the Q programming blocks, generate Q programming block instances and set their corresponding attribute values;

[0043] Based on the block position in the block information of each of the Q programming blocks, determine the positions of the Q programming block instances respectively;

[0044] Based on the connection relationships between each of the Q programming blocks and other blocks in the block information, the Q programming block instances are connected to restore the Q programming blocks.

[0045] In some embodiments, the method further includes:

[0046] Perform integrity checks on the Q programming blocks obtained from the restoration;

[0047] If the integrity check fails, an import prompt text will be generated.

[0048] The import prompt text is used to indicate at least one of the following: import failure, re-import, or checking the integrity of the data source.

[0049] On the other hand, a sharing device for programming blocks is provided, the device comprising:

[0050] The display module is used to display N programming blocks in the first state, where N is greater than 0;

[0051] The processing module is used to control the N programming blocks in the first state to switch to the second state in response to entering the sharing mode, wherein the display styles of the first state and the second state are different;

[0052] The processing module is configured to, in response to a selection operation, select M programming blocks from the N programming blocks in the second state, and control the M programming blocks to return to the first state, wherein M is greater than 0 and less than or equal to N;

[0053] A sharing module is used to share the M programming blocks in the first state in response to a confirmed sharing operation.

[0054] On the other hand, a computer device is provided, the computer device comprising: a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the sharing method of programming blocks as described above.

[0055] On the other hand, a computer-readable storage medium is provided that stores a computer program, which is loaded and executed by a processor to implement the sharing method of programming blocks as described above.

[0056] On the other hand, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, wherein a processor retrieves the computer instructions from the computer-readable storage medium, causing the processor to load and execute them to implement the sharing method of programming blocks as described above.

[0057] The beneficial effects of the technical solutions provided in this application include at least the following:

[0058] This invention provides a more granular sharing method for programming blocks. Upon entering sharing mode, the N programming blocks in the first state are switched to the second state, allowing the selection of M programming blocks from the N blocks in the second state, enabling rapid sharing of the selected M blocks. Compared to related technologies that require saving all N programming blocks as a template in a template library, this method eliminates the need to save and publish templates to a template library, reducing the complexity and time cost of sharing operations, improving sharing efficiency, and enhancing human-computer interaction efficiency. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 This is a structural block diagram of a computer system provided in an exemplary embodiment of this application;

[0061] Figure 2 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0062] Figure 3 This is a flowchart illustrating a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0063] Figure 4This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0064] Figure 5 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0065] Figure 6 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0066] Figure 7 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0067] Figure 8 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0068] Figure 9 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0069] Figure 10 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0070] Figure 11 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0071] Figure 12 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0072] Figure 13 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0073] Figure 14 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0074] Figure 15 This is an interface diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0075] Figure 16 This is a schematic diagram of the structured data of a programming block provided in an exemplary embodiment of this application;

[0076] Figure 17 This is a schematic diagram of the structured data of a programming block provided in an exemplary embodiment of this application;

[0077] Figure 18 This is a schematic diagram of the file content of a programming block provided in an exemplary embodiment of this application;

[0078] Figure 19 This is a timing diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0079] Figure 20 This is a timing diagram of a method for sharing programming blocks provided in an exemplary embodiment of this application;

[0080] Figure 21 This is a block diagram of a sharing device for programming blocks provided in an exemplary embodiment of this application;

[0081] Figure 22 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0082] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0083] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0084] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0085] It should be understood that although the terms first, second, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0086] It should be noted that before and during the collection of user-related data, such as data related to user accounts, programming blocks, selection operations, trigger operations, sharing operations, and click operations, this application may display prompt interfaces, pop-ups, or output voice prompts. These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their relevant data is being collected. This application only begins the steps related to collecting user-related data after receiving confirmation from the user regarding the prompt interface or pop-up. Otherwise, if no confirmation is received from the user, the steps related to collecting user-related data end, i.e., no user-related data is collected. In other words, all user-related data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of user-related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0087] First, a brief introduction to the terms used in the embodiments of this application:

[0088] Visual programming is a method of programming through a graphical interface. Creators implement code logic by placing, dragging, connecting, assembling, or nesting graphical modules, rather than directly writing program code. These graphical modules can be considered programming building blocks. Visual programming reduces the complexity of programming and is suitable for creators who are not professional programmers.

[0089] A code editor is an editor that supports visual programming, also known as a visually-based code editor. Visually-based code editors provide programming blocks, which creators use to place, drag, combine, or nest multiple blocks in the editor's programming area to implement code logic. The code editor determines the program code based on the relationships between these blocks, and the corresponding functionality is achieved through this program code.

[0090] Programming blocks (or simply blocks) are the basic units that make up program code. A single programming block represents a basic unit of program code, such as at least one of the following: event, operation, variable, function, condition, judgment, or loop. Programming blocks include shape, color, transparency, and border, allowing creators to easily identify and combine them to achieve various functionalities.

[0091] Trigger Groups: Also known as canvases. In visual programming, trigger groups are workspaces used to create and manage the logical operations of programming blocks; they are also called programming areas. Creators can drag, drop, place, and combine programming blocks within trigger groups to build the code logic of a program. Trigger groups provide various operation functions for programming blocks, such as at least one of the following: adding, deleting, modifying, copying, pasting, dragging, and connecting, making it convenient for creators to design and adjust the code logic of their programs.

[0092] User-generated content (UGC) refers to content created by users. In game scenarios, users create levels, maps, characters, items, etc., using the creation tools and code editors provided by the game environment, increasing the personalization and extensibility of the game.

[0093] Figure 1 This is a structural block diagram of a computer system provided in an exemplary embodiment of this application. The computer system 100 can be a system architecture for implementing a method of sharing programming blocks. The computer system 100 includes: a first terminal 120, a server 140, and a second terminal 160.

[0094] The first terminal 120 is a client application that runs applications supporting visual programming. Optionally, the applications include: game applications, game development engines, visual programming tools, code editors, map editors, chart applications, and document applications. Game applications can be any of the following: battle royale shooting games, virtual reality (VR) games, augmented reality (AR) programs, 3D map programs, first-person shooter (FPS) games, third-person shooter (TPS) games, multiplayer online battle arena (MOBA) games, simulation games (SLG) games, and competitive party games.

[0095] The first terminal 120 is a terminal used by the first user. The first user uses the first terminal 120 to perform visual programming. Based on the program code corresponding to the visual programming or based on the interactive operations performed by the first user, the first terminal 120 controls a virtual character located in a virtual environment. This control includes, but is not limited to, at least one of the following: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and building virtual structures. Optionally, the first user can also use the first terminal 120 to share or be shared with programming blocks.

[0096] The first terminal 120 and the second terminal 160 are connected to the server 140 via a wireless network or a wired network.

[0097] Server 140 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud servers, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Server 140 includes at least one of the following: a single server, multiple servers, a cloud computing platform, and a virtualization center.

[0098] Server 140 includes processor 144 and memory 142. Memory 142 includes receiving module 1421, control module 1422, and sending module 1423. Receiving module 1421 is used to receive requests sent by clients; control module 1422 is used to control visual programming and rendering of the virtual environment; sending module 1423 is used to send responses to clients; server 140 is used to provide background services for clients of first terminal 120 and second terminal 160.

[0099] Optionally, server 140 undertakes the main computing work, and first terminal 120 and second terminal 160 undertake secondary computing work; or, server 140 undertakes secondary computing work, and first terminal 120 and second terminal 160 undertake the main computing work; or, server 140, first terminal 120 and second terminal 160 collaborate in a distributed computing architecture.

[0100] The second terminal 160 installs and runs a client application that supports visual programming. Optionally, the application includes: game applications, game development engines, visual programming tools, code editors, map editors, chart applications, and document applications. Game applications can be any of the following: battle royale shooting games, virtual reality (VR) games, augmented reality (AR) programs, 3D map programs, first-person shooter (FPS) games, third-person shooter (TPS) games, multiplayer online battle arena (MOBA) games, simulation games (SLG) games, and competitive party games.

[0101] The second terminal 160 is a terminal used by a second user. The second user uses the second terminal 160 to perform visual programming. Based on the program code corresponding to the visual programming or based on the interactive operations performed by the second user, the second terminal 160 controls a virtual character located in a virtual environment. This control includes, but is not limited to, at least one of the following: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and building virtual structures. Optionally, the second user can also use the second terminal 160 to share or be shared with programming blocks.

[0102] Optionally, the virtual characters controlled by the first user through the first terminal 120 and the second user through the second terminal 160 are located in different positions within the same virtual environment, meaning the first user and the second user are in the same battle. Alternatively, the virtual characters controlled by the first user through the first terminal 120 and the second user through the second terminal 160 are located in different positions within different virtual environments, meaning the first user and the second user are in different battles.

[0103] Optionally, the clients installed on the first terminal 120 and the second terminal 160 are the same, or the clients installed on the two terminals are the same type of client from different control system platforms. This application embodiment does not limit the form of the clients installed on the first terminal 120 and the second terminal 160, including but not limited to Apps (Applications), mini-programs, etc., installed on the first terminal 120 and the second terminal 160, and can also be in web page form. The first terminal 120 can refer to one of multiple terminals, and the second terminal 160 can refer to one of multiple terminals; this embodiment only uses the first terminal 120 and the second terminal 160 as examples. The first terminal 120 and the second terminal 160 have the same device type, but the device models can be different. This device type includes at least one of: smartphones, tablets, wearable devices, PCs (Personal Computers), laptops, and desktop computers. The following embodiments use smartphones as an example.

[0104] Those skilled in the art will understand that the number of the first terminal 120 and the second terminal 160 can be more or less. For example, there can be one first terminal 120 and one second terminal 160, or there can be a total of eight or more first terminals 120 and second terminals 160. This application does not limit the number or type of the first terminal 120 and the second terminal 160 in its embodiments.

[0105] Visual programming has been widely adopted in the game UGC field. Through visual programming, creators in these areas can easily create program code logic to implement various functions. Creators refer to users or players who use creation tools within the game scene or other platforms to create game UGC. Creators design and build custom game content using map editors, visual programming tools, code editors, etc., and then showcase and share this content with other users or players. For example, in the game UGC field, visual programming helps players without programming experience to customize character behavior, design level logic, tasks, or game modes by placing, dragging, assembling, or nesting multiple programming blocks in the programming area.

[0106] In the relevant technologies, taking the game UGC field as an example, creators implement corresponding game functions by placing, dragging, assembling, or nesting multiple programming blocks in the programming area. For example, the game function is "summoning creatures," and the code logic is: "When the player presses the summon button, a fire ring effect is played 300cm in front of the player, the specified creature is summoned, and an entrance animation is played." Creators can save the programming blocks in the programming area as templates in the template library and publish the templates to the community to achieve saving, reuse, and sharing.

[0107] The steps are as follows:

[0108] 1. The creator enters the trigger group management panel. In the management panel, the creator can see a list of all trigger groups in the current project, making it easy to find and manage the logic of each trigger group.

[0109] 2. Creators browse trigger groups in the management panel and find the trigger group they want to save as a template. For example, a trigger group named "Summon Creature" has the following code logic: "When the player presses the summon button, play a fire ring effect 300cm in front of the player, summon the specified creature, and play its entrance animation."

[0110] 3. The creator clicks the "Save as Template" button, and the "Save as Template" interface pops up.

[0111] 4. In the "Save as Template" interface, the creator fills in the name and description of the template. For example, the template can be named "Summon Creature Template" and the description can be added as "When the player presses the summon button, the specified creature is summoned 300cm in front of the player and an entrance animation is played". This will make it easier for subsequent creators or other creators to quickly identify the game function corresponding to the template in the template library.

[0112] 5. Click the "Save as Template" button in the "Save as Template" interface. The computer will package all the programming blocks in the entire trigger group into a template and save the template file to the template library server. The template file includes the logical structure, configuration parameters, related variables, and dependencies of all programming blocks in the trigger group to ensure that the entire code logic can be restored when importing the template later.

[0113] 6. When subsequent creators or other creators wish to use this template, click the "Add Template" button in the management panel of the trigger group to open the template library.

[0114] 7. The creator clicks on the template in the template library, and the "Add to Canvas" button is displayed. Click "Add to Canvas" to import the template.

[0115] 8. Load the template into the current trigger group. At the same time, a new trigger group will be added to the trigger group management interface. The programming blocks will be automatically laid out and connected according to the template when it is saved.

[0116] Based on this technology, creators can save programming blocks from the programming area as templates in a template library, enabling saving, reuse, and sharing. This simplifies the process of migrating and reusing the same functionality across different projects and reduces repetitive operations. However, this technology has at least the following problems:

[0117] 1. Lack of flexible modular sharing support: The existing technology can only package and save all programming blocks in the programming area as templates in the template library, and save the entire trigger group as a whole, lacking modular sharing support. This method leads to low human-computer interaction efficiency in reuse and collaboration: When creators only want to reuse or share a part of commonly used logic, such as specific animations or effects, this method results in the saved template containing a lot of irrelevant content. Creators can only share or import the entire template and need to manually delete redundant programming blocks, increasing operational complexity and time costs, as well as increasing server storage costs.

[0118] 2. Lack of support for rapid sharing: Related technologies use template libraries as a way to store and manage programming blocks, requiring creators to manage and search templates through these libraries. However, as the activity level of the game UGC community increases, the number of templates in the library will continue to grow. Creators will face difficulties in managing and searching templates, hindering the immediate sharing and reuse of specific functional logic during team collaborations or project migrations. This limits the convenience and real-time nature of code logic sharing.

[0119] 3. Lack of granular access control: When templates are published to the community using certain technologies, all creators can fully access, import, and use them, failing to meet creators' needs for protecting specific code logic. This is especially problematic in game UGC scenarios, where creators may wish to share programming blocks internally only. However, template libraries lack the functionality to restrict access and control permissions, making it impossible to set access levels and restrictions. This makes it difficult to control the scope of use after sharing, hindering the protection of the privacy and security of the code logic.

[0120] Based on this, the method for sharing programming blocks provided in this application embodiment can at least solve the following problems:

[0121] 1. Supports modular sharing of block combinations, resolving template redundancy and complexity: Allows creators to select and save specific code logic snippets in the programming area as independent modular block combinations, saving only a portion of the programming blocks instead of the entire trigger group. Creators can save frequently used functional modules, such as specific effects, animations, and character behaviors, separately and call them independently, reducing interference from irrelevant content.

[0122] 2. Supports rapid sharing, resolving the cumbersome and inefficient sharing process: The rapid sharing function allows creators to instantly generate files corresponding to selected programming blocks. Creators no longer need to rely on saving, searching, and importing template libraries; they can quickly share the code logic of programming blocks, achieving efficient reuse. This sharing method simplifies the workflow and is particularly suitable for team collaboration, cross-project migration, and real-time sharing scenarios, improving human-computer interaction efficiency.

[0123] 3. Supports rapid sharing within private domains, resolving insufficient access control issues: Creators can send selected portions of the programming blocks' corresponding file content to specific creators or team members without relying on public release through a template library, achieving rapid sharing within a private domain. This method avoids public display in the community, effectively restricting access permissions to internal teams or specific creators, thus ensuring the privacy and security of the programming blocks' code logic.

[0124] Figure 2 This is an interface diagram illustrating a method for sharing programming blocks according to an exemplary embodiment of this application. The method is executed by a computer device, which has a client application supporting visual programming installed and running. The computer device may be... Figure 1 The first terminal 120 and / or the second terminal 160 shown herein have clients running applications that support visual programming installed on them. The steps of this method are briefly described as follows:

[0125] 1. Display N programming blocks in the first state, where N is greater than 0; optionally, the first state is the normal state or the editable state, which is the state that allows viewing, selecting, adding, dragging, deleting, connecting and modifying N programming blocks.

[0126] 2. In response to entering share mode, control the N programming blocks in the first state to switch to the second state. The display styles of the first and second states are different. Optionally, the second state is a read-only state, a non-editable state, or a blurred state, which allows viewing and selection, but does not allow adding, dragging, deleting, connecting, or modifying the N programming blocks. For example, the first state can be displayed with normal brightness and transparency and a solid border, while the second state can be displayed with reduced brightness and transparency and a dashed border.

[0127] 3. In response to the selection operation, select M programming blocks from the N programming blocks in the second state, and restore the M programming blocks to the first state. M is greater than 0 and less than or equal to N. Optionally, refer to... Figure 2 The selected M programming blocks 11 are restored to the first state, while the other unselected programming blocks 12 remain in the first state.

[0128] 4. In response to the confirmed share operation, share the M programming blocks in the first state. Optionally, refer to... Figure 2 Click the confirm share button 13 to trigger the confirm share operation and share the M programming blocks 11 that are in the first state.

[0129] In summary, the embodiments of this application provide a method for sharing programming blocks, which supports creators to flexibly select programming blocks, save them as reusable modular units, and export these selected programming blocks as standardized file content or sharing links for sharing. It aims to optimize and simplify the way programming blocks are used, improve the sharing efficiency and flexibility of programming blocks, and improve human-computer interaction efficiency.

[0130] It should also be noted that "response" is used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed can be performed in real time or with a set delay, which is not limited here.

[0131] Figure 3 This is a flowchart illustrating a method for sharing programming blocks according to an exemplary embodiment of this application. The method is executed by a computer device, which has a client application supporting visual programming installed and running. The computer device may be... Figure 1 The first terminal 120 and / or the second terminal 160 shown are equipped with clients that run applications supporting visual programming. The method includes at least a portion of steps 220, 240, 260, and 280:

[0132] Step 220: Display the N programming blocks in the first state, where N is greater than 0.

[0133] Programming blocks are the basic units that make up program code. A single programming block represents a basic unit of program code, such as at least one of the following: event, operation, variable, function, condition, judgment, and loop. Programming blocks include shape, color, transparency, and border, allowing creators to easily identify and execute combinations to achieve various functionalities.

[0134] The first state is the normal or editable state, which allows viewing, selecting, adding, dragging, deleting, connecting, and modifying N programming blocks. N programming blocks refer to all programming blocks in the programming area, or N programming blocks out of X programming blocks in the programming area. These N programming blocks can be determined by the computer device or indicated by the creator, and can be shared or have sharing permissions. X is greater than or equal to N, and N is greater than 0. The N programming blocks in the first state can be displayed in at least one of the following ways: normal brightness and transparency, or a solid border.

[0135] Optionally, the computer device displays N programming blocks in the programming area in the first state.

[0136] Step 240: In response to entering the sharing mode, control the N programming blocks in the first state to switch to the second state. The display styles of the first state and the second state are different.

[0137] Sharing mode allows creators to share all or some of the programming blocks out of N programming blocks. Sharing mode can be triggered by a sharing control. A sharing control can be implemented as at least one of the following: an entry point, a button, an element, an icon, a key, or a key on an external input device, including at least one of an external mouse, keyboard, or gamepad. The sharing control can be triggered by at least one of the following methods: clicking, double-clicking, swiping, long-pressing, gesture input, text input, or voice input.

[0138] The second state is a read-only state, an uneditable state, or a blurred state. It allows viewing and selection, but disallows adding, dragging, deleting, connecting, or modifying N programming blocks. N programming blocks refer to all programming blocks in the programming area, or N programming blocks out of X programming blocks in the programming area. These N programming blocks can be determined by the computer device or indicated by the creator, and can be shared or have sharing permissions. X is greater than or equal to N, and N is greater than 0. The N programming blocks in the second state can be displayed using at least one of the following methods: reduced brightness and transparency, dashed borders, or added grayscale filters. In this embodiment, the display styles of the first and second states are different, allowing the creator to distinguish between them.

[0139] Optionally, in response to entering the sharing mode, the computer device controls the N programming blocks in the first state to switch to the second state, and then displays the N programming blocks in the second state in the programming area.

[0140] Step 260: In response to the selection operation, select M programming blocks from the N programming blocks in the second state, and control the M programming blocks to return to the first state, where M is greater than 0 and less than or equal to N.

[0141] The selection operation is the operation of choosing M programming blocks from N programming blocks, that is, the operation of choosing M programming blocks from N programming blocks in the second state, where M is greater than 0 and less than or equal to N. The selection operation can be triggered by at least one of the following methods: clicking, double-clicking, box selection, gesture input, text input, and voice input. Here, the selection operation allows the selection of at least a portion of the programming blocks from N programming blocks, so that the selected at least a portion of the programming blocks can be saved, shared, and reused later.

[0142] M programming blocks can also be referred to as a block combination. In some embodiments, the programming blocks in the programming area can be arranged in rows. Optionally, the M programming blocks can be any of the following types of programming blocks: a consecutive row of programming blocks, at least two consecutive rows of programming blocks, at least two rows of programming blocks with uniform spacing, at least two rows of programming blocks with uneven spacing, consecutive programming blocks in the same row, programming blocks with uniform spacing in the same row, programming blocks with uneven spacing in the same row, or programming blocks discretely distributed in different rows. Assume there are 5 rows in the programming area, and each row contains 5 programming blocks. The M programming blocks can be any of the following types of programming blocks: programming blocks in row 1, consecutive programming blocks in rows 1, 2, and 3, programming blocks in rows 1, 3, and 5, programming blocks in rows 1, 5 programming blocks in row 1, 1, 3, and 5 programming blocks in row 1, 1, 2, and 5 programming blocks in row 1, 1 programming block in row 1, 5 programming blocks in row 3, and 3 programming blocks in row 5.

[0143] In other embodiments, the programming blocks in the programming area may also be arranged in columns. Optionally, the M programming blocks may be any of the following types of programming blocks: a continuous column of programming blocks, at least two consecutive columns of programming blocks, at least two uniformly spaced columns of programming blocks, at least two non-uniformly spaced columns of programming blocks, consecutive programming blocks in the same column, uniformly spaced programming blocks in the same column, non-uniformly spaced programming blocks in the same column, or discretely distributed programming blocks in different columns.

[0144] In response to a selection operation, the computer device selects M programming blocks from the N programming blocks in the second state, and then restores the M programming blocks to the first state to indicate that the M programming blocks are selected or chosen. M is greater than 0 and less than or equal to N. It is understood that after selecting M programming blocks, NM programming blocks out of the N programming blocks in the second state remain in the second state to indicate that the NM programming blocks are not selected or chosen. This step can be repeated multiple times in a loop to ultimately select the M programming blocks to be shared.

[0145] Step 280: In response to the confirmation sharing operation, share the M programming blocks in the first state.

[0146] The confirm share operation involves confirming the sharing of M programming blocks in the first state; that is, confirming the sharing of the selected M programming blocks. The confirm share operation can be triggered by a confirm share control. The confirm share control can be implemented as at least one of the following: an entry point, a button, an element, an icon, a key, or a key in an external input device, including at least one of an external mouse, keyboard, or gamepad. The confirm share control can be triggered by at least one of the following methods: click, double-click, swipe, long press, gesture input, text input, or voice input.

[0147] Optionally, in response to a confirmed sharing operation, the computer device shares the M programming blocks in their first state. Here, it is possible to set access scope and sharing permissions to share the M programming blocks in their first state with accounts or friend accounts within the set access scope.

[0148] In summary, the programming block sharing method provided in this application involves a computer device displaying N programming blocks in a first state, where N is greater than 0. In response to entering a sharing mode, the N programming blocks in the first state are switched to a second state, with different display styles for the first and second states. In response to a selection operation, M programming blocks are selected from the N programming blocks in the second state, and the M programming blocks are restored to the first state, where M is greater than 0 and less than or equal to N. In response to confirming the sharing operation, the M programming blocks in the first state are shared. This provides a more granular sharing method for programming blocks. When entering sharing mode, the N programming blocks in the first state are switched to the second state, and the selection of M programming blocks from the N programming blocks in the second state is allowed, enabling rapid sharing of the selected M programming blocks. Compared to related technologies that require saving all N programming blocks as a template in a template library, this method eliminates the need to save and publish templates to a template library, reducing the complexity and time cost of sharing operations, improving sharing efficiency, and enhancing human-computer interaction efficiency.

[0149] Sharing operation:

[0150] In some embodiments, a quick share function is provided, allowing creators to select the programming blocks to share and perform the sharing. Step 280 is implemented as steps 282 and 284:

[0151] Step 282: In response to the triggering operation of the confirm share control, display at least two share options;

[0152] Step 284: In response to the selection operation of the target sharing option among at least two sharing options, share the M programming blocks in the first state based on the sharing method indicated by the target sharing option.

[0153] The share confirmation control can be implemented as at least one of the following: an entry point, a button, an element, an icon, a key, or a key on an external input device, including at least one of an external mouse, keyboard, or gamepad. The share confirmation control can be triggered by at least one of the following methods: click, double-click, swipe, long press, gesture input, text input, or voice input.

[0154] Sharing options indicate sharing methods, and at least two sharing options indicate at least two sharing methods. A selection operation is the operation of selecting one sharing option from at least two sharing options. The target sharing option is the sharing option selected by the selection operation. Each of the at least two sharing options can be implemented as: an entry point, a button, an element, an icon, a key, or a key in an external input device, including at least one of an external mouse, keyboard, and gamepad. The selection operation can be triggered by at least one of the following methods: clicking, double-clicking, swiping, long-pressing, gesture input, text input, or voice input.

[0155] Optionally, in response to a triggering operation of the confirm sharing control, the computer device displays at least two sharing options. In response to a selection operation of a target sharing option among the at least two sharing options, the M programming blocks in the first state are shared based on the sharing method indicated by the target sharing option.

[0156] In this embodiment, at least two sharing options are provided, allowing creators to choose their preferred sharing method. This satisfies the sharing needs of various scenarios and improves the flexibility and compatibility of the sharing operation.

[0157] The following examples provide several sharing methods. In practical applications, one of the sharing methods can be selected to perform sharing, or at least two sharing methods can be used to perform sharing separately; there is no limitation here.

[0158] Sharing Method 1:

[0159] In some embodiments, the target sharing option includes: copying the block combination file. The selected M programming blocks can also be referred to as a block combination. Step 284 is specifically implemented as step 284A:

[0160] Step 284A: In response to the selection operation of copying the block combination file, the M programming blocks in the first state are converted into file content, and the file content is copied to the clipboard and pasted into the target application; wherein the file content includes at least one of text, numbers, letters, symbols, and codes.

[0161] The file content corresponds to the selected M programming blocks and can be text content. The file content includes at least one of text, numbers, letters, symbols, and codes. The file content can be author-readable, for example, at least one of text and numbers, or computer-readable, for example, at least one of numbers, symbols, and codes. In this case, the file content can be either encrypted or unencrypted.

[0162] The target application can be the application itself that supports visual programming installed and running on the computer device, or it can be other cross-platform applications, such as at least one of instant messaging tools, chat applications, game applications, text editors, collaboration tools, note-taking software, email, and social platforms.

[0163] Optionally, in response to a selection operation on the copied block combination file, the computer device converts the M programming blocks in the first state into file content, copies the file content to the clipboard, and pastes the file content from the clipboard into the target application. This can be either an automatic pop-up of the target application or an automatic switch to the target application. In the target application, the file content can be displayed as the file content itself or as an applet, depending on the settings within the target application.

[0164] This embodiment provides a sharing method for copying block file combinations. By copying the file content to the clipboard, the creator can paste the file content from the clipboard into the target application, realizing cross-platform sharing and improving the flexibility of sharing.

[0165] Sharing Method Two:

[0166] In some embodiments, the target sharing option includes: copying the block combination link. The selected M programming blocks can also be referred to as a block combination. Step 284 is specifically implemented as step 284B:

[0167] Step 284B: In response to the selection operation of copying the block combination link, generate the share links of M programming blocks in the first state, copy the share links to the clipboard, and send the share links in the clipboard to the first account; wherein the first account is an account or friend account within the set access range.

[0168] The share link is a URL (Uniform Resource Locator) representing the web address corresponding to each of the M programming blocks. The first account is an account within the defined access scope or a friend account of the creator's corresponding user account. The defined access scope is a preset range of authorized user accounts. Friend accounts refer to user accounts that the creator's corresponding user account has added as friends; these include friend accounts within applications that support visual programming installed on the computer device, and also friend accounts within other cross-platform applications.

[0169] Optionally, in response to the selection operation of copying the block combination link, the computer device generates share links for M programming blocks in a first state, copies the share links to the clipboard, and sends the share links from the clipboard to the first account. Specifically, it switches to the chat window of the first account and sends the share links from the clipboard to the first account.

[0170] This embodiment provides a sharing method that involves copying the block file link. By copying the share link to the clipboard, the creator can send the share link from the clipboard to the primary account, improving sharing flexibility. Furthermore, creators can set user account scopes to achieve rapid sharing within private domains, ensuring privacy and security.

[0171] Sharing Method 3:

[0172] In some embodiments, the target sharing option includes: sharing to a second account. The selected M programming blocks can also be referred to as a block combination. Step 284 is specifically implemented as step 284C:

[0173] Step 284C: In response to the selection operation of sharing to the second account, copy the file content or sharing link corresponding to the M programming blocks in the first state to the clipboard, and pop up the account list to send the file content or sharing link in the clipboard to the second account in the account list; wherein, the second account is an account or friend account within the set access range.

[0174] The file content corresponds to the selected M programming blocks and can be text content. The file content includes at least one of text, numbers, letters, symbols, and codes. The file content can be author-readable, for example, at least one of text and numbers, or computer-readable, for example, at least one of numbers, symbols, and codes. In this case, the file content can be either encrypted or unencrypted.

[0175] The share link is a URL (Uniform Resource Locator) representing the web address corresponding to each of the M programming blocks. The second account is an account within the defined access range or a friend account of the creator's corresponding user account. The defined access range is a preset range of user accounts with access authorization. A friend account refers to a user account that the creator's corresponding user account has added as a friend; friend accounts include friend accounts within applications that support visual programming installed and running on the computer device, or friend accounts within other cross-platform applications. The first and second accounts can be the same or different accounts. In some embodiments, the second account is an in-game friend account.

[0176] Optionally, in response to the selection operation of sharing to a second account, the computer device copies the file content or sharing link corresponding to the M programming blocks in the first state to the clipboard, and pops up an account list to send the file content or sharing link in the clipboard to the second account in the account list.

[0177] This embodiment provides a sharing method to a second account. By copying the file content or sharing link to the clipboard, the creator can send the file content or sharing link from the clipboard to the second account, improving sharing flexibility. Furthermore, creators can set the scope of user accounts themselves to achieve rapid sharing within a private domain, ensuring privacy and security.

[0178] Sharing Method Four:

[0179] In some embodiments, the target sharing option further includes: sending a block combination file. The selected M programming blocks can also be referred to as a block combination. Step 284 is specifically implemented as step 284D:

[0180] Step 284D: In response to the selection operation of sending block combination file, convert the M programming blocks in the first state into a file, send the file to the third account, and store the file in the specified storage area; wherein the file includes at least one of text file, image file, program file, and database file, and the third account is an account or friend account within the set access range.

[0181] The file is formed by the content corresponding to the selected M programming blocks. The file can be at least one of the following: text file, image file, program file, or database file. Different file types have corresponding file extensions. The specified storage area can be the memory of a computer device or a computer-readable storage medium. The third account is an account within the set access range or a friend account of the creator's corresponding user account. The set access range is a preset range of user accounts with access authorization. Friend accounts refer to user accounts that the creator's corresponding user account has added as friends. Friend accounts include friend accounts in applications that support visual programming installed and running on the computer device, or friend accounts in other cross-platform applications. The first, second, and third accounts can be the same or different accounts.

[0182] Optionally, in response to a selection operation on sending a block combination file, the computer device converts the M programming blocks in the first state into a file, sends the file to a third account, and stores the file in a specified storage area.

[0183] This embodiment provides a method for sharing block combination files. Creators can send files to a third-party account and store the files, improving the flexibility of sharing and the long-term storage of files, and minimizing the possibility of file loss.

[0184] Selection method:

[0185] This embodiment provides a block selection function. The following embodiment provides selection methods provided by the block selection function to select M programming blocks from N programming blocks in the second state. In practical applications, one selection method can be selected, or at least two selection methods can be combined to perform the selection; no limitation is made here.

[0186] Option 1:

[0187] Specifically, step 260 is implemented as step 260A:

[0188] Step 260A, in response to M click operations, displays one of the N programming blocks in the second state indicated by each of the M click operations, so as to select M programming blocks from the N programming blocks in the second state.

[0189] The selection operation includes M click operations. Each click operation is used to select one programming block from the N programming blocks in the second state. The M click operations are used to select M programming blocks from the N programming blocks in the second state.

[0190] Optionally, in response to M click operations, the computer device displays one of the N programming blocks in the second state indicated by each of the M click operations, so as to select M programming blocks from the N programming blocks in the second state.

[0191] In this embodiment, a method is provided to select M programming blocks through multiple clicks, which increases the diversity of selection operations and thus improves the flexibility of sharing operations.

[0192] Option 2:

[0193] Specifically, step 260 is implemented as step 260B:

[0194] Step 260B: In response to at least one box selection operation, display the box selection area for each box selection operation of at least one box selection operation, and determine the programming blocks in the second state located within the box selection area as the M programming blocks selected from the N programming blocks in the second state.

[0195] The selection operation includes at least one bounding box operation. Each bounding box operation corresponds to a selected area, and the programming block in the second state within the selected area is the selected programming block. The bounding box operation is triggered by clicking the mouse button in a blank area of ​​the programming area, dragging in one direction to form a selection window, and clicking the mouse button again to complete the bounding box operation. The size of the selected areas corresponding to each bounding box operation can be the same or different; this is not restricted.

[0196] Optionally, in response to at least one box selection operation, the computer device displays the box selection area for each box selection operation of the at least one box selection operation, and determines the programming blocks in the second state located within the box selection area as M programming blocks selected from N programming blocks in the second state.

[0197] In this embodiment, a method is provided to select M programming blocks through at least one box selection operation, which improves the diversity of selection operations and thus improves the flexibility of sharing operations.

[0198] Option 3:

[0199] Specifically, step 260 is implemented as step 260C:

[0200] Step 260C: Display the option list of block information; in response to the selection operation of the target option in the option list of block information, determine the M programming blocks that match the target option as the M programming blocks selected from the N programming blocks in the second state; wherein, the option list of block information includes at least one of block type option, block identifier option, block parameter option, block position option, and connection relationship option with other blocks.

[0201] Block information is used to uniquely identify programming blocks. Optionally, block information includes at least one of the following: block type, block identifier, block parameters, block position, and connection relationships with other blocks. Block type includes at least one of the following: event, operation, variable, function, condition, judgment, loop, effect, sound effect, and animation. Block parameters are specific attribute values, including at least one of the following: numeric parameters, text parameters, and Boolean parameters. Block identifier can be at least one of the following: letters, numbers, and codes. Block position includes at least one of the following: row number, column number, and coordinates. Connection relationships with other blocks include at least one of the following: sequential connection, nested connection, and loop connection.

[0202] Accordingly, the block information option list includes at least one of the following: block type option, block identifier option, block parameter option, block position option, and connection relationship option with other blocks. Each option also includes sub-options. Optionally, the block type sub-option includes at least one of the following: event sub-option, operation sub-option, variable sub-option, function sub-option, conditional sub-option, judgment sub-option, loop sub-option, special effect sub-option, sound effect sub-option, and animation sub-option. The block parameter sub-option includes at least one of the following: numeric parameter sub-option, text parameter sub-option, and Boolean parameter sub-option. The block identifier sub-option includes at least one of the following: letter sub-option, number sub-option, and encoding sub-option. The block position sub-option includes at least one of the following: row number sub-option, column number sub-option, and coordinate sub-option. The connection relationship sub-option with other blocks includes at least one of the following: sequential connection sub-option, nested connection sub-option, and loop connection sub-option. The target option can be one of the aforementioned options or one of the sub-options of the aforementioned options.

[0203] Optionally, the computer device displays a list of options for the block information; in response to a selection operation of a target option in the list of options for the block information, the M programming blocks that match the target option are determined as the M programming blocks selected from the N programming blocks in the second state.

[0204] In this embodiment, an option list based on block information is provided. By selecting M programming blocks through checkboxes, the diversity of selection operations is improved, thereby increasing the flexibility of sharing operations.

[0205] Option 4:

[0206] Specifically, step 260 is implemented as step 260D:

[0207] Step 260D: Display candidate block combinations; in response to the selection operation of the target block combination in the candidate block combinations, determine the M programming blocks in the target block combination as the M programming blocks selected from the N programming blocks in the second state; wherein, the candidate block combination is obtained by performing combination based on at least a portion of the programming blocks in the N programming blocks in the second state.

[0208] Candidate block combinations are obtained by combining at least a portion of the N programming blocks in the second state. Specifically, they can be determined based on at least one of the following: the function implemented by the at least a portion of the programming blocks, the block type, the block identifier, the block parameters, the block position, and the connection relationship with other blocks. For example, based on the function implemented by at least a portion of the N programming blocks in the second state, the programming blocks corresponding to each function are combined to obtain candidate block combinations.

[0209] In other embodiments, candidate block combinations are obtained by a neural network model performing combinations on at least a portion of the N programming blocks in the second state. The neural network model is used to perform clustering based on the block information of at least a portion of the N programming blocks in the second state, clustering programming blocks whose block information similarity is greater than a threshold into a group, and determining the programming blocks in each cluster obtained from the clustering as candidate block combinations.

[0210] The candidate block combination includes at least one, and the target block combination is at least one of the candidate block combinations. Optionally, the computer device displays the candidate block combinations; in response to the selection operation of the target block combination in the candidate block combinations, the M programming blocks in the target block combination are determined as the M programming blocks selected from the N programming blocks in the second state.

[0211] In this embodiment, candidate block combinations are displayed in advance, and a method is provided to select a target block combination to select M programming blocks, which improves the diversity of selection operations and thus improves the flexibility of sharing operations.

[0212] Other displays:

[0213] In some embodiments, step 240 is implemented as steps 242 and 244:

[0214] Step 242: In response to the trigger operation of the sharing control, enter the sharing mode;

[0215] Step 244: In response to entering the sharing mode, control the N programming blocks in the first state to switch to the second state; wherein, the first state allows viewing, selecting, adding, dragging, deleting, connecting and modifying the N programming blocks, and the second state allows viewing and selecting, but does not allow adding, dragging, deleting, connecting and modifying the N programming blocks.

[0216] Sharing mode allows creators to share all or some of the programming blocks out of N programming blocks. Sharing mode can be triggered by a sharing control. A sharing control can be implemented as at least one of the following: an entry point, a button, an element, an icon, a key, or a key on an external input device, including at least one of an external mouse, keyboard, or gamepad. The sharing control can be triggered by at least one of the following methods: clicking, double-clicking, swiping, long-pressing, gesture input, text input, or voice input.

[0217] The first state is either normal or editable, allowing you to view, select, add, drag, delete, connect, and modify N programming blocks. The N programming blocks in the first state can be displayed with at least one of the following methods: normal brightness and transparency, or a solid border. The second state is either read-only, non-editable, or blurred, allowing you to view and select, but disallowing you to add, drag, delete, connect, or modify the N programming blocks. The N programming blocks in the second state can be displayed with at least one of the following methods: reduced brightness and transparency, a dashed border, or an added grayscale filter.

[0218] Optionally, the computer device enters sharing mode in response to a trigger operation on the sharing control; in response to entering sharing mode, it controls the N programming blocks in the first state to switch to the second state.

[0219] This embodiment provides a way to enter the sharing mode and control the state switching of programming blocks, which can visually prompt the creator to select the programming blocks they want to share and perform the sharing, thereby improving the sharing efficiency of programming blocks.

[0220] In some embodiments, step 246 is included simultaneously with or after step 244:

[0221] Step 246: In response to entering the sharing mode, display a sharing prompt text and a confirm sharing control; wherein, the sharing prompt text is used to prompt the selection of M programming blocks, and the confirm sharing control is used to display at least two sharing options after being triggered.

[0222] The share prompt text guides the creator to select M programming blocks to share. For example, the share prompt text might read "Please select the programming blocks you want to share quickly" or "Please click the block combination you want to share quickly." The share confirmation control displays at least two share options upon triggering the share selection. Optionally, the share prompt text and the share confirmation control can be displayed in the same row or column.

[0223] The sharing prompt text and confirmation control can be displayed in the blank space or above the programming area. Optionally, the computer device displays the sharing prompt text and confirmation control in response to entering sharing mode.

[0224] In this embodiment, the creator can be promptly notified via sharing prompt text, select the programming block to be shared, and execute the sharing by confirming the sharing control, thus improving the accuracy of the sharing operation.

[0225] As an example, the following is a general explanation of the quick share function with specific diagrams.

[0226] refer to Figure 4 A quick share button 20 has been added to the trigger group management interface. Quick share button 20 is used to enter share mode after triggering. When not in share mode, all programming blocks in the programming area are in their normal state. When the creator clicks quick share button 20 to enter share mode, then... (The sentence is incomplete and requires further context to translate accurately.) Figure 5 In the programming area, all programming blocks in block combination 21 and block combination 22 are switched to read-only mode. In read-only mode, the transparency of all programming blocks in block combination 21 and block combination 22 is reduced, and / or a grayscale filter is added, and / or a dashed outline is added. For example, see reference. Figure 8 The programming blocks are in the normal state. (Reference) Figure 9 The programming blocks reduced the transparency. (Reference) Figure 10 The programming blocks have added a grayscale filter. (Reference) Figure 11 The programming blocks reduced the transparency and added a grayscale filter. (Reference) Figure 12 The programming blocks now include dashed outlines. Also, continue to refer to... Figure 5 The programming area also displays the sharing prompt text "Please click the block combination you want to share quickly" and a confirm share button 24.

[0227] The creator clicks on individual programming blocks within block set 22 to select the block set 22 they wish to share. After clicking, the selected programming blocks in block set 22 revert from read-only to normal mode. (See reference) Figure 6Block combination 22 is now displayed as block combination 23. In its normal state, all programming blocks in block combination 23 have had their transparency restored, grayscale filters removed, or dashed outlines removed. After the creator completes their selection, they click the "Confirm Share" button 24. This fixes all programming blocks in block combination 23. (See reference...) Figure 7 The sharing interface 25 is displayed, including three sharing options: copy block combination file, copy block combination link, and share with game friends. Clicking on one of the three sharing options will perform the sharing based on the sharing method indicated by the target sharing option.

[0228] (1) For copying block combination files: Generate the file content corresponding to the selected block combination 23 and copy it to the clipboard for easy pasting into the target application. The target application can be at least one of instant messaging tools, chat applications, game applications, text editors, collaboration tools, note-taking software, email, and social platforms to achieve flexible cross-platform use and saving. This method also allows creators to save and share block combinations without a network connection, ensuring that the convenience and operability of the block combinations are not limited by network conditions. (2) For copying block combination links: Generate the share link of the selected block combination 23 and copy it to the clipboard for easy sending to the first account. (3) Share with game friends: A list of game friends pops up, and the creator can select one or more game friends to send the file content or share link corresponding to block combination 23 to the game friends for easy in-game collaboration and sharing.

[0229] This embodiment enables precise selection of block combinations composed of desired programming blocks, avoiding the export and sharing of redundant blocks. By copying the block combination link and forwarding it to game friends, it allows setting access limits during the sharing process, thus controlling the user accounts sharing the content. In team collaborations or game UGC communities, this improves the convenience of sharing block combinations while also ensuring privacy and security, guaranteeing that user-generated content is shared within the defined access limits.

[0230] Import operation:

[0231] In some embodiments, a quick import function is provided, which allows creators to import programming blocks shared by other creators. Steps 320 and 340 are also included after step 280 or before step 220:

[0232] Step 320: Receive the file content or sharing link of the Q shared programming blocks, where Q is greater than 0;

[0233] Step 340: In response to the import operation of the file content or share link of the Q programming blocks, display the Q programming blocks.

[0234] Q programming blocks are shared by other creators to this creator through a sharing action, where Q is greater than 0. When other creators share by copying the block combination file, the creator receives the file content of the shared Q programming blocks. When other creators share by copying the block combination link, the creator receives the sharing link of the shared Q programming blocks. When other creators share by sharing to a second account, the creator receives either the file content or the sharing link of the shared Q programming blocks.

[0235] Import operations can be triggered by import controls. Import controls can be implemented as at least one of the following: an entry point, a button, an element, an icon, a key, or a key in an external input device, including at least one of an external mouse, keyboard, or gamepad. Import controls can be triggered in at least one of the following ways: click, double-click, swipe, long press, gesture input, text input, or voice input.

[0236] Optionally, the computer device receives the file content or shared link of Q programming blocks, where Q is greater than 0, and displays the Q programming blocks in response to an import operation on the file content or shared link of the Q programming blocks. Specifically, the display method of the Q programming blocks includes at least one of the following, which can be designed and selected according to actual technical needs.

[0237] Display Method 1: In response to an import operation involving the file content or share link of the Q programming blocks, the computer device displays the Q programming blocks in the blank space of the programming area. This embodiment does not change the original layout, connection relationship, or code logic of the programming blocks in the programming area, making it convenient for creators to use and edit the original programming blocks in the programming area and the Q programming blocks imported this time.

[0238] Display Method 2: In response to an import operation of file content or share links for Q programming blocks, the computer device connects the Q programming blocks with P programming blocks in the programming area based on the functions implemented by the Q programming blocks, and displays the Q programming blocks in the programming area, where P is greater than 0. This embodiment rearranges and reconnects the original programming blocks in the programming area with the imported Q programming blocks according to their functions, and implements the corresponding code logic, thus improving the processing efficiency for various programming blocks in the programming area.

[0239] In this embodiment, the creator can import the file content or sharing link of the Q programming blocks to be shared, which can meet the import needs of multiple scenarios, improve the flexibility and compatibility of the import operation, realize the rapid reuse of the functions implemented by the Q programming blocks, and improve the import efficiency.

[0240] Import Method 1:

[0241] Specifically, step 340 is implemented as steps 342 and 344:

[0242] Step 342: In response to the triggering operation on the import control, display the import input box;

[0243] Step 344: In response to pasting the file content or share link of Q programming blocks into the import input box, display Q programming blocks.

[0244] The import input box is used to paste the file content or share link of Q programming blocks. Optionally, a paste prompt text is also displayed in the import input box, which prompts the user to paste the file content or share link of Q programming blocks. For example, the paste prompt text is "Please enter the file content or link of the block combination". A confirmation import control is also displayed outside the import input box. The confirmation import control is used to confirm the import of Q programming blocks after triggering. The confirmation import control can be implemented as at least one of the following: an entry point, a button, an element, an icon, a key, or a key in an external input device, including at least one of an external mouse, keyboard, and gamepad. The confirmation import control can be triggered by at least one of the following methods: click, double-click, swipe, long press, gesture input, text input, and voice input.

[0245] Optionally, the computer device displays an import input box in response to a triggering operation on the import control; and displays Q programming blocks in response to pasting the file content or share link of Q programming blocks into the import input box. Specifically, Q programming blocks are displayed in response to a triggering operation on the confirm import control.

[0246] In this embodiment, the creator can paste the file content or sharing link of the Q shared programming blocks into the import input box to quickly reuse the functions implemented by the Q programming blocks, improve import efficiency, and also improve data processing efficiency.

[0247] Import Method 2:

[0248] Specifically, step 340 is implemented as steps 346 and 348:

[0249] Step 346: In response to the triggering operation on the import control, display the import upload window;

[0250] Step 348: In response to uploading Q programming block files in the import upload window, display the Q programming blocks.

[0251] The import / upload window is used to upload Q programming block files. You can either drag and drop the Q programming block files into the import / upload window, or select the storage path for the Q programming block files through the import / upload window.

[0252] Optionally, in response to a triggering operation on the import control, the computer device displays an import upload window; in response to uploading a file of Q programming blocks in the import upload window, the computer device displays Q programming blocks.

[0253] In this embodiment, the creator can upload the files of the Q shared programming blocks in the import and upload window, enabling rapid reuse of the functions implemented by the Q programming blocks, improving import efficiency, and also improving data processing efficiency.

[0254] As an example, the following is a general explanation of the quick import function with specific diagrams.

[0255] refer to Figure 13 A quick import button 30 has been added to the trigger group management interface. This button is used to access the import interface after triggering. The programming area originally included block combinations 31 consisting of several programming blocks. After receiving a shared block combination, the creator clicks the quick import button 30 for reference. Figure 14 The import input box 32 is displayed, and the import prompt text in the import input box 32 is "Please enter the content or link of the block assembly file". After the creator pastes the corresponding content into the import input box 32, refer to... Figure 15 As shown, import block combination 33 into the programming area, while maintaining the layout and connection relationships of the original block combination 31 in the programming area. The creator can then continue to edit several programming blocks of block combination 33.

[0256] In this embodiment, the block combination composed of shared programming blocks is quickly imported without carrying redundant block combinations, and without changing the original layout and connection relationship of the programming blocks in the programming area, thus improving the ease of importing block combinations.

[0257] Technical Implementation:

[0258] In some embodiments, a technical implementation of the quick sharing function is provided.

[0259] Read-only mode:

[0260] In some embodiments, when the computer device responds to entering sharing mode, it needs to switch N programming blocks in the first state to the second state, which is implemented based on read-only mode. Specifically, the method further includes step 420:

[0261] Step 420: Use the read-only field to set the N programming blocks in the first state to read-only mode; wherein, the read-only mode is used to indicate that the N programming blocks in the first state switch to the second state.

[0262] The read-only field is used to set the trigger group or programming area to read-only mode. In read-only mode, all N programming blocks in the first state switch to the second state. The creator can only view and select them, and cannot add, drag, delete, connect, or modify the N programming blocks.

[0263] Optionally, the computer device uses a read-only field to set the N programming blocks in the first state to read-only mode; wherein, the read-only mode is used to indicate that the N programming blocks in the first state switch to the second state.

[0264] In this embodiment, the computer device uses the configuration of the read-only field to enter the sharing mode and switch the N programming blocks in the first state to the second state. This is beneficial for creators to select the programming blocks they want to share, and ensures that the programming blocks will not be edited or modified during the selection process, thereby improving the accuracy of the selection operation.

[0265] In some embodiments, in read-only mode, to allow the creator to view the N programming blocks in the second state, the creator is also allowed to perform zoom or pan operations to select M programming blocks. After step 420, the method may optionally include steps 431 and / or 432:

[0266] Step 431: Use the scaling field to set the scaling operation for the N programming blocks in the second state; wherein, the scaling operation is used to indicate how to view the N programming blocks in the second state by scaling.

[0267] Step 432: Use the move field to set the translation operation of the N programming blocks in the second state; wherein, the move operation is used to indicate how to view the N programming blocks in the second state by moving them.

[0268] The zoom field is used to configure the zoom operation for a trigger group or programming area, allowing the creator to zoom the entire trigger group or programming area using the scroll wheel to view the N programming blocks in the second state by zooming. Optionally, the computer device uses the zoom field to set the zoom operation for the N programming blocks in the second state; wherein the zoom operation is used to indicate how to view the N programming blocks in the second state by zooming.

[0269] The move field is used to configure the move operation of a trigger group or programming area, allowing the creator to move the entire trigger group or programming area by dragging or scrolling to view the N programming blocks in the second state by moving them. Optionally, the computer device uses the move field to set the translation operation of the N programming blocks in the second state; wherein the move operation is used to indicate how to view the N programming blocks in the second state by moving them.

[0270] In this embodiment, the computer device also utilizes the configuration of zoom and move fields to maintain good viewing and browsing functions even in read-only mode, allowing creators to flexibly adjust the canvas perspective and scale, making it easier for creators to view the full picture of the programming blocks and quickly select the programming blocks they want to share.

[0271] As an example, the configuration code for read-only fields, zoom fields, and move fields can be approached as follows: Step 1, hide the toolbox to prevent accidental addition of blocks in read-only mode; Step 2, enable read-only mode, making all blocks uneditable; Step 3, allow users to zoom the view using the scroll wheel; Step 4, set the initial zoom ratio to 1.0; Step 5, set the maximum zoom ratio, allowing users to zoom the view up to 3 times; Step 6, set the minimum zoom ratio, allowing users to shrink the view to 0.3 times; Step 7, set the zoom speed multiplier, adjusting proportionally with each zoom; Step 8, enable scrollbars for easy panning of the entire canvas; Step 9, allow users to drag the canvas to pan the view; Step 10, disable scroll wheel panning to avoid conflict with the zoom function.

[0272] Blur effect:

[0273] In some embodiments, when N programming blocks in the first state switch to the second state, or when M programming blocks are selected to return to the first state, the computer device needs to perform a display based on the different display styles of the first and second states. Since the programming blocks are rendered using Scalable Vector Graphics (SVG), this can be controlled by adjusting the Cascading Style Sheets (CSS) styles of the programming blocks. Optionally, after step 420, step 440 is also included:

[0274] Step 440: Adjust the cascading style sheet styles of N programming blocks to control the N programming blocks in the first state to switch to the second state, and control the M programming blocks to return to the first state.

[0275] Optionally, the computer device adjusts the Cascading Style Sheet (CSS) styles of the N programming blocks. Specifically, it adjusts at least one property of the CSS styles of the N programming blocks to control the N programming blocks in the first state to switch to the second state, and to control the M programming blocks to return to the first state.

[0276] In this embodiment, by adjusting the Cascading Style Sheet style, the state switching of the programming blocks can be visually achieved, prompting the creator whether the programming blocks have been selected, thereby improving the efficiency and accuracy of the selection operation.

[0277] In some embodiments, at least one property in a Cascading Style Sheet style includes at least one of the following: an opacity property for controlling transparency, a filter property for controlling filter effects, a stroke property for controlling dashed stroke effects, and a stroke-dasharray property.

[0278] Specifically, step 440 is implemented as at least one of steps 440A, 440B, and 440C, and one or more of them can be selected for use or combined according to actual technical needs:

[0279] Step 440A: Decrease the transparency of the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; increase the transparency of the M selected programming blocks among the N programming blocks, and decrease the transparency of the unselected programming blocks among the N programming blocks to control the M programming blocks to return to the first state.

[0280] Optionally, the computer device can control the N programming blocks in the first state to switch to the second state by modifying the transparency property in the Cascading Style Sheet style, thereby reducing the transparency of the N programming blocks in the first state; increasing the transparency of the M programming blocks selected from the N programming blocks, and decreasing the transparency of the unselected programming blocks from the N programming blocks, thereby controlling the M programming blocks to return to the first state.

[0281] The transparency attribute has a value range of 0 to 1. 0 represents completely transparent, and 1 represents completely opaque. (See reference) Figure 8 The programming blocks are in the normal state. (Reference) Figure 9 The transparency of a programming block is reduced. When a programming block is selected, its transparency is increased.

[0282] Step 440B: Apply a grayscale filter to the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; deselect the grayscale filter for the M programming blocks selected from the N programming blocks, and apply the grayscale filter to the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state.

[0283] Optionally, the computer device modifies the filter property in the Cascading Style Sheet style to apply a grayscale filter to the N programming blocks in the first state, thereby controlling the N programming blocks in the first state to switch to the second state; it also deactivates the grayscale filter on the M programming blocks selected from the N programming blocks and applies the grayscale filter to the unselected programming blocks from the N programming blocks, thereby controlling the M programming blocks to return to the first state.

[0284] The grayscale property in the filter settings is used to adjust the grayscale level. The grayscale value ranges from 0 to 100%. 0 indicates no grayscale and displays the original color; 100% indicates the original color is converted to black and white. (Reference) Figure 8 The programming blocks are in normal condition. (Reference) Figure 10 The programming blocks have added a grayscale filter. And, reference... Figure 11 The programming blocks reduce transparency and add a grayscale filter. When a programming block is selected, the grayscale filter for that block is deselected.

[0285] Step 440C: Add dashed outlines to the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; remove the dashed outlines from the M programming blocks selected from the N programming blocks, and add dashed outlines to the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state.

[0286] Optionally, the computer device can modify the stroke and dashed stroke properties in the Cascading Style Sheet (CSS) style to add dashed strokes to the N programming blocks in the first state, thereby controlling the N programming blocks in the first state to switch to the second state; and remove the dashed strokes from the M selected programming blocks among the N programming blocks, while adding dashed strokes to the unselected programming blocks among the N programming blocks, thereby controlling the M programming blocks to return to the first state. (Reference) Figure 8 The programming blocks are in normal condition. (Reference) Figure 12 The programming blocks now have a dashed outline. When a programming block is selected, the dashed outline is removed.

[0287] This embodiment provides multiple ways to adjust the style of the cascading style sheet, which can be applied to the display needs of multiple scenarios, improve the diversity and flexibility of the display, and also facilitate the visual switching of the programming block's state, prompting the creator whether the programming block has been selected, thereby improving the execution efficiency and accuracy of the selection operation.

[0288] As examples, the configuration code for reducing the transparency of unselected programming blocks can be approached as follows: Set the transparency to 50%, making the block semi-transparent. The configuration code for applying a grayscale filter to unselected programming blocks can be approached as follows: Apply a 50% grayscale filter to desaturate the block. The configuration code for applying a grayscale filter and reducing the transparency of unselected programming blocks can be approached as follows: Step 1, reduce the transparency to 50%, making the block semi-transparent; Step 2, apply a 50% grayscale filter to desaturate the block. The configuration code for adding a dashed stroke to unselected programming blocks can be approached as follows: Step 1, reduce the transparency to 50%, making the block semi-transparent; Step 2, apply a 50% grayscale filter to desaturate the block; Step 3, set the stroke color to green; Step 4, set the dashed line style to 4px solid line with 2px blank space.

[0289] In some embodiments, to ensure that N programming blocks in the first state switch to the second state after entering the sharing mode, and to ensure that M programming blocks are restored to the first state after the creator selects them, steps 451 and 452 are included after step 440:

[0290] Step 451: After controlling the N programming blocks in the first state to switch to the second state, add an unselected style name to each of the N programming blocks in the second state;

[0291] Step 452: After selecting M programming blocks from the N programming blocks in the second state, remove the unselected style names of the M programming blocks; and add the M programming blocks to the share list of the block combination.

[0292] The "blockly-block-unselected" style name indicates that the current programming block is not selected. Alternatively, it can be used to indicate at least one of the following: reducing the opacity of the current programming block, adding a grayscale filter, or adding a dashed stroke. The "blockly-block-unselected" style name is removed when the current programming block is selected.

[0293] Optionally, after the computer device switches the N programming blocks in the first state to the second state, it adds an unselected style name to each of the N programming blocks in the second state; after selecting M programming blocks from the N programming blocks in the second state, it removes the unselected style names from the M programming blocks; and it adds the M programming blocks to the block combination's share list for subsequent management. For example, before generating the file content corresponding to the M programming blocks, it iterates through all the programming blocks in the share list to avoid omissions.

[0294] In this embodiment, by adding or removing unselected style names from the programming blocks, it is possible to accurately indicate whether the programming blocks are selected, thereby improving the efficiency and accuracy of the selection operation, avoiding omissions, and improving data processing efficiency.

[0295] File content conversion:

[0296] In some embodiments, when the creator chooses to share the block combination file by copying it, the selected M programming blocks need to be converted into corresponding file content. For example, converting the M programming blocks in the first state into file content is implemented as steps 510, 520, and 530:

[0297] Step 510: Extract the block information of each of the M programming blocks;

[0298] Step 520: Convert the block information of each of the M programming blocks into structured data;

[0299] Step 530: Encrypt the structured data to obtain the file content corresponding to M programming blocks; wherein, the block information includes at least one of the following: block type, block identifier, block parameters, block position, and connection relationship with other blocks.

[0300] Block information is used to uniquely identify programming blocks. Optionally, block information includes at least one of the following: block type, block identifier, block parameters, block position, and connection relationships with other blocks. Block type includes at least one of the following: event, operation, variable, function, condition, judgment, loop, effect, sound effect, and animation. Block parameters are specific attribute values, including at least one of the following: numeric parameters, text parameters, and Boolean parameters. Block identifier can be at least one of the following: letters, numbers, and codes. Block position includes at least one of the following: row number, column number, and coordinates. Connection relationships with other blocks include at least one of the following: sequential connection, nested connection, and loop connection.

[0301] Structured data is data with a fixed format and fields, typically presented in the form of tables, tree structures, or relational models. In this embodiment, the structured data is JSON data represented in text form. Encryption is a means to ensure the security of data transmission. The encryption method can be a symmetric encryption algorithm or an asymmetric encryption algorithm, selected according to actual technical needs. For example, the symmetric encryption algorithm can be the Advanced Encryption Standard (AES), and the asymmetric encryption algorithm can be a public-key encryption algorithm (RSA algorithm). It should also be noted that this encryption step is optional and its execution is chosen based on actual technical requirements.

[0302] Optionally, the computer device extracts the block information of each of the M programming blocks; converts the block information of each of the M programming blocks into structured data; encrypts the structured data to obtain the file content corresponding to the M programming blocks, where the file content can be encrypted text.

[0303] This embodiment provides a method for converting selected M programming blocks into corresponding file content. When the creator chooses to share the block combination file, the corresponding file content can be sent to the target application, enabling cross-platform sharing and saving of these programming blocks, thus improving the data processing and sharing efficiency of these programming blocks. Furthermore, encryption ensures data privacy and security.

[0304] For example, step 520 is specifically implemented as step 522:

[0305] Step 522: Integrate the block information of each of the M programming blocks into a structured data structure to obtain structured data; wherein, the structured data structure includes at least a connection field and an input field. The connection field is used to store the block identifiers of the programming blocks that are sequentially connected in the M programming blocks, and the input field is used to store the block identifiers corresponding to the programming blocks that contain at least one child programming block in the M programming blocks.

[0306] A structured data structure must include at least a `next` field and an `inputs` field. The `next` field is used to point to the identifier of the next sequentially connected programming block. The `inputs` field records the identifiers of the child programming blocks contained within a programming block that has at least one child programming block. The programming block type for having at least one child programming block can be: loop, conditional, or judgmental.

[0307] Optionally, the computer device integrates the block information of each of the M programming blocks into a structured data structure to obtain structured data; wherein, the structured data structure includes at least a connection field and an input field, the connection field is used to store the block identifiers of the programming blocks that are sequentially connected in the M programming blocks, and the input field is used to store the block identifiers corresponding to the programming blocks that contain at least one child programming block in the M programming blocks.

[0308] In this embodiment, a method is provided to convert the selected M programming blocks into corresponding structured data, enabling the computer device to subsequently restore and reconstruct the programming blocks based on the structured data, thereby improving the accuracy of sharing and importing.

[0309] Generating shareable links:

[0310] In some embodiments, when the creator chooses to share by copying the block combination link, after converting the M programming blocks in the first state into file content, the file content needs to be uploaded to the server and the corresponding sharing link needs to be returned. For example, generating a sharing link for the M programming blocks in the first state is implemented as steps 540 and 550:

[0311] Step 540: Upload the file contents corresponding to the M programming blocks to the server;

[0312] Step 550: Obtain the sharing links of the M programming blocks returned by the server; wherein, the sharing link consists of a protocol, domain name, port, sharing identifier and encryption identifier, and the encryption identifier points to the file content on the server.

[0313] A shared link is a URL (Uniform Resource Locator) representing the web address of M programming blocks. It consists of a protocol (http), domain name (.com), port, share identifier (share), and unique identifier (id = uniqueIdentifier). The unique identifier points to the file content on the server. The unique identifier can be either a file identifier or a resource path for that file content on the server.

[0314] Optionally, the computer device uploads the file content corresponding to the M programming blocks to the server; and obtains the sharing links of the M programming blocks returned by the server. In one example, the sharing link can be represented as: "https: / / code.xxx.com / share?id=uniqueIdentifier".

[0315] In this embodiment, a method is provided to convert the selected M programming blocks into corresponding sharing links. When the creator chooses to share by copying the block combination link, the corresponding sharing link can be sent to the first account, enabling these programming blocks to be shared and improving the data processing efficiency and sharing efficiency of these programming blocks.

[0316] As an example, the steps for converting, encrypting, and sharing JSON data are as follows:

[0317] 1. Traverse the selected block combination: Traverse each programming block in the selected block combination in a tree structure and extract the block information of each programming block. The block information includes at least one of the following: block type, block identifier, block parameters, block position, and connection relationship with other blocks.

[0318] 2. Extract Key Attributes and Connections: For each programming block, extract the following key attributes and connections: Block Identifier: A unique identifier used to distinguish each programming block. Block Type: The function type, such as event, operation, etc. Block Parameters: Specific attribute values, such as event type, operation target, etc. Block Position: Coordinates in the programming area, facilitating layout restoration during import. Connections: The connections between each programming block and other blocks, including following blocks, child blocks, etc.

[0319] 3. Constructing JSON Data: Integrate the block information of each programming block into a JSON data structure to organize the information, making it easy to read, store, and transmit. Specifically, the JSON data includes at least a `next` field and an `inputs` field, used to record the order, connection, and nesting relationships between programming blocks, respectively. The `next` field points to the block identifier of the next sequentially connected programming block. The `inputs` field, for programming blocks with at least one child programming block, records the block identifiers corresponding to the child programming blocks they contain. The block type of a programming block with at least one child programming block can be: loop, conditional, or judgmental.

[0320] refer to Figure 16 As shown in (1), the creator selects this block combination, and the corresponding JSON data is referenced. Figure 16 As shown in (2) of the JSON data, the connection field records the block identifier, for example, represented as: "id":"IQ*{me$$A!*AbF-vv=j / .", and the input field records the connection relationship between each programming block. (See reference) Figure 17 As shown in (1), the creator selects this block combination, and the corresponding JSON data is referenced. Figure 17As shown in (2) in the JSON data, the connection field records the block identifier, for example, represented as: "id":"ihXX4*7No-a*v=DcaY$f", and the input field records the connection relationship of each programming block.

[0321] 4. Encrypt JSON data to obtain the file content. To ensure the security of data transmission, depending on the actual technical requirements, a symmetric or asymmetric encryption algorithm, such as AES or RSA, is selected to encrypt the JSON data, thus obtaining the file content. In one example, the encrypted file content is shown below. Figure 18 As shown, the content of this file resembles gibberish and is used to ensure the privacy and security of JSON data, preventing tampering during data transmission.

[0322] 5-1. When the creator chooses to share by copying the block combination file, the file content is copied to the clipboard so that the file content can be pasted into the target application, such as at least one of instant messaging tools, chat applications, game applications, text editors, collaboration tools, note-taking software, email, and social platforms, to achieve flexible cross-platform sharing and saving.

[0323] 5-2. When a creator chooses to share by copying the block combination link, the file content is uploaded to the server. The server returns a unique sharing link, the encrypted identifier in the sharing link points to the file content on the server, and the sharing link is copied to the clipboard so that the sharing link can be shared with the first account.

[0324] Data parsing and restoration:

[0325] In some embodiments, a technical implementation of the quick import function is provided.

[0326] Upon receiving the file content or share link of Q programming blocks shared by other creators, data parsing and restoration must be performed to recover the code logic of the Q programming blocks and display them. For example, the method further includes steps 610 and 640, and / or, the method further includes steps 620, 630, and 640:

[0327] Step 610: Receive the file contents of the shared Q programming blocks;

[0328] Step 640: Parse the file contents of the Q programming blocks and restore the Q programming blocks;

[0329] Optionally, when other creators share the block combination file by copying it, the computer device receives the file contents of the shared Q programming blocks; parses the file contents of the Q programming blocks; and restores the Q programming blocks.

[0330] Step 620: Receive the sharing links for the Q programming blocks that are being shared;

[0331] Step 630: Obtain the file content corresponding to the sharing links of Q programming blocks from the server;

[0332] Step 640: Parse the file contents of the Q programming blocks and restore the Q programming blocks.

[0333] Optionally, when other creators share using the method of copying block combination links, the computer device receives the sharing links of the Q programming blocks; retrieves the file content corresponding to the sharing links of the Q programming blocks from the server, wherein the server's data retrieval interface is automatically requested to retrieve the corresponding file content based on the encrypted identifier in the sharing link; and parses the file content of the Q programming blocks to restore the Q programming blocks.

[0334] In this embodiment, a method is provided to perform data parsing and restoration after receiving the sharing links or file content of Q programming blocks. This method can accurately restore and display the Q programming blocks, improve the convenience and accuracy of sharing, and enhance the efficiency of human-computer interaction.

[0335] In some embodiments, step 640 is implemented as steps 642, 644, and 646:

[0336] Step 642: Decrypt the file contents of Q programming blocks to obtain structured data;

[0337] Step 644: Parse the structured data to obtain the block information of each of the Q programming blocks;

[0338] Step 646: Based on the block information of each of the Q programming blocks, restore the Q programming blocks.

[0339] Since the file content of the Q programming blocks is obtained by encrypting the structured data of the Q programming blocks, and the structured data is obtained by integrating the block information of each of the Q programming blocks into a structured data structure, the computer device needs to decrypt the file content of the Q programming blocks according to the decryption method corresponding to the encryption method to obtain the structured data; parse the structured data to obtain the block information of each of the Q programming blocks; and reconstruct the Q programming blocks based on the block information of each of the Q programming blocks.

[0340] In this embodiment, a method for parsing the file content of Q programming blocks is provided, which can restore the Q programming blocks based on the structured data corresponding to the Q programming blocks, thereby improving data processing efficiency.

[0341] In some embodiments, step 646 is specifically implemented as steps 6461, 6462, and 6463:

[0342] Step 6461: Based on the block type and block parameters in the block information of each of the Q programming blocks, generate Q programming block instances and set their corresponding attribute values.

[0343] Step 6462: Based on the block position in the block information of each of the Q programming blocks, determine the positions of the Q programming block instances respectively;

[0344] Step 6463: Based on the connection relationships between each of the Q programming blocks and other blocks in the block information of each programming block, connect the Q programming block instances to restore the Q programming blocks.

[0345] The process of restoring Q programming blocks includes: creating and laying out the programming block instances, restoring their positions, and restoring their connection relationships. Specifically, by parsing the block type and block parameters in the block information, corresponding programming block instances are generated and their corresponding attributes are set. By parsing the block positions, the programming block instances are placed in their appropriate positions. The connection relationships are reconstructed using connection fields and input fields, connecting the programming block instances together according to the connection relationships to ensure the integrity and accuracy of the entire code logic.

[0346] Optionally, the computer device generates Q programming block instances and sets corresponding attribute values ​​based on the block type and block parameters in the block information of each of the Q programming blocks; determines the positions of the Q programming block instances based on the block positions in the block information of each of the Q programming blocks; and connects the Q programming block instances based on the connection relationships between each of the Q programming blocks and other blocks in the block information of each of the Q programming blocks to restore the Q programming blocks.

[0347] This embodiment provides a specific method for restoring Q programming blocks based on the structured data corresponding to the Q programming blocks, which can improve data processing efficiency and achieve accurate restoration of the Q programming blocks.

[0348] As an example, the general steps for performing data parsing and restoration are as follows:

[0349] 1. Data Reception: When other creators share files by copying and pasting blocks, the file content is pasted into the import input box, and data decryption is performed. When other creators share links by copying and pasting blocks, the share link is pasted into the import input box, and the server's data retrieval interface is automatically requested. The corresponding file content is obtained through the encryption identifier in the share link, and data decryption is then performed.

[0350] 2. Data Decryption: The file content is decrypted using a preset decryption algorithm, such as AES or RSA. A pre-agreed key is used during decryption to ensure security and privacy. After decryption, the corresponding JSON data is obtained. This JSON data contains information about each programming block in the shared block assembly, including its type, attributes, position, and connections.

[0351] 3. Parsing and Restoration: Parse the JSON data layer by layer, and restore the shared block combination to the canvas step by step according to the block type, block position and connection relationship in the block information of the JSON data. Specifically, it includes: (1) Block Creation and Layout: Parse the block type and block parameters of each programming block, generate the corresponding programming block instance, and set its initial attribute value. (2) Position Restoration: According to the block position recorded in the JSON data, accurately place the programming block instance in the corresponding position on the canvas to maintain the creator's original logical layout. (3) Connection Relationship Restoration: Reconstruct the connection relationship using the next field and input field in the JSON data, connect the programming block instances according to the connection relationship, and ensure the integrity and accuracy of the corresponding code logic.

[0352] Integrity verification:

[0353] In some embodiments, after the Q programming blocks have been restored, the computer device may optionally perform an integrity check to ensure that each of the Q programming blocks has been correctly decrypted and restored, while also checking the integrity of the entire code logic. Optionally, the method further includes steps 652 and 654:

[0354] Step 652: Perform integrity verification on the Q restored programming blocks;

[0355] Step 654: If the integrity check fails, generate an import prompt text; wherein the import prompt text is used to indicate at least one of the following: import failure, prompting re-import, or prompting to check the integrity of the data source.

[0356] The integrity check includes verifying the information of each of the Q reconstructed programming blocks, as well as verifying the integrity and correctness of the code logic of the Q programming blocks. If any of the Q programming blocks are missing, or if there are errors in the code logic, the integrity check will fail.

[0357] Optionally, the computer device performs an integrity check on the restored Q programming blocks; if the integrity check is successful, the Q programming blocks are displayed; if the integrity check fails, an import prompt text is generated and displayed. The import prompt text is used to indicate at least one of the following: import failure, re-import, or checking the integrity of the data source.

[0358] In this embodiment, by performing integrity verification, the accuracy of the restored Q programming blocks can be improved, thereby improving the precision of the import operation and also improving data processing efficiency.

[0359] As an example, the configuration code for performing integrity checks can be referenced as follows: Step 1, decrypt the data; Step 2, parse the JSON data; Step 3, convert the data into building blocks, including: setting parameters and attributes; handling connection relationships; using the "next" and "inputs" fields to connect the building blocks according to logical relationships; and displaying "import successful" or "import failed".

[0360] As an example, refer to Figure 19 The sequence diagram, which involves: the creator on the sharing end, the client of the application supporting visual editing, the canvas, and the server, shows the overall steps of the quick sharing function:

[0361] 1. The creator on the sharing platform clicks "Quick Share"; continue to step 2;

[0362] 2. The canvas enters read-only mode; continue with step 3;

[0363] 3. The canvas renders all programming blocks in a blurred state; for example, a blurred state includes at least one of the following: reducing opacity, adding a grayscale filter, and adding a dashed stroke; continue looping and executing steps 4, 5, and 6 in sequence;

[0364] 4. Creators on the sharing platform select the block combinations they want to share one by one;

[0365] 5. The canvas will render the selected block combination in a normal state; for example, a normal state includes at least one of: restoring transparency, removing the grayscale filter, and removing the dashed stroke.

[0366] 6. The client saves these selected block combinations to the share list;

[0367] Once the creator on the sharing end has selected the block combination they want to share, proceed to step 7;

[0368] 7. The creator on the sharing platform clicks "Confirm Share"; proceed to step 8;

[0369] 8. The client iterates through the share list; continue executing step 9;

[0370] 9. The client converts the block combination into JSON data; proceed to step 10;

[0371] 10. The client uses AES / RSA to encrypt JSON data; proceed to step 11;

[0372] 11. The client generates encrypted ciphertext;

[0373] When the creator on the sharing end chooses to share by copying the block combination file, continue to step 12;

[0374] 12. The client copies the encrypted text to the clipboard so that the creator on the sharing end can send it;

[0375] When the creator on the sharing end chooses to share by copying the block combination link, continue with steps 13, 14, 15, and 16;

[0376] 13. The client uploads the encrypted ciphertext to the server;

[0377] 14. The server stores encrypted ciphertext and generates a unique identifier;

[0378] 15. The client receives the unique sharing link (URL) returned by the server;

[0379] 16. The client copies the share link to the clipboard so that the creator on the sharing end can send it.

[0380] As an example, see reference Figure 20 The sequence diagram, which involves: the creator at the receiving end, the client of the application supporting visual editing, the canvas, and the server, shows the overall steps of the quick import function:

[0381] 1. The creator on the receiving end clicks "Quick Import";

[0382] When the creator on the receiving end imports the file via file paste, proceed to step 2;

[0383] 2. The creator on the receiving end pastes the encrypted text; continue to step 6;

[0384] When the creator on the receiving end imports via a share link, continue with steps 3, 4, and 5;

[0385] 3. The creator on the receiving end pastes the sharing link;

[0386] 4. The client requests the encrypted ciphertext from the shared link from the server;

[0387] 5. The server returns encrypted ciphertext to the client; proceed to step 6;

[0388] 6. The client decrypts the encrypted ciphertext; proceed to step 7;

[0389] 7. The client receives JSON data; continue execution to step 8;

[0390] 8. The client parses the JSON data into modular blocks; proceed to step 9.

[0391] 9. The client displays the assembled blocks onto the canvas; proceed to step 10.

[0392] 10. The client performs an integrity check on the block combination.

[0393] In summary, the embodiments of this application, through the modular building block combination's quick sharing and quick import functions, reduce reliance on template libraries and repetitive operation steps, thereby achieving rapid sharing and import operations. The resulting technical effects include at least the following aspects:

[0394] (1) Modular sharing of block combinations: Creators can choose specific block combinations to perform sharing instead of the entire canvas or trigger group. This modular sharing supports the reuse of code logic of more granular programming blocks, making it easier for creators to reuse the functions of specific block combinations and improve human-computer interaction efficiency and data processing efficiency.

[0395] (2) Improved sharing efficiency: The quick sharing function allows for the instant generation of block-based file content or sharing links, which can be directly shared to user accounts without the need for complex saving and searching processes in the template library. Suitable for real-time collaboration, this feature reduces the complexity and time cost of sharing operations in team or cross-team projects, significantly improving sharing efficiency.

[0396] (3) Supports multiple sharing methods: By copying block combination files, copying block combination links and sharing with friends, it meets the sharing needs of multiple scenarios, allows for flexible selection of appropriate sharing methods, and has stronger compatibility.

[0397] (4) Controlled access: The block combination selected by the creator can be shared without saving or publishing to the template library. This avoids block combinations that are only used internally from being accessed and used by unauthorized creators in the community, ensuring the privacy and security of the data.

[0398] (5) Supports offline saving: The generated file content corresponding to the selected block combination can be saved as an offline file, which can still be stored and shared even without network, ensuring the availability of the block combination in the absence of network.

[0399] Figure 21This is a block diagram of a programming block sharing device provided in an exemplary embodiment of this application. The programming block sharing device 800 includes at least some of the following modules: a display module 820, a processing module 840, and a sharing module 860.

[0400] Display module 820 is used to display N programming blocks in the first state, wherein N is greater than 0;

[0401] The processing module 840 is used to control the N programming blocks in the first state to switch to the second state in response to entering the sharing mode, wherein the display styles of the first state and the second state are different;

[0402] The processing module 840 is configured to, in response to a selection operation, select M programming blocks from the N programming blocks in the second state, and control the M programming blocks to return to the first state, wherein M is greater than 0 and less than or equal to N;

[0403] The sharing module 860 is used to share the M programming blocks in the first state in response to a confirmed sharing operation.

[0404] In some embodiments, the sharing module 860 is used for:

[0405] In response to a trigger action on the confirm share control, display at least two share options;

[0406] In response to the selection of a target sharing option among the at least two sharing options, the M programming blocks in the first state are shared based on the sharing method indicated by the target sharing option.

[0407] In some embodiments, the target sharing option includes: copying the block assembly file;

[0408] The sharing module 860 is used for:

[0409] In response to the selection operation on the copied block combination file, the M programming blocks in the first state are converted into file content, the file content is copied to the clipboard, and the file content in the clipboard is pasted into the target application;

[0410] The content of the document includes at least one of text, numbers, letters, symbols, and codes.

[0411] In some embodiments, the target sharing option includes: copying the block combination link;

[0412] The sharing module 860 is used for:

[0413] In response to the selection operation of the copied block combination link, a share link of the M programming blocks in the first state is generated, and the share link is copied to the clipboard and the share link in the clipboard is sent to the first account;

[0414] The first account is an account or a friend's account within the set access range.

[0415] In some embodiments, the target sharing option includes: sharing to a second account;

[0416] The sharing module 860 is used for:

[0417] In response to the selection operation of sharing to the second account, the file content or sharing link corresponding to the M programming blocks in the first state is copied to the clipboard, and an account list is popped up, and the file content or sharing link in the clipboard is sent to the second account in the account list;

[0418] The second account is an account or a friend's account that is set within the access range.

[0419] In some embodiments, the processing module 840 is configured to:

[0420] In response to M click operations, one of the N programming blocks in the second state indicated by each of the M click operations is displayed to select the M programming blocks from the N programming blocks in the second state.

[0421] In some embodiments, the processing module 840 is configured to:

[0422] In response to at least one selection operation, the selection area of ​​each selection operation of the at least one selection operation is displayed, and the programming blocks in the second state located within the selection area are determined as the M programming blocks selected from the N programming blocks in the second state.

[0423] In some embodiments, the processing module 840 is configured to:

[0424] A list of options that displays information about the blocks;

[0425] In response to the selection operation of the target option in the option list of the block information, the M programming blocks that match the target option are determined as the M programming blocks selected from the N programming blocks in the second state;

[0426] The block information option list includes at least one of the following: block type option, block identifier option, block parameter option, block position option, and connection relationship option with other blocks.

[0427] In some embodiments, the processing module 840 is configured to:

[0428] Display candidate block combinations;

[0429] In response to the selection operation of the target block combination in the candidate block combination, the M programming blocks in the target block combination are determined as the M programming blocks selected from the N programming blocks in the second state;

[0430] The candidate block combination is obtained by performing a combination based on at least a portion of the N programming blocks in the second state.

[0431] In some embodiments, the processing module 840 is configured to:

[0432] In response to a trigger operation on the sharing control, the sharing mode is entered;

[0433] In response to entering the sharing mode, the N programming blocks in the first state are controlled to switch to the second state;

[0434] The first state allows viewing, selecting, adding, dragging, deleting, connecting, and modifying the N programming blocks, while the second state allows viewing and selecting but does not allow adding, dragging, deleting, connecting, or modifying the N programming blocks.

[0435] In some embodiments, the display module 820 is further configured to:

[0436] In response to entering the sharing mode, a sharing prompt text and a confirmation sharing control are displayed;

[0437] The sharing prompt text is used to prompt the selection of the M programming blocks, and the confirm sharing control is used to display the at least two sharing options after being triggered.

[0438] In some embodiments, the display module 820 is configured to:

[0439] Receive the file content or sharing link of Q programming blocks to be shared, where Q is greater than 0;

[0440] In response to an import operation on the file content or the sharing link of the Q programming blocks, the Q programming blocks are displayed.

[0441] In some embodiments, the display module 820 is configured to:

[0442] In response to a trigger action on the import control, display the import input box;

[0443] In response to pasting the file content or the sharing link of the Q programming blocks into the import input box, the Q programming blocks are displayed.

[0444] In some embodiments, the processing module 840 is configured to:

[0445] The N programming blocks in the first state are set to read-only mode using the read-only field;

[0446] The read-only mode is used to instruct the N programming blocks in the first state to switch to the second state.

[0447] In some embodiments, the processing module 840 is configured to:

[0448] The scaling operation of the N programming blocks in the second state is set using the scaling field;

[0449] The zoom operation is used to instruct the N programming blocks in the second state to be viewed by zooming.

[0450] or;

[0451] The translation operation of the N programming blocks in the second state is set using the move field;

[0452] The move operation is used to instruct the N programming blocks in the second state to be viewed by moving them.

[0453] In some embodiments, the processing module 840 is configured to:

[0454] Adjust the cascading style sheet style of the N programming blocks to control the N programming blocks in the first state to switch to the second state, and control the M programming blocks to return to the first state.

[0455] In some embodiments, the processing module 840 is configured to:

[0456] Decrease the transparency of the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; increase the transparency of the M programming blocks selected from the N programming blocks, and decrease the transparency of the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state.

[0457] or;

[0458] A grayscale filter is applied to the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; the grayscale filter is deactivated on the M programming blocks selected from the N programming blocks, and the grayscale filter is applied to the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state;

[0459] or;

[0460] Add dashed outlines to the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; remove the dashed outlines from the M programming blocks selected from the N programming blocks, and add dashed outlines to the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state.

[0461] In some embodiments, the processing module 840 is configured to:

[0462] After controlling the N programming blocks in the first state to switch to the second state, add an unselected style name to each of the N programming blocks in the second state;

[0463] After selecting the M programming blocks from the N programming blocks in the second state, remove the unselected style names of the M programming blocks; and add the M programming blocks to the share list of the block combination.

[0464] In some embodiments, the processing module 840 is configured to:

[0465] Extract the block information of each of the M programming blocks;

[0466] The information of each of the M programming blocks is converted into structured data;

[0467] Encrypt the structured data to obtain the file content corresponding to the M programming blocks;

[0468] The block information includes at least one of the following: block type, block identifier, block parameters, block location, and connection relationship with other blocks.

[0469] In some embodiments, the processing module 840 is configured to:

[0470] The block information of each of the M programming blocks is integrated into a structured data structure to obtain the structured data;

[0471] The structured data structure includes at least a connection field and an input field. The connection field is used to store the block identifiers of the sequentially connected programming blocks among the M programming blocks. The input field is used to store the block identifiers corresponding to the programming blocks that contain at least one sub-programming block among the M programming blocks.

[0472] In some embodiments, the processing module 840 is configured to:

[0473] Upload the file contents corresponding to the M programming blocks to the server;

[0474] Obtain the sharing links for the M programming blocks returned by the server;

[0475] The sharing link consists of a protocol, domain name, port, sharing identifier, and encryption identifier, wherein the encryption identifier points to the file content in the server.

[0476] In some embodiments, the processing module 840 is configured to:

[0477] Receive the file contents of the shared Q programming blocks;

[0478] Parse the file contents of the Q programming blocks and reconstruct the Q programming blocks;

[0479] or;

[0480] Receive the sharing link of the Q programming blocks to be shared;

[0481] Obtain the file content corresponding to the share link of the Q programming blocks from the server;

[0482] Parse the file contents of the Q programming blocks and restore the Q programming blocks.

[0483] In some embodiments, the processing module 840 is configured to:

[0484] Decrypt the file contents of the Q programming blocks to obtain structured data;

[0485] Parse the structured data to obtain the block information of each of the Q programming blocks;

[0486] Based on the block information of each of the Q programming blocks, the Q programming blocks are reconstructed.

[0487] In some embodiments, the processing module 840 is configured to:

[0488] Based on the block type and block parameters in the block information of each of the Q programming blocks, generate Q programming block instances and set their corresponding attribute values;

[0489] Based on the block position in the block information of each of the Q programming blocks, determine the positions of the Q programming block instances respectively;

[0490] Based on the connection relationships between each of the Q programming blocks and other blocks in the block information, the Q programming block instances are connected to restore the Q programming blocks.

[0491] In some embodiments, the processing module 840 is configured to:

[0492] Perform integrity checks on the Q programming blocks obtained from the restoration;

[0493] If the integrity check fails, an import prompt text will be generated.

[0494] The import prompt text is used to indicate at least one of the following: import failure, re-import, or checking the integrity of the data source.

[0495] It should be noted that the specific limitations of the embodiments of the sharing device 800 for one or more programming blocks provided in the above embodiments can be found in the specific limitations of the embodiments of the sharing method for programming blocks described above, and will not be repeated here. Each module of the above device can be implemented entirely or partially by software, hardware, or a combination thereof. Each module can be embedded in the processor of the computer device in hardware form or independent of the processor, or it can be stored in the memory of the computer device in software form, so that the processor can call and execute the operation corresponding to each module.

[0496] This application also provides a computer device, which includes: a processor and a memory, wherein the memory stores a computer program; the processor is used to execute the computer program in the memory to implement the sharing method of programming blocks provided in the above method embodiments.

[0497] Figure 22 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application.

[0498] Computer device 1000 may be a portable mobile terminal, such as a smartphone, tablet, MP3 player (Moving Picture Experts Group Audio Layer III), or MP4 player (Moving Picture Experts Group Audio Layer IV). Computer device 1000 may also be referred to as user equipment, portable terminal, or other names.

[0499] Typically, computer device 1000 includes a processor 1001 and a memory 1002.

[0500] Processor 1001 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0501] The memory 1002 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 are used to store at least one instruction, which is executed by the processor 1001 to implement the sharing method of programming blocks provided in the various method embodiments of this application.

[0502] In some embodiments, the computer device 1000 may also optionally include: a peripheral device interface 1003 and at least one peripheral device. Specifically, the peripheral device includes at least one of: a radio frequency circuit 1004, a touch display screen 1005, a camera assembly 1006, an audio circuit 1007, and a power supply 1008.

[0503] Peripheral device interface 1003 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1001 and memory 1002. In some embodiments, processor 1001, memory 1002 and peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1001, memory 1002 and peripheral device interface 1003 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0504] The radio frequency (RF) circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1004 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1004 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1004 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0505] The touch display screen 1005 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. The touch display screen 1005 also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to the processor 1001 for processing. The touch display screen 1005 is used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one touch display screen 1005, located on the front panel of the computer device 1000; in other embodiments, there may be at least two touch display screens, respectively located on different surfaces of the computer device 1000 or in a folded design; in some embodiments, the touch display screen 1005 may be a flexible display screen, located on a curved or folded surface of the computer device 1000. Furthermore, the touch display screen 1005 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The touch display screen 1005 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).

[0506] The camera assembly 1006 is used to capture images or videos. Optionally, the camera assembly 1006 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is used for video calls or selfies, and the rear-facing camera is used for taking photos or videos. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, and a wide-angle camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, and panoramic shooting and VR (Virtual Reality) shooting by fusion of the main camera and the wide-angle camera. In some embodiments, the camera assembly 1006 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash is a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0507] Audio circuit 1007 provides an audio interface between the user and computer device 1000. Audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to processor 1001 for processing, or input to radio frequency circuit 1004 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different location within computer device 1000. The microphone may also be an array microphone or an omnidirectional microphone. The speaker converts electrical signals from processor 1001 or radio frequency circuit 1004 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, audio circuit 1007 may also include a headphone jack.

[0508] Power supply 1008 is used to supply power to the various components in computer device 1000. Power supply 1008 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1008 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0509] In some embodiments, the computer device 1000 further includes one or more sensors 1009. The one or more sensors 1009 include, but are not limited to, an accelerometer 1010, a gyroscope 1011, a pressure sensor 1012, an optical sensor 1013, and a proximity sensor 1014.

[0510] Accelerometer 1010 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by computer device 1000. For example, accelerometer 1010 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1001 can control touchscreen 1005 to display the user interface in landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1010. Accelerometer 1010 can also be used for games or for acquiring user motion data.

[0511] The gyroscope sensor 1011 can detect the orientation and rotation angle of the computer device 1000. The gyroscope sensor 1011 can work in conjunction with the accelerometer sensor 1010 to acquire the user's 3D movements on the computer device 1000. Based on the data acquired by the gyroscope sensor 1011, the processor 1001 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0512] The pressure sensor 1012 can be disposed on the side bezel of the computer device 1000 and / or on the lower layer of the touch display screen 1005. When the pressure sensor 1012 is disposed on the side bezel of the computer device 1000, it can detect the user's grip signal on the computer device 1000 and perform left / right hand recognition or rapid operation based on the grip signal. When the pressure sensor 1012 is disposed on the lower layer of the touch display screen 1005, it can control operable controls on the UI interface based on the user's pressure operation on the touch display screen 1005. Operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0513] An optical sensor 1013 is used to collect ambient light intensity. In one embodiment, the processor 1001 can control the display brightness of the touch screen 1005 based on the ambient light intensity collected by the optical sensor 1013. Specifically, when the ambient light intensity is high, the display brightness of the touch screen 1005 is increased; when the ambient light intensity is low, the display brightness of the touch screen 1005 is decreased. In another embodiment, the processor 1001 can also dynamically adjust the shooting parameters of the camera assembly 1006 based on the ambient light intensity collected by the optical sensor 1013.

[0514] The proximity sensor 1014, also known as a distance sensor, is typically located on the front of the computer device 1000. The proximity sensor 1014 is used to detect the distance between the user and the front of the computer device 1000. In one embodiment, when the proximity sensor 1014 detects that the distance between the user and the front of the computer device 1000 is gradually decreasing, the processor 1001 controls the touchscreen display 1005 to switch from a screen-on state to a screen-off state; when the proximity sensor 1014 detects that the distance between the user and the front of the computer device 1000 is gradually increasing, the processor 1001 controls the touchscreen display 1005 to switch from a screen-off state to a screen-on state.

[0515] Those skilled in the art will understand that Figure 22 The structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0516] In an exemplary embodiment, this application also provides a chip, which includes programmable logic circuits and / or program instructions, and when the chip is run on a computer device, it is used to implement the sharing method of programming blocks provided in the above method embodiments.

[0517] This application also provides a computer-readable storage medium storing a computer program, which is loaded and executed by a processor to implement the sharing method of programming blocks provided in the above method embodiments.

[0518] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the processor of the computer device to load and execute the programming block sharing method provided in the above-described method embodiments.

[0519] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0520] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0521] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0522] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for sharing programming blocks, characterized in that, The method includes: Display N programming blocks in the first state, where N is greater than 0; In response to entering the sharing mode, the N programming blocks in the first state are switched to the second state. The display styles of the first state and the second state are different. The first state allows viewing, selecting, adding, dragging, deleting, connecting and modifying programming blocks. The second state allows viewing and selecting, but does not allow adding, dragging, deleting, connecting and modifying programming blocks. In response to the selection operation, M programming blocks are selected from the N programming blocks in the second state, and the M programming blocks are controlled to return to the first state, wherein M is greater than 0 and less than or equal to N; In response to a triggering operation of the confirm share control, at least two share options are displayed; the target share option among the at least two share options includes: copying the block assembly file; In response to the selection operation of the copied block combination file, the M programming blocks in the first state are converted into file content, and the file content is copied to the clipboard and pasted into the target application; the file content includes at least one of text, numbers, letters, symbols, and codes.

2. The method according to claim 1, characterized in that, The target sharing option among the at least two sharing options also includes: copying the block combination link; The method further includes: In response to the selection operation of the copied block combination link, a share link of the M programming blocks in the first state is generated, and the share link is copied to the clipboard and the share link in the clipboard is sent to the first account; The first account is an account or a friend's account within the set access range.

3. The method according to claim 1, characterized in that, The target sharing option among the at least two sharing options also includes: sharing to a second account; The method further includes: In response to the selection operation of sharing to the second account, the file content or sharing link corresponding to the M programming blocks in the first state is copied to the clipboard, and an account list is popped up, and the file content or sharing link in the clipboard is sent to the second account in the account list; The second account is an account or a friend's account that is set within the access range.

4. The method according to any one of claims 1 to 3, characterized in that, The step of selecting M programming blocks from the N programming blocks in the second state in response to the selection operation includes: In response to M click operations, one of the N programming blocks in the second state indicated by each of the M click operations is displayed to select the M programming blocks from the N programming blocks in the second state.

5. The method according to any one of claims 1 to 3, characterized in that, The step of selecting M programming blocks from the N programming blocks in the second state in response to the selection operation includes: In response to at least one selection operation, the selection area of ​​each selection operation of the at least one selection operation is displayed, and the programming blocks in the second state located within the selection area are determined as the M programming blocks selected from the N programming blocks in the second state.

6. The method according to any one of claims 1 to 3, characterized in that, The step of selecting M programming blocks from the N programming blocks in the second state in response to the selection operation includes: A list of options that displays information about the blocks; In response to the selection operation of the target option in the option list of the block information, the M programming blocks that match the target option are determined as the M programming blocks selected from the N programming blocks in the second state; The block information option list includes at least one of the following: block type option, block identifier option, block parameter option, block position option, and connection relationship option with other blocks.

7. The method according to any one of claims 1 to 3, characterized in that, The step of selecting M programming blocks from the N programming blocks in the second state in response to the selection operation includes: Display candidate block combinations; In response to the selection operation of the target block combination in the candidate block combination, the M programming blocks in the target block combination are determined as the M programming blocks selected from the N programming blocks in the second state; The candidate block combination is obtained by performing a combination based on at least a portion of the N programming blocks in the second state.

8. The method according to claim 1, characterized in that, The step of controlling the N programming blocks in the first state to switch to the second state in response to entering the sharing mode includes: In response to a trigger operation on the sharing control, the sharing mode is entered; In response to entering the sharing mode, the N programming blocks in the first state are controlled to switch to the second state.

9. The method according to claim 8, characterized in that, The method further includes: In response to entering the sharing mode, a sharing prompt text and a confirmation sharing control are displayed; The sharing prompt text is used to prompt the selection of the M programming blocks, and the confirm sharing control is used to display at least two sharing options after being triggered.

10. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Receive the file content or sharing link of Q programming blocks to be shared, where Q is greater than 0; In response to an import operation on the file content or the sharing link of the Q programming blocks, the Q programming blocks are displayed.

11. The method according to claim 10, characterized in that, The step of displaying the Q programming blocks in response to an import operation on the file content or the sharing link of the Q programming blocks includes: In response to a trigger action on the import control, display the import input box; In response to pasting the file content or the sharing link of the Q programming blocks into the import input box, the Q programming blocks are displayed.

12. The method according to claim 1, characterized in that, The method further includes at least one of the following: The N programming blocks in the first state are set to read-only mode using the read-only field; The read-only mode is used to instruct the N programming blocks in the first state to switch to the second state; The scaling operation of the N programming blocks in the second state is set using the scaling field; The zoom operation is used to instruct the N programming blocks in the second state to be viewed by zooming. The translation operation of the N programming blocks in the second state is set using the move field; The move operation is used to instruct the N programming blocks in the second state to be viewed by moving them.

13. The method according to claim 1, characterized in that, The step of converting the M programming blocks in the first state into file content includes: Extract the block information of each of the M programming blocks; The information of each of the M programming blocks is converted into structured data; Encrypt the structured data to obtain the file content corresponding to the M programming blocks; The block information includes at least one of the following: block type, block identifier, block parameters, block location, and connection relationship with other blocks.

14. The method according to claim 2, characterized in that, The process of generating share links for the M programming blocks in the first state includes: Upload the file contents corresponding to the M programming blocks to the server; Obtain the sharing links for the M programming blocks returned by the server; The sharing link consists of a protocol, domain name, port, sharing identifier, and encryption identifier, wherein the encryption identifier points to the file content in the server.

15. The method according to claim 1, characterized in that, The method further includes: Adjust the cascading style sheet style of the N programming blocks to control the N programming blocks in the first state to switch to the second state, and control the M programming blocks to return to the first state.

16. The method according to claim 15, characterized in that, Adjusting the Cascading Style Sheet styles of the N programming blocks to control the N programming blocks in the first state to switch to the second state, and controlling the M programming blocks to return to the first state, includes at least one of the following: Decrease the transparency of the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; increase the transparency of the M programming blocks selected from the N programming blocks, and decrease the transparency of the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state. or; A grayscale filter is applied to the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; the grayscale filter is deactivated on the M programming blocks selected from the N programming blocks, and the grayscale filter is applied to the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state; or; Add dashed outlines to the N programming blocks in the first state to control the N programming blocks in the first state to switch to the second state; remove the dashed outlines from the M programming blocks selected from the N programming blocks, and add dashed outlines to the unselected programming blocks from the N programming blocks to control the M programming blocks to return to the first state.

17. The method according to claim 1, characterized in that, The method further includes: After controlling the N programming blocks in the first state to switch to the second state, add an unselected style name to each of the N programming blocks in the second state; After selecting the M programming blocks from the N programming blocks in the second state, remove the unselected style names of the M programming blocks; and add the M programming blocks to the share list of the block combination.

18. The method according to claim 13, characterized in that, The step of converting the block information of each of the M programming blocks into structured data includes: The block information of each of the M programming blocks is integrated into a structured data structure to obtain the structured data; The structured data structure includes at least a connection field and an input field. The connection field is used to store the block identifiers of the sequentially connected programming blocks among the M programming blocks. The input field is used to store the block identifiers corresponding to the programming blocks that contain at least one sub-programming block among the M programming blocks.

19. The method according to claim 1, characterized in that, The method further includes: Receive the file contents of the shared Q programming blocks; Parse the file contents of the Q programming blocks and reconstruct the Q programming blocks; or; Receive the sharing link of the Q programming blocks to be shared; Retrieve the file content corresponding to the share link of the Q programming blocks from the server; Parse the file contents of the Q programming blocks and restore the Q programming blocks.

20. The method according to claim 19, characterized in that, The process of parsing the file content of the Q programming blocks and restoring the Q programming blocks includes: Decrypt the file contents of the Q programming blocks to obtain structured data; Parse the structured data to obtain the block information of each of the Q programming blocks; Based on the block information of each of the Q programming blocks, the Q programming blocks are reconstructed.

21. The method according to claim 20, characterized in that, The process of restoring the Q programming blocks based on the block information of each of the Q programming blocks includes: Based on the block type and block parameters in the block information of each of the Q programming blocks, generate Q programming block instances and set their corresponding attribute values; Based on the block position in the block information of each of the Q programming blocks, determine the positions of the Q programming block instances respectively; Based on the connection relationships between each of the Q programming blocks and other blocks in the block information, the Q programming block instances are connected to restore the Q programming blocks.

22. The method according to any one of claims 19 to 21, characterized in that, The method further includes: Perform integrity checks on the Q programming blocks obtained from the restoration; If the integrity check fails, an import prompt text will be generated. The import prompt text is used to indicate at least one of the following: import failure, re-import, or checking the integrity of the data source.

23. A sharing device for programming blocks, characterized in that, The device includes: The display module is used to display N programming blocks in the first state, where N is greater than 0; The processing module is used to control the N programming blocks in the first state to switch to the second state in response to entering the sharing mode. The display styles of the first state and the second state are different. The first state allows viewing, selecting, adding, dragging, deleting, connecting and modifying programming blocks. The second state allows viewing and selecting, but does not allow adding, dragging, deleting, connecting and modifying programming blocks. The processing module is configured to, in response to a selection operation, select M programming blocks from the N programming blocks in the second state, and control the M programming blocks to return to the first state, wherein M is greater than 0 and less than or equal to N; A sharing module is configured to display at least two sharing options in response to a trigger operation of a confirmation sharing control; the target sharing option among the at least two sharing options includes: copying a block combination file; in response to a selection operation of copying the block combination file, converting the M programming blocks in the first state into file content, and copying the file content to the clipboard, and pasting the file content in the clipboard into a target application; the file content includes at least one of text, numbers, letters, symbols, and codes.

24. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the sharing method of programming blocks as described in any one of claims 1 to 22.

25. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is loaded and executed by a processor to implement the sharing method of programming blocks as described in any one of claims 1 to 22.

26. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, from which a processor retrieves the computer instructions, causing the processor to load and execute them to implement the sharing method of programming blocks as described in any one of claims 1 to 22.

Citation Information

Patent Citations

  • Document block sharing method, device and system and storage medium

    CN116820635A

  • Visual programming operation method and device, equipment, medium and program product

    CN118838586A