Method and device for running agent application in cloud phone, equipment and medium
Patent Information
- Application Number
- CN202611089140.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-08-18
AI Technical Summary
然而,现有云手机平台通常仅提供标准化的云端移动端运行环境,主要适配普通应用软件的安装与常规使用场景,针对智能体应用这类需常驻后台运行、依赖特定系统能力的特殊应用,普遍缺乏专属的兼容适配与运行支撑能力
[0017]In this embodiment, a compatible base image corresponding to the intelligent agent application is constructed; wherein, the compatible base image includes the runtime environment of the intelligent agent application and the application components constituting the intelligent agent application; compatibility adaptation processing is performed on the application components in the compatible base image to obtain a dedicated image corresponding to the intelligent agent application, including: obtaining the system function interface information of the cloud phone and the interface call requirement information corresponding to the application components; wherein, the system function interface information includes resource occupation conflict information between various system function interfaces, and the interface call requirement information includes the call dependency relationship between various requirement function types; based on the call dependency relationship and the resource occupation conflict information, in The system function interface information determines the target system function interface corresponding to the interface call requirement information; based on the target system function interface, the call path of the application component in the compatible base image is adjusted, and the adjusted compatible base image is determined as the dedicated image corresponding to the intelligent agent application; an existing cloud phone instance is obtained, and the dedicated image is deployed to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance; the preset running configuration information of the intelligent agent application is injected into the cloud phone instance with the dedicated image deployed, so that the cloud phone instance with the dedicated image deployed can automatically run the intelligent agent application based on the preset running configuration information when it starts. The above method for running the intelligent agent application in a cloud phone can realize one-click deployment, stable operation, and large-scale operation and maintenance management of the intelligent agent application in the cloud phone environment.
Smart Images

Figure CN122593908A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic digital data processing technology, specifically relating to the operation method, device, equipment and medium of intelligent agent application in cloud mobile phone. Background Technology
[0002] In recent years, with the rapid iteration of artificial intelligence technology, intelligent agent applications with autonomous decision-making and task execution capabilities have become widely popular. Meanwhile, cloud phone technology, relying on virtualization technology, deploys the mobile operating system on cloud servers, allowing users to remotely access and use it from any terminal. It boasts significant advantages such as elastic resource scaling and centralized management of multiple instances. Based on this, deploying intelligent agent applications on cloud phone instances can fully utilize the batch creation and centralized management capabilities of cloud phone instances to achieve batch deployment and unified management of intelligent agent applications.
[0003] Intelligent agent applications often require continuous background operation to respond to various external events and complete automated business operations in real time. However, existing cloud phone platforms typically only provide standardized cloud-based mobile operating environments, mainly adapting to the installation of ordinary application software and general usage scenarios. For special applications like intelligent agent applications that need to run in the background and rely on specific system capabilities, they generally lack dedicated compatibility and operational support capabilities. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for running intelligent agent applications in cloud phones, with the aim of enabling one-click deployment, stable operation, and large-scale operation and maintenance management of intelligent agent applications in cloud phone environments.
[0005] In a first aspect, embodiments of this application provide a method for running an intelligent agent application in a cloud phone, the method comprising: Construct a compatible base image for the intelligent agent application; wherein, the compatible base image includes the runtime environment of the intelligent agent application and the application components that constitute the intelligent agent application; The application components in the compatible base image are subjected to compatibility adaptation processing to obtain a dedicated image corresponding to the intelligent agent application. This includes: obtaining system function interface information of the cloud phone and interface call requirement information corresponding to the application components; wherein the system function interface information includes resource occupation conflict information between various system function interfaces, and the interface call requirement information includes call dependencies between various required function types; based on the call dependencies and the resource occupation conflict information, determining the target system function interface corresponding to the interface call requirement information in the system function interface information; adjusting the call path of the application components in the compatible base image based on the target system function interface, and determining the adjusted compatible base image as the dedicated image corresponding to the intelligent agent application; Obtain the created cloud phone instance and deploy the dedicated image to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance; The preset runtime configuration information of the intelligent agent application is injected into the cloud phone instance on which the dedicated image is deployed, so that the cloud phone instance on which the dedicated image is deployed can automatically run the intelligent agent application based on the preset runtime configuration information when it starts up.
[0006] Furthermore, obtaining the system function interface information of the cloud phone includes: Obtain the resource types occupied by each system function interface of the cloud phone during runtime, as well as the resource occupancy weights corresponding to those resource types; Based on the resource types occupied by each system function interface during runtime and the resource occupancy weights corresponding to the resource types, a resource occupancy vector is generated for each system function interface. The resource usage conflict information between the system function interfaces is determined based on the resource usage vector corresponding to each system function interface.
[0007] Furthermore, determining the resource occupancy conflict information between the system functional interfaces based on the resource occupancy vectors corresponding to each system functional interface includes: Calculate the vector distance between the resource occupancy vectors corresponding to each of the system function interfaces; The reciprocal of the vector distance between the resource occupancy vectors corresponding to each of the system function interfaces is determined as the resource occupancy conflict information between the system function interfaces.
[0008] Furthermore, determining the target system function interface corresponding to the interface call request information in the system function interface information based on the call dependency relationship and the resource usage conflict information includes: Based on the invocation dependencies, a set of candidate system function interfaces is determined from the system function interface information; Based on the resource occupation conflict information among the system function interfaces in the candidate system function interface set, determine the comprehensive resource occupation conflict information of the candidate system function interface set; Each system function interface in the candidate system function interface set that meets the preset selection conditions for the comprehensive resource occupation conflict information is determined as the target system function interface corresponding to the interface call requirement information.
[0009] Furthermore, the application components include communication components and intelligent agent components; Accordingly, the process of performing compatibility adaptation on the application components in the compatible base image to obtain a dedicated image corresponding to the agent application includes: The communication component is adapted to the communication method, and the intelligent agent component is adapted to the system dependency. The communication component and the intelligent agent component are subjected to runtime permission adaptation processing.
[0010] Secondly, embodiments of this application provide a device for operating an intelligent agent application in a cloud phone, the device comprising: The base image building module is used to build a compatible base image corresponding to the agent application; wherein, the compatible base image includes the runtime environment of the agent application and the application components that constitute the agent application; An application component adaptation module is used to perform compatibility adaptation processing on the application components in the compatible base image to obtain a dedicated image corresponding to the intelligent agent application. The application component adaptation module is specifically used for: obtaining system function interface information of the cloud phone and interface call requirement information corresponding to the application component; wherein, the system function interface information includes resource occupation conflict information between various system function interfaces, and the interface call requirement information includes call dependency relationships between various requirement function types; determining the target system function interface corresponding to the interface call requirement information in the system function interface information based on the call dependency relationships and the resource occupation conflict information; adjusting the call path of the application component in the compatible base image based on the target system function interface, and determining the adjusted compatible base image as the dedicated image corresponding to the intelligent agent application; A dedicated image deployment module is used to obtain the created cloud phone instance and deploy the dedicated image to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance; An automatic running module is configured to inject preset running configuration information of the intelligent agent application into the cloud phone instance on which the dedicated image is deployed, so that the cloud phone instance on which the dedicated image is deployed can automatically run the intelligent agent application based on the preset running configuration information when it starts up.
[0011] Furthermore, the application component adaptation module is specifically used for: Obtain the resource types occupied by each system function interface of the cloud phone during runtime, as well as the resource occupancy weights corresponding to those resource types; Based on the resource types occupied by each system function interface during runtime and the resource occupancy weights corresponding to the resource types, a resource occupancy vector is generated for each system function interface. The resource usage conflict information between the system function interfaces is determined based on the resource usage vector corresponding to each system function interface.
[0012] Furthermore, the application component adaptation module is specifically used for: Calculate the vector distance between the resource occupancy vectors corresponding to each of the system function interfaces; The reciprocal of the vector distance between the resource occupancy vectors corresponding to each of the system function interfaces is determined as the resource occupancy conflict information between the system function interfaces.
[0013] Furthermore, the application component adaptation module is specifically used for: Based on the invocation dependencies, a set of candidate system function interfaces is determined from the system function interface information; Based on the resource occupation conflict information among the system function interfaces in the candidate system function interface set, determine the comprehensive resource occupation conflict information of the candidate system function interface set; Each system function interface in the candidate system function interface set that meets the preset selection conditions for the comprehensive resource occupation conflict information is determined as the target system function interface corresponding to the interface call requirement information.
[0014] Furthermore, the application components include communication components and intelligent agent components; Accordingly, the application component adaptation module is specifically used for: The communication component is adapted to the communication method, and the intelligent agent component is adapted to the system dependency. The communication component and the intelligent agent component are subjected to runtime permission adaptation processing.
[0015] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the method described in the first aspect.
[0016] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the method described in the first aspect.
[0017] In this embodiment, a compatible base image corresponding to the intelligent agent application is constructed; wherein, the compatible base image includes the runtime environment of the intelligent agent application and the application components constituting the intelligent agent application; compatibility adaptation processing is performed on the application components in the compatible base image to obtain a dedicated image corresponding to the intelligent agent application, including: obtaining the system function interface information of the cloud phone and the interface call requirement information corresponding to the application components; wherein, the system function interface information includes resource occupation conflict information between various system function interfaces, and the interface call requirement information includes the call dependency relationship between various requirement function types; based on the call dependency relationship and the resource occupation conflict information, in The system function interface information determines the target system function interface corresponding to the interface call requirement information; based on the target system function interface, the call path of the application component in the compatible base image is adjusted, and the adjusted compatible base image is determined as the dedicated image corresponding to the intelligent agent application; an existing cloud phone instance is obtained, and the dedicated image is deployed to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance; the preset running configuration information of the intelligent agent application is injected into the cloud phone instance with the dedicated image deployed, so that the cloud phone instance with the dedicated image deployed can automatically run the intelligent agent application based on the preset running configuration information when it starts. The above method for running the intelligent agent application in a cloud phone can realize one-click deployment, stable operation, and large-scale operation and maintenance management of the intelligent agent application in the cloud phone environment. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a method for running an intelligent agent application in a cloud phone, as provided in an embodiment of this application. Figure 2 This is a flowchart illustrating another method for running an intelligent agent application in a cloud phone, as provided in an embodiment of this application. Figure 3 This is a schematic diagram of the structure of an operating device for an intelligent agent application in a cloud phone, provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0020] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0021] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0022] The following description, in conjunction with the accompanying drawings, details the operation method, apparatus, device, and medium of the intelligent agent application provided in this application in a cloud phone through specific embodiments and application scenarios.
[0023] First, this application applies to scenarios where intelligent agent applications need to run on cloud phone instances, such as scenarios where intelligent agent applications assist users in cross-platform content publishing and multi-account management within a cloud phone. Based on the above use cases, it is understood that the implementing entity of this application can be a cloud phone management platform.
[0024] Figure 1 This is a flowchart illustrating a method for operating an intelligent agent application in a cloud phone, as provided in an embodiment of this application. Figure 1As shown, the specific steps include the following: S101, Construct a compatible base image corresponding to the intelligent agent application; wherein, the compatible base image includes the runtime environment of the intelligent agent application and the application components constituting the intelligent agent application.
[0025] Among these, intelligent agent applications can be automated systems built on protocol integration and artificial intelligence technologies, capable of simulating human operation to complete cross-system task execution, data interaction, and decision support, such as OpenClaw. Specifically, OpenClaw is an industrial-grade AI intelligent agent gateway system with continuous cloud operation capabilities, supporting unified access and message routing across multiple messaging platforms, and providing a dynamic loading and invocation mechanism for community-contributed skill modules.
[0026] Among them, the compatible base image can be a standardized image template containing the complete runtime environment of the agent application. The compatible base image can include the runtime environment of the agent application and the application components that make up the agent application.
[0027] Specifically, the runtime environment of an intelligent agent application can be an operating system, language runtime, and a collection of various underlying dependency libraries and communication tools adapted to the cloud phone container architecture; the application components that constitute an intelligent agent application can be program modules that implement the core functions of the intelligent agent application.
[0028] In one embodiment, the way to build a compatible base image for an agent application is to use containerization technology to package the agent application's dependency libraries, common tools, and configuration files into a standard image, which is the compatible base image for the agent application.
[0029] As an example, if the agent application is OpenClaw, the process of building a compatible base image for OpenClaw may include: pre-installing and unzipping apt-lists-ubuntu.tar.gz and ubuntu-rootfs.tar.gz based on an image compatible with the runtime environment of the cloud phone instance (e.g., an ARM64-bit Android container image) to build the Ubuntu system root file system; pre-installing the nodejs.tar.xz runtime environment, WebSocket communication library, and Linux-compatible toolchain to provide the system dependencies and network communication capabilities required for OpenClaw to run; creating a fixed directory structure for configuration, logs, memory storage, and plugin loading, and setting corresponding access permissions and SELinux adaptation rules to ensure read / write isolation and secure operation of application components in the cloud phone environment; and creating standardized control scripts for start, stop, restart, health, and logs for lifecycle management and runtime status monitoring of the agent application.
[0030] S102, perform compatibility adaptation processing on the application components in the compatible base image to obtain a dedicated image corresponding to the intelligent agent application, including: obtaining the system function interface information of the cloud phone and the interface call requirement information corresponding to the application components; wherein, the system function interface information includes resource occupation conflict information between various system function interfaces, and the interface call requirement information includes call dependency relationships between various requirement function types; based on the call dependency relationships and the resource occupation conflict information, determine the target system function interface corresponding to the interface call requirement information in the system function interface information; adjust the call path of the application components in the compatible base image based on the target system function interface, and determine the adjusted compatible base image as the dedicated image corresponding to the intelligent agent application.
[0031] Among them, the dedicated image corresponding to the intelligent agent application can be a customized image that can be directly deployed to a cloud phone instance after compatibility adaptation processing of the application components in the compatible base image.
[0032] Among them, the system function interface information can be a collection of system function interfaces provided by the cloud phone operating system, including resource usage conflict information between various system function interfaces.
[0033] Among them, the system function interface can be the system function call interface actually provided by the cloud phone operating system; the resource occupation conflict information between system function interfaces can be the competition or mutual exclusion relationship that exists at the level of computing resources, memory resources, network resources or hardware resources when system function interfaces are called at the same time.
[0034] In one embodiment, the system function interface information of a cloud phone can be obtained by using the system interface documentation or interface query service provided by the cloud phone management platform to obtain the system function interface information supported by the cloud phone operating system. The cloud phone management platform performs interface call stress tests on the target cloud phone system version and extracts the resource usage characteristics of each system function interface under different concurrent call combinations, which is the resource usage conflict information.
[0035] Among them, the interface call requirement information corresponding to the application component can be a set of functional types that the application component of the intelligent agent application needs to call during the operation, including the call dependency relationship between each required functional type.
[0036] Among them, the required function type can be the function type or function name declared by the application component of the intelligent agent application that needs to be called; the calling dependency relationship between the required function types can be the sequential dependency or nested calling relationship between the required function types in terms of calling sequence.
[0037] In one embodiment, the method for obtaining the interface call requirement information corresponding to the application component can be to perform static scanning analysis on the binary files or configuration files of the application component in the compatible base image, and extract the external system function call dependencies declared therein as the interface call requirement information.
[0038] Among them, the target system function interface corresponding to the interface call requirement information can be a system function interface actually provided by the cloud mobile phone operating system that matches the interface call requirement information of the application component of the intelligent agent application.
[0039] In one embodiment, the method of determining the target system function interface corresponding to the interface call requirement information in the system function interface information based on the call dependency relationship and resource occupation conflict information can be achieved by grouping the requirement function types according to the call dependency relationship, dividing the requirement function types with call dependencies into the same function group, determining the corresponding candidate system function interfaces for the requirement function types in each function group according to the system function interface information, and then filtering each candidate system function interface according to the resource occupation conflict information, and determining the candidate system function interface with no resource occupation conflict as the target system function interface.
[0040] In one embodiment, determining the target system function interface corresponding to the interface call request information from the system function interface information based on the call dependency relationship and the resource occupation conflict information includes: determining a candidate system function interface set from the system function interface information based on the call dependency relationship; determining comprehensive resource occupation conflict information of the candidate system function interface set based on the resource occupation conflict information among the system function interfaces in the candidate system function interface set; and determining each system function interface in the candidate system function interface set whose comprehensive resource occupation conflict information satisfies a preset selection condition as the target system function interface corresponding to the interface call request information.
[0041] The candidate system function interface set can be a set of system function interfaces matched for each required function type in the same function group after grouping the required function types according to the calling dependency relationship.
[0042] In one embodiment, the method of determining the candidate system function interface set in the system function interface information based on the call dependency relationship can be as follows: group the required function types according to the call dependency relationship, divide the required function types with call dependency relationships into the same function group, match the corresponding system function interface for each required function type in any function group, and form a candidate system function interface set for each required function type. If there are multiple matching methods in the same function group, multiple candidate system function interface sets are obtained.
[0043] Specifically, the resource conflict information between system function interfaces can be a quantitative index of conflict obtained by comprehensively evaluating the degree of resource conflict between system function interfaces. Correspondingly, the comprehensive resource conflict information can be a quantitative index of conflict obtained by comprehensively evaluating the degree of resource conflict between each system function interface in the candidate system function interface set.
[0044] In one embodiment, the method for determining the comprehensive resource occupation conflict information of the candidate system function interface set based on the resource occupation conflict information between each system function interface in the candidate system function interface set can be to perform a weighted summation of the resource occupation conflict information between each system function interface in the candidate system function interface set as the comprehensive resource occupation conflict information of the candidate system function interface set.
[0045] Among them, if the comprehensive resource occupation conflict information of the candidate system function interface set meets the preset selection conditions, the system function interface in the candidate system function interface set with the lowest comprehensive resource occupation conflict information can be determined as the target system function interface corresponding to the interface call requirement information.
[0046] The advantage of this approach is that by comprehensively evaluating the resource conflict between candidate system function interfaces using a set of candidate system function interfaces as a unit, the system function interface combination with the least resource conflict can be selected from multiple candidate solutions. This further reduces the risk of interface resource competition when intelligent agent applications run in a cloud phone environment and improves the global optimality of the interface matching solution.
[0047] The call path can be the call chain through which the application component sends a call request when calling the system function interface.
[0048] In one embodiment, adjusting the call path of application components in a compatible base image based on the target system function interface can be achieved by obtaining the call entry address of the target system function interface, replacing the original function call address declared by the application component with the call entry address, and adapting the data format of the call parameters to the parameter structure required by the target system function interface.
[0049] The adjusted compatible base image is the running image of the agent application after the system function interface call path has been adapted, which is the dedicated image corresponding to the agent application.
[0050] In one embodiment, the application component includes a communication component and an agent component; correspondingly, the process of performing compatibility adaptation processing on the application component in the compatible base image to obtain a dedicated image corresponding to the agent application includes: performing communication mode adaptation processing on the communication component and system dependency adaptation processing on the agent component; and performing runtime permission adaptation processing on the communication component and the agent component.
[0051] Among them, the communication component can be a communication module for the intelligent agent application to interact with an external messaging platform; the intelligent agent component can be the core execution module of the intelligent agent application, used to realize task planning, tool invocation and autonomous decision-making.
[0052] In one embodiment, the method for adapting the communication method of the communication component can be to use the adapter pattern to uniformly encapsulate and convert the communication protocols of different messaging platforms, standardize the message formats of different platforms into an internally unified and processable format, and configure corresponding authentication and access control mechanisms.
[0053] As an example, if the intelligent agent application is OpenClaw, the process of adapting its gateway module (communication component) to the communication method may include: adapting the communication protocol stack of the gateway module, binding the service to the local loopback address, using WebSocket long connection as the communication channel to realize bidirectional message flow with the user message platform; and configuring cloud phone intranet port mapping and NAT traversal rules to ensure that the gateway module can send and receive external messages normally in the cloud phone network environment.
[0054] In one embodiment, the method for adapting system dependencies for intelligent agent components can be to pre-configure the system dependency libraries, Python environment, and model inference framework required for the intelligent agent to run in a compatible base image, and to make compatibility adjustments for the Android system version of the cloud phone.
[0055] As an example, if the agent application is OpenClaw, the process of adapting the agent module (agent component) to system dependencies may include: trimming the agent module's dependencies, removing system dependencies bound to the desktop operating system, and replacing them with file operation interfaces, process management interfaces, and network request interfaces compatible with Android containers, so as to ensure that the agent module is fully functional and available in the Android system environment of the cloud phone.
[0056] In one embodiment, the method for adapting the running permissions of the communication component and the intelligent agent component can be to pre-configure the security context required by the cloud phone virtualization isolation sandbox, pre-set independent running permissions for the intelligent agent application (communication component and intelligent agent component), and pre-set ADB permission configuration and SELinux adaptation rules in the image.
[0057] As an example, if the agent application is OpenClaw, the process of adapting the agent application's runtime permissions can include: pre-setting automatic request configurations for floating window display permissions, background running permissions, file read / write permissions, and network access permissions in the compatible base image, so that OpenClaw can automatically obtain the above permissions when the cloud phone instance starts; at the same time, pre-setting the disabling configurations for system battery optimization strategies and process cleanup strategies, so as to avoid OpenClaw being restricted by cloud phone system resources or process reclamation during background operation.
[0058] The advantage of this approach is that by systematically adapting and compatibility-enhancing the application components in the compatible base image, it ensures the stable operation of intelligent agent applications in the cloud phone environment, avoiding operational failures caused by incompatible communication protocols, missing system dependencies, or insufficient permissions, thereby improving the success rate and reliability of intelligent agent application deployment in the cloud.
[0059] S103, obtain the created cloud phone instance, and deploy the dedicated image to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance.
[0060] A cloud phone instance can be a virtual phone instance running on a cloud server, providing a complete mobile operating system environment and corresponding computing, storage, and network resources. Correspondingly, a created cloud phone instance can be a cloud phone instance pre-created through a cloud phone management platform.
[0061] In one embodiment, the method to obtain a created cloud phone instance can be to call the instance query interface of the cloud phone management platform to obtain an instance list and select an available instance from it.
[0062] In one embodiment, the dedicated image can be deployed to a cloud phone instance by having the cloud phone management platform issue the dedicated image to the created cloud phone instance (either single-instance deployment to a single cloud phone instance or batch deployment to multiple cloud phone instances). After receiving the dedicated image issuance instruction, the cloud phone instance completes image loading and system replacement so that the intelligent agent application can be deployed in the cloud phone instance.
[0063] S104, Inject the preset running configuration information of the intelligent agent application into the cloud phone instance on which the dedicated image is deployed, so that the cloud phone instance on which the dedicated image is deployed can automatically run the intelligent agent application based on the preset running configuration information when it starts up.
[0064] The preset running configuration information can be a set of dynamic parameter configurations required for the intelligent agent application to run in the cloud phone instance, which may include running parameters such as model key, IM channel token, concurrency, memory limit and heartbeat interval.
[0065] In one embodiment, the method of injecting the preset runtime configuration information of the intelligent agent application into a cloud phone instance with a dedicated image can be achieved by using the configuration injection interface or console provided by the cloud phone management platform to distribute the preset runtime configuration information in the form of a configuration file or environment variable and write it to the specified storage path of the cloud phone instance with the dedicated image.
[0066] In one embodiment, the cloud phone instance with a dedicated image can automatically run the intelligent agent application based on the preset running configuration information at startup. This can be achieved by automatically performing pre-startup operations such as environment checks, dependency verification, and port listening during the startup process of the cloud phone instance with the dedicated image. After confirming that the environment is ready, the preset running configuration information under the specified storage path is automatically read and written into the configuration file corresponding to the intelligent agent application. Then, the service process of the intelligent agent application is started according to the configuration file to achieve automatic operation.
[0067] In one embodiment, after a cloud phone instance with a dedicated image is started, the application components of the intelligent agent application exchange heartbeat messages every 15 seconds. If no response message is received from the other party three times in a row, the cloud phone instance determines that the corresponding process is running abnormally and automatically restarts the process. When the cloud phone instance with a dedicated image detects that the CPU utilization or memory utilization exceeds the preset threshold, it automatically reduces the number of concurrent tasks, clears the local cache, and then performs a graceful restart operation on the process. If the cloud phone instance with a dedicated image detects that the network link has been interrupted and then restored, the instance automatically reconnects the communication components and loads the saved task context to continue the unfinished tasks. The cloud phone instance with a dedicated image collects the standard output stream and error output stream of the intelligent agent application in real time, stores the log files in a rolling manner according to two rules: log duration or log file size, and pushes the local logs to the remote service for centralized collection.
[0068] In one embodiment, if a cloud phone instance with a dedicated image captures fault types such as process startup failure, port conflict, abnormal configuration parameters, or missing runtime dependencies, it outputs standardized fault error codes and automatically executes retry logic. When a cloud phone instance with a dedicated image receives a status query request from the cloud phone management platform, it reports its own running status, hardware resource usage data, gateway connection count, and current business task progress to the cloud phone management platform. When a cloud phone instance with a dedicated image receives a control command from the cloud phone management platform, it sequentially executes batch configuration updates, remote process restarts, business data backups, and business data recovery operations to achieve centralized management of multiple cloud phone instances.
[0069] In this embodiment, a compatible base image corresponding to the intelligent agent application is constructed; wherein, the compatible base image includes the runtime environment of the intelligent agent application and the application components constituting the intelligent agent application; compatibility adaptation processing is performed on the application components in the compatible base image to obtain a dedicated image corresponding to the intelligent agent application, including: obtaining the system function interface information of the cloud phone and the interface call requirement information corresponding to the application components; wherein, the system function interface information includes resource occupation conflict information between various system function interfaces, and the interface call requirement information includes the call dependency relationship between various requirement function types; based on the call dependency relationship and the resource occupation conflict information, in The system function interface information determines the target system function interface corresponding to the interface call requirement information; based on the target system function interface, the call path of the application component in the compatible base image is adjusted, and the adjusted compatible base image is determined as the dedicated image corresponding to the intelligent agent application; an existing cloud phone instance is obtained, and the dedicated image is deployed to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance; the preset running configuration information of the intelligent agent application is injected into the cloud phone instance with the dedicated image deployed, so that the cloud phone instance with the dedicated image deployed can automatically run the intelligent agent application based on the preset running configuration information when it starts. The above method for running the intelligent agent application in a cloud phone can realize one-click deployment, stable operation, and large-scale operation and maintenance management of the intelligent agent application in the cloud phone environment.
[0070] Figure 2 This is a flowchart illustrating another method for operating a smart agent application in a cloud phone, as provided in an embodiment of this application. Figure 2 As shown, the specific steps include the following: S201, Construct a compatible base image corresponding to the intelligent agent application; wherein, the compatible base image includes the runtime environment of the intelligent agent application and the application components constituting the intelligent agent application.
[0071] S202, perform compatibility adaptation processing on the application components in the compatible base image to obtain a dedicated image corresponding to the intelligent agent application, including: obtaining the resource types occupied by each system function interface of the cloud phone during runtime and the resource occupation weights corresponding to the resource types; generating resource occupation vectors corresponding to each system function interface based on the resource types occupied by each system function interface during runtime and the resource occupation weights corresponding to the resource types; determining resource occupation conflict information between each system function interface based on the resource occupation vectors corresponding to each system function interface; obtaining interface call requirement information corresponding to the application component; wherein, the interface call requirement information includes the call dependency relationship between each requirement function type; determining the target system function interface corresponding to the interface call requirement information based on the call dependency relationship and the resource occupation conflict information; adjusting the call path of the application components in the compatible base image based on the target system function interface, and determining the adjusted compatible base image as the dedicated image corresponding to the intelligent agent application.
[0072] The resource type can be a dimension type such as computing resources, memory resources, network bandwidth resources, storage resources or hardware device resources occupied by the system function interface during runtime; the resource occupancy weight corresponding to the resource type can be a weight coefficient pre-assigned to each resource type when evaluating the overall resource occupancy of the system function interface.
[0073] In one embodiment, the method for obtaining the resource types occupied by each system function interface during runtime and the corresponding resource occupancy weights in the system function interface information can be achieved by obtaining the resource types occupied by each system function interface during runtime through the system interface resource description information provided by the cloud phone management platform, and allocating corresponding resource occupancy weights to each resource type according to the hardware resource configuration or business scenario priority of the cloud phone instance.
[0074] The resource occupancy vector corresponding to the system function interface can be a vector constructed by using each resource type as the vector dimension and the resource occupancy weight corresponding to each resource type as the vector element value, which is used to characterize the comprehensive resource occupancy characteristics of the system function interface.
[0075] In one embodiment, the method of generating resource occupancy vectors for each system function interface based on the resource types occupied during runtime and the resource occupancy weights corresponding to the resource types can be achieved by constructing an initial resource occupancy vector based on a preset resource type order. For each system function interface, according to the preset resource type order, it is determined whether the system function interface occupies resources on each resource type. If it does, the resource occupancy weight corresponding to that resource type is used as the vector element value; otherwise, the value is set to 0 in that dimension, thus obtaining the final resource occupancy vector.
[0076] In one embodiment, the method of determining the resource occupation conflict information between system functional interfaces based on the resource occupation vectors corresponding to each system functional interface can be to calculate the vector similarity between the resource occupation vectors corresponding to any two system functional interfaces, and use this as the resource occupation conflict information between the two system functional interfaces.
[0077] In one embodiment, determining the resource occupation conflict information between the system functional interfaces based on the resource occupation vectors corresponding to each system functional interface includes: calculating the vector distance between the resource occupation vectors corresponding to each system functional interface; and determining the reciprocal of the vector distance between the resource occupation vectors corresponding to each system functional interface as the resource occupation conflict information between the system functional interfaces.
[0078] The vector distance between resource occupancy vectors can be a metric obtained by calculating the spatial distance between the resource occupancy vectors corresponding to the two system function interfaces, and is used to characterize the similarity of the two system function interfaces in terms of resource occupancy characteristics.
[0079] In one embodiment, the method for calculating the vector distance between the resource occupancy vectors corresponding to each system function interface can be to calculate the Euclidean distance value of the resource occupancy vectors corresponding to any two system function interfaces as the corresponding vector distance.
[0080] Understandably, the smaller the vector distance between the resource occupancy vectors corresponding to system function interfaces, the more similar the two system function interfaces are in terms of resource occupancy characteristics, and the greater the possibility of resource contention during runtime. At the same time, the smaller the vector distance between the resource occupancy vectors corresponding to system function interfaces, the larger the reciprocal of the corresponding vector distance. Therefore, the reciprocal of the vector distance between the resource occupancy vectors corresponding to each system function interface can be determined as the resource occupancy conflict information between each system function interface.
[0081] The advantage of this approach is that by quantifying resource usage conflict information into the reciprocal of vector distance and mapping the degree of conflict into a comparable value, the interface selection can be quantitatively filtered based on the conflict value when selecting target system function interfaces, thereby improving the accuracy and operability of interface selection.
[0082] S203, obtain the created cloud phone instance, and deploy the dedicated image to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance.
[0083] S204, Inject the preset running configuration information of the intelligent agent application into the cloud phone instance on which the dedicated image is deployed, so that the cloud phone instance on which the dedicated image is deployed can automatically run the intelligent agent application based on the preset running configuration information when it starts up.
[0084] The advantage of this approach is that by vectorizing the resource usage characteristics of system function interfaces, resource usage conflicts between system function interfaces can be quantitatively evaluated using vector operations. Compared to relying on manual experience or static rule tables for conflict judgment, the vectorization method can adapt to more diverse combinations of resource types and resource configuration differences among different cloud phone instances, thus improving the accuracy and adaptability of resource usage conflict judgment.
[0085] Figure 3 This is a schematic diagram of the structure of a smart agent application running in a cloud phone, as provided in an embodiment of this application. Figure 3 As shown, the device includes: The base image building module 310 is used to build a compatible base image corresponding to the intelligent agent application; wherein, the compatible base image includes the runtime environment of the intelligent agent application and the application components constituting the intelligent agent application; The application component adaptation module 320 is used to perform compatibility adaptation processing on the application components in the compatible base image to obtain a dedicated image corresponding to the intelligent agent application. The application component adaptation module 320 is specifically used for: obtaining system function interface information of the cloud phone and interface call requirement information corresponding to the application component; wherein, the system function interface information includes resource occupation conflict information between various system function interfaces, and the interface call requirement information includes call dependency relationships between various requirement function types; determining the target system function interface corresponding to the interface call requirement information in the system function interface information based on the call dependency relationships and the resource occupation conflict information; adjusting the call path of the application component in the compatible base image based on the target system function interface, and determining the adjusted compatible base image as the dedicated image corresponding to the intelligent agent application; The dedicated image deployment module 330 is used to obtain the created cloud phone instance and deploy the dedicated image to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance; The automatic running module 340 is configured to inject the preset running configuration information of the intelligent agent application into the cloud phone instance on which the dedicated image is deployed, so that the cloud phone instance on which the dedicated image is deployed can automatically run the intelligent agent application based on the preset running configuration information when it starts up.
[0086] Furthermore, the application component adaptation module 320 is specifically used for: Obtain the resource types occupied by each system function interface of the cloud phone during runtime, as well as the resource occupancy weights corresponding to those resource types; Based on the resource types occupied by each system function interface during runtime and the resource occupancy weights corresponding to the resource types, a resource occupancy vector is generated for each system function interface. The resource usage conflict information between the system function interfaces is determined based on the resource usage vector corresponding to each system function interface.
[0087] Furthermore, the application component adaptation module 320 is specifically used for: Calculate the vector distance between the resource occupancy vectors corresponding to each of the system function interfaces; The reciprocal of the vector distance between the resource occupancy vectors corresponding to each of the system function interfaces is determined as the resource occupancy conflict information between the system function interfaces.
[0088] Furthermore, the application component adaptation module 320 is specifically used for: Based on the invocation dependencies, a set of candidate system function interfaces is determined from the system function interface information; Based on the resource occupation conflict information among the system function interfaces in the candidate system function interface set, determine the comprehensive resource occupation conflict information of the candidate system function interface set; Each system function interface in the candidate system function interface set that meets the preset selection conditions for the comprehensive resource occupation conflict information is determined as the target system function interface corresponding to the interface call requirement information.
[0089] Furthermore, the application components include communication components and intelligent agent components; Accordingly, the application component adaptation module 320 is specifically used for: The communication component is adapted to the communication method, and the intelligent agent component is adapted to the system dependency. The communication component and the intelligent agent component are subjected to runtime permission adaptation processing.
[0090] In this embodiment, a base image construction module is used to construct a compatible base image corresponding to the intelligent agent application; wherein, the compatible base image includes the runtime environment of the intelligent agent application and the application components constituting the intelligent agent application; an application component adaptation module is used to perform compatibility adaptation processing on the application components in the compatible base image to obtain a dedicated image corresponding to the intelligent agent application; the application component adaptation module is specifically used to: obtain the system function interface information of the cloud phone and the interface call requirement information corresponding to the application components; wherein, the system function interface information includes resource occupation conflict information between various system function interfaces, and the interface call requirement information includes the call dependency relationship between various requirement function types; based on the call dependency relationship and the resource occupation conflict... The system identifies the target system function interface corresponding to the interface call request information from the system function interface information; adjusts the call path of the application components in the compatible base image based on the target system function interface, and determines the adjusted compatible base image as the dedicated image corresponding to the intelligent agent application; a dedicated image deployment module is used to obtain the created cloud phone instance and deploy the dedicated image to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance; an automatic running configuration module is used to inject the preset running configuration information of the intelligent agent application into the cloud phone instance with the dedicated image deployed, so that the cloud phone instance with the dedicated image deployed can automatically run the intelligent agent application based on the preset running configuration information when it starts. The above-mentioned intelligent agent application running device in the cloud phone can realize one-click deployment, stable operation and large-scale operation and maintenance management of intelligent agent applications in the cloud phone environment.
[0091] The operating device for the intelligent agent application in the cloud phone in this application embodiment can be a device, or a component, integrated circuit, or chip in the terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not impose specific limitations.
[0092] The device on which the intelligent agent application runs in the cloud phone in this embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit the specific operating system.
[0093] The intelligent agent application running device in the cloud phone provided in this application embodiment can realize the various processes implemented in the above embodiments. To avoid repetition, it will not be described again here.
[0094] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 4 As shown, this application embodiment also provides an electronic device 400, including a processor 401, a memory 402, and a program or instructions stored in the memory 402 and executable on the processor 401. When the program or instructions are executed by the processor 401, they implement the various processes of the above-described intelligent agent application in the cloud phone running embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0095] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0096] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described intelligent agent application running embodiment in a cloud phone and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0097] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0098] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0100] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0101] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.
Claims
1. A method for operating an intelligent agent application in a cloud phone, characterized in that, The method includes: Construct a compatible base image for the intelligent agent application; wherein, the compatible base image includes the runtime environment of the intelligent agent application and the application components that constitute the intelligent agent application; The application components in the compatible base image are subjected to compatibility adaptation processing to obtain a dedicated image corresponding to the intelligent agent application. This includes: obtaining system function interface information of the cloud phone and interface call requirement information corresponding to the application components; wherein the system function interface information includes resource occupation conflict information between various system function interfaces, and the interface call requirement information includes call dependencies between various required function types; based on the call dependencies and the resource occupation conflict information, determining the target system function interface corresponding to the interface call requirement information in the system function interface information; adjusting the call path of the application components in the compatible base image based on the target system function interface, and determining the adjusted compatible base image as the dedicated image corresponding to the intelligent agent application; Obtain the created cloud phone instance and deploy the dedicated image to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance; The preset runtime configuration information of the intelligent agent application is injected into the cloud phone instance on which the dedicated image is deployed, so that the cloud phone instance on which the dedicated image is deployed can automatically run the intelligent agent application based on the preset runtime configuration information when it starts up.
2. The method for operating an intelligent agent application in a cloud phone according to claim 1, characterized in that, The process of obtaining the system function interface information of the cloud phone includes: Obtain the resource types occupied by each system function interface of the cloud phone during runtime, as well as the resource occupancy weights corresponding to those resource types; Based on the resource types occupied by each system function interface during runtime and the resource occupancy weights corresponding to the resource types, a resource occupancy vector is generated for each system function interface. The resource usage conflict information between the system function interfaces is determined based on the resource usage vector corresponding to each system function interface.
3. The method for operating an intelligent agent application in a cloud phone according to claim 2, characterized in that, The step of determining the resource usage conflict information between the system function interfaces based on the resource usage vector corresponding to each system function interface includes: Calculate the vector distance between the resource occupancy vectors corresponding to each of the system function interfaces; The reciprocal of the vector distance between the resource occupancy vectors corresponding to each of the system function interfaces is determined as the resource occupancy conflict information between the system function interfaces.
4. The method for operating an intelligent agent application in a cloud phone according to claim 1, characterized in that, The step of determining the target system function interface corresponding to the interface call request information in the system function interface information based on the call dependency relationship and the resource usage conflict information includes: Based on the invocation dependencies, a set of candidate system function interfaces is determined from the system function interface information; Based on the resource conflict information between the system function interfaces in the candidate system function interface set, determine the comprehensive resource conflict information of the candidate system function interface set; Each system function interface in the candidate system function interface set that meets the preset selection conditions for the comprehensive resource occupation conflict information is determined as the target system function interface corresponding to the interface call requirement information.
5. The method for operating an intelligent agent application in a cloud phone according to claim 1, characterized in that, The application components include communication components and intelligent agent components; Accordingly, the process of performing compatibility adaptation on the application components in the compatible base image to obtain a dedicated image corresponding to the agent application includes: The communication component is adapted to the communication method, and the intelligent agent component is adapted to the system dependency. The communication component and the intelligent agent component are subjected to runtime permission adaptation processing.
6. A device for operating an intelligent agent in a cloud phone, characterized in that, The device includes: The base image building module is used to build a compatible base image corresponding to the agent application; wherein, the compatible base image includes the runtime environment of the agent application and the application components that constitute the agent application; An application component adaptation module is used to perform compatibility adaptation processing on the application components in the compatible base image to obtain a dedicated image corresponding to the intelligent agent application. The application component adaptation module is specifically used for: obtaining system function interface information of the cloud phone and interface call requirement information corresponding to the application component; wherein, the system function interface information includes resource occupation conflict information between various system function interfaces, and the interface call requirement information includes call dependency relationships between various requirement function types; determining the target system function interface corresponding to the interface call requirement information in the system function interface information based on the call dependency relationships and the resource occupation conflict information; adjusting the call path of the application component in the compatible base image based on the target system function interface, and determining the adjusted compatible base image as the dedicated image corresponding to the intelligent agent application; A dedicated image deployment module is used to obtain the created cloud phone instance and deploy the dedicated image to the cloud phone instance to deploy the intelligent agent application in the cloud phone instance; An automatic running module is configured to inject preset running configuration information of the intelligent agent application into the cloud phone instance on which the dedicated image is deployed, so that the cloud phone instance on which the dedicated image is deployed can automatically run the intelligent agent application based on the preset running configuration information when it starts up.
7. The operating device for the intelligent agent application in a cloud phone according to claim 6, characterized in that, The application component adaptation module is specifically used for: Obtain the resource types occupied by each system function interface of the cloud phone during runtime, as well as the resource occupancy weights corresponding to those resource types; Based on the resource types occupied by each system function interface during runtime and the resource occupancy weights corresponding to the resource types, a resource occupancy vector is generated for each system function interface. The resource usage conflict information between the system function interfaces is determined based on the resource usage vector corresponding to each system function interface.
8. The operating device for the intelligent agent application in a cloud phone according to claim 7, characterized in that, The application component adaptation module is specifically used for: Calculate the vector distance between the resource occupancy vectors corresponding to each of the system function interfaces; The reciprocal of the vector distance between the resource occupancy vectors corresponding to each of the system function interfaces is determined as the resource occupancy conflict information between the system function interfaces.
9. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein when the program or instructions are executed by the processor, they implement the method for running an intelligent agent application in a cloud phone as described in any one of claims 1-5.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions, which, when executed by a processor, implement the method for running an intelligent agent application in a cloud phone as described in any one of claims 1-5.