Method, device, electronic device and storage medium for creating a cloud development environment
By retrieving target template files from a pre-configured workspace template file library in the cloud, parsing and compiling them, a cloud development environment adapted to various software development needs is generated, solving the problem of low creation efficiency in existing technologies and realizing efficient and flexible development environment updates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUOKE FOUNDATION STONE (CHONGQING) SOFTWARE CO LTD
- Filing Date
- 2022-09-09
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies struggle to create cloud-based development environments that meet diverse software development needs, and the creation process is inefficient and unable to support dynamic updates.
A method for creating a cloud-based development environment is provided. This method receives a software development request from a terminal device, obtains a target template file from a pre-configured workspace template file library that supports dynamic modification, parses and dynamically compiles the file, generates a cloud-based software development environment adapted to the request, and supports dynamic modification of the template file during the development process.
It enables the efficient creation of cloud-based development environments adapted to various software development requests, supports dynamic modification, and improves the efficiency of development environment updates and configuration flexibility.
Smart Images

Figure CN116225394B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of software development technology, and in particular to a method, apparatus, electronic device, and storage medium for creating a cloud development environment. Background Technology
[0002] To facilitate software development and improve its efficiency, it is essential to create a development environment that is compatible with the software being developed.
[0003] In related technologies, the software development environment is configured by installing the corresponding application of the Integrated Development Environment (IDE) on the host machine. However, since different software has different dependencies on hardware, operating system and middleware, it is difficult for a single IDE environment to meet the needs of multiple software development. Moreover, as the complexity of software systems increases, creating a suitable development environment becomes very difficult and inefficient, affecting the development process. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this disclosure provides a method, apparatus, electronic device and storage medium for creating a cloud development environment.
[0005] According to a first aspect of the present disclosure, a method for creating a cloud development environment is provided. The method is applied to a server and includes: receiving a software development request initiated by a terminal device; obtaining a target template file adapted to the request from a workspace template file library, wherein the workspace template file library includes at least one workspace template file, and the workspace template file is a pre-configured template file that supports dynamic modification; parsing and dynamically compiling the target template file to obtain a workspace interface configuration file; and creating a cloud software development environment adapted to the request based on the workspace interface configuration file.
[0006] In some embodiments, the workspace template file includes: metadata information, component information, and editor plugin information. The metadata information includes: metadata information of the workspace template file itself, and metadata information of the objects and object relationships contained in the workspace template file. The component information includes: functional module information for software development within the objects. The editor plugin information includes: extended function plugin information for software development within the objects. Parsing and dynamically compiling the target template file to obtain a workspace interface configuration file includes: parsing the metadata information, component information, and editor plugin information of the target template file to obtain metadata parsing information, component parsing information, and plugin parsing information; dynamically compiling the metadata parsing information, component parsing information, and plugin parsing information respectively to obtain workspace interface configuration information; and generating the workspace interface configuration file based on the workspace interface configuration information.
[0007] In some embodiments, the metadata parsing information, component parsing information, and plugin parsing information are dynamically compiled to obtain workspace interface configuration information, including: dynamically compiling the metadata parsing information to obtain workspace template interface metadata information and workspace interface metadata information; dynamically compiling the component parsing information to obtain workspace template interface component information and workspace interface component information; and dynamically compiling the plugin parsing information to obtain workspace template interface plugin information and workspace interface plugin information; the workspace interface configuration information includes the workspace template interface metadata information, the workspace interface metadata information, the workspace template interface component information, the workspace interface component information, the workspace template interface plugin information, and the workspace interface plugin information.
[0008] In some embodiments, the method further includes: obtaining editing operation instructions, wherein the editing operation instructions are instructions received by the terminal device in the graphical editing interface of the template file; the graphical editing interface is a visual interface obtained by the object description model performing automatic code generation function, wherein the object description model includes object meta-information for writing workspace templates; generating or updating workspace template configuration information according to the editing operation instructions; and generating a workspace template file according to the workspace template configuration information.
[0009] In some embodiments, the request carries development environment description information of the software to be developed; the workspace template files in the workspace template file library are bound to adapted software development environment description information. The step of obtaining a target template file adapted to the request from the workspace template file library includes: filtering target software description information that matches the description information carried in the request from the software description information bound to the workspace template file; determining, in response to finding the target software description information, that the workspace template file corresponding to the target software description information is a target template file adapted to the request; and obtaining the target template file from the workspace target file library.
[0010] In some embodiments, the method further includes: in response to the inability to filter the target software description information, sending an instruction to the terminal device to jump to the graphical editing interface of the template file; obtaining the interface editing operation instruction of the graphical editing interface; generating new workspace template configuration information according to the interface editing operation instruction; generating a new workspace template file according to the new workspace template configuration information and storing it in the workspace template file library.
[0011] In some embodiments, the newly created workspace template file is used as the target template file or as a candidate target template file; when the newly created workspace template file is used as the candidate target template file, the candidate target template file is parsed and dynamically compiled to obtain a candidate workspace interface configuration file; based on the candidate workspace interface configuration file, a candidate cloud software development environment is created, which serves as a development environment option for displaying the request on the terminal device.
[0012] In some embodiments, the method further includes: obtaining an update instruction for updating the candidate target template file, wherein the update instruction is an instruction received by the terminal device in the graphical editing interface; the update instruction includes at least one of the following instructions: an instruction to add objects contained in the candidate target template file, an instruction to delete objects contained in the candidate target template file, an instruction to modify the object relationships between objects contained in the candidate target template file, an instruction to modify the metadata information of the objects, and an instruction to modify the metadata information of the object relationships; the objects include at least one of the following: components and editor plugins; updating at least one of the metadata information, component information, or editor plugin information of the new workspace template configuration information according to the update instruction; and generating the target template file according to the updated new workspace template configuration information.
[0013] According to a second aspect of the present disclosure, an apparatus for creating a cloud-based development environment is provided, comprising a request receiving module, a template file acquisition module, a dynamic compilation module, and a development environment creation module. The request receiving module is used to receive a software development request initiated by a terminal device. The template file acquisition module is used to acquire a target template file adapted to the request from a workspace template file library, wherein the workspace template file library includes at least one workspace template file, and the workspace template file is a pre-configured template file that supports dynamic modification. The dynamic compilation module is used to parse and dynamically compile the target template file to obtain a workspace interface configuration file. The development environment creation module is used to create a cloud-based software development environment adapted to the request based on the workspace interface configuration file.
[0014] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; the processor being configured to read the executable instructions from the memory and execute the executable instructions to implement the method for creating a cloud development environment provided in the first aspect of the present disclosure.
[0015] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the method for creating a cloud development environment provided in the first aspect of the present disclosure.
[0016] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0017] Because the workspace template file is a pre-configured template file that supports dynamic modification, by obtaining the target template file, parsing and dynamically compiling it, the system can automatically create the corresponding cloud software development environment with one click based on the request. It is adaptable to various software development requests and can generate corresponding cloud workspaces accordingly. The development environment creation efficiency is high and can meet multiple development needs at the same time. It supports dynamic modification of the workspace template file and correspondingly supports parsing and dynamically compiling the dynamically modified target template file. It has the effect of updating the cloud software development environment in real time in response to the dynamic modification of the target template file.
[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0020] Figure 1 This is a system architecture diagram illustrating a method for creating a cloud development environment according to an exemplary embodiment.
[0021] Figure 2 This is a flowchart illustrating a method for creating a cloud development environment according to an exemplary embodiment.
[0022] Figure 3 This is a schematic diagram illustrating the implementation process of a method for creating a cloud development environment according to an exemplary embodiment.
[0023] Figure 4 This is a schematic diagram illustrating the content structure of a workspace template file according to an exemplary embodiment.
[0024] Figure 5 This is a flowchart illustrating a method for creating a cloud development environment according to another exemplary embodiment.
[0025] Figure 6 This is a detailed implementation flowchart of step S220 according to an exemplary embodiment.
[0026] Figure 7 This is a flowchart illustrating a method for creating a cloud development environment according to yet another exemplary embodiment.
[0027] Figure 8 This is a detailed implementation flowchart of step S230 according to an exemplary embodiment.
[0028] Figure 9 This is a block diagram illustrating an apparatus for creating a cloud development environment according to an exemplary embodiment.
[0029] Figure 10 This is a block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0030] The exemplary embodiments will now be described in detail with reference to the accompanying drawings.
[0031] It should be noted that the relevant embodiments and accompanying drawings are only for describing and illustrating exemplary embodiments provided by this disclosure, and not all embodiments of this disclosure, nor should this disclosure be understood to be limited to the relevant exemplary embodiments.
[0032] It should be noted that the terms "first," "second," etc., used in this disclosure are only used to distinguish different steps, devices, or modules. These terms do not represent any specific technical meaning, nor do they indicate any order or interdependence between them.
[0033] It should be noted that the terms “a,” “a plurality of,” and “at least one” used in this disclosure are illustrative rather than restrictive. Unless otherwise expressly indicated in the context, they should be understood as “one or more.”
[0034] It should be noted that the term "and / or" used in this disclosure is used to describe the relationship between related objects, and generally indicates that there are at least three relationships. For example, A and / or B can at least indicate: the existence of A alone, the existence of both A and B, and the existence of B alone.
[0035] It should be noted that the various steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Unless otherwise specified, the scope of this disclosure is not limited by the order in which the steps are described in the relevant embodiments.
[0036] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.
[0037] Technical Terminology Explanation
[0038] Integrated Development Environment (IDE): An integrated environment that provides developers with features such as source code editing, code completion, compiler, and debugger to improve developer efficiency.
[0039] The cloud refers to the server that supports elastic resource allocation; for example, it can be a distributed service cluster or a node in a distributed service cluster, and resources can be allocated from a large number of integrated and virtualized physical servers.
[0040] Cloud-based development: Developers are freed from the limitations of local computers and can develop software in the cloud through a browser.
[0041] Cloud workspace: A working environment for developers in the cloud, mainly providing a cloud-based development environment including cloud-based code writing, compilation, running and debugging.
[0042] Containers: In software development, containers are standard software packages used to isolate software from hardware platforms. They can also be understood as lightweight virtual machines.
[0043] K8s: Kubernetes is a container orchestrator launched by Google for managing containerized applications on multiple hosts in a cloud platform, that is, orchestrating containers in the cloud.
[0044] EMF stands for Eclipse Modeling Framework, a modeling framework provided by the Eclipse community. It offers metamodel-driven system modeling technology, including model building, automatic code generation, and model validation.
[0045] Because different software has different dependencies on hardware, operating systems, and middleware, it is difficult for a single IDE environment to meet the needs of developing multiple software systems. Moreover, as the complexity of software systems increases, creating a suitable development environment becomes very difficult and inefficient.
[0046] For example, taking vehicle software development as an example, software development involves knowledge and experience in related fields such as vehicle architecture, vehicle working principles, hardware circuits, and vehicle-to-everything (V2X) communication. The setup of the development environment also becomes very complex. Moreover, different vehicle software requires different development environments, making it impossible to quickly and efficiently build a development environment that is suitable for different software development needs.
[0047] With the development of distributed services, more advantageous options have been provided for data processing, storage, and software development. The expectation is to build development environments in the cloud that are compatible with the needs of different software applications, leveraging the flexibility of cloud resources to overcome the drawback of deploying a local development environment that can only be adapted to one type of software.
[0048] Current container-based development environment creation methods cannot meet the needs of cloud development, especially the technical problem of multiple workspaces working simultaneously in the cloud. Some cloud-based development environment creation solutions have technical problems such as low creation efficiency and inability to update cloud workspaces during development.
[0049] In view of the above, embodiments of this disclosure provide a method, apparatus, electronic device, and storage medium for creating a cloud development environment. This method can automatically create a corresponding cloud software development environment with one click based on software development requests. It is adaptable to various software development requests and can adaptively generate corresponding cloud workspaces. The creation efficiency of the development environment is high and it can simultaneously meet multiple development needs. It supports updating the workspace template file during software development and has the effect of updating the cloud software development environment in real time in response to dynamic modifications of the target template file, thereby improving the update efficiency and configuration flexibility of the software development environment.
[0050] Figure 1 This is a system architecture diagram illustrating a method for creating a cloud development environment according to an exemplary embodiment.
[0051] Reference Figure 1As shown, the system architecture 100 applicable to the method for creating a cloud development environment disclosed herein includes: a terminal device 110, a network 120, and a server 130.
[0052] Terminal device 110 is an electronic device with a display screen, which can have a browser or online software development applications installed, enabling users to conduct cloud-based software development using the browser or online software development applications. For example, terminal device 110 includes, but is not limited to: desktop computers, laptops, smartphones, tablets, etc.
[0053] For scenarios where different users have different development needs or the same user has multiple development needs, in Figure 1 The example uses User 101's primary software development need to develop an application (APP1) and User 102's secondary software development need to develop an application (APP2). Other scenarios can be understood similarly. These software development needs can relate to software development in various fields, such as the automotive industry, including: autonomous driving function application development, vehicle vision function application development, and in-vehicle navigation application development.
[0054] Server 130 is used to provide software development-related service support for the browser or online software development application, such as a cloud server. In some embodiments, server 130 may include: a server that supports elastic resource allocation; for example, it may be a distributed service cluster or a node in a distributed service cluster, and the resources may be allocated from a large number of integrated virtualized physical servers. For example, server 130 may be a Kubernetes service cluster.
[0055] Network 120 is the medium that provides a communication link between terminal device 110 and server 130. Network 120 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0056] In one implementation scenario, a user logs in to a cloud development account using a browser or online software development application on a terminal device 110. While logged in, the user can communicate with the server 130 via network 120 to call the software development services provided by the server 130.
[0057] The server 130 executes the method for creating a cloud development environment provided in this embodiment of the disclosure to generate a cloud software development environment. This generates a cloud workspace for software development, which is then presented to the user on the terminal device 110. This workspace includes, for example, an operating system (e.g., Linux, Windows, Mac, Chrome OS), development tools for preset languages (e.g., Python, Java, JavaScript, C, C++, C#, PHP, JSP, etc.), compiler components, debugger components, and editor plugins. Editor plugins may include, for example, text error correction plugins and syntax checking plugins.
[0058] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown in this document is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included. The following describes the method for creating a cloud development environment provided in this disclosure, using specific embodiments.
[0059] Exemplary methods
[0060] Figure 2 This is a flowchart illustrating a method for creating a cloud development environment according to an exemplary embodiment. (Refer to...) Figure 2 As shown, in some embodiments, the method for creating a cloud development environment includes the following steps: S210, S220, S230, and S240. The above method can be derived from... Figure 1 The server 130 in the illustrated system architecture 100 is used for execution.
[0061] In step S210, a software development request initiated by the terminal device is received.
[0062] Reference Figure 1 As shown, in an exemplary implementation scenario, user 101 logs in to a cloud account through a browser or online software development application on a terminal device, and initiates a first request to the server to develop the first application APP1 by clicking the function button to create a new development project P1 or the login interface. The development project P1 is used to develop the software of the first application APP1.
[0063] Similarly, user 102 can also log in to their cloud account through a browser on their terminal device or an online software development application, and initiate a second request to the server to develop a second application APP2 by clicking the "Create New Development Project P2" function button or the login interface. For example, development project P1 is a project to develop an autonomous driving function application (an example of the first application APP1), and development project P2 is a project to develop an in-vehicle navigation application (an example of the second application APP2).
[0064] Users 101 and 102 mentioned above can be software engineers or other software development personnel. In real-world scenarios, this could mean one user has a need to develop multiple software programs, different users have a need to develop different software programs, or multiple users have a need to collaboratively develop one software program.
[0065] Correspondingly, the server receives a software development request initiated by the terminal device, which can be a single request or multiple concurrent requests.
[0066] In step S220, a target template file adapted to the above request is obtained from the workspace template file library. The workspace template file library includes at least one workspace template file, which is a pre-configured template file that supports dynamic modification.
[0067] The server-accessible database contains a workspace template file library, which includes at least one workspace template file. This database can be a database provided by the server or a database that the server can remotely access. The workspace template file is a template file conforming to a preset system specification format and contains information used to create the workspace. For example, it could be a template file conforming to the devfile specification format (in Linux systems, any device and interface exists as a file in the / dev directory, therefore it needs to conform to the devfile specification format, or be described as a devfile standard).
[0068] The target template file is obtained from the workspace template file library and is adapted to the request. For example, for the first request to develop an autonomous driving function application, the target template file adapted to the first request is target template file M1; for the second request to develop an in-vehicle navigation application, the target template file adapted to the second request is target template file M2.
[0069] In the embodiments of this disclosure, the workspace template files in the workspace template file library are pre-configured by the user. This pre-configuration is reflected before the corresponding cloud software development environment is generated, and can be performed at one or more of the following times: before the user initiates a software development request through a terminal device; or between initiating a software development request and the creation of the corresponding cloud software development environment.
[0070] For example, in some implementation scenarios, before creating a new development project P1, user 101 can pre-configure a personalized workspace template file required for developing the first application APP1 and save the configured workspace template to the server-side workspace template file library. After creating the new development project P1, the required personalized workspace template file can be retrieved from the workspace template file library. In other implementation scenarios, user 101 has not configured their own required workspace template file, but a similar workspace template file has already been pre-configured by user 102. In this case, after creating the new development project P1, user 101 can filter the personalized workspace template file required for developing the first application APP1 from the workspace template file library and retrieve that personalized workspace template file. In still other implementation scenarios, if the workspace template file in the workspace template file library is not compatible with the development project P1 after user 101 creates the new development project P1, user 101 can edit the configuration online to obtain their own required workspace template. This online editing and configuration process also serves as a pre-configuration for generating the corresponding cloud software development environment.
[0071] The above-mentioned workspace template file is a template file that supports dynamic modification. This dynamic modification is reflected in the following aspects: (1) The workspace template file can be modified by the user during the pre-configuration process; (2) The workspace template file can be modified by the user after it is pre-configured and stored in the workspace template library; (3) After the workspace template file is used as the target template file adapted to the request to create a cloud software development environment, the user can modify the workspace template file during the software development process based on the cloud software development environment.
[0072] In step S230, the target template file is parsed and dynamically compiled to obtain the workspace interface configuration file.
[0073] For example, in response to the first request mentioned above, the target template file M1 is parsed, and then the parsed result is dynamically compiled to obtain the workspace interface configuration file J. M1 Regarding the second request mentioned above, the target template file M2 is parsed, and then the parsed result is dynamically compiled to obtain the workspace interface configuration file J. M2 .
[0074] The aforementioned workspace interface configuration file is a file containing various information about the workspace that conforms to the interface specification. This interface specification enables the server to recognize the aforementioned information.
[0075] By parsing and dynamically compiling the target template file, the target template file in the preset system specification format is converted into a workspace interface configuration file that conforms to the server interface specification.
[0076] Dynamic compilation processing is manifested in the following ways: for dynamic modifications to the target template file, a real-time response will be provided to the modified target template file. For example, taking the example step (3) of dynamic modification mentioned above, when a certain workspace template file M is used as the target template file adapted to the request, after a cloud software development environment is created based on the target template file, during the process of software development based on the cloud software development environment, such as during code writing or code debugging, the user can modify the workspace template file M. After the user modifies the workspace template file M, the modified workspace template file M' is obtained. Based on dynamic compilation processing, the workspace interface configuration file corresponding to the workspace template file M' can be obtained. That is, based on dynamic compilation processing, the target template file modified in real time can be parsed and compiled in real time to obtain the workspace interface configuration file corresponding to the updated target template file, and the updated cloud software development environment can be generated accordingly. It has the effect of responding to the dynamic modification of the target template file and making the updated cloud software development environment effective in real time.
[0077] In step S240, a cloud-based software development environment adapted to the above request is created based on the workspace interface configuration file.
[0078] The server uses the workspace interface configuration file J M1 Create a cloud-based software development environment SDE1 adapted to the first request, based on the workspace interface configuration file J. M2 Create a cloud-based software development environment (SDE2) adapted to the second request.
[0079] According to the method provided in this disclosure embodiment, after the cloud software development environment is created, if the user has an update requirement for the cloud software development environment, they only need to update the workspace template file. Since the compilation process is executed dynamically, the cloud software development environment is dynamically updated after the workspace template file is updated. In actual scenarios, the template can be modified during the software development process based on the cloud software development environment.
[0080] Figure 3 This is a schematic diagram illustrating the implementation process of a method for creating a cloud development environment according to an exemplary embodiment.
[0081] In the embodiments of this disclosure, the user can pre-configure the workspace template file on the terminal device and support dynamic modification, including: after the cloud software development environment is created, the user can modify the workspace template during the software development process in the cloud software development environment, and the modification will take effect in real time according to the dynamic compilation process to generate the corresponding updated cloud software development environment.
[0082] Continuing with the previous descriptions of the various stages of dynamic modification, here we refer to... Figure 3 This section provides a detailed description of an exemplary dynamic modification process. (Refer to...) Figure 3 As shown by the solid single arrow, in the embodiments of this disclosure, by executing steps S210 to S240, a cloud development environment corresponding to the request is generated, and a cloud workspace required for software development is presented to the user on the terminal device 110, including: an operating system (e.g., a Linux operating system), development tools for a preset language (e.g., the Python programming language), compiler components, debugger components, and editor plugins, etc. The editor plugins include, for example, a syntax checking plugin.
[0083] Reference Figure 3 As indicated by the solid double arrows, once the cloud development environment is created, users can use the development tools in the cloud workspace displayed on their terminal devices to edit code, thus entering the software development process. During this process, there are scenarios where the cloud development environment needs to be updated. For example, the user may see that the currently displayed cloud workspace is missing certain components or editor plugins, or that the attribute information of some components needs to be modified. The method provided in this embodiment supports dynamic modification of the workspace template file, and the corresponding cloud development environment will take effect immediately. For example, refer to... Figure 3 As shown by the dashed arrow, during the software development process, users are allowed to modify the workspace templates in the workspace template library. Correspondingly, since the workspace templates in the workspace template library are updated by users as needed, the target template file obtained in step S220 is the updated template file. In step S230, the updated target template file is parsed and dynamically compiled to obtain the workspace interface configuration file corresponding to the updated target template file. Correspondingly, the cloud development environment generated in step S240 is the updated cloud development environment.
[0084] In embodiments including steps S210 to S240, since the workspace template file is a pre-configured template file that supports dynamic modification, by obtaining the target template file, parsing and dynamically compiling the target template file, a workspace interface configuration file is obtained. Based on the workspace interface configuration file, a cloud-based software development environment adapted to the above request is created. This enables the automatic creation of the corresponding cloud-based software development environment with one click, adapting to various software development requests and generating corresponding cloud-based workspaces. The development environment creation efficiency is high and can simultaneously meet various development needs. It supports dynamic modification of the workspace template file and correspondingly supports parsing and dynamically compiling the dynamically modified target template file. It has the effect of updating the cloud-based software development environment in real time in response to the dynamic modification of the target template file, thereby improving the update efficiency and configuration flexibility of the software development environment.
[0085] Figure 4 This is a schematic diagram illustrating the content structure of a workspace template file according to an exemplary embodiment.
[0086] In some embodiments, refer to Figure 4 As shown, the workspace template file 400 includes: metadata information 401, component information 402, and editor plugin information 403. The metadata information 401 includes: metadata information of the workspace template file (hereinafter referred to as the template file), and metadata information of the objects and object relationships contained in the workspace template file; the component information 402 includes: functional module information for software development in the objects; and the editor plugin information 403 includes: extended function plugin information for software development in the objects.
[0087] For example, the aforementioned metadata information includes, but is not limited to: metadata information of template files, such as: template identifier, template version number, template type, template storage location, etc.; metadata information of each object, metadata information of object relationships; metadata information of functional modules, such as: display attributes of function buttons (toolbar, menu, new dialog box) for creating software projects, names and address information of files required for creating software projects (such as operating system image files, development language packs, etc.).
[0088] The aforementioned component information includes, but is not limited to, the following functional module information: a function menu for creating software development projects, a code editing box, an information drop-down selection box, a compilation function module, a debugging function module, etc.
[0089] The editor plugin information mentioned above includes, but is not limited to, the following extended function plugin information: text error correction plugin, syntax checking plugin, etc.
[0090] The aforementioned objects include, but are not limited to, at least one of the following: components, editor plugins, etc.; the aforementioned object relationships include, but are not limited to, the layout relationships between objects corresponding to tree nodes, and the subordinate relationships in object content. For example, object relationships include: the layout relationship between the function menu for creating a software development project and the code editing box; the layout relationship between the information drop-down selection box and the code editing box; and the content introduction relationship, such as the content introduction relationship where, when a user selects a target information in the information drop-down selection box, that target information appears in the code editing box; and the subordinate relationship between the syntax checking plugin and the compilation function module, etc.
[0091] During the research and development process, it was also found that the cloud workspace is generated by configuration files. The configuration files themselves are difficult to write and are prone to various problems during the writing process. After registration, the compiled workspace may not match the expected requirements. When updating, it is difficult to find the problem, and the update process is cumbersome and inefficient.
[0092] The common approach to writing workspace templates for cloud development environments is to provide files in YAML (a highly readable format used for data serialization) or JSON (a lightweight data exchange format). Even with schema constraints (a schema is an abstract collection of metadata containing a set of metadata components: primarily element and attribute declarations, and definitions of complex and simple data types), writing YAML and JSON files remains very complex.
[0093] In view of this, the embodiments of this disclosure further improve the process of generating workspace template files by generating corresponding workspace template files in the form of a graphical editing interface based on user editing operation instructions, reducing the difficulty of writing template files and improving the flexibility of the template configuration process, which helps to improve the efficiency of creating or updating cloud development environments.
[0094] Figure 5 This is a flowchart illustrating a method for creating a cloud development environment according to another exemplary embodiment.
[0095] Reference Figure 5 As shown, in some embodiments, the method for creating a cloud development environment includes, in addition to the steps S210 to S240 described above, a step of generating a workspace template file, specifically including the following steps: S510, S520, and S530. The method provided in this embodiment is executed by the server.
[0096] In some embodiments, the workspace template files generated by executing steps S510 to S530 are stored in the workspace template file library. Steps S510 to S530 may be executed before steps S210 or S220, and are workspace template files pre-stored in the workspace template file library.
[0097] In step S510, an editing operation instruction is obtained. The editing operation instruction is the instruction received by the terminal device in the graphical editing interface of the template file. The graphical editing interface is a visual interface obtained by the object description model performing automatic code generation function. The object description model includes object meta-information used to write workspace templates.
[0098] The graphical editing interface of the template file is presented on the terminal device. Through network communication between the server and the terminal device, the editing operation instructions received by the terminal device in the graphical interface can be obtained.
[0099] This graphical editing interface presents object metadata in a tree structure. Each node in the tree represents an object, and the attribute information of the node is the object's metadata. The connections between nodes represent the object relationships between objects, and the attribute information of the connections is the metadata of the object relationships. Objects include components and editor plugins.
[0100] In one embodiment, the object description model described above can be obtained by parsing a standard metafile (e.g., a schema file) that conforms to a preset system specification format (e.g., conforming to the devfile standard). The schema file conforming to the devfile standard is described as a devfileschema standard metafile. Parsing the devfileschema standard metafile yields an EMF model (EMF provides metamodel-driven system modeling technology, including model building, automatic code generation, model validation, etc.; the EMF model serves as an example of an object description model). This parsing performs format correctness checks; if the format conforms to the standard, the validation passes.
[0101] In the method provided in this disclosure, a visual graphical editing interface is generated using an EMF model (an example of an object description model) parsed from a standard metafile (e.g., a devfile schema). Since the interface is automatically generated based on the devfile schema and EMF model, it is a standardized initial graphical interface containing content conforming to the devfile standard, such as default settings for components and editor plugins, as well as default layout and style information. Users can adjust the required components, editor plugins, layouts, and styles in the initial graphical interface to obtain their desired personalized template file; alternatively, they can choose not to adjust and directly use all the default configurations on the graphical interface. If the default settings are selected, a standard template file is generated.
[0102] In this graphical editing interface, users can configure template information and obtain the required workspace template file by dragging and dropping nodes (e.g., dragging desired nodes into the tree structure, or modifying existing nodes in the tree structure), modifying node attribute information, and changing the layout between nodes. In other words, the process of configuring the development environment is achieved through editing commands in the graphical editing interface of the terminal device (e.g., dragging tree nodes in the generated graphical interface, editing node attributes, etc.) to configure the components and / or editor plugins of the development environment they need.
[0103] This method of generating workspace templates using a graphical editing interface can effectively reduce the difficulty of writing template files and improve the flexibility of the template configuration process, which helps to improve the efficiency of creating or updating cloud development environments.
[0104] In step S520, workspace template configuration information is generated or updated according to the above editing operation instructions.
[0105] The editing operation instructions include one or more of the following: a first editing operation instruction for creating a new workspace template file, and a second editing operation instruction for updating an existing workspace template file. In some embodiments, workspace template configuration information is generated according to the first editing operation instruction. In some embodiments, the workspace template configuration information is updated according to the second editing operation instruction.
[0106] In step S530, a workspace template file is generated based on the workspace template configuration information described above.
[0107] Based on the above steps S510 to S530, by obtaining the editing operation instructions from the graphical editing interface, the corresponding workspace template file can be generated according to the user's editing operation instructions. This method helps to reduce the difficulty of writing template files and improve the flexibility of the template configuration process, thereby increasing the efficiency of creating or updating cloud development environments.
[0108] Figure 6 This is a detailed implementation flowchart of step S220 according to an exemplary embodiment.
[0109] In some embodiments, the request carries development environment description information for the software to be developed; the workspace template files in the workspace template file library are bound to the appropriate software development environment description information.
[0110] The aforementioned development environment description information includes, but is not limited to, one or more of the following: software identifier, software type, and the functions to be implemented by the software. For example, the description information carried in the first request is: autonomous driving (taking the functions to be implemented by the software as an example); the description information carried in the second request is: in-vehicle navigation (taking the functions to be implemented by the software as an example).
[0111] Reference Figure 6 As shown in the solid line box, step S220 above involves obtaining a target template file adapted to the above request from the workspace template file library, including the following steps: S610, S620a, and S630a.
[0112] In step S610, based on the development environment description information carried in the above request, target software description information that matches the above development environment description information is filtered from the software development environment description information bound to the above workspace template file.
[0113] In step S620a, in response to the above target software description information being filtered out, the workspace template file corresponding to the above target software description information is determined to be the target template file that is compatible with the above request;
[0114] In step S630a, the target template file is obtained from the target file library in the workspace.
[0115] Based on the above steps S610, S620a and S630a, the target software description information that matches the development environment description information carried in the request can be filtered according to the software development environment description information bound to the workspace template file. If the target software description information can be filtered out, it means that there is a target template file in the workspace template file library that is compatible with the request. The workspace template file bound to the target software description information can then be obtained as the target template file.
[0116] When there are multiple workspace template files corresponding to the target software description information, one embodiment is to offer all multiple workspace template files as options for the user to select from as the target template file.
[0117] In other embodiments, reference is made to Figure 6 As shown, step S220 includes: S610, S620b, S630b, S640b and S650b.
[0118] In yet other embodiments, reference is made to Figure 6 As shown in the dashed box, in addition to steps S610, S620a and S630a, step S220 also includes the following steps: S620b, S630b, S640b and S650b.
[0119] In step S620b, in response to the inability to filter the above-mentioned target software description information, an instruction is sent to the above-mentioned terminal device to jump to the graphical editing interface of the template file.
[0120] In some embodiments, in response to the inability to filter the target software description information, a prompt message indicating that the target template file does not exist can be sent to the terminal device, and an instruction to jump to the graphical editing interface of the template file can also be sent to the terminal device. On the terminal device, while jumping to the graphical editing interface of the template file, the prompt message indicating that the target template file does not exist is also displayed, prompting the user to create the required template file in the graphical editing interface that appears.
[0121] In step S630b, the interface editing operation instructions of the above-mentioned graphical editing interface are obtained.
[0122] The interface editing operation instructions mentioned above include at least one of the following instructions: adding or deleting objects contained in the graphical editing interface (e.g., the standardized initial graphical interface mentioned above), modifying the object relationships between objects contained in the graphical editing interface mentioned above, and modifying the metadata of the objects or the object relationships mentioned above; the objects mentioned above include one or more of the following: components and editor plugins.
[0123] In this embodiment, in order to distinguish the description of different configuration stages, the editing operation instructions received on the graphical editing interface after the jump in this embodiment are described as interface editing operation instructions. The interface editing operation instructions received by the graphical editing interface are essentially the same as the editing operation instructions in the aforementioned step S510. The only difference is that the aforementioned step S510 occurs before step S210 or S220, while step S630b occurs during the execution of step S220.
[0124] In step S640b, the configuration information for the new workspace template is generated according to the above-mentioned interface editing operation instructions.
[0125] To distinguish it from the workspace template configuration information in step S520 described in the foregoing embodiments, the workspace template configuration information generated based on the redirected interface in this embodiment is described as new workspace template configuration information. This embodiment differs from the execution phase of the foregoing embodiments including steps S510-S530, but is essentially similar; in the embodiments including steps S510-S530, execution occurs before step S210 or step S220 corresponding to receiving the software development request; in this embodiment, steps S630b, S640b, and S650b are implemented during the execution of step S220.
[0126] In step S650b, a new workspace template file is generated and stored in the workspace template file library based on the above-mentioned new workspace template configuration information.
[0127] In embodiments including steps S620b, S630b, S640b, and S650b, during the process of creating a cloud-based software development environment upon receiving a software development request, if the target software description information cannot be found, it indicates that the target template file matching the request does not exist in the workspace template file library. At this time, the server sends an instruction to the terminal device to jump to the graphical editing interface of the template file, causing the terminal device to jump to the graphical editing interface of the template file. The user can input editing operation instructions in the graphical editing interface (the input method can be dragging nodes, editing node attribute information, etc.). By obtaining the interface editing operation instructions of the graphical editing interface, new workspace template configuration information is generated, and a new workspace template file is generated and stored in the aforementioned workspace template file library based on the new workspace template information.
[0128] In some embodiments, the newly created workspace template file is directly used as the target template file; when the newly created workspace template file is used as the target template file, steps S230 and S240 described above are executed.
[0129] Figure 7 This is a flowchart illustrating a method for creating a cloud development environment according to yet another exemplary embodiment.
[0130] In some embodiments, the newly created workspace template file described above serves as a candidate target template file. (Refer to...) Figure 7 As shown, when the newly created space template file is used as the candidate target template file, the following steps are performed: S710 and S720.
[0131] In step S710, the above candidate target template files are parsed and dynamically compiled to obtain candidate workspace interface configuration files.
[0132] In step S720, a candidate cloud software development environment is created based on the aforementioned candidate workspace interface configuration file. The aforementioned candidate cloud software development environment serves as a development environment option for displaying on the aforementioned terminal device in response to the aforementioned request.
[0133] In this embodiment, the candidate target template file is an intermediate template file compared to the target template file. If the user does not need to modify it, the candidate target template file becomes the target template file. Generally, during the creation of a software development environment, it is difficult for R&D engineers to build a template file that satisfies them in one go. The embodiments including steps S620b, S630b, S640b, and S650b are steps implemented during the execution of a software development request. Therefore, it is necessary to ensure the timeliness of the request response. Using the newly created space template file as the candidate target template file yields a development environment option for the above request: a candidate cloud software development environment.
[0134] In some embodiments, the user also needs to further modify the candidate target template file based on the effect of the cloud workspace presented by the terminal device. In this scenario, the method for creating a cloud development environment includes, in addition to the above steps S210, {S610, S620b, S630b, S640b and S650b (corresponding to an embodiment of S220)}, S710 and S720, steps S730, S740 and S750 (shown in the dashed box). Then, for the updated target template file obtained in step S750, steps S230 and S240 are executed, referring to... Figure 7 As shown, for the sake of simplicity, only steps S710 to S750 are illustrated.
[0135] In step S730, an update instruction for updating the candidate target template file is obtained. The update instruction is the instruction received by the terminal device in the graphical editing interface.
[0136] The update instructions include at least one of the following: instructions to add objects contained in the candidate target template file, instructions to delete objects contained in the candidate target template file, instructions to modify the object relationships between objects contained in the candidate target template file, instructions to modify the metadata information of the objects, and instructions to modify the metadata information of the object relationships; the objects include at least one of the following: components and editor plugins.
[0137] In step S740, according to the above update instruction, at least one of the metadata information, component information, or editor plugin information of the newly created workspace template configuration information is updated.
[0138] In step S750, the target template file is generated based on the updated new workspace template configuration information.
[0139] These steps S730 to S750 can occur during the software development process, which can be referred to the aforementioned... Figure 3 Description of the illustrative embodiments.
[0140] In the embodiments including steps S710 to S750, it is possible to modify the newly created workspace template that is configured in real time during the creation of the software development environment (not pre-set, unlike the embodiments including steps S510 to S530) during the software development process, thereby improving the efficiency of creating and updating the cloud development environment and enhancing the flexibility of the configuration stage and process of the software development workspace.
[0141] Figure 8 This is a detailed implementation flowchart of step S230 according to an exemplary embodiment.
[0142] In some embodiments, the workspace template file includes metadata information, component information, and editor plugin information.
[0143] Reference Figure 8 As shown, in step S230 above, the target template file is parsed and dynamically compiled to obtain the workspace interface configuration file, including the following steps: S810, S820 and S830.
[0144] In step S810, the metadata information, component information, and editor plugin information of the target template file are parsed to obtain metadata parsing information, component parsing information, and plugin parsing information.
[0145] The parsing process in step S810 refers to parsing the content of the target template file.
[0146] In step S820, the above metadata parsing information, the above component parsing information, and the above plugin parsing information are dynamically compiled to obtain workspace interface configuration information.
[0147] In some embodiments, the metadata parsing information, component parsing information, and plugin parsing information are dynamically compiled to obtain workspace interface configuration information, including: dynamically compiling the metadata parsing information to obtain workspace template interface metadata information and workspace interface metadata information; dynamically compiling the component parsing information to obtain workspace template interface component information and workspace interface component information; and dynamically compiling the plugin parsing information to obtain workspace template interface plugin information and workspace interface plugin information; the workspace interface configuration information includes the workspace template interface metadata information, the workspace interface metadata information, the workspace template interface component information, the workspace interface component information, the workspace template interface plugin information, and the workspace interface plugin information.
[0148] The information described in the workspace template interface metadata, workspace template interface component information, and workspace template interface plugin information are all information of the workspace template that conforms to the server-side interface specification (including metadata, components, and editor plugins); the information described in the workspace interface metadata, workspace interface component information, and workspace interface plugin information (including metadata, components, and editor plugins) are all information of the workspace that conforms to the interface specification, enabling the server to recognize the above information.
[0149] The information in a workspace template that conforms to the server-side interface specification is described from the template dimension, including: template attribute information (template metadata), as well as template information such as layout information and style information; the information in a workspace that conforms to the server-side interface specification is described from the content dimension, including metadata information contained in the cloud development environment, object information (including components and editor plugins, etc.), object relationship information, etc.
[0150] In step S830, a workspace interface configuration file is generated based on the workspace interface configuration information described above.
[0151] Based on the above steps S810 to S830, the dynamic compilation of the target template file is divided into three stages: metadata compilation, component compilation, and editor plugin compilation. These three stages convert the metadata, components, and editor plugins from the preset system specification format (e.g., a format conforming to the devfile standard) into the interface format of the workspace template and the interface format of the workspace, respectively. By performing dynamic compilation on the target template file, the ability to dynamically generate workspace interface configuration files is realized, thereby enabling users to dynamically modify the workspace template file to make changes to the cloud software development environment (which can also be described as a cloud workspace).
[0152] Exemplary device
[0153] Figure 9 This is a block diagram illustrating an apparatus for creating a cloud development environment according to an exemplary embodiment. (Refer to...) Figure 9 As shown in the embodiments of this disclosure, the apparatus 900 for creating a cloud development environment includes: a request receiving module 910, a template file acquisition module 920, a dynamic compilation module 930, and a development environment creation module 940.
[0154] The aforementioned request receiving module 910 is used to receive software development requests initiated by the terminal device.
[0155] The template file acquisition module 920 is used to acquire a target template file that is compatible with the above request from the workspace template file library. The workspace template file library includes at least one workspace template file, which is a pre-configured template file that supports dynamic modification.
[0156] The aforementioned dynamic compilation module 930 is used to parse and dynamically compile the aforementioned target template file to obtain the workspace interface configuration file.
[0157] The aforementioned development environment creation module 940 is used to create a cloud-based software development environment adapted to the aforementioned request based on the aforementioned workspace interface configuration file.
[0158] In some embodiments, the apparatus 900 further includes: a first template generation module, configured to pre-generate a workspace template file. The pre-generated workspace template file is stored in a workspace template file library, serving as a pre-stored workspace template file in the workspace template file library before receiving a request.
[0159] The first template generation module includes: a first editing instruction acquisition module, a first configuration module, and a first template file generation module.
[0160] The aforementioned first editing instruction acquisition module is used to acquire editing operation instructions, which are instructions received by the terminal device in the graphical editing interface of the template file; the aforementioned graphical editing interface is a visual interface obtained by the object description model performing automatic code generation function, and the aforementioned object description model includes object meta-information used to write workspace templates.
[0161] The first configuration module is used to generate or update workspace template configuration information according to the above editing operation instructions.
[0162] The first template file generation module is used to generate a workspace template file based on the workspace template configuration information.
[0163] In some embodiments, the template file acquisition module 920 includes: a description information filtering module, and at least one group of the following modules: {template file determination module, template file acquisition module} or {jump instruction sending module, second template generation module}.
[0164] The aforementioned description information filtering module is used to filter target software description information that matches the development environment description information carried in the aforementioned request from the software development environment description information bound to the aforementioned workspace template file.
[0165] The template file determination module is used to determine, in response to the above target software description information being filtered, the workspace template file corresponding to the above target software description information as a target template file that is compatible with the above request.
[0166] The template file acquisition module allows users to obtain the target template file from the target file library in the workspace.
[0167] The aforementioned jump instruction sending module is used to send an instruction to the aforementioned terminal device to jump to the graphical editing interface of the template file in response to the inability to filter the aforementioned target software description information.
[0168] The second template generation module described above is used to generate a new workspace template file based on the editing operation instructions in the redirected graphical editing interface. This new workspace template file can be generated during the request processing.
[0169] The aforementioned second template generation module includes: a second editing instruction acquisition module, a second configuration module, and a second template file generation module.
[0170] The second editing instruction acquisition module is used to acquire the interface editing operation instructions of the graphical editing interface.
[0171] The second configuration module mentioned above is used to generate configuration information for a new workspace template based on the editing operation instructions in the interface.
[0172] The second template file generation module is used to generate a new workspace template file and store it in the workspace template file library based on the new workspace template configuration information.
[0173] In some embodiments, the newly created workspace template file is directly used as the target template file.
[0174] In some embodiments, the aforementioned new workspace template file serves as a candidate target template file.
[0175] When the newly created space template file is used as the candidate target template file, the dynamic compilation module 930 is also used to: parse and dynamically compile the candidate target template file to obtain the candidate workspace interface configuration file.
[0176] In the case where the aforementioned newly created workspace template file serves as the aforementioned candidate target template file, the aforementioned development environment creation module 940 is further configured to: create a candidate cloud software development environment based on the aforementioned candidate workspace interface configuration file, wherein the aforementioned candidate cloud software development environment serves as a development environment option for display on the aforementioned terminal device in response to the aforementioned request.
[0177] In this embodiment, the candidate target template file is an intermediate template file compared to the target template file. If the user does not need to modify it, the candidate target template file becomes the target template file.
[0178] In some embodiments, the user may further modify the candidate target template file based on the effect of the cloud workspace presented by the terminal device. In this embodiment, the second editing instruction acquisition module in the second template generation module is further configured to: acquire an update instruction for updating the candidate target template file, wherein the update instruction is an instruction received by the terminal device in the graphical editing interface; the second configuration module in the second template generation module is further configured to: update at least one of the metadata information, component information, or editor plugin information of the new workspace template configuration information according to the update instruction; the second template file generation module in the second template generation module is further configured to: generate the target template file according to the updated new workspace template configuration information.
[0179] In some embodiments, the workspace template file includes metadata information, component information, and editor plugin information.
[0180] The aforementioned dynamic compilation module 930 includes: an information parsing module, a dynamic compilation module for parsing information, and an interface configuration file generation module.
[0181] The aforementioned information parsing module is used to parse and process the metadata information, component information, and editor plugin information of the target template file to obtain metadata parsing information, component parsing information, and plugin parsing information.
[0182] The aforementioned dynamic compilation module for parsing information is used to dynamically compile the aforementioned metadata parsing information, the aforementioned component parsing information, and the aforementioned plugin parsing information to obtain workspace interface configuration information.
[0183] The interface configuration file generation module described above is used to generate workspace interface configuration files based on the workspace interface configuration information described above.
[0184] The implementation details of each functional module included in the apparatus of this embodiment can be referred to the description of the first embodiment, and will not be repeated here.
[0185] Exemplary electronic devices
[0186] Figure 10 This is a block diagram illustrating an electronic device according to an exemplary embodiment. The electronic device 1000 may be a vehicle controller, an in-vehicle terminal, an in-vehicle computer, or other types of electronic devices, such as a desktop computer, a laptop computer, a smartphone, etc.
[0187] Reference Figure 10 The electronic device 1000 may include at least one processor 1010 and a memory 1020. The processor 1010 can execute instructions stored in the memory 1020. The processor 1010 is communicatively connected to the memory 1020 via a data bus. In addition to the memory 1020, the processor 1010 may also be communicatively connected to an input device 1030, an output device 1040, and a communication device 1050 via the data bus.
[0188] The processor 1010 can be any conventional processor, such as a commercially available CPU. The processor may also include graphics processing units (GPUs), field-programmable gate arrays (FPGAs), systems on chips (SoCs), application-specific integrated circuits (ASICs), or combinations thereof.
[0189] The memory 1020 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0190] In this embodiment of the present disclosure, the memory 1020 stores executable instructions, and the processor 1010 can read the executable instructions from the memory 1020 and execute the executable instructions to implement all or part of the steps of the method for creating a cloud development environment corresponding to any of the above exemplary embodiments or combinations thereof.
[0191] Exemplary computer-readable storage media
[0192] In addition to the methods and apparatus described above, exemplary embodiments of this disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product. The computer product includes computer program instructions that can be executed by a processor to perform all or part of the steps described in any of the methods in the exemplary embodiments described above.
[0193] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages, and scripting languages (e.g., Python). The program code can be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0194] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media include: static random access memory (SRAM) having one or more electrically connected wires, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk, or any suitable combination thereof.
[0195] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0196] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method of creating a cloud development environment, characterized by, Applied to the server side, the method includes: Receive software development requests initiated by terminal devices; Obtain a target template file adapted to the request from the workspace template file library, wherein the workspace template file library includes at least one workspace template file, which is a pre-configured template file that supports dynamic modification; the workspace template file includes: metadata information, component information, and editor plugin information, wherein the metadata information includes: metadata information of the workspace template file, and metadata information of the objects and object relationships contained in the workspace template file; the component information includes: functional module information of the objects used for software development; the editor plugin information includes: extended function plugin information of the objects used for software development; The target template file is parsed and dynamically compiled to obtain the workspace interface configuration file; Based on the workspace interface configuration file, a cloud-based software development environment adapted to the request is created; during the software development process based on this cloud-based software development environment, the updated cloud-based software development environment takes effect in real time in response to dynamic modifications to the target template file; The target template file is parsed and dynamically compiled to obtain a workspace interface configuration file, including: The metadata information, component information, and editor plugin information of the target template file are parsed to obtain metadata parsing information, component parsing information, and plugin parsing information; The metadata parsing information, the component parsing information, and the plugin parsing information are dynamically compiled to obtain workspace interface configuration information; Based on the workspace interface configuration information, generate a workspace interface configuration file; The metadata parsing information, the component parsing information, and the plugin parsing information are dynamically compiled to obtain workspace interface configuration information, including: The metadata parsing information is dynamically compiled to obtain workspace template interface metadata information and workspace interface metadata information; The component parsing information is dynamically compiled to obtain workspace template interface component information and workspace interface component information; The plugin parsing information is dynamically compiled to obtain workspace template interface plugin information and workspace interface plugin information; The workspace interface configuration information includes the workspace template interface metadata information, the workspace interface metadata information, the workspace template interface component information, the workspace interface component information, the workspace template interface plugin information, and the workspace interface plugin information.
2. The method of claim 1, wherein, Also includes: Obtain editing operation instructions, wherein the editing operation instructions are instructions received by the terminal device in the graphical editing interface of the template file; The graphical editing interface is a visual interface obtained by the automatic code generation function of the object description model. The object description model includes object meta-information for writing workspace templates. Generate or update workspace template configuration information according to the editing operation instructions; Based on the workspace template configuration information, a workspace template file is generated.
3. The method according to any one of claims 1-2, characterized in that, The request carries a description of the development environment of the software to be developed; the workspace template files in the workspace template file library are bound with the corresponding software development environment description information; The step of obtaining the target template file adapted to the request from the workspace template file library includes: Based on the development environment description information carried in the request, target software description information that matches the development environment description information is filtered from the software development environment description information bound to the workspace template file; In response to the selection of the target software description information, the workspace template file corresponding to the target software description information is determined to be a target template file that is compatible with the request; Obtain the target template file from the workspace template file library.
4. The method of claim 3, wherein, Also includes: In response to the inability to filter the target software description information, an instruction is sent to the terminal device to jump to the graphical editing interface of the template file; Obtain the interface editing operation instructions of the graphical editing interface; Based on the interface editing instructions, generate new workspace template configuration information; Based on the configuration information of the new workspace template, a new workspace template file is generated and stored in the workspace template file library.
5. The method of claim 4, wherein, The newly created workspace template file can be used as the target template file or as a candidate target template file. When the newly created workspace template file is used as the candidate target template file, the candidate target template file is parsed and dynamically compiled to obtain the candidate workspace interface configuration file; Based on the candidate workspace interface configuration file, a candidate cloud software development environment is created, which serves as a development environment option for display on the terminal device in response to the request.
6. The method of claim 5, wherein, Also includes: An update instruction is obtained to update the candidate target template file. The update instruction is an instruction received by the terminal device in the graphical editing interface. The update instruction includes at least one of the following: an instruction to add objects contained in the candidate target template file, an instruction to delete objects contained in the candidate target template file, an instruction to modify the object relationships between objects contained in the candidate target template file, an instruction to modify the metadata information of the objects, and an instruction to modify the metadata information of the object relationships. The objects include at least one of the following: components and editor plugins. According to the update instruction, at least one of the metadata information, component information, or editor plugin information of the newly created workspace template configuration information is updated; The target template file is generated based on the updated configuration information of the new workspace template.
7. An apparatus for creating a cloud development environment, the apparatus comprising: include: The request receiving module is used to receive software development requests initiated by the terminal device. The template file acquisition module is used to acquire a target template file that is compatible with the request from the workspace template file library. The workspace template file library includes at least one workspace template file, which is a pre-configured template file that supports dynamic modification. The workspace template file includes: metadata information, component information, and editor plugin information. The metadata information includes: metadata information of the workspace template file, and metadata information of the objects and object relationships contained in the workspace template file. The component information includes: functional module information of the objects used for software development. The editor plugin information includes: extended function plugin information of the objects used for software development. The dynamic compilation module is used to parse and dynamically compile the target template file to obtain the workspace interface configuration file; The development environment creation module is used to create a cloud-based software development environment adapted to the request based on the workspace interface configuration file; during the software development process based on this cloud-based software development environment, the updated cloud-based software development environment takes effect in real time in response to dynamic modifications of the target template file; The dynamic compilation module includes: The information parsing module is used to parse the metadata information, component information and editor plugin information of the target template file to obtain metadata parsing information, component parsing information and plugin parsing information; The dynamic compilation module for parsing information is used to dynamically compile the metadata parsing information, the component parsing information, and the plugin parsing information to obtain workspace interface configuration information. The interface configuration file generation module is used to generate a workspace interface configuration file based on the workspace interface configuration information. Specifically, the metadata parsing information, the component parsing information, and the plugin parsing information are dynamically compiled to obtain workspace interface configuration information, including: The metadata parsing information is dynamically compiled to obtain workspace template interface metadata information and workspace interface metadata information; The component parsing information is dynamically compiled to obtain workspace template interface component information and workspace interface component information; The plugin parsing information is dynamically compiled to obtain workspace template interface plugin information and workspace interface plugin information; The workspace interface configuration information includes the workspace template interface metadata information, the workspace interface metadata information, the workspace template interface component information, the workspace interface component information, the workspace template interface plugin information, and the workspace interface plugin information.
8. The apparatus of claim 7, wherein, Also includes: The first editing instruction acquisition module is used to acquire editing operation instructions, which are instructions received by the terminal device in the graphical editing interface of the template file; The graphical editing interface is a visual interface obtained by the automatic code generation function of the object description model. The object description model includes object meta-information for writing workspace templates. The first configuration module is used to generate or update workspace template configuration information according to the editing operation instructions; The first template file generation module is used to generate a workspace template file based on the workspace template configuration information.
9. The apparatus of any one of claims 7-8, wherein, The request carries a description of the development environment of the software to be developed; the workspace template files in the workspace template file library are bound with the corresponding software development environment description information; The template file acquisition module includes: The description information filtering module is used to filter target software description information that matches the development environment description information from the software development environment description information bound to the workspace template file, based on the development environment description information carried in the request. The template file determination module is used to determine, in response to the selection of the target software description information, the workspace template file corresponding to the target software description information as a target template file that is compatible with the request. The template file acquisition module is used to acquire the target template file from the workspace template file library.
10. The apparatus of claim 9, wherein, Also includes: A jump instruction sending module is used to send an instruction to the terminal device to jump to the graphical editing interface of the template file in response to the inability to filter the target software description information; The second editing instruction acquisition module is used to acquire the interface editing operation instructions of the graphical editing interface; The second configuration module is used to generate new workspace template configuration information based on the interface editing operation instructions. The second template file generation module is used to generate a new workspace template file based on the new workspace template configuration information and store it in the workspace template file library.
11. The apparatus of claim 10, wherein, The newly created workspace template file can be used as the target template file or as a candidate target template file. When the newly created workspace template file is used as the candidate target template file, the dynamic compilation module is also used to parse and dynamically compile the candidate target template file to obtain the candidate workspace interface configuration file; The development environment creation module is also used to create a candidate cloud software development environment based on the candidate workspace interface configuration file, the candidate cloud software development environment serving as a development environment option for the request to be displayed on the terminal device.
12. The apparatus according to claim 11, characterized in that, The second editing instruction acquisition module is further configured to acquire an update instruction for updating the candidate target template file, wherein the update instruction is an instruction received by the terminal device in the graphical editing interface; the update instruction includes at least one of the following instructions: an instruction to add objects contained in the candidate target template file, an instruction to delete objects contained in the candidate target template file, an instruction to modify the object relationships between objects contained in the candidate target template file, an instruction to modify the metadata information of the objects, and an instruction to modify the metadata information of the object relationships; the objects include at least one of the following: components and editor plugins; The second configuration module is further configured to update at least one of the metadata information, component information, or editor plugin information of the newly created workspace template configuration information according to the update instruction; The second template file generation module is also used to generate the target template file based on the updated new workspace template configuration information.
13. An electronic device, comprising: include: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the method of any one of claims 1-6.
14. A computer-readable storage medium having stored thereon computer program instructions, wherein, When the computer program instructions are executed by the processor, they implement the method of any one of claims 1-6.