Search

CN-121979655-A - Middleware resource allocation method, terminal equipment and storage medium

CN121979655ACN 121979655 ACN121979655 ACN 121979655ACN-121979655-A

Abstract

The application is applicable to the technical field of resource management, and provides a resource allocation method of middleware, terminal equipment and a storage medium, wherein the method comprises the following steps: the method has the advantages that the user intention is acquired, the matched target task is preloaded, the traditional passive mode of resource scheduling is started after task triggering is broken, and the core resource preparation time is reserved for task execution in advance. The current state of the target middleware is synchronously monitored in the preloading link, so that key information such as the load condition, the response capability and the like of the middleware can be mastered at the first time, and the waiting delay caused by unknown middleware state in the task execution process is avoided. Based on the calling strategy generated by the state information and the historical user behavior data, the optimal middleware resource allocation mode of the adaptive target task can be directly positioned, and redundant steps of repeated attempt and resource adjustment in the traditional scheme are omitted.

Inventors

  • SONG LIN
  • WU HANYONG
  • DING GUOYAO

Assignees

  • 海信视像科技股份有限公司

Dates

Publication Date
20260505
Application Date
20251209

Claims (10)

  1. 1. A method for allocating resources of middleware, comprising: acquiring user intention; Preloading a target task according to the user intention, and monitoring the current state of a target middleware in the preloading process to obtain state information of the target middleware, wherein the target task is a task matched with the user intention, and the target middleware is a middleware which needs to be called when the target task is executed; obtaining a calling strategy of the target middleware according to the state information of the target middleware and historical user behavior data, wherein the historical user behavior data comprises the resource allocation condition of the called middleware when the electronic equipment processes the historical task of the user; and calling the target middleware to execute the target task according to the calling strategy.
  2. 2. The method for allocating resources of middleware according to claim 1, wherein the method further comprises: Acquiring user indication information and a focus state of a user interface of the electronic equipment; determining a service scene to be executed by the electronic equipment and the priority of the service scene according to the focus state of the user interface; Determining the user intention according to the user indication information and the service scene; generating a resource scheduling label according to the user intention, the service scene and the priority of the service scene; Correspondingly, the obtaining the calling strategy of the target middleware according to the state information and the historical user behavior data of the target middleware comprises the following steps: and obtaining a calling strategy of the target middleware according to the state information of the target middleware, the historical user behavior data, the service scene and the priority of the service scene.
  3. 3. The method for allocating resources of middleware according to claim 2, wherein the user instruction information includes user voice information and a remote controller operation sequence generated by a remote controller of the electronic device based on an operation of a user; the determining the user intention according to the user indication information and the service scene comprises the following steps: carrying out semantic analysis on the voice information of the user to obtain semantic intention of the user; Performing keystroke flow analysis on the remote controller operation sequence to obtain the interaction intention of the user; the user intent is determined based on the semantic intent, the interaction intent, and the business scenario.
  4. 4. The method for allocating resources of the middleware according to claim 2, wherein the obtaining the calling policy of the target middleware according to the state information of the target middleware, the historical user behavior data, the service scenario and the priority of the service scenario comprises: And inputting the state information of the target middleware, the service scene and the priority of the service scene into a trained strategy planning model, regulating and controlling the target middleware through the trained strategy planning model to obtain a calling strategy of the target middleware, wherein the trained strategy planning model is obtained by training a strategy planning model to be trained through the historical user behavior data.
  5. 5. The method for allocating resources of middleware according to claim 4, wherein the method further comprises: acquiring resource occupation data when executing user tasks in a historical time period, wherein the user tasks comprise the target tasks; Constructing a resource competition dependency graph among a plurality of user tasks according to the resource occupation data, wherein the resource competition dependency graph characterizes the user tasks with resource competition and the resource information of competition among the user tasks with the resource competition; according to the resource competition dependency graph, reallocating resources to a plurality of user tasks by adopting a Nash equilibrium algorithm to obtain a resource reallocation strategy corresponding to each user task; comparing the resource reallocation strategy with the corresponding resource occupation data to determine the execution effect of the user task; And correcting parameters of the trained strategy planning model according to the execution effect of the user task.
  6. 6. The method for allocating resources of middleware according to claim 1, wherein the method further comprises: Acquiring behavior data of application calling middleware in the electronic equipment; Determining whether malicious behaviors exist in the behavior data, wherein the malicious behaviors comprise the behaviors that the calling frequency of the middleware is greater than a preset threshold value and/or the calling behaviors of the middleware which are not matched with the business scene processed by the application; And if the malicious behavior exists in the behavior data, generating a fusing mechanism of the malicious behavior, wherein the fusing mechanism comprises limiting the calling times of the application to the middleware corresponding to the malicious behavior.
  7. 7. The method for allocating resources of a middleware according to claim 1, wherein preloading a target task according to the user intention, monitoring a current state of a target middleware during the preloading, and obtaining state information of the target middleware comprises: searching whether the user intention exists in a database, wherein the mapping relation between the historical user intention and the calling strategy of the middleware is stored in the database; and if the historical user intention matched with the user intention does not exist in the database, preloading a target task according to the user intention, monitoring the current state of the target middleware in the preloading process to obtain the state information of the target middleware, and triggering and executing the step and the subsequent step of obtaining the calling strategy of the target middleware according to the state information of the target middleware and the historical user behavior data.
  8. 8. The method of resource allocation for middleware according to claim 7, wherein after finding whether the user intention is present in a database, the method further comprises: If the historical user intention matched with the user intention exists in the database, acquiring a target strategy, wherein the target strategy is a calling strategy of middleware corresponding to the user intention stored in the database; and calling middleware to execute the task corresponding to the user intention according to the target strategy.
  9. 9. Terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the resource allocation method of the middleware according to any of the claims 1 to 8 when executing the computer program.
  10. 10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the resource allocation method of the middleware according to any one of claims 1 to 8.

Description

Middleware resource allocation method, terminal equipment and storage medium Technical Field The present application belongs to the technical field of resource management, and in particular, relates to a method for allocating resources of a middleware, a terminal device, and a storage medium. Background The middleware is a type of software between the application system and the system software, uses basic services (functions) provided by the system software to connect various parts of the application system or different applications on the network, and can achieve the purposes of resource sharing and function sharing. For the android system, a user needs to rely on a system layer or middleware of an application layer to forward, schedule and process tasks (such as data requests, service processing, resource calling and the like) initiated by various application programs (APP), and the middleware is used as a key hub for connecting the application programs with underlying hardware and an operating system kernel and bears core functions such as task routing, protocol conversion, resource coordination and the like, so that the running efficiency and stability of the android system directly determine user experience and system reliability. In the process of processing user tasks and calling middleware, most traditional schemes adopt immobilized calling logic, namely, a fixed middleware calling strategy is preset for specific types of user tasks, when the target middleware is in a high-load or abnormal state, the target middleware is still forcedly called according to the preset logic, so that task execution is extremely easy to be blocked, overtime and even failure are caused, and user experience is seriously influenced. Disclosure of Invention The embodiment of the application provides a resource allocation method of middleware, terminal equipment and a storage medium, which can solve the problems of stuck task execution, overtime and even failure caused by the adoption of immobilized logic in the calling of the middleware. In a first aspect, an embodiment of the present application provides a method for allocating resources of a middleware, including: acquiring user intention; Preloading a target task according to the user intention, and monitoring the current state of a target middleware in the preloading process to obtain state information of the target middleware, wherein the target task is a task matched with the user intention, and the target middleware is a middleware which needs to be called when the target task is executed; obtaining a calling strategy of the target middleware according to the state information of the target middleware and historical user behavior data, wherein the historical user behavior data comprises the resource allocation condition of the called middleware when the electronic equipment processes the historical task of the user; and calling the target middleware to execute the target task according to the calling strategy. According to the method and the device, the user intention is preferentially acquired, the matched target task is preloaded, the traditional passive mode of resource scheduling is started after task triggering is broken, and the core resource preparation time is reserved for task execution in advance. The current state of the target middleware is synchronously monitored in the preloading link, so that key information such as the load condition, the response capability and the like of the middleware can be mastered at the first time, and the waiting delay caused by unknown middleware state in the task execution process is avoided. Meanwhile, based on the calling strategy generated by the state information and the historical user behavior data, the optimal middleware resource allocation mode of the adaptive target task can be directly positioned, and redundant steps of repeated attempts and resource adjustment in the traditional scheme are omitted. In a possible implementation manner of the first aspect, the method further includes: Acquiring user indication information and a focus state of a user interface of the electronic equipment; determining a service scene to be executed by the electronic equipment and the priority of the service scene according to the focus state of the user interface; Determining the user intention according to the user indication information and the service scene; generating a resource scheduling label according to the user intention, the service scene and the priority of the service scene; Correspondingly, the obtaining the calling strategy of the target middleware according to the state information and the historical user behavior data of the target middleware comprises the following steps: and obtaining a calling strategy of the target middleware according to the state information of the target middleware, the historical user behavior data, the service scene and the priority of the service scene. In a possible implementation manner o