Spacecraft general assembly process template generation method and device

By using the Blockly graphical programming interface and code block technology, the efficient generation and visual debugging of spacecraft assembly process templates have been achieved, solving the problems of high difficulty in template compilation and complex debugging in existing technologies, and improving the efficiency of template design and reuse.

CN121479928APending Publication Date: 2026-02-06BEIJING INST OF SPACECRAFT ENVIRONMENT ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511541726.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing spacecraft assembly process templates are difficult to compile, prone to logical errors, and difficult to debug. Process engineers cannot quickly build or modify templates, and the templates cannot intuitively display complex logic, resulting in low efficiency in process template design and debugging.

Method used

Using the Blockly graphical programming interface, spacecraft assembly process elements are hierarchically decomposed, encapsulated into process structures, and filled functions are defined. Multiple types of code blocks are used to generate spacecraft assembly process templates. Based on the block identifiers, displayable debugging is performed, realizing the modular encapsulation of template functions.

Benefits of technology

It significantly reduces the code design capabilities required for editing and debugging template functions, improves the design and reuse efficiency of process templates, enhances the visualization performance of template logic, and simplifies the template design process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121479928A_ABST
    Figure CN121479928A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of spacecraft assembly, and provides a spacecraft assembly process template generation method and device. The method comprises the following steps: carrying out hierarchical disassembly based on spacecraft assembly process elements, and packaging each hierarchical element into a corresponding process structure body; defining a filling function corresponding to each process structure body to serve as a template function; user parameter input is received, the spacecraft assembly process template is generated based on the configured multi-class code building blocks according to the template function, and in the process of generating the spacecraft assembly process template, displayable debugging is conducted on the spacecraft assembly process template based on the building block identification. According to the method, the generation process of the spacecraft assembly process template is optimized, and the reuse efficiency of the template is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of spacecraft assembly, and in particular to a spacecraft assembly process template generation method and device. BACKGROUND

[0002] Spacecraft assembly is the integration, assembly and testing of spacecraft product subsystems. In view of the problems of insufficient process preparation time caused by urgent development tasks of new spacecraft and difficult direct reuse of processes caused by many personalized parameters of processes, a technology state driven spacecraft assembly process templating method and system is adopted to realize parameterized efficient preparation of conventional assembly processes. However, in the application practice of the existing method and system, problems such as difficult template preparation, easy logic error, difficult problem debugging, slow combing and reuse occur. On the one hand, the method requires high template preparation and debugging capability, which makes most process engineers unable to design and debug process templates themselves; on the other hand, the existing template cannot intuitively display the complex assembly process logic, which makes it difficult for process engineers to identify whether the process template meets their own needs and understand how to modify it. In summary, process engineers cannot quickly build or modify existing templates according to temporary wishes in daily work, and a simpler and more intuitive process template design method is needed.

[0003] In the manufacturing industry, the disclosed research still focuses on process templating or intelligent generation method and system construction, and less on the design method improvement of complex process templates. In the computer industry, it is generally considered to integrate a low-code program editor to realize the isolation of users and complex code design tasks, and through the mapping relationship between low-code blocks and complex code segments, the correctness of the final code is ensured, and the code debugging link is omitted. Among them, the open source visual program editor Blockly of Google Company is widely used and is a representative tool of low-code development. For example, in the existing method, a twin entity behavior control method and device based on block script are disclosed, which uses the Blockly graphical programming interface to edit the behavior logic of the digital twin entity, solving the technical problems of traditional twin entity behavior control process requiring strong programming ability, slow development process and inability to realize real-time interaction.

[0004] Application Content

[0005] The present application aims to provide a spacecraft assembly process template generation method, device, computer readable storage medium and electronic equipment, which can solve at least one of the above technical problems. The specific scheme is as follows:

[0006] According to a specific embodiment of this application, this application provides a method for generating a spacecraft assembly process template, comprising: hierarchically decomposing spacecraft assembly process elements and encapsulating each level element into a corresponding process structure; defining a fill function corresponding to each process structure to be used as a template function; receiving user parameter input, and generating a spacecraft assembly process template based on the configured multiple types of code blocks and the template function, wherein, during the process of generating the spacecraft assembly process template, the spacecraft assembly process template is displayed and debugged based on the block identifier.

[0007] According to a specific embodiment of this application, this application also provides a spacecraft assembly process template generation device, which executes the spacecraft assembly process template generation method described in this application. The spacecraft assembly process template generation device includes: a disassembly and encapsulation module, which performs hierarchical disassembly based on spacecraft assembly process elements and encapsulates each level element into a corresponding process structure; a definition processing module, which defines a fill function corresponding to each process structure for use as a template function; and a receiving and generation module, which receives user parameter input and generates a spacecraft assembly process template based on the configured multiple types of code blocks and the template function. In the process of generating the spacecraft assembly process template, the spacecraft assembly process template is displayed and debugged based on the block identifier.

[0008] According to a specific embodiment of this application, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the spacecraft assembly process template generation method as described in any of the preceding claims.

[0009] According to a specific embodiment of this application, this application also provides an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the spacecraft assembly process template generation method as described in any of the preceding claims.

[0010] Compared with the prior art, the above-described solutions of this application have at least the following beneficial effects:

[0011] This application hierarchically decomposes spacecraft assembly process elements and encapsulates each level of element into a corresponding process structure. The defined fill functions corresponding to each process structure are used as template functions. These functions receive user parameter input and, based on the configured multiple types of code blocks, accurately generate spacecraft assembly process templates according to the template functions. The spacecraft assembly process templates are then displayed and debugged based on the block identifiers. This significantly reduces the code design and debugging capabilities required for editing traditional template functions. By using low-code blocks, modular encapsulation of template functions is achieved, improving the efficiency of process template sharing and reuse, thereby increasing template design efficiency. Attached Figure Description

[0012] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0013] Figure 1 This is a flowchart illustrating an example of the spacecraft assembly process template generation method of this application;

[0014] Figure 2 This is a schematic diagram illustrating an example of the process content of the spacecraft assembly process template generation method of this application;

[0015] Figure 3 This is a schematic diagram illustrating a process structure of the spacecraft assembly process template generation method of this application;

[0016] Figure 4 This is a schematic diagram of an example of the product structure of the spacecraft assembly process template generation method of this application;

[0017] Figure 5 This is a schematic diagram of the filling function corresponding to the process structure in the spacecraft assembly process template generation method of this application;

[0018] Figure 6 This is a schematic diagram showing an example of a block combination in the spacecraft assembly process template generation method of this application;

[0019] Figure 7 This is a schematic diagram of one implementation method for establishing the mapping between page data of the debugging block display interaction module, template function display interaction module, and process example display interaction module in the spacecraft assembly process template generation method of this application;

[0020] Figure 8 This is a schematic diagram illustrating an example of the associated highlighting effect of the debugging block display interaction module, template function display interaction module, and process instance display interaction module in the spacecraft assembly process template generation method of this application;

[0021] Figure 9 This is a structural frame diagram of an embodiment of the spacecraft assembly process template generation device of this application;

[0022] Figure 10 This is a schematic diagram of the electronic device structure shown in an embodiment of this application. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “said,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.

[0025] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0026] It should be understood that although the terms first, second, third, etc., may be used in the embodiments of this application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, first may also be referred to as second without departing from the scope of the embodiments of this application, and similarly, second may also be referred to as first.

[0027] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device that includes said element.

[0028] In view of the above problems, this application proposes a method for generating process templates for spacecraft assembly. This method integrates the Blockly graphical programming interface, establishes a process structure, JavaScript code, and mapping between code blocks, and establishes a complete process template design, debugging, and release process, thereby reducing the difficulty of process template design and enhancing the ability of the template to express process logic.

[0029] The following reference Figures 1-8 The contents of this application will be described in detail.

[0030] Figure 1This is a flowchart illustrating an example of the spacecraft assembly process template generation method of this application.

[0031] like Figure 1 As shown, in step S101, the spacecraft assembly process elements are hierarchically decomposed, and each level element is encapsulated into a corresponding process structure.

[0032] Specifically, for Figure 2 The assembly process elements of the spacecraft's installation equipment Z are hierarchically decomposed, and each level element is encapsulated into a process structure according to JSON format.

[0033] Optionally, the process structure includes a process structure, a process line structure, an operating instruction structure, and a kitting material structure.

[0034] like Figure 3 As shown, the process structure includes process name, process number, process version, a set of process line structures, and a set of kitting material structures. The process line structure includes process number, job type, operating instructions, and a set of checkpoint structures. The operating instructions structure includes the operating content text. The checkpoint structure includes product code, product name, product quantity, manufacturing target status, and measurement unit. The kitting material structure includes product code, product number, and product quantity; see details below. Figure 4 .

[0035] Furthermore, the structures of the process structure also include nesting relationships, wherein the nesting relationship includes multi-level process content, and different process rows are sequential.

[0036] It should be noted that the above is only an optional example and should not be construed as a limitation of this application.

[0037] Next, in step S102, fill functions corresponding to each process structure are defined to be used as template functions.

[0038] Specifically, fill functions are defined corresponding to each level of the process structure. These fill functions are JavaScript functions; see [link to documentation] for details. Figure 5 The filling functions include process structure filling functions, process line structure filling functions, operation instruction structure filling functions, checkpoint filling functions, and kitting material filling functions, etc.

[0039] More specifically, based on each fill function (i.e. template function), the following product structure tree parameters for manufacturing the target product are input and encapsulated into a product structure: product type, product code, product quantity, product attributes, manufacturing target status, and other information.

[0040] like Figure 4As shown, the product structure includes product name, product code, product type, product quantity, etc.

[0041] Figure 5 The structure filling functions shown all take the product structure as input parameters, for example... Figure 5 In the `add(Product product)` method, `product` specifically refers to the parameter values ​​(e.g., ...) of the `product` parameter. Figure 4 Copy the parameter value to Figure 3 The corresponding positions in the process structure shown are then used to form a final process structure, which is ultimately displayed as... Figure 8 Part D is shown.

[0042] Optionally, variables can be used to pass product structures or product information within each fill function. Iteration methods can be used to read sub-product information from the product structure.

[0043] Conditional judgment methods can be used within the process structure to combine process line structures and kitting material structures in different logical sequences based on product attributes or manufacturing target status information. Furthermore, conditional judgment methods can also be used within the process line structure to combine text fields and checkpoint structures of operation content in different logical sequences based on product attributes or manufacturing target status information.

[0044] It should be noted that the above is only an optional example and should not be construed as a limitation of this application.

[0045] Next, in step S103, user parameter input is received, and a spacecraft assembly process template is generated based on the configured multi-type code blocks and the template function. During the generation of the spacecraft assembly process template, the spacecraft assembly process template is displayed and debugged based on the block identifier.

[0046] Specifically, based on the block parameters, multiple types of code blocks are configured.

[0047] The various code blocks include template management blocks, process structure blocks, variable blocks, constant blocks, and logic control blocks. See details. Figure 6 Various types of building blocks, 1 to 12.

[0048] like Figure 6 In the block combination example shown, the template management blocks are 1 and 3, the variable blocks are 2, 8, 9 and 12, the constant block is 10, the logic control block is 7, and the process structure blocks are 4, 5, 6 and 11.

[0049] Specifically, template management blocks (such as...) Figure 6Blocks 1 and 3 shown are used to generate template descriptions, allowing users to input management information such as the template's name, version, author, category, and applicable component types. Specifically, when the template management block generates a process template, it converts the user-input management information into a template description structure.

[0050] The process structure blocks correspond to various process structures and have value controls for the input parameters. Specifically, they include process row blocks, operation content blocks, checkpoint blocks, and kitting material blocks. When generating process templates (i.e., spacecraft assembly process templates), the process structure blocks convert user-input design information into various structure definition functions.

[0051] Variable blocks are primarily used to create new variables and specify references between variables and product nodes in the product structure tree. They are used to input product information that changes with the product instance within various blocks. Variable blocks correspond to the parameters or variables of each fill function (i.e., template function), and are converted into JavaScript variable assignment or reference statements when generating the process template.

[0052] Constant blocks specify fixed values ​​for numbers, text, and symbols, used to input fixed information into various blocks. When generating process templates, constant blocks are converted into JavaScript numeric constants or string expressions.

[0053] Logic control blocks are used to implement logical controls such as judgment, selection, and looping. Loop control blocks correspond to various traversal methods and can be converted into JavaScript loop logic statements when generating process templates. Judgment control blocks correspond to various condition judgment methods and can be pieced together between process row blocks, kitting material blocks, operation content blocks, checkpoint blocks, and variable / constant blocks in process row blocks used to express operation content. They are converted into JavaScript condition judgment statements and structures when generating process templates.

[0054] Specifically, multiple code blocks are selected from various code blocks to generate a spacecraft assembly process template. The spacecraft assembly process template includes template description, template function, and template definition.

[0055] In one specific implementation, template management blocks are placed into the Blockly workspace, and process structure blocks and logic control blocks are spliced ​​and nested according to the process sequence and logic. Variable or constant controls are inserted at the block parameter input as needed.

[0056] For example, in the Blockly interface, users can drag and drop, assemble template management blocks, logic control blocks, and process structure blocks, and insert variable reference blocks, while viewing the corresponding JavaScript template function code in real time. After block editing is complete, the following three parts are automatically exported: template description (e.g., JSON configuration for the template), template function (i.e., the template JavaScript code), and template definition (block combinations and parameter configuration information saved in JSON format). This ensures a standardized file structure for process templates and guarantees interoperability and sharing between systems.

[0057] Furthermore, the spacecraft assembly process template is made demonstrably debuggable based on the block identifiers. This demonstrable debugging specifically includes verifying the correct position of the current block within a multi-layered nested block combination, the correctness of the block content, and the accuracy of the product information entered in the variable class that changes with the product.

[0058] To enable process template debugging, a mapping relationship between various building blocks and code blocks is established. When generating corresponding JavaScript code text segments, each code building block is annotated with its corresponding building block identifier, such as an ID number. The template is defined as a structured Blockly building block combination and configuration information output by the building block design interaction module, used to save and load the spacecraft assembly process template generated by this application.

[0059] Specifically, the spacecraft assembly process template includes a template description, template functions, and a template definition, wherein the template description is stored in JSON format. The template functions are template functions with building block icons. The template definition is stored in JSON format. This ensures the standardized file structure of the process template and guarantees interoperability and sharing of templates between systems.

[0060] Furthermore, the code generation function of the blocks is first used to convert the graphical elements into corresponding JavaScript code text segments, and block identifiers (such as block IDs) are annotated in each code text segment. For multi-level nested block combinations, if the text segment generated by the current layer block is interrupted by the text generated by the next layer nested block during the splicing process, block identifiers (such as block IDs) need to be annotated in all the scattered text segments generated at this layer.

[0061] Figure 7 This is a schematic diagram illustrating an example of how the debugging block display interaction module, template function display interaction module, and process example display interaction module establish a mapping relationship between their page data in the spacecraft assembly process template generation method of this application.

[0062] like Figure 7As shown, this includes building blocks, template functions generated from the building blocks, and debugging template functions (specifically, the HTML template function page code output by the debugging template function generation module). The building block corresponding to product p1 is marked with a building block identifier, for example, blockid="12".

[0063] Each template function containing block identifier annotations is converted to HTML format, and the block identifiers in each template function are converted into parameter attribute values ​​(e.g., class attribute values) of the page code segment corresponding to each block. This allows the text code segment of the target block to be displayed on the template function interactive interface when debugging the target block in the current block editing page. Specifically, the debugging template function generation module is used to convert the template functions of the current process structure (with block identifier annotations) into debugging template functions (HTML), and to convert the block identifiers in the template functions of the current process structure (with block identifier annotations) into parameter attribute values ​​(e.g., class attribute values) of the page code segment in each page data. See [link to specific conversion process] for details. Figure 7 p, q, r.

[0064] For the interaction between the debugging block display module and the process example display module, such as Figure 7 As shown, it includes building blocks, template functions generated from building blocks, product structure, process structure (specifically, the process structure with building block identifiers output by calling the debugging process structure generation module), and process instance (specifically, the HTML-format process instance page code output by calling the debugging process instance generation module).

[0065] The template functions, each containing block identifier annotations, use the product structure of a specific product as a parameter to generate an HTML format of a process instance. The block identifiers in each template function are then converted into parameter attribute values ​​(e.g., class attribute values) for the corresponding page text segments (i.e., page data) for each block. This allows the text code segment of the target block to be displayed on the process instance interactive interface when debugging the target block in the current block editing page. Specifically, the debugging process structure generation module injects the product structure into the debugging template function of the current process structure, outputting a process structure with a block ID attribute. The debugging process instance generation module converts the above process structure into a debugging process instance table (HTML), and converts the block identifiers into class attribute values ​​for the HTML page code segment. See [link to specific conversion process] for details. Figure 7 As shown in the figure, s, t, u, v, w.

[0066] Figure 8 This is a schematic diagram illustrating an example of the associated highlighting effect of the debugging block display interaction module, template function display interaction module, and process instance display interaction module in the spacecraft assembly process template generation method of this application.

[0067] Reference Figure 3 and Figure 8 It can be seen that by using block labels, while displaying process structures such as process structure, process line structure, operation instruction structure, and kit material structure, content debugging can be carried out more effectively, thereby improving visibility and reducing content debugging time.

[0068] Specifically, the process template design module generates spacecraft assembly process templates using a low-code approach. For example, it uses a web page structure, including a block-based graphical editing interface (corresponding to the debugging block display interaction module), a template function display interface (corresponding to the template function display interaction module), a process example display interface (corresponding to the process example display interaction module), and a product structure editing interface (corresponding to the product structure editing module).

[0069] In one specific implementation, after the user completes block editing in the Blockly graphical programming interface and product structure editing in the product structure editing interface, the template function display interface and process instance display interface interactively display the generated template functions and process instances from the block combinations. After completing the low-code editing of the template, the Blockly graphical programming interface can output a process template containing template descriptions, template functions, template definitions, and product structure definitions. The user can reload the process template to restore the block combinations and parameters contained in the blocks in the block graphical editing interface from the template definitions in the process template. Specifically, when the user combines Blockly blocks and sets the parameters contained in the blocks in the block graphical editing interface, the template function portion of the process template is displayed in the template function display interface. For example, the code displayed in the template function display interface is read-only and cannot be edited by the user. Furthermore, when the user sets parameters for the product structure in the product structure editing interface, the process instances generated based on the template functions and product structure are displayed in the process instance display interface. For example, the process instance text displayed in the process instance display interface is read-only and cannot be edited by the user.

[0070] Ideally, the blocks in the block graphic editing interface have a mapping relationship with the code blocks in the template function display interface and the process text blocks in the process instance display interface, for example, based on block identifiers. Based on code identifiers, the block identifiers of various types of blocks in the block graphic editing interface, the parameter attribute values ​​of the page data (specifically, page text segments) corresponding to the code blocks in the template function display interface, and the parameter attribute values ​​of the page data corresponding to the process text blocks in the process instance display interface are kept identical, thus forming a mapping relationship between the three in the content instances.

[0071] Specifically, in the process of generating template functions and process instances from the same building block, the building block identifier (e.g., building block ID number) in the building block graphic editing interface, the class attribute value of the page data corresponding to the code block in the template function display interface, and the class attribute value of the page data corresponding to the process text block in the process instance display interface remain the same, so as to form a mapping relationship between the building block graphic editing interface, the template function display interface, and the process instance display interface in the content instances.

[0072] Specifically, the code text of the generated spacecraft assembly process template is organized, and line breaks and indentation marks are added according to a unified standard to ensure that the final JavaScript code can be displayed in a clear and hierarchical manner in the template function display interface.

[0073] Preferably, the code text segment is further segmented based on line break markers and supplemented with block identifiers (e.g., block ID numbers) to ensure that all code segments have block identifiers (e.g., block ID numbers). The code text is then converted into HTML code, and the block identifiers (e.g., block ID numbers) are used as the class attribute values ​​for each code segment.

[0074] To further reduce modification processing time, when clicking on the graphical editing interface of the building blocks (corresponding to the debugging building block display interaction module), the building block icons of various types of building blocks are used to link and simultaneously achieve highlight display between multiple modules or multiple display parts.

[0075] For the three modules linked (triggered highlighting), add a click response function to the block graphic editing interface. When a block is clicked, the response function switches the block to the highlighted state, extracts the block identifier (e.g., block ID number), finds code blocks in the template function display interface with the same class attribute value as the block identifier, and switches these code blocks to the highlighted state; finds text blocks in the process example display interface with the same class attribute value as the block identifier, and switches these text blocks to the highlighted state.

[0076] Specifically, a click response function is added to the template function display interface. When a code text segment is clicked, the response function switches the code text segment to a highlighted state, extracts the class attribute value of the code segment, finds the block identifier (e.g., block id) in the block graphic editing interface that has the same class attribute value, and switches the block to a highlighted state; it also finds the text block in the process example display interface that has the same class attribute value, and switches the text block to a highlighted state.

[0077] Specifically, a click response function is added to the process example display interface. When a process text segment is clicked, the response function switches the text segment to a highlighted state, extracts the class attribute value of the text segment, finds the block identifier (e.g., block id) in the block graphic editing interface that has the same class attribute value, and switches the block to a highlighted state; it also finds the text block in the template function display interface that has the same class attribute value, and switches the text block to a highlighted state.

[0078] Each process structure is encapsulated in HTML format as a process table and displayed on the visualization page. Click response functions are added to the text code segments so that when the target block is clicked in the block editing page, the target block can be highlighted in the template function interaction interface and the process instance display interaction interface.

[0079] For example, when a user clicks on the Blockly graphical editing interface (such as the Blockly graphical programming interface),... Figure 8 When the block (checkpoint block f1) in the "A" section shown is displayed, the template function display interface will also highlight the JavaScript code corresponding to the block (see details). Figure 8 The gray area f0 in the "B" section shown will also be highlighted in the process example display interface (corresponding to the process example display interaction module), along with the area f3 corresponding to the checkpoint block f1. Figure 8 The grayed-out portion f3 is displayed under the "D" symbol. When the user clicks on the JavaScript code in the template function display interface (see details...),... Figure 8 When the grayed-out portion (f0) in the "B" section shown is displayed, other code blocks originating from the same block will be highlighted, along with the Blockly graphical programming interface (such as the Blockly graphical programming interface). Figure 8 The block shown in section "A" (checkpoint block f1) is also highlighted in the interactive interface of the process example, specifically in section f3, which corresponds to checkpoint block f1. Figure 8 The gray area f3 in the "D" section is displayed. If the user clicks the checkpoint block f1 shown on the interface, the corresponding gray area f0 in the JavaScript code will be highlighted, and the corresponding area f3 in the process example display interface will also be highlighted. Figure 8 The gray part f3 in the “D” section.

[0080] It should be noted that the above is only an optional example and should not be construed as a limitation of this application.

[0081] In another example, the debugged spacecraft assembly process template is published, and the official process template file is output.

[0082] Select one or more product structure tree data as input parameters for the template function, call the current template function to generate one or more sets of preview processes to debug and optimize the variable class blocks and logic control blocks in the current template, so as to obtain a debugged and optimized spacecraft assembly process template.

[0083] After completing the call optimization, the spacecraft assembly process template is released. For example, the spacecraft assembly process template is a JavaScript process template, which is officially released in the process system and can be used or downloaded by other users. Users can reload the JavaScript process template in the editor and further modify the variable class blocks and logic control blocks to create new process templates.

[0084] It should be noted that the above is only an optional example and should not be construed as a limitation of this application.

[0085] Compared with existing technologies, this application decomposes spacecraft assembly process elements hierarchically and encapsulates each level of element into a corresponding process structure. The defined fill functions corresponding to each process structure are used as template functions to receive user parameter input. Based on the configured multiple types of code blocks, the spacecraft assembly process template is accurately generated according to the template function. The spacecraft assembly process template can be displayed and debugged based on the block identifier. This significantly reduces the code design and debugging capabilities required for editing the original template function. The modular encapsulation of template functions is achieved through low-code blocks, which improves the efficiency of process template sharing and reuse, thereby improving the efficiency of template design.

[0086] Furthermore, based on the provided multiple types of code blocks, spacecraft assembly process templates are generated, enabling process engineers to quickly get started and focus more on template logic design. This eliminates the need for template designers to worry about the syntactic correctness of template functions, removing the code debugging process related to syntax and improving template design efficiency. Based on block identifiers, the visualization performance of the process template logic is enhanced through visual graphical programming, bidirectional interactive display between blocks and template function code segments, and linked highlighting, making it easier to understand and modify. A general standard format is used to implement structured storage and retrieval of process template content (template description (JSON), template functions (JS functions), and template definitions (JSON)).

[0087] This application also provides apparatus embodiments that follow the above embodiments, for implementing the method steps described in the above embodiments. The interpretation of the same names is the same as that in the above embodiments, and they have the same technical effects as those in the above embodiments, so they will not be repeated here.

[0088] like Figure 9 As shown, this application provides a spacecraft assembly process template generation device, which executes the spacecraft assembly process template generation method described in this application. The spacecraft assembly process template generation device 900 includes a disassembly and packaging module 910, a definition processing module 920, and a receiving and generation module 930.

[0089] In one specific embodiment, the disassembly and encapsulation module 910 performs hierarchical disassembly based on spacecraft assembly process elements and encapsulates each level of elements into a corresponding process structure. The definition processing module 920 is used to define fill functions corresponding to each process structure, which are then used as template functions. The receiving and generation module 930 is used to receive user parameter input and, based on the configured multiple types of code blocks, generate a spacecraft assembly process template according to the template functions. During the generation of the spacecraft assembly process template, the template is displayed and debugged based on the block identifiers.

[0090] In one example, the processes and functions contained in the aforementioned method are implemented through software, including a block design interaction module, a debugging template function generation module, a template function display interaction module, a debugging process structure generation module, a product structure editing module, a debugging process instance generation module, a process instance display interaction module, and a publishing template generation module.

[0091] The Block Design Interaction Module is a Blockly-based graphical editing interface that allows users to design process templates using blocks. It outputs template functions (including block identifiers and comments) for use by the release template generation module, the debugging template function generation module, and the debugging process structure generation module. The module also outputs template definitions to the release template generation module. When a target block is clicked during the process template debugging step, the Block Design Interaction Module sends the block identifier to the template function display interaction module and the process instance display interaction module, highlighting the corresponding template function code and process instance text. It can also receive block identifiers from these two modules and highlight the corresponding blocks.

[0092] For the debugging template function generation module, it is used to convert template functions (with block ID annotations) into debugging template functions (html), and convert the block ID numbers in the template functions (with block IDs) into the class attribute values ​​of each code segment.

[0093] For the template function display interaction module, the debugging template function (html) generated by the debugging template function generation module is embedded into the page, and a click response function for the code text is added. When a certain text code segment is clicked, the CSS style of all text code segments with the same class is switched to highlight, and the corresponding block and process instance text mapped in the block design interaction module and the process instance display interaction module are found according to the class attribute value, and the corresponding block and process instance text are highlighted.

[0094] The product structure editing module defines a set of product structures for template debugging, including information such as the product type, product code, product quantity, product attributes, and manufacturing target status of the target product and its sub-products. During template debugging, the current product manufacturing target can be selected and sent to the process instance display interaction module.

[0095] For the debugging process structure generation module, the module takes the product structure edited and selected by the user in the product structure editing module as input, and runs a template function (with block identifiers) to fill the process structure. Before filling, the process structure constructor in the code is identified, and the block identifiers contained in the corresponding code comments are obtained. A new function is then written to wrap the original constructor. Figure 7 The new function, using the "s" in the code comments, injects the block identifiers read from the code comments into the block identifier attribute of the process structure generated by the original constructor. The process structure (with block identifiers) generated by this module will be output to the debugging process instance generation module.

[0096] For the debugging process instance generation module, the debugging process instance display module encapsulates the process structure generated by the debugging process structure generation module into an HTML format in the form of a process table and displays it on the page. During the encapsulation process, except for the top-level process structure, the block identifier of the structure is used as the class type value of the structure generated text.

[0097] For the process instance display interaction module, the process instance display interaction module embeds the process table (html) generated by the debugging process instance generation module into the page, and adds a click response function for the process text. When the text code segment is clicked, the CSS style of all text code segments with the same class attribute value is switched to highlight, and the corresponding text code segments mapped in the block design interaction module and the template function display interaction module are searched according to the class attribute value, and the corresponding blocks and text code segments are highlighted.

[0098] For the release template generation module, the release template generation module combines the template description, template function, and template definition generated by the block design interaction module, removes the comments of the block identifiers in the template function, checks the parameters in the template description, and generates the final formal process template JavaScript file.

[0099] In one specific implementation, the process of generating a spacecraft assembly process template, which involves making the spacecraft assembly process template displayable and debuggable based on block identifiers, includes: converting each template function containing block identifier annotations into HTML format, and converting the block identifiers in each template function into class attribute values ​​of the text code segments corresponding to each block, so that when debugging the target block in the current block editing page, the text code segments of the target block can be displayed on the template function interactive interface.

[0100] According to the optional implementation, each process structure is encapsulated in HTML format as a process table and displayed on the visualization page. A click response function is added to each block so that when the target block is clicked in the block editing page, the corresponding text code segment of the target block can be highlighted in the template function interaction interface and the process instance display interaction interface.

[0101] According to an optional implementation, each level of elements is encapsulated into a process structure in JSON format. The process structure includes a process structure, a process line structure, an operation instruction structure, a checkpoint structure, and a kitting material structure.

[0102] The fill function is a JavaScript function, which includes a process structure fill function, a process line structure fill function, an operation instruction structure fill function, a checkpoint fill function, and a kitting material fill function.

[0103] According to the optional implementation method, based on each fill function, the following product structure tree parameters for manufacturing the target product in the process are input and encapsulated into a product structure: product type, product code, product quantity, product attributes, and manufacturing target status.

[0104] According to the optional implementation, based on each fill function, the product structure tree parameters of the target product manufactured by the following process are input, and multiple types of code blocks are encapsulated and configured. The multiple types of code blocks include template management blocks, process structure blocks, variable blocks, constant blocks, and logic control blocks.

[0105] There is a mapping relationship between each code block and the code segment of the corresponding JavaScript template function and the text block of the corresponding process instance; based on the code identifier, the block identifier of the block in the block graphic editing interface, the parameter attribute value of the page data corresponding to the code block in the template function display interface, and the parameter attribute value of the page data corresponding to the process text block in the process instance display interface are kept the same, so as to form a mapping relationship between the block graphic editing interface, the template function display interface, and the process instance display interface in the content instances.

[0106] The process structure blocks and logic control blocks are assembled by dragging and dropping to simulate the actual process logic of spacecraft assembly. This allows for the graphical display of process sequence, parameter configuration, and condition judgment to generate spacecraft assembly process templates.

[0107] like Figure 10 As shown, this embodiment provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the method steps described in the above embodiment.

[0108] This application provides a non-volatile computer storage medium storing computer-executable instructions that can perform the steps described in the above embodiments.

[0109] The following is for reference. Figure 10 The diagram illustrates a structural schematic of an electronic device suitable for implementing the embodiments of this application. The terminal devices in the embodiments of this application may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 10 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0110] like Figure 10As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the electronic device. The processing unit 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0111] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 10 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0112] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by the processing device 401, it performs the functions defined in the methods of the embodiments of this application.

[0113] It should be noted that the computer-readable medium described above in this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0114] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0115] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0117] The units described in the embodiments of this application can be implemented in software or hardware. The names of the units are not, in some cases, limiting the scope of the unit itself.

Claims

1. A method for generating a spacecraft assembly process template, characterized in that, include: Based on the elements of spacecraft assembly process, the process is hierarchically decomposed and each level of element is encapsulated into a corresponding process structure. Define fill functions corresponding to each process structure to be used as template functions; The system receives user parameter input and generates a spacecraft assembly process template based on the configured multi-type code blocks and template functions. During the generation of the spacecraft assembly process template, the template is displayed and debugged based on the block identifiers.

2. The method for generating a spacecraft assembly process template according to claim 1, characterized in that, The process of generating a spacecraft assembly process template includes making the template displayable and debuggable based on block identifiers, including: Each template function containing block identifier annotations is converted into HTML format, and the block identifiers in each template function are converted into the class attribute value of the text code segment corresponding to each block, so that when debugging the target block in the current block editing page, the text code segment of the target block can be displayed on the template function interactive interface.

3. The method for generating a spacecraft assembly process template according to claim 1 or 2, characterized in that, Each process structure is encapsulated in HTML format as a process table and displayed on the visualization page. A click response function is added to each block so that when the target block is clicked in the block editing page, the corresponding text code segment of the target block can be highlighted in the template function interaction interface and the process instance display interaction interface.

4. The method for generating a spacecraft assembly process template according to claim 1, characterized in that, Based on the hierarchical decomposition of spacecraft assembly process elements, each level of element is encapsulated into a corresponding process structure, including: Each level of elements is encapsulated into a process structure according to the JSON format. The process structure includes a process structure, a process line structure, an operation instruction structure, a checkpoint structure, and a kitting material structure.

5. The method for generating a spacecraft assembly process template according to claim 1, characterized in that, The fill function is a JavaScript function, which includes a process structure fill function, a process line structure fill function, an operation instruction structure fill function, a checkpoint fill function, and a kitting material fill function.

6. The method for generating a spacecraft assembly process template according to claim 1, characterized in that, Based on each fill function, input the following product structure tree parameters for manufacturing the target product in the process, and encapsulate them into a product structure: product type, product code, product quantity, product attributes, and manufacturing target status.

7. The method for generating a spacecraft assembly process template according to claim 1, characterized in that, Based on each fill function, input the product structure tree parameters of the target product manufactured by the following process, and encapsulate and configure multiple types of code blocks, including template management blocks, process structure blocks, variable blocks, constant blocks, and logic control blocks.

8. The method for generating a spacecraft assembly process template according to claim 1, characterized in that, include: There is a mapping relationship between each code block and the code segment of the corresponding JavaScript template function, and the text block of the corresponding process instance; Based on code identification, the block identifiers in the block graphic editing interface, the parameter attribute values ​​of the page data corresponding to the code blocks in the template function display interface, and the parameter attribute values ​​of the page data corresponding to the process text blocks in the process instance display interface are kept the same, so as to form a mapping relationship between the block graphic editing interface, the template function display interface, and the process instance display interface in the content instances.

9. The method for generating a spacecraft assembly process template according to claim 1, characterized in that, include: The process structure blocks and logic control blocks are assembled by dragging and dropping to simulate the actual process logic of spacecraft assembly. This allows for the graphical display of process sequence, parameter configuration, and condition judgment to generate spacecraft assembly process templates.

10. A spacecraft assembly process template generation device, characterized in that, The method for generating a spacecraft assembly process template according to any one of claims 1 to 9, wherein the spacecraft assembly process template generating apparatus comprises: The packaging module is disassembled and hierarchically disassembled based on spacecraft assembly process elements, and each level of element is packaged into a corresponding process structure. Define the processing module, which is used to define the fill function corresponding to each process structure, so that it can be used as a template function; The receiving and generating module is used to receive user parameter input, generate a spacecraft assembly process template based on the configured multi-type code blocks and template functions. During the generation of the spacecraft assembly process template, the spacecraft assembly process template is displayed and debugged based on the block identifiers.