Cloud code development system, method, apparatus, device and storage medium

The cloud code development system addresses slow access and security issues by implementing stream synchronous code synchronization and execution on a coding virtual machine, enhancing performance and feature availability in cloud code development.

JP7538330B2Active Publication Date: 2024-08-21BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023508557
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-11-26
Filing Date
2022-06-20
Publication Date
2024-08-21
Estimated Expiration
2042-06-20

AI Technical Summary

Technical Problem

Existing cloud code development methods face issues such as slow access to code files, slow index creation, slow search speed, poor security, and lack of advanced features due to traditional synchronization methods like Samba or FTP.

Method used

A cloud code development system utilizing a client and cloud server with a proxy module and remote server module for stream synchronous code synchronization, enabling real-time code synchronization and execution on a coding virtual machine, along with a reverse proxy server for enhanced security and load balancing.

Benefits of technology

This approach ensures strong consistency between client and cloud server code, improves access speed, indexing, and search speed, enables advanced IDE features, and enhances security and management of cloud code development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007538330000006
    Figure 0007538330000006
  • Figure 0007538330000007
    Figure 0007538330000007
  • Figure 0007538330000003
    Figure 0007538330000003
Patent Text Reader

Abstract

The present disclosure provides a cloud code development system, method, apparatus, device and storage medium, which relate to the computer technology field, particularly to the cloud code development, online coding technology field. A specific technical solution is as follows: a client includes a proxy module and a remote server module, the remote server module obtains a code input by a user and synchronizes the code input by the user to a cloud server in a stream synchronization manner, the cloud server creates a coding virtual machine corresponding to the remote server module, writes the code synchronized by the remote server module in a stream synchronization manner into the virtual machine, executes the code by the coding virtual machine and generates a corresponding task, the proxy module pulls the task from the cloud server and sends the task to the remote server module, and the remote server module is further configured to execute the task. According to the present disclosure, the cloud code development is realized, and the stream synchronization manner can improve the consistency of the code between the client and the cloud server, and improve the response speed of the cloud code development.
Need to check novelty before this filing date? Find Prior Art

Description

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims priority to a Chinese patent application bearing application number 202111422652.0 and entitled "Cloud code development system, method, apparatus, device and storage medium" filed with the State Intellectual Property Office of the People's Republic of China on November 26, 2021, the entire contents of which are hereby incorporated by reference into this application. [Technical field]

[0002] The present disclosure relates to the field of computer technology, in particular to cloud code development, online coding technology. [Background technology]

[0003] Cloud code development provides back-end cloud services to perform cloud integration. Compared with traditional front-end development methods, cloud code development can provide complete back-end cloud services, including basic capabilities such as database, storage, functions, static hosting, etc., which can greatly save front-end hardware resources. Users can also realize the development of high-computing performance code through smartphones. And with the development of computer technology, code development is gradually divided from the original monolithic architecture into multiple service applications composed of many small components or services that are loosely coupled and can be deployed independently. Cloud code development can well adapt to collaborative development scenarios. Summary of the Invention

[0004] The present disclosure provides a cloud code development system, method, apparatus, device, and storage medium.

[0005] According to one aspect of the present disclosure, there is provided a cloud code development system, The cloud code development system includes a client and a cloud server, the client includes a proxy module and a remote server module; The remote server module is configured to obtain a code entered by a user and synchronize the code entered by the user to the cloud server in a stream synchronization manner; The cloud server is configured to create a coding virtual machine corresponding to the remote server module, write a code synchronized by the remote server module in the virtual machine in a stream synchronization manner, execute the code by the coding virtual machine, and generate a corresponding task; the proxy module is configured to pull the tasks from the cloud server and send the tasks to the remote server module; The remote server module is further configured to execute the task.

[0006] According to another aspect of the present disclosure, there is provided a cloud code development method applied to a client, the cloud code development method comprising: Obtaining a code entered by a user and synchronizing the code to a cloud server in a stream synchronization manner; Pulling tasks from the cloud server, the tasks being generated based on the code by a coding virtual machine in the cloud server; executing said task; Includes.

[0007] According to another aspect of the present disclosure, there is provided a cloud code development method applied to a cloud server, the cloud code development method comprising: Creating a coding virtual machine; writing stream synchronously synchronized code to the virtual machine; executing the code with the coding virtual machine to generate a corresponding task; Includes.

[0008] According to another aspect of the present disclosure, there is provided a cloud code development device applied to a client, the cloud code development device comprising: a remote server module for obtaining the code entered by the user and synchronizing the code to a cloud server in a stream synchronization manner; a proxy module for pulling tasks from the cloud server and sending the tasks to the remote server module, the tasks being generated based on the code by a coding virtual machine in the cloud server; Including, The remote server module is further configured to execute the task.

[0009] According to another aspect of the present disclosure, there is provided a cloud code development apparatus applied to a cloud server, the cloud code development apparatus comprising: a virtual machine creation module for creating a coding virtual machine; a code synchronization module for writing stream-synchronized code to the virtual machine; and a task generation module for executing the code by the coding virtual machine and generating a corresponding task.

[0010] According to another aspect of the present disclosure, there is provided an electronic device, comprising: The electronic device comprises: At least one processor; a memory in communication with the at least one processor; The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor such that the at least one processor can execute the cloud code development method described in any one of the present disclosure.

[0011] According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the cloud code development method according to any one of the aspects of the present disclosure.

[0012] According to another aspect of the present disclosure, there is provided a computer program product including a computer program, the computer program being adapted to implement the cloud code development method according to any one of the claims of the present disclosure when executed by a processor.

[0013] In the embodiment of the present disclosure, cloud code development is realized, and compared with the code file synchronization method, the stream synchronization method can improve the code consistency between the client and the cloud server, and improve the response speed of cloud code development.

[0014] It is understood that the contents described in this section are not intended to represent key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily apparent from the following specification. [Brief description of the drawings]

[0015] In order to more clearly describe the technical solutions of the embodiments of the present application and the prior art, the following briefly describes the drawings necessary for the embodiments and the prior art. Obviously, the drawings described below are only a part of the embodiments of the present application, and those skilled in the art can obtain other embodiments based on these drawings without creative work. [Figure 1] FIG. 1 is a schematic diagram of a first embodiment according to the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram of a second embodiment according to the present disclosure. [Diagram 3] FIG. 3 is a schematic diagram of an Agent installation method according to the present disclosure. [Figure 4] FIG. 4 is a schematic diagram of a third embodiment according to the present disclosure. [Diagram 5] FIG. 5 is a schematic diagram of a fourth embodiment according to the present disclosure. [Figure 6] FIG. 6 is a schematic diagram of a cloud code development method applied to a client according to the present disclosure. [Figure 7] FIG. 7 is a schematic diagram of a cloud code development method applied to a cloud server according to the present disclosure. [Figure 8] FIG. 8 is a block diagram of an electronic device for implementing a cloud code development method according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0016] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the drawings. Hereinafter, various details of the embodiments of the present disclosure will be included for ease of understanding, but they should be considered as merely examples. Therefore, it is understood that those skilled in the art can make changes or modifications to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, the following description omits the description of well-known functions and configurations.

[0017] In a related cloud code development technology, an IDE (Integrated Development Environment) is used locally on the client to obtain the code entered by the user, and after the code file created by the user is completed, the code file is synchronized to the cloud server via Samba (Information Services Block) or FTP (File Transfer Protocol), and the cloud server updates the local code file of the cloud server according to the code file sent by the client, thereby achieving cloud code development. However, when adopting the above method, there are problems such as slow access speed to the code file, slow index creation, slow search speed, and poor security, and advanced functions of the IDE, such as the Intellisense function, cannot be used.

[0018] Therefore, an embodiment of the present disclosure provides a cloud code development system. Referring to FIG. 1, the cloud code development system includes a client 11 and a cloud server 12, the client 11 includes a proxy module 111 and a remote server module 112; The remote server module 112 is configured to obtain a code entered by a user and synchronize the code entered by the user to the cloud server in a stream synchronization manner; The cloud server 12 is configured to create a coding virtual machine corresponding to the remote server module, write a code synchronized by the remote server module in the virtual machine in a stream synchronization manner, execute the code by the coding virtual machine, and generate a corresponding task; the proxy module 111 is configured to pull the tasks from the cloud server and send the tasks to the remote server module 112; The remote server module 112 is further configured to execute the tasks.

[0019] A proxy module (Agent) and a remote server module (Remote-Server) are installed on the client, and a coding virtual machine corresponding to the Remote-Server is created on the cloud server. The Remote-Server obtains the code entered by the user on the client, and synchronizes the code to the corresponding coding virtual machine in the cloud server in a stream synchronization manner. The coding virtual machine executes the received code to generate a corresponding task. The Agent pulls the task from the coding virtual machine of the cloud server and sends it to the remote server module, which executes the task. The above-mentioned task may be an advanced function task of the IDE, such as code jump, code auto-completion, code tooltip, etc.

[0020] Unlike the synchronization of code files in the related art, the Remote-Server in the embodiment of the present disclosure can realize code synchronization with the cloud server using a stream synchronization method. The Remote-Server directly synchronizes the code entered by the user (including the case of code deletion, overwriting, etc.) with the coding virtual machine of the cloud server using a data stream method, but does not need to be synchronized to the cloud server in the form of a code file after the creation of the code file is completed. The code between the cloud server and the local code of the client has strong consistency, and the code can be accessed quickly, indexed quickly, and searched quickly. In addition, the Agent pulls tasks from the cloud server and has the Remote-Server execute the tasks, thereby realizing the use of advanced functions of the IDE, and functions such as code jump, code auto-completion, and code tooltips can be smoothly realized.

[0021] In one example, a cloud server may be a host that requires remote operation, and by applying the cloud code development system according to an embodiment of the present disclosure, the cloud code development experience can be made consistent with the local experience, remote operation can be realized for any host that requires operation, operations such as debugging and creating cloud programs can be supported, and integrated management of multiple hosts can be realized.

[0022] The cloud server may realize code execution through a pseudo terminal method. In one possible embodiment, the remote server module is specifically configured to create a terminal emulator, obtain a code input by a user through the terminal emulator, and transmit the code to a coding virtual machine of the cloud server in a real-time synchronous full-duplex communication manner; The cloud server is specifically configured to input the received code to a master pseudo-terminal of the coding virtual machine, block a file descriptor of the master pseudo-terminal, map the code to a slave pseudo-terminal by the master pseudo-terminal, and input the code to a command processor of the coding virtual machine by the slave pseudo-terminal.

[0023] In one example, the Remote-Server may be an IDE developed based on VS code (Visual Studio Code, a source code editor). The Remote-Server can create a pseudo-terminal in the virtual machine by calling the remote fork-pty function. The fork-pty function first calls the openpty function to obtain an available master pseudo-terminal. When the master pseudo-terminal is obtained, a new process is created, and this process closes the file descriptor of the master pseudo-terminal. Then, the login_tty function is called to start a slave pseudo-terminal in the coding virtual machine, and the code input by the user through the master pseudo-terminal is mapped to the slave pseudo-terminal, and the slave pseudo-terminal inputs the code into the command processor of the coding virtual machine, thereby realizing the execution of the code. For example, as shown in FIG. 2, here, TCP / IP is a network connection protocol, Bash represents the command processor of the coding virtual machine, and Websocket is a full-duplex communication protocol.

[0024] In an embodiment of the present disclosure, the code input by the user is obtained by the terminal emulator, and the code collected by the terminal emulator is sent to the master pseudo terminal in a real-time synchronous full-duplex communication manner, and the file descriptor of the master pseudo terminal is blocked. The master pseudo terminal maps the code input to the master pseudo terminal to a slave pseudo terminal without being responsible for the execution of the code, and the slave pseudo terminal inputs the code to the command processor of the coding virtual machine, thereby realizing the execution of the code. In the present disclosure, code synchronization is performed in a data stream manner, and the local code of the cloud server and the client has strong consistency, and the access speed to the code is fast, the index creation is fast, and the search speed is fast.

[0025] When using the client for cloud code development for the first time, the Agent and Remote-Server need to be installed on the client. In one example, the Agent is first installed on the client, and after the Agent is installed, the Agent installs the Remote-Server locally on the client. In the process of installing the Remote-Server locally on the client, the Agent also creates a coding virtual machine corresponding to the Remote-Server on the cloud server by sending a request to the cloud server.

[0026] In one example, the procedure for installing an Agent is as shown in Figure 3. When the installation starts, first, the Platform interface, Agent interface, and Register Agent (Registration Client) interface are requested and an initialization operation is performed. It is determined whether the Agent is currently installed on the device, and if it is installed, the installation is stopped, and if it is not installed, the installation environment is detected. First, it is determined whether the client's local JDK (Java Development Kit, software development kit) version is higher than the required version (in the figure, version 1.6 is used as an example), and if not, it is determined whether the cloud server requires Patchelf (a tool that modifies dynamic libraries and executable programs). If necessary, the JDK corresponding to the first version (in the figure, JDK1.8_Patch is used as an example) is installed, and if not, the JDK corresponding to the second version (in the figure, JDK1.8_noPatch is used as an example). If the client's local JDK version is higher than the required version, launch the Agent software package (client installation package), determine whether codeserver is installed on the client, and if so, copy the codeserver plugin and its user configuration to vscode-server. If codeserver is not installed, determine whether Patchelf is required, and if so, download vscode-server-Patchelf, or if not, download vscode-server-noPatchelf. Complete the installation by launching vscode-server and reporting information such as Host information and IP information.

[0027] After the Agent is installed, the user manages the coding virtual machines in the local Remote-Server of the client and the cloud server through the Agent. In one possible embodiment, the proxy module is further configured to manage the remote server module and the coding virtual machine corresponding to the remote server module, where the management includes at least one of upgrading, backtracking, restarting, deleting, adding new, and detecting the status.

[0028] The management of the Agent for the Remote-Server and the coding virtual machine includes at least one of upgrading, backtracking, restarting, deleting, adding a new one, and detecting the state. In one example, taking the adding of a new Remote-Server and a coding virtual machine as an example, the user creates a Remote-Server locally on the client through the Agent, and the Agent registers the Remote-Server in the cloud server. After the cloud server receives the registration information for the Remote-Server, it creates a coding virtual machine corresponding to the Remote-Server accordingly. In one example, taking the backtracking of the Remote-Server and the coding virtual machine as an example, when the user wants to backtrack the code to a certain point, the Agent sends a backtracking command for the coding virtual machine to the cloud server, and the data required for backtracking the coding virtual machine (such as a mirror image of the coding virtual machine) is stored in the cloud server, and the cloud server uses the data to perform backtracking on the coding virtual machine, and the coding virtual machine generates a corresponding backtracking task after backtracking, and the Agent pulls the backtracking task, sends it to the Remote-Server, and the Remote-Server executes it, thereby realizing the backtracking of the Remote-Server.

[0029] In an embodiment of the present disclosure, the Agent manages the client's local Remote-Server and the coding virtual machine in the cloud server, making it easier to manage the Remote-Server and the cloud server; the Agent can realize the upgrade, backtracking, restart, deletion, new addition, status detection, etc. of the Remote-Server and the cloud server, thereby improving the availability of cloud code development.

[0030] In one possible embodiment, the proxy module is specifically configured to periodically send a heartbeat request to the coding virtual machine, and when receiving response information of the coding virtual machine, determine that the coding virtual machine is available; when not receiving response information of the coding virtual machine within a preset number of consecutive periods, determine that the coding virtual machine is unavailable, and send recovery information for the coding virtual machine to the cloud server; The cloud server is further configured to send response information to the client in response to the heartbeat request by the coding virtual machine, and to recover the coding virtual machine in response to the recovery information.

[0031] In one example, the Agent may adopt a Client-server architecture design. For example, as shown in FIG. 4, after the Agent is installed in the client, the Agent first registers with the cloud server to obtain legitimate access and control rights. After the Remote-Server and the coding virtual machine are installed, the Agent periodically sends a heartbeat request to the coding virtual machine, and after receiving the response information of the coding virtual machine to the heartbeat request, the Agent determines that the coding virtual machine is available. If the response information of the coding virtual machine is not received within a preset number of consecutive periods (the preset number may be customized according to the actual situation, and is set to, for example, 3 times, 4 times, 5 times, etc.), the Agent determines that the coding virtual machine is abnormal. The Agent may send recovery information to the cloud server, which indicates that the abnormal coding virtual machine is to be recovered, and the cloud server recovers the corresponding coding virtual machine after receiving the recovery information. In one example, the cloud server ensures that the cloud code development procedure is performed by recovering the unavailable coding virtual machine by a method such as rebooting or migrating. The cloud server first attempts to restart the coding virtual machine, and if restarting the coding virtual machine fails due to reasons such as the host machine of the coding virtual machine, the cloud server re-creates the coding virtual machine on an available host machine using a mirror image file of the coding virtual machine, and re-maps the correspondence between the recreated coding virtual machine and the Remote-Server to realize migration of the coding virtual machine.

[0032] In an embodiment of the present disclosure, the Agent obtains the status of the coding virtual machine in the cloud server through a heartbeat request, and recovers the unavailable coding virtual machine through the recovery information, thereby ensuring the progress of cloud code development and improving the availability of cloud code development.

[0033] In one possible embodiment, the cloud server is further configured to add a task notification for the task by the coding virtual machine to a notification queue; The proxy module is specifically configured to: pull a task notification from a notification queue of the coding virtual machine; pull the task from the coding virtual machine based on the task notification; send the task to the remote server module; obtain a task execution status of the remote server module; and send the task execution status to a coding virtual machine in the cloud server; The cloud server is further configured to update, by the coding virtual machine, a task in the coding virtual machine according to the task execution status.

[0034] In one example, as shown in FIG. 4, the coding virtual machine generates a corresponding task in the process of executing the code, for example, the task may be code jump, code auto-completion, code tooltip, etc. The coding virtual machine adds a task notification of the task to a notification queue, and the Agent obtains the task notification from the notification queue, and based on the task notification, pulls the task from the coding virtual machine and sends it to the client's local Remote-Server, and is executed by the Remote-Server. After the Remote-Server executes the task, the Agent may update the task in the coding virtual machine according to the task execution status of the Remote-Server.

[0035] In an embodiment of the present disclosure, the coding virtual machine adds a task notification of a task to a notification queue, and the Agent pulls the task notification from the notification queue, making it convenient for the Agent to obtain the task notification. The Agent pulling the task based on the task notification makes it easier for the Agent to manage the task compared with the Agent directly pulling the task from the task queue, and ultimately improves the task execution efficiency. In addition, the Agent returns the task execution status to the coding virtual machine, so that the coding virtual machine can update its own task in real time according to the task execution status, making it easier to manage and execute the task, and ultimately improving the task execution efficiency.

[0036] To improve the security performance of cloud code development, in one possible embodiment, referring to FIG. 5, the system further includes a reverse proxy server 13 for forwarding data messages between the client and the cloud server.

[0037] The reverse proxy server provides proxy services for the cloud servers. In one example, the reverse proxy server can be Nginx (also known as Enginex, a high-performance reverse proxy web server). All services provided by the cloud servers are mounted on the reverse proxy server, and only the address of the reverse proxy server is exposed to the outside world, while the address of the cloud servers is not directly exposed to the Internet, improving the security of the cloud servers. The reverse proxy server also plays the role of load balancing and data forwarding, improving the load balancing between the cloud servers and ensuring the accurate forwarding of data.

[0038] The embodiment of the present disclosure further provides a cloud code development method applied to a client. With reference to FIG. 6, the cloud code development method includes: In step S601, a code input by a user is obtained and the code is synchronized with a cloud server in a stream synchronization manner; In S602, pulling a task from the cloud server, the task being generated based on the code by a coding virtual machine in the cloud server; In S603, executing the task; Includes.

[0039] In one possible embodiment, obtaining the code entered by the user and synchronizing the code to a cloud server in a stream synchronization manner includes: creating a terminal emulator and obtaining a code entered by a user through said terminal emulator; transmitting the code to a coding virtual machine of the cloud server in a real-time synchronous full-duplex manner; Includes.

[0040] In one possible embodiment, the method further comprises: periodically sending a heartbeat request to the coding virtual machine; determining that a coding virtual machine is available after receiving response information of the coding virtual machine; if response information of the coding virtual machine is not received within a preset number of consecutive periods, determining that the coding virtual machine is unavailable and sending recovery information for the coding virtual machine to the cloud server; Includes.

[0041] In one possible embodiment, pulling a task from the cloud server comprises: Pulling a task notification for a task from a notification queue of the coding virtual machine; Pulling the task from the coding virtual machine based on the task notification; Including, The cloud code development method further includes obtaining a task execution status of the task, and sending the task execution status to the coding virtual machine.

[0042] The embodiment of the present disclosure further provides a cloud code development method applied to a cloud server. Referring to FIG. 7, the cloud code development method includes: In step S701, creating a coding virtual machine; In S702, writing the stream synchronously synchronized code to the virtual machine; In S703, executing the code by the coding virtual machine to generate a corresponding task; Includes.

[0043] In one possible embodiment, writing the stream synchronously synchronized code to the virtual machine comprises: The method includes inputting the received code to a master pseudo-terminal of the coding virtual machine, blocking a file descriptor of the master pseudo-terminal, mapping the code to a slave pseudo-terminal by the master pseudo-terminal, and inputting the code to a command processor of the coding virtual machine by the slave pseudo-terminal.

[0044] In one possible embodiment, the cloud code development method further comprises: sending response information to the client in response to a heartbeat request sent by the client by the coding virtual machine; recovering the coding virtual machine in response to recovery information indicating recovering the coding virtual machine; Includes.

[0045] In one possible embodiment, the cloud code development method further comprises: adding a task notification for the task to a notification queue by the coding virtual machine; updating, by the coding virtual machine, tasks in the coding virtual machine according to task execution status sent by a client; Includes.

[0046] An embodiment of the present disclosure further provides a cloud code development device applied to a client, the cloud code development device comprising: a remote server module for acquiring a code entered by a user and synchronizing the code to a cloud server in a stream synchronization manner; a proxy module for pulling tasks from the cloud server and sending the tasks to the remote server module; Including, wherein the task is generated based on the code by a coding virtual machine in the cloud server; The remote server module is further configured to execute the task.

[0047] In one possible embodiment, the remote server module is specifically configured to create a terminal emulator, obtain code entered by a user through the terminal emulator, and transmit the code to a coding virtual machine of the cloud server in a real-time synchronous full-duplex communication manner.

[0048] In one possible embodiment, the proxy module is further configured to manage the remote server module and a coding virtual machine corresponding to the remote server module, where management includes at least one of upgrading, backtracking, restarting, deleting, adding new, and status detection.

[0049] In one possible embodiment, the proxy module is specifically configured to periodically send a heartbeat request to the coding virtual machine, determine that the coding virtual machine is available after receiving response information of the coding virtual machine, and determine that the coding virtual machine is unavailable if it does not receive response information of the coding virtual machine within a preset number of consecutive periods, and send recovery information for the coding virtual machine to the cloud server.

[0050] In one possible embodiment, the proxy module is specifically configured to pull a task notification from a notification queue of the coding virtual machine, pull the task from the coding virtual machine based on the task notification, send the task to the remote server module, obtain a task execution status of the remote server module, and send the task execution status to a coding virtual machine in the cloud server.

[0051] An embodiment of the present disclosure further provides a cloud code development device applied to a cloud server, the cloud code development device comprising: a virtual machine creation module for creating a coding virtual machine; a code synchronization module for writing stream-synchronized code to the virtual machine; and a task generation module for executing the code by the coding virtual machine and generating a corresponding task.

[0052] In one possible embodiment, the code synchronization module is specifically configured to input the received code to a master pseudo-terminal of the coding virtual machine, block a file descriptor of the master pseudo-terminal, map the code to a slave pseudo-terminal by the master pseudo-terminal, and input the code to a command processor of the coding virtual machine by the slave pseudo-terminal.

[0053] In one possible embodiment, the cloud code development device further comprises: a heartbeat response module for transmitting response information to the client in response to a heartbeat request sent by the client by the coding virtual machine; a virtual machine recovery module for recovering the coding virtual machine in response to recovery information indicating recovering the coding virtual machine; Includes.

[0054] In one possible embodiment, the cloud code development device further comprises: a task notification adding module for adding a task notification of the task to a notification queue by the coding virtual machine; a task updating module for updating, by the coding virtual machine, a task in the coding virtual machine according to a task execution status sent by a client; Includes.

[0055] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of users' personal information shall all comply with relevant laws and regulations and shall not violate public order and good customs.

[0056] According to an embodiment of the present disclosure, the present disclosure further provides a device, a readable storage medium, and a computer program product.

[0057] Here, the electronic device is At least one processor; a memory in communication with the at least one processor; The memory stores instructions executable by the at least one processor, and the commands are executed by the at least one processor such that the at least one processor executes the cloud code development method described in any one of the claims of the present disclosure.

[0058] The computer program product includes a computer program, which, when executed by a processor, implements the cloud code development method according to any one of the claims of the present disclosure.

[0059] 8 illustrates a schematic block diagram of an exemplary electronic device 800 for implementing embodiments of the present disclosure. The electronic device may be any of a variety of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also be any of a variety of mobile devices, such as personal digital assistants, cell phones, smartphones, wearable devices, and other similar computing devices. The components, their connections, and their functions described herein are exemplary only and are not intended to limit the practice of the present disclosure as described and / or claimed herein.

[0060] 8, the device 800 includes a computing means 801 for performing various appropriate operations or processes according to a computer program stored in a read-only memory (ROM) 802 or loaded from a storage means 808 into a random access memory (RAM) 803. The RAM 803 may further store various programs and data for operating the device 800. The computing means 801, the ROM 802 and the RAM 803 are connected to each other by a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0061] A plurality of components in the device 800 are connected to an I / O interface 805. The plurality of components include an input means 806, such as a keyboard, a mouse, etc., an output means 807, such as various displays, a speaker, etc., a storage means 808, such as a magnetic disk, an optical disk, etc., and a communication means 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication means 809 enables the device 800 to exchange information / data with other devices via a computer network, such as the Internet, and / or various communication networks.

[0062] The computing means 801 may be any of a variety of general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the computing means 801 include, but are not limited to, a central processing unit (CPU), a graphic processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units for executing machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing means 801 performs the methods and processes described above, such as the cloud code development method. For example, in some embodiments, the cloud code development method is realized by a computer software program tangibly embodied in a machine-readable medium, such as the storage means 808. In some embodiments, parts or all of the computer program are loaded and / or installed in the device 800 via the ROM 802 and / or the communication means 809. When the computer program is loaded into the RAM 803 and executed by the computing means 801, one or more steps of the cloud code development method described above can be performed. Alternatively, in other embodiments, the computing means 801 may be arranged to execute the cloud code development method in any other suitable manner (eg, using firmware).

[0063] Various embodiments of the systems and techniques described herein may be realized in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include being embodied in one or more computer programs that may be executed and / or interpreted in a programmable system that includes at least one programmable processor, which may be a special purpose or general purpose programmable processor, and may receive data and instructions from and transmit data and instructions to a storage system, at least one input device, and at least one output device.

[0064] The program codes for implementing the methods of the present disclosure may be written using any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing apparatus, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart illustrations and / or block diagrams are performed. The program codes may be executed entirely on the device, partially on the device, as a separate package software, partially on the device and partially on a remote device, or entirely on a remote device or server.

[0065] In the context of the present disclosure, a machine-readable medium may be a tangible medium that contains or stores a program for use by or in combination with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More specific examples of machine-readable storage media may include electrical connections based on one or more wires, portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0066] To provide interaction with a user, the above-described systems and techniques are implemented on a computer. The computer has a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and a pointing device (e.g., a mouse or trackball). The user can provide input information to the computer through the keyboard and the pointing device. Other types of devices can be used to provide interaction with a user. For example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback). Input from the user can also be received in any form (including sound input, speech input, and tactile input).

[0067] The systems and techniques described herein may be implemented in a computing system including a background component (e.g., as a data server), or an intermediate component (e.g., an application server), or a front-end component (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or any combination of such background, intermediate, or front-end components. The components of the system may be connected to each other via any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0068] The computer system may include a client and a server. The client and the server are usually remote from each other and usually interact with each other through a communication network. The relationship between the client and the server is established by executing computer programs having a client-server relationship with each other on corresponding computers. The server may be a cloud server, a server of a distributed system, or a server coupled with a blockchain.

[0069] It is understood that steps can be rearranged, added, or deleted in light of the various processes described above. For example, the steps described in this disclosure can be performed simultaneously, sequentially, or in other orders. As long as the desired results of the technical proposal of the present disclosure can be achieved, there is no particular limitation in this specification.

[0070] The above specific embodiments are not considered to limit the scope of protection of the present disclosure. Those skilled in the art can understand that various modifications, combinations, subcombinations, and substitutions can be made based on design requirements and other factors. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure are all included in the scope of protection of the present disclosure.

Claims

1. A cloud code development system including a client and a cloud server, the client including a proxy module and a remote server module; The remote server module is configured to obtain a code entered by a user and synchronize the code entered by the user to the cloud server in a stream synchronization manner; The cloud server is configured to create a coding virtual machine corresponding to the remote server module, write code synchronized by the remote server module in a stream synchronization manner to the coding virtual machine, execute the code by the coding virtual machine, and generate corresponding tasks, the tasks including at least one of code jump, code auto-completion, and code tooltip; the proxy module is configured to pull the tasks from the cloud server and send the tasks to the remote server module; The cloud code development system, wherein the remote server module is further configured to execute the tasks.

2. The remote server module is specifically configured to create a terminal emulator, obtain a code input by a user through the terminal emulator, and transmit the code to a coding virtual machine of the cloud server in a real-time synchronous full-duplex communication manner; The cloud server is specifically configured to input the received code to a master pseudo-terminal of the coding virtual machine, block a file descriptor of the master pseudo-terminal, map the code to a slave pseudo-terminal by the master pseudo-terminal, and input the code to a command processor of the coding virtual machine by the slave pseudo-terminal. The cloud code development system of claim 1 .

3. The proxy module is further configured to manage the remote server module and the coding virtual machine corresponding to the remote server module, where the management includes at least one of upgrading, backtracking, restarting, deleting, adding, and detecting a state. The cloud code development system of claim 1 .

4. the proxy module is specifically configured to periodically send a heartbeat request to the coding virtual machine, and determine that the coding virtual machine is available after receiving response information of the coding virtual machine; and, if the proxy module does not receive the response information of the coding virtual machine within a preset number of consecutive periods, determine that the coding virtual machine is unavailable, and send recovery information for the coding virtual machine to the cloud server; the cloud server is further configured to send response information to the client in response to the heartbeat request by the coding virtual machine, and to recover the coding virtual machine in response to the recovery information. The cloud code development system of claim 1 .

5. The cloud server is further configured to add a task notification for the task by the coding virtual machine to a notification queue; The proxy module is specifically configured to pull a task notification from a notification queue of the coding virtual machine, pull the task from the coding virtual machine based on the task notification, send the task to the remote server module, obtain a task execution status of the remote server module, and send the task execution status to the coding virtual machine; The cloud server is further configured to update, by the coding virtual machine, a task in the coding virtual machine according to the task execution status. The cloud code development system of claim 1 .

6. The cloud code development system further includes a reverse proxy server for forwarding data messages between the client and the cloud server. The cloud code development system of claim 1 .

7. A cloud code development method applied to a client, comprising: The cloud code development method includes: Obtaining a code entered by a user and synchronizing the code to a cloud server in a stream synchronization manner; Pulling tasks from the cloud server, the tasks being generated based on the code by a coding virtual machine in the cloud server, the tasks including at least one of code jumps, code auto-completion, and code tooltips; executing said task; Including, cloud code development methods.

8. Obtaining the code entered by the user and synchronizing the code to a cloud server in a stream synchronization manner creating a terminal emulator and obtaining a code entered by a user through said terminal emulator; transmitting the code to a coding virtual machine of the cloud server in a real-time synchronous full-duplex manner; The cloud code development method of claim 7, comprising:

9. The cloud code development method further comprises: periodically sending a heartbeat request to the coding virtual machine; determining that a coding virtual machine is available after receiving response information of the coding virtual machine; if response information of the coding virtual machine is not received within a preset number of consecutive periods, determining that the coding virtual machine is unavailable and sending recovery information for the coding virtual machine to the cloud server; The cloud code development method of claim 7, comprising:

10. Pulling a task from the cloud server includes: Pulling a task notification for a task from a notification queue of the coding virtual machine; Pulling the task from the coding virtual machine based on the task notification; Including, The cloud code development method further comprises: obtaining a task execution status of the task; and transmitting the task execution status to the coding virtual machine. The cloud code development method according to claim 7.

11. A cloud code development method applied to a cloud server, comprising: The cloud code development method includes: Creating a coding virtual machine for the client; writing a code synchronized by the client in a stream synchronization manner into the coding virtual machine, the code being input by a user obtained by the client; executing the code with the coding virtual machine to generate corresponding tasks, the tasks including at least one of code jumps, code auto-completion, and code tooltips; Including, cloud code development methods.

12. Writing the code synchronized by the client in the stream synchronization manner to the coding virtual machine comprises: inputting the received code to a master pseudo-terminal of the coding virtual machine, blocking a file descriptor of the master pseudo-terminal, mapping the code to a slave pseudo-terminal by the master pseudo-terminal, and inputting the code to a command processor of the coding virtual machine by the slave pseudo-terminal. The cloud code development method according to claim 11.

13. The cloud code development method further comprises: sending response information to the client in response to a heartbeat request sent by the coding virtual machine to the client; recovering the coding virtual machine in response to recovery information indicating recovering the coding virtual machine; The cloud code development method of claim 11 , comprising:

14. The cloud code development method further comprises: adding a task notification for the task to a notification queue by the coding virtual machine; updating, by the coding virtual machine, tasks in the coding virtual machine according to task execution status sent by a client; The cloud code development method of claim 11 , comprising:

15. A cloud code development device applied to a client, The cloud code development device includes: a remote server module for obtaining the code entered by the user and synchronizing the code to a cloud server in a stream synchronization manner; a proxy module for pulling tasks from the cloud server and sending the tasks to the remote server module, the tasks being generated based on the code by a coding virtual machine in the cloud server; Including, The task includes at least one of code jump, code auto-completion, and code tooltip; the remote server module is further configured to execute the task. Cloud code development device.

16. A cloud code development device applied to a cloud server, The cloud code development device includes: a virtual machine creation module for creating a coding virtual machine corresponding to the client; a code synchronization module for writing code synchronized by the client in a stream synchronization manner into the coding virtual machine, the code being input by a user obtained by the client; a task generation module for executing the code by the coding virtual machine and generating a corresponding task, the task including at least one of a code jump, a code auto-completion, and a code tooltip; Cloud code development device.

17. At least one processor; a memory in communication with the at least one processor; An electronic device comprising: The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor such that the at least one processor executes the cloud code development method according to any one of claims 7 to 14. Electronic devices.

18. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the cloud code development method according to any one of claims 7 to 14.

19. A computer program comprising: When the computer program is executed by a processor, the cloud code development method according to any one of claims 7 to 14 is realized. Computer program.

Citation Information

Patent Citations

  • Composition for regeneratng normal tissue from fibrotic tissue

    CN103068402A

  • Multi-language-oriented high-concurrency online development support method

    CN110502212A

  • Security code development method and equipment, computing equipment and medium

    CN112269570A

  • Simulator with local resource capabilities

    US20160154630A1