Front-end and back-end application program interaction method based on cloud computing
By adopting the method of only displaying operation interface images in cloud computing, the problems of wasted resources, poor user experience and undynamic allocation of resources in the existing technology are solved, efficient front-end interaction is achieved, and cross-platform capabilities are supported.
Patent Information
- Application Number
- CN202510016398.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-05-16
AI Technical Summary
The existing cloud computing front-end and back-end interaction technologies have problems such as wasted resources, poor user experience, large amount of data interaction and undynamic allocation of resources.
The client only displays the operation interface image to reduce data transmission and information dependence between front and back-end applications. All business operations and interface generation are completed in the cloud, and the client only performs image display and device operation information transmission.
It greatly reduces client device overhead, improves computing speed and performance, realizes front-end separation, reduces the interdependence between clients and cloud, has good cross-platform capabilities, and supports smooth interactions between different operating systems.
Smart Images

Figure CN120010980A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a front-end and back-end application program interaction method based on cloud computing, a computer network computing method, and a method for interaction between a client and a server applied to cloud computing. Background Art
[0002] Existing cloud computing front-end and back-end interactions usually use two technologies: virtualization technology and remote desktop technology, or a combination of the two.
[0003] Virtualization technology abstracts the hardware processing capacity of the server into standardized logical processing capacity to form a computing pool, and then allocates different types of processing tasks to the corresponding virtual servers in the computing pool, realizing the dynamic allocation of server computing processing capacity, increasing logical processing units for tasks with higher loads, and reducing logical processing units for tasks with lower loads, thereby improving the average utilization of server processing resources. However, this solution has many limitations and shortcomings. First, virtual machines have inherent disadvantages in resource allocation. The operation of the virtual machine itself requires a certain amount of computing resources, which invisibly causes a waste of server resources. Secondly, after the virtual machine resources are set and started, there is no way to dynamically adjust them, which is equivalent to artificially dividing the rendering resources into several parts. When encountering an emergency and needing to increase the computing resources used by the virtual machine, it is necessary to set the virtual machine parameters in the management software and restart the virtual machine.
[0004] Remote desktop technology maps the virtual machine or server desktop to the local machine screen, and then operates the applications in the mapped desktop system. However, the remote desktop system mapped to the client screen will block and cover the user's local desktop, resulting in a poor user experience. In addition, due to the possible differences between the virtual machine desktop system settings and the local settings, such as the resolution and the local resolution are different, the screen mapping dot matrix is purely in error and the size ratio of the function column (font, icon, mouse, title bar, etc.) is out of proportion, which affects the user experience and even seriously affects the accuracy of the operation.
[0005] In the existing virtual machine solution, when the front-end user uses the cloud software, the entire desktop display must be the desktop of the entire virtual machine, rather than the application interface that the user is concerned about, which leads to a poor user experience. At the same time, since the interface transmitted from the virtual machine to the front-end user is the entire virtual machine desktop, the amount of data transmitted is relatively large. Moreover, when the virtual machine is allocated, resources cannot be allocated dynamically. Therefore, how to reduce the hardware overhead of the client, reduce the data interaction between the client and the server, improve the interaction efficiency, and dynamically allocate resources is a problem that needs to be solved. Summary of the invention
[0006] In order to overcome the problems of the prior art, the present invention proposes a front-end and back-end application interaction method based on cloud computing. The method adopts the method that the computing resources of the client only display the operation interface image, greatly reducing the data transmission and information dependence between the front-end and back-end applications, thereby reducing the device overhead of the client and obtaining an operation speed and performance that exceeds expectations.
[0007] The object of the present invention is achieved by: a front-end and back-end application interaction method based on cloud computing, the steps of the method are as follows: Step 1: Send a request to run the application: The user clicks the application icon on the client to send a request to start the application; Step 2, generation of client application: creating at least one window on the client that has the function of displaying interface images and can record client operation information, wherein the window has a built-in communication module responsible for linking with the corresponding cloud application; Step 3, cloud application service program generation: after receiving the client request, the cloud creates a cloud application that meets the client's needs and has a built-in communication module, and generates a virtual application interface from the application's operation interface in an image mode and stores it in the cloud server's memory; when the virtual program interface changes, the corresponding changed area is regenerated in the memory corresponding to the local image, and the changed part is transmitted to the client; The generation of the virtual application program interface: the cloud application service program generates a virtual application program interface in the server memory in an image mode, and this image generation method is either through a mode of directly writing to the memory buffer, or by using a graphics image acceleration engine to generate it in the video memory and copy it from the video memory to the memory; Step 4, establishing a connection: the client application connects to the cloud application service program according to the known IP address of the corresponding cloud application service program, and sends the physical device information used by the client application to the cloud for the cloud application service program to use as reference information for generating a virtual interface; the cloud application service program creates or modifies the virtual application interface according to the information received from the client application, and sends the virtual application interface to the client application in the form of an image and attached information; Step 5, client application information response: After receiving the information sent by the cloud application service program, the client application saves the information in the memory and draws the interface image in the user application window. When the user operates the interface image in the window, the client application converts the information into custom protocol information and immediately sends the custom protocol information to the cloud application service program; Step 6, cloud application service program information response: The cloud application makes corresponding calculations and responses based on business logic according to the customized information received from the user operating the device. If the content of the virtual interface image changes, the cloud application will regenerate the virtual interface image of the changed part and send the virtual interface image and accompanying information to the front-end application through the communication module.
[0008] The advantages and beneficial effects of the present invention are as follows: the present invention realizes the separation of front-end and back-end by means of image transmission between the client and the cloud and a custom protocol. All business operations and interface generation are completed in the cloud application service program. The client only needs to display the image and the data transmission of the front-end device operation information, and the load is extremely light. Compared with the existing virtual machine technology, it is not necessary to display the entire virtual machine desktop content, avoiding the problem of non-dynamic allocation of resources caused by the allocation of virtual machines. No virtual machine technology is required. The client and cloud communication volume of the method is extremely low, and it has good cross-platform capabilities. The front-end and back-end applications are not restricted by the platform, and the front-end platform and the back-end platform can be different operating systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0010] Figure 1 is a flow chart of the method described in an embodiment of the present invention. DETAILED DESCRIPTION
[0011] Example: This embodiment is a front-end and back-end application interaction method based on cloud computing. The flow field of the method is as follows: Figure 1 The basic architecture of the method shown in this embodiment is a front-end (client) and a back-end (server or cloud) connected via a network. The client is a user interface and some basic drawing connection functions, while the server includes various applications, which can be word processing programs such as WPS, word, etc., or photo processing programs such as PS, video editing programs, program compilation programs, and other specific application programs.
[0012] The basic idea of this embodiment is: unlike the existing virtual machine or remote desktop, which needs to display the content of the entire virtual machine desktop, the client of the method described in this embodiment only displays the application interface in the form of an interface image, does not perform any application operation and business operations, and only records user operation information; while the cloud does not display the interface of the application service program, but sends the interface of the application service program to the client as an interface image. Any user operation of the client (including mouse, keyboard and other operations) is transmitted to the cloud in the form of a custom operation information protocol, and all application business operations and interface generation are completed in the cloud. The interface changes caused by any operation changes of the cloud application service program are also transmitted to the client in the form of an interface image, that is, the client-cloud interaction is carried out in the form of interface images and operation information, which reduces a large amount of data interaction between the client and the cloud, and also reduces the mutual dependence between the client and the cloud, thereby realizing the separation of the front and back ends. This interactive mode of interface image transmission only requires the client to transmit and display the image of the operation interface and the data transmission of the client device operation information. The client operation only displays the interface image and records the user's operation, so the client load is extremely light, which makes the front and back end communication volume extremely low, thereby greatly improving the transmission efficiency of the client and the cloud.
[0013] In this interactive mode of transmitting and operating interface images between the client and the cloud, the operating systems of the client and the cloud only need to have the ability to process interface images, and the operation and processing of interface images are independent of the operating system. This feature enables the interactive mode of transmitting and operating interface images between the front and back ends to have good cross-platform capabilities. The front and back end applications are not restricted by the platform (operating system). The client platform and the back end platform can even be different operating systems, and can also achieve smooth and good docking and transmission. This is a major advantage of the method described in this embodiment, because the existing front and back end interactive modes require that the platforms must be the same or similar, otherwise the operation will be difficult, making it difficult to run normally. The interactive mode of using interface images solves the cross-platform problem well. In this way, any computer, regardless of its operating system, can directly operate as long as it is installed with the client formed by the method described in this embodiment, without having to consider the operating system problem, which is simple and practical.
[0014] Another advantage of this interactive mode of transmitting and operating interface images between the client and the cloud is multi-window operation, which is a very obvious advantage. Since it is an interface image operation, of course multiple interface images can be displayed on one screen (including multiple screens controlled by one computer), and each interface image is actually a window, that is, multiple windows can be displayed and operated at the same time. For example, the interface image of word processing, the interface image of image processing and the interface image of program editing can be displayed on one screen at the same time, that is, the task schedule of word processing, image processing and program editing can be carried out simultaneously in the cloud, making the user experience better.
[0015] The third advantage of this client-cloud interaction method based on interface images and operation records is that it can dynamically allocate resources. Since the client only displays interface images without any computing process, all computing is done in the cloud. Therefore, the cloud can arbitrarily allocate computing without being constrained by the client, so that the computing resources of the cloud can be used more effectively, thus solving the problem that resources cannot be dynamically allocated in existing virtual machines and remote desktop methods.
[0016] The specific steps of the front-end and back-end application interaction method described in this embodiment are as follows: Step 1: Send a request to run the application: The user clicks the application icon on the client to send a request to start the application.
[0017] The interactive program formed by the method described in this embodiment has been established on both the client and the cloud. Regardless of the operating system used by the client and the cloud, the interactive program can support the transmission of interface images. This step is used for users to start applications. When a user clicks an application icon on the client interface, such as the icon of the word processing application WPS, the effect produced is neither to start the local WPS application as usual, nor to start a local remote connection request on the client, but to create a WPS operation image window and send a request to the cloud to link to the WPS application service program in the cloud.
[0018] Step 2, generation of client application: creating at least one window on the client that has the function of displaying interface images and can record client operation information, wherein the window has a built-in communication module responsible for linking with the corresponding application on the cloud.
[0019] The interface of an application is actually an image. The interface that the user sees is an image displayed by the operating system. When the user clicks on the interface (image) on the screen, the application simply responds to the user's operation and changes the content on the interface according to the logic within the program (actually, it redraws an image and displays it).
[0020] Regardless of the operating system, in the client operation interface, a display window is simply created. This window only needs to have the function of displaying images and can refresh the local image of the window according to the information received from the cloud application service program. More windows can also be created to display more functional interface images. The association information between windows is constrained by the information transmitted by the cloud application. The application started by the client has a built-in communication module, which is responsible for the communication connection with the cloud service application. When the user clicks the interface with the mouse or brush, or operates the keyboard and other controllable devices, the client application will promptly transmit these operation information to the cloud application. For example, after the client clicks the WPS icon, a WPS word processing operation interface image window is created. This WPS window only displays the image of the WPS operation interface and records the keyboard, mouse and other operations in the WPS window. This WPS window also has a built-in communication module for interactive connection with the WPS in the cloud.
[0021] Step 3, cloud application service program generation: After receiving the client's request, the cloud creates a cloud application that is adapted to the client's needs and has a built-in communication module, and generates a virtual application interface from the application's operating interface in image mode and stores it in the cloud server's memory; when the virtual program interface changes, the corresponding local image of the corresponding changed area is regenerated in the memory, and the changed part is transmitted to the client.
[0022] The interface of an application is actually an image. The interface that the user sees is an image displayed by the operating system. The application on the server side will draw an image (the interface of the application) in the server-side memory and send all or differentiated parts of this image to the client program).
[0023] Cloud application service program, no matter on which operating system, creates a cloud application service program. The application has the necessary business functions as needed, but will not create an application interface on the server side. It will only generate a virtual application interface in image mode in the server memory. When the virtual program interface needs to be changed, only the corresponding changed area needs to be re-generated in the memory. The corresponding partial image, and this partial (or full) changed image is passed to the client application for partial (or full) display.
[0024] The generation of the virtual application program interface: the cloud application service program generates a virtual application program interface in the server memory in an image mode, and this image generation method is either through a mode of directly writing to the memory buffer, or by using a graphics image acceleration engine (OpenGL, Vulkan, DirectX, etc.) to generate in the video memory and copy from the video memory to the internal memory; When creating a virtual application interface image, the first step is to generate the overall program image interface and send it to the client application. After that, according to the change of information, only the image of the local change of the virtual application interface needs to be generated (in short, the minimum overhead is preferred), and the changed image is sent to the client application for local drawing. In the program virtual interface, including the title bar, window border, menu, client area, etc., these window functions only require certain computer programming skills to generate interface images in memory. It should be noted that for virtual pop-up menus (or other custom-type windows), their range may exceed the range of the client application window (usually rectangular, or special shapes), so the client application needs to open another small window or multiple small windows to draw the menu image.
[0025] A communication connection needs to be established between the client application and the cloud application service program. Communication connection and information exchange are carried out through the communication module. The communication module uses TCP / IP or UDP (but not limited to these two modes), and the communication module is divided into client and server. The client communication module is mainly responsible for receiving information from the cloud application service program and sending the client's device operation information to the cloud application service program. The server communication module is mainly responsible for receiving information from the client application (mainly device operation information and other customized information), and sending the change information of the cloud application service program virtual interface to the client application.
[0026] Step 4, establishing a connection: the client application connects to the cloud application service program based on the known IP address of the corresponding cloud application service program, and sends the physical device information used by the client application (such as display resolution, current application window size, etc.) to the cloud for the cloud application service program to use as reference information for generating a virtual interface; the cloud application service program creates or modifies the virtual application interface based on the information received from the client application, and sends the virtual application interface to the client application in the form of an image and attached information.
[0027] The program running on the client and the program running on the server need to be connected through communication, and each runs according to the internal operating mode, forming the associated architecture logic between the client and the server: the server program receives data information from the client program, needs to parse the data information, and perform corresponding logical operations according to the parsed content. Conversely, if the program running on the client receives data from the server program, it also needs to parse it, draw the interface according to the parsed content, and present it on the screen.
[0028] Step 5, client application information response: After the client application receives the information (image and attached information) sent by the cloud application service program, it saves this information in the memory and draws the interface image in the user application window. When the user operates the interface image in the window (such as mouse clicks and movements, keyboard key information or other device information), the client application will convert this information into custom protocol information (for cross-platform application) and immediately send this custom protocol information to the cloud application service program.
[0029] The custom protocol described above is very simple because it only records the operation of the physical devices of the keyboard and mouse. The custom protocol means that the content transmitted is private content, which can only be written and parsed by the programmer himself. For example, the data content transmitted from the client to the server includes the position of the mouse, keyboard operation information, etc.
[0030] Step 6, cloud application service program information response: The cloud application makes corresponding calculations and responses based on business logic according to the customized information received from the user operating the device. If the content of the virtual interface image is changed (whole or part), the cloud application will regenerate the virtual interface image of the changed part, and send the virtual interface image and accompanying information (such as map location, etc.) to the front-end application through the communication module.
[0031] Finally, it should be noted that the above is only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred arrangement scheme, a person of ordinary skill in the art should understand that the technical solution of the present invention (such as the applied system, the architecture of the front-end and back-end applications, the image processing method, the sequence of steps, etc.) can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A front-end and back-end application interaction method based on cloud computing, characterized in that: The steps of the method are as follows: Step 1: Send a request to run the application: The user clicks the application icon on the client to send a request to start the application; Step 2, generation of client application: creating at least one window on the client that has the function of displaying interface images and can record client operation information, wherein the window has a built-in communication module responsible for linking with the corresponding cloud application; Step 3, cloud application service program generation: after receiving the client request, the cloud creates a cloud application that meets the client's needs and has a built-in communication module, and generates a virtual application interface from the application's operation interface in an image mode and stores it in the cloud server's memory; when the virtual program interface changes, the corresponding changed area is regenerated in the memory corresponding to the local image, and the changed part is transmitted to the client; The generation of the virtual application program interface: the cloud application service program generates a virtual application program interface in the server memory in an image mode, and this image generation method is either through a mode of directly writing to the memory buffer, or by using a graphics image acceleration engine to generate it in the video memory and copy it from the video memory to the memory; Step 4, establishing a connection: the client application connects to the cloud application service program according to the known IP address of the corresponding cloud application service program, and sends the physical device information used by the client application to the cloud for the cloud application service program to use as reference information for generating a virtual interface; The cloud application service program creates or modifies a virtual application program interface according to the information received from the client application program, and sends the virtual application program interface to the client application program in the form of an image and attached information; Step 5, client application information response: After receiving the information sent by the cloud application service program, the client application saves the information in the memory and draws the interface image in the user application window. When the user operates the interface image in the window, the client application converts the information into custom protocol information and immediately sends the custom protocol information to the cloud application service program; Step 6, cloud application service program information response: The cloud application makes corresponding calculations and responses based on business logic according to the customized information received from the user operating the device. If the content of the virtual interface image changes, the cloud application will regenerate the virtual interface image of the changed part and send the virtual interface image and accompanying information to the front-end application through the communication module.
Citation Information
Patent Citations
Cloud interaction protocol design
CN102333065A
Application virtualization method and system based on container technology
CN111061540A