Resource allocation method, apparatus and device

By acquiring user profiles and predictive models, we can determine users' expected activity periods and resource needs, enabling off-peak scheduling of edge nodes. This solves the resource scheduling pressure during peak periods, optimizes resource allocation, and improves data processing efficiency.

CN118802938BActive Publication Date: 2025-11-25CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410557861.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2025-11-25
Estimated Expiration
2044-05-07

AI Technical Summary

Technical Problem

Existing technologies cannot effectively address the resource scheduling pressure on edge nodes during peak hours, leading to uneven resource scheduling and impacting data processing efficiency.

Method used

By acquiring user profiles, we can determine users' active time periods and resource needs. We can then use predictive models to predict users' expected active time periods and select target sub-nodes with sufficient remaining resources from multiple sub-nodes based on resource allocation priorities. This will allocate resources to users and achieve off-peak scheduling.

Benefits of technology

By predicting user behavior and prioritizing resource allocation, the system effectively addresses resource scheduling pressure during peak hours, optimizes resource allocation, and improves data processing efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802938B_ABST
    Figure CN118802938B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a resource allocation method, device and equipment, comprising: obtaining a user portrait of a first user; determining a plurality of active time periods of the first user and an active probability and a user preferred content corresponding to each active time period based on at least one active time period corresponding to each user preferred content; for each active time period, determining a resource allocation priority of the active time period based on the active probability of the active time period, and determining a required resource of the active time period based on the user preferred content corresponding to the active time period; and determining a target sub-node with a required resource greater than the required resource from a plurality of sub-nodes of an edge node in sequence based on the resource allocation priority and the required resource of a target active time period. Embodiments of the present application solve the resource scheduling pressure of a peak time period with a large demand.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of intelligent scheduling, and particularly relates to a resource allocation method, device and equipment. BACKGROUND

[0002] With the rapid development of artificial intelligence, 5th Generation Mobile Communication Technology (5G), Internet of Things and other technologies, the requirement for computing power and storage space is increasing with the growth of a large amount of data. As a new computing mode, edge computing pushes computing tasks from the cloud to the network edge, so that terminal devices can process and analyze data close to the data source, thereby improving the efficiency of data processing.

[0003] However, for a peak time period with a large amount of demand, the resource scheduling pressure of the edge node in the peak time period is usually considered in the prior art, and part of the resource scheduling pressure is returned to the cloud, so that the resource scheduling pressure of the peak time period with a large amount of demand cannot be solved. SUMMARY

[0004] The embodiments of the present application provide a resource allocation method, device and equipment, which can solve the resource scheduling pressure of the peak time period with a large amount of demand.

[0005] In a first aspect, the embodiments of the present application provide a resource allocation method applied to an edge node, and the method comprises:

[0006] obtaining a user portrait of a first user, the user portrait of the first user comprising a plurality of user preference contents and at least one active time period corresponding to each user preference content;

[0007] determining a plurality of to-be-active time periods of the first user and an active probability and a user preference content corresponding to each to-be-active time period based on the at least one active time period corresponding to each user preference content;

[0008] for each to-be-active time period, determining a resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period, and determining required resources of the to-be-active time period based on the user preference content corresponding to the to-be-active time period;

[0009] determining a target sub-node with remaining resources greater than the required resources from a plurality of sub-nodes of the edge node in sequence based on the resource allocation priority and the required resources of a target active time period, the target sub-node being used to allocate resources for an end node corresponding to the first user in the target active time period, the target active time period being a to-be-active time period in an i-th time period after a current time among the plurality of to-be-active time periods, i=1, 2, …, N, N being a positive integer.

[0010] In an optional implementation of the first aspect, the obtaining of the user portrait of the first user comprises:

[0011] The information of interest of the first user in the first time period is obtained, and the hot spot information in the second time period is obtained.

[0012] The user portrait of the first user is calculated based on the hot spot information and the information of interest of the first user.

[0013] In an optional implementation of the first aspect, the obtaining of the user portrait of the first user comprises:

[0014] In the case where the information of interest of the first user in the first time period is not obtained, the hot spot information in the second time period is obtained.

[0015] The user portrait of the first user is calculated based on the hot spot information in the second time period.

[0016] In an optional implementation of the first aspect, the determining of the resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period and the determining of the required resource of the to-be-active time period based on the user preference content corresponding to the to-be-active time period comprise:

[0017] The active probability of the to-be-active time period is matched based on a preset mapping relationship between the active probability and the resource allocation priority, to obtain the resource allocation priority of the to-be-active time period corresponding to the active probability of the to-be-active time period.

[0018] The user preference content corresponding to the to-be-active time period is matched based on a preset mapping relationship between the user preference content and the to-be-allocated resource, to obtain the required resource of the to-be-active time period.

[0019] In an optional implementation of the first aspect, the to-be-active time period comprises a to-be-active start time and a to-be-active end time; the method further comprises:

[0020] The already-active time of the first user in a third time period is determined, the third time period comprising N time periods.

[0021] The determining of the resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period comprises:

[0022] The relative time relationship between the to-be-active time period and the current time is determined based on the to-be-active start time and the to-be-active end time.

[0023] The active probability of the to-be-active time period and the already-active time are calculated based on a target function corresponding to the relative time relationship, to obtain the resource allocation priority of the to-be-active time period.

[0024] In an optional implementation of the first aspect, the resource allocation priority of the to-be-active time period is obtained by calculating the active probability of the to-be-active time period and the active time based on the relative time relationship and using a target function, including:

[0025] In the case where the relative time relationship indicates that the to-be-active start time is later than the current time, determining a time difference between the to-be-active start time and the current time;

[0026] determining a product between the time difference and a first value as a second value, the first value being a product between a first difference between a first preset value and the active probability of the to-be-active time period and a second difference between the first preset value and the logarithmic value of the active time;

[0027] determining a ratio between the second value and a third value as the resource allocation priority of the to-be-active time period, the third value being a difference between a second preset value and the current time.

[0028] In an optional implementation of the first aspect, the resource allocation priority of the to-be-active time period is obtained by calculating the active probability of the to-be-active time period and the active time based on the relative time relationship and using a target function, including:

[0029] In the case where the relative time relationship indicates that the to-be-active start time is earlier than the current time and the to-be-active end time is later than the current time, determining a first difference between a first preset value and the active probability of the to-be-active time period, and determining a second difference between the first preset value and the logarithmic value of the active time;

[0030] determining a product between the first difference and the second difference as a first value;

[0031] determining a difference between the first preset value and a preset hyperparameter as a third difference;

[0032] determining a ratio between the first value and the third difference as the resource allocation priority of the to-be-active time period.

[0033] In an optional implementation of the first aspect, the method further includes:

[0034] determining a ratio between the required resource of the to-be-active time period and the remaining resource of the edge node as a resource occupancy rate;

[0035] updating the resource allocation priority of the to-be-active time period according to the resource occupancy rate and the resource allocation priority of the to-be-active time period, to obtain an updated resource allocation priority of the to-be-active time period.

[0036] In a second aspect, a resource allocation apparatus is provided, applied to an edge node, and including:

[0037] The acquisition module is configured to acquire a user portrait of the first user, the user portrait of the first user comprising a plurality of user preferred contents and at least one active time period corresponding to each user preferred content;

[0038] The determination module is configured to determine, based on the at least one active time period corresponding to each user preferred content, a plurality of to-be-active time periods of the first user, an active probability and a user preferred content corresponding to each to-be-active time period;

[0039] The determination module is further configured to, for each to-be-active time period, determine a resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period, and determine a required resource of the to-be-active time period based on the user preferred content corresponding to the to-be-active time period.

[0040] The determination module is further configured to, based on the resource allocation priority and the required resource of the target active time period, determine, from the plurality of sub-nodes of the edge node, a target sub-node with a remaining resource greater than the required resource in sequence, the target sub-node being configured to allocate resources for the end node corresponding to the first user in the target active time period, the target active time period being a to-be-active time period in an i-th time period after a current time among the plurality of to-be-active time periods, i = 1, 2, …, N, N being a positive integer.

[0041] In a third aspect, an electronic device is provided, comprising: a memory configured to store computer program instructions; and a processor configured to read and run the computer program instructions stored in the memory, so as to execute the resource allocation method provided in any of the optional implementation manners of the first aspect.

[0042] In a fourth aspect, a computer storage medium is provided, the computer storage medium storing computer program instructions, the computer program instructions being executed by a processor to implement the resource allocation method provided in any of the optional implementation manners of the first aspect.

[0043] In a fifth aspect, a computer program product is provided, the computer program product comprising a computer program, the computer program being executed by a processor to implement the resource allocation method provided in any of the optional implementation manners of the first aspect.

[0044] In the embodiment of the present application, the user portrait of the first user can be acquired, and based on at least one active time period corresponding to each user preferred content in the user portrait, a plurality of to-be-active time periods of the first user and an active probability and a user preferred content corresponding to each to-be-active time period can be determined, and then for each to-be-active time period, the resource allocation priority of the to-be-active time period can be determined based on the active probability of the to-be-active time period, and the required resource of the to-be-active time period can be determined based on the user preferred content corresponding to the to-be-active time period, and the target sub-node with the required resource less than the remaining resource can be determined from the plurality of sub-nodes of the edge node in sequence based on the resource allocation priority and the required resource of the target active time period. In this way, the to-be-active time period of the user after the current time can be predicted through the regularity of the historical behavior of the user, and the resource allocation priority of the to-be-active time period can be determined, that is, the urgency of the task in the to-be-active time period can be determined, and then the sub-node capable of undertaking the task corresponding to the to-be-active time period can be allocated to the to-be-active time period in sequence, which realizes the peak-shifting solution to a large number of demands in the peak time period, and further solves the resource scheduling pressure of the peak time period of a large number of demands. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced below. Those skilled in the art can also obtain other drawings according to these drawings without creating any creative labor.

[0046] Figure 1 is a flow diagram of a resource allocation method provided by the embodiments of the present application;

[0047] Figure 2 is a flow diagram of another resource allocation method provided by the embodiments of the present application;

[0048] Figure 3 is a schematic diagram of audio stream mask information provided by the embodiments of the present application;

[0049] Figure 4 is a structural schematic diagram of a resource allocation device provided by the embodiments of the present application;

[0050] Figure 5 is a structural schematic diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0051] The features and exemplary embodiments of the various aspects of the present application will be described in detail below with reference to the figures. For the purpose of clarity, the description will be made with reference to the accompanying drawings in which the same or similar reference numerals are used to designate identical or similar elements. It should be noted that the specific embodiments are presented only for the purpose of explanation and are not intended to limit the present application in any manner. The present application can be carried out in many ways, and the specific embodiments disclosed herein are illustrative in nature. Numerous modifications to the disclosed embodiments will be apparent to those skilled in the art in view of the teachings herein. The description herein does not constitute a limitation of the present application as defined by the appended claims and the scope of equivalents thereof. Rather, the description is intended to explain the application so that others skilled in the art can better understand the application. The following description of the embodiments is merely exemplary in nature and is not intended to limit the present application.

[0052] It should be noted that the terms "first" and "second" and the like are used merely to distinguish one element from another, and do not require or imply a physical or logical relationship or order of such elements. Also, the terms "comprises", "comprising", or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises... a" does not, without more limitations, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0053] The term "and / or", merely describes an association between associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone.

[0054] To address the aforementioned issues, this application provides a resource allocation method, apparatus, and device. This method acquires a user profile of a first user and, based on at least one active time period corresponding to each user's preference content in the user profile, determines multiple potential active time periods for the first user, along with the activity probability and user preference content corresponding to each potential active time period. Then, for each potential active time period, it determines the resource allocation priority based on the activity probability of that time period and the required resources for that time period based on the corresponding user preference content. Furthermore, based on the resource allocation priority and required resources of the target active time period, it sequentially determines target sub-nodes with remaining resources greater than the required resources from multiple sub-nodes of the edge node. In this way, it can predict a user's potential active time periods after the current moment through the user's regular historical behavior and determine the resource allocation priority of those periods, i.e., the urgency of tasks within those periods. Then, it sequentially allocates sub-nodes capable of handling the tasks corresponding to those periods, achieving staggered resolution of high demand during peak periods and thus alleviating resource scheduling pressure during peak periods with high demand.

[0055] The resource allocation method provided in this application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0056] This application provides a framework diagram of a cloud-edge-device resource allocation system.

[0057] like Figure 1 As shown, the cloud-edge-device resource allocation system may include a data acquisition module 10, a cloud node 20, an edge node 30, and a device node 40. The cloud node, device node, and data acquisition module are all connected to the edge node.

[0058] The data acquisition module 10 is used to provide data to the edge nodes so that the edge nodes can accurately allocate resources.

[0059] Cloud Node 20 is used to optimize cloud node resource scheduling. Under the constraint of limited cloud node service resources, cloud node resources are primarily responsible for controlling the related computations of various edge nodes and end nodes. This optimizes the previous situation of exceeding resource usage limits, eliminating the need to perform all computations through the cloud master node or send them back, thus saving significant cloud node resources.

[0060] Edge node 30 is mainly used to solve problems such as reasonable scheduling of cloud-edge resources, monitoring of edge node resource occupancy, cold start node calls, and frequent user calls by using the peak scheduling priority algorithm, and to realize the intelligent scheduling framework of cloud-edge computing power.

[0061] The end node 40 is used to optimize the file transmission resource occupation. A large amount of streaming media data transmission of the end node will occupy the bandwidth and resources of the edge node. At this time, the data is separately introduced into the idle node according to the resource occupation of the edge node. Then, the end node resource scheduling module protects the data privacy of the user. The data of the user is transmitted to different nodes under different conditions to avoid the leakage of user information data. The safety of the user data is ensured. Finally, the end node resource scheduling module is designed to provide the user with relevant historical information used at the same time last time within a specified time node, and to properly solve the problem of selection difficulty for the user.

[0062] Based on this, the following will be combined with the attached Figures 2 to 3 The resource allocation method provided by the embodiment of the application is described in detail.

[0063] As Figure 2 shown, the execution subject of the resource allocation method can be an edge node. The method can specifically include the following steps:

[0064] S210, obtaining a user portrait of a first user.

[0065] In some embodiments, the user portrait of the first user can include a plurality of user preference contents and at least one active time period corresponding to each user preference content. It should be noted that the at least one active time period corresponding to each user preference content can be at least one time period before the current time, which is not limited here.

[0066] Wherein, the first user can include at least one user, and the user portrait can also include at least one user portrait accordingly, which is not limited here. The user preference content can be game content, novel content, news content, etc., which is not limited here. For example, if the user preference content is game content, the at least one active time period corresponding to the game content can be the time period when the user opens the application or mini program related to the game, or plays the game.

[0067] In one example, if the first user can include user A and user B. Wherein, the user preference content of user A can be game content, and the corresponding active time period can be 18:00 to 19:00 every day. The user preference content of user B can include game content and novel content. The active time period corresponding to the game content can be 20:00 to 22:00 every day, and the active time period corresponding to the novel content can be 0:00 to 2:00 every day, 12:00 to 13:00, etc.

[0068] S220, determine, based on the at least one active time period corresponding to each user preference content, a plurality of to-be-active time periods of the first user and an active probability and a user preference content corresponding to each to-be-active time period.

[0069] The plurality of to-be-active time periods can be a plurality of to-be-active time periods after the current time.

[0070] In addition, the active probability corresponding to each to-be-active time period is used to represent the probability of the user viewing the related user preference content in the to-be-active time period, and can also be used to represent the urgency of the corresponding end node using the resource in the to-be-active time period. The greater the active probability, the greater the urgency, and vice versa. The end node refers to a terminal device, and each end node corresponds to a user, which is not limited here.

[0071] Specifically, after obtaining the user portrait of the first user, the edge node can determine, based on the at least one active time period corresponding to each user preference content included in the user portrait and before the current time, a plurality of to-be-active time periods of the first user after the current time and an active probability and a user preference content corresponding to each to-be-active time period.

[0072] If the first user includes a plurality of users, the edge node can determine, for each user, based on the at least one active time period corresponding to each user preference content associated with the user and before the current time, a plurality of to-be-active time periods of the user after the current time and an active probability and a user preference content corresponding to each to-be-active time period.

[0073] S230, for each to-be-active time period, determining a resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period, and determining the required resource of the to-be-active time period based on the user preference content corresponding to the to-be-active time period.

[0074] The resource allocation priority can be used to represent the priority of resource allocation. The required resource can include bandwidth, storage space, etc., which is not limited here.

[0075] Specifically, after obtaining the plurality of to-be-active time periods of the first user and the active probability and the user preference content corresponding to each to-be-active time period, the edge node can determine, for each to-be-active time period in the plurality of to-be-active time periods, a resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period, and determine the required resource of the to-be-active time period based on the user preference content corresponding to the to-be-active time period.

[0076] S240, based on the resource allocation priority and the required resource of the target active time period, sequentially determining a target sub-node with the remaining resource greater than the required resource from a plurality of sub-nodes of the edge node.

[0077] The target active time period can be a to-be-active time period in an i th time period after the current time among the plurality of active time periods, i = 1, 2, …, N, N being a positive integer. It should be noted that the target active time period can include at least one to-be-active time period, which is not limited herein.

[0078] In some embodiments, the target sub-node can be configured to allocate resources for the end node corresponding to the first user in the target active time period. It should be noted that, since the first user can include a plurality of users in the embodiments of the present application, the target sub-node can be configured to allocate resources for the end node of the user corresponding to the target active time period in the target active time period.

[0079] It should be further noted that the remaining resources and the required resources belong to the same type of resources, for example, if the required resources are bandwidth resources, the remaining resources are bandwidth resources of the sub-node.

[0080] Specifically, since the target active time period is a to-be-active time period in an i th time period after the current time among the plurality of to-be-active time periods, the edge node can determine a target sub-node with remaining resources greater than the required resources from the plurality of sub-nodes of the edge node in turn based on the resource allocation priority of the target active time period and the required resources, so that the target sub-node can allocate resources for the end node corresponding to the first user in the target active time period, so that the first user can view the related user preference content on the end node.

[0081] In the embodiments of the present application, the user portrait of the first user can be obtained, and based on at least one active time period corresponding to each user preference content in the user portrait, the plurality of to-be-active time periods of the first user and the active probability and user preference content corresponding to each to-be-active time period are determined, and then for each to-be-active time period, the resource allocation priority of the to-be-active time period is determined based on the active probability of the to-be-active time period, and the required resources of the to-be-active time period are determined based on the user preference content corresponding to the to-be-active time period, and the target sub-node with remaining resources greater than the required resources can be determined from the plurality of sub-nodes of the edge node in turn based on the resource allocation priority of the target active time period and the required resources. In this way, the to-be-active time period of the user after the current time can be predicted through the regular historical behavior of the user, and the resource allocation priority of the to-be-active time period is determined, that is, the urgency of the task in the to-be-active time period is determined, and then the sub-node capable of undertaking the task corresponding to the to-be-active time period is allocated to the to-be-active time period in turn, which realizes the peak-shaving solution to a large number of demands in the peak time period, and further solves the resource scheduling pressure of the peak time period of a large number of demands.

[0082] In one embodiment, S210 can specifically include the following steps:

[0083] Obtain the interested information of the first user in a first time period and the hotspot information in a second time period;

[0084] Calculate the user portrait of the first user based on the hotspot information and the interested information of the first user.

[0085] The first time period can be a time period before the current time, which can be 24 hours or one week, without specific limitation.

[0086] The second time period can be a time period before the current time, which can be 24 hours or 72 hours, without specific limitation. It should be noted that the length of the first time period and the length of the second time period can be the same or different.

[0087] In addition, the interested information can include at least one interested content and a first sub-time period corresponding to each interested content, and the hotspot information can include at least one hotspot content and a second sub-time period corresponding to each hotspot content.

[0088] Specifically, the edge node can obtain the interested information of the first user in a first time period and the hotspot information in a second time period, and calculate the user portrait of the first user based on the obtained hotspot information and the interested information of the first user.

[0089] It should be noted that the interested information can be determined according to the multimedia behaviors such as search, click, collection, and like of the first user in the first time period and the stream media upload behavior of the user. Based on this, the multimedia behaviors and the stream media upload behavior of the user can be labeled and classified to form user family multimedia portrait data label content data to represent the attention degree of the user to different content.

[0090] Moreover, from the analysis of the user behavior pipeline, we divide the user behavior on the end node into first click behavior, secondary flow behavior, stream media input behavior, and jump-out behavior. According to the number and dimension of different types of user behaviors, we find the key node behavior as the main behavior habit of the user. From the analysis of the long-term active time period, different users have different active time period jump-out nodes due to different factors such as time, region, family member composition, main user, and work and rest time period. We mainly avoid some key jump-out nodes to understand the uninterested dimensions of the user.

[0091] For popular data, mainly analyze the operation behaviors of all users in the recent period (within a week or 23 hours), capture the hotspot behavior content and the concentrated active time period of the user. The hotspot behavior content and the concentrated active time period here need to be analyzed differently according to the relevant region.

[0092] In this embodiment, by acquiring the interested information of the user in the historical time and analyzing and processing the hotspot information in the historical time, the corresponding user portrait can be accurately calculated according to the regular historical behavior of the user and the historical hotspot information.

[0093] In the process of calculating the user portrait of the first user, since the first user has no operation behavior on the terminal device in the first time, the edge node may not be able to acquire the interested information of the first user in the first time.

[0094] Based on this, the above S210 can specifically include the following steps:

[0095] In the case where the interested information of the first user in the first time is not acquired, acquire the hotspot information in the second time;

[0096] Based on the hotspot information in the second time, calculate the user portrait of the user.

[0097] Specifically, in the case where the interested information of the first user in the first time is not acquired, the edge node can acquire the hotspot information in the second time. Since the hotspot information reflects the information that all users pay more attention to and prefer in the second time, the edge node can calculate the user portrait of the first user based on the hotspot information in the second time.

[0098] In this embodiment, if the first user is a silent user, that is, the first user does not often use the terminal device, so that the edge node cannot collect the interested information of the first user, since the historical hotspot information is the information that all users pay more attention to, the user portrait of the corresponding user can be accurately obtained based on the historical hotspot information.

[0099] In one embodiment, the above S220 can specifically include the following steps:

[0100] Use the prediction model to process at least one active time period corresponding to each user preference content, to obtain a plurality of to-be-active time periods of the first user and an active probability and a user preference content corresponding to each to-be-active time period.

[0101] The prediction model can be obtained by training based on an existing classification model, which is not limited here.

[0102] Specifically, after obtaining the user portrait of the first user, the edge node can process at least one time period corresponding to each user preference content by using the prediction model pre-trained to obtain a plurality of to-be-active time periods of the first user, and an active probability and a user preference content corresponding to each to-be-active time period.

[0103] Since the prediction model needs to be trained in advance, and the prediction model can be used to process at least one active time period corresponding to each user preference content, before the step of processing at least one active time period corresponding to each user preference content by using the prediction model to obtain a plurality of to-be-active time periods of the first user, and an active probability and a user preference content corresponding to each to-be-active time period, a training sample needs to be obtained in advance, each training sample includes a plurality of reference preference contents, at least one reference active time period corresponding to each reference user preference content, and a label active time period corresponding to each training sample. Based on this, the training sample is input into a classification model for training and parameter optimization, and the model with the optimal evaluation result is used as the final active time period prediction model.

[0104] In this embodiment, the model pre-trained can be used to process at least one active time period corresponding to each user preference content to accurately obtain a plurality of to-be-active time periods of the first user, and an active probability and a user preference content corresponding to each to-be-active time period.

[0105] In one embodiment, the S230 can specifically include the following steps:

[0106] Based on the mapping relationship between the preset active probability and the resource allocation priority, the active probability of the to-be-active time period is matched to obtain a resource allocation priority of the to-be-active time period corresponding to the active probability of the to-be-active time period.

[0107] Based on the mapping relationship between the preset user preference content and the to-be-allocated resource, the user preference content corresponding to the to-be-active time period is matched to obtain the required resource of the to-be-active time period.

[0108] The mapping relationship between the preset active probability and the resource allocation priority can be a relationship pre-set based on actual experience or situation, which is not limited here. The mapping relationship between the preset user preference content and the to-be-allocated resource can be a relationship pre-set based on actual experience or situation, which is not limited here.

[0109] Specifically, the edge node can match the active probability of the to-be-active time period based on a preset mapping relationship between the active probability and the resource allocation priority, obtain the resource allocation priority of the to-be-active time period corresponding to the active probability of the to-be-active time period, and can match the user preference content corresponding to the to-be-active time period based on a preset mapping relationship between the user preference content and the to-be-allocated resource, and obtain the required resource of the to-be-active time period.

[0110] In this embodiment, the active probability of the to-be-active time period and the user preference content corresponding to the to-be-active time period can be respectively mapped and matched based on the preset mapping relationship between the active probability and the resource allocation priority and the preset mapping relationship between the user preference content and the to-be-allocated resource, to obtain the corresponding resource allocation priority and the required resource.

[0111] In order to more accurately describe the resource allocation method provided in the embodiments of the present application, in one embodiment, the resource allocation method described above can further include the following steps:

[0112] Determine the active time of the first user in the third time.

[0113] The third time described above can include N time periods.

[0114] Based on this, as shown in the following table, the step of determining the resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period described above can specifically include the following steps: Figure 3 S310, determine the relative time relationship between the to-be-active time period and the current time based on the to-be-active start time and the to-be-active end time.

[0115] In some embodiments, the to-be-active time period described above can include a to-be-active start time and a to-be-active end time.

[0116] Specifically, since the to-be-active time period described above can include a to-be-active start time and a to-be-active end time, based on this, the edge node can determine the relative time relationship between the to-be-active time period and the current time based on the to-be-active start time and the to-be-active end time.

[0117] S320, calculate the active probability of the to-be-active time period and the active time based on the target function corresponding to the relative time relationship, to obtain the resource allocation priority of the to-be-active time period.

[0118] The target function described above can be a function preset based on actual conditions, which is not limited here.

[0119]

[0120] ​Specifically, after obtaining the relative time relationship between the to-be-active time period and the current time, the edge node can calculate the active probability and the active time of the to-be-active time period based on a target function corresponding to the relative time relationship, and obtain the resource allocation priority of the to-be-active time period.

[0121] In this embodiment, the influence of the resource allocation priority calculation of the to-be-active time period can be considered in view of the relationship of the to-be-active time period relative to the current time, different functions are used for calculation for different relationships of the to-be-active time period relative to the current time, so that more accurate resource allocation priority can be obtained.

[0122] Based on this, if the relative time relationship indicates that the to-be-active start time is later than the current time, the S320 can specifically include the following steps:

[0123] In the case where the relative time relationship indicates that the active start time is later than the current time, determining the time difference value between the to-be-active start time and the current time;

[0124] Determining the product between the time difference value and the first value as the second value, the first value being the product between the first preset value and the first difference value between the active probability of the to-be-active time period and the second difference value between the logarithm value of the active time and the first preset value

[0125] Determining the ratio between the second value and the third value as the resource allocation priority of the to-be-active time period, the third value being the difference value between the second preset value and the current time.

[0126] The first preset value and the second preset value can be set in advance based on actual experience or conditions, and are not specifically limited here. For example, the first preset value can be set to 1, and the second preset value can be set to 24, which are not specifically limited here.

[0127] Specifically, in the case where the relative time relationship indicates that the active start time is later than the current time, the edge node can first determine the time difference value between the to-be-active start time and the current time, and determine the first difference value between the first preset value and the active probability of the to-be-active time period, and determine the second difference value between the logarithm value of the active time and the first preset value, and then determine the product between the time difference value, the first difference value and the second difference value as the second value, based on which the difference value between the second preset value and the current time can be determined as the third value, and finally, the ratio between the second value and the third value is determined as the resource allocation priority of the to-be-active time period.

[0128] In one example, the above process can be shown in the following formula (1):

[0129]

[0130] wherein T min is the active start time, T now is the current time, ∑a active is the active time, and p is the active probability.

[0131] In this embodiment, the influence of the relationship between the active time period and the current time on the calculation of the resource allocation priority of the active time period can be considered. In the case where the relative time relationship indicates that the active start time is later than the current time, the calculation is performed using the above function, so that a more accurate resource allocation priority can be obtained.

[0132] In another embodiment, if the relative time relationship indicates that the active start time is earlier than the current time and the active end time is later than the current time, the S320 can specifically include the following steps:

[0133] In the case where the relative time relationship indicates that the active start time is earlier than the current time and the active end time is later than the current time, a first difference between the first preset value and the active probability of the active time period is determined, and a second difference between the first preset value and the logarithmic value of the active time is determined;

[0134] The product between the first difference and the second difference is determined as a first value;

[0135] The difference between the first preset value and the preset hyperparameter is determined as a third difference;

[0136] The ratio between the first value and the third difference is the resource allocation priority of the active time period.

[0137] The first preset value can be set in advance based on actual experience or circumstances, for example, the first preset value can be 1, which is not limited herein. The above-mentioned preset hyperparameter can be set in advance based on actual experience or circumstances, which is not limited herein.

[0138] Specifically, in the case where the relative time relationship indicates that the active start time is earlier than the current time and the active end time is later than the current time, the edge node can determine a first difference between the first preset value and the active probability of the active time period, and determine a second difference between the first preset value and the logarithmic value of the active time, and then determine the product between the first difference and the second difference as a first value. Then determine the difference between the first preset value and the preset hyperparameter as a third difference, and finally determine the ratio between the first value and the third difference as the resource allocation priority of the active time period.

[0139] In one example, the above process can be shown in the following formula (2):

[0140]

[0141] wherein ε is a hyper parameter used to reduce the impact weight.

[0142] In this embodiment, the influence of the relationship between the to-be-active time period and the current time on the calculation of the resource allocation priority of the to-be-active time period can be considered. In the case where the relative time relationship indicates that the active start time is earlier than the current time and the active end time is later than the current time, the calculation is performed using the above function, so that a more accurate resource allocation priority can be obtained.

[0143] It should be further noted that if the to-be-active end time of the to-be-active time period is earlier than the current time, it indicates that the to-be-active time period has become a historical time, and it is not necessary to calculate the to-be-active time period. The corresponding resource allocation priority is 0, and if the to-be-active end time of the active time period has other corresponding relationship with the current time, for example, the current time is the same as the to-be-active start time, then the corresponding resource allocation priority is 1.

[0144] Considering that the proportion of the required resources of the to-be-active time period in the remaining resources of the edge node can have a linear influence on the resource allocation priority of the to-be-active time period, in an embodiment, the above-mentioned resource allocation method can further include the following steps:

[0145] determining the ratio between the required resources of the to-be-active time period and the remaining resources of the edge node as a resource occupation rate;

[0146] updating the resource allocation priority of the to-be-active time period according to the resource occupation rate and the resource allocation priority of the to-be-active time period, to obtain an updated resource allocation priority of the to-be-active time period.

[0147] Specifically, the edge node can first determine the ratio between the required resources of the to-be-active time period and the remaining resources of the edge node as a resource occupation rate, and update the resource allocation priority of the to-be-active time period according to the resource occupation rate and the resource allocation priority of the to-be-active time period, to obtain an updated resource allocation priority of the to-be-active time period.

[0148] In an embodiment, the above-mentioned step of updating the resource allocation priority of the to-be-active time period according to the resource occupation rate and the resource allocation priority of the to-be-active time period, to obtain an updated resource allocation priority of the to-be-active time period, can specifically include the following steps:

[0149] performing weighted sum processing on the resource occupation rate and the resource allocation priority of the to-be-active time period based on a preset weight, to obtain an updated value of the resource allocation priority;

[0150] The resource allocation priority of the to-be-active time period is updated to the updated value of the resource allocation priority.

[0151] The preset weight can be set in advance based on actual experience or conditions, and is not specifically limited here.

[0152] Specifically, the edge node can perform weighted summation processing on the resource occupancy rate and the resource allocation priority of the to-be-active time period based on the preset weight to obtain an updated value of the resource allocation priority, and update the resource allocation priority of the to-be-active time period to the updated value of the resource allocation priority to obtain an updated resource allocation priority of the to-be-active time period.

[0153] In one example, the value range of the resource occupancy rate T is [0, 1], where 0 represents complete resource idleness and 1 represents complete resource occupancy. The value range of the resource allocation priority R of the to-be-active time period is [0, 1], where 0 represents the lowest resource allocation priority of the to-be-active time period and 1 represents the highest resource allocation priority of the to-be-active time period.

[0154] Assuming that the influence of the resource occupancy rate T and the time period priority R on the task is linear, the two can be combined through linear combination to obtain a comprehensive resource allocation priority P.

[0155] The weight coefficients of the linear combination can be adjusted according to specific conditions. Assuming that the weight coefficients are α and β, where α represents the weight of the resource occupancy rate and β represents the weight of the time period priority. Generally, α+β=1. Based on this, P=α*T+β*R.

[0156] By adjusting the values of the weight coefficients α and β, the influence of the resource occupancy rate and the time period priority on the task can be balanced according to actual needs. For example, if it is desired to focus more on the influence of the resource occupancy rate, a larger α value can be set; if it is desired to focus more on the influence of the time period priority, a larger β value can be set.

[0157] In this embodiment, it can be considered that the proportion of the required resources of the to-be-active time period in the remaining resources of the edge node can have a linear influence on the resource allocation priority of the to-be-active time period, and the resource allocation priority of the to-be-active time period is optimized in combination with the resource occupancy rate to obtain a more accurate resource allocation priority of the to-be-active time period.

[0158] Based on the same inventive concept, the embodiments of the present application also provide a resource allocation device. The device is applied to an edge node. The specific combination Figure 4 The resource allocation device provided by the embodiments of the present application is described in detail.

[0159] Figure 4 is a structural schematic diagram of a resource allocation apparatus provided by an embodiment of the present application.

[0160] As shown in the figure, the resource allocation apparatus 400 can include an acquisition module 410 and a determination module 420. Figure 4

[0161] The acquisition module 410 is configured to acquire a user portrait of a first user, the user portrait of the first user including a plurality of user preference contents and at least one active time period corresponding to each user preference content.

[0162] The determination module 420 is configured to determine, based on the at least one active time period corresponding to each user preference content, a plurality of to-be-active time periods of the first user and an active probability and a user preference content corresponding to each to-be-active time period.

[0163] The determination module 420 is further configured to, for each to-be-active time period, determine a resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period, and determine a required resource of the to-be-active time period based on the user preference content corresponding to the to-be-active time period.

[0164] The determination module 420 is further configured to determine, based on the resource allocation priority and the required resource of a target active time period, a target sub-node from a plurality of sub-nodes of an edge node in sequence, the target sub-node being used for allocating resources for an end node corresponding to the first user in the target active time period, the target active time period being a to-be-active time period in an i-th time period after a current time among the plurality of to-be-active time periods, i = 1, 2, …, N, N being a positive integer.

[0165] In one embodiment, the acquisition module mentioned above is specifically configured to:

[0166] acquire information of interest of the first user in a first time and hot spot information in a second time;

[0167] calculate the user portrait of the first user based on the hot spot information and the information of interest of the first user.

[0168] In one embodiment, the acquisition module mentioned above is specifically configured to:

[0169] acquire the hot spot information in the second time in a case where the information of interest of the first user in the first time is not acquired;

[0170] calculate the user portrait of the first user based on the hot spot information in the second time.

[0171] In one embodiment, the specific module mentioned above is specifically configured to:

[0172] ​The active probability of the to-be-active time period is matched based on a preset mapping relationship between the active probability and the resource allocation priority, so as to obtain the resource allocation priority of the to-be-active time period corresponding to the active probability of the to-be-active time period.

[0173] The user preference content corresponding to the to-be-active time period is matched based on a preset mapping relationship between the user preference content and the to-be-allocated resource, so as to obtain the required resource of the to-be-active time period.

[0174] In one embodiment, the to-be-active time period comprises a to-be-active start time and a to-be-active end time; and the determination module is further configured to determine an active time of the first user in a third time, the third time comprising N time periods.

[0175] The determination module is configured to:

[0176] determine a relative time relationship between the to-be-active time period and a current time based on the to-be-active start time and the to-be-active end time;

[0177] calculate the active probability of the to-be-active time period and the active time based on a target function corresponding to the relative time relationship, so as to obtain the resource allocation priority of the to-be-active time period.

[0178] In one embodiment, the determination module is configured to:

[0179] determine a time difference between the to-be-active start time and the current time in a case where the relative time relationship indicates that the to-be-active start time is later than the current time;

[0180] determine a product between the time difference and a first value as a second value, the first value being a product between a first preset value and a first difference between the active probability of the to-be-active time period and the first preset value, and a second difference between the first preset value and a logarithmic value of the active time;

[0181] determine a ratio between the second value and a third value as the resource allocation priority of the to-be-active time period, the third value being a difference between a second preset value and the current time.

[0182] In one embodiment, the determination module is configured to:

[0183] determine a first difference between the first preset value and the active probability of the to-be-active time period, and determine a second difference between the first preset value and a logarithmic value of the active time in a case where the relative time relationship indicates that the to-be-active start time is earlier than the current time and the to-be-active end time is later than the current time;

[0184] determine a product between the first difference and the second difference as the first value;

[0185] determine a difference between the first preset value and the preset hyperparameter as a third difference value;

[0186] determine a ratio between the first value and the third difference value as a resource allocation priority of the to-be-active time period.

[0187] In an embodiment, the resource allocation apparatus described above can further include an updating module.

[0188] The determining module is further configured to determine a ratio between the required resource of the to-be-active time period and the remaining resource of the edge node as a resource occupancy rate.

[0189] The updating module is configured to update the resource allocation priority of the to-be-active time period according to the resource occupancy rate and the resource allocation priority of the to-be-active time period, to obtain an updated resource allocation priority of the to-be-active time period.

[0190] In the embodiments of the present application, the user portrait of the first user can be obtained, and based on at least one active time period corresponding to each user preference content in the user portrait, a plurality of to-be-active time periods of the first user and an active probability and a user preference content corresponding to each to-be-active time period are determined, and then for each to-be-active time period, the resource allocation priority of the to-be-active time period is determined based on the active probability of the to-be-active time period, and the required resource of the to-be-active time period is determined based on the user preference content corresponding to the to-be-active time period, and the target active time period can be determined from the plurality of sub-nodes of the edge node in sequence based on the resource allocation priority of the target active time period and the required resource. In this way, the to-be-active time period of the user after the current time can be predicted through the regularity of the historical behavior of the user, and the resource allocation priority of the to-be-active time period is determined, that is, the urgency of the task in the to-be-active time period is determined, and then the sub-node capable of undertaking the task corresponding to the to-be-active time period is allocated to the to-be-active time period in sequence, which realizes the peak-shaving solution to a large number of demands in the peak time period, and further solves the resource scheduling pressure of the peak time period of a large number of demands.

[0191] The various modules in the resource allocation apparatus provided by the embodiments of the present application can realize the method steps of the embodiments of the present application shown in Figure 2 or Figure 3 and achieve the corresponding technical effects. For brevity, they will not be described here.

[0192] Figure 5 A hardware structure schematic diagram of an electronic device provided by an embodiment of the present application is shown.

[0193] The electronic device can include a processor 501 and a memory 502 having computer program instructions stored therein.

[0194] In particular, the processor 501 can include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits that embody the embodiments of the present application.

[0195] The memory 502 can include mass storage for data or instructions. By way of example, and not limitation, the memory 502 can include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc (e.g., a CD or DVD), a tape drive, a USB drive, or a combination of two or more of these. The memory 502 can be removable and / or non-removable (or fixed) as appropriate. The memory 502 can be internal or external as appropriate. In certain embodiments, the memory 502 is non-volatile solid-state memory.

[0196] The memory can include read-only memory (ROM), random-access memory (RAM), magnetic disk storage mediums, optical storage mediums, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software that, when executed (by one or more processors), is operable to

[0197] The processor 501 implements any of the resource allocation methods described above by reading and executing computer program instructions stored in the memory 502.

[0198] In one example, the electronic device can further include a communication interface 503 and a bus 510. As shown, the processor 501, the memory 502, and the communication interface 503 are connected by the bus 510 and complete communication therebetween. Figure 5

[0199] The communication interface 503 is mainly used to realize the communication between the modules, devices, units, and / or equipment in the embodiments of the present application.

[0200] ​Bus 510 includes a hardware, software, or both that couples components of the online data traffic metering device to each other. As an example without limitation, bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or another suitable bus or a combination of two or more of these. Where appropriate, bus 510 can include one or more buses. Although this application describes and illustrates a particular bus, this application contemplates any suitable bus or interconnect.

[0201] In addition, in combination with the resource allocation method in the above embodiments, the embodiments of the present application can provide a computer storage medium for implementation. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to implement the resource allocation method provided by the embodiments of the present application.

[0202] The embodiments of the present application also provide a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the resource allocation method provided by the embodiments of the present application.

[0203] It needs to be clear that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of well-known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after understanding the spirit of the present application.

[0204] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0205] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

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

[0207] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A resource allocation method characterized by, Applied to an edge node, the method comprises: obtaining a user portrait of a first user, the user portrait of the first user comprising a plurality of user preference contents and at least one active time period corresponding to each of the user preference contents; determining a plurality of to-be-active time periods of the first user and an active probability and a user preference content corresponding to each of the to-be-active time periods based on the at least one active time period corresponding to each of the user preference contents; for each of the to-be-active time periods, determining a resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period, and determining a required resource of the to-be-active time period based on the user preference content corresponding to the to-be-active time period; based on the resource allocation priority and the required resource of a target active time period, sequentially determining a target sub-node with a remaining resource greater than the required resource from a plurality of sub-nodes of the edge node, the target sub-node being used to allocate resources for an end node corresponding to the first user in the target active time period, the target active time period being a to-be-active time period in the i-th time period after a current time among the plurality of to-be-active time periods, i = 1, 2, …, N, N being a positive integer.

2. The method of claim 1, wherein, The obtaining of the user portrait of the first user comprises: obtaining information of interest of the first user in a first time, and hot information in a second time; based on the hot information and the information of interest of the first user, calculating the user portrait of the first user.

3. The method of claim 1, wherein, The obtaining of the user portrait of the first user comprises: in the case where the information of interest of the first user in the first time is not obtained, obtaining the hot information in the second time; based on the hot information in the second time, calculating the user portrait of the first user.

4. The method of claim 1, wherein, The determination of the resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period, and the determination of the required resource of the to-be-active time period based on the user preference content corresponding to the to-be-active time period, comprises: based on a preset mapping relationship between the active probability and the resource allocation priority, matching the active probability of the to-be-active time period to obtain the resource allocation priority of the to-be-active time period corresponding to the active probability of the to-be-active time period; based on a preset mapping relationship between the user preference content and the to-be-allocated resource, matching the user preference content corresponding to the to-be-active time period to obtain the required resource of the to-be-active time period.

5. The method of claim 1, wherein, The to-be-active time period comprises a to-be-active start time and a to-be-active end time; the method further comprises: determining an already-active time of the first user in a third time, the third time comprising N time periods; The determination of the resource allocation priority of the to-be-active time period based on the active probability of the to-be-active time period comprises: based on the to-be-active start time and the to-be-active end time, determining a relative time relationship between the to-be-active time period and a current time; based on a target function corresponding to the relative time relationship, calculating the active probability of the to-be-active time period and the already-active time to obtain the resource allocation priority of the to-be-active time period.

6. The method of claim 5, wherein, The calculating the active probability of the to-be-active time period and the already-active time based on the relative time relationship and using a target function comprises: In a case where the relative time relationship indicates that the to-be-active start time is later than the current time, determining a time difference between the to-be-active start time and the current time; Determining a product between the time difference and a first value as a second value, the first value being a product between a first difference between a first preset value and the active probability of the to-be-active time period and a second difference between the first preset value and a logarithm of the already-active time; Determining a ratio between the second value and a third value as the resource allocation priority of the to-be-active time period, the third value being a difference between a second preset value and the current time.

7. The method of claim 5, wherein, The calculating the active probability of the to-be-active time period and the already-active time based on the relative time relationship and using a target function comprises: In a case where the relative time relationship indicates that the to-be-active start time is earlier than the current time and the to-be-active end time is later than the current time, determining a first difference between a first preset value and the active probability of the to-be-active time period and determining a second difference between the first preset value and a logarithm of the already-active time; Determining a product between the first difference and the second difference as a first value; Determining a difference between the first preset value and a preset hyperparameter as a third difference; Determining a ratio between the first value and the third difference as the resource allocation priority of the to-be-active time period.

8. The method according to any one of claims 5 to 7, characterized in that, The method further comprises: Determining a ratio between the required resource of the to-be-active time period and the remaining resource of the edge node as a resource occupancy rate; Updating the resource allocation priority of the to-be-active time period according to the resource occupancy rate and the resource allocation priority of the to-be-active time period to obtain an updated resource allocation priority of the to-be-active time period.

9. A resource allocation apparatus characterized by comprising: The device is applied to an edge node and comprises: An obtaining module, configured to obtain a user portrait of a first user, the user portrait of the first user comprising a plurality of user preference contents and at least one active time period corresponding to each user preference content; A determining module, configured to determine, based on the at least one active time period corresponding to each user preference content, a plurality of to-be-active time periods of the first user and an active probability and a user preference content corresponding to each to-be-active time period; The determining module is further configured to, for each to-be-active time period, determine, based on the active probability of the to-be-active time period, a resource allocation priority of the to-be-active time period and determine, based on the user preference content corresponding to the to-be-active time period, a required resource of the to-be-active time period. The determining module is further configured to determine, from the plurality of sub-nodes of the edge node, a target sub-node with remaining resources greater than the required resources based on the resource allocation priority of a target active time period and the required resources, the target active time period being an active time period to be activated in the i-th time period after the current time among the plurality of active time periods, i=1, 2, …, N, N being a positive integer, the target sub-node being configured to allocate resources for the end node corresponding to the first user in the target active time period.

10. An electronic device, comprising: The device comprises a processor and a memory storing computer program instructions; The processor reads and executes the computer program instructions to implement the resource allocation method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Method and device for determining active duration of user, electronic equipment and storage medium

    CN111666535A

  • Method and device for determining resource allocation strategy, terminal equipment and storage medium

    CN113033938A