Construction method and device of development environment, equipment and storage medium
By introducing the target user interface and target task model in the construction of the development environment, the construction tasks of the development environment are automatically processed, which solves the problems of cumbersome development environment configuration and repeated packaging in the existing technology, and achieves more efficient development environment construction and collaborative work. .
Patent Information
- Application Number
- CN202411374883.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-21
AI Technical Summary
In the existing technology, the development environment configuration is complicated and the repeated packaging is difficult to build the development environment.
By obtaining the construction task of the target development environment triggered by the user's interface, the target task model is used to obtain the target configuration sub -task and its execution method, and the configuration sub -task will be performed in order in accordance with the execution order to build the target development environment.
The complex environmental configuration operation is simplified into an easy -to -use user interface, reducing the time for developers to manually modify the code packaging, improves development efficiency and synergy efficiency, and solves the problem of cumbersome and repeated packaging.
Smart Images

Figure CN119336325A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method, device, equipment and storage medium for constructing a development environment. Background Art
[0002] The software system development process includes multiple stages such as development, development testing, integration testing, acceptance and production. In each stage, in order to ensure the quality of the software and the stability of the functions, different test addresses need to be modified to form the corresponding development environment. In projects with complex architectures, the integrated software development kit (English: Software Development Kit, referred to as: SDK) configuration needs to be modified, packaged and verified. In this process, development environment management plays a vital role.
[0003] Through good development environment management and construction, the time for application developers to manually modify code packaging is reduced, and it can also help the backend to quickly test and verify new modifications. At the same time, complex environment configuration operations are transformed into an easy-to-use user interface, and the test and acceptance team can complete the configuration of the test environment in one step.
[0004] The technical architecture of complex projects usually includes a variety of technical solutions. In such complex projects, simple domain name switching is difficult to meet the personalized development environment configuration requirements of different project teams. How to convert complex environment configuration into simple user operations has become a problem that needs to be considered. Summary of the invention
[0005] The present application provides a method, apparatus, device and storage medium for constructing a development environment, which are used to solve the problems of complicated development environment configuration and repeated packaging, and difficulty in constructing a development environment in the prior art.
[0006] In a first aspect, the present application provides a method for constructing a development environment, comprising:
[0007] Acquire a build task of a target development environment triggered by a user through a target user interface, wherein the build task includes an identifier of at least one target configuration subtask;
[0008] According to the identifier of the target configuration subtask, the target configuration subtask and the execution method of the target configuration subtask are obtained by using the target task model, wherein the execution method is used to indicate the development environment configuration method corresponding to the target configuration subtask; the target task model includes the mapping relationship between the identifier of the subtask, the subtask, and the execution method of the subtask;
[0009] According to the execution order of each target configuration subtask, the execution method of each target configuration subtask is executed in sequence to obtain the target development environment.
[0010] In a possible implementation manner, before obtaining the construction task of the target development environment input by the user, the method further includes:
[0011] Obtaining a build request for a target task model, wherein the build request includes a customized development environment configuration requirement;
[0012] Structuring the environment configuration requirements to obtain a subtask configuration table; the subtask configuration table includes configuration parameters, operation arrays, and debugging tools for multiple subtasks;
[0013] Based on the subtask configuration table, the mapping relationship corresponding to the subtask is added to the benchmark task model to obtain the target task model; the benchmark task model is constructed by configuring the basic requirements of the development environment;
[0014] The identifier of the configuration subtask displayed on the general user interface is adjusted based on the target task model to obtain a target user interface.
[0015] In a possible implementation manner, before adding the mapping relationship corresponding to the subtask to the benchmark task model based on the subtask configuration table, the method further includes:
[0016] Define two class structures, a first class and a second class, wherein the first class includes identifications and groups of multiple configuration subtasks and stores information of the second class, and the second class is used to store environment configuration information of multiple configuration subtasks;
[0017] According to the multiple configuration subtasks in the second category, define the environment configuration operations corresponding to the multiple configuration subtasks;
[0018] The execution method of the first type is constructed to obtain the benchmark task model, and the execution method is used to indicate the implementation steps of executing the environment configuration operation using the environment configuration information.
[0019] In a possible implementation, the constructing the first type of execution method to obtain the benchmark task model includes:
[0020] According to the environment configuration information of each configuration subtask, access the environment configuration operations in the second category to determine the environment configuration operations corresponding to the environment configuration information;
[0021] The environment configuration operation is performed according to the environment configuration information, an execution method of the configuration subtask is generated and saved in the first category, and the benchmark task model is obtained.
[0022] In a possible implementation, based on the subtask configuration table, adding the mapping relationship corresponding to the subtask to the reference task model to obtain the target task model includes:
[0023] Splitting the subtask configuration table to obtain multiple subtasks and configuration information of each subtask;
[0024] Establishing a mapping relationship between the configuration subtask and the subtask;
[0025] The mapping relationship of the subtasks and the configuration information of the subtasks are filled into the second category of the reference task model to generate a target task model.
[0026] In a possible implementation, adjusting the identifier of the configuration subtask displayed on the general user interface based on the target task model to obtain the target user interface includes:
[0027] According to the identification and grouping of the first category of the target task model, the identification of the configuration subtask displayed on the general user interface is divided and adjusted to obtain a target user interface, and there is a corresponding relationship between the identification on the target user interface and the identification of the first category.
[0028] In a possible implementation, the method further includes:
[0029] Acquire a logo on a target user interface, the logo including: a logo icon and logo information;
[0030] Establishing a first mapping relationship between the first category of the target task model and the identification icon;
[0031] Establishing a second mapping relationship between the second type of the target task model and the identification information;
[0032] The first mapping relationship and the second mapping relationship are added to the target user interface.
[0033] In a second aspect, the present application provides a device for constructing a development environment, including:
[0034] An acquisition module, used to acquire a build task of a target development environment triggered by a user through a target user interface, wherein the build task includes an identifier of at least one target configuration subtask;
[0035] The acquisition module is further used to acquire the target configuration subtask and the execution method of the target configuration subtask using the target task model according to the identifier of the target configuration subtask, wherein the execution method is used to indicate the development environment configuration method corresponding to the target configuration subtask; the target task model includes the mapping relationship between the identifier of the subtask, the subtask, and the execution method of the subtask;
[0036] The execution module is used to execute the execution method of each target configuration subtask in sequence according to the execution order of each target configuration subtask to obtain the target development environment.
[0037] In a possible implementation, the device further includes: a processing module, an adding module, and a generating module;
[0038] The acquisition module is further used to acquire a build request of the target task model, wherein the build request includes a customized development environment configuration requirement;
[0039] The processing module is used to perform structured processing on the environment configuration requirements to obtain a subtask configuration table; the subtask configuration table includes configuration parameters, operation arrays and debugging tools for multiple subtasks;
[0040] The adding module is used to add the mapping relationship corresponding to the subtask to the benchmark task model based on the subtask configuration table to obtain the target task model; the benchmark task model is constructed by configuring the basic requirements of the development environment;
[0041] The generating module is used to adjust the identifier of the configuration subtask displayed on the general user interface based on the target task model to obtain the target user interface.
[0042] In a possible implementation, the device further includes: a definition module and a construction module;
[0043] The definition module is used to define two class structures, a first class and a second class, wherein the first class includes identifications and groupings of multiple configuration subtasks and stores information of the second class, and the second class is used to store environment configuration information of multiple configuration subtasks;
[0044] The definition module is further used to define environment configuration operations corresponding to the multiple configuration subtasks according to the multiple configuration subtasks in the second category;
[0045] The construction module is used to construct the execution method of the first type to obtain the benchmark task model, and the execution method is used to indicate the implementation steps of executing the environment configuration operation using the environment configuration information.
[0046] In a possible implementation manner, the device further includes: a determination module;
[0047] The determination module is used to access the environment configuration operations in the second category according to the environment configuration information of each configuration subtask, and determine the environment configuration operation corresponding to the environment configuration information;
[0048] The generation module is further used to perform the environment configuration operation according to the environment configuration information, generate an execution method of the configuration subtask and save it in the first category to obtain the benchmark task model.
[0049] In a possible implementation manner, the device further includes: an establishment module;
[0050] The processing module is further used to split the subtask configuration table to obtain multiple subtasks and configuration information of each subtask;
[0051] The establishing module is further used to establish a mapping relationship between the configuration subtask and the subtask;
[0052] The generation module is further used to fill the mapping relationship of the subtasks and the configuration information of the subtasks into the second category of the benchmark task model to generate a target task model.
[0053] In a possible implementation, the processing module is also used to divide and adjust the identifiers of the configuration subtasks displayed on the general user interface according to the identifiers and groupings of the first category of the target task model to obtain the target user interface, and there is a corresponding relationship between the identifiers on the target user interface and the identifiers of the first category.
[0054] In a possible implementation, the acquisition module is further used to acquire an identification on the target user interface, where the identification includes: an identification icon and identification information;
[0055] The establishing module is further used to establish a first mapping relationship between the first category of the target task model and the identification icon;
[0056] The establishing module is further used to establish a second mapping relationship between the second type of the target task model and the identification information;
[0057] The adding module is further used to add the first mapping relationship and the second mapping relationship to the target user interface.
[0058] In a third aspect, the present application provides a device for building a development environment, the device comprising:
[0059] Memory;
[0060] processor;
[0061] Wherein, the memory stores computer-executable instructions;
[0062] The processor executes the computer-executable instructions stored in the memory to implement the method for constructing a development environment as described in the first aspect and various possible implementations of the first aspect.
[0063] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement a method for constructing a development environment as described in the first aspect and various possible implementations of the first aspect.
[0064] The construction method, device, equipment and storage medium of the development environment provided by the present application obtain the construction task of the target development environment triggered by the user through the target user interface, and the construction task includes at least one target configuration subtask. According to the identification of the target configuration subtask, the target configuration subtask is obtained using the target task model, and the execution method of the target configuration subtask is executed in sequence according to the execution order of each target configuration subtask to obtain the target development environment. The method tasks the construction process of the development environment, and meets the needs of diversified development environment configurations such as SDK, localized HTML5 markup language, domain name, etc. through the design of the development environment configuration task, and connects it with the user interface, converting the steps such as code construction in the development environment construction into a user operation of adding tasks with one click, and through the design of the user interface, even first-time users can quickly understand the usage method, which reduces the threshold for using the switching environment function. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0066] Figure 1 A schematic diagram of a method for constructing a development environment provided for this application Figure 1 ;
[0067] Figure 2 A schematic diagram of a scene of a target user interface in a method for constructing a development environment provided in this application;
[0068] Figure 3 A schematic diagram of a method for constructing a development environment provided for this application Figure 2 ;
[0069] Figure 4 A schematic diagram of a method for constructing a development environment provided for this application Figure 3 ;
[0070] Figure 5 A schematic diagram of the structure of a device for building a development environment provided by this application;
[0071] Figure 6 A schematic diagram of the structure of a construction device for a development environment provided in this application.
[0072] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0073] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims, rather than all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0074] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, products or devices.
[0075] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0076] The software system development process includes multiple stages such as development, development testing, integration testing, acceptance and production. At each stage, in order to ensure the quality of the software and the stability of the functions, different test addresses need to be modified. In projects with complex architectures, it is necessary to modify the configuration of the integrated software development kit (English: Software Development Kit, referred to as: SDK), and the localization technical solution involving Hypertext Markup Language (English: HTML5, referred to as: H5) also needs to replace the local H5 file, and then perform packaging verification. In this process, development environment management plays a vital role. Through good development environment management, the time for application developers to manually modify code packaging is reduced, and it can also help the background and H5 development teams to quickly test and verify new modifications. At the same time, the complex environment configuration operations are converted into an easy-to-use user interface. The testing and acceptance teams can complete the configuration of the test environment in one step, which improves the efficiency of cross-departmental and cross-group collaboration.
[0077] In the traditional mobile iOS development process, the problem of frequent packaging when switching environments is solved through domain name management, and the problem of physical isolation of production and test environments is solved through a multi-target model. With the development of mobile Internet, applications have become an important entry point for enterprises to expand their business. Simple technical solutions are difficult to meet the rapidly growing business needs. The technical architecture of complex projects usually includes diversified technical solutions, such as integrating many third-party SDKs, and using localized H5 technical solutions in some cross-platform projects. In such complex projects, simple domain name switching is difficult to meet the personalized development environment configuration requirements of different project teams. How to convert complex environment configurations into simple user operations is also a question that needs to be considered.
[0078] In the actual development environment construction process, the technical architecture of complex projects usually includes diversified technical solutions. For example, many third-party SDKs are integrated. The configuration of SDKs generally includes key, secret, host and other information. The configuration information is usually different in production and test environments, which also increases the complexity of environment configuration. Some cross-platform projects use the local H5 technical solution, and the test code and test environment can only be updated by updating the local H5. As the core business entrance of an enterprise, the application usually integrates the functions of different project groups, and the same project group may have different requirements for parallel development and testing. The global mode environment switching cannot meet this personalized testing requirement well.
[0079] In response to the above problems, this application proposes a method for constructing a development environment, puts forward the concept of environment configuration tasks, integrates multiple environment configurations in one task, establishes a set of commonly used development and testing tasks, and maps the tasks to icons in the user interface, and tasks a series of environment configuration operations. Through the design of the user interface, they are converted into user operations of adding tasks with one click, which lowers the threshold for using environment configuration, improves the collaborative efficiency in the software system development process, and solves the problems of cumbersome environment configuration and repeated packaging.
[0080] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0081] Figure 1 A schematic diagram of a method for constructing a development environment provided in an embodiment of the present application Figure 1 .like Figure 1 As shown, the method includes:
[0082] S101: Acquire a construction task of a target development environment triggered by a user through a target user interface.
[0083] The construction task includes an identifier of at least one target configuration subtask.
[0084] Figure 2 The following is a schematic diagram of a target user interface in a method for constructing a development environment provided in an embodiment of the present application. The target user interface is suitable for a variety of display screens such as mobile phones and tablets, and the layout and information in the interface can be changed according to user needs. Figure 2 As shown, box 1 is the edit button; box 2 is the selected area, in which the target configuration subtask selected by the user can be stored; box 3 is the arrangement area of the configuration subtasks, which includes all the constructed configuration subtasks; box 4 is a group of configuration subtasks. In order to facilitate users to quickly find the target configuration subtask, the configuration subtasks can be divided into multiple categories; circle 5 is the identifier of the configuration subtask. Different configuration subtasks have different corresponding identifiers. All configuration subtasks can be displayed on the page. For example, the identifier can be Chinese characters, English abbreviations or images.
[0085] It is understandable that a complex project is regarded as a task, and the construction of the development environment of the complex project is a construction task, such as Figure 2As shown in the figure, a circle represents a configuration subtask. During use, the user divides the known build task into multiple configuration subtasks, clicks Edit, enters the target configuration subtask selection interface, and clicks different icons in sequence to select different target configuration subtasks. After the selection is completed, click Save to build the development environment in the background, generate the target development environment corresponding to the build task, and complete the environment configuration work.
[0086] It should be noted that if the user does not specify the added target configuration subtask, the development environment build defaults to the full production environment.
[0087] S102: According to the identifier of the target configuration subtask, using the target task model to obtain the target configuration subtask and the execution method of the target configuration subtask.
[0088] The execution method is used to indicate the development environment configuration method corresponding to the target configuration subtask; the target task model includes a mapping relationship between the subtask identifier, the subtask, and the execution method of the subtask.
[0089] It can be understood that after the user selects the target configuration subtask, the system will access the target task model according to the identifier of the target configuration subtask, and obtain the target configuration subtask in the target task model, that is, the target configuration subtask selected by the user among all subtasks, as well as the development environment configuration method of the target configuration subtask.
[0090] S103: executing the execution method of each target configuration subtask in sequence according to the execution order of each target configuration subtask to obtain the target development environment.
[0091] The execution order is the order in which the user inputs the target configuration subtasks. The input order is based on the order in which the user saves the subtasks. For example, if a target configuration subtask is canceled and then selected again, the order of the target configuration subtask is the order of the second input.
[0092] It can be understood that after determining the development environment configuration methods of all target configuration subtasks, the development environment configuration methods are executed in sequence. After the development environment configuration method of the last target configuration subtask is executed, the development environment obtained at this time is the target development environment.
[0093] Importantly, if the user wants to obtain detailed configuration information of a target configuration subtask, such as interface information, the user can double-click the icon of the target configuration subtask to enter the task details page to view the list of operations associated with the task.
[0094] The present embodiment provides a method for constructing a development environment, which obtains a construction task of a target development environment triggered by a user through a target user interface, and the construction task includes at least one target configuration subtask. According to the identifier of the target configuration subtask, the target configuration subtask is obtained using a target task model, as well as the execution method of the target configuration subtask. According to the execution order of each target configuration subtask, the execution method of each target configuration subtask is executed in sequence to obtain the target development environment. The method tasks the construction process of the development environment, connects it with the user interface, and converts steps such as code construction in the construction of the development environment into a user operation of adding tasks with one click. Through the design of the user interface, even first-time users can quickly understand the usage method, which reduces the threshold for using the environment switching function.
[0095] Figure 3 A schematic diagram of a method for constructing a development environment provided in an embodiment of the present application Figure 2 This embodiment is in Figure 1 Based on the embodiment, a possible implementation method of the target user interface generation process is described in detail. Figure 3 As shown, the method includes:
[0096] S201: Obtain a request for building a target task model.
[0097] The build request includes customized development environment configuration requirements.
[0098] It can be understood that an interview list is defined according to the configuration requirements of the development environment, and different stakeholders are interviewed according to the content of the interview list, and the interview content is obtained and analyzed. The interview content is the personalized development environment configuration requirements proposed by the stakeholders. For example, the personalized development environment configuration requirements may include: test sequence, corresponding database in the construction process, construction tools, configuration language, configuration interface, etc.
[0099] Among them, different stakeholders may be testers, product managers, product operators, etc. who participate in testing and acceptance during the software development process.
[0100] S202: Structural processing is performed on the environment configuration requirements to obtain a subtask configuration table.
[0101] The subtask configuration table includes configuration parameters, operation arrays, and debugging tools for multiple subtasks.
[0102] It is understandable that the interview contents obtained from stakeholders, namely the environment configuration requirements, are all expressed in text and are not suitable for the model construction process. Therefore, the environment configuration requirements are structured to obtain a subtask configuration table, which brings together the personalized needs of all stakeholders.
[0103] S203: Split the subtask configuration table to obtain multiple subtasks and configuration information of each subtask.
[0104] It can be understood that the subtask configuration table is an independent development environment configuration requirement table. In order to enable the background to execute the execution method of the target configuration subtask when the user selects the target configuration subtask in the user interface, the execution method at this time is generated based on the personalized needs of the stakeholders, so the subtask configuration table is split and processed to facilitate the filling of multiple subtasks and their corresponding configuration information into the benchmark task model.
[0105] S204: Establishing a mapping relationship between the configuration subtask and the subtask.
[0106] Among them, the configuration subtasks are various configuration subtasks constructed in the benchmark task model, and the subtasks are subtasks corresponding to the personalized needs of stakeholders.
[0107] It can be understood that the mapping relationship is also a corresponding relationship, which associates the configuration subtask with the subtask to ensure that when the configuration subtask is selected during subsequent use, it can correspond to the subtask and the configuration information of the subtask. At the same time, when the content of the subtask configuration table changes, the configuration information can be updated in time.
[0108] S205: Fill the mapping relationship of the subtasks and the configuration information of the subtasks into the second category of the benchmark task model to generate a target task model.
[0109] It can be understood that the configuration information of the subtask is the personalized configuration requirements of the stakeholders. The configuration information and the mapping relationship are filled into the corresponding category of the second category of the benchmark task model, so that the benchmark task model meets the personalized requirements of the stakeholders in this group and generates a target task model exclusively for the users in this group. The construction process of the benchmark task model is detailed below and will not be repeated here.
[0110] S206: According to the identifiers and groupings of the first category of the target task model, the identifiers of the configuration subtasks displayed on the general user interface are divided and adjusted to obtain a target user interface.
[0111] Among them, the general user interface refers to the interface for users to interact with computer systems or software. The general user interface usually includes windows, icons, menus, buttons and label boxes, etc. The general user interface is usually applicable to multiple systems, such as iOS systems. There is a corresponding relationship between the logo on the target user interface and the logo of the first category.
[0112] It can be understood that the first category of the target task model defines the identification and grouping of multiple configuration subtasks, and adjusts the components on the general user interface according to the identification and grouping to generate a task management page. The task management page can display the configuration subtasks according to the grouping, and finally form the target user interface. For example, the adjustment process includes: modifying the icon according to the identification, deleting redundant icons, and adjusting the icon position according to the grouping.
[0113] Optionally, the method further includes:
[0114] Get the target user interface logo;
[0115] It is understandable that after the target user interface is generated, the target user interface needs to be connected to the target task model to ensure that after the user selects the logo on the target user interface, the configuration subtask corresponding to the logo can be executed in the target task model, and the completed development environment is generated and displayed. First, obtain the logo on the target user interface. The logo includes: logo icon and logo information. Drag or click the logo icon to select it as the target configuration subtask. Double-click or long press the icon to display the logo information corresponding to the logo.
[0116] Establishing a first mapping relationship between the first category of the target task model and the identification icon;
[0117] It can be understood that the first type of structure contains the execution method of each configuration subtask and the information in the second type of structure, and establishes a mapping relationship between the identification icon and the identification in the first type of structure of the target task model to ensure that after selecting the identification icon, the corresponding execution method in the target task model is executed.
[0118] Establishing a second mapping relationship between the second type of the target task model and the identification information;
[0119] It can be understood that the second type of structure contains specific configuration information for each configuration subtask, and the configuration information can be called and used by the first type of structure to establish a mapping relationship between the second type and the identification information. After the user double-clicks or long presses the icon, the specific configuration information of the target configuration subtask corresponding to the icon can be displayed.
[0120] The first mapping relationship and the second mapping relationship are added to the target user interface.
[0121] It can be understood that the first mapping relationship and the second mapping relationship are added to the target user interface, that is, the target user interface and the target task model are connected. After the user clicks or drags the icon on the target user interface, the corresponding target configuration subtask can perform the development environment configuration operation through the first mapping relationship to obtain the target development environment. After the user double-clicks or long presses the icon on the target user interface, the configuration details of the target configuration subtask saved in the target task model can be opened through the second mapping relationship.
[0122] The present embodiment provides a method for constructing a development environment, which obtains a construction request of a target task model, wherein the construction request includes a customized development environment configuration requirement. The environment configuration requirement is structured to obtain at least one subtask configuration table. The subtask configuration table is split to obtain multiple subtasks and configuration information of each subtask. A mapping relationship between configuration subtasks and subtasks is established. The mapping relationship and the configuration information of the subtask are filled into the second category of the benchmark task model to generate a target task model. According to the identification and grouping of the first category of the target task model, the identification of the configuration subtask displayed on the general user interface is divided and adjusted to obtain the target user interface, and the identification on the target user interface corresponds to the identification of the first category. The method establishes a set of commonly used development and testing tasks by understanding the environment configuration requirements of staff members of different roles in different project groups, so that the construction results of the development environment are suitable for the personalized needs of different personnel.
[0123] Figure 4 A schematic diagram of a method for constructing a development environment provided in an embodiment of the present application Figure 3 This embodiment is in Figure 3 Based on the embodiment, a possible implementation of the benchmark model building process is described in detail.
[0124] like Figure 4 As shown, the method includes:
[0125] S301: define two class structures, the first class and the second class.
[0126] The class structure can be viewed as a blueprint or template for creating objects with the same properties and behaviors. The first class includes identification and grouping of multiple configuration subtasks and stores information of the second class, which is used to store environment configuration information of multiple configuration subtasks.
[0127] It is understandable that when designing a task model, two class structures need to be defined, namely the first class and the second class. There is a composition relationship between the first class and the second class. The first class is the aggregator or container of the second class. The first class contains the second class and can reference the information in the second class.
[0128] The first class created can be, for example, a class named DebugTask (task), which contains a name, icon, task unique identifier, group, and operation array, which is used to express the environment configuration requirements required for a configuration task. The second class created can be, for example, a class named DebugTaskStep (operation), which contains category, key, value, and debug attributes, which are used to express the information configuration operation information of each configuration subtask, and the DebugTaskStep instance will be added to the operation array of the DebugTask class, and the DebugTaskStep instance is also a plurality of configuration subtasks.
[0129] S302: According to the multiple configuration subtasks in the second category, define the environment configuration operations corresponding to the multiple configuration subtasks.
[0130] It can be understood that defining the environment configuration operation is to define the type or behavior of each configuration subtask in the second category, distinguishing different categories of configuration operations, which can include domain names, SDKs, H5 local packages, etc., representing different environment configuration dimensions. Each DebugTaskStep instance (that is, configuration subtask) will belong to one of the categories and contain specific information required to perform the operation, such as key (name of the configuration item), value (value of the configuration item), and a possible debug attribute (used to identify whether the step is used for debugging purposes).
[0131] S303: Access the environment configuration operations in the second category according to the environment configuration information of each configuration subtask, and determine the environment configuration operation corresponding to the environment configuration information.
[0132] It can be understood that each configuration subtask has its corresponding environment configuration operation. According to the environment configuration information, the environment configuration operations are traversed to find the paired environment configuration operations. The development environment building process of the corresponding configuration subtask can be executed using the obtained environment configuration operations and environment configuration information. The development environment building process includes: configuration of the development environment and update of the development environment.
[0133] S304: Execute the environment configuration operation according to the environment configuration information, generate an execution method of the configuration subtask and save it in the first category, and obtain the benchmark task model.
[0134] It can be understood that executing the environment configuration operation according to the environment configuration information is to add the environment configuration information to the environment configuration operation. For example, the name of the configuration item of the configuration subtask, the specific value of the configuration item, whether the step needs to be tested and other specific configuration information are added, so as to generate an execution method and save it in the configuration subtask corresponding to the first category. When selecting the configuration subtask, the execution method can build the development environment according to the pre-set method, that is, the pre-filled specific information.
[0135] The present embodiment provides a method for constructing a development environment, by defining two class structures of a first class and a second class, wherein the first class includes identifications and groupings of multiple configuration subtasks and stores information of the second class, and the second class is used to store environmental configuration information of multiple configuration subtasks. Based on the multiple configuration subtasks in the second class, environmental configuration operations corresponding to the multiple configuration subtasks are defined. Based on the environmental configuration information of each configuration subtask, the environmental configuration operations in the second class are accessed to determine the environmental configuration operations corresponding to the environmental configuration information. The environmental configuration operations are executed based on the environmental configuration information, and the execution method of the configuration subtask is generated and saved in the first class to obtain a benchmark task model. The method constructs a benchmark task model based on the basic configuration requirements of the development environment, and can add design environment configuration task objects based on the configuration requirements of different project groups. It can support structured and unstructured environmental configurations, and solves the problem of customized environmental configurations for different project groups.
[0136] Figure 5 This is a schematic diagram of the structure of a device for building a development environment provided by this application. Figure 5 As shown, the construction device 400 of the development environment provided by the present application includes:
[0137] An acquisition module 401 is used to acquire a build task of a target development environment triggered by a user through a target user interface, wherein the build task includes an identifier of at least one target configuration subtask;
[0138] The acquisition module 401 is further used to acquire the target configuration subtask and the execution method of the target configuration subtask using the target task model according to the identifier of the target configuration subtask, wherein the execution method is used to indicate the development environment configuration method corresponding to the target configuration subtask; the target task model includes the mapping relationship between the identifier of the subtask, the subtask, and the execution method of the subtask;
[0139] The execution module 402 is used to execute the execution method of each target configuration subtask in sequence according to the execution order of each target configuration subtask to obtain the target development environment.
[0140] In a possible implementation, the device further includes: a processing module 403, an adding module 404, and a generating module 405;
[0141] The acquisition module 401 is further used to acquire a build request of a target task model, wherein the build request includes a customized development environment configuration requirement;
[0142] The processing module 403 is used to perform structured processing on the environment configuration requirements to obtain a subtask configuration table; the subtask configuration table includes configuration parameters, operation arrays and debugging tools for multiple subtasks;
[0143] The adding module 404 is used to add the mapping relationship corresponding to the subtask to the benchmark task model based on the subtask configuration table to obtain the target task model; the benchmark task model is constructed by configuring the basic requirements of the development environment;
[0144] The generating module 405 is used to adjust the identifier of the configuration subtask displayed on the general user interface based on the target task model to obtain the target user interface.
[0145] In a possible implementation, the device further includes: a definition module 406, a construction module 407;
[0146] The definition module 406 is used to define two class structures, a first class and a second class, wherein the first class includes identifications and groups of multiple configuration subtasks and stores information of the second class, and the second class is used to store environment configuration information of multiple configuration subtasks;
[0147] The definition module 406 is further used to define environment configuration operations corresponding to the multiple configuration subtasks in the second category;
[0148] The construction module 407 is used to construct the first type of execution method to obtain the benchmark task model, and the execution method is used to indicate the implementation steps of executing the environment configuration operation using the environment configuration information.
[0149] In a possible implementation, the apparatus further includes: a determination module 408;
[0150] The determination module 408 is used to access the environment configuration operations in the second category according to the environment configuration information of each configuration subtask, and determine the environment configuration operation corresponding to the environment configuration information;
[0151] The generating module 405 is further used to perform the environment configuration operation according to the environment configuration information, generate an execution method of the configuration subtask and save it in the first category to obtain the benchmark task model.
[0152] In a possible implementation manner, the apparatus further includes: an establishing module 409;
[0153] The processing module 403 is further used to split the subtask configuration table to obtain multiple subtasks and configuration information of each subtask;
[0154] The establishing module 409 is further used to establish a mapping relationship between the configuration subtask and the subtask;
[0155] The generating module 405 is further used to fill the mapping relationship of the subtasks and the configuration information of the subtasks into the second category of the reference task model to generate a target task model.
[0156] In a possible implementation, the processing module 403 is also used to divide and adjust the identifiers of the configuration subtasks displayed on the general user interface according to the identifiers and groupings of the first category of the target task model to obtain a target user interface, and there is a corresponding relationship between the identifiers on the target user interface and the identifiers of the first category.
[0157] In a possible implementation, the acquisition module 401 is further used to acquire an identification on the target user interface, where the identification includes: an identification icon and identification information;
[0158] The establishing module 409 is further used to establish a first mapping relationship between the first category of the target task model and the identification icon;
[0159] The establishing module 409 is further used to establish a second mapping relationship between the second type of the target task model and the identification information;
[0160] The adding module 404 is further configured to add the first mapping relationship and the second mapping relationship to the target user interface.
[0161] The implementation principle and technical effect of the device for constructing a development environment provided in the embodiment of the present application are similar to the implementation methods of each part of the aforementioned method for constructing a development environment, and will not be repeated here.
[0162] Figure 6 This is a schematic diagram of the structure of a development environment construction device provided by this application. Figure 6 As shown, the electronic device 500 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 500 includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.
[0163] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0164] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0165] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0166] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0167] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0168] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0169] The above-mentioned readable storage medium 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 memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0170] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0171] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0172] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0174] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0175] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0176] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for constructing a development environment, characterized in that: The method comprises: Acquire a build task of a target development environment triggered by a user through a target user interface, wherein the build task includes an identifier of at least one target configuration subtask; According to the identifier of the target configuration subtask, the target configuration subtask and the execution method of the target configuration subtask are obtained by using the target task model, wherein the execution method is used to indicate the development environment configuration method corresponding to the target configuration subtask; the target task model includes the mapping relationship between the identifier of the subtask, the subtask, and the execution method of the subtask; According to the execution order of each target configuration subtask, the execution method of each target configuration subtask is executed in sequence to obtain the target development environment.
2. The method according to claim 1, characterized in that Before obtaining the construction task of the target development environment input by the user, the method further includes: Obtaining a build request for a target task model, wherein the build request includes a customized development environment configuration requirement; Structuring the environment configuration requirements to obtain a subtask configuration table; the subtask configuration table includes configuration parameters, operation arrays, and debugging tools for multiple subtasks; Based on the subtask configuration table, the mapping relationship corresponding to the subtask is added to the benchmark task model to obtain the target task model; the benchmark task model is constructed by configuring the basic requirements of the development environment; The identifier of the configuration subtask displayed on the general user interface is adjusted based on the target task model to obtain a target user interface.
3. The method according to claim 2, characterized in that Before adding the mapping relationship corresponding to the subtask to the benchmark task model based on the subtask configuration table, the method further includes: Define two class structures, a first class and a second class, wherein the first class includes identifications and groups of multiple configuration subtasks and stores information of the second class, and the second class is used to store environment configuration information of multiple configuration subtasks; According to the multiple configuration subtasks in the second category, define the environment configuration operations corresponding to the multiple configuration subtasks; The execution method of the first type is constructed to obtain the benchmark task model, and the execution method is used to indicate the implementation steps of executing the environment configuration operation using the environment configuration information.
4. The method according to claim 3, characterized in that The method of constructing the first type of execution to obtain the benchmark task model includes: According to the environment configuration information of each configuration subtask, access the environment configuration operations in the second category to determine the environment configuration operations corresponding to the environment configuration information; The environment configuration operation is performed according to the environment configuration information, an execution method of the configuration subtask is generated and saved in the first category, and the benchmark task model is obtained.
5. The method according to claim 2, characterized in that: The step of adding the mapping relationship corresponding to the subtask to the benchmark task model based on the subtask configuration table to obtain the target task model includes: Splitting the subtask configuration table to obtain multiple subtasks and configuration information of each subtask; Establishing a mapping relationship between the configuration subtask and the subtask; The mapping relationship of the subtasks and the configuration information of the subtasks are filled into the second category of the reference task model to generate a target task model.
6. The method according to claim 2, characterized in that The step of adjusting the identifier of the configuration subtask displayed on the general user interface based on the target task model to obtain the target user interface includes: According to the identification and grouping of the first category of the target task model, the identification of the configuration subtask displayed on the general user interface is divided and adjusted to obtain a target user interface, and there is a corresponding relationship between the identification on the target user interface and the identification of the first category.
7. The method according to claim 6, characterized in that The method further comprises: Acquire a logo on a target user interface, the logo including: a logo icon and logo information; Establishing a first mapping relationship between the first category of the target task model and the identification icon; Establishing a second mapping relationship between the second type of the target task model and the identification information; The first mapping relationship and the second mapping relationship are added to the target user interface.
8. A device for constructing a development environment, characterized in that: The device comprises: An acquisition module, used to acquire a build task of a target development environment triggered by a user through a target user interface, wherein the build task includes an identifier of at least one target configuration subtask; The acquisition module is further used to acquire the target configuration subtask and the execution method of the target configuration subtask using the target task model according to the identifier of the target configuration subtask, wherein the execution method is used to indicate the development environment configuration method corresponding to the target configuration subtask; the target task model includes the mapping relationship between the identifier of the subtask, the subtask, and the execution method of the subtask; The execution module is used to execute the execution method of each target configuration subtask in sequence according to the execution order of each target configuration subtask to obtain the target development environment.
9. A device for constructing a development environment, characterized in that: include: Memory; processor; Wherein, the memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method for constructing a development environment according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method for constructing a development environment according to any one of claims 1 to 7.