Application deployment method and apparatus, and device
By selecting the same container component and multiple preset components to run in the same container in the component orchestration interface, the problem of container startup occupies a lot of resources, and improves the fluency of the application and resource utilization rate.
Patent Information
- Application Number
- PCT/CN2024/128213
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-16
- Filing Date
- 2024-10-29
- Publication Date
- 2025-07-03
AI Technical Summary
In the prior art, containers need to occupy a large amount of resources when starting, resulting in low resource utilization and high delay in data transmission between containers, affecting the smoothness of the application.
By providing a component orchestration interface, users can choose the same container component and multiple preset components to run in the same container, reducing the number of container deployments and passing parameters through memory to improve access efficiency between components.
It reduces the amount of resources occupied by containers, improves access efficiency between components and application fluency, and reduces data transmission delay.
Smart Images

Figure CN2024128213_03072025_PF_FP_ABST
Abstract
Description
Application deployment method, device and equipment
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on December 27, 2023, with application number 202311823774.X and application name “Application orchestration method, apparatus, computing device cluster and storage medium”, and the Chinese patent application filed with the State Intellectual Property Office on April 16, 2024, with application number 202410458081.3 and application name “Application deployment method, apparatus and equipment”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of IT technology, and in particular to an application deployment method, apparatus, and device. Background Art
[0003] Application orchestration is a technology that uses graphical orchestration to develop applications. Users can orchestrate multiple components and configure parameters for each component to complete application development by simply dragging and dropping.
[0004] After application development is complete, the server can deploy the application based on each component. The server creates a container for each component, which runs the component. However, because containers require a certain amount of resources when they start, the server must allocate resources for each container when starting it. This causes the application to consume a large amount of resources, reducing resource utilization.
[0005] Summary of the Invention
[0006] The present application provides an application deployment method, apparatus, and device that can reduce the number of deployed containers, thereby reducing resource usage.
[0007] In the first aspect, the present application provides an application deployment method, in which a component orchestration interface can be provided, the component orchestration interface including: a component selection area and a component orchestration area, the component selection area including: a same-container component and multiple preset components, the same-container component is used to indicate that multiple preset components associated with itself are running in the same container, the component orchestration area is used to provide the user with an operation area for orchestrating components, and the multiple preset components include business components and / or logical components. Afterwards, in response to the user's operation in the component orchestration area, a first same-container component can be created in the component orchestration area, and multiple first preset components associated with the first same-container component can be determined, and the multiple preset components include multiple first preset components. Then, in response to the received application deployment request, a target application including multiple first preset components is deployed, wherein the multiple first preset components run in the first container corresponding to the first same-container component.
[0008] Based on the above technical solution, multiple first preset components can be orchestrated through the first same-container component, and the first same-container component and multiple first preset components can all run in the same container. In this way, when deploying an application, the server can load multiple components through one container, reducing the number of containers deployed, thereby reducing the amount of resources occupied by the container. Moreover, since multiple first preset components all correspond to the first container, it means that one container can run multiple components, so that multiple components can be accessed through memory in the container, thereby improving the access efficiency between components and thus improving the fluency of the application.
[0009] In combination with the first aspect, in a possible design method, in response to a received application publishing request, a target application is generated based on all components in the component orchestration area, where all components include the same container component and multiple first preset components.
[0010] In conjunction with the first aspect, in another possible design, the component orchestration interface further includes a component configuration area. A target resource amount is obtained from the component configuration area corresponding to the first container component, where the target resource amount is the amount of resources required by the first container corresponding to the first container component. The target resource amount is allocated to the first container.
[0011] It is understood that because the first container component includes multiple first preset components, when creating the first container, a target resource amount can be allocated to the first container based on the deployment parameters of the first container component to ensure that the first container can run multiple first preset components. Furthermore, because multiple first preset components run in a single first container, there is no need to allocate a separate startup resource amount for each component container, thereby reducing the number of resources occupied by the container.
[0012] In conjunction with the first aspect, in another possible design, each first preset component is decompressed to obtain a decompressed file corresponding to each first preset component. Subsequently, all decompressed files corresponding to the multiple first preset components can be compressed to obtain a fused component, and the target application is generated based on the fused component.
[0013] It is understandable that by fusing multiple first preset components to obtain a fusion component, when deploying the first container, only the fusion component needs to be loaded, and the first container can run multiple first preset components, thereby reducing the number of deployed containers.
[0014] In combination with the first aspect, in another possible design manner, the interfaces of the called first preset components can be updated to interfaces of the called fusion components.
[0015] In this way, when other components call the first preset component, they can implement the functions of the first preset component by calling the fusion component and complete the parameter transfer.
[0016] In combination with the first aspect, in another possible design approach, a target application may be generated based on all components in the component arrangement area and the connection relationships between the components in all components.
[0017] In combination with the first aspect, in another possible design, all components include: multiple first preset components; the connection relationship between each component in all components includes: the connection relationship between the first preset components.
[0018] In combination with the first aspect, in another possible design method, all components also include: at least one second preset component, the second preset component is any component among multiple preset components, and the second preset component is outside the first container component; the connection relationship between each component in all components also includes: the connection relationship between the second preset component and the edge component, and the edge component is a component among multiple first preset components that has a connection relationship with the second preset component.
[0019] That is to say, the component arrangement area includes not only the first preset component but also the second preset component.
[0020] In conjunction with the first aspect, in another possible design, at least one second preset component includes at least one third preset component, and the edge component includes an edge input component, where the third preset component is a component that transmits parameters to the edge input component. The output parameters of each third preset component can be obtained. The output parameters of each third preset component can then be aggregated to obtain an input parameter set for the first container component. Then, based on the connection relationship between each third preset component and the edge input component, a mapping relationship can be established between each parameter in the input parameter set and the input parameters of the edge input component.
[0021] It is understandable that by establishing a mapping relationship between each parameter in the input parameter set and the input parameters of the edge input component, it can be ensured that parameters can be passed normally between containers when the application is running.
[0022] In conjunction with the first aspect, in another possible design, at least one second preset component further includes at least one fourth preset component, and the edge component further includes an edge output component, which is a component that transmits parameters to the fourth preset component. Output parameters of each edge output component can be obtained. The output parameters of each edge output component are then aggregated to obtain an output parameter set for the first container component. Then, based on the connection relationship between each fourth preset component and the edge output component, a mapping relationship is established between each parameter in the output parameter set and the input parameters of the fourth preset component.
[0023] It is understandable that by establishing a mapping relationship between each parameter in the output parameter set and the input parameter of the fourth preset component, it can be ensured that parameters can be normally transmitted between containers when the application is running.
[0024] In combination with the first aspect, in another possible design manner, when running the first container, parameters are passed between multiple first preset components through a target data structure, and the target data structure is a data structure used in the memory.
[0025] In this way, since the speed of transmitting parameters in the memory is fast, the parameters are transmitted in the memory between multiple first preset components through the target data structure, which can improve the data transmission efficiency, reduce the delay, and thus improve the running speed of the application.
[0026] In a second aspect, the present application provides an application deployment device, comprising: a processing module for, in response to a user operation in a component orchestration area, creating a first same-container component in the component orchestration area, and determining multiple first preset components associated with the first same-container component, wherein the multiple preset components include multiple first preset components. The processing module is for, in response to a received application deployment request, deploying a target application including the multiple first preset components, wherein the multiple first preset components run in a first container corresponding to the first same-container component.
[0027] In a third aspect, the present application provides a computing device cluster, comprising at least one computing device, each computing device comprising a processor and a memory. The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the method described in the first aspect and any possible design thereof.
[0028] In a fourth aspect, the present application provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the first aspect and any possible design thereof.
[0029] In a fifth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible design thereof.
[0030] In a sixth aspect, the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via a circuit. The interface circuit is configured to receive a signal from a memory of the electronic device and send the signal to the processor, the signal including computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device performs the method described in the first aspect and any possible design thereof.
[0031] It can be understood that the beneficial effects that can be achieved by the application deployment device described in the second aspect, the computing device cluster described in the third aspect, the computer-readable storage medium described in the fourth aspect, the computer program product described in the fifth aspect, and the chip system described in the sixth aspect provided above can refer to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] FIG1 is a schematic diagram of an example of component arrangement provided in an embodiment of the present application;
[0033] FIG2 is a schematic diagram of the composition of an application deployment system provided in an embodiment of the present application;
[0034] FIG3 is a schematic diagram of the system architecture of an application deployment platform provided in an embodiment of the present application;
[0035] FIG4 is a flow chart of an application deployment method provided in an embodiment of the present application;
[0036] FIG5 is a schematic diagram of another example of component arrangement provided in an embodiment of the present application;
[0037] FIG6 is a schematic diagram of another example of component arrangement provided in an embodiment of the present application;
[0038] FIG7 is a schematic diagram of another example of component arrangement provided in an embodiment of the present application;
[0039] FIG8 is a schematic diagram of an example of a component configuration provided in an embodiment of the present application;
[0040] FIG9 is a flow chart of another application deployment method provided in an embodiment of the present application;
[0041] FIG10 is a schematic diagram of an example of an application deployment method provided in an embodiment of the present application;
[0042] FIG11 is a flow chart of another application deployment method provided in an embodiment of the present application;
[0043] FIG12 is a schematic diagram of an example of an application deployment interface provided in an embodiment of the present application;
[0044] FIG13 is a schematic diagram of an example of running multiple components in a container provided by an embodiment of the present application;
[0045] FIG14 is a schematic diagram showing the composition of an application deployment device provided in an embodiment of the present application;
[0046] FIG15 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0047] FIG16 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;
[0048] FIG17 is a schematic diagram of the structural composition of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0050] In this application, the character " / " generally indicates that the preceding and following objects are in an "or" relationship. For example, A / B can be understood as A or B.
[0051] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature identified as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0052] Furthermore, the terms "including," "having," and any variations thereof, as used in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or modules is not limited to the listed steps or modules, but may optionally include other steps or modules not listed, or may optionally include other steps or modules inherent to the process, method, product, or apparatus.
[0053] Additionally, in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present concepts in a concrete manner.
[0054] In order to facilitate understanding of the technical solution of the present application, before giving a detailed introduction to the method for obtaining a depth image in the embodiment of the present application, the professional terms mentioned in the embodiment of the present application are first introduced.
[0055] 1. Application orchestration is a graphical orchestration technology that allows users to redevelop applications through simple drag-and-drop operations and parameter configuration. It also supports the re-combination and orchestration of existing applications, thereby improving application development efficiency. Furthermore, after application orchestration is completed, users can publish the orchestrated application as a service and provide external services through the application programming interface (API).
[0056] 2. The canvas is the carrier for application arrangement. Users can use the drag-and-drop method on the canvas to arrange various functional components, configure component parameter values, and display the secondary development application in the form of a process.
[0057] 3. Components are the basic building blocks of low-code development and can be composed of specific business logic and related data. Components can perform specific functions. For example, a video player component can play videos, and a video decoder component can decode videos. An application (APP) can be composed of one or more components. Components can have or not have user interfaces.
[0058] For example, a video decoding component may not have a user interface, that is, the process of an electronic device decoding a video through the video decoding component may not be displayed in the user interface and the user may not be aware of it. A single component can run independently in a user device. For example, a television may be installed with a video playback component, and the television then plays videos through the video playback component. For another example, a component can be a user interface (UI) element, such as a button, text box, or table, or it can be part of the business logic, such as data processing or process control.
[0059] Each component includes a component body and several connection points (input connection points or output connection points). A component uses connection points to transfer data with other components. Typically, a component includes at least one input connection point and / or at least one output connection point. Alternatively, some components may not have connection points, that is, such components have no input connection points and output connection points. In an embodiment of the present application, the components that can be used to form an application include at least one connection point.
[0060] A connection point is a component's external intelligent interface, acting as a proxy for input or output functionality. It is responsible for performing interface protocol checks, negotiation, and data transfer with other connection points. A connection point is the pathway for a component to receive input data from another component and output data to another component. Connection points can be either input or output. Typically, each connection point supports one or more types of data entities. These entities can include images, audio, video, text, and more.
[0061] After introducing the professional terms mentioned in the embodiments of this application, the conventional technologies are introduced below.
[0062] As industrial digitalization advances, the business scenarios for application orchestration are becoming increasingly diverse, and the types and number of components required by applications are also increasing. During application development, users may require a large number of components to complete their application. Currently, users can orchestrate and combine multiple components with simple drag-and-drop operations, and configure parameters for each component to complete application development. When deploying an application, the server creates a container for each component, which then runs the corresponding service.
[0063] For example, as shown in FIG1 , the canvas 101 includes components a, b, and c (all of which are platform components, i.e., components provided by the platform). When deploying application a composed of components a, b, and c, the server can respectively deploy container A corresponding to component a, container B corresponding to component b, and container C corresponding to component c, and then start the containers corresponding to the components included in application a, so that when using the deployed application a, the components included in application a can be called from the container to implement the functions of the application.
[0064] However, since a container needs to create an independent operating environment when it starts, it will need to occupy a certain amount of resources when it starts. This will result in a large amount of server resources being occupied when the user is not using the application, reducing resource utilization. For example, as shown in Figure 1, when the server starts container a, container b, and container c, it needs to allocate certain resources to each container. In addition, when using the deployed application, data needs to be transmitted between containers through the network to achieve mutual collaboration between containers. However, communication between containers will be affected by network topology, network bandwidth, network load, etc., which may cause delays in data transmission between containers.
[0065] In summary, in the above technical solution, when the number of components is large, not only will the number of containers increase, thereby occupying a large amount of server resources; but the data transmission delay between containers is also high, causing the application to become stuck, thus affecting the user experience.
[0066] To this end, an embodiment of the present application provides an application deployment method. In this method, a server can provide a component orchestration interface, which includes a component selection area and a component orchestration area. The component selection area includes: a same-container component and multiple preset components. The same-container component is used to indicate that multiple preset components associated with itself are running in the same container, and the first same-container component corresponds to the first container. Afterwards, in response to the selection operation of the first same-container component, the electronic device can display the first same-container component in the component orchestration area. And in response to the selection operation of multiple first preset components in multiple preset components, multiple first preset components are displayed in the first same-container component, and the multiple first preset components correspond to the first container. Then, in response to the application publishing operation, the electronic device sends an application publishing request to the server. The server can obtain all components in the component orchestration area from the component orchestration interface and generate a target application.
[0067] In other words, multiple first preset components can be orchestrated through the first same-container component, and the first same-container component and multiple first preset components can all run in the same container. In this way, when deploying an application, the server can load multiple components through one container, reducing the number of containers deployed, thereby reducing the amount of resources occupied by the container. Moreover, since multiple first preset components all correspond to the first container, it means that one container can run multiple components, so that multiple components can be accessed through memory in the container, thereby improving the access efficiency between components and thus improving the fluency of the application.
[0068] The implementation environment of the embodiments of the present application is introduced below.
[0069] As shown in FIG2 , an application deployment system provided by an embodiment of the present application includes a computing device cluster 201 and at least one electronic device (such as electronic device 202 ). The computing device cluster 201 can communicate with the electronic device 202 wirelessly or by wire.
[0070] Among them, the computing device cluster 201 can be connected by a set of loosely integrated computer software or hardware to highly closely collaborate to complete computing work, and the computing device cluster 201 can also be regarded as a computer. A single computer in the computing device cluster 201 is usually called a node, and the nodes can be connected through a local area network, high-speed interconnection, remote direct memory access (RDMA), distributed shared memory, etc. The computing device cluster 201 can include one or more clusters of high availability clusters, load balancing clusters, high performance computing clusters, and high availability clusters. The computing device cluster 201 may include: hardware resources (such as servers, memory, central processing unit (CPU), etc.) and service resources (such as software, integrated development environment, etc.).
[0071] The electronic device in the embodiments of the present application may be a tablet computer, a mobile phone, a handheld computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, an in-vehicle device, or the like. The embodiments of the present application do not impose any particular restrictions on the specific form of the electronic device.
[0072] In an embodiment of the present application, the computing device cluster 201 can be used to provide application development and deployment services, that is, to arrange and combine different components to generate new applications. For example, an application deployment platform (or application development software) is deployed in the computing device cluster 201, and the application deployment platform is used to arrange and combine components to generate applications. The computing device cluster 201 can receive an application generation instruction from the electronic device 202, and the application generation instruction is used to instruct the generation of an application through multiple components. The computing device cluster 201 can generate an application based on the application generation instruction. In addition, the computing device cluster 201 can receive a deployment instruction from the electronic device 202 and deploy the application.
[0073] Electronic device 202 can log in to the application deployment platform and provide a visual interface. Electronic device 202 can receive user application management operations and, in conjunction with the user operations, instruct computing device cluster 201 to execute application management instructions. For example, electronic device 202 can display the application deployment platform interface, where the user can operate. Electronic device 202 can then send development instructions or deployment instructions to computing device cluster 201, instructing computing device cluster 201 to execute corresponding tasks.
[0074] After introducing the implementation environment of the embodiment of the present application, the application deployment platform deployed in the computing device cluster 201 is introduced below.
[0075] As shown in FIG3 , an application deployment platform (also referred to as an application deployment platform) provided in an embodiment of the present application includes: a user interface (UI) module, a canvas management module, a component management module, and an operation management module.
[0076] Among them, the UI module is used to display a canvas on the UI, and the canvas includes: a component selection area and a component arrangement area. The component selection area is used to provide users with components to be arranged. The component selection area may include multiple preset components, and the component arrangement area is used to display the components selected by the user. The UI module is also used to receive user operations and execute corresponding instructions. For example, the UI module can receive operations such as dragging and dropping of components in the component selection area by the user, and display the components operated by the user in the component arrangement area. For another example, the UI module can also include controls (such as configuration controls), which are used to receive user configuration operations on components, configure the components, and display the configuration information of the components on the UI. For another example, the UI module can receive user custom component operations and generate new components.
[0077] Optionally, the canvas may further include: a component configuration area, where the component configuration area is used to set component parameters, such as input parameters, output parameters, deployment parameters, etc.
[0078] The canvas management module provides multiple interfaces: management, monitoring, publishing, and deployment. The management interface allows you to add and delete components within the canvas. The monitoring interface allows you to modify components within the canvas (such as the number and relationships). The publishing interface allows you to publish components within the canvas as applications. The deployment interface allows you to deploy components within the canvas.
[0079] The component management module is used to manage the components in the application deployment platform. For example, the component management module can store multiple components, such as custom components (such as python components), mirror components, container components, algorithm package components, component pull-up mirror templates (referred to as mirror templates for short), etc. Among them, custom components are components developed independently by users. Mirror components are components corresponding to the image files that have been created. Algorithm package components are components that include multiple code blocks and dependent packages. The component pull-up mirror template is used to provide mirror files for other components other than the mirror component, so that the application deployment platform loads components based on the mirror files and creates containers. In addition, the component management module can also include: a management interface, a deployment interface, and a model loading interface. The management interface is used to manage the components in the component management module (such as adding, deleting, etc.). The deployment interface is used to deploy components in the component management module. The model loading interface is used to add models in the model library.
[0080] The operation management module is used to manage the operation of the application. For another example, the operation management module can be used to deploy components in the canvas, that is, to deploy each component in the canvas in the form of a container, so that the container runs the component to provide the component's services. For another example, the operation management module can be used to deploy components in the component management module. For another example, the operation management module can manage the deployment process, such as the deployment location (such as deploying the application on a server in the computing device cluster 201). For another example, the operation management module can also monitor the application's operating status in real time, such as whether the application's operation is abnormal. For another example, the operation management module can also record the application's operation log, such as if an abnormality occurs during operation at a certain moment. For another example, the operation management module can also perform quota management on the components in the canvas, such as increasing the number of components that can be orchestrated in the canvas. For another example, the operation management module can also perform elastic expansion, such as increasing the number of CPU cores, upgrading the network card, upgrading the hard disk, etc.
[0081] Optionally, the application deployment platform may further include a model management module. The model management module may be used to store multiple models. The models may be user-uploaded models or models trained by the application deployment platform.
[0082] It should be noted that the application deployment method provided in this application may be executed by an application deployment apparatus, which may be a computing device cluster. The computing device cluster may be one or more server clusters consisting of multiple servers. Alternatively, the computing device cluster may be a distributed cluster. Alternatively, the multiple servers in the computing device cluster may be cloud servers. The embodiments of this application do not limit the specific implementation of the computing device cluster.
[0083] At the same time, the application deployment device can also be the central processing unit (CPU) of the computing device cluster, or a module for developing applications in the computing device cluster, or an application deployment platform deployed in the computing device cluster. Alternatively, the application deployment device can be a server in the computing device cluster (such as a physical server or a cloud server). Alternatively, the application deployment device can also include an electronic device that has an application deployment platform (or application deployment software) logged in. In the following embodiments, the application deployment method provided by the embodiments of the present application is described by taking the server and the electronic device executing the application deployment method as an example.
[0084] In an embodiment of the present application, the application deployment method can be divided into step one and step two. Step one is that the user develops the application through the component orchestration interface displayed by the electronic device, and step two is that the server develops the application through the components configured in the orchestration interface.
[0085] The following describes step one, the process of developing an application using the component layout interface displayed on an electronic device. In step one, the electronic device logs into the application deployment platform deployed on a server and displays the component layout interface. The user can then input commands on the electronic device to control it to combine multiple components into a single component and publish the application.
[0086] This embodiment of the present application provides an application deployment method, as shown in FIG4 , which may include:
[0087] S401: The electronic device displays a component arrangement interface.
[0088] The component arrangement interface includes a component selection area and a component arrangement area. The component selection area provides users with components to be arranged and includes multiple preset components. The component arrangement area displays the components selected by the user and provides an operation area for users to arrange components.
[0089] In a possible design, the preset components may include: business components and / or logic components, wherein the business components are components that can execute business functions, and the logic components are components that can execute logic functions.
[0090] It's important to note that business components are reusable modules designed and developed to implement specific business functions. They can exist independently and have clear inputs, processing, and outputs, enabling them to accomplish specific business tasks. Logic components typically encapsulate a set of closely related logical operations, making them easier for developers to call and manage, thereby improving code maintainability and reusability.
[0091] In an embodiment of the present application, the component selection area may further include: a same-container component, which is used to indicate that multiple preset components associated with it are running in the same container. The same-container component is a component pre-developed by the application deployment platform.
[0092] In some embodiments, before the electronic device displays the component arrangement interface, the electronic device may create the component arrangement interface. The electronic device may receive a user's arrangement interface creation operation, and in response to the arrangement interface creation operation, the electronic device may display the component arrangement interface.
[0093] For example, the electronic device may display a homepage interface of an application deployment platform, which includes an application development option. The orchestration interface creation operation may be a user operation (e.g., a click operation) on the application development option. For another example, the orchestration interface creation operation may be a user input operation via voice, such as a user inputting a voice command of "Please create a component orchestration interface."
[0094] Optionally, the electronic device may receive an interface configuration operation, and in response to the interface configuration operation, the electronic device may set configuration information of the component arrangement interface. The configuration information of the component arrangement interface may include: a name of the component arrangement interface, description information of the component arrangement interface, etc.
[0095] The name of the component orchestration interface can identify the component orchestration interface, and the description information of the component orchestration interface can be used to introduce information such as the function and version of the component orchestration interface.
[0096] Exemplarily, the component orchestration interface may include: a name input box and a description information input box. In response to the user entering "orchestration interface of application a" in the name input box and entering "used to implement computing functions" in the description information input box, the name of the component orchestration interface is set to "orchestration interface of application a" and the description information is set to "used to implement computing functions".
[0097] S402: In response to a selection operation on a component in the same container, the electronic device displays a first component in the same container in a component arrangement area.
[0098] The first container component corresponds to the first container.
[0099] It should be understood that the first container component corresponding to the first container means that the first container component corresponds to the first image file corresponding to the first container, and after the first container is created using the first image file, the first container can run the first container component. The first container component is a logical component.
[0100] In a possible implementation, in response to a selection operation on a component in the same container, the electronic device displays the first component in the same container in the component arrangement area in the form of a dotted-line frame or a solid-line frame.
[0101] It should be noted that the embodiments of the present application do not limit the selection operation. For example, the selection operation can be a click operation. For another example, the selection operation can be a drag, drop, or other operation. The embodiments of the present application do not limit the shape of the dashed or solid line frame. For example, the dashed line frame can be a rectangle, square, circle, or other shape displayed in the component arrangement area.
[0102] In an exemplary embodiment, as shown in FIG5 , canvas 501 (i.e., component arrangement interface) may include a component selection area 502 (e.g., a component tree) and a component arrangement area 503. Component selection area 502 may include platform components (e.g., input components, output components, same-container components (i.e., same-container components, such as DEPLOY-TOGETHER)), business components, application components, custom components, etc. In response to a user dragging and dropping a same-container component 504, the electronic device displays the same-container component 504 on canvas 501.
[0103] Optionally, in response to multiple selection operations on components in the same container, the electronic device may display multiple first components in the same container in the component arrangement area.
[0104] S403: In response to a selection operation on the plurality of first preset components, the electronic device displays the plurality of first preset components in a first container component.
[0105] The first preset component is any one of a plurality of preset components, and the plurality of first preset components correspond to the first container.
[0106] It should be understood that the multiple first preset components corresponding to the first container means that the multiple first preset components correspond to the first image file corresponding to the first container, and after the first container is created using the first image file, the first container is capable of running the multiple first preset components. In other words, the first container can run the multiple first preset components.
[0107] In this way, by sharing one container with multiple first preset components, there is no need to create a container for each first preset component, which can reduce the amount of resources occupied by the container and improve resource utilization.
[0108] It should be noted that the embodiments of the present application do not limit the number of first preset components. For example, the number of first preset components can be 3, 5, 8, etc. The embodiments of the present application do not limit the type of the first preset component. For example, the first preset component can be a platform component, a business component, a custom component, etc.
[0109] For example, in combination with Figure 5, as shown in Figure 6, in response to the user's dragging operation on business component A, business component B, and custom component A (the above components are all in the component selection area, not shown in Figure 6), the electronic device displays business component A, business component B, and custom component A in the same container component 504.
[0110] In some embodiments, after displaying multiple first components in the component arrangement area, the electronic device may receive an arrangement operation for the multiple first preset components. In response to the arrangement operation for the multiple first preset components, the electronic device may establish connection relationships between the multiple first preset components. Furthermore, the electronic device may display the connection relationships between the multiple first preset components.
[0111] For example, in combination with Figure 6, it can be seen that there is a connection relationship between business component A and business component B, there is a connection relationship between business component B and custom component A, there is a connection line between business component A and business component B (the connection line may have an arrow or not), and there is a connection line between business component B and custom component A.
[0112] It should be noted that the orchestration operation may include: connection operations between components, adjustment operations of the connection relationships between components (i.e., changing the connection relationships between components). The embodiments of the present application do not limit the implementation method of the orchestration operation. For example, the user can implement the orchestration operation of the component by operating the component itself, such as clicking on any position of the component in the component orchestration area. For another example, the user can implement the orchestration operation of the component by operating the connection point of the component, such as clicking on the connection point of the component. For another example, the user can implement the orchestration operation of the component by entering the connection relationship, such as there is an input box in the component orchestration area, which is used to set the connection relationship between components (such as entering "establish a relationship between business component A and business component B" in the input box).
[0113] In one possible implementation, the plurality of first preset components may include: a first subcomponent, a second subcomponent, and a third subcomponent. In response to a user's connection operation to connect the first subcomponent and the second subcomponent, the electronic device may connect the first subcomponent and the second subcomponent and display a connection line between the first subcomponent and the second subcomponent. In response to a user's connection operation to connect the second subcomponent and the third subcomponent, the electronic device may connect the second subcomponent and the third subcomponent and display a connection line between the second subcomponent and the third subcomponent.
[0114] In this application, components with connections have a connection relationship, which is used to indicate parameter transfer between components. For example, referring to Figure 6, there is a connection between business component A and business component B, and there is a connection between business component B and custom component A. The output parameters of business component A are the input parameters of business component B, and the output parameters of business component B are the input parameters of custom component A.
[0115] Optionally, in response to a user's adjustment operation on the connection relationship between the multiple first preset components, the electronic device may update the connection relationship among the multiple first preset components.
[0116] It should be understood that the connection relationship between components is used to indicate parameter transfer between components.
[0117] It is understood that by orchestrating multiple first preset components, the electronic device can establish a connection relationship between the multiple first preset components. In this way, when multiple components are running in a container, the running order between the components and the direction of data transmission within the container can be guaranteed, so that the container can operate normally.
[0118] S404: In response to the application publishing operation, the electronic device sends an application publishing request to the server.
[0119] The application publishing request is used to instruct the generation of a target application based on all components in the component arrangement area. The application publishing request may include: component identifiers of all components in the component arrangement area and connection relationships between all components.
[0120] In a possible design, the component arrangement interface may include a publish option, which is used to trigger the generation of applications from all components in the component arrangement area. The application publishing operation is a user operation on the publish option.
[0121] In the embodiment of the present application, all components in the component arrangement area may include: a first same-container component and a plurality of first preset components in the first same-container component.
[0122] It should be noted that the multiple first preset components in the first same-container component refer to the components located in the area where the first same-container component is located in the component arrangement area (such as business component A, business component B, and custom component A located in the same-container component 504 in Figure 6).
[0123] Optionally, all components in the component arrangement area may further include at least one second preset component, where the second preset component is any one of the plurality of preset components, and the second preset component is outside the first component in the same container. In other words, the second preset component is a preset component in the component arrangement area that is not within the first component in the same container.
[0124] In some embodiments, before the electronic device receives a user's application publishing operation, the electronic device may receive a user's selection operation of a second preset component. In response to the selection operation of at least one second preset component, the at least one second preset component is displayed in the component arrangement area. Thereafter, in response to an arrangement operation of the second preset component and an edge component among the plurality of first preset components, a connection relationship is established between the second preset component and the edge component, where the edge component is a component among the plurality of first preset components that has a connection relationship with the second preset component.
[0125] That is, the first preset component in the first container component can establish a connection relationship with components outside the first container component through the edge component.
[0126] It should be noted that the embodiment of the present application does not limit the number of edge components. For example, the number of edge components can be 1, 3, 5, etc.
[0127] In a possible design, the edge component may include: an edge input component and / or an edge output component. The edge input component is used to receive parameters transmitted by the second preset component, and the edge output component is used to transmit parameters to the second preset component.
[0128] That is, the input source of the edge input component is the second preset component connected to the edge input component, and the output parameters of the second preset component are the input parameters of the edge input component. The output source of the edge output component is the second preset component connected to the edge output component, and the input parameters of the second preset component are the output parameters of the edge output component.
[0129] For example, in conjunction with FIG6 , as shown in FIG7 , in response to a user dragging an input component and an output component, the electronic device displays the input component and the output component on canvas 501. Furthermore, in response to a user connecting an input component to a business component A, the electronic device displays a line between the input component and the business component A (i.e., an edge input component) on canvas 501. In response to a user connecting an output component to a custom component A, the electronic device displays a line between the output component and the custom component A (i.e., an edge output component) on canvas 501.
[0130] It is understood that by orchestrating the second preset component with the edge components of the plurality of first preset components, the electronic device can establish a connection relationship between the second preset component and the edge components. This ensures that the container corresponding to the second preset component can access the first container normally, thereby ensuring the normal operation of the application.
[0131] Optionally, in response to the arrangement operation on different second preset components, the electronic device may establish a connection relationship between different second preset components.
[0132] Based on the above technical solution, after displaying the component arrangement interface, the electronic device can, in response to the selection operation of the same container component and multiple first preset components, display the first same container component in the component arrangement area and display multiple first preset components in the first same container component. In other words, multiple components are all located in one component. Then, when the electronic device sends an application publishing request to the server, the server can generate a target application based on all components in the component arrangement area. Since the first same container component and the first preset component both correspond to the first container, when deploying the target application, the server can run multiple first preset components in one first container. In this way, the number of deployed containers can be reduced, thereby reducing the resource occupation of the container.
[0133] In some embodiments, before the electronic device receives the application publishing operation, the electronic device may receive a user's orchestration save operation. In response to the orchestration save operation, the electronic device may send a orchestration save message to the server, instructing the server to save all components in the component orchestration interface, the connections between the components, and the configuration information of the components. The server may then save all components in the component orchestration interface, the connections between the components, and the configuration information of the components.
[0134] It is understandable that, through the arrangement saving operation, the server can save the user's arrangement record in a timely manner, making it easier for the user to continue the arrangement later, thereby improving the efficiency of application development.
[0135] The above describes the process of arranging components in the component arrangement interface. The following describes the process of configuring components in the component arrangement interface.
[0136] In some embodiments, before the electronic device receives an application publishing operation from a user, in response to a configuration operation on a component, the electronic device may configure configuration information of the component.
[0137] In an embodiment of the present application, the application publishing request may further include: configuration information of all components in the component orchestration interface.
[0138] It should be noted that the embodiments of the present application do not limit the configuration information of the component. For example, the configuration information of the component may include: component identification (such as component id, component name), component version, component service, input parameters, output parameters, deployment parameters, etc. Among them, the component id and component name are unique, the component service is used to indicate the service provided by the component, the input parameters are the parameters received by the component, the output parameters are the parameters passed by the component to other components, and the deployment parameters are used to indicate the amount of resources required for the container corresponding to the deployed component. Among them, the deployment parameters may include: specification name, virtual machine specification (for example, 1U2G, 2U4G, etc., where "1U2U" can refer to one CPU and 2GB of memory. Alternatively, 1 unit (unit, U) is a unit that represents the height or thickness of the external dimensions of the server, such as 1U = 4.445 cm), disk size (for example, 32GB, 100GB, etc.), etc.
[0139] It should be noted that some of the information in the above configuration information (such as component ID, component name, component version, etc.) can be data filled in by the user, or can be data pre-set by the application deployment platform. This embodiment of the present application does not limit this.
[0140] In one possible implementation, in response to a configuration operation on a first container component, the electronic device may set a target resource amount in the component configuration area, where the target resource amount is the resource amount required by the first container corresponding to the first container component. The configuration information of the first container component includes deployment parameters.
[0141] It should be understood that, since the components running in the first container include a plurality of first preset components, the target resource amount is actually the resource amount required to run the plurality of first preset components.
[0142] For example, with reference to FIG7 , in response to a user's operation on the same-container component 504, the electronic device displays a component configuration area 701 on the component arrangement interface. Component configuration area 701 includes deployment parameters. Subsequently, in response to the user entering deployment parameters in component configuration area 701, the electronic device may set the deployment parameters for the same-container component 504 to 4 cores of CPU and 4096 megabytes (MB) of memory.
[0143] It is understood that because the first container corresponds to multiple first preset components, the electronic device sets a target resource amount in the component configuration area to ensure that the first container can allocate sufficient resources to enable the first container to run multiple first preset components. Furthermore, because multiple first preset components all run in the first container corresponding to the first container component, the user does not need to configure deployment parameters for each first preset component, which can reduce the user's configuration process.
[0144] Optionally, in response to a configuration operation on a first preset component in the component arrangement area, the electronic device may configure configuration information of each first preset component.
[0145] Exemplarily, in combination with FIG7 , as shown in FIG8 , in response to a configuration operation on a business component A, the electronic device may display a component configuration area 801. Component configuration area 801 includes: input configuration and output configuration. Input configuration includes: configuration of input parameters, configuration of input files (including configuration files and model files), input historical data, service parameters, etc. For example, in the configuration of input parameters, the input parameters of component A include: A, B, and C, the mapping parameter of A is a (i.e., the output parameter a of the input component), the mapping parameter of B is b (i.e., the output parameter b of the input component), and the mapping parameter of C is c (i.e., the output parameter c of the input component). Output configuration includes: configuration of output parameters (such as A1, B1, and C1), and output historical data. Optionally, component configuration area 801 also includes configuration of deployment parameters.
[0146] It should be noted that, since the business component A is in the same container component 504, the business component A will eventually run in the container corresponding to the same container component 504. Therefore, the deployment configuration in the component configuration area 801 is invalid information.
[0147] Optionally, the configuration information of the first preset component does not include deployment parameters.
[0148] Optionally, in response to a configuration operation on the second preset components in the component arrangement area, the electronic device may configure configuration information of each second preset component.
[0149] The above is an introduction to the process of implementing step one (i.e., the user developing an application through the component layout interface displayed by the electronic device) on the electronic device. The following is an introduction to the process of step two (i.e., the server developing an application through the component configured in the layout interface).
[0150] In some embodiments, before receiving the application deployment request, in response to the received application publishing request, the server generates a target application based on all components in the component orchestration area, where all components include the same container component and multiple first preset components.
[0151] The following describes how the server generates a target application based on all components in the component orchestration area. To do this, the server must perform three steps: Step 1 (determining the relationships between all components), Step 2 (fusing multiple first-preset components within the first container component), and Step 3 (processing parameters passed by the edge component).
[0152] It should be noted that the embodiments of the present application do not limit the order in which the server executes process one, process two, and process three. For example, the server may first execute process one, then process two, and then process three. For another example, the server may first execute process two, then process one, and then process three. For another example, the server may execute process one, process two, and process three simultaneously.
[0153] The following first introduces the server execution process 1, that is, the process in which the server determines the relationship between all components.
[0154] In an embodiment of the present application, the server can obtain the connection relationship of all components in the component arrangement area from the component arrangement interface. Then, the server can determine the relationship between each component based on the connection relationship of all components in the component arrangement interface.
[0155] It should be noted that the relationship between components refers to the identity (input source or output source) when parameters are passed between each two components. For example, as shown in Figure 6, in the relationship between business component A and business component B, business component A is the input source and business component B is the output source. In the relationship between business component B and custom component A, business component B is the input source and custom component A is the output source.
[0156] In a possible design, the relationship between the various components includes: the relationship between multiple first preset components.
[0157] Optionally, the relationship between the various components may further include: a relationship between the second preset component and the edge component, and a relationship between the second preset component and the second preset component.
[0158] It is understandable that the server determines the relationship between all components, which can ensure the mutual coordination between components when the application is running, so that the application can run normally.
[0159] After introducing process one, process two, ie, the process of the server fusing multiple first preset components in the first container component, will be introduced below.
[0160] An embodiment of the present application provides an application deployment method, as shown in FIG9 . The application deployment method may include: a server may decompress each first preset component to obtain a decompressed file corresponding to each first preset component. The server may then compress all decompressed files corresponding to the plurality of first preset components to obtain a fused component. The server may then generate a target application based on the fused component.
[0161] It should be noted that the embodiments of the present application do not limit the decompressed files. For example, the decompressed files corresponding to the first preset component may include: static resources (such as HTML, CSS, JavaScript files), application code (such as Python, Node.js code), etc. In addition, in the embodiments of the present application, since multiple first preset components are merged into a fusion component, the relationship between the second preset component and the edge component is specifically: the relationship between the second preset component and the fusion component.
[0162] It should be noted that, for the specific introduction of the server generating the target application based on the fusion component, reference can be made to the process in which the component orchestration platform generates the application in response to the operation of publishing the application in conventional technology, which will not be described in detail here. For example, the target application after publication may include at least one of the following: the software package of the fusion component, the application programming interface (API), the image file, the image configuration file, etc. Among them, the API can complete the same communication between containers (such as calling methods between programs). The image configuration file refers to the configuration information used when the image file is started. The configuration information may include: the address of the database link, the user name, the password, the connection information of the middleware, the connection information of the logging server, the logging format, etc.
[0163] It is understandable that the server obtains a fusion component by fusing multiple first preset components, so that when the server deploys the first container, it only needs to load the fusion component to enable the first container to run multiple first preset components, thereby reducing the number of deployed containers.
[0164] In an embodiment of the present application, after generating the fusion component, the server may update the interface of the called first preset component to the interface of the fusion component.
[0165] For example, the interface of the first preset component is interface a, and the interface of the fusion component is interface b. Before generating the fusion component, component 1 needs to call interface a when calling the first preset component. After generating the fusion component, component 1 needs to call interface b when calling the first preset component.
[0166] In this way, when other components call the first preset component, they can implement the functions of the first preset component by calling the fusion component and complete the parameter transfer.
[0167] After introducing process 2, process 3, that is, the process of the server processing the parameters passed by the edge component, will be introduced below.
[0168] In the embodiment of the present application, the server may generate a target application based on all components in the component arrangement area and the connection relationships between the components in all components.
[0169] In one possible design, all components include: multiple first preset components, and the connection relationships between the components in all components include: connection relationships between the first preset components. The server can determine the relationship between the multiple first preset components based on the connection relationships between the multiple first preset components. Then, the server can generate a target application based on the multiple first preset components, the multiple first preset components, and the relationship between the first preset components.
[0170] Optionally, all components may further include: at least one second preset component. The connection relationship between each component in all components may further include: a connection relationship between the second preset component and an edge component.
[0171] It should be noted that, since the edge component includes: an edge input component and / or an edge output component, it means that the second preset component may include: an input source of the edge component and / or an output source of the edge component.
[0172] In one possible implementation, at least one second preset component includes at least one third preset component, and the edge component includes an edge input component, where the third preset component is a component that transmits parameters to the edge input component. The server may obtain the output parameters of each third preset component. The server may then aggregate the output parameters of each third preset component to obtain an input parameter set for the first container component. The server may then establish a mapping relationship between each parameter in the input parameter set and the input parameters of the edge input component based on the connection relationship between each third preset component and the edge input component.
[0173] In other words, this input parameter set represents all parameters input to the first, same-container component. It should be understood that in this application, multiple first preset components are all within the first, same-container component, and the fused component is generated from these multiple first preset components. Therefore, the parameters input to the first, same-container component are the parameters input to the fused component.
[0174] For example, suppose the edge input components include: component a and component b, component a's input parameters are a1 and a2, component b's input parameter is b1, and at least one third preset component includes: component c and component d, component c's output parameters are c1 and c2, and component d's output parameter is d1. Component c is connected to component a, and component d is connected to component b. Table 1 shows the mapping between the input parameter set and the input parameters of the edge input components.
[0175] Table 1
[0176] That is, the output parameter c1 of component c has a mapping relationship with the input parameter a1 of component a, the output parameter c2 of component c has a mapping relationship with the input parameter a2 of component a, and the output parameter d1 of component d has a mapping relationship with the input parameter b1 of component b.
[0177] It is understandable that by establishing a mapping relationship between each parameter in the input parameter set and the input parameters of the edge input component, it can be ensured that parameters can be passed normally between containers when the application is running.
[0178] In another possible implementation, at least one second preset component includes at least one fourth preset component, and the edge component further includes an edge output component that transmits parameters to the fourth preset component. The server may obtain the output parameters of each edge output component. The server may then aggregate the output parameters of each edge output component to obtain an output parameter set for the first container component. Then, based on the connection relationship between each fourth preset component and the edge output component, a mapping relationship is established between each parameter in the output parameter set and the input parameters of the fourth preset component.
[0179] In other words, this output parameter set is the complete set of parameters output by the first, same-container component. It should be understood that in this application, multiple first preset components are all within the first, same-container component, and the fused component is generated from these multiple first preset components. Therefore, the parameters output by the first, same-container component are the parameters output by the fused component.
[0180] For example, suppose the edge output components include: component e and component f, with component e's output parameters being e1 and e2, and component f's output parameter being f1. At least one fourth preset component includes: component g and component h, with component g's input parameters being g1 and g2, and component h's input parameter being h1. Component e is connected to component g, and component f is connected to component h. Table 2 shows the mapping between the output parameter set and the input parameters of the fourth preset component.
[0181] Table 2
[0182] That is, the output parameter e1 of component e has a mapping relationship with the input parameter g1 of component g, the output parameter e2 of component e has a mapping relationship with the input parameter g2 of component g, and the output parameter f1 of component f has a mapping relationship with the input parameter h1 of component h.
[0183] It is understandable that by establishing a mapping relationship between each parameter in the output parameter set and the input parameter of the fourth preset component, it can be ensured that parameters can be normally transmitted between containers when the application is running.
[0184] In another possible implementation, the plurality of second preset components include: at least one third preset component and at least one fourth preset component; and the edge component includes: an edge input component and an edge output component.
[0185] The following introduces process three with a specific example.
[0186] As shown in Figure 10, the target application consists of component one, component two, component three, and component four, and component two and component three correspond to the same container. The server can perform input aggregation on the output parameter 1 and output parameter 2 of component one to obtain an input set including output parameter 1 and output parameter 2. Afterwards, the server can establish a mapping relationship between output parameter 1 and input parameter 1 of component two, and a mapping relationship between output parameter 2 and input parameter 2 of component three (i.e., input expansion). In addition, the server can perform output aggregation on the output parameter 3 of component two and output parameter 4 of component three to obtain an output set including output parameter 3 and output parameter 4. Afterwards, the server can establish a mapping relationship between output parameter 3 and input parameter 3 of component four, and a mapping relationship between output parameter 4 and input parameter 4 of component four (i.e., output expansion).
[0187] The above describes the application development process, steps 1 (users developing applications through the component orchestration interface displayed on their electronic devices) and 2 (servers developing applications through components configured in the orchestration interface). After application development is complete, users can control the server to deploy the published application through their electronic devices. The following describes the application deployment process.
[0188] This embodiment of the present application provides an application deployment method, as shown in FIG11 , which may include:
[0189] S1101. The server provides a component orchestration interface.
[0190] The component arrangement interface includes a component selection area and a component arrangement area. The component selection area includes a same-container component and multiple preset components. The same-container component indicates that multiple preset components associated with it are running in the same container. The component arrangement area provides an operation area for users to arrange components. The multiple preset components include business components and / or logic components.
[0191] S1102: In response to the user's operation in the component arrangement area, the server creates a first same-container component in the component arrangement area, and determines a plurality of first preset components associated with the first same-container component.
[0192] The plurality of preset components include a plurality of first preset components.
[0193] In one possible implementation, in response to a user operation in the component arrangement area, the electronic device may send a component arrangement request to the server. The user operation in the component arrangement area may include selecting a component in the same container in S402 and selecting a plurality of first preset components in S403.
[0194] Optionally, the operation in the component arrangement area may also include an arrangement operation on multiple components (such as multiple first preset components and / or multiple second preset components).
[0195] S1103: In response to the received application deployment request, the server deploys a target application including multiple first preset components.
[0196] Among them, multiple first preset components run in a first container corresponding to the first container component.
[0197] In some embodiments, an electronic device may receive an application deployment operation from a user. In response to the application deployment operation, the electronic device may send an application deployment request to a server, the application deployment request being used to indicate a target application for deployment. The deployed target application may include a first container configured to run a plurality of first preset components.
[0198] It should be understood that the first container running multiple first preset components means that the first container runs a fusion component.
[0199] In an exemplary embodiment, the component arrangement interface further includes a deployment option. The electronic device may receive a user's selection operation on the deployment option and send an application deployment request to the server.
[0200] In another exemplary embodiment, the electronic device may display an application list including application identifiers of published applications. Then, in response to a user's deployment operation on a target application, the electronic device sends an application deployment request to the server.
[0201] As shown in Figure 12, the electronic device may display an application deployment interface 1201, which includes: application identification (such as name), version, status, creation time, description information, and operation options (such as deploy, details, and delete). In response to an operation on the deployment option of application a, the electronic device may instruct to deploy application a.
[0202] In an embodiment of the present application, a server may receive an application deployment request, which indicates a target application for deployment. The server may then deploy a first container based on a first container component and multiple first preset components. The first container is configured to run the multiple first preset components. The first container is also configured to run the first container component.
[0203] In one possible implementation, the server may create a first container based on the first container component, the fusion component, and the target image file corresponding to the first container component, and then deploy the first container in the target environment.
[0204] It should be noted that the embodiment of the present application does not limit the target environment. For example, the target environment can be the server. For another example, the target environment can be any server in the computing device cluster where the server is located.
[0205] In one possible design, the server can obtain the target resource size from the component orchestration interface, where the target resource size is the resource size required by the first container corresponding to the first container component. The server can then allocate the target resource size to the first container.
[0206] Exemplarily, with reference to FIG7 , the target resource amount may be 4 cores for the CPU and 4096 megabytes (MB) for the memory.
[0207] It is understood that because the first container component includes multiple first preset components, when creating the first container, the server can allocate target resources to the first container based on the deployment parameters of the first container component to ensure that the first container can run multiple first preset components. Furthermore, because multiple first preset components run in a single first container, the server does not need to allocate startup resources for each component container separately, thereby reducing the amount of resources occupied by the container.
[0208] In some embodiments, the deployed target application further includes: a second container corresponding to each second preset component, and the second container is used to run the corresponding second preset component.
[0209] It should be noted that the embodiments of the present application do not limit the deployment environment of the first container and the second container. For example, the first container and the second container can be deployed in the same deployment environment (such as a server). For another example, the first container and the second container can be deployed in different deployment environments.
[0210] Based on the above technical solution, the user can create a first same-container component in the component arrangement area through operations in the component arrangement area, and determine multiple first preset components associated with the first same-container component. In this way, when deploying the application, the first same-container component and multiple first preset components can all run in the same container. In this way, multiple components can be loaded through one container, reducing the number of containers deployed and thus reducing the amount of resources occupied by the container. In addition, since one container can run multiple components, multiple components can be accessed through memory in the container, thereby improving the access efficiency between components and thus improving the fluency of the application.
[0211] The above describes the process of deploying the target application. The following describes the process of running the target application.
[0212] In some embodiments, when the first container is running, parameters can be passed between multiple first preset components through a target data structure, where the target data structure is a data structure used in memory.
[0213] It should be understood that passing parameters within a container is equivalent to passing parameters within the same memory. Therefore, the data structure used for the passed parameters must be a data structure used in memory. This embodiment of the application does not limit the target data structure. For example, the target data structure may include, but is not limited to, a queue, an array, a linked list, a stack, etc. The following describes the process of running the first container, using a queue as the target data structure as an example.
[0214] As shown in Figure 13, the first container runs an initialization queue component, a video frame extraction component, an inference component, and a post-processing component. The initialization queue component can initialize two queues (the original image queue and the inference result queue) and pass the two queues as output parameters to the video frame extraction component and the inference component for use. The video frame extraction component can obtain a video stream and extract frames from the video stream to obtain multiple images, which are stored in the original image queue. The inference component can read the images stored in the original image queue, perform inference on the images to obtain inference results, and store the inference results in the inference result queue. The post-processing component can read the inference results from the inference result component and perform post-processing on the inference results to obtain post-processing results. The post-processing component can then feed back the post-processing results to the user.
[0215] In this way, since the speed of transmitting parameters in the memory is fast, the parameters are transmitted in the memory between multiple first preset components through the target data structure, which can improve the data transmission efficiency, reduce the delay, and thus improve the running speed of the application.
[0216] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of an electronic device. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the application deployment method steps of each example described in the embodiment disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or electronic device software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0217] In the embodiment of the present application, the application deployment device can be divided into functional modules or functional units according to the above method example. For example, each functional module or functional unit can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0218] The present application also provides an application deployment device, as shown in FIG14 , comprising: an interface providing module, a processing module, and an acquisition module.
[0219] The interface provides a module for providing a component orchestration interface. The component orchestration interface includes: a component selection area and a component orchestration area. The component selection area includes: a same-container component and multiple preset components. The same-container component is used to indicate that multiple preset components associated with itself are running in the same container. The component orchestration area is used to provide users with an operation area for orchestrating components. Multiple preset components include business components and / or logic components.
[0220] The processing module is configured to, in response to a user operation in the component orchestration area, create a first same-container component in the component orchestration area and determine a plurality of first preset components associated with the first same-container component, wherein the plurality of preset components include a plurality of first preset components. The processing module is configured to, in response to a received application deployment request, deploy a target application including the plurality of first preset components, wherein the plurality of first preset components run in a first container corresponding to the first same-container component.
[0221] In one possible design, the processing module is also used to generate a target application based on all components in the component orchestration area in response to a received application publishing request. The application publishing request is used to indicate the generation of the target application based on all components in the component orchestration area, and all components include the same container component and multiple first preset components.
[0222] In another possible design, the component orchestration interface further includes a component configuration area. An acquisition module is configured to obtain a target resource size from the component configuration area corresponding to the first container component. The target resource size is the resource size required by the first container corresponding to the first container component. A processing module is configured to allocate the target resource size to the first container.
[0223] In another possible design, the processing module is configured to decompress each first preset component to obtain a decompressed file corresponding to each first preset component. The processing module is configured to compress all decompressed files corresponding to the plurality of first preset components to obtain a fused component, and generate a target application based on the fused component.
[0224] In another possible design, the processing module is used to update the interfaces of the called first preset components to interfaces of the called fusion components.
[0225] In another possible design, the processing module is configured to generate a target application based on all components in the component arrangement area and the connection relationships between the components in all the components.
[0226] In another possible design, all components include: a plurality of first preset components; and the connection relationship between each component in all components includes: the connection relationship between the first preset components.
[0227] In another possible design method, all components also include: at least one second preset component, the second preset component is any component among multiple preset components, and the second preset component is outside the first container component; the connection relationship between each component in all components also includes: the connection relationship between the second preset component and the edge component, and the edge component is a component among multiple first preset components that has a connection relationship with the second preset component.
[0228] In another possible design, at least one second preset component includes at least one third preset component, and the edge component includes an edge input component, where the third preset component is a component that transmits parameters to the edge input component. A processing module is configured to obtain output parameters of each third preset component. The processing module is configured to aggregate the output parameters of each third preset component to obtain an input parameter set for the first container component. The processing module is configured to establish a mapping relationship between each parameter in the input parameter set and the input parameters of the edge input component based on the connection relationship between each third preset component and the edge input component.
[0229] In another possible design, at least one second preset component further includes at least one fourth preset component, and the edge component further includes an edge output component, which is a component that transmits parameters to the fourth preset component. A processing module is configured to obtain output parameters of each edge output component. The processing module is configured to aggregate the output parameters of each edge output component to obtain an output parameter set for the first container component. The processing module is configured to establish a mapping relationship between each parameter in the output parameter set and the input parameters of the fourth preset component based on the connection relationship between each fourth preset component and the edge output component.
[0230] In another possible design, when the first container is running, parameters are passed between the multiple first preset components through a target data structure, where the target data structure is a data structure used in memory.
[0231] The processing module, the acquisition module, and the interface providing module can all be implemented by software or hardware. For example, the implementation of the processing module will be described below using the processing module as an example. Similarly, the implementation of the acquisition module and the interface providing module can refer to the implementation of the processing module.
[0232] As an example of a software functional unit, a processing module may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the processing module may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.
[0233] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0234] As an example of a hardware functional unit, a processing module may include at least one computing device, such as a server. Alternatively, the processing module may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0235] The multiple computing devices included in the processing module can be distributed in the same region or in different regions. The multiple computing devices included in the processing module can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the processing module can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0236] It should be noted that, in other embodiments, the processing module can be used to execute any step in the application deployment method, the acquisition module can be used to execute any step in the application deployment method, and the interface providing module can be used to execute any step in the application deployment method. The steps that the processing module, the acquisition module, and the interface providing module are responsible for implementing can be specified as needed. The full functions of the application deployment device are realized by respectively implementing different steps in the application deployment method through the processing module, the acquisition module, and the interface providing module.
[0237] As an example of a software functional unit, a module, an application deployment device may include code running on a computing instance. The computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Furthermore, the above-mentioned computing device may be one or more. For example, the application deployment device may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same AZ or in different AZs, and each AZ includes one data center or multiple data centers with close geographical locations. Generally, a region may include multiple AZs.
[0238] Similarly, the multiple hosts / virtual machines / containers running the code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is located within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0239] A module is an example of a hardware functional unit. The application deployment device may include at least one computing device, such as a server. Alternatively, the application deployment device may be implemented using an ASIC or a PLD. The PLD may be implemented using a CPLD, FPGA, GAL, or any combination thereof.
[0240] The multiple computing devices included in the application deployment apparatus can be distributed in the same region or in different regions. The multiple computing devices included in the application deployment apparatus can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the application deployment apparatus can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0241] This application also provides a computing device 150. As shown in Figure 15, computing device 150 includes a bus 1502, a processor 1504, a memory 1506, and a communication interface 1508. Processor 1504, memory 1506, and communication interface 1508 communicate with each other via bus 1502. Computing device 150 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 150.
[0242] Bus 1502 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG15 shows a single line, but this does not imply a single bus or type of bus. Bus 1504 may include a path for transmitting information between various components of computing device 150 (e.g., memory 1506, processor 1504, and communication interface 1508).
[0243] The processor 1504 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0244] The memory 1506 may include volatile memory, such as random access memory (RAM). The processor 1504 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0245] The memory 1506 stores executable program code, and the processor 1504 executes the executable program code to respectively implement the functions of the aforementioned processing module, acquisition module, and interface providing module, thereby implementing the application deployment method. In other words, the memory 1506 stores instructions for executing the application deployment method.
[0246] The communication interface 1503 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 150 and other devices or a communication network.
[0247] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0248] As shown in Figure 16, the computing device cluster includes at least one computing device 150. The memory 1506 in one or more computing devices 150 in the computing device cluster may store the same instructions for executing the application deployment method.
[0249] In some possible implementations, the memory 1506 of one or more computing devices 150 in the computing device cluster may also store partial instructions for executing the application deployment method. In other words, the combination of one or more computing devices 150 can jointly execute the instructions for executing the application deployment method.
[0250] It should be noted that the memory 1506 in different computing devices 150 in the computing device cluster can store different instructions, each for executing a portion of the functions of the application deployment apparatus. In other words, the instructions stored in the memory 1506 in different computing devices 150 can implement the functions of one or more of the processing module, the acquisition module, and the interface providing module.
[0251] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network or a local area network, etc. FIG17 shows a possible implementation. As shown in FIG17 , two computing devices 150A and 150B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 1506 in the computing device 150A stores instructions for executing the functions of the processing module. At the same time, the memory 1506 in the computing device 150B stores instructions for executing the functions of the acquisition module and the interface providing module.
[0252] The connection method between the computing device clusters shown in Figure 17 can be considered to be that the application deployment method provided by this application requires a large amount of stored data and a large amount of computing resources, so it is considered to entrust the functions implemented by the acquisition module and the interface providing module to the computing device 150B for execution.
[0253] It should be understood that the functionality of the computing device 150A shown in FIG17 may also be performed by multiple computing devices 150. Similarly, the functionality of the computing device 150B may also be performed by multiple computing devices 150.
[0254] The present application also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similar to the connection method of the computing device cluster described in Figures 16 and 17. However, the memory 1506 of one or more computing devices 150 in this computing device cluster can store the same instructions for executing the application deployment method.
[0255] In some possible implementations, the memory 1506 of one or more computing devices 150 in the computing device cluster may also store partial instructions for executing the application deployment method. In other words, the combination of one or more computing devices 150 can jointly execute the instructions for executing the application deployment method.
[0256] Embodiments of the present application also provide a computer program product comprising instructions. The computer program product may be software or a program product comprising instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the application deployment method.
[0257] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to execute an application deployment method, or instructs a computing device to execute an application deployment method.
[0258] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for application deployment, characterized in that, The method includes: Providing a component orchestration interface, the component orchestration interface includes: a component selection area and a component orchestration area. The component selection area includes: co-container components and multiple preset components. The co-container components are used to indicate that the multiple preset components associated with themselves run in the same container. The component orchestration area is used to provide an operation area for users to orchestrate components. The multiple preset components include business components and / or logic components; In response to a user's operation in the component orchestration area, creating a first co-container component in the component orchestration area, and determining multiple first preset components associated with the first co-container component. The multiple preset components include the multiple first preset components; In response to a received application deployment request, deploying a target application including the multiple first preset components, where the multiple first preset components run in a first container corresponding to the first co-container component.
2. The method according to claim 1, characterized in that, Before receiving the application deployment request, the method further includes: In response to a received application release request, generating the target application according to all components in the component orchestration area. The all components include the first co-container component and the multiple first preset components.
3. The method according to claim 1 or 2, characterized in that, The component orchestration interface further includes: a component configuration area; the method further includes: Obtaining the size of a target resource amount from the component configuration area corresponding to the first co-container component. The target resource amount is the resource amount required for the first container corresponding to the first co-container component; Allocating the target resource amount to the first container.
4. The method according to any one of claims 1 to 3, characterized in that The generating the target application according to all components in the component orchestration area includes: Uncompressing each of the first preset components to obtain an uncompressed file corresponding to each of the first preset components; Compressing all the uncompressed files corresponding to the multiple first preset components to obtain a fused component; Generating the target application according to the fused component.
5. The method according to claim 4, wherein After obtaining the fused component, the method further includes: Updating the interface of each of the first preset components called to the interface of the fused component.
6. The method according to any one of claims 1-5, characterized in that, The generating the target application according to all components in the component orchestration area includes: Generating the target application according to all components in the component orchestration area and the connection relationships between the various components in the all components; where the all components include: the multiple first preset components, and the connection relationships between the various components in the all components include: the connection relationships between the first preset components.
7. The method according to claim 6, wherein The all components further include: at least one second preset component, the second preset component is any one of the multiple preset components; the connection relationship between the components in the all components further includes: the connection relationship between the second preset component and the edge component, the edge component is a component in the multiple first preset components that has a connection relationship with the second preset component; the at least one second preset component includes: at least one third preset component, the edge component includes: an edge input component, the third preset component is a component that transfers parameters to the edge input component; the generating the target application according to all components in the component arrangement area also includes: Get output parameters of each third preset component; Aggregate the output parameters of each of the third preset components to obtain an input parameter set of the first same-container component; According to the connection relationship between each of the third preset components and the edge input component, a mapping relationship between each parameter in the input parameter set and the input parameter of the edge input component is established.
8. The method according to claim 7, wherein The at least one second preset component further includes: at least one fourth preset component, the edge component further includes: an edge output component, the edge output component is a component that transmits parameters to the fourth preset component; the generating the target application according to all components in the component arrangement area also includes: Obtaining output parameters of each of the edge output components; Aggregating the output parameters of each of the edge output components to obtain the output parameter set of the first container component; According to the connection relationship between each of the fourth preset components and the edge output component, a mapping relationship between each parameter in the output parameter set and the input parameter of the fourth preset component is established.
9. The method according to claim 7 or 8, characterized in that, The target application after deployment further includes: a second container corresponding to each second preset component, and the second container is used to run the corresponding second preset component.
10. The method according to any one of claims 1-9, characterized in that, When the first container is running, parameters are transmitted between the plurality of the first preset components through a target data structure, and the target data structure is a data structure used in the memory.
11. An application deployment device, characterized in that, The device comprises: An interface providing module is used to provide a component arrangement interface, wherein the component arrangement interface includes: a component selection area and a component arrangement area, wherein the component selection area includes: a same-container component and a plurality of preset components, wherein the same-container component is used to indicate that the plurality of preset components associated with the same container are running in the same container, and the component arrangement area is used to provide a user with an operation area for arranging components, wherein the plurality of preset components include business components and / or logic components; A processing module, configured to create a first same-container component in the component arrangement area in response to an operation of a user in the component arrangement area, and determine a plurality of first preset components associated with the first same-container component, wherein the plurality of preset components include the plurality of first preset components; The processing module is further used to deploy a target application including the multiple first preset components in response to a received application deployment request, wherein the multiple first preset components run in a first container corresponding to the first container component.
12. The device according to claim 11, characterized in that The processing module is further configured to generate the target application in response to a received application publishing request according to all components in the component orchestration area, wherein all components include the first same-container component and the plurality of first preset components.
13. The device according to claim 11 or 12, characterized in that, The component arrangement interface further includes: a component configuration area; the device further includes: an acquisition module; The acquisition module is used to acquire the size of a target resource amount from the component configuration area corresponding to the first same-container component, wherein the target resource amount is the resource amount required by the first container corresponding to the first same-container component; The target amount of resources is allocated to the first container.
14. The device according to any one of claims 11 to 13, characterized in that The processing module is further used to decompress each of the first preset components to obtain a decompressed file corresponding to each of the first preset components; The processing module is further used to compress all decompressed files corresponding to the multiple first preset components to obtain a fused component; The processing module is further used to generate the target application according to the fusion component.
15. The device according to claim 14, characterized in that The processing module is further used to update the interface of each called first preset component to the interface of the fusion component.
16. The device according to any one of claims 11 to 15, characterized in that The processing module is also used to generate the target application based on all components in the component arrangement area and the connection relationship between each component in all the components; wherein all the components include: the multiple first preset components, and the connection relationship between each component in all the components includes: the connection relationship between the first preset components.
17. The device according to claim 16, wherein The said all components further include: at least one second preset component, the said second preset component is any one of the said multiple preset components; the connection relationship between the components in the said all components further includes: the connection relationship between the said second preset component and the edge component, the said edge component is the component in the said multiple first preset components that has a connection relationship with the said second preset component; the said at least one second preset component includes: at least one third preset component, the said edge component includes: an edge input component, the said third preset component is a component that transmits parameters to the said edge input component; The processing module is further used to obtain output parameters of each third preset component; The processing module is further used to aggregate the output parameters of each of the third preset components to obtain an input parameter set of the first same-container component; The processing module is further used to establish a mapping relationship between each parameter in the input parameter set and the input parameter of the edge input component according to the connection relationship between each of the third preset components and the edge input component.
18. The device according to claim 17, characterized in that, The at least one second preset component further includes: at least one fourth preset component, and the edge component further includes: an edge output component, the edge output component is a component for transmitting parameters to the fourth preset component; The processing module is further configured to obtain output parameters of each of the edge output components; The processing module is further configured to aggregate the output parameters of each of the edge output components to obtain an output parameter set of the first co-container component; The processing module is further configured to establish a mapping relationship between each parameter in the output parameter set and the input parameters of the fourth preset component according to the connection relationship between each of the fourth preset components and the edge output component.
19. The device according to claim 17 or 18, characterized in that, The deployed target application further includes: a second container corresponding to each of the second preset components, and the second container is configured to run the corresponding second preset component.
20. The device according to any one of claims 11-19, characterized in that, When the first container is running, parameters are passed between multiple first preset components through a target data structure, and the target data structure is a data structure used in memory.
21. A cluster of computing devices, characterized in that, Including at least one computing device, each computing device includes a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, and the computing device cluster executes the method according to any one of claims 1-10.
22. A computer program product comprising instructions, characterized in that, When the instructions are run by an electronic device, the electronic device executes the method according to any one of claims 1-10.
23. A computer-readable storage medium, characterized in that, Including computer program instructions, when the computer program instructions are run by a computing device cluster, the computing device cluster executes the method according to any one of claims 1-10.
Citation Information
Patent Citations
Application deployment method, device and equipment
CN120215914A
Application deployment method and device
CN109976771A
Service deployment method and device, electronic equipment and storage medium
CN113254152A
Container cluster deployment method and device and computer equipment
CN114217956A
Custom plug-in generation method and device
CN115951865A