CN115061702A - IDE management method and electronic equipment - Google Patents

IDE management method and electronic equipment Download PDF

Info

Publication number
CN115061702A
CN115061702A CN202210995914.0A CN202210995914A CN115061702A CN 115061702 A CN115061702 A CN 115061702A CN 202210995914 A CN202210995914 A CN 202210995914A CN 115061702 A CN115061702 A CN 115061702A
Authority
CN
China
Prior art keywords
instance
ide
image file
code
code data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210995914.0A
Other languages
Chinese (zh)
Inventor
熊浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210995914.0A priority Critical patent/CN115061702A/en
Publication of CN115061702A publication Critical patent/CN115061702A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application provides an IDE management method and electronic equipment, and relates to the technical field of computers. The problem of low human-computer interaction efficiency of managing IDE instances is solved. The specific scheme is as follows: when the system time reaches a first time point, creating a first instance corresponding to the first project, wherein the first time point is the system time point for evaluating and starting the first instance; receiving an access request sent by second equipment; responding to the access request, and sending first page data to the second equipment, wherein the first page data indicates the second equipment to display first prompt information, and the first prompt information indicates that the first instance is in a running state; and destroying the first instance when the system time reaches a second time point, wherein the second time point is the system time point of evaluating closing of the first instance.

Description

IDE management method and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to an IDE management method and an electronic device.
Background
With the development of computer technology, tools for assisting developers in software development are also generated. Among them, at least one of tools such as a code editor, a compiler, a debugger, and a graphical user interface is integrated, and an application program for providing a program development environment is called an Integrated Development Environment (IDE). The IDE is distributed in the cloud (such as a server), so that a developer can establish connection with an IDE instance of the cloud at any place and time through a terminal device (such as a host, a tablet computer or a mobile phone), and perform development activities such as coding and debugging in a browser.
The running of the IDE instance needs to occupy resources in the cloud, such as computing resources, storage resources, and the like. However, the cloud has limited resources and the number of IDE instances that can be created during the same time period is limited. In the related art, a user of a terminal device is required to actively instruct a cloud to create an IDE instance or destroy the IDE instance. Obviously, before the user uses the IDE instance, the user needs to wait for the creation process of the IDE instance, and in addition, when the user does not timely instruct to destroy the unused IDE instance, the idle IDE instance may also occupy the cloud resources for a long time.
Disclosure of Invention
The embodiment of the application provides an IDE management method and electronic equipment, which intelligently creates and destroys an IDE instance by predicting the starting time and the ending time of the terminal equipment using the IDE instance, thereby reducing the man-machine interaction for managing the IDE instance.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in a first aspect, an embodiment of the present application provides an IDE management method, which is applied to a first device, and the method includes: when system time reaches a first time point, creating a first example corresponding to a first project, wherein the first time point is the system time point of starting the first example; receiving an access request sent by second equipment; responding to the access request, and sending first page data to the second equipment, wherein the first page data indicates the second equipment to display first prompt information, and the first prompt information indicates that the first instance is in a running state; destroying the first instance when the system time reaches a second time point, wherein the second time point is the system time point when the first instance is evaluated to be closed.
The first item is a work item that has been created in the first device. The first instance is an IDE instance corresponding to the first item. In the above embodiment, the first device may intelligently identify the creation time and the destruction time of the IDE instance corresponding to each work item. In this way, the first device may start creating the IDE instance before the second device requests to use the IDE instance, which may effectively reduce the time period for the user of the second device to wait for the creation of the IDE instance. In addition, the first device can also automatically destroy the corresponding IDE instance when the system time reaches the destruction time point, so that the idle IDE instance is prevented from occupying system resources for a long time.
In some possible embodiments, a first model is configured in the first device, and the first model is used for predicting a start-stop time of a user using an instance corresponding to each item, and the method further includes: determining the first time and second time for a first instance using the first model; the first model is a neural network model obtained by training first sample data, and the first sample data comprises time records for creating or destroying each example instructed by a user and attendance data of the user.
In the embodiment, the first model can identify the time point of accurately creating or destroying the IDE instance according to the information such as the habit of the user, and the intelligent degree of automatically creating the IDE instance is improved.
In some possible embodiments, the method further comprises: receiving first login information sent by the second device, wherein the first login information comprises a first address of a first code bin; after the first login information passes the authentication, accessing the first code bin according to the first address; determining a first type of programming language based on code data in the first code bin; determining a first image file matched with the first type of program language, wherein the first image file is used for creating a first container, the first container is used for deploying a second instance, and the second instance is used for compiling the first type of program language; creating the second instance based on the first image file.
In the above embodiment, during the second device accessing the code bin, if the first device is jumped, the first device can intelligently create an IDE instance suitable for compiling code data in the code bin, and a user does not need to manually instruct to create the IDE instance and configure a development tool and a development environment for creating the IDE instance, so that the man-machine interaction efficiency for creating the IDE instance is improved.
In some possible embodiments, the first code bin includes first code data and second code data, and the determining a first type of program language based on the code data in the first code bin includes: determining a first proportion corresponding to the first code data and a second proportion corresponding to the second code data, wherein the first proportion is a proportion between the first code data and all code data in the first code bin, and the second proportion is a proportion between the second code data and all code data in the first code bin; and when the first ratio is larger than the second ratio, determining that the program language type corresponding to the first code data is the first type program language.
In some possible embodiments, the creating a first instance corresponding to the first item includes: querying a second image file matched with the first project from a plurality of pre-configured image files, wherein the second image file is used for creating a container for deploying a first instance and comprises an executable file of a first tool and a program file for constructing a first development environment, the first tool is a basic tool in the first instance, and the first development environment is a running environment required by the first instance; and generating the first instance according to the second mirror image file.
In some possible embodiments, prior to destroying the first instance, the method further comprises: acquiring a second executable file corresponding to a second tool, wherein the second tool is a program tool installed in the first instance during the running of the first instance; acquiring a first system parameter, wherein the first system parameter is a system parameter changed in the first instance during the operation of the first instance; and packaging the second executable file, the first system parameter and the second image file to obtain a third image file, and associating the third image file with the first project, wherein the third image file is used for creating a container for deploying the first instance.
In some possible embodiments, first creation information sent by the second device is received, where the first creation information includes a first identifier corresponding to the first item; determining that the third image file associated with the first project exists; and creating the first instance based on the third image file, wherein the first instance comprises the second tool and the first system parameter.
In the above embodiment, even if the IDE instance is destroyed by the first device, the IDE instance is backed up, which facilitates backtracking. In addition, the IDE instance is backed up by encapsulating the newly installed executable file and the newly changed system parameters into the corresponding image file to obtain a backup image file, so that the storage space required by the backup can be reduced.
In a second aspect, embodiments of the present application provide an electronic device, which includes one or more processors and a memory; the memory coupled to the processor, the memory to store computer program code, the computer program code comprising computer instructions, which, when executed by the one or more processors, cause the one or more processors to:
when the system time reaches a first time point, creating a first instance corresponding to a first project, wherein the first time point is the system time point of evaluating and starting the first instance; receiving an access request sent by second equipment; responding to the access request, and sending first page data to the second equipment, wherein the first page data indicates the second equipment to display first prompt information, and the first prompt information indicates that the first instance is in a running state; destroying the first instance when the system time reaches a second time point, wherein the second time point is a system time point when the first instance is evaluated to be closed.
In some possible embodiments, a first model is configured in the first device, the first model being configured to predict a start-stop time of a user using an instance corresponding to each item, and the one or more processors are further configured to: determining the first time and second time for a first instance using the first model; the first model is a neural network model obtained by training first sample data, and the first sample data comprises time records for creating or destroying each example instructed by a user and attendance data of the user.
In some possible embodiments, the one or more processors are further configured to: receiving first login information sent by the second device, wherein the first login information comprises a first address of a first code bin; after the first login information passes the authentication, accessing the first code bin according to the first address; determining a first type of programming language based on code data in the first code bin; determining a first image file matched with the first type of program language, wherein the first image file is used for creating a first container, the first container is used for deploying a second instance, and the second instance is used for compiling the first type of program language; creating the second instance based on the first image file.
In some possible embodiments, the first code bin includes first code data and second code data, the one or more processors further to: determining a first proportion corresponding to the first code data and a second proportion corresponding to the second code data, wherein the first proportion is a proportion between the first code data and all code data in the first code bin, and the second proportion is a proportion between the second code data and all code data in the first code bin; and when the first ratio is larger than the second ratio, determining that the program language type corresponding to the first code data is the first type program language.
In some possible embodiments, the one or more processors are further configured to: querying a second image file matched with the first project from a plurality of preconfigured image files, wherein the second image file is used for creating a container for deploying a first instance, the second image file comprises an executable file of a first tool and a program file for constructing a first development environment, the first tool is a basic tool in the first instance, and the first development environment is a running environment required by the first instance; and generating the first instance according to the second mirror image file.
In some possible embodiments, prior to destroying the first instance, the one or more processors are further to: acquiring a second executable file corresponding to a second tool, wherein the second tool is a program tool installed in the first instance during the running of the first instance; acquiring a first system parameter, wherein the first system parameter is a system parameter changed in the first instance during the operation of the first instance; and packaging the second executable file, the first system parameter and the second image file to obtain a third image file, and associating the third image file with the first project, wherein the third image file is used for creating a container for deploying the first instance.
In some possible embodiments, the one or more processors are further configured to: receiving first creation information sent by the second device, wherein the first creation information comprises a first identifier corresponding to the first item; determining that the third image file associated with the first project exists; and creating the first instance based on the third image file, wherein the first instance comprises the second tool and the first system parameter.
In a third aspect, a computer storage medium provided in an embodiment of the present application includes computer instructions, which, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect and possible embodiments thereof.
In a fourth aspect, the present application provides a computer program product for causing an electronic device to perform the method of the first aspect and its possible embodiments when the computer program product runs on the electronic device.
It should be understood that the electronic device, the computer storage medium and the computer program product are all applied to the corresponding method provided above, and therefore, the beneficial effects achieved by the electronic device, the computer storage medium and the computer program product can refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
Drawings
Fig. 1 is a schematic structural diagram of a development system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a user terminal according to an embodiment of the present application;
fig. 3 is a schematic software structure diagram of a server according to an embodiment of the present application;
fig. 4 is a schematic view of a user interface of a user terminal according to an embodiment of the present application;
fig. 5 is a signaling interaction diagram of an IDE instance management method according to an embodiment of the present application;
fig. 6 is a second signaling interaction diagram of an IDE instance management method according to an embodiment of the present application;
fig. 7 is a third signaling interaction diagram of an IDE instance management method according to an embodiment of the present application;
fig. 8 is a schematic composition diagram of a chip system according to an embodiment of the present disclosure.
Detailed Description
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present embodiment, "a plurality" means two or more unless otherwise specified.
The embodiment of the present application provides a development system, as shown in fig. 1, the development system may include a server 1 and at least one user terminal.
In some embodiments, the server 1 may provide an Integrated Development Environment (IDE).
It is understood that the above-described IDE refers to a runtime environment capable of executing code, program development. The IDE includes at least one component, which as will be appreciated refers to a simple encapsulation of data and methods, which in some programming language architectures may also be referred to as components, controls, and the like.
In some embodiments, the components of the IDE may be divided into a front-end component and a back-end component, depending on the functionality of the components. Illustratively, the front-end component has functionality for interacting with a user, e.g., for receiving user input data, and for displaying user request data, etc. In addition, the back-end component has a function of processing data, for example, processing received data according to a set logic or acquiring data from a database for processing.
For example, the IDE may include at least one of a code editor, compiler, debugger, and graphical user interface, among other tools. Divided by component functionality, the IDE front-end component can include components related to a graphical user interface, and the IDE back-end component can include components related to a compiler, debugger, and the like.
For example, the user terminal in the development system may be a desktop computer, a tablet computer, a smart watch, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), an Augmented Reality (AR) \ Virtual Reality (VR) device, and the like, and the embodiment of the present application does not particularly limit the specific form of the user terminal.
Please refer to fig. 2, which is a schematic structural diagram of a user terminal 100 according to an embodiment of the present disclosure. As shown in fig. 2, the user terminal 100 may include: the mobile terminal includes a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like.
The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
It is to be understood that the illustrated structure of the present embodiment does not constitute a specific limitation to the user terminal 100. In other embodiments, user terminal 100 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be a neural center and a command center of the user terminal 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
It should be understood that the interface connection relationship between the modules illustrated in the present embodiment is only an exemplary illustration, and does not constitute a limitation on the structure of the user terminal 100. In other embodiments, the user terminal 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The user terminal 100 implements a display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like.
The user terminal 100 may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the user terminal 100 may include N cameras 193, where N is a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the user terminal 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The user terminal 100 may support one or more video codecs. In this way, the user terminal 100 can play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU can implement applications such as intelligent recognition of the user terminal 100, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
In some embodiments, the user terminal having the above hardware structure may access the development system in response to the operation of the user, that is, establish a communication connection with the server 1.
Illustratively, a client corresponding to the server 1, such as an IDE application, is installed in the user terminal. And responding to the operation of the IDE application by the user at the user terminal, and establishing communication connection with the server 1. And then, the user terminal displays an IDE service interface corresponding to the server 1.
In addition, before the user terminal displays the IDE service interface, the server 1 may also check the authority of the user terminal, which is referred to as authentication for short. In case it is determined that the user terminal has the right, the server 1 may instruct the user terminal to display the corresponding IDE service interface. For example, the user terminal sends a service account and a password configured by the user to the server 1, and the server 1 determines whether the user terminal has an access right according to the service account and the password. Illustratively, it is determined whether the service account provided by the user terminal is a registered account in the server 1. After determining that the service account is the registered account in the server 1, it is continuously determined whether the password provided by the user terminal matches the service account. Under the condition that the password is also matched with the service account, the user terminal can be determined to have the access right.
Further illustratively, a browser application is installed in the user terminal. During the launch of the browser application by the user terminal, the designated code bin may be accessed in response to a user action. The code bin is a server for storing published code data. In a scenario where access to a code bin is successful, the browser application may display the service interface 1 corresponding to the code bin. The service interface 1 includes a control 1 therein indicating a jump server 1. After the user terminal receives the user's selection operation on the control 1, the user terminal jumps to access the server 1, for example, the user terminal sends first login information to the server 1, where the first login information includes a first address, and the first address is a code bin, such as a first code bin, accessed by the user terminal before adjustment. In this way, the user terminal establishes a communication connection with the server 1. Similarly, after the user terminal establishes a connection with the server 1, if the user terminal passes the authentication of the server 1, that is, if it is determined that the user terminal has the access right according to the first login information, the user terminal displays the IDE service interface provided by the server 1.
As another example, the user terminal may display the query alert in a scenario in which the user terminal checks specified code data using a code Quality Control (QC) tool in response to a user's operation. The inquiry prompt is used to inquire of the user whether to jump to access the server 1. For example, the query reminder may be the word "open code data in IDE". When the user terminal receives the operation 1, the user terminal accesses the server 1. The operation 1 may be an operation in which the user confirms that code data is opened in the IDE. In this way, the user terminal establishes a communication connection with the server 1. Also, after the user terminal establishes a connection with the server 1, if the user terminal passes the authentication of the server 1, the user terminal displays the IDE service interface provided by the server 1.
After displaying the IDE service interface, the user terminal may acquire the IDE service from the server 1. It will be appreciated that the IDE services described above may include services for code editing, compiling, debugging, and the like.
Before the server 1 provides the IDE service, the server 1 needs to run the component corresponding to the IDE, and create the corresponding IDE instance. Instances are running state programs, i.e., running state IDEs may also be referred to as IDE instances. Creating an IDE instance requires deploying a corresponding IDE kernel, specifically a code file for forming the IDE instance, on the available resources. The code file includes code fragments corresponding to an IDE front-end component and an IDE back-end component. Of course, the code file also includes code fragments corresponding to script generators of the IDE front-end component and the IDE back-end component.
In addition, the resources for deploying the IDE kernel may be available resources of the user terminal itself, or may be available resources provided by the server 1. It will be appreciated that resources may also be divided into physical or virtual resources based on type. The physical resources refer to physically isolated computing resources, storage resources, communication resources, and the like, for example, independent servers, storage devices, communication devices, and the like. The virtual resource refers to a computing resource, a storage resource, a communication resource, and the like isolated from the operating system, the process, and the like, and for example, a plurality of Virtual Machines (VMs) or a plurality of containers (contents) deployed on one server.
In some embodiments, the process of deploying the IDE kernel may include: the code files are generated into executable files, such as software packages (e.g., npm packages), and then the executable files are configured into containers that enable the executable files to execute.
In some embodiments, multiple user terminals may be accessed in a development system. Multiple user terminals can request IDE service from server 1, and correspondingly, server 1 needs to create multiple IDE instances. Alternatively, the same user terminal may request the server 1 to create multiple different IDE instances for writing code programs for different projects, or different types of code programs. However, the running of the IDE instance may occupy resources of the server 1, and even if the amount of resources available to the server 1 is large, it is still limited. In case of too many IDE instances in the server 1, there is also a problem of insufficient available resources.
In some embodiments, the IDE instance in the server 1 may be managed by a user terminal in the development system. For example, the user terminal may instruct to create an IDE instance (which may occupy resources). The IDE instance created by the user terminal indication may also be referred to as an IDE instance corresponding to the user terminal. For another example, the user terminal may also instruct the server 1 to destroy the corresponding IDE instance (which may release the occupied resources).
Obviously, in the above embodiment, if the idle IDE instance is not destroyed in time, the resources in the server 1 are occupied inefficiently for a long time. In addition, in the above embodiment, after the user terminal responds to the user operation and instructs the server 1 to create the corresponding IDE instance, it needs to wait for the server 1 to schedule the resource and create the instance. Obviously, after indicating that an IDE instance is created, the user needs to wait for a period of time before the desired IDE instance can be used. In summary, the development system in some embodiments has a problem of low intelligence.
In order to solve the above problem, embodiments of the present application provide an IDE management method for intelligently destroying an IDE instance or creating an IDE instance in advance by predicting the start and end times of a user using the IDE instance. Thus, the problem that resources are occupied inefficiently and that a user needs to wait for a long time after instructing to create an IDE instance is improved.
In some embodiments, the IDE management method may be applied to the aforementioned development system. Therein, fig. 3 shows a software architecture involving the IDE part in the server 1 of the development system. As shown in fig. 3, the server 1 includes an API gateway service module, a work area management service module, a queue, and a resource management service module.
Illustratively, the API gateway service module is configured to perform authority authentication on a user terminal (e.g., a device requesting to establish a communication connection with the server 1) accessing the development system. For example, the API gateway service module may receive a service account and a password sent by the user terminal, and check whether the service account is matched with the password, whether the service account itself has the right to access the server 1, and the like.
In addition, the API gateway service module is further configured to receive a request, data, an instruction, and the like sent by the user terminal.
Further illustratively, the workspace management service module is configured to manage work items created by the user and instruct the authenticated user terminal to display the created work items, for example, the user terminal may be instructed to display the created work items in an IDE service interface (interface 401 shown in fig. 4). The interface 401 includes a workspace, such as workspace 402. The workspace includes at least one work item, such as item 403. Each work item may indicate an IDE instance, and the IDE instance indicated by the work item may be an instance that has not yet been created or an instance that has been created and is running.
In the above example, the work items may include project name information, creator information, required tool types, required development environment types, and the like. The project name information can be customized by a user, and the creator information can be customized according to a service account logged in by the user. Thus, through project name information and creator information, a user can quickly locate a work project associated with an IDE instance to be used from a workspace. In addition, the required tool type and the required development environment type can determine the required resource type, the required tool and operating system to be installed, and the like when the corresponding IDE instance is created. For example, the tool types may include a Java development class tool, a Python development class tool, and a (VScode) development class tool, etc. The Java, Python, and VScode are all types of programming languages, and in the following embodiments, Python may be referred to as a first programming language, and VScode may be referred to as a second programming language.
In addition, in the workspace 402, at least one operation control is displayed on each work item, for example, at least one of a control indicating start, a control indicating delete, a control indicating open, a control indicating stop, and a control indicating configuration of the workspace. Different operation controls can trigger the user terminal to send different control instructions to the workspace management service module, so as to instruct the workspace management service module to perform corresponding management on the work items and the corresponding IDE instances, such as deleting the work items, creating the IDE instances, destroying the IDE instances, and the like.
Illustratively, the above-mentioned control indicating the start is used for triggering the creation of the IDE instance corresponding to the work item. The control for indicating deletion is used for triggering the destruction of the work item and the corresponding IDE instance. The control opened by the indication can trigger the user terminal to display the compiling interface corresponding to the IDE instance, and certainly, before the compiling interface corresponding to the IDE instance is displayed, the IDE instance needs to be in a running state. The control for indicating stop is used for triggering the destroy of the IDE instance corresponding to the work item. And the control for indicating the configuration working area is used for triggering and modifying the name corresponding to the working item, the corresponding IDE tool type, the required development environment type and the like. During running of the IDE instance, the corresponding IDE tool type or required development environment type is changed, the server 1 can access the IDE instance and create a new IDE instance. In interface 401, a control, such as control 404, is also included that indicates that a new work item is created. The control 404 is used to trigger the addition of a new work item. That is, the user terminal may receive an operation from the user indicating the creation of a work item, such as an operation directed to control 404. In this way, the user terminal can instruct the server 1 to create a new work item in response to the above operation. Thereafter, the workspace management service module may instruct the user terminal to display the newly added work item in the workspace 402.
In summary, during the period that the user terminal displays the IDE service interface, the user terminal may send a control instruction to the server 1 in response to the user operation, for example, an instruction to create the corresponding IDE instance, an instruction to destroy the IDE instance, and an instruction to modify the development environment or the required development tool corresponding to the work project. In this scenario, the workspace management service module may perform corresponding management for the IDE instance according to the received control instruction.
Upon determining that an IDE instance needs to be created, the workspace management service module may create a corresponding instance creation task and queue it in a queue. The instance creation task may instruct the resource management service module to perform resource scheduling.
When the IDE instance needs to be destroyed, the workspace management service module may also create a corresponding instance destruction task and place the instance destruction task in a queue for queuing. The instance destroy task may instruct the resource management service module to perform the release of the resource.
Illustratively, the resource management service module is configured to acquire an instance creation task or an instance destruction task from the queue, and execute scheduling of resources or release of resources according to the acquired task. The tasks are arranged in the queue according to the sequence of entering the queue, so that the resource management service module can process the tasks in sequence according to the sequence of entering the queue. The server 1 is enabled to support multi-user high-concurrency management IDE instances through the application of queuing techniques.
In addition, the server 1 may determine when to create an IDE instance or destroy an IDE instance by analyzing habits of users using IDE instances corresponding to respective work items, in addition to determining whether to create an IDE instance or destroy an IDE instance in response to a control instruction sent by the user terminal. Thus, resources are prevented from being occupied inefficiently, and the time for a user to wait for creating an IDE instance is reduced.
In the embodiment of the present application, as shown in fig. 3, the server 1 further includes: the intelligent starting and stopping module, the creation example module and the destruction example module.
Illustratively, the intelligent start-stop module is configured to predict a creation time point and a destruction time point of the IDE instance indicated by each work item.
In some embodiments, the intelligent start-stop module may include a neural network model for prediction, such as model 1. The model 1 may be a prediction classification model obtained by training using attendance data, code submission time, historical use time of each work item, and the like. The model 1 can be used for creating time and destroying time of an IDE instance corresponding to each work item. For example, the real-time system time is input into model 1, and if model 1 outputs the name of the work item and the identifier representing the creation, the real-time system time is indicated as the creation time of the IDE instance corresponding to the work item. And if the model 1 outputs the name of the work item and the identifier for representing destruction, indicating that the real-time system time is the destruction time of the IDE instance corresponding to the work item. If model 1 does not output the name of the work item, it indicates that the real-time system time does not need to create an IDE instance nor destroy the IDE instance.
The attendance data comprises the time of taking a card and the time of taking the card out of work of the user corresponding to the service account. The code commit time may be a time during which a user writes code data using the IDE instance, indicating that the code data was committed. The historical use time may be historical creation time and historical destruction time of the IDE instance corresponding to the work item.
Taking the work item a as an example, the server 1 may use the time taken for work (i.e., attendance data) and the historical creation time of the IDE instance a indicated by the work item a (i.e., the time record indicating that the user created or destroyed each instance) as a creation time sample, which is also referred to as first sample data. Model 1 is then trained using the create time samples to make model 1 functional to predict the time of creation of IDE instance a. In addition, the server 1 may also use the time of attendance by card punching and the historical destruction time of the IDE instance a indicated by the work item a as the destruction time sample. In addition, the code submission time may also be used as a sample of the destruction prohibition time. Then, the destruction time sample and the destruction forbidding time sample are used for training the model 1 respectively, so that the model 1 has the function of predicting the destruction time of the IDE instance a.
In addition, the process of training the model 1 using various types of samples may refer to the related art. Illustratively, the homogeneous sample is divided into two parts, e.g., 80% of the created time samples are used as training samples, and 20% of the created time samples are used as test samples. Then, the model parameters of model 1 are iterated using the training samples. Thereafter, the classification accuracy of the model 1 was checked using the test samples. The model 1 described above may also be referred to as a first model.
In some embodiments, when the IDE instance a occupies a resource, the server 1 may input the real-time system time into the intelligent start-stop module, and identify whether the input real-time system time is a time point at which the IDE instance a needs to be destroyed. If the input real-time system time is determined to be the time point at which the IDE instance a needs to be destroyed, the destroy instance module is notified. And generating an instance destroying task by the instance destroying module, and putting the instance destroying task into a queue for queuing.
When the IDE instance a does not occupy the resources, the server 1 may input the real-time system time to the intelligent start-stop module, and identify whether the input real-time system time is a time point at which the IDE instance a needs to be created. If the input real-time system time is determined to be the point in time at which the IDE instance a is to be created, the Create instance module is notified. And generating an instance creating task by the instance creating module, and putting the instance creating task into a queue for queuing. In some embodiments, the point in time at which the intelligent start-stop module determines that the first instance needs to be created may be referred to as a first point in time. The first instance is an IDE instance corresponding to a first project, and the first project is an exemplary work project, for example, work project 1 is a first project. In this way, when the user sends an access request to the server 1 (e.g., referred to as a first device) through the user terminal (e.g., referred to as a second device), first page data is sent to the second device in response to the access request, the first page data indicates that the second device displays first prompt information, and the first prompt information indicates that the first instance is in a running state.
In addition, the intelligent start-stop module may determine a time point at which the first instance needs to be destroyed, which is referred to as a second time point.
In some embodiments, in the process of executing the instance creating task or the instance destroying task, the resource management service module needs to be matched with a Network Attached Storage (NAS) management module, a container calling module, a mirror image management module, and the like in the server 1.
The NAS management module is configured to manage a NAS space, for example, when the IDE instance is created, the NAS space is allocated to the IDE instance, and when the IDE instance is destroyed, the NAS space occupied by the IDE instance is recovered. And the mirror image management module is used for determining a matched mirror image file for the IDE instance to be created. And the container calling module is used for running the matched image file, creating a container corresponding to the IDE instance on the resource provided by the server 1, and the container can provide a system environment required by the running of the IDE instance.
Illustratively, the server 1 may store various types of image files in advance, such as a Java image file, a Python image file, a general image file, and the like.
It will be appreciated that the image file is a static program file, such as the underlying file system upon which the IDE instance depends. The operating environments required for writing different classes of program language IDE instances (e.g., IDE instances referred to as different classes) differ. Differences may also exist in the underlying file systems on which different classes of IDE instances depend.
Thus, the image files that match different classes of IDE instances may also be different, e.g., a program file corresponding to a Java image file may create a container suitable for writing Java that may deploy a first class of IDE instances that may be used to write Java class code data. For another example, a program file corresponding to the Python image file may create a container suitable for writing Python, and the container may deploy a second type of IDE instance, which may be used to write Python type code data.
In some embodiments, the image management module may determine the matched image file according to the required tool type and the required development environment corresponding to the work item. For example, if the tool type required by the work item a is a Java development class tool, the matched image file may be a Java image file, and the Java image file includes a base file system corresponding to the development environment required by the work item a. For example, the matching second image file can be determined based on a desired tool type (e.g., first tool) of the first project and a desired development environment (e.g., first development environment). The second image file includes an executable file of the first tool and a program file for building the first development environment.
Taking the resource management service module to execute the instance creation task a as an example. The instance creating task a is used for indicating to create the IDE instance a corresponding to the work item a. In this way, the resource management service module may instruct the NAS management module to allocate an available NAS space to the IDE instance a, and then the resource management service module instructs the image management module to determine the matched image file according to the required tool type and the development environment corresponding to the work item a. In this way, the container scheduling module can run the matched image file in the NAS space corresponding to the IDE instance a, and create a container suitable for deploying the IDE instance a. In some embodiments, the matching image file may further include an IDE kernel corresponding to the IDE instance a, so that after the container is created, the IDE instance a is deployed in the container.
In summary, in the above embodiment, when the user operates the user terminal to create a work item, the tool type and the development environment corresponding to the work item are selected. Thus, no matter the server 1 autonomously identifies the IDE instance of the work item to be created, or the server 1 determines the IDE instance of the work item to be created in response to the user operation, the image management module can determine the matched image file directly according to the tool type and the development environment configured by the user. Then, the container calling module runs the matched image file and creates a container for deploying the IDE instance.
In other embodiments, in the scenario of jump access to the server 1 during access of the user terminal to the code bin, after authentication of the user terminal by the server 1, the server 1 may create an IDE instance corresponding to the code bin, which IDE instance may be used to process the code data stored in the code bin, e.g. to make modifications on the basis of the code data of the code bin, or to continue writing on the basis of the code data of the code bin.
In addition, in the process of creating an IDE instance corresponding to a code bin, a code bin access module and an intelligent analysis module in the server 1 need to be cooperated.
Illustratively, the code bin access module is configured to access a specified code bin and query code data stored in the code bin, such as code data 1. In addition, the designated code bin may be a code bin accessed by the user terminal before the jump.
Further exemplarily, the intelligent analysis module is configured to identify a program language type corresponding to each piece of code data 1, and count a percentage of each program language type, such as percentage data. For example, 10 code data segments are stored in the designated code bin, wherein 1 code data segment 6 is code data written by Java, and 4 code data segment 4 is code data written by Python. Thus, the intelligent analysis module can determine that the program language type corresponding to the code data 1 includes two types, namely Java and Python, and the proportion data includes 60% corresponding to Java and 40% corresponding to Python. For example, the first code bin includes first code data and second code data, where the first code data and the second code data are codes written in two different types of programming languages, and certainly, the first code bin may also include a code program written in another type of programming language, and here, the first code data and the second code data are exemplified for the time being. The server 1 may determine a first percentage for the first code data, which is a ratio between the first code data and all code data in the first code bin, and a second percentage for the second code data, which is a ratio between the second code data and all code data in the first code bin. And when the first occupation ratio is larger than the second occupation ratio, determining the program language type corresponding to the first code data as the first program language.
In addition, the intelligent analysis module can also send a notification 1 to the mirror image management module, wherein the notification 1 comprises the proportion data corresponding to the code data 1. Thus, the mirror image management module can select a matched mirror image file from the prestored mirror image files by combining the proportion data carried in the notice 1.
Illustratively, the program language type with the highest corresponding ratio may be referred to as language type 1, such as a first type of program language. When only one type of language type belongs to language type 1, an image file matching language type 1, e.g., called a first image file, is selected, e.g., the selected image file may create a container (first container) suitable for deploying IDE instance b (the second instance). Additionally, in IDE instance b, the code may be written in language type 1. When the number of the language types 1 is larger than 1, namely, the occupation ratios of a plurality of program languages are the same, the selected image file is a universal image. Wherein the generic mirror image creates a generic container. In this way, the user can instruct the server 1 to deploy various types of IDE instances in a common container.
In other embodiments, the user terminal may also trigger access to the server 1 when a piece of code data (e.g., referred to as code data 2) is opened using the code QC tool. In this scenario, after the user terminal passes the authentication of the server 1, the server 1 may also create an IDE instance corresponding to the code data 2, and the IDE instance may be used to process the code data 2, such as modifying on the basis of the code data 2, or continuing writing on the basis of the code data 2.
In some embodiments, the principle of creating the IDE instance for processing the code data 2 is similar to that of creating the IDE instance corresponding to the code bin in the foregoing embodiments, that is, the intelligent analysis module analyzes the program language type of the code data 2, and then the image management module determines the image file matched with the code data 2, so that the container scheduling module can create the corresponding IDE instance by using the matched image file, and the specific implementation process is not described herein again.
In some embodiments, the server 1 utilizes container technology to allow multiple IDE instances to run independently in different containers, and the occupied resources are different. For example, IDE instance 1, IDE instance 2, and IDE instance 3 in fig. 3 belong to different containers and occupy NAS space 1, NAS space 2, and NAS space 3, respectively. In this scenario, NAS space 1, NAS space 2, and IDE instance 3 are all marked as occupied.
When the server 1 determines that any IDE instance needs to be destroyed, for example, when the resource management service module acquires an instance destruction task from the queue, the resource management service module may destroy the IDE instance indicated by the instance destruction task, and mark the resource occupied by the IDE instance as available. For example, the instance destroy task instructs to destroy the IDE instance 1, the resource management service module may destroy the IDE instance 1, and the resource management service module may further instruct the container scheduling module to destroy the container in which the IDE instance 1 is deployed. The resource management service module may then mark resources occupied by the IDE instance 1 as available, e.g., mark NAS space 1 occupied by the IDE instance 1 as available.
During running of the IDE instance, a user can install a new tool in the IDE instance through the user terminal, or change the system configuration corresponding to the IDE instance (e.g., operating system parameters corresponding to a container of the IDE instance).
In some embodiments, the server 1 further comprises a user monitoring module and a self-generated mirroring module. The user monitoring module is configured to monitor a behavior of a user indicating an installation tool or indicating a change in system configuration through a user terminal, which is referred to as behavior 1. For example, the user terminal transmits instruction information 1 to the server 1 in response to a user operation. Wherein the instruction information 1 may be an instruction indicating an installation tool, or the instruction information 1 may also be an instruction indicating modification of a system configuration. The user monitoring module may regard the event "instruction information 1 received" as action 1.
In addition, the instruction information 1 also carries an instance identifier 1, where the instance identifier 1 may indicate an IDE instance running in the server 1, and in the subsequent embodiments, the IDE instance indicated by the instance identifier 1 may be referred to as an IDE instance c. Thus, when the instruction information 1 is an instruction indicating to install a tool, the server 1 can install a tool specified by the user in the IDE instance c in response to the instruction information 1, and the tool identification specified by the user can also be carried in the instruction information 1. When the instruction information 1 is an instruction for instructing to modify the system configuration, the server 1 may change the specified parameter of the operating system where the IDE instance c is located in response to the instruction information 1, and the specified parameter may also be carried in the instruction information 1.
After the user monitoring module monitors behavior 1, if the above instruction information 1 is valid, the user monitoring module may instruct the self-generated mirroring module to backup the container in which the IDE instance c is located. Illustratively, when the instruction information 1 is an instruction indicating an installation tool, the instruction information 1 being validated means that the installation of the user-specified tool has been completed in the IDE instance c. When the instruction information 1 is an instruction to modify the system configuration, the instruction information 1 being validated means that the server 1 has completed the change of the specified parameter in the operating system in which the IDE instance c is located.
In some embodiments, the authored mirror module performs a backup of the container of the IDE instance c after each piece of instruction information 1 has been validated. In the case where the same container is backed up multiple times, the latest backup is saved.
Illustratively, the process of the self-generated mirror module making a first backup of a container for the IDE instance c: if the instruction information 1 indicates that the tool specified by the user is installed, the executable file corresponding to the tool is acquired, and then the executable file corresponding to the tool is merged into the initial image file to obtain a backup image file. The initial image file refers to an image file used when creating the IDE instance c. If the instruction information 1 indicates an instruction for modifying the system configuration, the modified system configuration is updated to the initial image file to obtain a backup image file, which is also called a backup image file.
Further illustratively, the process of the self-generated mirror module performing the nth backup for the container of the IDE instance c: if the instruction information 1 indicates that a tool specified by a user is installed, an executable file corresponding to the tool is acquired, and then the executable file corresponding to the tool is packaged into the image file of the (n-1) th backup. Wherein n is greater than 1. And if the instruction information 1 indicates an instruction for modifying the system configuration, updating the modified system configuration into the image file of the (n-1) th backup to obtain the backup image file.
In other embodiments, before destroying an IDE instance, the self-generated mirror module queries whether the corresponding instruction information 1 is received during the running of the IDE instance through the user monitoring module. Wherein, the corresponding instruction information 1 carries the instance identifier of the IDE instance, and the instruction information 1 is valid. Thus, when determining that the corresponding instruction information 1 is received, the self-generated mirror module backs up the container corresponding to the IDE instance.
Illustratively, the process of backing up the container corresponding to the IDE instance may be: during the running of the IDE instance, the executable file (called as the second executable file) corresponding to all the tools (called as the second tools) which are indicated to be installed by the user is obtained, and the system configuration (called as the first system parameter) which is changed during the running of the IDE instance is obtained. Then, the obtained executable file is merged into the initial image file, and the changed system configuration is updated into the initial image file, so as to obtain a backup image file, which is also called a third image file.
In addition, when the backup image file corresponds to the work item, the backup image file can also be stored corresponding to the service account and the corresponding work item. For example, the IDE instance d is an IDE instance that the user terminal instructs the server 1 to create for the work item d after logging in the service account a, and then the backup image file of the IDE instance d corresponds to the work item d, and the backup image file of the IDE instance d may be stored in correspondence with the work item d and the service account a. In this way, when the user terminal logs in the service account a and instructs the server 1 to create the IDE instance corresponding to the work item d, the server 1 may create the container in which the IDE instance is deployed based on the backup image file of the IDE instance d.
That is, in some embodiments, in the process of creating an IDE instance for a work item, the image management module may search whether a corresponding backup image file exists according to a service account and a work item logged in by the user terminal. If the backup image file exists, the container calling module is instructed to create a container with the IDE instance laid out based on the backup image file. And if the backup image file does not exist, acquiring the image file matched with the work item from the prestored image files, and creating a corresponding IDE instance by the container calling module based on the matched image file. That is, if the user terminal transmits first creation information to the server 1, the first creation information includes a first identifier (e.g., item name information, creator information) and the like corresponding to the first item. The server 1 may respond to the first creation information to find out whether a corresponding backup image file exists, i.e. the third image file associated with the first item. In the case where a backup image file exists, a first instance is created based on the third image file. Thus, the first instance includes the second tool and the first system parameter.
In addition, through the backup of the image file, the backtracking of the IDE instance can be realized, and the occupation of the backup image file on storage resources can be effectively reduced.
In some embodiments, the server 1 may also issue the code data written in the IDE instance into a pipeline (also referred to as an issue pipeline) in response to an issue instruction sent by the user terminal. Wherein the issue instruction includes an instance identification indicating the IDE instance and an identification indicating the issue type. The types of publications include personal-level publications and application-level publications. The user terminal can determine the issuing type indicated by the issuing instruction according to the user operation. When the issue instruction indicates a person-level issue, the server 1 may issue code data written in the IDE instance into the person-level pipeline. When an issue instruction indicates an application-level issue, the server 1 may issue code data written in the IDE instance indicated by the issue instruction into the application-level pipeline, such as into a designated code bin.
Next, taking a development system including the device 1 and the server 1 as an example, a plurality of operation scenarios of the IDE management method provided in the embodiment of the present application will be described.
In some scenarios, as shown in fig. 5, an IDE management method provided in an embodiment of the present application includes the following steps:
s101, the intelligent start-stop module determines that the current system time is a creation time point corresponding to the IDE instance 4.
In some embodiments, the IDE instance 4 may be an IDE instance corresponding to the preconfigured work item 1. The intelligent start-stop module can predict the creation time point of the IDE instance corresponding to the first type of work items. Wherein the first type of work items are work items that have not been created by the corresponding IDE instance. The above-mentioned work item 1 belongs to a first kind of work item.
In addition, the manner of predicting the creation time point by the intelligent start-stop module may refer to the implementation principle of the intelligent start-stop module in the embodiment, and is not described herein again.
In some embodiments, the intelligent start-stop module may obtain the current system time corresponding to the server 1 in real time, and then, the intelligent start-stop module may perform classification and identification based on the current system time to determine whether the current system time is the creation time point corresponding to the first type of work item.
And S102, the intelligent start-stop module sends notification information 1 to the creation example module.
Wherein, the notification information 1 includes a project identifier 1, and the notification information 1 is used for indicating an instance creation task 1 corresponding to the creation work project 1.
In addition, each item identifier may uniquely indicate one work item, and the item identifier 1 may uniquely indicate the work item 1. Illustratively, the item identifier 1 may be a serial number of the work item 1 in the server 1. For example, the item identifier 1 may also be item name information, creator information, and a corresponding service account (e.g., service account 1) of the work item 1.
S103, the creation instance module creates an instance creation task 1 and puts the instance creation task into a queue.
S104, the resource management service module acquires the instance creation task 1 from the queue.
S105, the resource management service module sends notification information 2 to the mirror image management module.
Note that the notification information 2 also includes an item identifier 1.
And S106, the mirror image management module determines the matched mirror image file 1 according to the work item 1 indicated by the notification information 2.
In some embodiments, the image management module may find the work item 1 according to the item identifier 1 in the notification information 2. Then, according to work item 1, a matching image file, such as called image file 1, is determined.
Illustratively, the image management module searches the image file 1, that is, the image file matched with the work item 1, from the pre-stored image files according to the required tool type and the required development environment corresponding to the work item 1. The process of searching the image file 1 refers to the foregoing embodiment, and is not described herein again.
As another example, the image management module may first determine whether work item 1 corresponds to a backup image file. The above creation process of the backup image file may refer to the description of the foregoing embodiment, and is not described herein again. And when the work item 1 is determined to correspond to the backup image file, taking the backup image file as the image file 1. And when the work item 1 is determined not to have the backup image file, searching the image file 1 from the prestored image file according to the required tool type and the required development environment corresponding to the work item 1.
S107, the mirror image management module sends the identifier of the mirror image file 1 to the container calling module.
S108, the container calling module creates a container with the IDE instance 4 based on the image file 1.
In some embodiments, the process of creating a container with an IDE instance deployed based on an image file may refer to related technologies, which are not described herein again.
S109, the browser application in the user terminal sends an access request 1 to the API gateway service module in the server 1 in response to the user' S operation.
In some embodiments, the access request 1 includes a service account number 1 and a corresponding password. The access request 1 is used for requesting access to an IDE service interface provided by the server 1.
And S110, the API gateway service module responds to the access request 1 and determines that the user terminal passes the authentication.
And S111, the API gateway service module sends response data 1 to the browser application and instructs the browser application to display the IDE service interface.
Wherein, the response data 1 includes page data for displaying the IDE service interface.
And S112, displaying the IDE service interface by the browser application.
The IDE service interface displays a work item 1, and displays a control for instructing to open and a control for instructing to stop with respect to the work item 1.
S113, the browser application responds to the operation that the user indicates to open the work item 1, and sends an access request 2 to the API gateway service module.
The access request 2 includes an instance identifier of the IDE instance 4, and is used for requesting to display a compiling interface corresponding to the IDE instance 4.
In some embodiments, the browser application may request a communication connection with the IDE instance 4 by sending an access request 2. After the browser application establishes a connection with the IDE instance 4, the flow proceeds to S114.
And S114, the API gateway service module sends response data 2 to the browser application and instructs the browser application to display a compiling interface corresponding to the IDE instance 4.
Before receiving the access request 2, the IDE instance 4 corresponding to the work item 1 has been created and is running. In this way, the API gateway service module can quickly respond to the access request 1 by sending the response data 2 to the browser application. In addition, the response data 2 includes page data for displaying a compilation interface.
In other embodiments, during the running of the IDE instance 4, as shown in fig. 6, the IDE management method provided by the embodiment of the present application includes the following steps:
s201, the intelligent start-stop module determines that the current system time is a destruction time point corresponding to the IDE instance 4.
In some embodiments, the implementation manner of S201 may refer to S101, and use the intelligent start-stop module to predict whether the current system time is the destruction time point corresponding to DE instance 4.
S202, the intelligent start-stop module determines that the browser application closes the compiling interface of the IDE instance 4.
In some embodiments, the intelligent start-stop module may query from the API gateway service module whether the information last sent by the browser application is a message indicating to close the compilation interface. If so, then it is determined that the browser application has closed the compilation interface of the IDE instance 4.
And S203, the intelligent start-stop module sends notification information 3 to the destruction example module.
Note that the notification information 3 also includes an item identifier 1 corresponding to the work item 1.
S204, the destroy example module generates an example destroy task 1 and puts the example destroy task 1 into a queue.
In some embodiments, the destroy instance module determines that the IDE instance corresponding to the work item 1 needs to be destroyed, that is, the IDE instance 4, according to the item identifier 1 in the notification information 3. Then, an instance destruction task 1 is generated that instructs to destroy the IDE instance 4.
S205, the resource management service module acquires the instance destruction task 1 from the queue, and responds to the instance destruction task 1 to destroy the IDE instance 4.
In another scenario (e.g., a user terminal accessing a code bin a and then, in response to a user operation, jumping to access the server 1), as shown in fig. 7, the IDE management method includes the following steps:
s301, the code bin access module instructs the API gateway service module to send an access request 3 to the code bin a.
Wherein the access request 3 is used to indicate that code data 1 within code bin a is queried. The code bin a establishes a communication connection with the API gateway service module in response to the access request 3. In this way, the code data 1 stored in the code bin a is acquired through data interaction between the API gateway service module and the code bin a.
S302, the intelligent analysis module identifies the program language type corresponding to each section of code data 1 in the code bin a and counts corresponding proportion data, wherein the proportion data is used for indicating the proportion among the program language types.
In some embodiments, the implementation of S302 may refer to an implementation principle of the intelligent analysis module, and is not described herein again.
And S303, the intelligent analysis module sends notification information 4 to the mirror image management module.
In some embodiments, the notification information 4 includes the proportion data. The notification information 4 may be the notification 1 in the foregoing embodiment.
S304, the mirror image management module determines the matched mirror image file 2 according to the percentage data in the notification information 4.
In some embodiments, the implementation details of S304 may refer to the image management module mentioned in the foregoing embodiments to select the matched image file according to the notification 1, which is not described herein again.
S305, the mirror image management module sends the identification of the mirror image file 2 to the container calling module.
S306, the container calling module creates a container with the IDE instance 5 based on the image file 2.
In some embodiments, the process of creating a container with an IDE instance deployed based on an image file may refer to related technologies, which are not described herein again. In the IDE instance 5 described above, the code data can be edited in the heaviest program language of the code bin 1.
An embodiment of the present application further provides a server, where the server may include: a memory and one or more processors. The memory is coupled to the processor. The memory is for storing computer program code comprising computer instructions. The processor, when executing the computer instructions, may cause the server to perform the steps performed by the handset in the embodiments described above. Of course, the server includes, but is not limited to, the above-described memory and one or more processors.
An embodiment of the present application further provides an electronic device, which may include: a memory and one or more processors. The memory is coupled to the processor. The memory is for storing computer program code comprising computer instructions. The computer instructions, when executed by the processor, cause the electronic device to perform the steps performed by the handset in the embodiments described above. Of course, the electronic device includes, but is not limited to, the above-described memory and one or more processors.
The embodiment of the present application further provides a chip system, which may be applied to the terminal device in the foregoing embodiment. As shown in FIG. 8, the system-on-chip includes at least one processor 2201 and at least one interface circuit 2202. The processor 2201 may be a processor in the electronic device described above. The processor 2201 and the interface circuit 2202 may be interconnected by wires. The processor 2201 may receive and execute computer instructions from the memory of the electronic device described above via the interface circuit 2202. The computer instructions, when executed by the processor 2201, can cause the electronic device to perform the steps performed by the mobile phone in the above embodiments. Of course, the chip system may further include other discrete devices, which is not specifically limited in this embodiment of the present application.
In some embodiments, as will be apparent to those skilled in the art from the foregoing description of the embodiments, for convenience and simplicity of description, only the above division of each functional module is used for illustration, and in practical applications, the above function allocation may be performed by different functional modules as needed, that is, the internal structure of the apparatus may be divided into different functional modules to perform all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or all or part of the technical solutions may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only a specific implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An IDE management method applied to a first device, the method comprising:
when the system time reaches a first time point, creating a first instance corresponding to a first project, wherein the first time point is the system time point of evaluating and starting the first instance;
receiving an access request sent by second equipment;
responding to the access request, and sending first page data to the second equipment, wherein the first page data indicates the second equipment to display first prompt information, and the first prompt information indicates that the first instance is in a running state;
destroying the first instance when the system time reaches a second time point, wherein the second time point is the system time point when the first instance is evaluated to be closed.
2. The method of claim 1, wherein a first model is configured in the first device, and the first model is used for predicting a start-stop time of a user using an instance corresponding to each item, and the method further comprises:
determining the first time and second time for a first instance using the first model; the first model is a neural network model obtained by training with first sample data, and the first sample data comprises time records of creating or destroying each instance instructed by a user and attendance data of the user.
3. The method of claim 1, further comprising:
receiving first login information sent by the second device, wherein the first login information comprises a first address of a first code bin;
after the first login information passes the authentication, accessing the first code bin according to the first address;
determining a first type of programming language based on code data in the first code bin;
determining a first image file matched with the first type of program language, wherein the first image file is used for creating a first container, the first container is used for deploying a second instance, and the second instance is used for compiling the first type of program language;
creating the second instance based on the first image file.
4. The method of claim 3, wherein the first code bin includes first code data and second code data, and wherein determining a first type of programming language based on the code data in the first code bin comprises:
determining a first proportion corresponding to the first code data and a second proportion corresponding to the second code data, wherein the first proportion is a proportion between the first code data and all code data in the first code bin, and the second proportion is a proportion between the second code data and all code data in the first code bin;
and when the first ratio is larger than the second ratio, determining that the program language type corresponding to the first code data is the first type program language.
5. The method of claim 1, wherein creating the first instance corresponding to the first item comprises:
querying a second image file matched with the first project from a plurality of preconfigured image files, wherein the second image file is used for creating a container for deploying a first instance, the second image file comprises an executable file of a first tool and a program file for constructing a first development environment, the first tool is a basic tool in the first instance, and the first development environment is a running environment required by the first instance;
and generating the first instance according to the second mirror image file.
6. The method of claim 5, further comprising, prior to destroying the first instance:
acquiring a second executable file corresponding to a second tool, wherein the second tool is a program tool installed in the first instance during the running of the first instance;
acquiring a first system parameter, wherein the first system parameter is a system parameter changed in the first instance during the operation of the first instance;
and packaging the second executable file, the first system parameter and the second image file to obtain a third image file, and associating the third image file with the first project, wherein the third image file is used for creating a container for deploying the first instance.
7. The method of claim 6, further comprising:
receiving first creation information sent by the second device, wherein the first creation information comprises a first identifier corresponding to the first item;
determining that the third image file associated with the first project exists;
and creating the first instance based on the third image file, wherein the first instance comprises the second tool and the first system parameter.
8. An electronic device, characterized in that the electronic device comprises one or more processors and memory; the memory coupled with the processor, the memory for storing computer program code, the computer program code comprising computer instructions, which when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-7.
9. A computer storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-7.
10. A computer program product, characterized in that the computer program product comprises a computer program which, when run on a computer, causes the computer to carry out the method according to any one of claims 1-7.
CN202210995914.0A 2022-08-19 2022-08-19 IDE management method and electronic equipment Pending CN115061702A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210995914.0A CN115061702A (en) 2022-08-19 2022-08-19 IDE management method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210995914.0A CN115061702A (en) 2022-08-19 2022-08-19 IDE management method and electronic equipment

Publications (1)

Publication Number Publication Date
CN115061702A true CN115061702A (en) 2022-09-16

Family

ID=83208404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210995914.0A Pending CN115061702A (en) 2022-08-19 2022-08-19 IDE management method and electronic equipment

Country Status (1)

Country Link
CN (1) CN115061702A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572294A (en) * 2013-10-18 2015-04-29 奈飞公司 Predictive auto scaling engine
CN107077385A (en) * 2014-09-10 2017-08-18 亚马逊技术公司 Calculated examples start the time
CN109614202A (en) * 2018-12-04 2019-04-12 北京京东尚科信息技术有限公司 Backup, recovery and the mirror processing method and system of container environment
CN111386516A (en) * 2017-11-24 2020-07-07 亚马逊技术股份有限公司 Automatically scaling hosted machine learning models for generative inference
CN111414302A (en) * 2020-02-28 2020-07-14 天津车之家数据信息技术有限公司 Static code quality analysis method and computing device for continuous integration process
CN112650500A (en) * 2020-12-31 2021-04-13 中国农业银行股份有限公司 Automatic compiling method and device adopting jupyter
CN113391796A (en) * 2020-03-13 2021-09-14 华为技术有限公司 Construction method, device, equipment and medium of integrated development environment
CN113614694A (en) * 2019-03-22 2021-11-05 亚马逊技术股份有限公司 Binning virtual machine workloads using predicted capacity usage
CN113806018A (en) * 2021-09-13 2021-12-17 北京计算机技术及应用研究所 Kubernetes cluster resource hybrid scheduling method based on neural network and distributed cache

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572294A (en) * 2013-10-18 2015-04-29 奈飞公司 Predictive auto scaling engine
CN107077385A (en) * 2014-09-10 2017-08-18 亚马逊技术公司 Calculated examples start the time
CN111386516A (en) * 2017-11-24 2020-07-07 亚马逊技术股份有限公司 Automatically scaling hosted machine learning models for generative inference
CN109614202A (en) * 2018-12-04 2019-04-12 北京京东尚科信息技术有限公司 Backup, recovery and the mirror processing method and system of container environment
CN113614694A (en) * 2019-03-22 2021-11-05 亚马逊技术股份有限公司 Binning virtual machine workloads using predicted capacity usage
CN111414302A (en) * 2020-02-28 2020-07-14 天津车之家数据信息技术有限公司 Static code quality analysis method and computing device for continuous integration process
CN113391796A (en) * 2020-03-13 2021-09-14 华为技术有限公司 Construction method, device, equipment and medium of integrated development environment
CN112650500A (en) * 2020-12-31 2021-04-13 中国农业银行股份有限公司 Automatic compiling method and device adopting jupyter
CN113806018A (en) * 2021-09-13 2021-12-17 北京计算机技术及应用研究所 Kubernetes cluster resource hybrid scheduling method based on neural network and distributed cache

Similar Documents

Publication Publication Date Title
US10664289B2 (en) Loading sub-applications for a terminal application
CN109960582B (en) Method, device and system for realizing multi-core parallel on TEE side
US20160321543A1 (en) Trusted predictive analytic execution middleware
US20220147837A1 (en) Trusted predictive analytic execution middleware
CN115292199B (en) Video memory leakage processing method and related device
WO2022100222A1 (en) Information retrieval method, apparatus and system, and storage medium
WO2020042112A1 (en) Terminal and method for evaluating and testing ai task supporting capability of terminal
CN113742366B (en) Data processing method, device, computer equipment and storage medium
CN110769094A (en) Method for displaying user interface according to rear shell color and electronic equipment
CN111580883B (en) Application program starting method, device, computer system and medium
CN113590210A (en) Class verification method and device in application program
CN114741121B (en) Method and device for loading module and electronic equipment
CN115061702A (en) IDE management method and electronic equipment
CN113961534B (en) Method and electronic equipment for generating log file
CN112905931B (en) Page information display method and device, electronic equipment and storage medium
WO2021238376A1 (en) Function pack loading method and apparatus, and server and electronic device
CN113590238A (en) Display control method, cloud service method, device, electronic equipment and storage medium
CN116643778B (en) Application program optimization method and electronic equipment
CN117131497A (en) Software detection method and electronic equipment
CN116027878B (en) Power consumption adjustment method and electronic equipment
CN113535252A (en) Application program running method, related equipment and medium
WO2022155848A1 (en) Method for optimizing virtual machine performance, and related apparatus
WO2023202406A1 (en) Display method and electronic device
CN117032940B (en) System, method and device for scheduling resources, electronic equipment and storage medium
CN117492930A (en) Script processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination