Virtual resource budget management method and device, storage medium and computing equipment
By collecting and verifying the business data of virtual resources in the virtual resource budget management system in real time, using point buried programs and message queue transmission, and combining historical data to generate budget rules, the real-time problem of the virtual resource budget management system is solved, and virtualization is realized Real-time checksum abnormal detection of resources improves the real-time and security of budget management.
Patent Information
- Application Number
- CN202411139123.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-26
AI Technical Summary
The existing virtual resource budget management system has poor real-time performance and cannot discover abnormalities in real-time, resulting in the untimely delayedness.
By introducing storage media and distributed processing systems into the budget management system, the service data of virtual resources can be collected and verified in real time, the buried point program and message queue can be used to realize real-time data transmission, and budget rules are generated based on historical data for real-time verification. Discover abnormalities in virtual resources in a timely manner.
Real-time checksum abnormal detection of virtual resources is realized, real-time performance of budget management is improved, the lag of periodic reconciliation is avoided, and the security and accuracy of virtual resources are ensured.
Smart Images

Figure CN119027252A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and more specifically, relate to a method, apparatus, storage medium and computing device for budget management of virtual resources. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the present disclosure. No description herein is admitted to be prior art by virtue of its inclusion in this section.
[0003] In order to avoid the loss of virtual resources due to business design defects, manual operation errors, etc., a budget management system can usually be deployed to perform budget management on virtual resources.
[0004] The budget management generally adopts the method of reconciling the virtual resources of the entire link to discover abnormal problems caused by inconsistent data.
[0005] However, this reconciliation method is performed periodically, that is, the virtual resources circulating within this cycle can be reconciled only at the end of each cycle. Therefore, there is a certain lag and abnormalities in virtual resources cannot be discovered in real time. Summary of the invention
[0006] In a first aspect of the disclosed embodiments, a method for budget management of virtual resources is provided. The method is applied to a budget management system, wherein the budget management system is connected to a storage medium and a distributed processing system; wherein the storage medium is used to store real-time business data and historical business data, and the distributed processing system is used to generate budget rules based on the historical business data; the method comprises:
[0007] Reading real-time business data to be verified from the storage medium; wherein the real-time business data involves the flow of virtual resources;
[0008] obtaining a budget rule from the distributed processing system;
[0009] A budget check is performed on the virtual resources involved in the real-time service data based on the budget rule to determine whether the virtual resources involved in the real-time service data pass the check of the budget rule.
[0010] Optionally, the storage medium includes a first type of storage resource for storing real-time business data, and a second type of storage resource for storing historical business data;
[0011] The method further comprises:
[0012] The real-time business data verified by the budget rule is transferred from the first type of storage resources to the second type of storage resources as historical business data.
[0013] Optionally, the first type of storage resources includes volatile storage resources, and the second type of storage resources includes non-volatile storage resources;
[0014] The real-time business data stored in the volatile storage resources is cached data;
[0015] The historical business data stored in non-volatile storage resources is persistent data.
[0016] Optionally, the budget management system manages several different business systems, and configures unique corresponding business identifiers for the different business systems;
[0017] The real-time business data is collected by a tracking program in the business system and stored in the storage medium, and the real-time business data also carries a business identifier of the business;
[0018] The obtaining of the budget rule from the distributed processing system comprises:
[0019] A budget rule corresponding to the service identifier is obtained from the distributed processing system.
[0020] Optionally, real-time business data is transmitted between the business system and the storage medium, and between the storage medium and the budget management system, by means of message queues.
[0021] Optionally, the real-time business data includes at least one of real-time issuance data related to virtual resource issuance, real-time exchange data related to virtual resource exchange, and real-time revenue and expenditure data related to virtual resource revenue and expenditure;
[0022] The obtaining of the budget rule from the distributed processing system comprises:
[0023] Based on the type of the real-time business data, a budget rule corresponding to the type is obtained from the distributed processing system.
[0024] Optionally, for real-time distribution data, the budget rule corresponding to the type includes an upper limit and / or a lower limit for distribution of virtual resources;
[0025] The performing budget verification on the virtual resources involved in the real-time service data based on the budget rule to determine whether the virtual resources involved in the real-time service data pass the verification of the budget rule includes:
[0026] Determine the relationship between the amount of virtual resources issued in the real-time issuance data and the upper limit and / or the lower limit;
[0027] If the amount of virtual resources is greater than the upper limit or less than the lower limit, it is determined that the real-time provisioning data fails to pass the check of the budget rule.
[0028] Optionally, the upper limit and / or lower limit of the virtual resource issuance is determined by the distributed processing system reading historical issuance data within a preset time period from the storage medium, and determining the maximum and / or minimum amount of virtual resources issued in the historical issuance data.
[0029] Optionally, the real-time issuance data is real-time issuance data generated within the current budget cycle; the upper limit and / or lower limit of issuing virtual resources further includes a predicted upper limit and / or predicted lower limit of each sub-time period within the current budget cycle;
[0030] The performing budget verification on the virtual resources involved in the real-time service data based on the budget rule to determine whether the virtual resources involved in the real-time service data pass the verification of the budget rule includes:
[0031] Determine the target sub-time period where the real-time distribution data is located according to the timestamp in the real-time distribution data; the timestamp includes the time when the real-time distribution data is generated;
[0032] Determine the relationship between the amount of virtual resources issued in the real-time issuance data and the predicted upper limit and / or predicted lower limit of the target sub-time period;
[0033] If the virtual resource amount is greater than the prediction upper limit or less than the prediction lower limit, it is determined that the real-time issuance data fails to pass the verification of the budget rule.
[0034] Optionally, the forecast upper limit and / or forecast lower limit of each sub-time period within the current budget cycle,
[0035] Historical payment data within a number of budget periods before now read from the storage medium by the distributed processing system;
[0036] Calculate the year-on-year data between the same sub-time periods based on the amount of virtual resources issued based on the historical issuance data of the same sub-time periods in different budget cycles;
[0037] The variance between the year-on-year data is calculated, the target synchronization data with the smallest variance value is taken, and the covariance of the target synchronization data is further calculated to obtain the forecast upper limit and / or forecast lower limit of each sub-time period in the current budget cycle.
[0038] Optionally, for real-time exchange data, the budget rule corresponding to the type includes an exchange ratio set, wherein the exchange ratio set is composed of all exchange ratios in the historical exchange data read by the distributed processing system from the storage medium;
[0039] The performing budget verification on the virtual resources involved in the real-time service data based on the budget rule to determine whether the virtual resources involved in the real-time service data pass the verification of the budget rule includes:
[0040] Obtaining the exchange ratio of virtual resources in the real-time exchange data;
[0041] Determining whether the exchange ratio is within the exchange ratio set;
[0042] If the exchange rate is not within the exchange rate set, it is determined that the real-time exchange data fails to pass the verification of the budget rule.
[0043] Optionally, the real-time income and expenditure data includes real-time income data and real-time expenditure data; the budget rule corresponding to the type includes an income and expenditure indicator range;
[0044] The performing budget verification on the virtual resources involved in the real-time service data based on the budget rule to determine whether the virtual resources involved in the real-time service data pass the verification of the budget rule includes:
[0045] In response to the scheduled start of the scheduled task, the real-time income data and the real-time expenditure data of the same business are data-associated according to the pre-configured business association configuration; and further, according to the pre-configured aggregation time window, the real-time income data and the real-time expenditure data of the data association located within the aggregation time window are data-aggregated to generate aggregated data;
[0046] Calculating the income and expenditure indicator in the aggregated data, and determining whether the income and expenditure indicator is within the income and expenditure indicator range;
[0047] If the revenue and expenditure indicator exceeds the revenue and expenditure indicator range, it is determined that the real-time revenue data and the real-time expenditure data included in the aggregated data fail to pass the verification of the budget rule.
[0048] In a second aspect of the embodiments of the present disclosure, a budget management device for virtual resources is provided, which is applied to a budget management system, wherein the budget management system is connected to a storage medium and a distributed processing system; wherein the storage medium is used to store real-time business data and historical business data, and the distributed processing system is used to generate budget rules based on the historical business data; the device includes:
[0049] A reading unit, reading the real-time business data to be verified from the storage medium; wherein the real-time business data involves the flow of virtual resources;
[0050] An acquisition unit, which acquires a budget rule from the distributed processing system;
[0051] The verification unit performs a budget verification on the virtual resources involved in the real-time service data based on the budget rule to determine whether the virtual resources involved in the real-time service data pass the verification of the budget rule.
[0052] In a third aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, comprising:
[0053] When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the budget management method for virtual resources as described in any of the preceding items.
[0054] In a fourth aspect of the embodiments of the present disclosure, there is provided a computing device, comprising:
[0055] processor;
[0056] a memory for storing instructions executable by the processor;
[0057] The processor is configured to execute the executable instructions to implement the budget management method of virtual resources as described in any of the preceding items.
[0058] According to the budget management solution for virtual resources provided by the embodiment of the present disclosure, the problem of poor real-time performance of budget management is solved by performing real-time verification on real-time business data. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:
[0060] Figure 1a The schematic diagram schematically shows the periodic reconciliation of full-link virtual resources adopted by the existing budget management system;
[0061] Figure 1b The system diagram of the budget management system provided by the present disclosure is schematically shown;
[0062] Figure 2 The schematic diagram of the budget management method of virtual resources provided by the present disclosure is schematically shown;
[0063] Figure 3 The schematic diagram schematically shows the flow of virtual resources in the business activities provided by the present disclosure;
[0064] Figure 4 The following schematically shows a schematic diagram of the sophisticated budget management provided by the present disclosure;
[0065] Figure 5 The medium schematic diagram provided by the present disclosure is schematically shown;
[0066] Figure 6 The schematic diagram of the budget management device for virtual resources provided by the present disclosure is schematically shown;
[0067] Figure 7 The schematic diagram of the computing device provided by the present disclosure is schematically shown.
[0068] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0069] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0070] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0071] According to an embodiment of the present disclosure, a budget management method for virtual resources, a computer-readable storage medium, an apparatus, and a computing device are proposed.
[0072] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0073] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.
[0074] The data involved in the present disclosure may be data authorized by the user or fully authorized by all parties. The collection, dissemination, and use of the data shall comply with the requirements of relevant national laws and regulations. The implementation methods / examples of the present disclosure may be combined with each other. SUMMARY OF THE INVENTION
[0076] The present disclosure aims to provide a budget management solution for virtual resources, which can ensure the security of virtual resources in real time and accurately. On the one hand, it can perform real-time verification of different types of business data such as virtual resource issuance and virtual resource exchange, so as to issue an alarm in time when an abnormality is found. On the other hand, it can collect and store data in real time, and monitor real-time income and expenditure data through automated data analysis capabilities, so as to provide real-time and accurate virtual resource security protection.
[0077] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.
[0078] Application Scenario Overview
[0079] First reference Figure 1a FIG. 1 is a schematic diagram of a periodic reconciliation of full-link virtual resources used in an existing budget management system. Figure 1a As shown in the figure, the overall reconciliation process generally includes three stages: data preparation, data verification, and exception handling.
[0080] The data preparation phase is used to record the business data generated in each cycle; the data verification phase is used to reconcile the business data in the cycle with virtual resources to find inconsistencies in virtual resource revenue and expenditure; the exception processing node is used to sort out the business data in the cycle when inconsistencies in virtual resource revenue and expenditure are found, identify the abnormal business data, and process the transactions involved in the business data, such as correcting the resource volume of virtual resources involved in the transaction.
[0081] As mentioned above, this reconciliation method is performed periodically, that is, the virtual resources circulating in this cycle can be reconciled only at the end of this cycle, so there is a certain lag, and it is impossible to discover the abnormality of virtual resources in real time. In actual applications, one day is generally used as a cycle, that is, 0:00 every day triggers the reconciliation of the virtual resources of the previous day, that is, T+1 day reconciliation.
[0082] In order to solve the real-time problem, this manual provides Figure 1b The system diagram of the budget management system is shown.
[0083] like Figure 1b As shown, the budget management system can be connected to a business system, a storage medium and a distributed processing system.
[0084] and Figure 1a The difference is that the budget management system has the ability to collect real-time business data and perform budget verification on real-time business data to improve the real-time nature of budget management.
[0085] Specifically, by configuring unique corresponding business identifiers for different business systems, when a business system conducts a transaction of virtual resources, the real-time business data generated by it will automatically carry the business identifier of the business system, and automatically report the real-time business data to the storage medium through the tracking program of the business system. The budget management system can read the collected real-time business data from the storage medium in real time, and perform budget verification on the real-time business data according to the budget rules in the distributed storage system.
[0086] Among them, real-time business data is transmitted in real time between the business system and the storage medium, and between the storage medium and the budget management system through message queues, thereby improving the processing speed of business data and meeting the real-time requirements for real-time business data.
[0087] Exemplary Methods
[0088] Combine the following Figure 1b The application scenario shown is shown in Figure 2 To describe the method of budget management of virtual resources according to an exemplary embodiment of the present disclosure. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this regard. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0089] like Figure 2 As shown, the budget management method of virtual resources can be applied to the aforementioned budget management system, and the budget management system is connected to a storage medium and a distributed processing system; wherein the storage medium is used to store real-time business data and historical business data, and the distributed processing system is used to generate budget rules based on the historical business data; the method may include the following steps:
[0090] Step 210: Reading the real-time business data to be verified from the storage medium; wherein the real-time business data involves the flow of virtual resources;
[0091] Step 220: Obtaining budget rules from the distributed processing system;
[0092] Step 230: Perform budget verification on the virtual resources involved in the real-time business data based on the budget rule to determine whether the virtual resources involved in the real-time business data pass the verification of the budget rule.
[0093] In an exemplary embodiment, the budget management system manages a number of different business systems and configures unique corresponding business identifiers for the different business systems;
[0094] The real-time business data is collected by a tracking program in the business system and stored in the storage medium, and the real-time business data also carries a business identifier of the business;
[0095] Accordingly, the above step 220 may include:
[0096] A budget rule corresponding to the service identifier is obtained from the distributed processing system.
[0097] In this embodiment, tracking can be performed in each business system, and the business identifier assigned to the business system can be recorded at the same time. In this way, when a transaction involving virtual resources occurs in the business system, the tracking program will be automatically triggered, and the tracking program will collect the real-time business data generated by the transaction, carry the business identifier in the real-time business data, and report the real-time business data to the storage medium.
[0098] Exemplarily, the real-time business data can be transmitted between the business system and the storage medium and between the storage medium and the budget management system by means of a message queue. Specifically, the real-time business data collected by the tracking program can be first cleaned to filter out meaningless, non-compliant and other abnormal data.
[0099] The data cleaning can be done with the help of a FaaS computing cluster, that is, the business system can be connected to or accessed with FaaS, and the collected real-time business data can be provided to FaaS. After FaaS cleans the real-time business data, it sends the cleaned real-time business data to a message queue (such as nydus or kafka) in the form of a message queue message, thereby writing the real-time business data into the message queue. Then, the storage medium stores the real-time business data in the message queue locally (stored in the storage resources of the storage medium) by consuming the message queue, thereby completing the process of real-time business data collection.
[0100] Since the storage medium stores real-time business data, the budget management system can complete the verification of the real-time business data through the above steps 210-230. The storage medium and the budget management system also use message queues to transmit real-time business data to improve data real-time performance.
[0101] Through the above embodiments, the use of embedding points and message queues can timely collect real-time business data, and timely verify the collected real-time business data, thereby improving the processing speed of business data and meeting the real-time requirements for business data. In this way, abnormalities of virtual resources can be discovered in a timely manner, avoiding the lag in periodic reconciliation.
[0102] In an exemplary embodiment, the storage medium may include a first type of storage resource for storing real-time business data, and a second type of storage resource for storing historical business data;
[0103] After determining that the virtual resources involved in the real-time service data have passed the budget rule verification in step 230, the real-time service data that has passed the budget rule verification may be further transferred from the first type of storage resources to the second type of storage resources as historical service data.
[0104] In this specification, the storage medium can be used not only to store real-time business data, but also to store historical business data collected historically; and in order to isolate real-time business data and historical business data, different storage resources can be used to store them separately. In this way, when the budget management system reads real-time business data, it can read directly from the first type of storage resources without paying attention to whether the historical business data is read. Similarly, when the distributed processing system reads historical business data, it can read directly from the second type of storage resources without paying attention to whether the real-time business data is read.
[0105] In an exemplary embodiment, the first type of storage resources may include volatile storage resources, and the second type of storage resources may include non-volatile storage resources;
[0106] Among them, the real-time business data stored in the volatile storage resources is cache data; the historical business data stored in the non-volatile storage resources is persistent data.
[0107] Exemplarily, the volatile storage resources may include, but are not limited to, Redis (Remote Dictionary Server), Hazelcas (distributed memory cache), and the like.
[0108] The non-volatile storage resources may include but are not limited to DDB (Distributed Database), MongoDB (distributed file storage database), etc.
[0109] In an exemplary embodiment, the real-time business data includes at least one of real-time issuance data related to virtual resource issuance, real-time exchange data related to virtual resource exchange, and real-time revenue and expenditure data related to virtual resource revenue and expenditure;
[0110] The above step 220 may include:
[0111] Based on the type of the real-time business data, a budget rule corresponding to the type is obtained from the distributed processing system.
[0112] like Figure 3FIG. 1 is a schematic diagram of the flow of virtual resources in a business activity. The business system can publish some tasks for users to participate in, and users can choose to participate in obtaining and completing related tasks.
[0113] When a user completes a task, the virtual resource distribution can be triggered, and the business system distributes the virtual resources corresponding to the task to the user account, thereby generating real-time distribution data. The virtual resources may include points, gold coins, etc.
[0114] When a user accumulates a certain amount of virtual resources, he can use the accumulated virtual resources for redemption operations. For example, the accumulated gold coins can be exchanged for cash, phone bills, electronic coupons and other items according to the exchange ratio. In response to the exchange operation, the business system recovers the virtual resources used for exchange in the user account and issues the exchanged items to the user account or other accounts associated with the user account (such as bank accounts, third-party payment accounts, etc.). After the exchange is completed, the business system can generate real-time exchange data accordingly.
[0115] For the budget management system, all business data on the virtual resource flow link can constitute real-time income and expenditure data. The business system needs to count the real-time income and expenditure data of virtual resources and verify whether there are any abnormalities in the income and expenditure of virtual resources as a whole.
[0116] In an exemplary embodiment, for real-time issuance data, the budget rule corresponding to the type includes an upper limit and / or a lower limit for issuing virtual resources;
[0117] Accordingly, the above step 230 may include:
[0118] Determine the relationship between the amount of virtual resources issued in the real-time issuance data and the upper limit and / or the lower limit;
[0119] If the amount of virtual resources is greater than the upper limit or less than the lower limit, it is determined that the real-time provisioning data fails to pass the check of the budget rule.
[0120] In this embodiment, by defining a budget rule including an upper limit and / or a lower limit for issuing virtual resources, the real-time issuance number can be verified, and abnormalities of virtual resources exceeding the upper limit and abnormalities of business activities falling short of expectations below the lower limit can be identified in a timely manner.
[0121] Specifically, for the budget management system, since the completion conditions of the task and the amount of virtual resources issued to complete the task are pre-defined manually, there may be unreasonable definitions.
[0122] For example, if the amount of virtual resources issued for completing a task is defined too high, a large amount of virtual resources may be issued suddenly, which may cause losses to the business system because virtual resources can be exchanged for valuable items.
[0123] By comparing the amount of virtual resources issued in real-time issuance data with the upper limit in the preset rules, the abnormality of the virtual resource amount being defined too high can be discovered in time. Furthermore, an alarm can be sent to business operations to remind operations to modify the amount of virtual resources issued to complete the task in time to avoid the expansion of losses.
[0124] For example, if a series of tasks are difficult, the number of tasks that users can complete is limited, and the amount of virtual resources they can obtain will also be small. By comparing the amount of virtual resources issued in the real-time issuance data with the lower limit of the preset rule, if it is less than the lower limit, it can be inferred that the business is abnormal or the activity effect is not good. Furthermore, an alarm can be sent to the business operation to remind the operation to reduce the task completion conditions in time and promote the normal progress of the activity.
[0125] In an exemplary embodiment, the upper limit and / or lower limit of the issuance of virtual resources may be historical issuance data within a preset time period from now read by the distributed processing system from the storage medium, and the maximum value and / or minimum value of the amount of virtual resources issued in the historical issuance data may be determined.
[0126] This embodiment provides a solution for dynamically adjusting the upper limit and / or lower limit of issuing virtual resources in a preset rule. Specifically, the distributed processing system reads the historical issuance data within a preset time from the storage medium, and determines the maximum value of the virtual resource amount as the upper limit of issuing virtual resources, and the minimum value of the virtual resource amount as the lower limit of issuing virtual resources. In this way, the upper limit and / or lower limit can be automatically iterated without manual writing.
[0127] In an exemplary embodiment, the real-time issuance data is the real-time issuance data generated in the current budget cycle; the upper limit and / or lower limit of the issuance of virtual resources may further include a predicted upper limit and / or predicted lower limit of each sub-time period in the current budget cycle;
[0128] Accordingly, the above step 230 may include:
[0129] Determine the target sub-time period where the real-time distribution data is located according to the timestamp in the real-time distribution data; the timestamp includes the time when the real-time distribution data is generated;
[0130] Determine the relationship between the amount of virtual resources issued in the real-time issuance data and the predicted upper limit and / or predicted lower limit of the target sub-time period;
[0131] If the virtual resource amount is greater than the prediction upper limit or less than the prediction lower limit, it is determined that the real-time issuance data fails to pass the verification of the budget rule.
[0132] This embodiment adds more sophisticated budget management based on the above-mentioned solution of dynamically adjusting the upper limit and / or lower limit of issuing virtual resources in the preset rules. Figure 4 As shown in the figure, the historical distribution data of the past 16 days is read and divided into hourly dimensions, i.e. one day is divided into 24 sub-time periods, with one hour as one sub-time period. The upper and / or lower limits of the forecast for each time period are further calculated for the historical distribution data of the past 16 days.
[0133] like Figure 4 As shown, the predicted upper limit and lower limit of the virtual resource volume at 17:00-18:00 on the 16th are calculated based on the historical release data at 17:00-18:00 between the 1st and the 15th.
[0134] In this way, when the real-time distribution data generated between 17:00-18:00 on the 16th is collected, the anomaly can be discovered in time by comparing it with the forecast upper limit and forecast lower limit of 17:00-18:00.
[0135] In an exemplary embodiment, the forecast upper limit and / or forecast lower limit of each sub-time period in the current budget cycle,
[0136] Historical payment data within a number of budget periods before now read from the storage medium by the distributed processing system;
[0137] Calculate the year-on-year data between the same sub-time periods based on the amount of virtual resources issued based on the historical issuance data of the same sub-time periods in different budget cycles;
[0138] The variance between the year-on-year data is calculated, the target synchronization data with the smallest variance value is taken, and the covariance of the target synchronization data is further calculated to obtain the forecast upper limit and / or forecast lower limit of each sub-time period in the current budget cycle.
[0139] In this embodiment, the year-on-year data between each sub-time period within different budget cycles are calculated and the variances between the various year-on-year data are compared. Since the size of the variance represents the amplitude of data fluctuation, the target synchronization data with the smallest variance in each time period is taken for covariance calculation, thereby predicting the upper limit and / or lower limit of prediction for each sub-time period in the future cycle.
[0140] In an exemplary embodiment, for real-time exchange data, the budget rule corresponding to the type includes an exchange ratio set, wherein the exchange ratio set is composed of all exchange ratios in the historical exchange data read by the distributed processing system from the storage medium;
[0141] Accordingly, the above step 230 may include:
[0142] Obtaining the exchange ratio of virtual resources in the real-time exchange data;
[0143] Determining whether the exchange ratio is within the exchange ratio set;
[0144] If the exchange rate is not within the exchange rate set, it is determined that the real-time exchange data fails to pass the verification of the budget rule.
[0145] In this embodiment, by defining a budget rule including a set of exchange ratios, real-time exchange data can be verified, so that real-time exchange data with abnormal exchange ratios can be identified in a timely manner.
[0146] Specifically, for the budget management system, since the exchange ratio of virtual resources is pre-defined manually, there may be a situation where the exchange ratio is not defined reasonably.
[0147] For example, the reasonable exchange ratio between virtual resources and cash is 100:1 (that is, 100 virtual resources are exchanged for 1 cash), but due to configuration or code logic bugs, the actual exchange ratio is defined as 50:1. In this case, users can exchange the same virtual resources for twice as much cash, causing losses to the business system.
[0148] In actual business, the exchange ratio has a certain continuity. By collecting the exchange ratios in the historical exchange data, an exchange ratio set is constructed. If the exchange ratio of the real-time exchange data is not in the exchange ratio set, it means that the exchange ratio of the real-time exchange data may deviate from the normal exchange ratio range. Therefore, such real-time exchange data can be identified as abnormal. Furthermore, an alarm can be sent to the business operation to remind the operation to modify the exchange ratio in time, or to check and fix the bugs in the code logic to avoid the expansion of losses.
[0149] In an exemplary embodiment, the real-time income and expenditure data includes real-time income data and real-time expenditure data; the budget rule corresponding to the type includes an income and expenditure indicator range;
[0150] Accordingly, the above step 230 may include:
[0151] In response to the scheduled start of the scheduled task, the real-time income data and the real-time expenditure data of the same business are data-associated according to the pre-configured business association configuration; and further, according to the pre-configured aggregation time window, the real-time income data and the real-time expenditure data of the data association located within the aggregation time window are data-aggregated to generate aggregated data;
[0152] Calculating the income and expenditure indicator in the aggregated data, and determining whether the income and expenditure indicator is within the income and expenditure indicator range;
[0153] If the revenue and expenditure indicator exceeds the revenue and expenditure indicator range, it is determined that the real-time revenue data and the real-time expenditure data included in the aggregated data fail to pass the verification of the budget rule.
[0154] In this embodiment, by defining a budget rule that includes a revenue and expenditure indicator range, real-time revenue and expenditure data can be verified. Abnormal real-time revenue and expenditure data that exceeds the revenue and expenditure indicator range can be identified in a timely manner. The revenue and expenditure indicators may include but are not limited to year-on-year indicators, month-on-month indicators, sudden change indicators, etc.
[0155] Specifically, for the budget management system, the real-time income data and real-time expenditure data that are associated are aggregated through a scheduled task to generate aggregated data of the real-time income data and real-time expenditure data associated with the data within the aggregation time window; then the income and expenditure indicators of the aggregated data are counted and compared with the income and expenditure indicator range, so as to identify income and expenditure anomalies that exceed the income and expenditure indicator range. In this way, it is possible to verify whether there are any abnormalities in the income and expenditure of virtual resources from a macro perspective.
[0156] Exemplarily, when the business system reports real-time business data through a message queue, it can be defined whether the real-time business data is real-time income data or real-time expenditure data, thereby facilitating data aggregation by the budget management system.
[0157] Let's take an event held by the business system as an example. This event will issue a prize ticket A worth 10 to each participating user, and 5 prize tickets A can be combined into a prize ticket B worth 55. In this process, the user actually uses 5 prize tickets A with a total value of 50 to combine a prize ticket B with a value of 55, so the business system actually provides an additional subsidy.
[0158] In this synthesis method, the activity strategy should be designed so that most users can obtain less than 5 coupons B, and a small number of users can obtain more than 5 coupons A. However, if there is a problem with the activity strategy design, it may cause users to easily obtain a large number of coupons A and then synthesize them into reward B, thereby magnifying the losses of the business system.
[0159] To this end, the budget management system uses a scheduled task to associate the data of Lottery Coupon A received by each user (real-time income data) and the Lottery Coupon A redeemed (real-time expenditure data), and aggregates the data every 5 minutes (aggregation time window), and counts the income and expenditure indicators of Lottery Coupon A received and Lottery Coupon A redeemed in each 5 minutes. If there are a large number of users who use Lottery Coupon A within a target aggregation time window, then the income and expenditure indicators of this target aggregation time window will inevitably exceed the income and expenditure indicator range, thereby discovering abnormalities in the activity strategy design.
[0160] Exemplary Media
[0161] After introducing the method of the exemplary embodiment of the present disclosure, next, refer to Figure 5 A medium according to an exemplary embodiment of the present disclosure is described.
[0162] In this exemplary embodiment, the above method can be implemented by a program product, such as a portable compact disk read-only memory (CD-ROM) and including program code, and can be run on a device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus, or a device.
[0163] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0164] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0165] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RE, etc., or any suitable combination of the foregoing.
[0166] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0167] In summary, the present disclosure can provide a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the aforementioned embodiment of the budget management method for virtual resources.
[0168] Exemplary Devices
[0169] After introducing the medium of the exemplary embodiment of the present disclosure, next, reference is made to Figure 6 A device according to an exemplary embodiment of the present disclosure is described.
[0170] Figure 6 The block diagram schematically shows a virtual resource budget management device according to an embodiment of the present disclosure, corresponding to the aforementioned Figure 2 The method embodiment shown is applied to a budget management system, the budget management system is connected to a storage medium and a distributed processing system; wherein the storage medium is used to store real-time business data and historical business data, the distributed processing system is used to generate budget rules based on the historical business data, and the budget management device of the virtual resource may include:
[0171] The reading unit 910 reads the real-time business data to be verified from the storage medium; wherein the real-time business data involves the flow of virtual resources;
[0172] An acquisition unit 920, which acquires a budget rule from the distributed processing system;
[0173] The verification unit 930 performs a budget verification on the virtual resources involved in the real-time service data based on the budget rule to determine whether the virtual resources involved in the real-time service data pass the verification of the budget rule.
[0174] Optionally, the storage medium includes a first type of storage resource for storing real-time business data, and a second type of storage resource for storing historical business data;
[0175] The device also includes:
[0176] The transfer unit 940 transfers the real-time business data verified by the budget rule as historical business data from the first type of storage resources to the second type of storage resources.
[0177] Optionally, the first type of storage resources includes volatile storage resources, and the second type of storage resources includes non-volatile storage resources;
[0178] The real-time business data stored in the volatile storage resources is cached data;
[0179] The historical business data stored in non-volatile storage resources is persistent data.
[0180] Optionally, the budget management system manages several different business systems, and configures unique corresponding business identifiers for the different business systems;
[0181] The real-time business data is collected by a tracking program in the business system and stored in the storage medium, and the real-time business data also carries a business identifier of the business;
[0182] The acquisition unit 920 is further configured to acquire a budget rule corresponding to the service identifier from the distributed processing system.
[0183] Optionally, real-time business data is transmitted between the business system and the storage medium, and between the storage medium and the budget management system, by means of message queues.
[0184] Optionally, the real-time business data includes at least one of real-time issuance data related to virtual resource issuance, real-time exchange data related to virtual resource exchange, and real-time revenue and expenditure data related to virtual resource revenue and expenditure;
[0185] The acquisition unit 920 is further configured to acquire, based on the type of the real-time business data, a budget rule corresponding to the type from the distributed processing system.
[0186] Optionally, for real-time distribution data, the budget rule corresponding to the type includes an upper limit and / or a lower limit for distribution of virtual resources;
[0187] The verification unit 930 further includes:
[0188] Determine the relationship between the amount of virtual resources issued in the real-time issuance data and the upper limit and / or lower limit; if the amount of virtual resources is greater than the upper limit or less than the lower limit, determine that the real-time issuance data fails to pass the verification of the budget rule.
[0189] Optionally, the upper limit and / or lower limit of the virtual resource issuance is determined by the distributed processing system reading historical issuance data within a preset time period from the storage medium, and determining the maximum and / or minimum amount of virtual resources issued in the historical issuance data.
[0190] Optionally, the real-time issuance data is real-time issuance data generated within the current budget cycle; the upper limit and / or lower limit of issuing virtual resources further includes a predicted upper limit and / or predicted lower limit of each sub-time period within the current budget cycle;
[0191] The verification unit 930 includes:
[0192] The budget verification sub-unit 931 determines the target sub-time period of the real-time issuance data according to the timestamp in the real-time issuance data; the timestamp includes the moment when the real-time issuance data is generated; determines the relationship between the amount of virtual resources issued in the real-time issuance data and the predicted upper limit and / or predicted lower limit of the target sub-time period; if the amount of virtual resources is greater than the predicted upper limit or less than the predicted lower limit, determines that the real-time issuance data has not passed the verification of the budget rule.
[0193] Optionally, the forecast upper limit and / or forecast lower limit of each sub-time period within the current budget cycle is based on the historical issuance data of several budget cycles before the present read by the distributed processing system from the storage medium; the year-on-year data between the same sub-time periods is calculated based on the amount of virtual resources issued according to the historical issuance data of the same sub-time period in different budget cycles; the variance between the year-on-year data is calculated, the target synchronization data with the smallest variance value is taken, and the covariance of the target synchronization data is further calculated to obtain the forecast upper limit and / or forecast lower limit of each sub-time period within the current budget cycle.
[0194] Optionally, for real-time exchange data, the budget rule corresponding to the type includes an exchange ratio set, wherein the exchange ratio set is composed of all exchange ratios in the historical exchange data read by the distributed processing system from the storage medium;
[0195] The verification unit 930 includes:
[0196] The exchange verification subunit 933 obtains the exchange ratio of the virtual resources in the real-time exchange data; determines whether the exchange ratio is in the exchange ratio set; if the exchange ratio is not in the exchange ratio set, determines that the real-time exchange data has not passed the verification of the budget rule.
[0197] Optionally, the real-time income and expenditure data includes real-time income data and real-time expenditure data; the budget rule corresponding to the type includes an income and expenditure indicator range;
[0198] The verification unit 930 includes:
[0199] The income and expenditure verification subunit 935, in response to the scheduled start of the scheduled task, data-associates the real-time income data and real-time expenditure data of the same business according to the pre-configured business association configuration; and further data-aggregates the real-time income data and real-time expenditure data associated with the data within the aggregation time window according to the pre-configured aggregation time window to generate aggregated data; calculates the income and expenditure statistical indicators in the aggregated data, and determines whether the income and expenditure statistical indicators are within the income and expenditure indicator range; if the income and expenditure statistical indicators exceed the income and expenditure indicator range, determines that the real-time income data and real-time expenditure data contained in the aggregated data have not passed the verification of the budget rule.
[0200] Exemplary Computing Devices
[0201] After introducing the method, medium and apparatus of the exemplary embodiments of the present disclosure, next, reference is made to Figure 7 A computing device according to an exemplary embodiment of the present disclosure is described.
[0202] Figure 7 The computing device 1500 shown is merely an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present disclosure.
[0203] like Figure 7 As shown, computing device 1500 is in the form of a general computing device. Components of computing device 1500 may include, but are not limited to: at least one processing unit 1501, at least one storage unit 1502, and a bus 1503 connecting different system components (including processing unit 1501 and storage unit 1502).
[0204] The bus 1503 includes a data bus, a control bus, and an address bus.
[0205] The storage unit 1502 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 15021 and / or a cache memory 15022 , and may further include a readable medium in the form of a non-volatile memory, such as a read-only memory (ROM) 15023 .
[0206] The storage unit 1502 may also include a program / utility 15025 having a set (at least one) of program modules 15024, such program modules 15024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0207] The computing device 1500 may also communicate with one or more external devices 1504 (eg, a keyboard, pointing device, etc.).
[0208] Such communication may be performed via input / output (I / O) interface 1505. In addition, computing device 1500 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via network adapter 1506. Figure 7 As shown, network adapter 1506 communicates with other modules of computing device 1500 via bus 1503. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with computing device 1500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0209] Through Figure 7 The computing device 1500 shown can implement the aforementioned budget management method for virtual resources. More specifically, the storage unit 1502 stores instructions executable by the processing unit 1501. When the processing unit 1501 executes the instructions, the aforementioned budget management method for virtual resources is implemented.
[0210] It should be noted that, although several units / modules or sub-units / modules of the budget management device for virtual resources are mentioned in the above detailed description, such division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided to be embodied by multiple units / modules.
[0211] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0212] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.
Claims
1. A budget management method for virtual resources, applied to a budget management system, wherein the budget management system is connected to a storage medium and a distributed processing system; wherein: The storage medium is used to store real-time business data and historical business data, and the distributed processing system is used to generate budget rules based on the historical business data; the method includes: Reading real-time business data to be verified from the storage medium; wherein the real-time business data involves the flow of virtual resources; obtaining a budget rule from the distributed processing system; A budget check is performed on the virtual resources involved in the real-time service data based on the budget rule to determine whether the virtual resources involved in the real-time service data pass the check of the budget rule.
2. According to the method of claim 1, the storage medium comprises a first type of storage resource for storing real-time business data, and a second type of storage resource for storing historical business data; The method further comprises: The real-time business data verified by the budget rule is transferred from the first type of storage resources to the second type of storage resources as historical business data.
3. The method according to claim 2, wherein the first type of storage resources comprises volatile storage resources, and the second type of storage resources comprises non-volatile storage resources; The real-time business data stored in the volatile storage resources is cached data; The historical business data stored in non-volatile storage resources is persistent data.
4. According to the method of claim 1, the budget management system manages a number of different business systems and configures unique corresponding business identifiers for the different business systems; The real-time business data is collected by a tracking program in the business system and stored in the storage medium, and the real-time business data also carries a business identifier of the business; The obtaining of the budget rule from the distributed processing system comprises: A budget rule corresponding to the service identifier is obtained from the distributed processing system.
5. According to the method of claim 4, real-time business data is transmitted between the business system and the storage medium, and between the storage medium and the budget management system, by means of message queues.
6. The method according to claim 1, wherein the real-time business data comprises at least one of real-time issuance data related to virtual resource issuance, real-time exchange data related to virtual resource exchange, and real-time revenue and expenditure data related to virtual resource revenue and expenditure; The obtaining of the budget rule from the distributed processing system comprises: Based on the type of the real-time business data, a budget rule corresponding to the type is obtained from the distributed processing system.
7. The method according to claim 6, wherein for real-time distribution data, the budget rule corresponding to the type includes an upper limit and / or a lower limit for distributing virtual resources; The performing budget verification on the virtual resources involved in the real-time service data based on the budget rule to determine whether the virtual resources involved in the real-time service data pass the verification of the budget rule includes: Determine the relationship between the amount of virtual resources issued in the real-time issuance data and the upper limit and / or the lower limit; If the amount of virtual resources is greater than the upper limit or less than the lower limit, it is determined that the real-time provisioning data fails to pass the check of the budget rule.
8. A budget management device for virtual resources, applied to a budget management system, wherein the budget management system is connected to a storage medium and a distributed processing system; wherein: The storage medium is used to store real-time business data and historical business data, and the distributed processing system is used to generate budget rules based on the historical business data; the device includes: A reading unit, reading the real-time business data to be verified from the storage medium; wherein the real-time business data involves the flow of virtual resources; An acquisition unit, which acquires a budget rule from the distributed processing system; The verification unit performs a budget verification on the virtual resources involved in the real-time service data based on the budget rule to determine whether the virtual resources involved in the real-time service data pass the verification of the budget rule.
9. A computer-readable storage medium, comprising: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the budget management method for virtual resources as described in any one of claims 1 to 7.
10. A computing device comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the executable instructions to implement the budget management method for virtual resources according to any one of claims 1 to 7.
