Program service middleware updating method and device, storage medium and terminal
By acquiring middleware metric data and dynamic modification rules, and using middleware metric probes for dynamic adjustments, the problem of time-consuming, labor-intensive, and costly middleware updates is solved, achieving fast and efficient middleware updates and improved stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 杭州米络星科技(集团)有限公司
- Filing Date
- 2022-11-24
- Publication Date
- 2026-07-14
AI Technical Summary
Existing middleware update methods are time-consuming, labor-intensive, complex, and costly, and cannot achieve dynamic updates, affecting the stability of program services.
By acquiring middleware metric data and dynamic modification rules, it is determined whether middleware parameters need to be modified, and dynamic adjustments are made based on the dynamic modification rules. Real-time monitoring and updates are achieved using middleware metric probes.
It enables rapid and efficient dynamic updates of middleware, enhances the operational stability of program services, and reduces costs.
Smart Images

Figure CN115756546B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a method and apparatus for updating program service middleware, a storage medium, and a terminal. Background Technology
[0002] During the monitoring of program services, the monitored program services typically use various types of middleware to complete business functions, such as databases, local cache pools, message queues, and scheduled tasks.
[0003] Currently, there are two ways to update middleware: one is manual modification, which involves manually modifying the parameters of the middleware that needs to be updated and then restarting the program service to expand and update the middleware. However, this method affects the stability of the program service, requires more time and effort, is complex to operate, and the restart after each update is time-consuming. The other method is to update the middleware through a resource orchestration system. When the resources (CPU, memory) requested by the program service are sufficient, the resource orchestration system expands the middleware by expanding the service. This method cannot achieve dynamic real-time updates of the middleware and is costly.
[0004] Therefore, there is an urgent need for a fast, efficient method that can dynamically update middleware. Summary of the Invention
[0005] The technical problem to be solved by this invention is that existing middleware update methods are labor-intensive, complex to operate, costly, and unable to achieve dynamic updates.
[0006] To address the aforementioned technical problems, this invention provides a method for updating program service middleware, comprising:
[0007] Obtain the middleware identifier of the middleware that has been started in the current target program service, and obtain the corresponding indicator data of the middleware based on the middleware identifier;
[0008] The dynamic modification rule file of the target program service is obtained from the configuration center based on the configuration file address, and the dynamic modification rule of the corresponding middleware is obtained from the dynamic modification rule file based on each middleware identifier.
[0009] Based on the indicator data and dynamic modification rules of each middleware, it is determined whether the indicator parameters of the corresponding middleware need to be modified. If so, the indicator parameters of the corresponding middleware are modified according to the corresponding dynamic modification rules; otherwise, the indicator parameters of the corresponding middleware remain unchanged.
[0010] The program service middleware update method is implemented based on middleware indicator probes.
[0011] Preferably, when the middleware is a local cache pool, the indicator data of the local cache pool includes the type of the local cache pool and the parameter data of the local cache pool. The parameters of the local cache pool include at least one of the following: maximum number of caches, memory clearing policy, cache validity period, and whether to persist to disk.
[0012] Preferably, when the middleware is a network connection pool, the indicator data of the network connection pool includes the type of the network connection pool and the parameter data of the network connection pool. The parameters of the network connection pool include at least one of the maximum number of connections to a POSTGRESQL database and the maximum number of connections to an HTTP CLIENT.
[0013] Preferably, when the middleware is a thread pool, the thread pool's metric data includes the thread pool's type and the thread pool's parameter data. The thread pool's parameters include at least one of the following: the number of cores, the maximum number of threads, the queue type, the queue capacity, and the rejection policy.
[0014] Preferably, before the step of obtaining the middleware identifier of the middleware that has been started in the current target program service, and obtaining the corresponding indicator data of the middleware based on the middleware identifier, the method further includes:
[0015] Obtain startup-related parameters, including status instructions and configuration file addresses;
[0016] If the status instruction is to start the middleware indicator probe service, then determine whether the middleware indicator probe is started. If it is started, the middleware indicator probe maintains its current state; otherwise, the middleware indicator probe is started.
[0017] If the status instruction is to stop the middleware indicator probe service, then release the middleware indicator probe resources and stop the middleware indicator probe service.
[0018] If the status command is to upgrade the middleware indicator probe service, then release the middleware indicator probe resources, stop the middleware indicator probe service, and then restart the middleware indicator probe service.
[0019] Preferably, if it is determined that the indicator parameters of the middleware need to be modified, an alarm signal for the middleware should be sent to the monitoring platform; if it is determined that the indicator parameters of the middleware do not need to be modified, a normal signal for the middleware should be sent to the monitoring platform.
[0020] Preferably, the middleware indicator probe communicates with the monitoring platform based on a URL request.
[0021] To address the aforementioned technical problems, the present invention also provides a program service middleware update device, comprising an indicator data acquisition module, a dynamic modification rule acquisition module, and an update module;
[0022] The indicator data acquisition module is used to acquire the middleware identifier of the middleware that has been started in the current target program service, and to acquire the indicator data corresponding to the middleware based on the middleware identifier.
[0023] The dynamic modification rule acquisition module is used to obtain the dynamic modification rule file of the target program service from the configuration center based on the configuration file address, and to obtain the dynamic modification rule of the corresponding middleware from the dynamic modification rule file based on each middleware identifier;
[0024] The update module is used to determine whether the indicator parameters of the corresponding middleware need to be modified based on the indicator data and dynamic modification rules of the middleware. If so, the indicator parameters of the corresponding middleware are modified according to the corresponding dynamic modification rules; otherwise, the indicator parameters of the corresponding middleware remain unchanged.
[0025] The update method implemented by the program service middleware update device is based on middleware indicator probes.
[0026] To address the aforementioned technical problems, the present invention also provides a storage medium storing a computer program that, when executed by a processor, implements a program service middleware update method.
[0027] To address the aforementioned technical problems, the present invention also provides a terminal, comprising: a processor and a memory, wherein the memory and the processor are communicatively connected;
[0028] The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so that the terminal executes the program service middleware update method.
[0029] Compared with the prior art, one or more embodiments of the above solutions may have the following advantages or beneficial effects:
[0030] The middleware update method for program services provided in this invention directly obtains the indicator data of the middleware that has been started in the program service, and compares the indicator data with the corresponding dynamic modification rules to determine whether the corresponding middleware parameters can no longer meet the current program service requirements. If so, the middleware parameters are modified by referring to the dynamic modification rules to achieve dynamic adjustment of the functions of various middleware. This invention's dynamic adjustment of program service middleware not only enhances the stability of program service operation but is also more economical than existing methods of expanding services through resource orchestration systems.
[0031] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims, and drawings. Attached Figure Description
[0032] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0033] Figure 1 A flowchart illustrating the program service middleware update method according to Embodiment 1 of the present invention is shown;
[0034] Figure 2 A schematic diagram of the structure of the program service middleware update device according to Embodiment 2 of the present invention is shown;
[0035] Figure 3 A schematic diagram of the terminal structure of Embodiment 4 of the present invention is shown. Detailed Implementation
[0036] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples, so that the process of how the present invention uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly. It should be noted that, as long as there is no conflict, the various embodiments and features in the various embodiments of the present invention can be combined with each other, and the resulting technical solutions are all within the protection scope of the present invention.
[0037] Monitoring middleware services to determine their proper functioning or to obtain relevant metrics is typically achieved through middleware metric probes. A middleware metric probe is a program (e.g., Skywalking probe, Zabbix probe) used to acquire or modify metrics of third-party software used by the service; that is, it measures one or a set of dimensions of the middleware's operational status. Middleware metric probes are usually hosted within the service and start together with it; that is, there is a one-to-one relationship between the middleware metric probe and the service in the operating system, with each probe corresponding to a specific service. The following method is based on metric probes for real-time monitoring.
[0038] Example 1
[0039] To address the technical problems existing in the prior art, embodiments of the present invention provide a method for updating program service middleware.
[0040] Figure 1A flowchart illustrating the program service middleware update method according to Embodiment 1 of the present invention is shown; see reference. Figure 1 As shown, the method for updating the program service middleware in this embodiment of the invention includes the following steps.
[0041] Step S100: Obtain startup-related parameters.
[0042] Specifically, under normal circumstances, the monitoring platform periodically sends program service health status query requests to the keep-alive probes in the operating system. Based on these requests, the keep-alive probes obtain the startup-related parameters of the middleware indicator probes within the target program service and send them to the target program service's middleware indicator probes. The target program service can be any program service within the operating system to which the keep-alive probe belongs. Startup-related parameters include status instructions and configuration file addresses. If the status instruction in the startup-related parameters is to start the middleware indicator probe service, it is necessary to determine whether the middleware indicator probe is already running. If it is, the middleware indicator probe maintains its current state; otherwise, it starts. If the status instruction in the startup-related parameters is to stop the middleware indicator probe service, the middleware indicator probe releases its resources and stops the service. If the status instruction in the startup-related parameters is to upgrade the middleware indicator probe service, the middleware indicator probe needs to release its resources, stop the service, and then restart it to complete the upgrade.
[0043] Step S101: Obtain the middleware identifier of the middleware that has been started in the current target program service, and obtain the corresponding middleware's indicator data based on the middleware identifier.
[0044] Specifically, when a middleware metric probe is running, it can monitor and dynamically adjust the middleware within its associated program service. The program service to which the middleware metric probe belongs is set as the target program service. The middleware metric probe needs to determine which middleware in the current target program service is running and obtain the middleware identifiers of all running middleware in the current target program service. Then, based on the middleware identifiers of the running middleware, it starts the corresponding scheduled metric task for that middleware, so that the corresponding scheduled task obtains the metric data for that middleware. In other words, it achieves the acquisition of metric data for each running middleware based on its middleware identifier in the target program service. Middleware types can include local cache pools, network connection pools, thread pools, message queues, scheduled tasks, databases, and RPC calls, etc.; the data types of the acquired metrics also differ depending on the middleware type.
[0045] Step S102: Obtain the dynamic modification rule file of the target program service from the configuration center based on the configuration file address, and obtain the dynamic modification rule of the corresponding middleware from the dynamic modification rule file based on each middleware identifier.
[0046] Specifically, while obtaining the indicator data of each started middleware in the target program service, it is also necessary to download the dynamic modification rule file corresponding to the target program service from the configuration center based on the configuration file address in the startup-related parameters. This dynamic modification rule file stores the dynamic modification rules for all middleware in the target program service, and the middleware dynamic modification rules are used as the criteria for middleware status judgment and parameter modification. Then, based on the middleware identifier of each started middleware, the corresponding dynamic modification rule is obtained from the dynamic modification rule file, that is, to obtain the dynamic modification rule corresponding to each started middleware based on the middleware identifier of each started middleware.
[0047] Step S103: Based on the indicator data and dynamic modification rules of each middleware, determine whether the indicator parameters of the corresponding middleware need to be modified. If so, modify the indicator parameters of the corresponding middleware according to the corresponding dynamic modification rules; otherwise, keep the indicator parameters of the corresponding middleware unchanged.
[0048] Specifically, after obtaining the metric data and dynamic modification rules for all started middleware in the target program service, it is necessary to compare the metric data and corresponding dynamic modification rules for each started middleware to determine its state. For example, if a metric exceeds a threshold specified in the dynamic modification rules, the middleware is in an abnormal state; conversely, if none of the metric data exceeds the corresponding threshold, the middleware is in a normal state. The metric parameters can be modifiable parameters within the middleware, such as the parameters `minIdle` (minimum idle threads) and `maxActive` (maximum connections) when using the Druid database connection pool middleware.
[0049] If a middleware is in an abnormal state, it indicates that its metric parameters need to be adjusted to suit the current running status of the target program service; conversely, if a middleware is in a normal state, its metric parameters do not need adjustment. Furthermore, after determining the status of each started middleware, the determination result must be sent to the monitoring platform. Specifically, if it is determined that the corresponding middleware's metric parameters need modification, an alarm signal must be sent to the monitoring platform; if it is determined that the corresponding middleware's metric parameters do not need modification, a normal signal must be sent to the monitoring platform. Preferably, the middleware metric probe communicates with the monitoring platform based on URL requests.
[0050] When it is determined that a middleware metric parameter needs modification, the middleware parameter must be modified according to the corresponding dynamic modification rules to make it suitable for the current running status of the target program service. After modification, an alarm service must be invoked to send a parameter modification completion message to the terminal where the operating system is located. Conversely, if it is determined that a middleware metric parameter does not need modification, the current middleware parameter remains unchanged.
[0051] To provide a more detailed explanation of the middleware update method in this embodiment, the following description uses local cache pool, network connection pool, and thread pool as middleware to illustrate the middleware update process.
[0052] When the middleware is a local cache pool, it is confirmed that the metric probe is running and the local cache pool is also running. The identifier of the local cache pool is obtained, and its corresponding metric data is retrieved based on this identifier. The metric data includes the cache pool type (e.g., ehcache, memcache, caffine) and its parameters (e.g., cache data storage size). The corresponding dynamic modification rule is then searched in the dynamic modification rule file based on the local cache pool identifier. The metric data and the corresponding dynamic modification rule are compared to determine if the local cache pool parameters need modification. If the cache data storage size in the metric data exceeds the threshold in the corresponding dynamic modification rule, it indicates that the local cache pool is currently oversupplied and its storage capacity needs to be increased. Finally, the parameters of the local cache pool are modified according to the corresponding dynamic modification rule to achieve local cache pool expansion. It should be noted that the parameters of the local cache pool include at least one of the following: maximum number of caches, memory clearing policy, cache validity period, and whether to persist to disk. The dynamic modification rules can be designed based on the actual situation to modify the local cache pool parameters.
[0053] When the middleware is a network connection pool, it is confirmed that the metric probe is running and the current network connection pool is also running. The network connection pool identifier is obtained, and its corresponding metric data is retrieved based on this identifier. The network connection pool metric data includes the network connection pool type and its parameter data. Then, based on the network connection pool identifier, the corresponding dynamic modification rule is searched in the dynamic modification rule file. The network connection pool metric data and the corresponding dynamic modification rule are compared to determine if the network connection pool parameters need modification. If so, the network connection pool parameters are modified according to the corresponding dynamic modification rule to update the network connection pool. It should be noted that the network connection pool parameters include at least one of the maximum number of POSTGRESQL database connections and the maximum number of HTTPCLIENT connections. The dynamic modification rules can be designed based on actual conditions to modify the network connection pool parameters.
[0054] Similarly, when the middleware is a thread pool, it is determined that the metric probe is running and the current thread pool is also running. The thread pool identifier is obtained, and its corresponding metric data is retrieved based on this identifier. The thread pool metric data includes the thread pool type and its parameter data. Then, based on the thread pool identifier, the corresponding dynamic modification rule is searched in the dynamic modification rule file. The thread pool metric data and the corresponding dynamic modification rule are compared to determine if the thread pool parameters need modification. If so, the thread pool parameters must be modified according to the corresponding dynamic modification rule to update the thread pool. It should be noted that the thread pool parameters include at least one of the following: the number of cores, maximum number of threads, queue type, queue capacity, and rejection policy. The dynamic modification rules can be designed based on the actual situation to modify the thread pool parameters.
[0055] The middleware update method for program services provided in this invention directly obtains the indicator data of the middleware that has been started in the program service, and compares the indicator data with the corresponding dynamic modification rules to determine whether the corresponding middleware parameters can no longer meet the current program service requirements. If so, the middleware parameters are modified according to the dynamic modification rules, thereby realizing the function of dynamically adjusting various middleware. This invention's dynamic adjustment of program service middleware not only enhances the stability of program service operation but is also more economical than existing methods of expanding services through resource orchestration systems.
[0056] Example 2
[0057] To address the technical problems existing in the prior art, embodiments of the present invention provide a program service middleware update device.
[0058] Figure 2A schematic diagram of the structure of the program service middleware update device according to Embodiment 2 of the present invention is shown; Reference Figure 2 As shown, the program service middleware update device of this embodiment includes an indicator data acquisition module, a dynamic modification rule acquisition module, and an update module.
[0059] The indicator data acquisition module is used to obtain the middleware identifier of the middleware that has been started in the current target program service, and to obtain the indicator data of the corresponding middleware based on the middleware identifier.
[0060] The dynamic modification rule acquisition module is used to obtain the dynamic modification rule file of the target program service from the configuration center based on the configuration file address, and to obtain the dynamic modification rule of the corresponding middleware from the dynamic modification rule file based on each middleware identifier.
[0061] The update module is used for each middleware-based metric data and dynamic modification rule to determine whether the corresponding middleware metric parameters need to be modified. If so, the metric parameters of the corresponding middleware are modified according to the corresponding dynamic modification rule; otherwise, the metric parameters of the corresponding middleware remain unchanged.
[0062] The update method implemented by the program service middleware update device is based on middleware indicator probes.
[0063] The program service middleware update device provided in this embodiment of the invention directly obtains the indicator data of the middleware that has been started in the program service, and compares the indicator data with the corresponding dynamic modification rules to determine whether the corresponding middleware parameters can no longer meet the current program service requirements. If so, the middleware parameters are modified according to the dynamic modification rules, thereby realizing the function of dynamically adjusting various middleware. This invention's dynamic adjustment of program service middleware not only enhances the stability of program service operation, but is also more economical than existing methods of expanding services through resource orchestration systems.
[0064] Example 3
[0065] To address the aforementioned technical problems in the prior art, this embodiment of the invention also provides a storage medium storing a computer program that, when executed by a processor, can implement all the steps in the program service middleware update method of Embodiment 1.
[0066] The specific steps of the program service middleware update method and the beneficial effects obtained by applying the readable storage medium provided in this embodiment of the invention are the same as in Embodiment 1, and will not be repeated here.
[0067] It should be noted that storage media include various media that can store program code, such as ROM, RAM, magnetic disks, or optical disks.
[0068] Example 4
[0069] To address the aforementioned technical problems in the prior art, this invention also provides a terminal.
[0070] Figure 3 A schematic diagram of the terminal structure of Embodiment 4 of the present invention is shown, with reference to... Figure 3 In this embodiment, the terminal includes a processor and a memory connected to each other; the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so that when the terminal is executed, it can implement all the steps of the program service middleware update method of Embodiment 1.
[0071] The specific steps of the program service middleware update method and the beneficial effects obtained by the terminal provided by the application of the present invention are the same as those in Embodiment 1, and will not be repeated here.
[0072] It should be noted that the memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Similarly, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0073] While the embodiments disclosed in this invention are as described above, the content is merely for the purpose of facilitating understanding of the invention and is not intended to limit the invention. Any person skilled in the art to which this invention pertains may make any modifications and changes in form and detail of the implementation without departing from the spirit and scope disclosed herein; however, the scope of protection of this invention shall still be determined by the scope defined in the appended claims.
Claims
1. A method for updating middleware in a program service, comprising: Obtain the middleware identifier of the middleware that has been started in the current target program service, and obtain the corresponding indicator data of the middleware based on the middleware identifier; The dynamic modification rule file of the target program service is obtained from the configuration center based on the configuration file address, and the dynamic modification rule of the corresponding middleware is obtained from the dynamic modification rule file based on each middleware identifier. Based on the indicator data and dynamic modification rules of each middleware, it is determined whether the indicator parameters of the corresponding middleware need to be modified. If so, the indicator parameters of the corresponding middleware are modified according to the corresponding dynamic modification rules; otherwise, the indicator parameters of the corresponding middleware remain unchanged. The program service middleware update method is implemented based on middleware indicator probes. Before the steps of obtaining the middleware identifier of the middleware that has been started in the current target program service, and obtaining the corresponding indicator data of the middleware based on the middleware identifier, the method further includes: The system acquires startup-related parameters, including status instructions and configuration file addresses. The monitoring platform periodically sends program service health status query requests to the keep-alive probes in the operating system. Based on these requests, the keep-alive probes acquire startup-related parameters from the middleware indicator probes of the target program service and send them to the middleware indicator probes of the target program service. The target program service is any program service within the operating system to which the keep-alive probes belong. If the status instruction is to start the middleware indicator probe service, then determine whether the middleware indicator probe is started. If it is started, the middleware indicator probe maintains its current state; otherwise, the middleware indicator probe is started. If the status instruction is to stop the middleware indicator probe service, then release the middleware indicator probe resources and stop the middleware indicator probe service. If the status instruction is to upgrade the middleware indicator probe service, then release the middleware indicator probe resources, stop the middleware indicator probe service, and then restart the middleware indicator probe service.
2. The method according to claim 1, characterized in that, When the middleware is a local cache pool, the metric data of the local cache pool includes the type of the local cache pool and the parameter data of the local cache pool. The parameters of the local cache pool include at least one of the following: maximum number of caches, memory clearing policy, cache validity period, and whether to persist to disk.
3. The method according to claim 1, characterized in that, When the middleware is a network connection pool, the network connection pool's metric data includes the type of the network connection pool and the parameter data of the network connection pool. The parameters of the network connection pool include at least one of the maximum number of connections to a POSTGRESQL database and the maximum number of connections to an HTTP CLIENT.
4. The method according to claim 1, characterized in that, When the middleware is a thread pool, the thread pool's metrics data includes the thread pool's type and its parameter data. The thread pool's parameters include at least one of the following: the number of cores, the maximum number of threads, the queue type, the queue capacity, and the rejection policy.
5. The method according to claim 1, characterized in that, If it is determined that the indicator parameters of the middleware need to be modified, an alarm signal for the middleware should be sent to the monitoring platform. If it is determined that the indicator parameters of the middleware do not need to be modified, a normal signal for the middleware should be sent to the monitoring platform.
6. The method according to claim 5, characterized in that, The middleware indicator probe communicates with the monitoring platform based on URL requests.
7. A program service middleware update device, characterized in that, It includes a module for acquiring indicator data, a module for acquiring dynamic modification rules, and an update module; The indicator data acquisition module is used to acquire the middleware identifier of the middleware that has been started in the current target program service, and to acquire the indicator data corresponding to the middleware based on the middleware identifier. The dynamic modification rule acquisition module is used to obtain the dynamic modification rule file of the target program service from the configuration center based on the configuration file address, and to obtain the dynamic modification rule of the corresponding middleware from the dynamic modification rule file based on each middleware identifier; The update module is used to determine whether the indicator parameters of the corresponding middleware need to be modified based on the indicator data and dynamic modification rules of the middleware. If so, the indicator parameters of the corresponding middleware are modified according to the corresponding dynamic modification rules; otherwise, the indicator parameters of the corresponding middleware are kept unchanged. The update method implemented by the program service middleware update device is based on middleware indicator probes. Before the steps of obtaining the middleware identifier of the middleware that has been started in the current target program service, and obtaining the corresponding indicator data of the middleware based on the middleware identifier, the method further includes: The system acquires startup-related parameters, including status instructions and configuration file addresses. The monitoring platform periodically sends program service health status query requests to the keep-alive probes in the operating system. Based on these requests, the keep-alive probes acquire startup-related parameters from the middleware indicator probes of the target program service and send them to the middleware indicator probes of the target program service. The target program service can be any program service in the operating system to which the keep-alive probes belong. If the status instruction is to start the middleware indicator probe service, then determine whether the middleware indicator probe is started. If it is started, the middleware indicator probe maintains its current state; otherwise, the middleware indicator probe is started. If the status instruction is to stop the middleware indicator probe service, then release the middleware indicator probe resources and stop the middleware indicator probe service. If the status instruction is to upgrade the middleware indicator probe service, then release the middleware indicator probe resources, stop the middleware indicator probe service, and then restart the middleware indicator probe service.
8. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the program service middleware update method as described in any one of claims 1 to 6.
9. A terminal, characterized in that, include: A processor and a memory, wherein the memory and the processor are communicatively connected; The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to cause the terminal to perform the program service middleware update method as described in any one of claims 1 to 6.