Virtual resource allocation method, device, equipment and storage medium

Through the collaboration between Flink real-time calculation and solver optimization algorithm, the problem of inefficient virtual resource allocation is solved, accurate resource allocation is achieved, user transaction rate and resource utilization rate are improved, and a win-win effect of global optimization and individual adaptation is formed.

CN120235431BActive Publication Date: 2025-08-26RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510722534.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-08-26
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

When traditional linear planning models deal with complex and changeable market environments and user needs, they lead to complex and inefficient solutions for virtual resource allocation, making it difficult to achieve accurate resource allocation.

Method used

The collaboration between Flink real-time computing and solver optimization algorithm is adopted. By obtaining the target attribute information and historical data of the current access user, the target dual variables are dynamically calculated, and the relevant parameters of the user's individual dimensions are combined to achieve accurate allocation of virtual resources.

Benefits of technology

It improves the efficiency and accuracy of virtual resource allocation, improves user transaction rate, and forms a win-win effect of global optimization and individual adaptation, avoids excessive concentration or waste of resources, and improves resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235431B_ABST
    Figure CN120235431B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a virtual resource allocation method, apparatus, device, and storage medium. The method includes: obtaining a target dual variable corresponding to the current visiting user based on the target attribute information of the current visiting user so that the dual function corresponding to the optimization problem obtains a first target value; the optimization problem is used to decide the virtual resources allocated to the user; the target dual variable is obtained by solving the dual function by calling a solver through Flink calculation based on the user data of historical visiting users; and allocating target virtual resources to the current visiting user based on the target dual variable and the target-related parameters of the current visiting user under at least one virtual resource, thereby improving the efficiency of virtual resource allocation through the synergy of Flink real-time calculation and solver optimization algorithm, and dynamically achieving accurate allocation through the relevant parameter feedback mechanism of the user individual dimension, thereby improving the user transaction rate and relevant parameters, and forming a win-win effect of "global optimization-individual adaptation".
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a virtual resource allocation method, apparatus, device and storage medium. Background Art

[0002] In the field of marketing, optimizing resource allocation to maximize revenue has always been a key focus for businesses. Traditional online operations research solutions primarily employ linear programming models, leveraging dual solutions asynchronously to achieve online allocation of benefits. However, in practical applications, this approach has gradually exposed a series of problems. In particular, faced with complex and volatile market environments and user demands, linear programming models struggle to cope with multiple constraints, resulting in a complex and inefficient solution process. Summary of the Invention

[0003] The embodiments of the present application provide a virtual resource allocation method, apparatus, device, and storage medium. By combining Flink's real-time computing with a solver optimization algorithm, the method solves the efficiency problem of large-scale virtual resource allocation and improves virtual resource allocation efficiency. Furthermore, the method dynamically implements precise virtual resource allocation through a user-specific parameter feedback mechanism, improving user transaction rates and virtual resource-related parameters, achieving a win-win effect of "global optimization and individual adaptation." The above technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a virtual resource allocation method, comprising:

[0005] Based on the target attribute information of the current visiting user, the target dual variable corresponding to the current visiting user is obtained; the target dual variable is the independent variable that enables the dual function corresponding to the optimization problem to obtain the first target value; the optimization problem is used to decide the virtual resources allocated to the user; the target dual variable is based on the user data of historical visiting users, and is obtained by solving the dual function by calling the solver through Flink calculation; the user data includes the user characteristics of the historical visiting users and the relevant parameters of the historical visiting users under at least one virtual resource; based on the target dual variable and the target-related parameters of the current visiting user under at least one virtual resource, the target virtual resource is allocated to the current visiting user.

[0006] In one possible implementation, the method further includes: after receiving the historical access operations of the historical access users, calculating the number of target historical access users belonging to the same group through Flink; when the number of the target historical access users reaches a threshold, calling the solver to solve the dual function based on the user data of the target historical access users to obtain a group dual variable; the group dual variable is an independent variable that enables the dual function corresponding to the optimization problem under the same group to obtain the first objective value; and the group dual variable is associated with the group identifier corresponding to the target historical access user and stored.

[0007] In one possible implementation, after receiving the historical access operations of the historical access users, Flink is used to calculate the number of target historical access users belonging to the same group, including: after receiving the historical access operations of the historical access users, the user data of the historical access users is first filtered through Flink calculation to obtain valid user data, and then the historical access users are grouped according to the user features in the valid user data to obtain the groups to which the historical access users belong, and finally window processing is performed according to the historical access time and the number of target historical access users belonging to the same group.

[0008] In one possible implementation, the valid user data is used to represent the user data of the historical access users in a specific access scenario. Different specific access scenarios result in different virtual resource structures allocated to users, and different solvers are invoked through Flink calculations when solving the dual function.

[0009] The storing the group dual variable in association with the group identifier corresponding to the target historical visiting user includes: storing the group dual variable in association with the group identifier and the specific access scenario identifier corresponding to the target historical visiting user.

[0010] In one possible implementation, the calling solver solves the dual function based on the user data of the target historical visiting user to obtain a group dual variable, including: initializing the dual variables in the dual function to obtain an initial dual variable group; the initial dual variable group includes multiple initial dual variables within the target range; constructing a three-dimensional matrix corresponding to the dual function based on the user data of the target historical visiting user, the virtual resource cost of the target historical visiting user under at least one virtual resource, and the dual variables corresponding to the dual function; performing dimensionality reduction processing on the user dimension and the virtual resource dimension in the three-dimensional matrix to obtain a target dual function containing only the dual variable dimension; performing a cyclic search on the first target value on the target dual function based on the initial dual variable group to obtain a group dual variable.

[0011] In one possible implementation, the above-mentioned dimensionality reduction processing is performed on the user dimension and the virtual resource dimension in the above-mentioned three-dimensional matrix to obtain a target dual function containing only the dual variable dimension, including: performing dimensionality reduction processing on the virtual resource dimension in the above-mentioned three-dimensional matrix by taking the maximum value operation to obtain a two-dimensional matrix corresponding to the above-mentioned dual function; performing dimensionality reduction processing on the user dimension in the two-dimensional matrix corresponding to the above-mentioned dual function by taking the average value operation or the median operation to obtain a target dual function containing only the dual variable dimension.

[0012] In a possible implementation, the loop search for the first objective value on the objective dual function based on the initial dual variable group to obtain the group dual variable includes:

[0013] Based on the above-mentioned initial dual variable group, the first objective value on the above-mentioned target dual function is searched to obtain the target initial dual variable; the above-mentioned target initial dual variable is the initial dual variable in the above-mentioned initial dual variable group that corresponds to the first objective value of the above-mentioned target dual function; based on the above-mentioned target initial dual variable, the above-mentioned initial dual variable group is updated, and the above-mentioned step of searching the first objective value on the above-mentioned target dual function based on the above-mentioned initial dual variable group to obtain the target initial dual variable is performed again, until the search depth corresponding to the above-mentioned target dual function reaches a preset search depth or the accuracy corresponding to the above-mentioned target initial dual variable reaches a preset accuracy or the value of the above-mentioned target initial dual variable within the above-mentioned preset search depth no longer changes, then the cyclic search for the first objective value of the above-mentioned target dual function is terminated, and the target initial dual variable obtained from the last round of cyclic search is returned as the group dual variable.

[0014] In a possible implementation, the updating of the initial dual variable group based on the target initial dual variable includes: uniformly inserting a plurality of new initial dual variable values ​​within a preset range before and after the target initial dual variable; updating the initial dual variable group to a dual variable group consisting of the target initial dual variable and the plurality of new initial dual variable values, or merging the plurality of new initial dual variable values ​​into the initial dual variable group.

[0015] In a possible implementation, after searching for the first target value on the target dual function based on the initial dual variable group to obtain the target initial dual variable, the method further includes:

[0016] If the above-mentioned target initial dual variable is equal to the boundary value of the above-mentioned target range, the cyclic search for the first target value of the above-mentioned target dual function is interrupted and a failure alarm message is issued.

[0017] In one possible implementation, the above method also includes: constructing the above optimization problem based on the relevant parameters of the user under at least one virtual resource, and the decision variable indicating whether to allocate a virtual resource to the above user; the constraints of the above optimization problem include that each user is only allocated one virtual resource, and the total cost of the virtual resources allocated to at least one user does not exceed the preset total cost; based on the constraints of the above optimization problem, converting the above optimization problem into a dual problem to obtain the above dual function.

[0018] In a possible implementation, the target virtual resource is allocated to the current visiting user based on the target dual variable and the target-related parameters of the current visiting user under at least one virtual resource, including: searching for the second target value on the decision optimization function corresponding to the dual function based on the target dual variable, the target-related parameters of the current visiting user under at least one virtual resource and the target virtual resource cost and at least one virtual resource type to obtain the target virtual resource type; the target virtual resource type is the virtual resource type corresponding to the second target value of the decision optimization function in the at least one virtual resource type when the current visiting user and the target dual variable are known; and the corresponding target virtual resource is allocated to the current visiting user according to the target virtual resource type.

[0019] In a possible implementation, the above-mentioned obtaining of the target dual variable corresponding to the current visiting user based on the target attribute information of the current visiting user includes: determining the target group to which the current visiting user belongs based on the target attribute information of the current visiting user; and obtaining the target dual variable corresponding to the current visiting user based on the target group identifier corresponding to the target group and the target access scenario identifier corresponding to the current visiting user.

[0020] In a possible implementation, before allocating the target virtual resource to the current visiting user based on the target dual variable and the target-related parameters of the current visiting user under at least one virtual resource, the above method also includes: using machine learning technology to calculate the target-related parameters of the current visiting user under at least one virtual resource based on the target user characteristics of the current visiting user; the target user characteristics include at least one of the following: target attribute information, target transaction frequency, historical virtual resource allocation and related parameter information.

[0021] In a second aspect, an embodiment of the present application provides a method for allocating virtual resources, the method comprising:

[0022] Acquire the target virtual resource allocated to the current access user according to the virtual resource allocation method provided in the first aspect or any possible implementation manner of the first aspect; and display the target virtual resource.

[0023] In a third aspect, an embodiment of the present application provides a virtual resource allocation device, the virtual resource allocation device comprising:

[0024] An acquisition module is configured to obtain a target dual variable corresponding to the current visiting user based on the target attribute information of the current visiting user. The target dual variable is the independent variable that enables the dual function corresponding to the optimization problem to obtain the first target value. The optimization problem is used to determine the virtual resources allocated to the user. The target dual variable is obtained by solving the dual function by calling a Flink solver based on the user data of historical visiting users. The user data includes the user characteristics of the historical visiting users and the relevant parameters of the historical visiting users under at least one virtual resource.

[0025] The virtual resource allocation module is configured to allocate target virtual resources to the current visiting user based on the target dual variable corresponding to the current visiting user and the target-related parameters of the current visiting user under at least one virtual resource.

[0026] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; the processor is connected to the memory; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the first aspect of the embodiment of the present application or any possible implementation method of the first aspect or the method provided by the second aspect.

[0027] In a fifth aspect, an embodiment of the present application provides a computer storage medium, which stores multiple instructions, and the above instructions are suitable for being loaded by a processor and executing the method steps provided in the first aspect of the embodiment of the present application or any possible implementation of the first aspect or the second aspect.

[0028] In one or more embodiments of the present application, on the one hand, dynamic decision-making of virtual resources is enabled through Flink's real-time computing. As a high-performance stream processing framework, Flink supports millisecond-level low-latency computing, can process user data of large-scale access users in real time, and quickly generate target dual variables. For example, in the face of sudden high-concurrency user access scenarios, Flink's distributed architecture can quickly expand computing resources, ensure the timeliness of dual function solution, and provide real-time basis for resource allocation; on the other hand, by calling the solver, complex virtual resource allocation problems are converted into linear programming or integer programming problems, and the first objective value of the dual function is accurately solved. The strong robustness of the solver is used to handle high-dimensional constraints, avoiding the limitations of manual decision-making and significantly improving the quality of virtual resource decision-making; at the same time, by simplifying the multi-middleware architecture that the solver relies on in the relevant Cauchy operation solution technology to an architecture that only relies on Flink, the operation solution problem in the virtual resource allocation scenario can be made more efficient. On the other hand, accurate virtual resource allocation can be achieved based on the target dual variables and target-related parameters corresponding to the current visiting user, forming a "data-decision-feedback" closed loop. For example, if the target-related parameters corresponding to the current visiting user are low, the virtual resource allocation strategy can be dynamically adjusted (such as increasing the coupon denomination or issuing points for high-frequency usage scenarios, etc.) to stimulate the current visiting user to generate transaction behavior and improve the relevant parameters. At the same time, the essence of solving the dual problem is to optimize the allocation of virtual resources from a global perspective. Therefore, the individual user-related parameters (target-related parameters) of the current visiting user under at least one virtual resource and the target dual variables corresponding to the current visiting user obtained by solving the dual function are combined to allocate virtual resources to the current visiting user, taking into account both group efficiency and individual needs, avoiding excessive concentration or waste of virtual resources, and achieving a balance between global optimization and personalization corresponding to virtual resource allocation, thereby improving the utilization rate of virtual resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0030] Figure 1 A schematic diagram of the architecture of a virtual resource allocation system provided by an exemplary embodiment of the present application;

[0031] Figure 2 A flowchart of a virtual resource allocation method provided by an exemplary embodiment of the present application;

[0032] Figure 3A schematic diagram of a construction process of a dual function provided by an exemplary embodiment of the present application;

[0033] Figure 4 A schematic diagram of an implementation flow of an operations research solution in a virtual resource allocation scenario provided by an exemplary embodiment of the present application;

[0034] Figure 5 A schematic diagram of a solution process for a group dual variable provided by an exemplary embodiment of the present application;

[0035] Figure 6 A schematic structural diagram of a virtual resource allocation device provided by an exemplary embodiment of the present application;

[0036] Figure 7 A schematic structural diagram of an electronic device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.

[0038] In this specification, claims, and the accompanying drawings, the terms "first," "second," "third," and so on are used to distinguish between different items, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0039] Please refer to the following Figure 1 , which is a schematic diagram of the architecture of a virtual resource allocation system provided by an exemplary embodiment of the present application. Figure 1 As shown, the virtual resource allocation system may include: a terminal 110 and a server 120. Among them:

[0040] Terminal 110 includes one or more user terminals corresponding to users. A corresponding user version application can be installed on terminal 110. The application can register and log in to the user's corresponding account. Users can use the corresponding terminal 110 to conduct online transactions, access, claim, and redeem virtual resources, etc., based on the user version application. The corresponding target access operations and target attribute information are sent to server 120.

[0041] It can be understood that the above-mentioned terminal 110 can be a mobile phone, a tablet computer, a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a wearable electronic device, etc., and the embodiments of the present application are not limited to this.

[0042] Server 120 may be the server corresponding to the user version application used by the user for online transactions on terminal 110, and is used to provide services such as resource allocation after the user logs in and accesses the user version application. Server 120 may be a hardware server, a virtual server, a cloud server, etc., and is not limited in this embodiment of the present application.

[0043] Specifically, the server 120 can first obtain the target dual variable corresponding to the current visiting user based on the target attribute information of the current visiting user. The target dual variable is the independent variable that enables the dual function corresponding to the optimization problem to obtain the first target value. The above optimization problem is used to decide the virtual resources allocated to the user. The above target dual variable is based on the user data of the historical visiting user, and is obtained by solving the dual function by calling the solver through Flink calculation. The above user data includes the user characteristics of the historical visiting user and the relevant parameters of the historical visiting user under at least one virtual resource; then, based on the target dual variable and the target-related parameters of the current visiting user under at least one virtual resource, the target virtual resource is allocated to the current visiting user.

[0044] The network can be, but is not limited to, a medium that provides a communication link between terminal 110 and server 120, or the Internet, which includes network devices and transmission media. The transmission media can be wired links, such as, but not limited to, coaxial cables, optical fibers, and digital subscriber lines (DSL), or wireless links, such as, but not limited to, wireless Fidelity (WIFI), Bluetooth, and mobile device networks.

[0045] Understandably, Figure 1 The number of terminals 110 and servers 120 in the virtual resource allocation system shown is for example only. In a specific implementation, the virtual resource allocation system may include any number of terminals 110 and servers 120, and this embodiment of the present application does not specifically limit this. For example, but not limited to, the terminal 110 may be a user terminal cluster consisting of multiple user terminals, and the server 120 may be a server cluster consisting of multiple servers.

[0046] Next, combine Figure 1, introduces a virtual resource allocation method provided by the embodiment of this application. For details, please refer to Figure 2 , which is a flow chart of a virtual resource allocation method provided by an exemplary embodiment of the present application. Figure 2 As shown, the virtual resource allocation method includes the following steps:

[0047] S201, based on the target attribute information of the current visiting user, obtain the target dual variable corresponding to the current visiting user; the target dual variable is the independent variable that enables the dual function corresponding to the optimization problem to obtain the first target value; the optimization problem is used to decide the virtual resources allocated to the user; the target dual variable is based on the user data of historical visiting users and is obtained by solving the dual function through Flink calculation and calling the solver.

[0048] Specifically, the above-mentioned current accessing user may be, but is not limited to, a user who is currently accessing the target application, and the target application may be, but is not limited to, an application used for online transactions such as shopping and financial management. The target application may be a separate online transaction software installed on the terminal, or it may be a small program integrated into other software, etc., and the embodiments of this specification do not limit this. The target attribute information includes data features related to the currently accessing user, such as, but not limited to, basic information such as the current accessing user's occupation, place of origin, historical transaction records, etc. This information is used to distinguish the group category to which the currently accessing user belongs. The group category can be divided according to basic attributes such as the user's age group, occupation, or location, or it can be divided according to the user's transaction preferences or transaction habits, such as the green food transaction group (i.e., users who like to buy green food online), etc., which can be set according to actual needs, and the embodiments of this specification do not limit this.

[0049] The goal of the aforementioned optimization problem is to determine how to allocate virtual resources to users currently accessing the target application so that all user-related parameters meet pre-set conditions, such as, but not limited to, maximizing or minimizing the sum of all user-related parameters or ensuring consistency across all user-related parameters. These parameters may include, but are not limited to, virtual resource redemption rates, access rates, transaction volumes, and other parameters related to the virtual resources, and can be set based on actual needs. The redemption rate can be the ratio of user usage or conversion of allocated virtual resources, i.e., virtual resource utilization or conversion rate, or the rate of increase in user conversion rate (e.g., but not limited to, order placement probability) after allocating virtual resources, though this specification is not limiting in this regard. A greater sum of user redemption rates indicates a higher total transaction rate for users in the target application, meaning a greater sum of corresponding benefits generated by users after allocating virtual resources. These virtual resources may be, but are not limited to, subsidies, coupons, or virtual points, and the corresponding virtual resource quantity may be, but is not limited to, subsidy amounts, coupon denominations, or virtual points, though this specification is not limiting in this regard.

[0050] The dual function corresponds to the function in the original optimization problem. It provides a different perspective on the original optimization problem, and solving the dual function is often more efficient than directly solving the original optimization problem. Dual variables are variables corresponding to the variables in the original optimization problem and are used to construct the dual problem. Solving the dual function for the dual variables in the dual problem yields the target solution to the original optimization problem.

[0051] Optionally, the target dual variable corresponding to the above-mentioned currently visiting user can be an independent variable value for enabling the dual function corresponding to the optimization problem under the target group and / or target access scenario corresponding to the current visiting user to obtain a first target value (such as but not limited to a minimum value or a maximum value or a preset value, etc.). The optimization problem under the target group corresponding to the above-mentioned currently visiting user is used to decide the virtual resources allocated to each user in the target group so that the relevant parameters of all users corresponding to the target group meet preset conditions, such as but not limited to maximizing or minimizing the sum of relevant parameters of all users corresponding to the target group or unifying relevant parameters of all users, etc.; the optimization problem under the target access scenario corresponding to the above-mentioned currently visiting user is used to The virtual resources allocated to each user in the target access scenario are determined so that all user-related parameters in the target access scenario meet preset conditions, such as, but not limited to, maximizing or minimizing the sum of all user-related parameters in the target access scenario, or unifying all user-related parameters. The optimization problem for the target group and target access scenario corresponding to the current access user is used to determine the virtual resources allocated to each user in the target group in the target access scenario so that all user-related parameters corresponding to the target group in the target access scenario meet preset conditions, such as, but not limited to, maximizing or minimizing the sum of all user-related parameters corresponding to the target group in the target access scenario, or unifying all user-related parameters. The target groups can be, but are not limited to, group classification based on target attribute information such as basic user information (such as, but not limited to, region, consumption preferences, etc.) or transaction habits (such as high consumption, low consumption, etc.) of the current access user, and can include, for example, but not limited to, a young user group, an elderly user group, a user group in region A, a user group in region B, a high-spending group, etc.

[0052] The user data includes user characteristics of historical users and parameters related to at least one virtual resource associated with these users. These parameters may include, but are not limited to, virtual resource redemption rates, access rates, and transaction volumes, and can be set based on actual needs. These historical users may include, but are not limited to, users who visited before the current user, or users who visited during the previous historical access time period (T-1) before the current access time period (T). The current access time period (T) and the previous historical access time period (T-1) are adjacent and have the same time interval. The at least one virtual resource may refer to at least one virtual resource quantity within the same category, such as, but not limited to, coupons offering 5 off for purchases over 30 yuan or 6 off for purchases over 30 yuan. It may also refer to a virtual resource quantity associated with a specific virtual resource within at least one category, such as, but not limited to, coupons offering 3 yuan subsidies, 7 off for purchases over 30 yuan, or 3 off for purchases over 30 yuan. The parameters related to at least one virtual resource associated with these historical users refer to the usage or conversion rates of various virtual resources associated with these historical users when allocated these virtual resources. The above user characteristics may include, but are not limited to, basic information such as age, occupation, location, historical transaction frequency, historical virtual resource allocation and related parameter information corresponding to historical visiting users. The above user characteristics are used to distinguish the group category to which the historical visiting users belong.

[0053] Optionally, the target dual variable can be obtained by calling a solver to solve the dual function based on user data of users who accessed the previous historical access time period (T-1) of the current access time period (T) and belong to the same target group as the current access user, or belong to the same target group and the same access scenario (i.e., historical access users). The target dual variable can be updated and iterated based on user data of users who accessed the current access time period (T) and belong to the same target group as the current access user, or belong to the same target group and the same access scenario, through Flink real-time calculation to provide timeliness of the target dual variable, ensuring that more accurate and effective virtual resource allocation can be achieved for users who access the next historical access time period (T+1) of the current access time period (T) based on the updated and iterated target dual variable.

[0054] Optionally, in order to solve the problems of sparse samples and long-tail samples, the above-mentioned target dual variable can also be based on, but not limited to, user data of historical visiting users who belong to the same group as the current visiting user. When the number of historical visiting users calculated by Flink reaches a threshold, the dual function is solved to obtain the target variable. In this way, the multi-constraint problem in the dual solution process is transformed into a single-constraint problem through Flink calculation, and within the same solution window, it can be ensured that the sample number of each solution dimension reaches a sufficient number before the solution is performed.

[0055] Optionally, when a user accesses the target application online on a terminal (for example, viewing the homepage or scenario page), the terminal sends the corresponding online access operation to the server. The server can receive the online access operation sent by the terminal and, based on the user identifier of the current accessing user carried in the online access operation, query the database for the target attribute information of the current accessing user. Then, based on the target attribute information, the target group to which the current accessing user belongs is determined according to a preset correspondence between the attribute information and the group, or by using a pre-trained group recognition model. Then, based on the target group identifier corresponding to the target group, the database is searched for the group dual variable corresponding to the target group identifier (i.e., the target dual variable corresponding to the current accessing user), which was calculated in real time by Flink before the current access time.

[0056] Optionally, after receiving the online access operation sent by the terminal, the server may also query the database for the target attribute information of the current access user based on the user identifier of the current access user carried in the online access operation. Based on this target attribute information, the server may determine the target group to which the current access user belongs, either according to a preset correspondence between the attribute information and groups, or by utilizing a pre-trained group recognition model. Then, based on the target group identifier corresponding to the target group and the target access scenario identifier of the current access user carried in the online access operation, the server searches the database for the group dual variable corresponding to the target group identifier in the target access scenario (i.e., the target dual variable corresponding to the current access user), calculated in real time by Flink before the current access time.

[0057] It can be understood that the group identification can be obtained by encoding the user's group attributes, or by encoding the user's group attributes and access scenarios together. It can be a string composed of numbers and / or symbols, or it can be text or images that can directly represent the group identity, etc. The embodiments of this specification do not limit this.

[0058] Please continue to refer to Figure 2 ,like Figure 2As shown, in the above S201, after obtaining the target dual variable corresponding to the current access user based on the target attribute information of the current access user, the virtual resource allocation method may also include but is not limited to:

[0059] S202 : Allocate a target virtual resource to the current access user based on the target dual variable and target-related parameters of the current access user under at least one virtual resource.

[0060] In some possible embodiments, before allocating a target virtual resource to the current visiting user in S202 based on the target dual variable and the current visiting user's target-related parameters for at least one virtual resource, the virtual resource allocation method may also, but is not limited to, include: utilizing machine learning technology to calculate the current visiting user's target-related parameters for at least one virtual resource based on the current visiting user's target user characteristics, wherein the target user characteristics include at least one of the following: target attribute information, target transaction frequency, historical virtual resource allocation and related parameter information. The target-related parameters may include, but are not limited to, the current visiting user's target redemption rate, target access rate, target transaction volume, etc. for at least one virtual resource. The target redemption rate may be used to characterize the likelihood of the current visiting user using a certain virtual resource after being allocated the virtual resource, or the probability of the current visiting user actually using the virtual resource, i.e., the likelihood that the current visiting user actually used the certain virtual resource after obtaining it before the current visit time. This is not limited in the embodiments of this specification. The above-mentioned target attribute information refers to some basic information of the current visiting user, such as but not limited to age, occupation, etc. The target transaction frequency refers to the frequency of transactions conducted by the current visiting user within a certain period of time. It can reflect the current visiting user's activity level and the degree of demand for certain resources. The above-mentioned historical virtual resource allocation and related parameter information refers to the relevant records of the current visiting user's past acquisition and use of virtual resources. This data helps to predict the possibility of the current visiting user using virtual resources in the future.

[0061] Optionally, after obtaining the target dual variable corresponding to the currently accessing user, the target virtual resource corresponding to the target dual variable can be directly determined from at least one virtual resource that can be allocated to the user in advance according to the pre-set mapping relationship between the dual variable and the virtual resource type, and the target virtual resource can be issued to the current access account on the corresponding terminal of the currently accessing user that is accessing the target application, so as to timely encourage the currently accessing user to use the target virtual resource to conduct online transactions in the target application.

[0062] Optionally, in order to avoid the problem of inaccurate virtual resource allocation caused by allocating the same virtual resources to users in the same group, after obtaining the target dual variable corresponding to the current visiting user, the target dual variable and the target-related parameters of the current visiting user under at least one virtual resource can be directly input into a pre-trained virtual resource allocation model to output the target virtual resource that should be allocated to the current visiting user. In this way, through the target-related parameters of the current visiting user itself under at least one virtual resource, the virtual resource allocation model can perform more accurate and targeted virtual resource allocation for the individual level of a single user at the group level.

[0063] Optionally, the above-mentioned S202, based on the target dual variable and the target-related parameters of the current visiting user under at least one virtual resource, the implementation process of allocating the target virtual resource to the current visiting user may include, but is not limited to: first, based on the target dual variable, the target-related parameters of the current visiting user under at least one virtual resource, the target virtual resource cost, and at least one virtual resource type, searching for the second target value on the decision optimization function corresponding to the dual function to obtain the target virtual resource type; then, allocating the corresponding target virtual resource to the current visiting user according to the target virtual resource type. The above-mentioned target virtual resource type is the virtual resource type of at least one virtual resource type for which the decision optimization function takes the second target value when the current visiting user and the target dual variable are known. The second target value on the decision optimization function corresponding to the above-mentioned dual function corresponds to the first target value on the above-mentioned dual function, that is, when the dual function obtains the first target value, the value of the corresponding decision optimization function is obtained. The above-mentioned second target value may be, but is not limited to, the maximum value or minimum value of the decision optimization function or a preset target value, etc.

[0064] For example, when the first target value is the minimum value on the dual function, the second target value is the maximum value on the decision optimization function corresponding to the dual function, and the target virtual resource type is ,in, Refers to the target-related parameters corresponding to the current access user i when allocating virtual resource j. Refers to the target dual variable corresponding to the current access user, It refers to the target virtual resource cost corresponding to the current access user i when the virtual resource j is allocated, where j is greater than or equal to 1 and less than or equal to the total number of preset virtual resource types.

[0065] In the embodiments of this specification, on the one hand, dynamic decision-making of virtual resources is enabled through Flink's real-time computing. As a high-performance stream processing framework, Flink supports millisecond-level low-latency computing, can process user data of large-scale access users in real time, and quickly generate target dual variables. For example, in the face of sudden high-concurrency user access scenarios, Flink's distributed architecture can quickly expand computing resources, ensure the timeliness of dual function solution, and provide real-time basis for resource allocation; on the other hand, by calling the solver, complex virtual resource allocation problems are converted into linear programming or integer programming problems, and the first objective value of the dual function is accurately solved. The strong robustness of the solver is used to handle high-dimensional constraints, avoiding the limitations of manual decision-making and significantly improving the quality of virtual resource decision-making; at the same time, by simplifying the multi-middleware architecture that the solver relies on in the relevant Cauchy operation solution technology to an architecture that only relies on Flink, the operation solution problem in the virtual resource allocation scenario can be made more stable and efficient; on the other hand, it can be based on the current access The target dual variables corresponding to the user and their target-related parameters are combined to achieve precise virtual resource allocation, forming a "data-decision-feedback" closed loop. For example, if the target-related parameters corresponding to the current visiting user are low, the virtual resource allocation strategy can be dynamically adjusted (such as increasing the coupon denomination or issuing points for high-frequency usage scenarios, etc.) to stimulate the current visiting user to generate transaction behavior and improve the relevant parameters. At the same time, the essence of solving the dual problem is to optimize the virtual resource allocation from a global perspective so that the overall user-related parameters meet the preset conditions, such as but not limited to maximizing the sum of the overall user-related parameters. Therefore, the virtual resource allocation for the current visiting user is performed by combining the user's individual related parameters (target-related parameters) under at least one virtual resource and the target dual variable corresponding to the current visiting user obtained by solving the dual function. This takes into account both group efficiency and individual needs, can avoid excessive concentration or waste of virtual resources, and achieves a balance between global optimization and personalization corresponding to virtual resource allocation, thereby improving virtual resource utilization.

[0066] In summary, the embodiments of this specification not only solve the efficiency problem of large-scale virtual resource allocation and improve the efficiency of virtual resource allocation through the collaboration of Flink real-time computing and solver optimization algorithms, but also dynamically realize the precise allocation of virtual resources through the relevant parameter feedback mechanism of the user individual dimension, improve user transaction rates and virtual resource-related parameters, and achieve a win-win effect of "global optimization-individual adaptation".

[0067] Please refer to the following Figure 3 , which is a schematic diagram of the construction process of a dual function provided by an exemplary embodiment of the present application. Figure 3 As shown, the construction process of the dual function can include but is not limited to the following steps:

[0068] S301: construct an optimization problem based on relevant parameters of a user under at least one virtual resource and a decision variable indicating whether to allocate a virtual resource to the user.

[0069] Specifically, the constraints of the optimization problem include allocating only one type of virtual resource to each user, and ensuring that the total cost of the virtual resources allocated to at least one user does not exceed a preset total cost. The optimization problem is the process of finding a virtual resource allocation strategy that, under these constraints, ensures that user-related parameters meet preset conditions (such as, but not limited to, maximizing or minimizing the sum of user-related parameters). The decision variables are ultimately used to determine which of the at least one virtual resource is allocated to the user. The preset total cost refers to an upper limit on the total cost of virtual resource allocation, set before the optimization problem begins.

[0070] For example, if we want to maximize the sum of user-related parameters, the first objective value is the minimum value on the dual function, and the second objective value is the maximum value on the decision optimization function corresponding to the dual function. The optimization problem can be represented as follows: , whose constraints include: (i=1, 2, ..., C, j=1, 2, ..., R, C refers to the total number of users, R refers to the total number of virtual resources), that is, the decision variable The value of the decision variable is 0 or 1. When the value of is 0, it indicates that virtual resource j is not allocated to user i. When the value of is 1, it indicates that virtual resource j is allocated to user i; (i=1, 2, ..., C), that is, each user i is only allocated one virtual resource j; , which is the total cost of virtual resources allocated to users Not exceeding the preset total cost B.

[0071] In the embodiments of this specification, on the one hand, user behavior can be quantified through relevant parameters, so that virtual resource allocation is closely linked to the actual needs of users, thereby improving the scientific nature of virtual resource allocation decisions; on the other hand, the total cost of virtual resources can be constrained to avoid waste of virtual resources and ensure the economy of virtual resource allocation.

[0072] S302: Based on the constraints of the optimization problem, the optimization problem is transformed into a dual problem to obtain a dual function.

[0073] Specifically, the original optimization problem is transformed into a dual problem. By interchanging the dual variables and constraints and converting the functions and coefficients, the complexity of the solution is simplified to obtain the dual function. The dual function can be, but is not limited to, composed of the dual variables, a preset total cost, relevant parameters of the user under at least one virtual resource, and the virtual resource cost.

[0074] For example, when the first objective value is the minimum value on the dual function and the second objective value is the maximum value on the decision optimization function corresponding to the dual function, the optimization problem can be converted into a standard linear programming format based on the constraints of the optimization problem and solved in the dual space using Lagrange multipliers to obtain: ,in, is the dual variable; assuming , then the dual function corresponding to the transformed dual problem can be obtained as: .

[0075] In the embodiments of this specification, on the one hand, by converting the multi-constraint and multi-variable optimization problem into a single-constraint and single-variable dual problem, it is convenient to use efficient algorithms such as the simplex method and the interior point method to solve the problem, thereby improving the solution efficiency, and can also solve the problem that the original optimization problem is difficult to calculate due to the existence of high-dimensional constraints, provide a low-dimensional and simple alternative solution path, ensure the feasibility of virtual resource allocation, and enhance robustness; on the other hand, by reflecting the shadow price of virtual resource allocation through the dual variable, it is convenient to analyze the impact of changes in virtual resource costs on virtual resource allocation strategies, thereby enhancing decision-making flexibility.

[0076] Please refer to the following Figure 4 , which is a schematic diagram of the implementation flow of an operations solution in a virtual resource allocation scenario provided by an exemplary embodiment of the present application. Figure 4 As shown, the implementation process of the operations research solution in the virtual resource allocation scenario may include but is not limited to the following steps:

[0077] S401: After receiving the historical access operations of historical users, Flink is used to calculate the number of target historical access users belonging to the same group. When the number of target historical access users reaches a threshold, the solver is called to solve the dual function based on the user data of the target historical access users to obtain the group dual variable.

[0078] Specifically, the aforementioned group dual variable is the independent variable that enables the dual function corresponding to the optimization problem within the same group to achieve the first objective value. After receiving historical user access operations, user data can be collected and input into Flink. Flink then dynamically divides users into groups based on user attributes (such as, but not limited to, region, consumption preferences, etc.) or transaction habits (such as high-spending, low-spending, etc.) in real time. Window functions or state management are then used to calculate the number of target historical users in each group in real time. For example, a threshold of 1,000 users is set for the "youth user group." When the group reaches this size, the solver is invoked. The solver uses the group user data as input and constructs a constrained optimization problem with the objective of maximizing the sum of group-related parameters. Through dual transformation, the original optimization problem is transformed into a dual problem. The dual function can be efficiently solved using, but is not limited to, interior point methods or simplex methods to obtain the group dual variable reflecting the marginal value of the virtual resource. For example, if a group is highly sensitive to coupons offering 8 off a 30 yuan discount, the corresponding dual variable value may be significantly greater than that of other virtual resources.

[0079] Understandably, the above Figure 3 The dual function construction process shown can be executed by calling the solver through, but is not limited to, Flink real-time computing. That is, for each access user belonging to the same group within each window obtained by Flink real-time computing, the solver is called to construct the corresponding optimization problem and convert it into the corresponding dual function. This not only splits the multi-constraint optimization problem for the entire application user base into a single-constraint dual problem for each group of users, reducing the complexity of the operational solution during virtual resource allocation and improving efficiency, but also ensures that the number of samples in each solution dimension reaches a sufficient number (threshold) within the same window before the solution is performed, thus solving the problems of sparse samples and long-tail samples and ensuring the accuracy and effectiveness of the solution.

[0080] In the embodiments of this specification, on the one hand, Flink's millisecond-level computing delay can ensure the real-time statistics of the number of group users and avoid the lag in virtual resource allocation, and can also support real-time cluster computing for a large number of users, breaking through the performance bottleneck of traditional batch processing and achieving efficient large-scale processing; on the other hand, the marginal contribution of virtual resources to specific groups is quantified through group dual variables, so that the virtual resource allocation strategy is more in line with the needs of the group and the allocation accuracy is improved; on the other hand, when the group user behavior pattern changes, the corresponding group dual variable will also be updated in real time, which will also drive the dynamic adjustment of the corresponding virtual resource allocation strategy, thereby enhancing the system's adaptability to operational changes.

[0081] It can be understood that the above-mentioned process of invoking the solver through Flink calculation is a real-time process. That is, when the access operation of the current access user is received, Flink will also calculate the number of access users belonging to the same group as the current access user. When the number reaches a threshold, the solver is called to solve the dual function to obtain the current group dual variable corresponding to the current access user. The target dual variable corresponding to the current access user is the historical group dual variable corresponding to the target group obtained by performing a dual solution on the user data of access users belonging to the same target group as the current access user in the access time period (T-1) before the current access time period (T). That is, the group dual variable corresponding to the target group in the previous access time period (T-1). The current group dual variable is the current group dual variable corresponding to the target group obtained by performing a dual solution on the user data of access users belonging to the same target group as the current access user in the current access time period (T). That is, the group dual variable corresponding to the target group in the current access time period (T). After obtaining the current group dual variable, the group dual variable corresponding to the target group can also be updated from the historical group dual variable to the current group dual variable, so as to ensure the timeliness of the group dual variable corresponding to the target group.

[0082] Optionally, after receiving historical access operations from historical users, Flink can first filter the user data of these users to obtain valid user data. The users are then grouped based on the user characteristics in the valid user data to determine the groups to which they belong. Finally, windowing is performed based on the historical access time and the number of target historical users belonging to the same group. When the number of target historical users within the same window reaches a threshold (for example, but not limited to, 5,000 or 10,000), the solver is invoked to solve the dual function based on the user data of the target historical users within the same window, obtaining the group dual variable.

[0083] The above-mentioned filtering process can be to filter out user data whose data format does not conform to the Flink computing specification, or to filter out user data in access scenarios where virtual resource allocation is not required, or to filter out user data in specific access scenarios where virtual resource allocation is required, and the embodiments of this specification do not limit this. The above-mentioned specific access scenarios can be, but are not limited to, access scenarios where virtual resource allocation needs to be enabled within the time period corresponding to the user access time, that is, different access scenarios may correspond to different time periods for enabling virtual resource allocation, that is, different access times may correspond to different specific access scenarios that need to be filtered, and the specific settings can be made according to actual needs, and the embodiments of this specification do not limit this.

[0084] When Flink performs windowing, the same window needs to be constrained on both time and sample quantity (the number of target historical visiting users belonging to the same group). For example, but not limited to, the solver will be called only when the number reaches a threshold and the maximum access time interval of visiting users within the threshold is less than or equal to the preset duration (for example, but not limited to 1 minute, 3 minutes, 30 seconds, etc.). In this way, the sample quantity constraint within the same window can be used to solve the problems of sample sparsity and long-tail samples, ensuring the accuracy and effectiveness of the solution. The time constraint within the same window can also avoid the problem of the time span of the same window data being too long, which will reduce the data validity and lead to a decrease in the accuracy of the target dual variable used in the subsequent resource allocation for the current visiting user, ensuring the timeliness of the solution.

[0085] Furthermore, the valid user data above represents the user data of historical users under specific access scenarios. Different specific access scenarios require different virtual resource structures to be allocated to users (for example, coupons may be allocated to users in the homepage access scenario, while points may be allocated to users in the product detail page access scenario; or coupons that qualify for discounts after spending 30 yuan in the homepage access scenario, while coupons that qualify for discounts after spending 15 yuan in the product detail page access scenario, etc.). This also results in different solvers being invoked through Flink calculations when solving the dual function. After the solution is complete, the group dual variable can be directly associated and stored with the group identifier and specific access scenario identifier corresponding to the target historical user.

[0086] Alternatively, as Figure 5 As shown, the implementation process of calling the solver in S401 to solve the dual function based on the user data of the target historical access user to obtain the group dual variable may include but is not limited to:

[0087] S501: Initialize the dual variables in the dual function to obtain an initial dual variable group.

[0088] Specifically, the initial dual variable group includes multiple initial dual variables within the target range. The target range is the value range of the dual variables calculated based on the actual situation. The multiple initial dual variables can be, but are not limited to, multiple values ​​within the target range that include the upper and lower limits of the target range. For example, but not limited to, when the target range is greater than or equal to 0 and less than or equal to 10, the initial dual variable group [ ]_0_0=[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0].

[0089] In the embodiments of this specification, before performing the dual solution, the starting point of the dual variable is brought close to the target solution through reasonable initialization, which not only reduces the number of iterations and accelerates convergence, but also avoids oscillation or divergence caused by initial value deviation, improves the robustness of the algorithm, and enhances stability.

[0090] S502 : Construct a three-dimensional matrix corresponding to the dual function based on user data of a target historical access user, a virtual resource cost of the target historical access user under at least one virtual resource, and a dual variable corresponding to the dual function.

[0091] Specifically, the solver constructs a three-dimensional tensor based on user characteristics, virtual resource attributes (such as virtual resource-related parameters and virtual resource costs), and dual variable values, generating a corresponding three-dimensional matrix. For example, a third-order tensor consisting of user-virtual resource-dual variable has an element value equal to the user's parameters for the virtual resource minus the dual variable weight multiplied by the virtual resource cost. This multidimensional association modeling explicitly expresses the interactive relationship between users, virtual resources, and dual variables, avoiding information loss while providing a standardized data container for subsequent dimensionality reduction, improving computational efficiency.

[0092] It is understandable that the above S501 and S502 can be executed successively or simultaneously, and the embodiments of this specification do not limit this.

[0093] S503 , performing dimensionality reduction processing on the user dimension and the virtual resource dimension in the three-dimensional matrix to obtain a target dual function containing only the dual variable dimension.

[0094] Optionally, principal component analysis can be used, but is not limited to, to perform linear dimensionality reduction on the three-dimensional matrix, calculate the eigenvalues ​​of the covariance matrix, select the principal components with a cumulative contribution rate exceeding 95%, project the three-dimensional data into a low-dimensional space, and generate an objective function containing only dual variables, thereby reducing the complexity of the solution and significantly improving the solution speed, while eliminating redundant information interference, highlighting key decision variables, and enhancing the robustness of the solution.

[0095] Optionally, it is also possible but not limited to first reducing the dimension of the virtual resource in the three-dimensional matrix by taking the maximum value operation to obtain a two-dimensional matrix corresponding to the dual function; then, reducing the user dimension in the two-dimensional matrix corresponding to the dual function by taking the average value operation or the median operation to obtain a target dual function that only contains the dual variable dimension.

[0096] S504 , performing a cyclic search on the first target value on the target dual function based on the initial dual variable group to obtain a group dual variable.

[0097] Specifically, after obtaining the target dual function containing only the dual variable dimension, a cyclic search optimization method can be used, but is not limited to, using the coordinate rotation method, starting with the initial dual variable group. Each iteration, the other variables are fixed, and a one-dimensional search is performed along a single dual variable dimension (such as, but not limited to, the golden section method). After updating the value of this dimension, the target dual function value is recalculated until the convergence condition is met. This global cyclic search of the target dual function within the target range avoids local problems and ensures that the found group dual variable, after being substituted into the target dual function, is the global first target value.

[0098] Optionally, the above-mentioned S504, the implementation process of performing a cyclic search for the first objective value on the target dual function based on the initial dual variable group to obtain the group dual variable may include, but is not limited to: first, searching the first objective value on the target dual function based on the initial dual variable group to obtain the target initial dual variable, where the above-mentioned target initial dual variable is the initial dual variable in the initial dual variable group that corresponds to the target dual function and takes the first objective value; then, updating the initial dual variable group based on the target initial dual variable, and performing the step of searching the first objective value on the target dual function based on the initial dual variable group to obtain the target initial dual variable again, until the search depth corresponding to the target dual function reaches a preset search depth (for example, but not limited to 1 or 2), or the accuracy corresponding to the target initial dual variable reaches a preset accuracy, or the value of the target initial dual variable no longer changes within the preset search depth, then terminating the cyclic search for the first objective value of the target dual function, and returning the target initial dual variable obtained in the last round of cyclic search as the group dual variable.

[0099] Furthermore, the implementation process of updating the initial dual variable group based on the target initial dual variable may include, but is not limited to: first, uniformly inserting multiple new initial dual variable values ​​within a preset range before and after the target initial dual variable; then, updating the initial dual variable group to a dual variable group consisting of the target initial dual variable and multiple new initial dual variable values, or merging multiple new initial dual variable values ​​into the initial dual variable group.

[0100] For example, if the target initial dual variable obtained in the first round of search is L, multiple new initial dual variable values ​​can be inserted before and after the target initial dual variable L: [L*0.9,L*0.91,L*0.92,L*0.93,L*0.94,

[0101] ,0.9,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0]. Then, the initial dual variable group [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0] can be directly updated to the dual variable group consisting of the target initial dual variable and multiple new initial dual variable values.

[0102] In some possible embodiments, after searching for the first objective value on the target dual function based on the initial dual variable group to obtain the target initial dual variable, if the target initial dual variable is equal to the boundary value of the target range, it means that the solution is abnormal, and the cyclic search for the first objective value of the target dual function is interrupted, and a failure alarm message is issued.

[0103] Please continue to refer to Figure 4 ,like Figure 4 As shown, in the above S401, after receiving the historical access operations of the historical access users, Flink is used to calculate the number of target historical access users belonging to the same group. When the number of target historical access users reaches a threshold, the solver is called to solve the dual function based on the user data of the target historical access users. After obtaining the group dual variable, the implementation process of the operations solution in the virtual resource allocation scenario may also include, but is not limited to:

[0104] S402: Associate and store the group dual variable with the group identifier corresponding to the target historical visiting user.

[0105] Specifically, the aforementioned group identifier is a unique identifier used to distinguish different groups. It can be, but is not limited to, a user's identity, user group, membership level, or user location. The group identifier can be used to identify and distinguish which specific group each user belongs to. After obtaining the group dual variable, it can be associated with the group identifier corresponding to the target historical user and stored in a database or other data storage system. This allows subsequent users belonging to the same group as the target historical user to quickly retrieve and utilize this information to support virtual resource allocation decisions.

[0106] Optionally, after receiving the user's access operation, the number of target access users belonging to the same group in each access scenario can also be calculated separately through Flink. When the number of target access users in each access scenario reaches a threshold, different solvers are called to solve the dual function based on the user data of the target access users in different access scenarios, thereby obtaining group dual variables in different access scenarios. The group dual variable is then associated with the corresponding access scenario identifier and the group identifier corresponding to the target access user in the access scenario and stored in a database or other data storage system, so that subsequent users belonging to the same group and access scenario as the target access user can achieve more accurate and efficient virtual resource allocation based on their group and access scenario when making access, thereby improving the granularity of virtual resource allocation.

[0107] In some possible embodiments, the overall implementation process of a virtual resource allocation method provided by an exemplary embodiment of the present application may include, but is not limited to: after receiving a user's access operation, the user data of the accessing user may be filtered through Flink real-time calculation to obtain valid user data, and then the accessing users may be grouped according to the user characteristics in the valid user data to obtain the group to which the accessing users belong, and finally windowed according to the access time and the number of target access users belonging to the same group. When the number of target access users in the same window reaches a threshold, the solver is called to solve the dual function based on the user data of the target access users to obtain the group dual variable. The above solution process is the same as the above Figure 5 The solving process is similar and will not be described here in detail. Finally, the solved population dual variable is output as a result and stored in association with the corresponding population identifier.

[0108] When an access operation of the current visiting user is received, the target dual variable corresponding to the current visiting user can be directly obtained based on the target attribute information of the current visiting user and the pre-stored group dual variable, and the target virtual resource can be allocated to the current visiting user based on the above target dual variable and the target-related parameters of the current visiting user under at least one virtual resource.

[0109] In some possible embodiments, when the current accessing user accesses the target application through the terminal, the terminal can obtain the target virtual resources allocated to the current accessing user according to the virtual resource allocation method in the above embodiment, such as but not limited to receiving the target virtual resources allocated to the current accessing user by the above virtual resource allocation method sent by the server corresponding to the target application; after obtaining the target virtual resources allocated to the current accessing user, the terminal can directly display the target virtual resources in the current access page corresponding to the target application, so that the target user can check and use the target virtual resources in a timely manner.

[0110] In order to better understand the virtual resource allocation method provided in the above embodiments of the present application, Figure 6 The following is a schematic diagram showing the structure of a virtual resource allocation device provided in an embodiment of the present application. Figure 6 As shown, the virtual resource allocation device 600 includes:

[0111] Acquisition module 610 is configured to acquire a target dual variable corresponding to the current visiting user based on the target attribute information of the current visiting user. The target dual variable is the independent variable that enables the dual function corresponding to the optimization problem to obtain the first target value. The optimization problem is used to determine the virtual resources allocated to the user. The target dual variable is obtained by solving the dual function by invoking a Flink solver based on the user data of historical visiting users. The user data includes the user characteristics of the historical visiting users and the relevant parameters of the historical visiting users under at least one virtual resource.

[0112] The virtual resource allocation module 620 is configured to allocate target virtual resources to the current visiting user based on the target dual variable corresponding to the current visiting user and target-related parameters of the current visiting user under at least one virtual resource.

[0113] In a possible implementation, the virtual resource allocation apparatus 600 further includes:

[0114] The Flink calculation module is used to calculate the number of historical access users belonging to the same group after receiving the historical access operations of the historical access users through Flink;

[0115] a dual solving module configured to, when the number of the target historically accessed users reaches a threshold, call a solver to solve the dual function based on the user data of the target historically accessed users to obtain a group dual variable; the group dual variable is an independent variable that enables the dual function corresponding to the optimization problem for the same group to obtain the first objective value;

[0116] The storage module is used to associate and store the above-mentioned group dual variable with the group identifier corresponding to the above-mentioned target historical visiting user.

[0117] In one possible implementation, the Flink computing module is specifically configured to: after receiving the historical access operations of historical users, first filter the user data of the historical users through Flink computing to obtain valid user data; then group the historical users according to the user features in the valid user data to obtain the groups to which the historical users belong; and finally perform window processing based on the historical access time and the number of target historical users belonging to the same group.

[0118] In one possible implementation, the valid user data is used to represent the user data of the historical access users in a specific access scenario. Different specific access scenarios result in different virtual resource structures allocated to users, and different solvers are invoked through Flink calculations when solving the dual function.

[0119] The storage module is specifically used to associate and store the group dual variable with the group identifier and the specific access scenario identifier corresponding to the target historical access user.

[0120] In one possible implementation, the dual solution module includes:

[0121] an initialization unit, configured to initialize the dual variables in the dual function to obtain an initial dual variable group; the initial dual variable group includes a plurality of initial dual variables within a target range;

[0122] a matrix construction unit, configured to construct a three-dimensional matrix corresponding to the dual function based on the user data of the target historical access user, the virtual resource cost of the target historical access user under at least one virtual resource, and the dual variable corresponding to the dual function;

[0123] A dimensionality reduction processing unit, configured to perform dimensionality reduction processing on the user dimension and the virtual resource dimension in the three-dimensional matrix to obtain a target dual function containing only the dual variable dimension;

[0124] A cyclic search unit is used to perform a cyclic search on the first target value on the target dual function based on the initial dual variable group to obtain a group dual variable.

[0125] In one possible implementation, the dimensionality reduction processing unit is specifically used to: perform dimensionality reduction processing on the virtual resource dimension in the three-dimensional matrix by taking the maximum value operation to obtain the two-dimensional matrix corresponding to the dual function; perform dimensionality reduction processing on the user dimension in the two-dimensional matrix corresponding to the dual function by taking the average value operation or the median operation to obtain the target dual function that only contains the dual variable dimension.

[0126] In a possible implementation, the cyclic search unit includes:

[0127] A search subunit is configured to search for a first objective value on the target dual function based on the initial dual variable group to obtain a target initial dual variable; the target initial dual variable is an initial dual variable in the initial dual variable group that corresponds to the target dual function and takes the first objective value;

[0128] An updating subunit, configured to update the initial dual variable group based on the target initial dual variable;

[0129] The execution subunit is used to re-execute the above-mentioned step of searching the first target value on the above-mentioned target dual function based on the above-mentioned initial dual variable group to obtain the target initial dual variable, until the search depth corresponding to the above-mentioned target dual function reaches a preset search depth or the accuracy corresponding to the above-mentioned target initial dual variable reaches a preset accuracy or the value of the above-mentioned target initial dual variable within the above-mentioned preset search depth no longer changes, then end the cyclic search for the first target value of the above-mentioned target dual function, and return the target initial dual variable obtained from the last round of cyclic search as the group dual variable.

[0130] In one possible implementation, the update subunit is specifically used to: uniformly insert multiple new initial dual variable values ​​within a preset range before and after the target initial dual variable; update the initial dual variable group to a dual variable group consisting of the target initial dual variable and the multiple new initial dual variable values, or merge the multiple new initial dual variable values ​​into the initial dual variable group.

[0131] In a possible implementation, the virtual resource allocation apparatus 600 further includes:

[0132] The search interruption module is used to interrupt the cyclic search for the first target value of the target dual function and issue a failure alarm message if the target initial dual variable is equal to the boundary value of the target range.

[0133] In a possible implementation, the virtual resource allocation apparatus 600 further includes:

[0134] a problem construction module, configured to construct the optimization problem based on parameters related to the user under at least one virtual resource and a decision variable indicating whether to allocate a virtual resource to the user; the optimization problem includes constraints that each user is allocated only one virtual resource and that the total cost of the virtual resources allocated to at least one user does not exceed a preset total cost;

[0135] The problem conversion module is used to convert the above optimization problem into a dual problem based on the constraints of the above optimization problem to obtain the above dual function.

[0136] In a possible implementation, the virtual resource allocation module 620 includes:

[0137] A second target value search unit is configured to search for a second target value on the decision optimization function corresponding to the dual function based on the target dual variable, the target-related parameters and target virtual resource cost of the current access user under at least one virtual resource, and at least one virtual resource type, to obtain a target virtual resource type; the target virtual resource type is a virtual resource type in the at least one virtual resource type that corresponds to the second target value of the decision optimization function when the current access user and the target dual variable are known;

[0138] The resource allocation unit is configured to allocate corresponding target virtual resources to the current access user according to the target virtual resource type.

[0139] In a possible implementation, the acquisition module 610 includes:

[0140] A determination unit, configured to determine the target group to which the current access user belongs based on the target attribute information of the current access user;

[0141] The acquiring unit is configured to acquire the target dual variable corresponding to the current visiting user based on the target group identifier corresponding to the target group and the target access scenario identifier corresponding to the current visiting user.

[0142] In a possible implementation, the virtual resource allocation apparatus 600 further includes:

[0143] The relevant parameter calculation module is used to use machine learning technology to calculate the target relevant parameters of the above-mentioned current visiting user under at least one virtual resource based on the target user characteristics of the above-mentioned current visiting user; the above-mentioned target user characteristics include at least one of the following: target attribute information, target transaction frequency, historical virtual resource allocation and related parameter information.

[0144] The division of the modules in the above-mentioned virtual resource allocation device is for illustration only. In other embodiments, the virtual resource allocation device can be divided into different modules as needed to complete all or part of the functions of the above-mentioned virtual resource allocation device. The implementation of each module in the virtual resource allocation device provided in the embodiments of the present application can be in the form of a computer program. The computer program can be executed on a terminal or server. The program modules comprising the computer program can be stored in the memory of the terminal or server. When the computer program is executed by a processor, it implements all or part of the steps of the virtual resource allocation method described in the embodiments of the present application.

[0145] See next Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. Figure 7As shown, the electronic device 700 may include: at least one processor 710 , at least one network interface 720 , a user interface 730 , a memory 740 , and at least one communication bus 750 .

[0146] The communication bus 750 may be used to implement connection and communication among the above-mentioned components.

[0147] The user interface 730 may include a display and a camera. Optional user interfaces may also include standard wired interfaces and wireless interfaces.

[0148] The network interface 720 may optionally include a Bluetooth module, a Near Field Communication (NFC) module, a Wireless Fidelity (Wi-Fi) module, and the like.

[0149] The processor 710 may include one or more processing cores. The processor 710 utilizes various interfaces and circuits to connect various components within the electronic device 700. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 740 and accessing data stored in the memory 740, the processor 710 performs various functions and processes data within the routing electronic device 700. Optionally, the processor 710 may be implemented in hardware using at least one of a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 710 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the display; and the modem handles wireless communications. It is understood that the modem may also be implemented independently of the processor 710 and implemented on a separate chip.

[0150] Among them, the memory 740 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 740 includes a non-transitory computer-readable medium. The memory 740 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 740 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as an acquisition function, a virtual resource allocation function, a dual solution function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 740 may also be optionally at least one storage device located away from the aforementioned processor 710. As Figure 7 As shown, the memory 740 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program.

[0151] In some possible embodiments, the electronic device 700 is the aforementioned Figure 6 Regarding the virtual resource allocation device 600 mentioned in the embodiment, the processor 710 can be used to call the virtual resource allocation application stored in the memory 740, and specifically perform the following operations: based on the target attribute information of the current visiting user, obtain the target dual variable corresponding to the above-mentioned current visiting user; the above-mentioned target dual variable is the independent variable that enables the dual function corresponding to the optimization problem to obtain the first target value; the above-mentioned optimization problem is used to decide the virtual resources allocated to the user; the above-mentioned target dual variable is based on the user data of the historical visiting user, and is obtained by solving the above-mentioned dual function by calling the solver through Flink calculation; the above-mentioned user data includes the user characteristics of the above-mentioned historical visiting users and the relevant parameters of the above-mentioned historical visiting users under at least one virtual resource; based on the above-mentioned target dual variable, and the target-related parameters of the above-mentioned current visiting user under at least one virtual resource, allocate the target virtual resource to the above-mentioned current visiting user.

[0152] In some possible embodiments, the processor 710 is further configured to execute: after receiving the historical access operations of the historical access users, calculate the number of target historical access users belonging to the same group through Flink; when the number of the target historical access users reaches a threshold, call the solver to solve the dual function based on the user data of the target historical access users to obtain a group dual variable; the group dual variable is an independent variable that enables the dual function corresponding to the optimization problem under the same group to obtain the first target value; and associate the group dual variable with the group identifier corresponding to the target historical access user and store it.

[0153] In some possible embodiments, after the processor 710 executes the above-mentioned historical access operation received from the historical access user, when calculating the number of target historical access users belonging to the same group through Flink, it is specifically used to perform: after receiving the historical access operation of the historical access user, first filter the user data of the historical access user through Flink calculation to obtain valid user data, then group the historical access users according to the user characteristics in the valid user data to obtain the group to which the historical access users belong, and finally perform window processing according to the historical access time and the number of target historical access users belonging to the same group.

[0154] In some possible embodiments, the valid user data is used to represent the user data of the historical access users in a specific access scenario. Different specific access scenarios result in different virtual resource structures allocated to users, and different solvers are called by Flink calculations when solving the dual function.

[0155] When the processor 710 executes the above-mentioned associating and storing the group dual variable with the group identifier corresponding to the target historical visiting user, it is specifically used to execute: associating and storing the group dual variable with the group identifier and specific access scenario identifier corresponding to the target historical visiting user.

[0156] In some possible embodiments, when the processor 710 executes the call solver to solve the dual function based on the user data of the target historical visiting user and obtains the group dual variable, it is specifically used to perform: initializing the dual variables in the dual function to obtain an initial dual variable group; the initial dual variable group includes multiple initial dual variables within the target range; constructing a three-dimensional matrix corresponding to the dual function based on the user data of the target historical visiting user, the virtual resource cost of the target historical visiting user under at least one virtual resource, and the dual variables corresponding to the dual function; performing dimensionality reduction processing on the user dimension and the virtual resource dimension in the three-dimensional matrix to obtain a target dual function containing only the dual variable dimension; performing a cyclic search on the first target value on the target dual function based on the initial dual variable group to obtain the group dual variable.

[0157] In some possible embodiments, when the processor 710 performs the dimensionality reduction processing on the user dimension and the virtual resource dimension in the three-dimensional matrix to obtain the target dual function containing only the dual variable dimension, it is specifically used to perform: dimensionality reduction processing on the virtual resource dimension in the three-dimensional matrix by taking the maximum value operation to obtain the two-dimensional matrix corresponding to the dual function; and dimensionality reduction processing on the user dimension in the two-dimensional matrix corresponding to the dual function by taking the average value operation or the median operation to obtain the target dual function containing only the dual variable dimension.

[0158] In some possible embodiments, when the processor 710 executes the cyclic search for the first objective value on the objective dual function based on the initial dual variable group to obtain the group dual variable, it is specifically configured to execute: searching the first objective value on the objective dual function based on the initial dual variable group to obtain the target initial dual variable; the target initial dual variable is the initial dual variable in the initial dual variable group that corresponds to the first objective value of the objective dual function; updating the initial dual variable group based on the target initial dual variable, and again executing the step of searching the first objective value on the objective dual function based on the initial dual variable group to obtain the target initial dual variable, until the search depth corresponding to the objective dual function reaches a preset search depth or the accuracy corresponding to the target initial dual variable reaches a preset accuracy or the value of the target initial dual variable no longer changes within the preset search depth, then terminating the cyclic search for the first objective value of the objective dual function, and returning the target initial dual variable obtained from the last round of cyclic search as the group dual variable.

[0159] In some possible embodiments, when the processor 710 executes the updating of the initial dual variable group based on the target initial dual variable, it is specifically configured to: uniformly insert a plurality of new initial dual variable values ​​within a preset range before and after the target initial dual variable; update the initial dual variable group to a dual variable group consisting of the target initial dual variable and the plurality of new initial dual variable values, or merge the plurality of new initial dual variable values ​​into the initial dual variable group.

[0160] In some possible embodiments, the processor 710 executes the search for the first target value on the target dual function based on the initial dual variable group, and after obtaining the target initial dual variable, is further used to execute: if the target initial dual variable is equal to the boundary value of the target range, then the cyclic search for the first target value of the target dual function is interrupted, and a failure alarm message is issued.

[0161] In some possible embodiments, the processor 710 is further configured to execute: constructing the optimization problem based on relevant parameters of the user under at least one virtual resource and a decision variable indicating whether to allocate a virtual resource to the user; the constraints of the optimization problem include that each user is allocated only one virtual resource, and that the total cost of the virtual resources allocated to at least one user does not exceed a preset total cost; based on the constraints of the optimization problem, converting the optimization problem into a dual problem to obtain a dual function.

[0162] In some possible embodiments, when the processor 710 executes the allocation of the target virtual resource to the current access user based on the target dual variable and the target-related parameter of the current access user under at least one virtual resource, it is specifically configured to execute:

[0163] Based on the above-mentioned target dual variable, the target-related parameters and target virtual resource cost of the above-mentioned current visiting user under at least one virtual resource, and at least one virtual resource type, the second target value on the decision optimization function corresponding to the above-mentioned dual function is searched to obtain the target virtual resource type; the above-mentioned target virtual resource type is the virtual resource type corresponding to the second target value of the above-mentioned decision optimization function in the above-mentioned at least one virtual resource type when the above-mentioned current visiting user and the above-mentioned target dual variable are known; the corresponding target virtual resource is allocated to the above-mentioned current visiting user according to the above-mentioned target virtual resource type.

[0164] In some possible embodiments, when the processor 710 executes the step of obtaining the target dual variable corresponding to the current access user based on the target attribute information of the current access user, the processor 710 is specifically configured to execute:

[0165] The target group to which the current visiting user belongs is determined based on the target attribute information of the current visiting user; and the target dual variable corresponding to the current visiting user is obtained based on the target group identifier corresponding to the target group and the target access scenario identifier corresponding to the current visiting user.

[0166] In some possible embodiments, before executing the allocation of the target virtual resource to the current access user based on the target dual variable and the target-related parameter of the current access user under at least one virtual resource, the processor 710 is further configured to execute:

[0167] Using machine learning technology, the target-related parameters of the current visiting user under at least one virtual resource are calculated based on the target user characteristics of the current visiting user; the target user characteristics include at least one of the following: target attribute information, target transaction frequency, historical virtual resource allocation and related parameter information.

[0168] The present application also provides a computer-readable storage medium having instructions stored therein that, when executed on a computer or processor, cause the computer or processor to perform one or more steps of the above-described embodiments. If the various component modules of an electronic device are implemented as software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium.

[0169] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a Digital Versatile Disc (DVD)), or a semiconductor medium (eg, a Solid State Disk (SSD)).

[0170] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When executed, the program can include the processes of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. The technical features of this embodiment and the implementation scheme can be combined in any manner unless they conflict.

[0171] The embodiments described above are merely descriptions of preferred embodiments of the present application and do not limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements made to the technical solutions of the present application by ordinary technicians in this field should fall within the scope of protection determined by the claims.

[0172] The foregoing description describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

Claims

1. A virtual resource allocation method, characterized in that: The method comprises: The target dual variable corresponding to the current visiting user is obtained based on the target attribute information of the current visiting user; the target dual variable is the independent variable that enables the dual function corresponding to the optimization problem to obtain the first target value; the optimization problem is used to decide the virtual resources allocated to the user; the target dual variable is based on the user data of historical visiting users, and when the number of historical visiting users belonging to the same group as the current visiting user calculated by Flink reaches a threshold, the solver is called to solve the dual function; the user data includes the user characteristics of the historical visiting users and the relevant parameters of the historical visiting users under at least one virtual resource; A target virtual resource is allocated to the current visiting user based on the target dual variable and a target-related parameter of the current visiting user under at least one virtual resource.

2. The method according to claim 1, wherein The method further comprises: After receiving the historical access operations of historical users, Flink is used to calculate the number of target historical access users belonging to the same group. When the number of target historical access users reaches a threshold, the solver is called to solve the dual function based on the user data of the target historical access users to obtain the group dual variable. The group dual variable is the independent variable that enables the dual function corresponding to the optimization problem under the same group to obtain the first objective value. The group dual variable is associated with the group identifier corresponding to the target historical visiting user and stored.

3. The method according to claim 2, wherein After receiving the historical access operations of the historical access users, the number of target historical access users belonging to the same group is calculated through Flink, including: After receiving the historical access operations of historical users, Flink calculations are used to filter the user data of the historical users to obtain valid user data. Then, the historical users are grouped according to the user characteristics in the valid user data to obtain the groups to which the historical users belong. Finally, window processing is performed based on the historical access time and the number of target historical users belonging to the same group.

4. The method according to claim 3, wherein The valid user data is used to represent the user data of the historical access users in a specific access scenario. Different specific access scenarios result in different virtual resource structures allocated to users, and different solvers are called through Flink calculations when solving the dual function. The storing of associating the group dual variable with the group identifier corresponding to the target historical visiting user includes: The group dual variable is associated with the group identifier and the specific access scenario identifier corresponding to the target historical access user and stored.

5. The method according to claim 2, wherein The calling solver solves the dual function based on the user data of the target historical access user to obtain a group dual variable, including: Initializing the dual variables in the dual function to obtain an initial dual variable group; the initial dual variable group includes a plurality of initial dual variables within a target range; Constructing a three-dimensional matrix corresponding to the dual function based on the user data of the target historical visiting user, the virtual resource cost of the target historical visiting user under at least one virtual resource, and the dual variable corresponding to the dual function; Performing dimensionality reduction processing on the user dimension and the virtual resource dimension in the three-dimensional matrix to obtain a target dual function containing only the dual variable dimension; A cyclic search is performed on the first objective value on the objective dual function based on the initial dual variable group to obtain a group dual variable.

6. The method according to claim 5, wherein The dimensionality reduction process is performed on the user dimension and the virtual resource dimension in the three-dimensional matrix to obtain a target dual function containing only the dual variable dimension, including: Performing dimensionality reduction processing on the virtual resource dimension in the three-dimensional matrix by taking the maximum value operation to obtain a two-dimensional matrix corresponding to the dual function; The user dimension in the two-dimensional matrix corresponding to the dual function is reduced in dimension by taking an average operation or a median operation to obtain a target dual function containing only the dual variable dimension.

7. The method according to claim 5, wherein The step of performing a cyclic search on the first target value on the target dual function based on the initial dual variable group to obtain a group dual variable includes: Searching for a first objective value on the target dual function based on the initial dual variable group to obtain a target initial dual variable; the target initial dual variable is an initial dual variable in the initial dual variable group that takes the first objective value corresponding to the target dual function; The initial dual variable group is updated based on the target initial dual variable, and the step of searching the first target value on the target dual function based on the initial dual variable group to obtain the target initial dual variable is performed again, until the search depth corresponding to the target dual function reaches a preset search depth or the accuracy corresponding to the target initial dual variable reaches a preset accuracy or the value of the target initial dual variable within the preset search depth no longer changes, then the cyclic search for the first target value of the target dual function is terminated, and the target initial dual variable obtained from the last round of cyclic search is returned as the group dual variable.

8. The method according to claim 7, wherein The updating of the initial dual variable group based on the target initial dual variable includes: Evenly inserting multiple new initial dual variable values ​​within a preset range before and after the target initial dual variable; The initial dual variable group is updated to a dual variable group consisting of the target initial dual variable and the multiple new initial dual variable values, or the multiple new initial dual variable values ​​are merged into the initial dual variable group.

9. The method according to claim 7, wherein After searching for the first target value on the target dual function based on the initial dual variable group to obtain the target initial dual variable, the method further includes: If the target initial dual variable is equal to the boundary value of the target range, the cyclic search for the first target value of the target dual function is interrupted and a failure warning message is issued.

10. The method according to any one of claims 1 to 9, wherein The method further comprises: The optimization problem is constructed based on relevant parameters of the user under at least one virtual resource and a decision variable indicating whether to allocate a virtual resource to the user; the constraints of the optimization problem include that each user is allocated only one virtual resource and that the total cost of the virtual resources allocated to at least one user does not exceed a preset total cost; Based on the constraints of the optimization problem, the optimization problem is transformed into a dual problem to obtain the dual function.

11. The method according to claim 1, wherein The allocating a target virtual resource to the current visiting user based on the target dual variable and the target-related parameter of the current visiting user under at least one virtual resource includes: Based on the target dual variable, the target-related parameters and target virtual resource cost of the current access user under at least one virtual resource, and at least one virtual resource type, a search is performed for a second target value on the decision optimization function corresponding to the dual function to obtain a target virtual resource type; the target virtual resource type is a virtual resource type in the at least one virtual resource type that corresponds to the second target value of the decision optimization function when the current access user and the target dual variable are known; The corresponding target virtual resource is allocated to the current access user according to the type of the target virtual resource.

12. The method according to claim 1, wherein The step of obtaining a target dual variable corresponding to the current visiting user based on the target attribute information of the current visiting user includes: Determining the target group to which the current visiting user belongs based on the target attribute information of the current visiting user; The target dual variable corresponding to the current visiting user is obtained based on the target group identifier corresponding to the target group and the target access scenario identifier corresponding to the current visiting user.

13. The method according to claim 1, wherein Before allocating a target virtual resource to the current visiting user based on the target dual variable and the target-related parameter of the current visiting user under at least one virtual resource, the method further includes: Using machine learning technology, the target-related parameters of the current visiting user under at least one virtual resource are calculated based on the target user characteristics of the current visiting user; the target user characteristics include at least one of the following: target attribute information, target transaction frequency, historical virtual resource allocation and related parameter information.

14. A virtual resource allocation method, characterized in that: The method comprises: Acquire the target virtual resource allocated to the current access user according to the virtual resource allocation method according to any one of claims 1 to 13; The target virtual resource is displayed.

15. A virtual resource allocation device, characterized in that: The virtual resource allocation device includes: An acquisition module is configured to acquire a target dual variable corresponding to the current visiting user based on the target attribute information of the current visiting user; the target dual variable is an independent variable that enables the dual function corresponding to the optimization problem to obtain a first target value; the optimization problem is used to determine the virtual resources allocated to the user; the target dual variable is based on the user data of historical visiting users, and when the number of historical visiting users belonging to the same group as the current visiting user calculated by Flink reaches a threshold, a solver is called to solve the dual function; the user data includes the user characteristics of the historical visiting users and the relevant parameters of the historical visiting users under at least one virtual resource; The virtual resource allocation module is configured to allocate target virtual resources to the current visiting user based on the target dual variable corresponding to the current visiting user and target-related parameters of the current visiting user under at least one virtual resource.

16. An electronic device, characterized in that: include: processor and memory; The processor is connected to the memory; The memory is used to store executable program code; The processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, so as to execute the method steps according to any one of claims 1 to 14.

17. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 14 .

Citation Information

Patent Citations

  • Resource optimal configuration method, device and equipment

    CN114580212A

  • Virtual resource distribution method and device

    CN117314030A