Resource allocation method and device, equipment, medium and program product
By obtaining and analyzing service execution information, predicting service execution needs, and allocating resources according to requirements, the problem that traditional resource allocation methods cannot accurately reflect service conditions is solved, and the accuracy of resource allocation and business execution efficiency are improved.
Patent Information
- Application Number
- CN202411903372.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-04
AI Technical Summary
Traditional resource allocation methods cannot accurately reflect the actual implementation of services and future changes in demand, and ignore the dependencies between services, resulting in unreasonable resource allocation and affecting business execution efficiency and effectiveness.
By acquiring the execution information of the first service among each target object, the service execution requirements of each target object in the next time period are predicted based on the execution information of the plurality of first services, and corresponding resources are allocated to each target object according to the service execution needs.
It improves the accuracy and flexibility of resource allocation, avoids excessive allocation and waste of resources, and improves business execution efficiency and effectiveness.
Smart Images

Figure CN119761755A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and more specifically to a resource allocation method, apparatus, device, medium, and program product. Background Art
[0002] In modern enterprise operations, many business scenarios involve complex business processes that consist of multiple services. There are dependencies between services, that is, the next service can only be executed after the previous service is completed.
[0003] However, in actual operation, the resources required by these services are different, and the execution status of services will also change with time and external conditions. Traditional resource allocation methods are often based on static or rough predictions, which cannot accurately reflect the actual execution status of services and future demand changes, and ignore the dependencies between services, resulting in unreasonable resource allocation and affecting the overall execution efficiency and effectiveness of the business. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a resource allocation method, apparatus, device, medium and program product for improving the accuracy of resource allocation.
[0005] According to the first aspect of the present disclosure, a resource allocation method is provided, including: respectively obtaining execution information of a first service in each target object, wherein the first service is a service in a first business whose current state is an execution state, the first business includes multiple services, there is a sequential dependency relationship between the multiple services, and different services require different resources; based on the execution information of multiple first services, predicting the service execution requirements of each target object in the next time period; and allocating corresponding resources to each target object according to the service execution requirements.
[0006] According to an embodiment of the present disclosure, the execution information of the first service in each target object is obtained respectively, including: sending a first request to the first interface of each target object respectively, wherein the first request is used to obtain the execution status of the first service in the target object; parsing the first response information fed back by the target object based on the first interface to obtain the execution status information of the first service.
[0007] According to an embodiment of the present disclosure, the service execution requirements of each target object in the next time period are predicted based on the execution information of multiple first services, including: collecting historical processing information of the first business in each target object; inputting the historical processing information of the first business and the execution information of the first service as input features into a pre-trained model respectively to obtain a prediction result; wherein the prediction result is used to represent the execution time from the first service to the second service, and the second service is a subsequent service of the first service; and determining the service execution requirements of the target object in the next time period based on the prediction result output by the pre-trained model.
[0008] According to an embodiment of the present disclosure, determining the service execution requirements of the target object in the next time period based on the prediction results output by the pre-trained model includes: obtaining the processing preference information of the first business of the target object; and determining the service execution requirements of the target object in the next time period based on the processing preference information and the prediction results.
[0009] According to an embodiment of the present disclosure, historical processing information of the first business and execution information of the first service are input as input features into a pre-trained model to obtain a prediction result, including: constructing graph structure data based on the historical processing information, wherein the graph structure data includes multiple nodes and multiple edges, the nodes represent services, and the edges represent dependencies between services; inputting the graph structure data and the execution information of the first service into the pre-trained model, the pre-trained model updating the representation of the nodes in the graph structure data based on the execution information of the first service; generating and outputting a prediction result according to the updated node representation.
[0010] According to an embodiment of the present disclosure, the pre-trained model updates the representation of nodes in the graph structure data based on the execution information of the first service, including: extracting node features of each node in the graph structure data; propagating node features in the graph structure data based on the information propagation mechanism, aggregating features of neighboring nodes on the node, and updating the representation of the node.
[0011] According to an embodiment of the present disclosure, corresponding resources are allocated to each target object according to service execution requirements, including: determining resource information required by the target object in the next time period based on the service execution requirements of the target object, wherein the required resource information includes the type and quantity of required resources; determining a resource allocation strategy based on the required resource information of each target object; and allocating corresponding resources to each target object according to the resource allocation strategy.
[0012] The second aspect of the present disclosure provides a resource allocation device, including: an acquisition module, used to respectively acquire the execution information of the first service in each target object, wherein the first service is a service in the first business whose current state is an execution state, the first business includes multiple services, there is a sequential dependency relationship between the multiple services, and different services require different resources; a prediction module, used to predict the service execution requirements of each target object in the next time period based on the execution information of multiple first services; an allocation module, used to allocate corresponding resources to each target object according to the service execution requirements.
[0013] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0014] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.
[0015] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0017] Figure 1 The application scenario diagram of the resource allocation method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown;
[0018] Figure 2 A flowchart of a resource allocation method according to an embodiment of the present disclosure is schematically shown;
[0019] Figure 3 A flowchart for respectively acquiring execution information of the first service in each target object according to an embodiment of the present disclosure is schematically shown;
[0020] Figure 4 Schematically shows a flow chart of predicting the service execution demand of each target object in the next time period based on the execution information of multiple first services according to an embodiment of the present disclosure;
[0021] Figure 5 A flowchart schematically illustrates a method of determining the service execution requirements of a target object in the next time period based on the prediction results output by a pre-trained model according to an embodiment of the present disclosure;
[0022] Figure 6 A flowchart schematically illustrates a method of inputting historical processing information of a first business and execution information of a first service as input features into a pre-trained model to obtain a prediction result according to an embodiment of the present disclosure;
[0023] Figure 7 A flowchart schematically shows a method for updating the representation of nodes in graph structure data based on the execution information of the first service according to a pre-trained model of an embodiment of the present disclosure;
[0024] Figure 8 A flowchart schematically shows a method of allocating corresponding resources to each target object according to service execution requirements according to an embodiment of the present disclosure;
[0025] Fig. 9 A schematic diagram showing a structural block diagram of a resource allocation device according to an embodiment of the present disclosure; and
[0026] Fig.10 A block diagram of an electronic device suitable for implementing a resource allocation method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0027] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0028] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0029] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0030] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0031] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0032] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0033] An embodiment of the present disclosure provides a resource allocation method, comprising: respectively obtaining execution information of a first service in each target object, wherein the first service is a service in a first business whose current state is an execution state, the first business includes multiple services, there is a sequential dependency relationship between the multiple services, and different services require different resources; based on the execution information of the multiple first services and the historical processing information of the first business of each target object, predicting the service execution demand of each target object in the next time period; and allocating corresponding resources to each target object according to the service execution demand.
[0034] Figure 1 The application scenario diagram of the resource allocation method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0035] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0036] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0038] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0039] It should be noted that the resource allocation method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the resource allocation device provided in the embodiment of the present disclosure can generally be set in the server 105. The resource allocation method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the resource allocation device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0041] The following will be based on Figure 1 The scene described by Figure 2~Figure 8 The resource allocation method of the disclosed embodiment is described in detail.
[0042] Figure 2 The flowchart of the resource allocation method according to the embodiment of the present disclosure is schematically shown.
[0043] like Figure 2 As shown, the resource allocation method of this embodiment includes operations S210 to S230.
[0044] In operation S210, execution information of the first service in each target object is obtained respectively, wherein the first service is a service in the first business whose current state is execution state, the first business includes multiple services, there is a sequential dependency relationship between the multiple services, and different services require different resources.
[0045] In some embodiments, the target object may be, for example, a branch system for handling a first business, and the first business is a first business composed of multiple services. Taking the first business being installment application as an example, the first business may include services such as calculation, application, file opening, and loan issuance.
[0046] There is a sequential dependency relationship between multiple services in the first business. Assume that the first business includes service A, service B, etc., and service B can only be executed after service A is executed. That is, the execution of service B depends on service A.
[0047] In operation S220, a service execution requirement of each target object in a next time period is predicted based on the execution information of the plurality of first services.
[0048] In some embodiments, the historical processing information and the execution information of the first service may be input into a pre-trained model, and the service execution requirements of each target object in the next time period may be predicted based on the pre-trained model, wherein the service execution requirements may include, for example, the number of services to be executed in the next time period, the service type, resource requirements, etc. The pre-trained model may be, for example, a time series analysis model, a regression analysis model, a machine learning model, etc.
[0049] In one embodiment of the present disclosure, a graph neural network model is used as a pre-trained model to predict the service execution requirements of the target object, and the graph neural network model predicts the execution time of the next service based on the execution information of the first service. For example, graph structure data can be constructed based on historical processing information, and the graph structure data and the execution information of the first service can be sent to the pre-trained model, so that the pre-trained model updates the corresponding node information in the graph structure data based on the execution information of the first service, and obtains the prediction result of the next node based on the updated node information. The graph neural network can capture and utilize the complex correlation between the nodes in the graph structure data, thereby effectively improving the accuracy of the prediction.
[0050] In operation S230, corresponding resources are allocated to each target object according to the service execution requirement.
[0051] In some embodiments, a resource allocation strategy is determined according to the service execution requirements of each target object, and corresponding resources are allocated to each target object based on the resource allocation strategy.
[0052] The resource allocation method provided by the embodiment of the present disclosure provides timely and accurate data support for resource allocation by acquiring the execution information of the first service being executed, incorporates the sequential dependency relationship between services into the consideration dimension of resource allocation, and predicts the service execution demand of the target object in the next time period based on the execution information of the first service being executed, thereby effectively improving the accuracy of the prediction of the service execution demand of the target object. Thus, flexible and reasonable allocation of resources is achieved, over-configuration and waste of resources are avoided, and the accuracy and flexibility of resource allocation are effectively improved.
[0053] Figure 3 The flowchart of respectively acquiring the execution information of the first service in each target object according to an embodiment of the present disclosure is schematically shown.
[0054] like Figure 3 As shown, the embodiment of the present invention obtains the execution information of the first service in each target object respectively, including operation S310 to operation S320.
[0055] In operation S310, a first request is sent to a first interface of each target object respectively, wherein the first request is used to obtain an execution status of a first service in the target object.
[0056] In some embodiments, each target object provides an interface for obtaining the service execution status, namely, a first interface. These interfaces usually have standardized access methods and data formats. A first request containing necessary parameters and information is constructed according to the specification of the first interface. The parameters of the first request include the request type (such as GET or POST), the identifier of the target service, the query condition, etc. The constructed first request is sent to the first interface of each target object based on the corresponding communication protocol.
[0057] In operation S320, the first response information fed back by the target object based on the first interface is parsed to obtain execution status information of the first service.
[0058] In some embodiments, when the target object receives the first request, it generates a response (i.e., first response information) containing service execution status information according to the content of the request. After receiving the first response information fed back by the first interface, it selects an appropriate parsing method to parse the first response information and extract the service execution status information. It identifies the services whose execution status information is in the execution state and determines these services as the first services.
[0059] The resource allocation method provided by the embodiment of the present disclosure obtains the status information of the service in each target object through a standardized interface and request format, realizes unified monitoring and management of different target objects, and obtains the execution status of the service in the target object, so as to dynamically adjust the resource allocation strategy according to the changes in the service execution status, thereby improving the timeliness and flexibility of resource allocation.
[0060] Figure 4 The flowchart of predicting the service execution demand of each target object in the next time period based on the execution information of multiple first services according to an embodiment of the present disclosure is schematically shown.
[0061] like Figure 4 As shown, this embodiment predicts the service execution demand of each target object in the next time period based on the execution information of multiple first services, including operations S410 to S430.
[0062] In operation S410, historical processing information of a first business in each target object is collected.
[0063] In some embodiments, the historical processing information of the first service may include, for example, historical execution records of the first service, resource consumption records, execution records of each service in the first service, resources used, execution intervals between services, etc. The resource consumption records may include, for example, the number of times the CPU, network load, and throughput are called when executing the service / service.
[0064] In operation S420, historical processing information of the first business and execution information of the first service are respectively input into the pre-trained model as input features to obtain a prediction result; wherein the prediction result is used to represent the execution time from the first service to the second service, and the second service is a subsequent service of the first service.
[0065] In some embodiments, the historical processing information of the first business and the execution information of the first service are sorted to form feature information for input into the pre-trained model, wherein the format of the feature information is determined based on the pre-trained model, for example, it can be a feature vector, graph structure data, etc. The feature information is input into the pre-trained model, and the pre-trained model performs internal calculations based on the input feature information to obtain the execution time from the first service to the second service, that is, the time from the end of the execution of the first service to the start of the execution of the second service. The second service is a subsequent service of the first service.
[0066] In operation S430 , the service execution requirement of the target object in the next time period is determined based on the prediction result output by the pre-trained model.
[0067] In some embodiments, the prediction results output by the pre-trained model are used as a reference benchmark value, and the prediction results are adjusted accordingly in combination with information such as the business needs of the outlets, service handling preferences, etc. to predict the actual time when the second service may start to be executed, and determine the service execution requirements of the target object in the next time period (i.e., the type of services and quantity of services that need to be executed, etc.).
[0068] The disclosed embodiment introduces historical processing information to enable the pre-trained model to more comprehensively understand the context and background of the current service, thereby obtaining more accurate prediction results and improving the accuracy of the prediction results. After determining the prediction results, the prediction results are calibrated based on the actual situation of the target object, and the service execution requirements are determined based on the calibration to improve the accuracy of the service execution requirements, thereby improving the rationality of service resource allocation.
[0069] Figure 5 A flowchart is schematically shown for determining the service execution requirements of a target object in the next time period based on the prediction results output by a pre-trained model according to an embodiment of the present disclosure.
[0070] like Figure 5As shown, this embodiment determines the service execution requirement of the target object in the next time period based on the prediction result output by the pre-training model, including operations S510 to S520.
[0071] In operation S510, processing preference information of a first service of a target object is obtained.
[0072] In operation S520 , the service execution requirement of the target object in the next time period is determined based on the handling preference information and the prediction result.
[0073] In some embodiments, the service execution demand of the target object in the next time period may be related to the prediction results output by the pre-trained model, and may also be related to the handling preferences of each target object for the first business, wherein the handling preferences may include, for example, preferred handling time, preferred business type, preferred handling method, etc. For example, some outlets are located near office buildings, and their customers may prefer to handle business during the lunch break at noon, and some outlets are located near residential areas, and their customers may prefer to handle business in the morning or afternoon. Some outlets have a main customer group of the elderly, so they will prefer offline business handling, and some outlets have a main customer group of young people, so they will prefer online business handling.
[0074] In the embodiments of the present disclosure, for example, the processing preference information of the first business in the target object can be determined by analyzing the historical processing data of the target object on the first business, which may include processing time, processing frequency, processing type and processing results, and by comprehensively analyzing the processing preference information and the prediction results, the processing time of the second service related to the first service in the current target object is determined, thereby determining the service demand of the target object in the next time period.
[0075] The disclosed embodiment uses the prediction results of the pre-trained model and the handling preference information to jointly predict the service execution needs of the target object in the next time period, effectively improving the flexibility and accuracy of the service execution demand prediction, and improving the matching degree between the service execution demand and the actual application scenario, thereby realizing accurate allocation of resources.
[0076] Figure 6 The flowchart schematically shows a process of inputting historical processing information of a first business and execution information of a first service as input features into a pre-training model to obtain a prediction result according to an embodiment of the present disclosure.
[0077] like Figure 6 As shown, this embodiment inputs historical processing information of the first business and execution information of the first service as input features into the pre-training model to obtain a prediction result, including operations S610 to S630.
[0078] In operation S610, graph structure data is constructed based on the historical processing information, wherein the graph structure data includes a plurality of nodes and a plurality of edges, the nodes represent services, and the edges represent dependency relationships between services.
[0079] In some embodiments, information about the older services in the first business and the dependency relationships between the services is extracted from the historical processing information. This information may include the execution time, execution results, and dependency relationships between services. Services are defined as nodes in graph structure data, and the dependency relationships between services are defined as edges. For example, if service A needs to call service B during execution, an edge pointing from service A to service B can be created in the graph structure. After the graph structure corresponding to the first business is constructed, features are added to the nodes and edges in the graph structure based on the historical processing information to obtain graph structure data.
[0080] In operation S620, the graph structure data and the execution information of the first service are input into the pre-trained model, and the pre-trained model updates the representation of the nodes in the graph structure data based on the execution information of the first service.
[0081] In operation S630, a prediction result is generated and output according to the updated node representation.
[0082] In some embodiments, the constructed graph structure data and the execution information of the first service are input as input data into a pre-trained model, and the pre-trained model updates the representation of the nodes in the graph structure data according to the input data, wherein the updated node representation contains more information about the service and its dependencies. Based on the updated node representation, the model can generate prediction results about the first service or other related services (such as the second service).
[0083] The disclosed embodiment can intuitively represent the relationships and correlations between data by converting historical processing information into graph structured data. In particular, for a first business that includes multiple sequential dependencies, the graph structured data can effectively reflect the correlations between services. The complex relationships between objects in the graph structured data are captured and utilized through the graph neural network, thereby providing more accurate prediction results. Data communication and sharing can be performed within each neural network layer in the graph neural network, which can better understand the intrinsic structure and correlation of the data, thereby improving the accuracy of the prediction.
[0084] Figure 7 A flowchart is schematically shown of a pre-trained model according to an embodiment of the present disclosure updating the representation of nodes in graph structure data based on execution information of a first service.
[0085] like Figure 7 As shown, the pre-trained model of this embodiment updates the representation of nodes in the graph structure data based on the execution information of the first service, including operations S710 to S720.
[0086] In operation S710 , node features of each node in the graph structure data are extracted.
[0087] In operation S720, node features are propagated in the graph structure data based on an information propagation mechanism, features of neighboring nodes are aggregated on the node, and a representation of the node is updated.
[0088] In some embodiments, the pre-trained model first extracts node features of each node from the graph structure data. The node features may include, for example, the attributes of the node itself and the information of neighboring nodes connected to the node through edges. Based on the information propagation mechanism, the node features are propagated in the graph structure data, and the neighbor node features are aggregated on the current node (for example, this can be achieved through graph convolution operations or aggregation functions, and aggregation functions may include summation, averaging, maximum pooling, etc.), forming a new feature representation of the current node. After information propagation, each node in the graph structure data will update its representation based on the new aggregate information. When the node representation is updated, the graph neural network predicts the next node to be executed and the possible execution time based on these representations.
[0089] The disclosed embodiment aggregates the features of neighboring nodes to more comprehensively reflect node representation, improve the accuracy of node representation, and thus improve the accuracy of prediction tasks. In addition, the node representation is updated through aggregation functions or graph convolution operations, avoiding the need for a complete representation of the entire graph in traditional deep learning models, thereby effectively reducing computational complexity.
[0090] Figure 8 The flowchart of allocating corresponding resources to each target object according to service execution requirements according to an embodiment of the present disclosure is schematically shown.
[0091] like Figure 8 As shown, this embodiment allocates corresponding resources to each target object according to service execution requirements, including operations S810 to S830.
[0092] In operation S810, based on the service execution requirement of the target object, the resource information required by the target object in the next time period is determined, wherein the required resource information includes the type and quantity of the required resources.
[0093] In operation S820, a resource allocation strategy is determined based on the required resource information of each target object.
[0094] In operation S830, corresponding resources are allocated to each target object according to the resource allocation policy.
[0095] In some embodiments, the service execution requirements may include, for example, the service type and service quantity that the target object needs to execute in the next time period, wherein different services require different resources. The required server resource types are determined according to the service execution requirements, wherein the server resource types may include, for example, computing resources (CPU, memory), storage resources (hard disk, SSD), network resources (bandwidth, delay), etc. The resource allocation strategy is determined according to the required resource information of each target object, wherein the resource allocation strategy is dynamically adjusted as the service execution requirements change, and corresponding resources are allocated to each target object based on the resource allocation strategy, so as to achieve accurate allocation and efficient utilization of resources, and improve the accuracy of resource allocation and resource utilization.
[0096] Based on the above resource allocation method, the present disclosure also provides a resource allocation device. Fig. 9 The device is described in detail.
[0097] Fig. 9 The structure block diagram of the resource allocation device according to the embodiment of the present disclosure is schematically shown.
[0098] like Fig. 9 As shown, the resource allocation device 900 of this embodiment includes an acquisition module 910 , a prediction module 920 and an allocation module 930 .
[0099] The acquisition module 910 is used to respectively acquire the execution information of the first service in each target object, wherein the first service is a service in the first business whose current state is the execution state, the first business includes multiple services, there is a sequential dependency relationship between the multiple services, and different services require different resources. In one embodiment, the acquisition module 910 can be used to perform the operation S210 described above, which will not be repeated here.
[0100] The prediction module 920 is used to predict the service execution requirements of each target object in the next time period based on the execution information of the plurality of first services. In one embodiment, the prediction module 920 can be used to perform the operation S220 described above, which will not be described in detail here.
[0101] The allocation module 930 is used to allocate corresponding resources to each target object according to the service execution requirements. In one embodiment, the allocation module 930 can be used to perform the operation S230 described above, which will not be described in detail here.
[0102] According to an embodiment of the present disclosure, the acquisition module includes a first acquisition submodule and a second acquisition submodule.
[0103] The first acquisition submodule is used to send a first request to the first interface of each target object respectively, wherein the first request is used to obtain the execution status of the first service in the target object.
[0104] The second acquisition submodule is used to parse the first response information fed back by the target object based on the first interface, and obtain the execution status information of the first service.
[0105] According to an embodiment of the present disclosure, the prediction module includes a first prediction submodule, a second prediction submodule and a third prediction submodule.
[0106] The first prediction submodule is used to collect historical processing information of the first business in each target object.
[0107] The second prediction submodule is used to input the historical processing information of the first business and the execution information of the first service as input features into the pre-trained model to obtain a prediction result; wherein the prediction result is used to represent the execution time from the first service to the second service, and the second service is a subsequent service of the first service.
[0108] The third prediction submodule is used to determine the service execution requirements of the target object in the next time period based on the prediction results output by the pre-trained model.
[0109] According to an embodiment of the present disclosure, the third prediction submodule includes an acquisition unit and a determination unit.
[0110] The acquisition unit is used to acquire the handling preference information of the first service of the target object.
[0111] The determination unit is used to determine the service execution requirements of the target object in the next time period based on the handling preference information and the prediction result.
[0112] According to an embodiment of the present disclosure, the second prediction submodule includes a construction unit, an input unit and an output unit.
[0113] The construction unit is used to construct graph structure data based on historical processing information, wherein the graph structure data includes multiple nodes and multiple edges, the nodes represent services, and the edges represent dependencies between services.
[0114] The input unit is used to input the graph structure data and the execution information of the first service into the pre-trained model, and the pre-trained model updates the representation of the nodes in the graph structure data based on the execution information of the first service.
[0115] The output unit is used to generate and output prediction results based on the updated node representation.
[0116] According to an embodiment of the present disclosure, the input unit includes an extraction subunit and a propagation subunit.
[0117] The extraction subunit is used to extract node features of each node in the graph structure data.
[0118] The propagation subunit is used to propagate node features in graph structure data based on the information propagation mechanism, aggregate the features of neighboring nodes on the node, and update the representation of the node.
[0119] According to an embodiment of the present disclosure, the allocation module includes a first allocation submodule, a second allocation submodule and a third allocation submodule.
[0120] The first allocation submodule is used to determine the resource information required by the target object in the next time period based on the service execution requirements of the target object, wherein the required resource information includes the type and quantity of the required resources.
[0121] The second allocation submodule is used to determine a resource allocation strategy based on the required resource information of each target object.
[0122] The third allocation submodule is used to allocate corresponding resources to each target object according to the resource allocation strategy.
[0123] According to an embodiment of the present disclosure, any multiple modules among the acquisition module 810, the prediction module 820 and the allocation module 830 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 810, the prediction module 820 and the allocation module 830 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 810, the prediction module 820 and the allocation module 830 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
[0124] Fig.10 A block diagram of an electronic device suitable for implementing a resource allocation method according to an embodiment of the present disclosure is schematically shown.
[0125] like Fig.10As shown, the electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 to a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include an onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0126] In RAM 1003, various programs and data required for the operation of electronic device 1000 are stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other via bus 1004. Processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1002 and / or RAM 1003. It should be noted that the program can also be stored in one or more memories other than ROM 1002 and RAM 1003. Processor 1001 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0127] According to an embodiment of the present disclosure, the electronic device 1000 may further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The electronic device 1000 may further include one or more of the following components connected to the input / output (I / O) interface 1005: an input portion 1006 including a keyboard, a mouse, etc.; an output portion 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk, etc.; and a communication portion 1009 including a network interface card such as a LAN card, a modem, etc. The communication portion 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output (I / O) interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage portion 1008 as needed.
[0128] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0129] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1002 and / or RAM 1003 described above and / or one or more memories other than ROM 1002 and RAM 1003.
[0130] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the resource allocation method provided by the embodiment of the present disclosure.
[0131] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 1001. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0132] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1009, and / or installed from the removable medium 1011. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0133] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0134] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0135] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0136] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0137] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A resource allocation method, characterized in that: The method comprises: Acquire execution information of a first service in each target object respectively, wherein the first service is a service in a first business that is currently in an execution state, the first business includes multiple services, there are sequential dependencies between the multiple services, and different services require different resources; Predicting the service execution demand of each target object in the next time period based on the execution information of the plurality of first services; Corresponding resources are allocated to each target object according to the service execution requirements.
2. The resource allocation method according to claim 1, characterized in that: The obtaining the execution information of the first service in each target object respectively includes: Sending a first request to a first interface of each target object respectively, wherein the first request is used to obtain the execution status of a first service in the target object; The target object is parsed based on the first response information fed back by the first interface to obtain the execution status information of the first service.
3. The resource allocation method according to claim 1, characterized in that: The predicting the service execution demand of each target object in the next time period based on the execution information of the plurality of first services includes: Collecting historical processing information of the first business in each target object; Inputting the historical processing information of the first business and the execution information of the first service as input features into the pre-trained model respectively to obtain a prediction result; wherein the prediction result is used to represent the execution time from the first service to the second service, and the second service is a subsequent service of the first service; The service execution requirements of the target object in the next time period are determined based on the prediction results output by the pre-trained model.
4. The resource allocation method according to claim 3, characterized in that: The determining the service execution requirement of the target object in the next time period based on the prediction result output by the pre-trained model includes: Obtain the handling preference information of the target object's first business; The service execution requirements of the target object in the next time period are determined based on the handling preference information and the prediction result.
5. The resource allocation method according to claim 3, characterized in that: The step of inputting the historical processing information of the first business and the execution information of the first service as input features into the pre-trained model to obtain a prediction result includes: Constructing graph structure data based on the historical processing information, wherein the graph structure data includes a plurality of nodes and a plurality of edges, the nodes represent services, and the edges represent dependency relationships between services; Inputting the graph structure data and the execution information of the first service into a pre-trained model, wherein the pre-trained model updates the representation of nodes in the graph structure data based on the execution information of the first service; Generate and output prediction results based on the updated node representation.
6. The resource allocation method according to claim 5, characterized in that: The pre-trained model updates the representation of nodes in the graph structure data based on the execution information of the first service, including: Extract node features of each node in graph structure data; Based on the information propagation mechanism, node features are propagated in the graph structure data, the features of neighbor nodes are aggregated on the node, and the representation of the node is updated.
7. The resource allocation method according to claim 1, characterized in that: The allocating corresponding resources to each target object according to the service execution requirements includes: Based on the service execution requirements of the target object, determine the resource information required by the target object in the next time period, wherein the required resource information includes the type and quantity of the required resources; Determine resource allocation strategy based on required resource information of each target object; Corresponding resources are allocated to each target object according to the resource allocation strategy.
8. A resource allocation device, characterized in that: The device comprises: An acquisition module, used to respectively acquire execution information of a first service in each target object, wherein the first service is a service in a first business that is currently in an execution state, the first business includes multiple services, there are sequential dependencies between the multiple services, and different services require different resources; A prediction module, configured to predict the service execution demand of each target object in a next time period based on the execution information of the plurality of first services; The allocation module is used to allocate corresponding resources to each target object according to the service execution requirements.
9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.