Virtual resource allocation method and device, equipment and storage medium

Through the collaboration between Flink real-time computing and solver optimization algorithm, virtual resources are dynamically allocated, which solves the problem of inefficiency of traditional methods in complex market environments, and efficient and accurate virtual resource allocation is achieved, improving user transaction rate and resource utilization rate.

CN120235431AActive Publication Date: 2025-07-01RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When traditional online operation solution methods deal with complex and changing market environments and user needs, the linear planning model seems to be ineffective in multi-constraint processing, resulting in complex and inefficient solution.

Method used

Through the collaboration between Flink real-time calculation and solver optimization algorithm, virtual resources are dynamically allocated, and accurate allocation is achieved using the relevant parameter feedback mechanism of the user's individual dimensions, forming a win-win effect of "global optimization-individual adaptation".

Benefits of technology

It improves the efficiency and accuracy of virtual resource allocation, improves user transaction rate and virtual resource related parameters, realizes a balance between global optimization and personalization, and improves the utilization rate of virtual resource.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235431A_ABST
    Figure CN120235431A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a virtual resource allocation method and device, equipment and a storage medium. The method comprises the steps that a target dual variable, corresponding to a current access user, for enabling a dual function corresponding to an optimization problem to obtain a first target value is obtained based on target attribute information of the current access user, and the optimization problem is used for deciding virtual resources allocated to the user; the target dual variable is obtained by solving a dual function through a Flink calculation calling solver on the basis of user data of historical access users; and allocating target virtual resources to the current access user based on the target dual variable and the target related parameters of the current access user under the at least one virtual resource, so that the virtual resource allocation efficiency is improved through cooperation of Flink real-time calculation and a solver optimization algorithm; and accurate distribution is dynamically realized through a user individual dimension related parameter feedback mechanism, the user transaction rate and related parameters are improved, and a win-win effect of global optimization-individual adaptation is formed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, 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 the focus of enterprises. The traditional online operation research solution mainly uses a linear programming model to achieve online allocation of rights and interests by using the dual solution asynchronously. However, in the actual application process, this method gradually exposes a series of problems. Especially in the face of a complex and changeable market environment and user needs, the linear programming model is unable to handle multiple constraint conditions, resulting in a complex and inefficient solution process. Summary of the Invention

[0003] Embodiments of this application provide a virtual resource allocation method, apparatus, device, and storage medium. Through the cooperation of Flink real-time calculation and solver optimization algorithm, it not only solves the efficiency problem of large-scale virtual resource allocation and improves the virtual resource allocation efficiency, but also dynamically realizes the precise allocation of virtual resources through the relevant parameter feedback mechanism of the user individual dimension, improves the user transaction rate and virtual resource-related parameters, and forms a win-win effect of "global optimization - individual adaptation". The above technical solutions are as follows: In a first aspect, embodiments of this application provide a virtual resource allocation method, including: Obtaining a target dual variable corresponding to the current access user based on the target attribute information of the current access user; the target dual variable is an independent variable that makes the dual function corresponding to the optimization problem obtain 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 through Flink calculation and calling a solver based on the user data of historical access users; the user data includes the user characteristics of the historical access users and the relevant parameters of the historical access users under at least one virtual resource; allocating target virtual resources to the current access user based on the target dual variable and the target relevant parameters of the current access user under at least one virtual resource.

[0004] In a possible implementation manner, the method further includes: after receiving the historical access operation of a historical access user, calculating, through Flink, the number of target historical access users belonging to the same group, and when the number of the target historical access users reaches a threshold, calling a 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 makes the dual function corresponding to the optimization problem under the same group obtain a first target value; associating and storing the group dual variable with the group identifier corresponding to the target historical access user.

[0005] In a possible implementation, after receiving the historical access operations of 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 access users, first filtering the user data of the historical access users through Flink to obtain valid user data, then grouping the historical access users according to the user characteristics in the valid user data to obtain the groups to which the historical access users belong, and finally performing windowing processing according to the historical access time and the number of target historical access users belonging to the same group.

[0006] In a possible implementation, the above valid user data is used to represent the user data of the historical access users in a specific access scenario; different specific access scenarios correspond to different virtual resource structures allocated to users, and different solvers are called through Flink when solving the above dual function; The above-mentioned associative storage of the group dual variable with the group identifier corresponding to the target historical access user includes: associatively storing the group dual variable with the group identifier and the specific access scenario identifier corresponding to the target historical access user.

[0007] In a possible implementation, the above-mentioned solver is called to solve the above dual function based on the user data of the target historical access user to obtain a group dual variable, including: initializing the dual variable 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 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; 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; and circularly searching for the first target value on the target dual function based on the initial dual variable group to obtain the group dual variable.

[0008] In a possible implementation, the above-mentioned 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 includes: performing dimensionality reduction processing on the virtual resource dimension in the three-dimensional matrix through a maximum value operation to obtain a two-dimensional matrix corresponding to the dual function; and performing dimensionality reduction processing on the user dimension in the two-dimensional matrix corresponding to the dual function through an average value operation or a median operation to obtain a target dual function containing only the dual variable dimension.

[0009] In a possible implementation, the above-mentioned cyclic search for the first objective value on the above-mentioned objective dual function based on the above-mentioned initial dual variable group to obtain the population dual variable includes: Search for the first objective value on the above-mentioned objective dual function based on the above-mentioned initial dual variable group to obtain the target initial dual variable; the target initial dual variable is the initial dual variable in the above-mentioned initial dual variable group corresponding to the first objective value of the above-mentioned objective dual function; update the above-mentioned initial dual variable group based on the above-mentioned target initial dual variable, and then execute again the step of searching for the first objective value on the above-mentioned objective 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 objective dual function reaches the preset search depth or the accuracy corresponding to the above-mentioned target initial dual variable reaches the preset accuracy or the value of the above-mentioned target initial dual variable does not change within the above-mentioned preset search depth, then end the cyclic search for the first objective value of the above-mentioned objective dual function, and return the target initial dual variable obtained in the last round of cyclic search as the population dual variable.

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

[0011] In a possible implementation, after the above-mentioned search for the first objective value on the above-mentioned objective dual function based on the above-mentioned initial dual variable group to obtain the target initial dual variable, the method further includes: If the above-mentioned target initial dual variable is equal to the boundary value of the above-mentioned target range, then interrupt the cyclic search for the first objective value of the above-mentioned objective dual function and send a failure warning message.

[0012] In a possible implementation, the method further includes: constructing the above-mentioned 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-mentioned user; the constraint conditions of the above-mentioned 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 constraint conditions of the above-mentioned optimization problem, transform the above-mentioned optimization problem into a dual problem to obtain the above-mentioned dual function.

[0013] In a possible implementation manner, allocating target virtual resources to the current access user based on the above-mentioned target dual variable and the target-related parameters of the current access user under at least one virtual resource includes: searching for a second target value on the corresponding decision optimization function of the dual function based on the above-mentioned target dual variable, the target-related parameters of the current access user under at least one virtual resource, the target virtual resource cost, and at least one type of virtual resource to obtain the type of target virtual resource; the type of target virtual resource is the type of virtual resource corresponding to the second target value of the decision optimization function among the at least one type of virtual resource when the current access user and the above-mentioned target dual variable are known; allocating the corresponding target virtual resources to the current access user according to the type of target virtual resource.

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

[0015] In a possible implementation manner, before allocating target virtual resources to the current access user based on the target dual variable and the target-related parameters of the current access user under at least one virtual resource, the method further includes: using machine learning technology to calculate the target-related parameters of the current access user under at least one virtual resource based on the target user characteristics of the current access 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.

[0016] In a second aspect, an embodiment of the present application provides a virtual resource allocation method, and the method includes: Obtaining the target virtual resources allocated to the current access user by using the virtual resource allocation method provided in the first aspect or any one of the possible implementation manners of the first aspect; displaying the target virtual resources.

[0017] In a third aspect, an embodiment of the present application provides a virtual resource allocation device, and the virtual resource allocation device includes: An acquisition module, configured to acquire a target dual variable corresponding to the current access user based on the target attribute information of the current access user; the target dual variable is an independent variable that enables a dual function corresponding to an 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 obtained by solving the dual function through a Flink calculation call to a solver based on the user data of historical access users; the user data includes the user characteristics of the historical access users and the relevant parameters of the historical access users under at least one type of virtual resource. A virtual resource allocation module, configured to allocate target virtual resources to the current access user based on the target dual variable corresponding to the current access user and the target relevant parameters of the current access user under at least one type of virtual resource.

[0018] In a fourth aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory; the processor is connected to the memory; the memory is configured 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 method provided in the first aspect or any possible implementation manner of the first aspect or the second aspect of the embodiments of the present application.

[0019] In a fifth aspect, an embodiment of the present application provides a computer storage medium, where the computer storage medium stores multiple instructions, and the instructions are suitable for being loaded and executed by a processor to execute the method steps provided in the first aspect or any possible implementation manner of the first aspect or the second aspect of the embodiments of the present application.

[0020] In one or more embodiments of the present application, on the one hand, the dynamic decision-making of virtual resources is empowered by Flink real-time computing. As a high-performance stream processing framework, Flink supports millisecond-level low-latency computing, can process the user data of a large number of accessing users in real time, and quickly generate target dual variables. For example, in the face of a sudden high-concurrency user access scenario, the distributed architecture of Flink can quickly expand computing resources, ensure the timeliness of solving the dual function, and provide a real-time basis for resource allocation. On the other hand, by calling a solver, the complex virtual resource allocation problem is transformed into a linear programming or integer programming problem, and the first target value of the dual function is accurately solved. The strong robustness of the solver is used to handle high-dimensional constraint conditions, 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 relied on by the solver in the relevant Cauchy operations research technology to an architecture that only relies on Flink, the operations research problem-solving in the virtual resource allocation scenario can be made more stable and efficient. On the other hand, accurate virtual resource allocation can be achieved based on the target dual variable corresponding to the current accessing user and its target-related parameters, forming a "data - decision - feedback" closed loop. For example, if the target-related parameters corresponding to the current accessing user are relatively low, its virtual resource allocation strategy can be dynamically adjusted (such as increasing the coupon denomination or awarding points for high-frequency usage scenarios, etc.) to stimulate the current accessing user to generate transaction behaviors and improve the relevant parameters. At the same time, the essence of solving the dual problem is to optimize virtual resource allocation from a global perspective. Therefore, by combining the user individual-related parameters (target-related parameters) of the current accessing user under at least one virtual resource and the target dual variable corresponding to the current accessing user obtained by solving the dual function, virtual resource allocation is performed on the current accessing user, taking into account both group efficiency and individual needs, avoiding over-concentration or waste of virtual resources, and achieving a balance between the global optimization and personalization of virtual resource allocation, thus improving the utilization rate of virtual resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0022] Figure 1 It is a schematic diagram of the architecture of a virtual resource allocation system provided by an exemplary embodiment of the present application; Figure 2 It is a schematic flowchart of a virtual resource allocation method provided by an exemplary embodiment of the present application; Figure 3 It is a schematic flowchart of the construction process of a dual function provided by an exemplary embodiment of the present application; Figure 4 Schematic diagram of the implementation process of operational research solution in a virtual resource allocation scenario provided by an exemplary embodiment of the present application; Figure 5 Schematic diagram of the solution process of a group of dual variables provided by an exemplary embodiment of the present application; Figure 6 Schematic diagram of the structure of a virtual resource allocation device provided by an exemplary embodiment of the present application; Figure 7 Schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. Detailed implementation manners

[0023] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application.

[0024] The terms "first", "second", "third", etc. in this specification, the claims and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.

[0025] Next, please refer to 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. As Figure 1 shown, the virtual resource allocation system may include: a terminal 110 and a server 120. Among them: The terminal 110 includes user terminals corresponding to one or more users. A corresponding user version application program can be installed on the terminal 110. The user can register and log in to the corresponding account in the application program. The user can perform online transaction access, receive and write off virtual resources, etc. through the corresponding terminal 110 based on the above-mentioned user version application program, and send corresponding target access operations, target attribute information, etc. to the server 120.

[0026] It can be understood that the above-mentioned terminal 110 can be a mobile phone, a tablet computer, a desktop type, 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 do not limit this.

[0027] The server 120 may be the server corresponding to the user version application used by the user in the terminal 110 for online transactions, and is used to perform services such as corresponding resource allocation after the user logs in and accesses the user version application. The server 120 may be a hardware server, a virtual server, a cloud server, etc., and the embodiments of the present application do not limit this.

[0028] Specifically, the server 120 may first obtain the target dual variable corresponding to the currently accessing user based on the target attribute information of the currently accessing user. The target dual variable is the independent variable that makes the dual function corresponding to the optimization problem 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 obtained by using the Flink calculation to call the solver to solve the dual function based on the user data of the historical accessing users. The above user data includes the user characteristics of the historical accessing users and the relevant parameters of the historical accessing users under at least one virtual resource; then, based on the target dual variable and the target relevant parameters of the currently accessing user under at least one virtual resource, allocate the target virtual resources to the currently accessing user.

[0029] The network may be a medium that provides a communication link between the terminal 110 and the server 120, or may be the Internet including network devices and transmission media, which is not limited thereto. The transmission medium may be a wired link, such as but not limited to, coaxial cable, optical fiber, and Digital Subscriber Line (DSL), etc., or a wireless link, such as but not limited to, Wireless Fidelity (WIFI), Bluetooth, and mobile device network, etc.

[0030] It can be understood that Figure 1 The numbers of the terminal 110 and the server 120 in the shown virtual resource allocation system are only examples. In specific implementations, the virtual resource allocation system may include any number of terminals 110 and servers 120, and the embodiments of the present application do not specifically limit this. For example but not limited to, the terminal 110 may be a user terminal cluster composed of multiple user terminals, and the server 120 may be a server cluster composed of multiple servers.

[0031] Next, in combination with Figure 1 , this application embodiment provides a virtual resource allocation method. Specifically, please refer to Figure 2 , which is a schematic flowchart of a virtual resource allocation method provided by an exemplary embodiment of the present application. As Figure 2 shown, the virtual resource allocation method includes the following steps: S201. Obtain the target dual variable corresponding to the current accessing user based on the target attribute information of the current accessing 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 obtained by solving the dual function by calling a solver through Flink calculation based on the user data of historical accessing users.

[0032] Specifically, the above-mentioned current accessing user can be, but is not limited to, the user currently accessing the target application. The target application can be, but is not limited to, an application for online transactions such as shopping and financial management. The target application can be a separate online transaction software installed on the terminal or a small program integrated in other software, etc. The embodiments of this specification do not make any limitations in this regard. The target attribute information includes data characteristics related to the current accessing user, such as, but not limited to, basic information such as the occupation and native place of the current accessing user, historical transaction records, etc. These information are used to distinguish the group category to which the current accessing user belongs. The group category can be divided according to basic attributes such as the age group, occupation, or location of the user, or can be divided according to the transaction preferences or transaction habits of the user, such as the green food transaction group (i.e., users who like to purchase green food online), etc. It can be specifically set according to actual needs, and the embodiments of this specification do not make any limitations in this regard.

[0033] The purpose of the above optimization problem is to decide how to allocate virtual resources to the user currently accessing the target application to make all user-related parameters meet the preset conditions, such as, but not limited to, maximizing or minimizing the sum of all user-related parameters or making all user-related parameters consistent, etc. The above-mentioned related parameters can be, but are not limited to, write-off rates, access rates, transaction volumes, etc. related to virtual resources, and can be specifically set according to actual needs. The above write-off rate can be the ratio of the user using or converting the allocated virtual resources, that is, the virtual resource usage rate or conversion rate, or can be the improvement ratio of the user conversion rate (such as, but not limited to, the order placement probability) in the case of allocating virtual resources, etc. The embodiments of this specification do not make any limitations in this regard. The larger the sum of the user write-off rates, the higher the total transaction rate of the users in the target application, that is, the larger the sum of the corresponding benefits generated by the users in the case of allocating virtual resources. The above virtual resources can be, but are not limited to, subsidies, coupons, or virtual points, etc. Correspondingly, the virtual resource quantity can be, but is not limited to, the subsidy amount, the face value of the coupon, or the number of virtual points, etc. This specification does not make any limitations in this regard.

[0034] The above dual function is another function corresponding to the function of the original optimization problem. It can understand the original optimization problem from a different perspective, and solving the dual function is often more efficient than directly solving the original optimization problem. The dual variable is the variable corresponding to the variable of the original optimization problem and is used to form the dual problem. Solving the dual variable corresponding to the dual function in the dual problem can find the objective solution of the original optimization problem.

[0035] Optionally, the target dual variable corresponding to the above current access user may be the independent variable value for making the dual function corresponding to the optimization problem under the target group and / or target access scenario of the current access user obtain the first target value (such as but not limited to the minimum value or the maximum value or a preset value, etc.). The optimization problem under the target group corresponding to the current access user is used to decide the virtual resources allocated to each user in the target group to enable the relevant parameters of all users corresponding to the target group to meet the preset conditions, such as but not limited to maximizing or minimizing the sum of the relevant parameters of all users corresponding to the target group or making the relevant parameters of all users consistent, etc.; the optimization problem under the target access scenario corresponding to the current access user is used to decide the virtual resources allocated to each user in the target access scenario to enable the relevant parameters of all users in the target access scenario to meet the preset conditions, such as but not limited to maximizing or minimizing the sum of the relevant parameters of all users in the target access scenario or making the relevant parameters of all users consistent, etc.; the optimization problem under the target group and target access scenario corresponding to the current access user is used to decide the virtual resources allocated to each user in the target group in the target access scenario to enable the relevant parameters of all users corresponding to the target group in the target access scenario to meet the preset conditions, such as but not limited to maximizing or minimizing the sum of the relevant parameters of all users corresponding to the target group in the target access scenario or making the relevant parameters of all users consistent, etc. The above target group may be, but not limited to, obtained by grouping based on the target attribute information such as the basic user information of the current access user (such as but not limited to region, consumption preference, etc.) or trading habits (such as high consumption, low consumption, etc.), such as but not limited to including young user groups, elderly user groups, user groups in area A, user groups in area B, high-consumption groups, etc.

[0036] The above user data includes the user characteristics of historical visiting users and the relevant parameters of historical visiting users under at least one virtual resource. The above relevant parameters may include, but are not limited to, write-off rates, access rates, transaction volumes, etc. related to virtual resources, and can be specifically set according to actual needs. The above historical visiting users may include, but are not limited to, users who visited before the current visiting user, or users who visited during the previous historical visiting period (T - 1) of the current visiting period (T). The current visiting period (T) and the previous historical visiting period (T - 1) are adjacent and have the same corresponding time interval. The above at least one virtual resource may refer to virtual resources corresponding to at least one virtual resource quantity under the same type of virtual resource, such as, but not limited to, coupons with a discount of 5 yuan for every 30 yuan spent, coupons with a discount of 6 yuan for every 30 yuan spent, etc., or may refer to virtual resources corresponding to a certain virtual resource quantity under at least one type of virtual resource, such as, but not limited to, a subsidy of 3 yuan, coupons with a discount of 7 yuan for every 30 yuan spent, coupons with a discount of 3 yuan for every 30 yuan spent, etc. The relevant parameters of historical visiting users under at least one virtual resource refer to the various virtual resource usage rates or conversion rates corresponding to historical visiting users under various virtual resource allocation situations. The above user characteristics may include, but are not limited to, basic information such as the age group, occupation, location, etc. corresponding to historical visiting users, historical transaction frequencies, historical virtual resource allocation and relevant parameter information, etc. The above user characteristics are used to distinguish the group category to which the historical visiting user belongs.

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

[0038] Optionally, to address the issues of sample sparsity and sample long-tail, the above-mentioned objective dual variables can also, but are not limited to, be obtained based on the user data of historical visiting users who belong to the same group as the currently visiting user. When the number of historical visiting users calculated by Flink reaches a threshold, the dual function is solved, thereby changing the multi-constraint problem in the dual solution process to a single-constraint problem through Flink calculation. Moreover, within the same solution window, it can be ensured that there are sufficient samples in each solution dimension before solving.

[0039] Optionally, when a user conducts an online access to a target application on a terminal (such as viewing the home page or scenario page, etc.), the terminal will send the corresponding online access operation to the server. The server can receive the online access operation sent by the terminal and query the target attribute information of the currently visiting user in the database based on the user identifier of the currently visiting user carried by the online access operation. Then, based on the target attribute information, the target group to which the currently visiting user belongs is determined according to the 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 group dual variable corresponding to the target group identifier (i.e., the target dual variable corresponding to the currently visiting user) calculated in real time by Flink before the current access time is searched for in the database.

[0040] Optionally, after receiving the online access operation sent by the terminal, the server can also query the target attribute information of the currently visiting user in the database based on the user identifier of the currently visiting user carried by the online access operation, and determine the target group to which the currently visiting user belongs according to the 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 and the target access scenario identifier of the currently visiting user carried by the online access operation, the group dual variable corresponding to the target group identifier in the target access scenario (i.e., the target dual variable corresponding to the currently visiting user) calculated in real time by Flink before the current access time is searched for in the database.

[0041] It can be understood that the group identifier can be obtained by encoding the group attributes of the user, or by encoding the group attributes and access scenarios of the user together. It can be a string composed of numbers and / or symbols, or it can be text or an image that can directly represent the identity of the group. The embodiments of this specification do not make any limitations in this regard.

[0042] Next, please continue to refer to Figure 2 ,such as Figure 2As shown, 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 further include, but is not limited to: S202. Allocate target virtual resources for the current access user based on the target dual variable and the target relevant parameters of the current access user under at least one virtual resource.

[0043] In some possible embodiments, before S202, which allocates target virtual resources for the current access user based on the target dual variable and the target relevant parameters of the current access user under at least one virtual resource, the virtual resource allocation method may further include, but is not limited to: using machine learning techniques to calculate the target relevant parameters of the current access user under at least one virtual resource based on the target user characteristics of the current access user. The target user characteristics include at least one of the following: target attribute information, target transaction frequency, historical virtual resource allocation and relevant parameter information. The target relevant parameters may include, but are not limited to, the target cancellation rate, target access rate, target transaction volume, etc. of the current access user under at least one virtual resource. The target cancellation rate may be used to represent the possibility of the current access user using a certain virtual resource after it is allocated, or the probability that the current access user actually uses the virtual resource, that is, the possibility that the current access user actually uses a certain virtual resource after obtaining it before the current access time. The embodiments of this specification do not make any limitations in this regard. The target attribute information refers to some basic information of the current access user, such as, but not limited to, age, occupation, etc. The target transaction frequency refers to the frequency of transactions of the current access user within a certain period of time, which can reflect the activity of the current access user and the demand for a certain resource. The historical virtual resource allocation and relevant parameter information refers to the relevant records of the current access user's past acquisition and use of virtual resources, and these data are helpful for predicting the possibility of the current access user using virtual resources in the future.

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

[0045] Optionally, to avoid the problem of inaccurate virtual resource allocation caused by assigning the same virtual resources to users in the same group, after obtaining the target dual variable corresponding to the currently accessing user, the target dual variable and the target related parameters of the currently accessing user under at least one virtual resource can also be directly input into a pre-trained virtual resource allocation model, and the output should be the target virtual resources to be allocated to the currently accessing user, so that the virtual resource allocation model can perform more accurate and targeted virtual resource allocation at the individual level of a single user at the group level through the target related parameters of the currently accessing user itself under at least one virtual resource.

[0046] Optionally, the implementation process of the above S202 for allocating target virtual resources based on the target dual variable and the target related parameters of the currently accessing user under at least one virtual resource may include, but is not limited to: first, 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 currently accessing user under at least one virtual resource, the target virtual resource cost, and at least one virtual resource type to obtain the target virtual resource type; then, allocating the corresponding target virtual resources to the currently accessing user according to the above target virtual resource type. The above target virtual resource type is the virtual resource type corresponding to the decision optimization function taking the second target value among at least one virtual resource type when the currently accessing user and the target dual variable are known. The second target value on the decision optimization function corresponding to the dual function corresponds to the first target value on the dual function, that is, the value corresponding to the decision optimization function when the dual function obtains the first target value. The second target value may include, but is not limited to, the maximum value or the minimum value or a preset target value of the decision optimization function, etc.

[0047] Exemplarily, 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 above target virtual resource type , where refers to the target related parameters corresponding to the currently accessing user i when allocating virtual resource j, refers to the target dual variable corresponding to the currently accessing user, refers to the target virtual resource cost corresponding to the currently accessing user i when allocating virtual resource j, where j is greater than or equal to 1 and less than or equal to the total value of the preset virtual resource types.

[0048] In the embodiments of this specification, on the one hand, the dynamic decision-making of virtual resources is empowered by Flink real-time computing. As a high-performance stream processing framework, Flink supports millisecond-level low-latency computing, can process the user data of a large number of accessing users in real time, and quickly generate target dual variables. For example, in the face of a sudden high-concurrency user access scenario, the distributed architecture of Flink can quickly expand computing resources, ensure the timeliness of solving the dual function, and provide a real-time basis for resource allocation. On the other hand, by calling the solver, the complex virtual resource allocation problem is transformed into a linear programming or integer programming problem, and the first target value of the dual function is accurately solved. The strong robustness of the solver is used to handle high-dimensional constraint conditions, 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 relied on by the solver in the relevant Cauchy operation research and solution technology to an architecture that only relies on Flink, the operation research and solution problem in the virtual resource allocation scenario can be made more stable and efficient. On the other hand, accurate virtual resource allocation can be realized based on the target dual variable corresponding to the current accessing user and its target-related parameters, forming a "data-decision-feedback" closed loop. For example, if the target-related parameters corresponding to the current accessing user are relatively low, its 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 accessing 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, combining the user individual-related parameters (target-related parameters) of the current accessing user under at least one virtual resource and the target dual variable corresponding to the current accessing user obtained by solving the dual function for virtual resource allocation of the current accessing user takes into account both group efficiency and individual needs, can avoid the over-concentration or waste of virtual resources, and makes the global optimization and personalization corresponding to virtual resource allocation reach a balance, improving the utilization rate of virtual resources.

[0049] In summary, the embodiments of this specification solve the efficiency problem of large-scale virtual resource allocation through the cooperation of Flink real-time computing and the solver optimization algorithm, improve the virtual resource allocation efficiency, and dynamically realize accurate virtual resource allocation through the relevant parameter feedback mechanism in the user individual dimension, improving the user transaction rate and virtual resource-related parameters, forming a win-win effect of "global optimization-individual adaptation".

[0050] Next, please refer to Figure 3 , which is a schematic diagram of the construction process of a dual function provided by an exemplary embodiment of this application. As Figure 3 shown, the construction process of this dual function may but is not limited to include the following steps: S301. Construct an 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 user.

[0051] Specifically, the constraint conditions of the above optimization problem include that each user is allocated only one virtual resource, and the total cost of the virtual resources allocated to at least one user does not exceed the preset total cost. The above optimization problem refers to the process of finding a virtual resource allocation strategy that can make the user's relevant parameters meet the preset conditions (such as but not limited to the sum of the user's relevant parameters reaching the maximum or minimum, etc.) under the above constraint conditions. The above decision variable is ultimately used to determine which virtual resource among at least one virtual resource to allocate to the user. The above preset total cost refers to the upper limit of the total cost of virtual resource allocation preset before the start of the optimization problem.

[0052] Exemplarily, if you want to maximize the sum of the user's relevant parameters, then the above first target value is the minimum value on the dual function, the above second target value is the maximum value on the decision optimization function corresponding to the dual function, and the above optimization problem can be characterized as: , and its constraint conditions 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 takes a value of 0 or 1, and when the decision variable takes a value of 0, it indicates that virtual resource j is not allocated to user i, and when the decision variable takes a value of 1, it indicates that virtual resource j is allocated to user i; (i = 1, 2,..., C), that is, each user i is allocated only one virtual resource j; , that is, the total cost of the virtual resources allocated to the user does not exceed the preset total cost B.

[0053] In the embodiments of this specification, on the one hand, the user behavior can be quantified through relevant parameters, so that the virtual resource allocation is closely related to the actual needs of the user, improving the scientificity of the virtual resource allocation decision; on the other hand, the waste of virtual resources can be avoided through the constraint of the total cost of virtual resources, ensuring the economy of virtual resource allocation.

[0054] S302. Based on the constraint conditions of the optimization problem, transform the optimization problem into a dual problem to obtain a dual function.

[0055] Specifically, transform the original optimization problem into a dual problem, and simplify the solution complexity by interchanging the dual variables and constraints and converting the functions and coefficients to obtain a dual function. The above dual function can be composed of but not limited to dual variables, preset total costs, relevant parameters of the user under at least one virtual resource, and virtual resource costs.

[0056] Exemplarily, when the above first target value is the minimum value on the dual function and the above second target value is the maximum value on the dual function corresponding to the decision optimization function, the above optimization problem can be first transformed into the standard linear programming format based on the constraint conditions of the optimization problem and solved in the dual space using Lagrange multipliers to obtain: , where is the dual variable; assuming , then the dual function corresponding to the transformed dual problem can be obtained as: .

[0057] In the embodiments of the present specification, on the one hand, by transforming the optimization problem with multiple constraints and multiple variables into a dual problem with a single constraint and a single variable, it is not only convenient to use efficient algorithms such as the simplex method and the interior point method to solve, improving the solution efficiency, but also can solve the problem that the original optimization problem is computationally difficult due to the existence of high-dimensional constraints, providing a low-dimensional and simple alternative solution path to ensure the feasibility of virtual resource allocation and enhance robustness; on the other hand, the shadow price of virtual resource allocation is reflected through the dual variable, which is convenient to analyze the impact of changes in virtual resource costs on virtual resource allocation strategies and enhance decision-making flexibility.

[0058] Next, please refer to Figure 4 , which is a schematic diagram of the implementation process of operational research solution in a virtual resource allocation scenario provided by an exemplary embodiment of the present application. As Figure 4 shown, the implementation process of the operational research solution in this virtual resource allocation scenario may but is not limited to include the following steps: S401, after receiving the historical access operation of the historical access user, calculate the number of target historical access users belonging to the same group through Flink. When the number of target historical access users reaches the threshold, call the solver to solve the dual function based on the user data of the target historical access users to obtain the group dual variable.

[0059] Specifically, the above group dual variables are the independent variables that enable the dual function corresponding to the optimization problem under the same group to achieve the first objective value. After receiving the historical access operations of historical access users, the user data of the historical access users can be collected and input into Flink. Then, through real-time calculation in Flink, groups are dynamically divided according to user attributes (such as but not limited to region, consumption preference, etc.) or transaction habits (such as high consumption, low consumption, etc.), and through window functions or state management, the number of target historical access users in each group is statistically calculated in real time. For example, setting the threshold of the "youth user group" to 1000 people, when the number of users in this group reaches this scale, it will trigger the call of the solver. The solver takes the group user data as input, constructs an optimization problem with constraints, aims to maximize the sum of group-related parameters, and through dual transformation, transforms the original optimization problem into a dual problem. It can use but is not limited to efficient methods such as the interior point method or the simplex method to solve the dual function, and obtain the group dual variables that reflect the marginal value of virtual resources. For example, if a certain group is highly sensitive to a coupon of 30 minus 8, its corresponding dual variable value may also be significantly greater than other virtual resources.

[0060] It can be understood that the above Figure 3 The construction process of the dual function shown can be executed by calling the solver through real-time calculation in Flink, that is, for each window obtained by real-time calculation in Flink, for the access users belonging to the same group, the solver will be called to construct the corresponding optimization problem and transform it into the corresponding dual function. Thus, not only is the multi-constraint optimization problem of the overall application users split into a single-constraint dual problem for group users, reducing the complexity of operation research and solution in the virtual resource allocation process and improving efficiency, but also in the same window, it can ensure that the number of samples in each solution dimension reaches a sufficient number (threshold) before solving, solving the problems of sample sparsity and sample long tail, and ensuring the accuracy and effectiveness of the solution.

[0061] In the embodiments of this specification, on the one hand, the millisecond-level calculation delay of Flink can ensure the real-time nature of the statistical calculation of the number of group users, avoid the lag of virtual resource allocation, and support real-time group calculation 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, making the virtual resource allocation strategy more in line with the group's needs and improving the allocation accuracy; on the other hand, when the behavior patterns of group users change, the corresponding group dual variables will also be updated in real time, and then it will also drive the dynamic adjustment of the corresponding virtual resource allocation strategy, enhancing the adaptability of the system to operational changes.

[0062] Understandably, the process of solving by calling the solver through Flink calculation described above is a real-time process. That is, when receiving the access operation of the current accessing user, the number of accessing users belonging to the same group as the current accessing user is also calculated through Flink. When the number reaches the threshold, the solver is called to solve the pair function to obtain the current group dual variable corresponding to the current accessing user. The target dual variable corresponding to the current accessing user is obtained by performing dual solution on the user data of the accessing users belonging to the same target group as the current accessing user during the previous access time period (T - 1) of the current access time period (T), that is, the group dual variable corresponding to the target group during the previous access time period (T - 1). The current group dual variable is obtained by performing dual solution on the user data of the accessing users belonging to the same target group as the current accessing user during the current access time period (T), that is, the group dual variable corresponding to the target group during the current access time period (T). After obtaining the current group dual variable, it is also possible but not limited to updating the group dual variable corresponding to the target group from the historical group dual variable to the current group dual variable to ensure the timeliness of the group dual variable corresponding to the target group.

[0063] Optionally, after receiving the historical access operation of the historical accessing user, the user data of the historical accessing user can be filtered through Flink calculation to obtain valid user data, and then the historical accessing users can be grouped according to the user characteristics in the valid user data to obtain the groups to which the historical accessing users belong. Finally, windowing processing is performed according to the historical access time and the number of target historical accessing users belonging to the same group. When the number of target historical accessing users in the same window reaches the threshold (such as but not limited to 5000, 10000, etc.), the solver will be called to solve the pair function based on the user data of the target historical accessing users in the same window to obtain the group dual variable.

[0064] The above filtering process can be to filter out the user data whose data format does not conform to the Flink calculation specification, or to filter out the user data in the access scenarios where virtual resource allocation is not required, or to filter out the user data in the specific access scenarios where virtual resource allocation is required. The embodiments of this specification do not limit this. The above specific access scenario can be but is not limited to the access scenario where virtual resource allocation needs to be enabled during the time period corresponding to the user access time. That is, the time periods for enabling virtual resource allocation may be different for different access scenarios. That is, the specific access scenarios that need to be filtered may also be different for different access times, and can be specifically set according to actual needs. The embodiments of this specification do not limit this.

[0065] When Flink computing performs windowing processing, the same window needs to constrain both time and the number of samples (the number of target historical access users belonging to the same group). For example, but not limited to, only when the number reaches the threshold and the maximum access time interval of the access users within the threshold is less than or equal to a preset duration (such as, but not limited to, 1 minute, 3 minutes, 30 seconds, etc.), the solver will be called to solve. In this way, the sample sparsity and sample long-tail problems can be solved by the sample number constraint within the same window, ensuring the accuracy and effectiveness of the solution. At the same time, the time constraint within the same window is used to avoid the problem that the time span of the data in the same window is too long, resulting in a decrease in data validity and a decrease in the accuracy of the target dual variable used for resource allocation for the current access user subsequently, ensuring the timeliness of the solution.

[0066] Furthermore, the above-mentioned valid user data is used to represent the user data of historical access users in a specific access scenario. Different specific access scenarios correspond to different virtual resource structures allocated to users (for example, in the home page access scenario, coupons need to be allocated to users, in the product details page access scenario, points need to be allocated to users, or, in the home page access scenario, coupons that can participate in the reduction only when reaching 30 need to be allocated to users, in the product details page access scenario, coupons that can participate in the reduction only when reaching 15 need to be allocated to users, etc.). Different solvers are called through Flink computing when solving the dual function. After the solution is completed, the group dual variable can be directly associated and stored with the group identifier and the specific access scenario identifier corresponding to the target historical access user.

[0067] Optionally, as Figure 5 shown, the implementation process of calling the solver in the above S401 to solve the dual function based on the user data of the target historical access user to obtain the group dual variable can, but not limited to, include: S501, initialize the dual variables in the dual function to obtain an initial dual variable group.

[0068] Specifically, the above initial dual variable group includes multiple initial dual variables within the target range. The above target range is the value range of the dual variable calculated according to the actual situation. The above multiple initial dual variables can, but not limited to, be multiple values including the upper and lower limits of the target range within the target range. For example, but not limited to, when the above target range is greater than or equal to 0 and less than or equal to 10, the above 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].

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

[0070] S502. Based on the user data of the target historical access users, the virtual resource costs of the target historical access users under at least one virtual resource, and the dual variables corresponding to the dual function, construct a three-dimensional matrix corresponding to the dual function.

[0071] Specifically, the solver can construct a three-dimensional tensor with user characteristics, virtual resource attributes (such as virtual resource related parameters, virtual resource costs, etc.) and dual variable values as three dimensions to obtain the corresponding three-dimensional matrix. For example, a third-order tensor composed of user-virtual resource-dual variable, and the element value is the relevant parameter of the user for the virtual resource minus the weight of the dual variable multiplied by the cost of the virtual resource. Thus, through multi-dimensional association modeling, the interaction relationship between users, virtual resources, and dual variables is explicitly expressed, which not only avoids information loss, but also provides a standardized data container for subsequent dimensionality reduction, and improves the solution calculation efficiency.

[0072] It can be understood that S501 and S502 above can be executed sequentially or simultaneously, and the embodiments of this specification do not limit this.

[0073] S503. Perform dimensionality reduction processing on the user dimension and virtual resource dimension in the three-dimensional matrix to obtain a target dual function that only contains the dual variable dimension.

[0074] Optionally, but not limited to, principal component analysis can be used 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 a target function that only contains dual variables, so as to not only reduce the solution complexity and significantly improve the solution speed, but also eliminate the interference of redundant information, highlight the key decision variables, and enhance the robustness of the solution.

[0075] Optionally, but not limited to, first perform dimensionality reduction processing on the virtual resource dimension in the three-dimensional matrix through a maximum value operation to obtain a two-dimensional matrix corresponding to the dual function; then, perform dimensionality reduction processing on the user dimension in the two-dimensional matrix corresponding to the dual function through an average value operation or a median operation to obtain a target dual function that only contains the dual variable dimension.

[0076] S504. Based on the initial dual variable group, perform a cyclic search on the first target value of the target dual function to obtain a group of dual variables.

[0077] Specifically, after obtaining the objective dual function that only contains the dimensions of the dual variables, starting from the initial group of dual variables, the coordinate rotation method can be used, but is not limited to, for cyclic search optimization. In each iteration, other variables are fixed, and a one-dimensional search is performed along a single dimension of the dual variable (such as, but not limited to, the golden section method). After updating the value of this dimension, the value of the objective dual function is recalculated until the convergence condition is met. Thus, through the global cyclic search within the target range of the objective dual function, local problems are avoided, ensuring that when the obtained group of dual variables is substituted into the objective dual function, it is the global first objective value.

[0078] Optionally, in the above S504, the process of obtaining the group of dual variables by performing cyclic search on the first objective value on the objective dual function based on the initial group of dual variables can, but is not limited to, include: first, searching for the first objective value on the objective dual function based on the initial group of dual variables to obtain the target initial dual variables, where the target initial dual variables are the initial dual variables in the initial group of dual variables corresponding to the first objective value of the objective dual function; then, updating the initial group of dual variables based on the target initial dual variables, and repeating the step of searching for the first objective value on the objective dual function based on the initial group of dual variables to obtain the target initial dual variables until the search depth corresponding to the objective dual function reaches the preset search depth (such as, but not limited to, 1 or 2, etc.) or the accuracy corresponding to the target initial dual variables reaches the preset accuracy or the values of the target initial dual variables within the preset search depth no longer change, at which point the cyclic search for the first objective value of the objective dual function ends, and the target initial dual variables obtained in the last round of cyclic search are returned as the group of dual variables.

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

[0080] Exemplarily, if the target initial dual variables 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, L*0.95, L*0.96, L*0.97, L*0.98, L*0.99, L*1.00, L*1.01, L*1.02, L*1.03, L*1.04, L*1.05, L*1.06, L*1.07, L*1.08, L*1.09, L*1.10]. Then, the above 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 a dual variable group composed of the target initial dual variable and multiple new initial dual variable values.

[0081] In some possible embodiments, 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, if the target initial dual variable is equal to the boundary value of the target range, it indicates that the current solution is abnormal. Then, the loop search for the first target value of the target dual function is interrupted, and a failure warning message is sent.

[0082] Next, please continue to refer to Figure 4 , as Figure 4 shown, after receiving the historical access operation of the historical access user in S401 above, the number of target historical access users belonging to the same group is calculated through Flink. When the number of target historical access users reaches the 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. Then, the implementation process of the operational research solution in this virtual resource allocation scenario can also but is not limited to include: S402, associatively storing the group dual variable with the group identifier corresponding to the target historical access user.

[0083] Specifically, the above group identifier is a unique identifier used to distinguish different groups, and can be but is not limited to user identity identifier, user group, membership level, user location, etc. Through the group identifier, it is possible to identify and distinguish which specific group each user belongs to. After obtaining the group dual variable, the group dual variable can be associatively stored with the group identifier corresponding to the target historical access user in a database or other data storage systems, so that when subsequent users belonging to the same group as the target historical access user access, they can quickly retrieve and use this information for corresponding virtual resource allocation decision support.

[0084] Optionally, after receiving the user's access operation, it is also possible to calculate, through Flink respectively, the number of target access users belonging to the same group in each access scenario. When the number of target access users in each access scenario reaches the threshold, different solvers are called to solve the even function respectively based on the user data pairs of the target access users in different access scenarios, and the group dual variables in different access scenarios are obtained. Then, the group dual variables are associated and stored in a database or other data storage systems together with the corresponding access scenario identifiers and the group identifiers corresponding to the target access users in this access scenario, so that subsequent users belonging to the same group and access scenario as the target access users can achieve more accurate and efficient virtual resource allocation when accessing, improving the granularity of virtual resource allocation.

[0085] In some possible embodiments, the overall implementation process of a virtual resource allocation method provided by an exemplary embodiment of the present application may but is not limited to include: after receiving the user's access operation, the user data of the access users can be filtered in real time through Flink to obtain valid user data, and then the access users are grouped according to the user characteristics in the above valid user data to obtain the groups to which the access users belong. Finally, windowing processing is performed 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 the threshold, a solver is called to solve the above dual function based on the user data of the target access users to obtain the group dual variable. The above solving process is similar to the above Figure 5 solving process, which will not be elaborated here. Finally, the obtained group dual variable is output as a result and associated and stored with the corresponding group identifier.

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

[0087] In some possible embodiments, when the current access user accesses the target application through the terminal, the terminal can obtain the target virtual resources allocated to the current access user according to the virtual resource allocation method in the above embodiments. For example, but not limited to, receiving the target virtual resources allocated to the current access user by the server corresponding to the target application through the above virtual resource allocation method; after the terminal obtains the target virtual resources allocated to the current access user, it can directly display the target virtual resources on the current access page corresponding to the target application, so that the target user can view and use the target virtual resources in a timely manner.

[0088] To better understand the virtual resource allocation method provided in the above embodiments of the present application, Figure 6 An exemplary structural schematic diagram of a virtual resource allocation device provided in an embodiment of the present application is shown. Specifically, as Figure 6 shown, the virtual resource allocation device 600 includes: An acquisition module 610, configured to obtain a target dual variable corresponding to the current access user based on the target attribute information of the current access 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 obtained by solving the dual function through a Flink calculation call to a solver based on the user data of historical access users; the user data includes the user characteristics of the historical access users and the relevant parameters of the historical access users under at least one virtual resource; A virtual resource allocation module 620, configured to allocate target virtual resources to the current access user based on the target dual variable corresponding to the current access user and the target relevant parameters of the current access user under at least one virtual resource.

[0089] In a possible implementation manner, the virtual resource allocation device 600 further includes: A Flink calculation module, configured to calculate the number of target historical access users belonging to the same group through Flink after receiving the historical access operations of historical access users; A dual solution module, configured to, when the number of the target historical access users reaches a threshold, call a 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 a first target value; A storage module, configured to associate and store the group dual variable with the group identifier corresponding to the target historical access users.

[0090] In a possible implementation manner, the Flink calculation module is specifically configured to: after receiving the historical access operations of historical access users, first perform filtering processing on the user data of the historical access users through Flink to obtain valid user data, then group the historical access users according to the user characteristics in the valid user data to obtain the groups to which the historical access users belong, and finally perform windowing processing according to the historical access time and the number of target historical access users belonging to the same group.

[0091] In a possible implementation, the above-mentioned valid user data is used to characterize the user data of the above-mentioned historical access users in a specific access scenario; different specific access scenarios correspond to different virtual resource structures allocated to users, and different solvers are called through Flink calculation when solving the above-mentioned dual function; The above storage module is specifically used for: associatively storing the above group dual variables with the group identifier and the specific access scenario identifier corresponding to the target historical access user.

[0092] In a possible implementation, the above dual solution module includes: An initialization unit, configured to initialize the dual variables in the above dual function to obtain an initial dual variable group; the above initial dual variable group includes a plurality of initial dual variables within a target range; A matrix construction unit, configured to construct a three-dimensional matrix corresponding to the above dual function based on the user data of the above target historical access user, the virtual resource cost of the above target historical access user under at least one virtual resource, and the dual variables corresponding to the above dual function; A dimensionality reduction processing unit, configured to perform dimensionality reduction processing on the user dimension and the virtual resource dimension in the above three-dimensional matrix to obtain a target dual function that only includes the dual variable dimension; A cyclic search unit, configured to cyclically search for a first target value on the above target dual function based on the above initial dual variable group to obtain group dual variables.

[0093] In a possible implementation, the above dimensionality reduction processing unit is specifically used for: performing dimensionality reduction processing on the virtual resource dimension in the above three-dimensional matrix through a maximum value operation to obtain a two-dimensional matrix corresponding to the above dual function; performing dimensionality reduction processing on the user dimension in the two-dimensional matrix corresponding to the above dual function through an average value operation or a median operation to obtain a target dual function that only includes the dual variable dimension.

[0094] In a possible implementation, the above cyclic search unit includes: A search subunit, configured to search for a first target value on the above target dual function based on the above initial dual variable group to obtain a target initial dual variable; the above target initial dual variable is the initial dual variable in the above initial dual variable group that corresponds to the above target dual function taking the first target value; An update subunit, configured to update the above initial dual variable group based on the above target initial dual variable; An execution subunit is configured to execute again the step of searching for the first objective value on the above-mentioned objective dual function based on the above-mentioned initial dual variable group to obtain the objective initial dual variables, until the search depth corresponding to the above-mentioned objective dual function reaches a preset search depth, or the accuracy corresponding to the above-mentioned objective initial dual variables reaches a preset accuracy, or the value of the above-mentioned objective initial dual variables does not change within the above-mentioned preset search depth, then end the loop search for the first objective value of the above-mentioned objective dual function, and return the objective initial dual variables obtained in the last round of loop search as the population dual variables.

[0095] In a possible implementation manner, the above-mentioned update subunit is specifically configured to: uniformly insert a plurality of new initial dual variable values within a preset range before and after the above-mentioned objective initial dual variables; update the above-mentioned initial dual variable group to a dual variable group composed of the above-mentioned objective initial dual variables and the above-mentioned plurality of new initial dual variable values, or merge the above-mentioned plurality of new initial dual variable values into the above-mentioned initial dual variable group.

[0096] In a possible implementation manner, the above-mentioned virtual resource allocation device 600 further includes: A search interruption module is configured to interrupt the loop search for the first objective value of the above-mentioned objective dual function and send a failure warning message if the above-mentioned objective initial dual variables are equal to the boundary values of the above-mentioned objective range.

[0097] In a possible implementation manner, the above-mentioned virtual resource allocation device 600 further includes: A problem construction module is configured to construct the above-mentioned optimization problem based on the relevant parameters of the user under at least one virtual resource and the decision variables indicating whether to allocate a virtual resource to the above-mentioned user; the constraint conditions of the above-mentioned optimization problem include that each user is allocated only one virtual resource, and the total cost of the virtual resources allocated to at least one user does not exceed a preset total cost. A problem transformation module is configured to transform the above-mentioned optimization problem into a dual problem based on the constraint conditions of the above-mentioned optimization problem to obtain the above-mentioned dual function.

[0098] In a possible implementation manner, the above-mentioned virtual resource allocation module 620 includes: A second objective value search unit is configured to search for the second objective value on the corresponding decision optimization function of the above-mentioned dual function based on the above-mentioned objective dual variables, the target relevant parameters and target virtual resource costs of the current access user under at least one virtual resource, and at least one virtual resource type to obtain the target virtual resource type; the above-mentioned target virtual resource type is the virtual resource type corresponding to the second objective value of the above-mentioned decision optimization function among the above-mentioned at least one virtual resource types when the above-mentioned current access user and the above-mentioned objective dual variables are known. A resource allocation unit for allocating corresponding target virtual resources to the current accessing user according to the above-mentioned target virtual resource types.

[0099] In a possible implementation manner, the above-mentioned obtaining module 610 includes: A determination unit for determining the target group to which the current accessing user belongs based on the target attribute information of the current accessing user; An obtaining unit for obtaining the target dual variable corresponding to the current accessing user based on the target group identifier corresponding to the target group and the target access scenario identifier corresponding to the current accessing user.

[0100] In a possible implementation manner, the above-mentioned virtual resource allocation device 600 further includes: A relevant parameter calculation module for calculating, by using machine learning technology, the target relevant parameters of the current accessing user under at least one virtual resource based on the target user features of the current accessing user; the target user features include at least one of the following: target attribute information, target transaction frequency, historical virtual resource allocation and relevant parameter information.

[0101] The division of each module in the above-mentioned virtual resource allocation device is only for illustrative purposes. In other embodiments, the virtual resource allocation device may be divided into different modules as needed to complete all or part of the functions of the above-mentioned virtual resource allocation device. In the embodiments of the present application, the implementation of each module in the provided virtual resource allocation device may be in the form of a computer program. This computer program can run on a terminal or a server. The program module constituted by this computer program can be stored in the memory of the terminal or the server. When this computer program is executed by a processor, all or part of the steps of the virtual resource allocation method described in the embodiments of the present application are implemented.

[0102] Next, please refer to Figure 7 , Figure 7 which is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application. As Figure 7 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.

[0103] Among them, the communication bus 750 can be used to realize the connection and communication of the above-mentioned various components.

[0104] Among them, the user interface 730 may include a display screen (Display) and a camera (Camera). Optionally, the user interface may further include a standard wired interface and a wireless interface.

[0105] Among them, the network interface 720 may optionally include a Bluetooth module, a Near Field Communication (NFC) module, a Wireless Fidelity (Wi-Fi) module, etc.

[0106] Among them, the processor 710 may include one or more processing cores. The processor 710 connects various parts within the entire electronic device 700 through various interfaces and lines. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 740, and by calling data stored in the memory 740, it performs various functions of the routing electronic device 700 and processes data. Optionally, the processor 710 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 710 may integrate a combination of one or several of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs, etc.; the GPU is responsible for the rendering and drawing of the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 710 and may be implemented separately by a single chip.

[0107] Among them, the memory 740 may include Random Access Memory (RAM) and may also include 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, code, code sets, or instruction sets. The memory 740 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as acquisition function, virtual resource allocation function, dual solution function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store the data involved in the above-mentioned various method embodiments. The memory 740 is optionally also at least one storage device located far from the aforementioned processor 710. As Figure 7 shown, the memory 740, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs.

[0108] In some possible embodiments, the electronic device 700 is the virtual resource allocation device 600 mentioned in the foregoing Figure 6 embodiment. Then, the processor 710 may be used to call the virtual resource allocation application program stored in the memory 740 and specifically perform the following operations: obtaining a target dual variable corresponding to the current access user based on the target attribute information of the current access user; the target dual variable is the independent variable that makes the dual function corresponding to the optimization problem obtain a first target value; the optimization problem is used to determine the virtual resources allocated to the user; the target dual variable is obtained by using Flink to calculate and calling a solver to solve the dual function based on the user data of the historical access users; the user data includes the user characteristics of the historical access users and the relevant parameters of the historical access users under at least one virtual resource; allocating target virtual resources to the current access user based on the target dual variable and the target relevant parameters of the current access user under at least one virtual resource.

[0109] In some possible embodiments, the processor 710 is further configured to perform: after receiving the historical access operation of a historical access user, calculating, through Flink, the number of target historical access users belonging to the same group, and when the number of the target historical access users reaches a threshold, calling a 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 the independent variable that makes the dual function corresponding to the optimization problem under the same group obtain a first target value; associating and storing the group dual variable with the group identifier corresponding to the target historical access user.

[0110] In some possible embodiments, when the processor 710 calculates, through Flink, the number of target historical access users belonging to the same group after receiving the historical access operation of a historical access user, it is specifically configured to perform: after receiving the historical access operation of a historical access user, first filtering the user data of the historical access user through Flink calculation to obtain valid user data, then grouping the historical access users according to the user characteristics in the valid user data to obtain the groups to which the historical access users belong, and finally performing windowing processing according to the historical access time and the number of target historical access users belonging to the same group.

[0111] 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 correspond to different virtual resource structures allocated to the users, and different solvers are called through Flink calculation when solving the dual function; When the above-mentioned processor 710 executes the above-mentioned associated storage of the above-mentioned group dual variable with the group identifier corresponding to the above-mentioned target historical access user, it is specifically used to execute: associatively store the above-mentioned group dual variable with the group identifier corresponding to the above-mentioned target historical access user and a specific access scenario identifier.

[0112] In some possible embodiments, when the above-mentioned processor 710 executes the above-mentioned call to the solver to solve the above-mentioned dual function based on the user data of the above-mentioned target historical access user to obtain the group dual variable, it is specifically used to execute: initialize the dual variable in the above-mentioned dual function to obtain an initial dual variable group; the above-mentioned initial dual variable group includes a plurality of initial dual variables within a target range; construct a three-dimensional matrix corresponding to the above-mentioned dual function based on the user data of the above-mentioned target historical access user, the virtual resource cost of the above-mentioned target historical access user under at least one virtual resource, and the dual variable corresponding to the above-mentioned dual function; perform dimensionality reduction processing on the user dimension and the virtual resource dimension in the above-mentioned three-dimensional matrix to obtain a target dual function that only contains the dual variable dimension; perform a cyclic search for a first target value on the above-mentioned target dual function based on the above-mentioned initial dual variable group to obtain the group dual variable.

[0113] In some possible embodiments, when the above-mentioned processor 710 executes the above-mentioned dimensionality reduction processing on the user dimension and the virtual resource dimension in the above-mentioned three-dimensional matrix to obtain a target dual function that only contains the dual variable dimension, it is specifically used to execute: perform dimensionality reduction processing on the virtual resource dimension in the above-mentioned three-dimensional matrix through a maximum value operation to obtain a two-dimensional matrix corresponding to the above-mentioned dual function; perform dimensionality reduction processing on the user dimension in the two-dimensional matrix corresponding to the above-mentioned dual function through an average value operation or a median operation to obtain a target dual function that only contains the dual variable dimension.

[0114] In some possible embodiments, when the above-mentioned processor 710 performs the above-mentioned cyclic search for the first target value on the above-mentioned objective dual function based on the above-mentioned initial dual variable group to obtain the population dual variables, it is specifically used to perform: searching for the first target value on the above-mentioned objective dual function based on the above-mentioned initial dual variable group to obtain the target initial dual variables; the above-mentioned target initial dual variables are the initial dual variables in the above-mentioned initial dual variable group corresponding to the first target value of the above-mentioned objective dual function; updating the above-mentioned initial dual variable group based on the above-mentioned target initial dual variables, and then performing the above-mentioned step of searching for the first target value on the above-mentioned objective dual function based on the above-mentioned initial dual variable group to obtain the target initial dual variables again, until the search depth corresponding to the above-mentioned objective dual function reaches the preset search depth or the accuracy corresponding to the above-mentioned target initial dual variables reaches the preset accuracy or the value of the above-mentioned target initial dual variables within the above-mentioned preset search depth no longer changes, ending the cyclic search for the first target value of the above-mentioned objective dual function, and returning the target initial dual variables obtained in the last round of cyclic search as the population dual variables.

[0115] In some possible embodiments, when the above-mentioned processor 710 performs the above-mentioned update of the above-mentioned initial dual variable group based on the above-mentioned target initial dual variables, it is specifically used to perform: uniformly inserting a plurality of new initial dual variable values within a preset range before and after the above-mentioned target initial dual variables; updating the above-mentioned initial dual variable group to a dual variable group composed of the above-mentioned target initial dual variables and the above-mentioned plurality of new initial dual variable values, or merging the above-mentioned plurality of new initial dual variable values into the above-mentioned initial dual variable group.

[0116] In some possible embodiments, after the above-mentioned processor 710 performs the above-mentioned search for the first target value on the above-mentioned objective dual function based on the above-mentioned initial dual variable group to obtain the target initial dual variables, it is further used to perform: if the above-mentioned target initial dual variables are equal to the boundary values of the above-mentioned target range, interrupting the cyclic search for the first target value of the above-mentioned objective dual function and sending a failure warning message.

[0117] In some possible embodiments, the above-mentioned processor 710 is further used to perform: constructing the above-mentioned 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-mentioned user; the constraint conditions of the above-mentioned 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 constraint conditions of the above-mentioned optimization problem, transforming the optimization problem into a dual problem to obtain a dual function.

[0118] In some possible embodiments, when the above-mentioned processor 710 allocates target virtual resources for the current access user based on the above-mentioned target dual variable and the target-related parameters of the current access user under at least one virtual resource, it is specifically configured to perform: Search for a second target value on the corresponding decision optimization function of the dual function based on the above-mentioned target dual variable, the target-related parameters of the current access user under at least one virtual resource, 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 among the at least one virtual resource types when the current access user and the above-mentioned target dual variable are known; allocate the corresponding target virtual resources for the current access user according to the above-mentioned target virtual resource type.

[0119] In some possible embodiments, when the above-mentioned processor 710 obtains the target dual variable corresponding to the current access user based on the target attribute information of the current access user, it is specifically configured to perform: Determine the target group to which the current access user belongs based on the target attribute information of the current access user; obtain the target dual variable corresponding to the current access user based on the target group identifier corresponding to the target group and the target access scenario identifier corresponding to the current access user.

[0120] In some possible embodiments, before the above-mentioned processor 710 allocates target virtual resources for the current access user based on the above-mentioned target dual variable and the target-related parameters of the current access user under at least one virtual resource, it is further configured to perform: Using machine learning technology, calculate the target-related parameters of the current access user under at least one virtual resource based on the target user characteristics of the current access 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.

[0121] The embodiments of the present application further provide a computer-readable storage medium, in which instructions are stored. When the instructions are run on a computer or a processor, the computer or the processor is enabled to execute one or more steps in the above-mentioned embodiments. If the constituent modules of the electronic device are implemented in the form of software function units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0122] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part 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, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through 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 in a wired manner (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). 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 a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a Digital Versatile Disc (DVD)), or a semiconductor medium (such as a Solid State Disk (SSD), etc.).

[0123] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. This program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The foregoing storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disks, or optical discs. Without conflict, the technical features in this embodiment and the implementation solutions can be combined arbitrarily.

[0124] The above-described embodiments are only descriptions of the 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 deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present application shall fall within the protection scope determined by the claims.

[0125] The foregoing describes particular embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. 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 includes: Obtaining a target dual variable corresponding to the currently accessing user based on the target attribute information of the currently accessing user; the target dual variable is the independent variable that makes the dual function corresponding to the optimization problem obtain 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 through the Flink calculation calling a solver based on the user data of historical accessing users; the user data includes the user characteristics of the historical accessing users and the relevant parameters of the historical accessing users under at least one virtual resource; Allocating target virtual resources to the currently accessing user based on the target dual variable and the target relevant parameters of the currently accessing user under at least one virtual resource.

2. The method according to claim 1, wherein The method further includes: After receiving the historical access operation of a historical accessing user, calculating, through Flink, the number of target historical accessing users belonging to the same group. When the number of the target historical accessing users reaches a threshold, calling a solver to solve the dual function based on the user data of the target historical accessing users to obtain a group dual variable; the group dual variable is the independent variable that makes the dual function corresponding to the optimization problem under the same group obtain a first target value; Associatively storing the group dual variable with the group identifier corresponding to the target historical accessing user.

3. The method according to claim 2, wherein The calculating, after receiving the historical access operation of a historical accessing user, through Flink, the number of target historical accessing users belonging to the same group includes: After receiving the historical access operation of a historical accessing user, first filtering the user data of the historical accessing user through Flink calculation to obtain valid user data, then grouping the historical accessing users according to the user characteristics in the valid user data to obtain the group to which the historical accessing users belong, and finally performing windowing processing according to the historical access time and the number of target historical accessing users belonging to the same group.

4. The method according to claim 3, characterized in that, The valid user data is used to represent the user data of the historical accessing user in a specific access scenario; different specific access scenarios correspond to different virtual resource structures allocated to the user, and different solvers are called through Flink calculation when solving the dual function; The associatively storing the group dual variable with the group identifier corresponding to the target historical accessing user includes: Associatively storing the group dual variable with the group identifier corresponding to the target historical accessing user and the specific access scenario identifier.

5. The method according to claim 2, wherein The calling a solver to solve the dual function based on the user data of the target historical accessing users to obtain a group dual variable includes: 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 accessing users, the virtual resource cost of the target historical accessing users under at least one virtual resource, and the dual variables corresponding to the dual function; Perform dimensionality reduction on the user dimension and virtual resource dimension in the three-dimensional matrix to obtain an objective dual function that only contains the dual variable dimension; Based on the initial dual variable group, perform a cyclic search on the first objective value of the objective dual function to obtain a population of dual variables.

6. The method according to claim 5, wherein The performing dimensionality reduction on the user dimension and virtual resource dimension in the three-dimensional matrix to obtain an objective dual function that only contains the dual variable dimension includes: Perform dimensionality reduction on the virtual resource dimension in the three-dimensional matrix through a maximum value operation to obtain a two-dimensional matrix corresponding to the dual function; Perform dimensionality reduction on the user dimension in the two-dimensional matrix corresponding to the dual function through an average value operation or a median operation to obtain an objective dual function that only contains the dual variable dimension.

7. The method according to claim 5, wherein The based on the initial dual variable group, performing a cyclic search on the first objective value of the objective dual function to obtain a population of dual variables includes: Search for the first objective value of the objective dual function based on the initial dual variable group to obtain a target initial dual variable; the target initial dual variable is the initial dual variable in the initial dual variable group corresponding to the objective dual function taking the first objective value; Update the initial dual variable group based on the target initial dual variable, and then execute again the step of searching for the first objective value of 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 within the preset search depth no longer changes, then end the cyclic search for the first objective value of the objective dual function, and return the target initial dual variable obtained in the last round of cyclic search as the population of dual variables.

8. The method according to claim 7, wherein The updating the initial dual variable group based on the target initial dual variable includes: 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 composed 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.

9. The method according to claim 7, wherein After searching for the first objective value of the objective 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, then interrupt the cyclic search for the first objective value of the objective dual function and send a failure warning message.

10. The method according to any one of claims 1-9, characterized in that, The method further includes: Construct the 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 user; the constraint conditions of the 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 a preset total cost; Based on the constraint conditions of the optimization problem, transform the optimization problem into a dual problem to obtain the dual function.

11. The method according to claim 1, characterized in that Allocating target virtual resources for the current access user based on the target dual variable and the target-related parameters of the current access user under at least one virtual resource includes: Searching for a second target value on the corresponding decision optimization function of the dual function based on the target dual variable, the target-related parameters of the current access user under at least one virtual resource, the target virtual resource cost, and at least one virtual resource type to obtain a target virtual resource type; the target virtual resource type is the virtual resource type corresponding to the decision optimization function taking the second target value among the at least one virtual resource type when the current access user and the target dual variable are known; Allocating corresponding target virtual resources for the current access user according to the target virtual resource type.

12. The method according to claim 1, characterized in that, Obtaining the target dual variable corresponding to the current access user based on the target attribute information of the current access user includes: Determining the target group to which the current access user belongs based on the target attribute information of the current access user; Obtaining the target dual variable corresponding to the current access user based on the target group identifier corresponding to the target group and the target access scenario identifier corresponding to the current access user.

13. The method according to claim 1, wherein, Before allocating target virtual resources for the current access user based on the target dual variable and the target-related parameters of the current access user under at least one virtual resource, the method further includes: Using machine learning technology to calculate the target-related parameters of the current access user under at least one virtual resource based on the target user characteristics of the current access 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 includes: Obtaining the target virtual resources allocated for the current access user by the virtual resource allocation method according to any one of claims 1-13; Displaying the target virtual resources.

15. A virtual resource allocation device, characterized in that, The virtual resource allocation device includes: An acquisition module, configured to obtain the target dual variable corresponding to the current access user based on the target attribute information of the current access user; the target dual variable is the independent variable that makes the dual function corresponding to the optimization problem obtain 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 through Flink calculation and calling a solver based on the user data of historical access users; the user data includes the user characteristics of the historical access users and the related parameters of the historical access users under at least one virtual resource; A virtual resource allocation module, configured to allocate target virtual resources for the current access user based on the target dual variable corresponding to the current access user and the target-related parameters of the current access user under at least one virtual resource.

16. An electronic device, characterized in that, Including: 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 method steps described in any one of claims 1 to 14.

17. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, and the instructions are adapted to be loaded and executed by a processor to execute the method steps described in any one of claims 1 to 14.

Citation Information

Patent Citations

  • Virtual display resource processing method and device, computer equipment and storage medium

    CN112232878A

  • Resource optimal configuration method, device and equipment

    CN114580212A

  • Virtual resource distribution method and device

    CN117314030A

  • Method and device for processing back pressure of Flink operator

    CN118035050A

  • Edge calculation optimization method and system of intelligent video monitoring system

    CN118552882A