Business execution method and apparatus, terminal device, and storage medium

CN115951954BActive Publication Date: 2026-10-20CHINA UNIONPAY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310094095.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-06
Publication Date
2026-10-20
Estimated Expiration
2043-02-06

AI Technical Summary

Technical Problem

软件开发工具包与其接入的应用程序即宿主程序在同一进程中运行,在宿主程序和软件开发工具包之间的一者出现异常时,会影响另一者的正常运行,导致业务执行失败,降低了终端设备执行业务的稳定性

Benefits of technology

[0008]本申请实施例提供一种业务执行方法、装置、终端设备及存储介质,终端设备获取自身各进程的运行状态信息,在终端设备中软件开发工具包的目标业务被触发的情况下,可根据包括进程与业务的对应关系的进程加载信息以及获取的运行状态信息,通过选取运行状态信息满足稳定运行条件的目标进程来选取稳定运行的进程,进程容器与业务组件之间没有绑定关系,相互独立,使得进程容器可加载任意的业务组件,从而可控制稳定运行的进程对应的进程容器加载目标业务对应的业务组件,以执行该目标业务,与业务和进程预先绑定的相关技术相比,本申请实施例中的业务执行方法、装置、终端设备及存储介质能够避免软件开发工具包的目标业务由执行宿主程度的业务稳定性差的进程执行,从而提高终端设备执行软件开发工具包的业务的稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115951954B_ABST
    Figure CN115951954B_ABST
Patent Text Reader

Abstract

The application discloses a service execution method and device, a terminal device and a storage medium, and belongs to the field of data processing. The method comprises the following steps: acquiring running state information of each process in a terminal device; in the case that a target service of a software development kit is triggered, determining a process whose running state information meets stable running conditions as a target process for executing the target service according to preset process loading information and the running state information, wherein the process loading information comprises a corresponding relationship between a process and a service; and controlling a process container associated with the target process to load a service component corresponding to the target service in a service component pool, and executing the target service. According to the embodiment of the application, the stability of the terminal device in executing the service of the software development kit can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing, and in particular relates to a business execution method, apparatus, terminal equipment and storage medium. Background Technology

[0002] With the continuous development of electronic information technology, users can perform various business operations through applications on terminal devices. Therefore, users' demands for application functionality are constantly increasing. To meet these demands, Software Development Kits (SDKs) can be integrated into the applications to implement more functions. Since the SSD and the integrated application (the host program) run in the same process, an error in either the host program or the SSD will affect the normal operation of the other, leading to business execution failures and reducing the stability of business operations on the terminal device. Summary of the Invention

[0003] This application provides a business execution method, apparatus, terminal device, and storage medium, which can improve the stability of the terminal device executing software development kits.

[0004] In a first aspect, embodiments of this application provide a service execution method applied to a terminal device. The terminal device has a host program and a software development kit (SDK). The SSD is connected to the host program. The method includes: obtaining the running status information of each process in the terminal device; when the target service of the SSD is triggered, determining the process whose running status information meets the stable running conditions as the target process for executing the target service based on preset process loading information and running status information, wherein the process loading information includes the correspondence between processes and services; and controlling the process container associated with the target process to load the service component corresponding to the target service from the service component pool and execute the target service.

[0005] Secondly, embodiments of this application provide a business execution device. The business execution device has a host program and a software development kit (SDK). The SSD is connected to the host program. The business execution device includes: an acquisition module, used to acquire the running status information of each process in the business execution device; a process determination module, used to determine the process whose running status information meets the stable running conditions as the target process for executing the target business when the target business of the SSD is triggered, based on preset process loading information and running status information, wherein the process loading information includes the correspondence between processes and businesses; and a control module, used to control the process container associated with the target process to load the business component corresponding to the target business from the business component pool and execute the target business.

[0006] Thirdly, embodiments of this application provide a terminal device, including: a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the business execution method of the first aspect.

[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the business execution method of the first aspect.

[0008] This application provides a business execution method, apparatus, terminal device, and storage medium. The terminal device obtains the running status information of its own processes. When the target business of the software development kit (SDK) in the terminal device is triggered, it can select a stable running process by selecting a target process whose running status information meets the stable running conditions, based on process loading information including the correspondence between processes and businesses and the obtained running status information. There is no binding relationship between the process container and the business component; they are independent of each other, allowing the process container to load any business component. This allows control over the process container corresponding to the stable running process to load the business component corresponding to the target business to execute the target business. Compared with related technologies that pre-bind businesses and processes, the business execution method, apparatus, terminal device, and storage medium in this application can prevent the target business of the SSD from being executed by a process with poor business stability at the execution host level, thereby improving the stability of the terminal device executing the business of the SSD. Attached Figure Description

[0009] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 A flowchart of a business execution method provided in an embodiment of this application;

[0011] Figure 2 A schematic diagram of the logical architecture of an example of a service execution method in a terminal device provided in an embodiment of this application;

[0012] Figure 3 A flowchart of a business execution method provided in another embodiment of this application;

[0013] Figure 4 A flowchart of a business execution method provided in yet another embodiment of this application;

[0014] Figure 5 This is a schematic diagram of the structure of a service execution device provided in an embodiment of this application;

[0015] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0016] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0017] With the continuous development of electronic information technology, users can perform various business operations through applications on terminal devices. Therefore, users' demands for application functionality are constantly increasing. To meet these demands, Software Development Kits (SDKs) can be integrated into the applications to implement more functions. Since the SSD and the integrated application (the host program) run in the same process, an error in either the host program or the SSD will affect the normal operation of the other, leading to business execution failures and reducing the stability of business operations on the terminal device.

[0018] This application provides a business execution method, apparatus, terminal device, and storage medium that can actively decouple the strong association between business and process container, realize the separation of business operation environment and business logic, and dynamically adjust which process executes the business of software development kit by monitoring the running status information of each process in the terminal device. This ensures that the business of software development kit is executed by a process with better stability, avoids mutual interference between the business of software development kit and the business of host program due to poor process stability, and thus improves the stability of business execution on the terminal device.

[0019] It should be noted that the acquisition, storage, use, and processing of information and data in this embodiment are all authorized by the user or relevant organization and comply with the relevant provisions of national laws and regulations. The business execution method, apparatus, terminal equipment, and storage medium provided in this application will be described below.

[0020] The first aspect of this application provides a service execution method that can be applied to a terminal device, that is, the service execution method can be executed by the terminal device. Figure 1 A flowchart of a business execution method provided in an embodiment of this application is shown below. Figure 1As shown, the service execution method may include steps S101 to S103.

[0021] In step S101, the running status information of each process in the terminal device is obtained.

[0022] Figure 2 A schematic diagram of the logical architecture of an example of a service execution method in a terminal device provided in this application embodiment, as shown below. Figure 2 As shown, the terminal device 20 has a software development kit 21, which may have one or more functions to enable the execution of one or more business operations. The terminal device may also have a host program 22, and the software development kit 21 can access the host program 22. The developer of the software development kit 21 and the developer of the host program 22 may be different or the same. In some examples, the software development kit 21 can access multiple different host programs 22 developed by different developers, implementing its own functions in each host program 22. In this embodiment, the types of host programs 22 and software development kits 21 are not limited. For example, the host program 22 may be an application developed by a bank, and the software development kit 21 may be a software development kit 21 that accesses the application developed by the bank.

[0023] Terminal device 20 contains multiple processes, including the main process 23 of the host program 22 and other processes besides the main process 23. Each of the other processes (excluding the main process 23) can be referred to as a child process 24. In some examples, one of the other processes besides the main process 23 can be referred to as a child process 24. The main process 23 and child processes 24 are independent of each other, as are the multiple child processes 24. The main process 23 can execute the business logic of the host program 22 and the business logic of the software development kit 21. Child processes 24 primarily execute the business logic of the software development kit 21. Processes are associated with process containers 25. Process containers 25 can isolate their corresponding processes from other processes, and each process runs within its corresponding process container 25. The association between processes and process containers 25 can be implemented through the encoding of configuration files in terminal device 20.

[0024] Each process in terminal device 20 may have a corresponding resource monitoring module 26 deployed, which collects the process's running status information. The process's running status information can characterize the process's running stability. In some examples, running stability may include resource usage and / or abnormal situations, both of which can affect the process's stability.

[0025] The terminal device 20 may be equipped with a service scheduling module 27, which can communicate with the resource monitoring module 26. The resource monitoring module 26 can upload the collected process running status information to the service scheduling module 27, and the service scheduling module 27 can perform subsequent steps based on the running status information.

[0026] The terminal device also includes a service component pool 28, which contains multiple service components, such as... Figure 2 The service components 281, 282, 283, 284, 285, and 286 are included. In this embodiment, the service components in the service component pool 28 are not associated with the process or the process container 25.

[0027] In some embodiments, the changed running status information of a process can be received when the process's running status information changes. For example, when the resource monitoring module 26 detects a change in the process's running status information, it uploads the changed running status information to the service scheduling module 27 so that the service scheduling module 27 can obtain the changed running status information. Obtaining the process's running status information when it changes can save some of the resources occupied by monitoring the process's running status information.

[0028] In step S102, when the target business of the software development kit is triggered, the process whose running status information meets the stable running conditions is determined as the target process for executing the target business according to the preset process loading information and running status information.

[0029] The target functionality of the software development kit (SDK) is triggered when a user uses its intended function. For example, a terminal device triggers the target functionality in response to user input to the corresponding functional space.

[0030] Process loading information includes the correspondence between processes and services. This process loading information is pre-defined; in this embodiment, it serves as a reference for selecting the target process, but is not used as the sole basis for selection. The primary focus can be on runtime status information, supplemented by process loading information, to determine a process whose runtime status meets the conditions for stable operation as the target process.

[0031] Stable operating conditions include the conditions used to determine the stability of a process. If a process's running status information meets the stable operating conditions, it indicates that the process is running stably and can reliably execute the target business. In some examples, operational stability may include resource usage and / or abnormal situations. Correspondingly, stable operating conditions may include conditions related to resource usage and / or abnormal situations used to determine process stability. The specific stable operating conditions can be set according to the scenario, requirements, experience, etc., and are not limited here. Resource status information is used to characterize the usage of running resources, and abnormal status information is used to characterize abnormal situations. The busier the process is, the worse its stability. The more abnormal situations occur and the more severe the abnormalities, the worse the process's stability. When the running status information includes resource status information, stable operating conditions include the condition that the resource usage, as represented by the resource status information, is within the stable resource range. If the resource usage, as represented by the resource status information, is within the stable resource range, it means that the process's stability meets the stability requirements. When the runtime status information includes abnormal status information, the stable operating conditions include the condition that the abnormal situations represented by the abnormal status information are within the abnormal stability range. If the abnormal situations represented by the abnormal status information are within the abnormal stability range, it indicates that the process's stability meets the stability requirements.

[0032] In some examples, when a process is executing tasks from the host program or a software development kit (SDK) other than the target task, its runtime status information does not meet the stable operating conditions. That is, if the process's runtime status information does not meet the stable operating conditions, the process is highly likely to be executing tasks from the host program or the SSD other than the target task. Stable operating conditions can be determined based on the process's runtime status information when executing tasks from the host program or the SSD other than the target task. By using the runtime status information and stable operating conditions, processes currently executing tasks from the host program or the SSD other than the target task can be excluded, thereby ensuring the stability of processes executing the target task.

[0033] In step S103, the process container associated with the target process loads the business component corresponding to the target business from the business component pool and executes the target business.

[0034] The target process is a process that can run stably while executing the target business logic. After determining the target process, the process container associated with the target process can be controlled to retrieve and load the corresponding business components from the business component pool to execute the target business logic. The form of the business components is not limited here; for example, business components may include web pages, views, etc.

[0035] In this embodiment, the terminal device obtains the running status information of its own processes. When the target service of the software development kit (SDK) in the terminal device is triggered, it can select a stable running process by selecting a target process whose running status information meets the stable running conditions, based on the process loading information including the correspondence between processes and services and the obtained running status information. There is no binding relationship between the process container and the service component, and they are independent of each other, so that the process container can load any service component. This allows the process container corresponding to the stable running process to load the service component corresponding to the target service to execute the target service. Compared with related technologies that pre-bind services and processes, the service execution method in this embodiment can avoid the target service of the SSD being executed by a process with poor service stability at the execution host level, thereby improving the stability of the terminal device executing the service of the SSD.

[0036] In this embodiment, since the process container and the business component are independent of each other, the process to be used can be dynamically selected based on the running status information, and the loading relationship between the process and the business component is more flexible. There is no binding relationship between the process container and the business component. Even when different host programs require different customized services, the flexible loading relationship between the process and the business component can improve the compatibility of the software development kit (SDK). Furthermore, the process executing the business of the SSD can be isolated from the main process executing the business of the host program. The business components corresponding to the business of the SSD and the business components corresponding to the business of the host program are loaded in different process containers. Neither the business components corresponding to the business of the SSD nor the business components corresponding to the business of the host program have the right to access the memory and privacy data of processes outside their own process, thus improving the security of the SSD and the host program.

[0037] In some embodiments, the relationship between processes and services pre-defined in the process loading information can be considered, and the target process can be selected in combination with stable operating conditions. Figure 3 A flowchart of a business execution method provided in another embodiment of this application. Figure 3 and Figure 1 The difference is that, Figure 1 Step S102 can be further refined as follows: Figure 3 Steps S1021 to S1023 in the process.

[0038] In step S1021, the first process corresponding to the target service is obtained from the process loading information.

[0039] The process loading information includes the correspondence between processes and services. The first process is the process corresponding to the target service in the process loading information. For example, the correspondence between processes and services in the process loading information may include: process 1 corresponds to service 1, process 2 corresponds to service 2, process 3 corresponds to service 3, and process 4 corresponds to service 4. If the target service is service 3, then the first process is process 3.

[0040] In step S1022, if the running status information of the first process meets the stable running conditions, the first process is determined as the target process.

[0041] If the running status information of the first process meets the stable running conditions, it means that the stability of the first process meets the stability requirements. By identifying the first process as the target process, the stability of the target process can be guaranteed, thereby ensuring the stability of the target process in executing the target business.

[0042] In step S1023, if the running status information of the first process does not meet the stable running conditions, a second process whose running status information meets the stable running conditions is selected as the target process.

[0043] The second process includes all processes in the terminal device other than the first process. If the running status information of the first process does not meet the stable operating conditions, it indicates that the stability of the first process does not meet the stability requirements, i.e., the stability of the first process is poor. A target process needs to be selected from other processes with better stability, and from the second process, a process whose running status information meets the stable operating conditions should be selected as the target process. In some examples, if there are more than two second processes whose running status information meets the stable operating conditions, the second process with the highest stability represented by its running status information can be selected as the target process.

[0044] In some examples, resource status information includes one or more of the following: memory utilization, CPU utilization, number of threads, and frames per second (FPS). Stable operation conditions include one or more of the following: memory utilization is less than or equal to a preset stable memory utilization; CPU utilization is less than or equal to a preset stable CPU utilization; the number of threads is less than or equal to a preset stable number of threads; and frames per second is greater than or equal to a preset stable number of frames per second. Memory utilization, CPU utilization, number of threads, and frames per second are stability thresholds for resource status information that meet stability requirements. These can be set according to the hardware and software support of the terminal device, the scenario, and the requirements, and are not limited here.

[0045] The business logic of the host program or the software development kit (SDK) is executed by a process. This process starts threads while executing business logic. The more business logic executed, the more threads are started, resulting in higher memory and CPU usage, and lower frame rates per second. If the resource usage of this process exceeds the upper limit of stable requirements, it will cause resource congestion, thus reducing process stability. If this process continues to execute new business logic, crashes or other anomalies are likely to occur, further reducing the stability of business execution on the terminal device. In this embodiment, by using resource status information and stable operating conditions, the use of processes with resource congestion to execute the SDD's business logic can be avoided, thereby improving the stability of business execution on the terminal device and enhancing the smoothness of the user interface (User Interface), thus improving the user experience.

[0046] In some examples, abnormal status information includes the crash rate and / or the number of crashes within a preset time period. Stable operation conditions include one or both of the following: the crash rate within the preset time period is less than or equal to the preset safe crash rate; the number of crashes within the preset time period is less than or equal to the preset safe crash count. The safe crash rate and safe crash count are stability thresholds for abnormal status information that meet stability requirements, and can be set according to the hardware and software support of the terminal device, the scenario, and requirements, and are not limited here.

[0047] If an anomaly occurs in a process that exceeds the upper limit of stability requirements, and this process is used to execute the target business, the likelihood of it experiencing another anomaly is very high, reducing the stability of business execution on the terminal device. In this embodiment, by using resource status information and stable operating conditions, the use of processes with a high risk of anomalies to execute the business of the software development kit can be avoided, thereby improving the stability of business execution on the terminal device.

[0048] The processes in the above embodiments may include child processes and the main process of the host program. The main process of the host program is mainly used to execute the business logic of the host program. In this embodiment, even when the main process is not executing the host program and the main program's running status information meets the stable running conditions, the main process can also execute the business logic of the software development kit (SDK). Specifically, the process container corresponding to the main process can be controlled to load the business components corresponding to the business logic of the SSD, thereby enabling the main process to execute the business logic of the SSD. The running status information is obtained in real time, and the specific process container loaded by the business components corresponding to the business logic can be adjusted in real time, which can significantly reduce the resource consumption of the main process, delay the recycling of the terminal device's operating system, and improve the user experience of the host program.

[0049] In some embodiments, by assigning a service identifier to a process container, the process container can be accurately loaded into the corresponding service component. Figure 4 A flowchart of a business execution method provided in another embodiment of this application. Figure 4 and Figure 1 The difference is that, Figure 1 Step S103 can be further refined as follows: Figure 4 Steps S1031 to S1033 in the process.

[0050] In step S1031, the process container associated with the target process is started.

[0051] In a terminal device, there is a relationship between processes and process containers. In some examples, the terminal device's configuration file may include the relationship between processes and process containers; for example, the relationship between processes and process containers can be written in the Manifest configuration file. However, it should be noted that there is no binding relationship between business components and process containers. Business components only perform logic and presentation processing, thereby separating the runtime environment from the business logic.

[0052] The process container associated with the target process can be started, so that the process container can subsequently load business components. In some examples, the software development kit can pre-prepare process containers for each process, completing the pre-loading of processes, so that the process container can be quickly started when it is necessary to use the process container to load business components.

[0053] In step S1032, the service identifier of the target service is issued to the process container associated with the target process.

[0054] Based on the target service, a service identifier can be obtained, which is used to identify the target service. The service identifier can be issued to the process container associated with the target process, enabling the process container to determine the corresponding service component.

[0055] In step S1033, the process container associated with the target process determines the business component in the business component pool whose business identifier matches the business identifier of the target business, loads it, and executes the target business.

[0056] If the business identifier of the target business is consistent with the business identifier of the business component, it means that the business component is the business component corresponding to the target business. By identifying the business component to be loaded in the business component pool through the business identifier, the business component corresponding to the target business can be located accurately and quickly, thus improving the efficiency of business component loading.

[0057] A second aspect of this application provides a business execution device, which has a host program and a software development kit (SDK), wherein the SSD is connected to the host program. Figure 5This is a schematic diagram of the structure of a service execution device provided in an embodiment of this application, as shown below. Figure 5 As shown, the service execution device 300 may include an acquisition module 301, a process determination module 302, and a control module 303.

[0058] The acquisition module 301 can be used to acquire the running status information of each process in the business execution device.

[0059] The process determination module 302 can be used to determine the process whose running status information meets the stable running conditions as the target process for executing the target business when the target business of the software development kit is triggered, based on the preset process loading information and running status information.

[0060] Process loading information includes the correspondence between processes and business functions.

[0061] The control module 303 can be used to control the process container associated with the target process to load the business component corresponding to the target business from the business component pool and execute the target business.

[0062] In this embodiment, the business execution device 300 obtains the running status information of its own processes. When the target business of the software development kit in the business execution device 300 is triggered, it can select a stable running process by selecting a target process whose running status information meets the stable running conditions, based on the process loading information including the correspondence between processes and businesses and the obtained running status information. There is no binding relationship between the process container and the business component, and they are independent of each other, so that the process container can load any business component. In this way, it can control the process container corresponding to the stable running process to load the business component corresponding to the target business to execute the target business. Compared with the related technologies of pre-binding business and process, the business execution method in this embodiment can avoid the target business of the software development kit being executed by a process with poor business stability at the execution host level, thereby improving the stability of the business execution device 300 in executing the business of the software development kit.

[0063] In this embodiment, since the process container and the business component are independent of each other, the process to be used can be dynamically selected based on the running status information, and the loading relationship between the process and the business component is more flexible. There is no binding relationship between the process container and the business component. Even when different host programs require different customized services, the flexible loading relationship between the process and the business component can improve the compatibility of the software development kit (SDK). Furthermore, the process executing the business of the SSD can be isolated from the main process executing the business of the host program. The business components corresponding to the business of the SSD and the business components corresponding to the business of the host program are loaded in different process containers. Neither the business components corresponding to the business of the SSD nor the business components corresponding to the business of the host program have the right to access the memory and privacy data of processes outside their own process, thus improving the security of the SSD and the host program.

[0064] In some embodiments, the process determination module 302 can be used to: obtain a first process corresponding to the target service from the process loading information; determine the first process as the target process if the running status information of the first process meets the stable running conditions; and select a second process whose running status information meets the stable running conditions as the target process if the running status information of the first process does not meet the stable running conditions. The second process includes other processes in the service execution device 300 besides the first process.

[0065] In some embodiments, the operating status information includes resource status information and / or abnormal status information. Resource status information characterizes the occupancy of operating resources, and abnormal status information characterizes any abnormal situations that occur. When the operating status information includes resource status information, stable operating conditions include the condition that the occupancy of operating resources, as represented by the resource status information, is within a stable resource range. When the operating status information includes abnormal status information, stable operating conditions include the condition that any abnormal situations, as represented by the abnormal status information, are within an abnormally stable range.

[0066] In some examples, resource status information includes one or more of the following: memory usage, CPU usage, number of threads started, and frames per second.

[0067] Stable operating conditions include one or more of the following:

[0068] The memory usage rate is less than or equal to the preset stable memory usage rate.

[0069] The CPU utilization rate is less than or equal to the preset stable CPU utilization rate;

[0070] The number of threads started is less than or equal to the preset stable number of threads started;

[0071] The number of frames transmitted per second is greater than or equal to the preset stable number of frames transmitted per second.

[0072] In some examples, the abnormal status information includes the crash rate and / or the number of crashes within a preset time period.

[0073] Stable operating conditions include one or both of the following:

[0074] The crash rate within the preset time period is lower than or equal to the preset safe crash rate;

[0075] The number of crashes within the preset time period is less than or equal to the preset safe number of crashes.

[0076] In some embodiments, the control module 303 may be used to: start the process container associated with the target process; issue a service identifier of the target service to the process container associated with the target process; and have the process container associated with the target process determine, load and execute the service component in the service component pool whose service identifier matches the service identifier of the target service based on the service identifier of the target service.

[0077] In some embodiments, the acquisition module 301 can be used to: receive the changed running status information of a process when the running status information of the process changes.

[0078] In some embodiments, the configuration file of the business execution device 300 includes the association between processes and process containers.

[0079] In some embodiments, a process includes a child process and the main process of the host program.

[0080] A third aspect of this application also provides a terminal device. Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Figure 6 As shown, the terminal device 400 includes a memory 401, a processor 402, and a computer program stored in the memory 401 and executable on the processor 402.

[0081] In some examples, the processor 402 described above may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that may be configured to implement the embodiments of this application.

[0082] Memory 401 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the service execution method according to embodiments of this application.

[0083] The processor 402 runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory 401, so as to implement the business execution method in the above embodiment.

[0084] In some examples, terminal device 400 may also include communication interface 403 and bus 404. For example, Figure 6 As shown, the memory 401, processor 402, and communication interface 403 are connected through bus 404 and complete communication with each other.

[0085] The communication interface 403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application. Input devices and / or output devices can also be connected through the communication interface 403.

[0086] Bus 404 includes hardware, software, or both, that couples the components of terminal device 400 together. For example, and not limitingly, bus 404 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 404 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.

[0087] A fourth aspect of this application also provides a computer-readable storage medium storing computer program instructions. When these computer program instructions are executed by a processor, they can implement the business execution methods described in the above embodiments and achieve the same technical effects. To avoid repetition, further details are omitted here. The aforementioned computer-readable storage medium may include non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, etc., and is not limited thereto.

[0088] This application embodiment can also provide a computer program product. When the instructions in the computer program product are executed by the processor of an electronic device, the electronic device performs the business execution method in the above embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0089] It should be clarified that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. For the device embodiments, terminal device embodiments, and computer-readable storage medium embodiments, the relevant parts can be referred to the description section of the method embodiments. This application is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application. Furthermore, for the sake of brevity, detailed descriptions of known methods and techniques are omitted here.

[0090] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0091] Those skilled in the art will understand that the above embodiments are exemplary and not restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Based on a study of the drawings, specification, and claims, those skilled in the art should be able to understand and implement other variations of the disclosed embodiments. In the claims, the term "comprising" does not exclude other means or steps; the quantifier "a" does not exclude a plurality; the terms "first" and "second" are used to identify names and not to indicate any particular order. No reference numerals in the claims should be construed as limiting the scope of protection. The functionality of multiple parts appearing in the claims can be implemented by a single hardware or software module. The appearance of certain technical features in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.

Claims

1. A business execution method, characterized in that, Applied to a terminal device, the terminal device having a host program and a software development kit (SDK), the SSD being connected to the host program, the method includes: Obtain the running status information of each process in the terminal device; When the target service of the software development kit is triggered, a first process corresponding to the target service is obtained from the preset process loading information. If the running status information of the first process meets the stable running conditions, the first process is determined as the target process. If the running status information of the first process does not meet the stable running conditions, a second process whose running status information meets the stable running conditions is selected as the target process. The second process includes other processes in the terminal device besides the first process. The process loading information includes the correspondence between processes and services. The running status information includes resource status information and abnormal status information. The resource status information is used to characterize the occupancy of running resources, and the abnormal status information is used to characterize the abnormal situation that has occurred. The running status information is the primary factor, and the process loading information is secondary factor. A process whose running status information meets the stable running conditions is determined as the target process. After determining the target process, the process container associated with the target process loads the business component corresponding to the target business from the business component pool and executes the target business. There is no binding relationship between the process container and the business component, and they are independent of each other. The stable operating conditions include the condition that the occupancy of the operating resources, as represented by the resource status information, is within the stable resource range, and the condition that the abnormal situation, as represented by the abnormal status information, is within the abnormal stable range.

2. The method according to claim 1, characterized in that, The resource status information includes one or more of the following: memory usage, CPU usage, number of threads started, and frames transmitted per second. The stable operating conditions include one or more of the following: The memory utilization rate is less than or equal to the preset stable memory utilization rate. The CPU utilization rate is less than or equal to the preset stable CPU utilization rate. The number of threads started is less than or equal to the preset stable number of threads started. The number of frames transmitted per second is greater than or equal to the preset stable number of frames transmitted per second.

3. The method according to claim 1, characterized in that, The abnormal status information includes the crash rate and / or the number of crashes within a preset time period; The stable operating conditions include one or both of the following: The crash rate within the preset time period is lower than or equal to the preset safe crash rate. The number of crashes within the preset time period is less than or equal to the preset safe number of crashes.

4. The method according to claim 1, characterized in that, The process container associated with the target process loads the business component corresponding to the target business from the business component pool and executes the target business, including: Start the process container associated with the target process; Issue the service identifier of the target service to the process container associated with the target process; The process container associated with the target process determines, loads, and executes the target service from the service component pool based on the service identifier of the target service.

5. The method according to claim 1, characterized in that, The step of obtaining the running status information of each process in the terminal device includes: When the running status information of a process changes, the changed running status information of the process is received.

6. The method according to claim 1, characterized in that, The configuration file of the terminal device includes the association between processes and process containers.

7. The method according to any one of claims 1 to 6, characterized in that, The process includes child processes and the main process of the host program.

8. A business execution device, characterized in that, The service execution device has a host program and a software development kit (SDK), the SDM is connected to the host program, and the service execution device includes: The acquisition module is used to acquire the running status information of each process in the business execution device; A process determination module is used to, when the target service of the software development kit is triggered, obtain a first process corresponding to the target service from preset process loading information; if the running status information of the first process meets the stable running conditions, determine the first process as the target process; if the running status information of the first process does not meet the stable running conditions, select a second process whose running status information meets the stable running conditions as the target process. The second process includes other processes in the terminal device besides the first process. The process loading information includes the correspondence between processes and services. The running status information includes resource status information and abnormal status information. The resource status information is used to characterize the occupancy of running resources, and the abnormal status information is used to characterize the abnormal situation that has occurred. The running status information is the primary factor, and the process loading information is secondary factor. A process whose running status information meets the stable running conditions is determined as the target process. The control module is used to, after determining the target process, control the process container associated with the target process to load the business component corresponding to the target business from the business component pool and execute the target business. The process container and the business component are independent of each other and have no binding relationship. The stable operating conditions include the condition that the occupancy of the operating resources, as represented by the resource status information, is within the stable resource range, and the condition that the abnormal situation, as represented by the abnormal status information, is within the abnormal stable range.

9. A terminal device, characterized in that, include: Processor and memory storing computer program instructions; When the processor executes the computer program instructions, it implements the business execution method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the business execution method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Management method and device for components in Android program

    CN104750528A

  • An in-process information collection method and device, and electronic equipment

    CN112988401A

  • Container deployment method and device of vehicle-mounted system, equipment and medium

    CN115658224A