Resource management method and device
By monitoring the total resource amount and current resource amount of the target object, calculating the target loss ratio, and performing target operations when the threshold is exceeded, the problem of difficulty in controlling resource risks in a timely and accurate manner is solved, and effective resource management and maximum security is achieved change.
Patent Information
- Application Number
- CN202510049362.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, manual monitoring is difficult to identify and control resource risks in a timely and accurate manner, especially in scenarios with large transaction volume and high transaction frequency, resource management is even more difficult.
By obtaining the total resource amount of the target object, and when the total resource amount exceeds the preset resource threshold, the target loss ratio of the target object is determined based on the target resource amount at the current moment. When the target loss ratio exceeds the preset proportion threshold, perform a target operation on the target object.
It realizes effective management of resources, timely discovers resource usage and possible problems, ensures the security and maximization of resources, improves work efficiency, and solves the problem of difficulty in time and accurately controlling risks in a manual monitoring.
Smart Images

Figure CN119477548A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the computer field, and in particular, to a resource management method and device. Background Art
[0002] Resource management is crucial to the protection and effective use of resources. However, existing monitoring and management methods mostly rely on manual work, which not only increases operating costs and error rates, but also makes it difficult to adapt to the rapidly changing needs of the market. Manual monitoring often fails to identify and control risks in a timely and accurate manner, especially in scenarios with large transaction volumes and high transaction frequencies, making resource management more difficult.
[0003] There is currently no effective solution to the above problems. Summary of the invention
[0004] The embodiments of the present invention provide a method and device for resource management, so as to at least solve the problem in the related art that manual monitoring is difficult to control risks in a timely and accurate manner.
[0005] According to one embodiment of the present invention, a method for resource management is provided, including: obtaining the total amount of resources of a target object, wherein the total amount of resources is the cumulative sum of resources of the target object within a historical time range, and the historical time range includes a preset duration before a current moment; in a case where the total amount of resources exceeds a preset resource threshold, determining a target loss ratio of the target object based on the target resource amount of the target object at the current moment; in a case where the target loss ratio exceeds a preset ratio threshold, performing a target operation on the target object.
[0006] In an exemplary embodiment, the target loss ratio of the target object is determined based on the target resource amount of the target object at the current moment, including: when the target resource amount is greater than or equal to a preset resource amount, determining the target loss ratio based on the direction of the target resource amount.
[0007] In an exemplary embodiment, the target loss ratio is determined according to the direction of the target resource quantity, including: determining the value of a first parameter consistent with the direction of the target resource quantity in the resource records within the historical time range to obtain a first parameter value set; determining the record containing the first parameter value in the resource record as the target record to obtain a target record set; obtaining the value of a second parameter in each target record in the target record set to obtain a second parameter value set; and determining the target loss ratio according to the second parameter set value.
[0008] In an exemplary embodiment, determining the target loss ratio based on the second parameter value set includes: obtaining the weight of each target record in the target record set to obtain a target weight set; and determining the target loss ratio based on the second parameter value set and the target weight set.
[0009] In an exemplary embodiment, the target loss ratio is determined based on the second parameter value set and the target weight set, including: performing a weighted average operation on each second parameter value of the second parameter value set and the corresponding weight in the target weight set to obtain a target mean; and determining the target loss ratio based on the target mean.
[0010] In an exemplary embodiment, the target loss ratio is determined based on the target mean, including: obtaining the value of the second parameter of the target object at the current moment to obtain the target parameter value; when the direction of the target resource quantity is positive, determining the difference between the target parameter value and the target mean as the first difference; and determining the ratio between the first difference and the target mean as the target loss ratio.
[0011] In an exemplary embodiment, the method further includes: when the direction of the target resource quantity is a negative direction, determining the difference between the target mean and the target parameter value as a second difference; and determining the ratio between the second difference and the target parameter value as the target loss ratio.
[0012] According to another embodiment of the present invention, there is provided a resource management device, comprising: an acquisition module, used to acquire the total amount of resources of a target object, wherein the total amount of resources is the cumulative sum of resources of the target object within a historical time range, and the historical time range includes a preset duration before a current moment; a determination module, used to determine a target loss ratio of the target object according to the target resource amount of the target object at the current moment when the total amount of resources exceeds a preset resource threshold; and an execution module, used to perform a target operation on the target object when the target loss ratio exceeds a preset ratio threshold.
[0013] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0014] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0015] According to yet another embodiment of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0016] Through the present invention, since the total amount of resources of the target object is monitored, and when the total amount of resources exceeds the preset resource threshold, the target loss ratio of the target object is determined according to the target amount of resources at the current moment, and when the target loss ratio exceeds the preset ratio threshold, the target operation is performed on the target object, thereby achieving effective management of resources, so as to timely discover resource usage and possible problems, ensure the security and maximization of resources, and improve work efficiency. Therefore, the problem that manual monitoring in related technologies is difficult to control risks in a timely and accurate manner can be solved, and the effect of improving resource management capabilities can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a hardware structure block diagram of a mobile terminal according to a resource management method of an embodiment of the present invention;
[0018] Figure 2 is a flow chart of a method for resource management according to an embodiment of the present invention;
[0019] Figure 3 is a flow chart of a gold risk monitoring method according to an embodiment of the present invention;
[0020] Figure 4 is a structural block diagram of a resource management device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0023] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a resource management method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0024] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the resource management method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0025] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0026] In this embodiment, a method running on the above mobile terminal or network architecture is provided. Figure 2 is a flow chart of a method for resource management according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0027] Step S202, obtaining the total amount of resources of the target object, wherein the total amount of resources is the cumulative sum of resources of the target object within a historical time range, and the historical time range includes a preset time period before the current moment;
[0028] The target object may be an object that needs to be managed, such as gold, silver, body weight, etc.; the historical time range may be a time range including the current moment and a preset time period before the current moment, such as the past three months, the past six months, the past year, etc.; the total amount of resources may be the cumulative total amount of the target object within the historical time range. For example, for gold, the total amount of resources of the target object may be the total market value of all open contracts within a certain period (i.e., within the historical time range), that is, the total value of the remaining gold after multiple purchases and sales, or, for body weight, the total amount of resources of the target object may be the sum of all body weights after calorie intake and consumption within a certain period (i.e., within the historical time range), that is, the sum of the remaining body weights after multiple calorie intake and consumption; the total amount of resources of the target object is obtained.
[0029] Step S204, when the total amount of resources exceeds a preset resource threshold, determining the target loss ratio of the target object according to the target resource amount of the target object at the current moment;
[0030] The above-mentioned preset resource threshold can be a threshold that requires management of the target object. The preset resource threshold can be operated according to actual conditions. For example, if the total amount of gold resources exceeds 50,000 yuan, resource management of gold is required, or if the total amount of weight resources exceeds 10kg, resource management of weight is required, etc.
[0031] The above-mentioned target resource amount can be the resource amount of the target object at the current moment. Optionally, when the target object is gold, after the relevant user has performed multiple buy and sell operations on gold in the past six months, the total amount of gold currently remaining in the account is the target resource amount. For example, user A initially has 50g of gold, and buys 10g, sells 20g, and sells 15g in half a year, then the target resource amount is 25g; or, when the target object is weight, after the relevant person has taken in and consumed calories many times in the past period of time, the current total calorie value is the target resource amount. For example, person B's initial calorie is 0 calories, and in the past three days he took in 2000 calories, consumed 500 calories, and consumed 300 calories every day, then the target resource amount is 1200 calories.
[0032] The above-mentioned target loss ratio can be a numerical value used to determine the loss of the target object. The loss ratio can help users evaluate the relationship between risk and return, thereby maximizing the protection of resources and reducing the potential impact of losses. When the total amount of resources of the target object exceeds the preset resource threshold, the target resource amount of the target object at the current moment is obtained, and the target loss ratio of the target object is calculated based on the target resource amount, which is conducive to the effective management of the resources of the target object.
[0033] Step S206, when the target loss ratio exceeds a preset ratio threshold, performing a target operation on the target object.
[0034] The above-mentioned target operation can be a forced sale operation on gold, or an operation to increase heat consumption; when the target loss ratio exceeds the preset ratio threshold, it means that the loss of resources exceeds the user's tolerance range. At this time, the target operation is performed on the target object to protect the resources and improve the resource management capability.
[0035] Optionally, the executor of the above steps may be a background processor, or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device, wherein the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a computer, a mobile phone or other terminal, but is not limited thereto.
[0036] Through the above steps, the total amount of resources of the target object is monitored, and when the total amount of resources exceeds the preset resource threshold, the target loss ratio of the target object is determined according to the target amount of resources at the current moment. When the target loss ratio exceeds the preset ratio threshold, the target operation is performed on the target object, thereby achieving effective management of resources, so as to timely discover resource usage and possible problems, ensure the security and maximization of resources, and improve work efficiency. This solves the problem in related technologies that manual monitoring is difficult to control risks in a timely and accurate manner, and improves resource management capabilities.
[0037] As an optional implementation, the target loss ratio of the target object is determined based on the target resource amount of the target object at the current moment, including: when the target resource amount is greater than or equal to the preset resource amount, the target loss ratio is determined according to the direction of the target resource amount.
[0038] The above-mentioned target resource direction can be a state of increase or decrease of resources, such as buying or selling gold, consuming or consuming calories, etc.; since the amount of resources affects the change of the total amount of resources to a certain extent, that is, the more resources, the greater the impact on the total amount of resources, therefore, when the target resource amount is small, the change of resources has a relatively small impact on the total amount of resources. When it is less than a certain level, the loss of current resources can be ignored, that is, when the target resource amount is less than the preset resource amount, the loss ratio is not calculated. For example, when gold is less than 20kg, the change in gold price can have an acceptable impact on the total value of gold held, or, when the calories are less than 2000 calories, the change in weight can be ignored; and for the case where the target resource amount is large, the loss of resources needs to be considered. At this time, it is necessary to determine the target loss ratio of resources according to the direction of the target resources, that is, when the target resource amount is greater than or equal to the preset resource amount, the target loss ratio is determined according to the direction of the target resource, so that the change of resources can be more accurately evaluated, the protection of resources can be better controlled, and excessive loss of resources can be avoided, thereby formulating more effective resource management strategies and promoting effective management of resources.
[0039] As an optional implementation, the target loss ratio is determined according to the direction of the target resource quantity, including: determining the value of a first parameter consistent with the direction of the target resource quantity in the resource records within the historical time range to obtain a first parameter value set; determining the record containing the first parameter value in the resource record as the target record to obtain a target record set; obtaining the value of a second parameter in each target record in the target record set to obtain a second parameter value set; and determining the target loss ratio according to the second parameter set value.
[0040] The value of the first parameter may be the value of the resource amount of the target object, such as the weight of gold bought or sold, or the calories taken in or consumed by increasing or decreasing body weight, etc.; the value of the second parameter may be a parameter that affects the total amount of resources, such as the price of gold, or the fitting coefficient between the calorie value and body weight (wherein, since there is no linear relationship between calories and body weight, different calorie values and body weights may correspond to different fitting coefficients), etc.; according to the first parameter, the target records in the resource records within the historical time range that are consistent with the direction of the target resource amount are determined to obtain a target record set, and the target loss ratio is calculated according to the value of the second parameter in each target record in the target record set. For example, in the case where the target object is gold, the target resource amount is 20kg for long positions, then the target records in the transaction records within the historical time range that are consistent with the long position direction (i.e., buying) may include transaction records pushed forward from the current moment, namely, buying 10kg, buying 6kg, and buying 4kg, wherein the sum of the values of the first parameter in the historical records needs to cover the target resource amount, and the loss ratio of gold is determined according to the gold price at the time of each transaction in the three transaction records.
[0041] As an optional implementation, determining the target loss ratio based on the second parameter value set includes: obtaining the weight of each target record in the target record set to obtain a target weight set; and determining the target loss ratio based on the second parameter value set and the target weight set.
[0042] The weights of the above target records can be set according to actual conditions, or calculated according to specific target record conditions. Optionally, taking gold as an example, when the target record set includes three target records A, B, and C, the weights of the three target records can be set to be the same, all 1 / 3. Alternatively, the weights can be calculated according to specific target record conditions, such as sorting the target records from the current moment forward, and obtaining the first parameter value of each target record as target record 1 (100 ounces), target record 2 (80 ounces), and target record 3 (60 ounces), thereby determining that the weight of target record 1 is (240-(80+60)) / 240, the weight of target record 2 is (140-60) / 240, and the weight of target record 3 is 60 / 240.
[0043] After the weight of each target record is determined, the weight of the value of the second parameter in each target record is obtained, so as to determine the target loss ratio according to the value of the second parameter in each target record and its corresponding weight.
[0044] As an optional implementation, the target loss ratio is determined based on the second parameter value set and the target weight set, including: performing a weighted average operation on each second parameter value of the second parameter value set and the corresponding weight in the target weight set to obtain a target mean; and determining the target loss ratio based on the target mean.
[0045] Optionally, the target loss ratio is determined based on the target mean, including: obtaining the value of the second parameter of the target object at the current moment to obtain the target parameter value; when the direction of the target resource quantity is positive, determining the difference between the target parameter value and the target mean as the first difference; and determining the ratio between the first difference and the target mean as the target loss ratio.
[0046] The positive direction mentioned above can be the direction of increasing quantity, such as the purchase of gold, or the intake of calories, which can be calculated by the following formula:
[0047]
[0048] Optionally, the target loss ratio is determined based on the target mean, including: when the direction of the target resource volume is a negative direction, determining the difference between the target mean and the target parameter value as a second difference; and determining the ratio between the second difference and the target parameter value as the target loss ratio.
[0049] The negative direction mentioned above can be the direction of increasing quantity, such as the selling of gold, or the consumption of calories, which can be calculated by the following formula:
[0050]
[0051] As an optional implementation method, taking the risk monitoring of gold as an example, Figure 3 is a flow chart of a gold risk monitoring method according to an embodiment of the present invention. Figure 3 As shown, the specific process is as follows:
[0052] S1, Risk indicator calculation:
[0053] According to the actual situation of gold trading business, a number of risk indicators are established, such as risk exposure (i.e. total resources), and the specific values of these indicators are calculated.
[0054] S2, set threshold:
[0055] Based on historical data and industry experience, set reasonable thresholds for each risk indicator, such as preset resource thresholds.
[0056] S3, real-time monitoring and early warning:
[0057] The system monitors changes in risk indicators in real time. When an indicator exceeds the set threshold, the system will automatically issue a risk warning to remind relevant personnel to take timely measures to control risks. For example, when the total amount of resources exceeds the preset resource threshold, the system will issue a risk warning and calculate the target loss ratio of gold.
[0058] In actual operation, in order to reduce system burden and false alarms, the monitoring and early warning mechanism may combine the following two methods:
[0059] Real-time monitoring: Real-time monitoring of key risk indicators, and immediate triggering of warnings once abnormalities are detected.
[0060] In addition to real-time monitoring, regular inspection mechanisms can also be set up, such as conducting a comprehensive risk indicator analysis every hour, day or week to ensure that the system can cover situations that may be missed by real-time monitoring.
[0061] S4, stop loss ratio calculation:
[0062] Determine the target stop loss point: that is, determine the preset ratio threshold, which means the position where the gold contract or derivative held will be sold when the market price reaches a preset unfavorable position, depending on risk tolerance and market analysis;
[0063] Calculate the stop loss ratio: that is, calculate the target loss ratio, usually expressed as a percentage, that is, the ratio of the target stop loss point to the purchase price, specifically including:
[0064] Assuming that the gold trading exposure (i.e. the target resource volume) has been obtained, when the exposure is less than 20 kg, the stop loss ratio is not calculated and marked as "-";
[0065] When the exposure is greater than or equal to 20 kg,
[0066] The transaction records stored in the database, whose entry time is no later than the acquisition time of gold transaction exposure (i.e. within the historical time range) and whose transaction status is VALID (i.e. valid), are sorted according to the principle of "from recent to far", and one or more transactions (i.e. target records) that are consistent with the exposure direction (i.e. the direction of the target resource volume) are selected in sequence from the most recent transaction, until the sum of the transaction volumes of the selected transaction flows can cover the exposure. Assuming that there is a 20 kg long exposure to gold, and the latest transaction flow shows that there have been several transactions to buy gold in the past few days, it is necessary to select transactions from these transactions that are sufficient to cover the 20 kg exposure. For example, if the most recent purchase transaction is 15 kg, and the previous transactions are 3 kg and 2 kg, then the sum of the transaction volumes of these three transactions (15 + 3 + 2 = 20 kg) just covers the exposure;
[0067] The weight is determined by the transaction volume of the selected transaction (i.e. the value of the first parameter), and the weighted average price is calculated according to the transaction price (i.e. the value of the second parameter) corresponding to each transaction (i.e. the target record) as the average cost of exposure (i.e. the target mean). Suppose there are three transactions A, B, and C, and their transaction volumes are 100 ounces, 80 ounces, and 60 ounces, respectively, and the time of these three transactions is arranged from recent to far, then the exposure is 240 ounces. According to the principle of "from recent to far", we first select the most recent transaction A (100 ounces), then transaction B (80 ounces), and finally transaction C (60 ounces), where,
[0068] Weight of Transaction A: Since it is the most recent transaction, its weight is the exposure minus the volumes of the remaining two transactions, determined as (240 - (80 + 60)) / 240 = 100 / 240 = 5 / 12.
[0069] Weight of Transaction B: Its weight is the remaining exposure minus the volume of the last transaction, determined as (140 -60) / 240= 80 / 240= 4 / 12.
[0070] Weight of Transaction C: Its weight is the remaining exposure, which is determined as (240 -100- 80) / 240 = 60 / 240=3 / 12.
[0071] And calculate the weighted average price. Assuming that the transaction prices of transactions A, B, and C are PA, PB, and PC respectively, the weighted average price (i.e., target mean) is determined as (weight of transaction A * PA) + (weight of transaction B * PB) + (weight of transaction C * PC);
[0072] Get the current Reuters gold price (US dollars / ounce) and Reuters RMB exchange rate, convert them into "yuan / gram" by gold price * RMB exchange rate * 32.148 / 1000, and use them as the revaluation price to get the target parameter value, where:
[0073] When the exposure is long (greater than zero):
[0074]
[0075] When the exposure is short (less than zero):
[0076]
[0077] Apply stop loss ratio: that is, when the target loss ratio exceeds the preset ratio threshold, the target operation is performed on the target object, so that when the market price reaches the stop loss point, the system will automatically execute the sell order to help lock in losses and avoid greater losses.
[0078] In addition, when a customer's margin ratio is below a certain threshold, the financial institution will send a risk warning. For example, when the margin ratio is below 60%, the customer will be notified that the margin ratio of the precious metals two-way business in his account is too low, and the customer is advised to increase the margin ratio by reducing positions or adding margin. For customers with a margin ratio below 50%, they will face a stronger warning because this is already below the forced liquidation line. At this time, the financial institution may emphasize that the customer must take immediate action to avoid forced liquidation.
[0079] If the client fails to increase the margin ratio within the specified time and reaches or exceeds the forced liquidation line, the financial institution will execute a forced liquidation operation, that is, forcibly close the position according to the real-time price to prevent further losses.
[0080] As an optional implementation method, taking weight management and monitoring as an example, the specific process is as follows:
[0081] S1, Risk indicator calculation:
[0082] According to the actual situation of the weight standard, multiple risk indicators are established, such as the actual weight value (i.e. the total amount of resources), and the specific values of the indicators are measured and calculated.
[0083] S2, set threshold:
[0084] According to the specific provisions of the standard weight and actual conditions, set reasonable thresholds for each risk indicator, such as preset resource thresholds.
[0085] S3, real-time monitoring and early warning:
[0086] The system monitors the changes in risk indicators in real time. When an indicator exceeds the set threshold, the system will automatically issue a risk warning to remind relevant personnel to take timely measures to control the risk. For example, when the total amount of resources exceeds the preset resource threshold, the system will issue a risk warning and calculate the target weight loss ratio. For example, if the standard weight corresponding to a height of 167cm is 50kg-60kg, the preset resource threshold will be set to 53kg-57kg. When the actual weight value (i.e. the total amount of resources) exceeds this range, the system will automatically issue a risk warning and calculate the target loss ratio.
[0087] S4, stop loss ratio calculation:
[0088] Determine the target stop loss point: that is, determine the preset ratio threshold, which means when the actual weight value reaches a preset limit position, the position where calorie consumption will be increased will be selected, based on personal goals and health status;
[0089] Calculate the stop loss ratio: that is, calculate the target loss ratio, usually expressed as a percentage, that is, the ratio of the target stop loss point to the standard weight, specifically including:
[0090] Assuming that the remaining calorie value (i.e., target resource amount) after multiple intake and consumption of calories has been obtained, it is set that when the calorie value is less than 2000 calories, the stop loss ratio is not calculated and marked as "-";
[0091] When the calorie value is greater than or equal to 2000 calories,
[0092] The records stored in the database, whose entry time is no later than the time when the remaining calorie value is obtained (i.e., within the historical time range), are sorted according to the principle of "from recent to far", and one or more change records (i.e., target records) that are consistent with the calorie value direction (i.e., the direction of the target resource amount) are selected in sequence from the most recent change, until the sum of the calorie values in the selected records can cover the remaining calorie value. Assuming that the remaining calorie value is 2000 calories, and the latest change record shows that there are several calorie change records in the past few days, it is necessary to select from these records enough records to cover the calorie value of 2000 calories. For example, if the most recent intake record is 1500 calories, and the previous transactions are 300 calories and 200 calories respectively, then the sum of the calories of these three records (1500 + 300 + 200 = 2000 calories) just covers the remaining calorie value;
[0093] The weight is determined by the calorie value of the selected record (i.e. the value of the first parameter), and the weighted average price is calculated as the average fitting coefficient of the calorie value (i.e. the target mean) according to the fitting coefficient between the calorie value corresponding to each record (i.e. the target record) and the body weight (i.e. the value of the second parameter). Suppose there are three records A, B, and C, and their calorie values are 1000 calories, 800 calories, and 600 calories, respectively, and the time of these three records is arranged from near to far, then the exposure is 2400 calories. According to the principle of "from near to far", we first select the most recent record A (1000 calories), then record B (800 calories), and finally record C (600 calories), where,
[0094] The weight of record A: Since it is the most recent record, its weight is the total caloric value minus the caloric value of the remaining two records, which is determined to be (2400 - (800 + 600)) / 2400 = 1000 / 2400 = 5 / 12.
[0095] Weight of record B: Its weight is the remaining calorie value minus the calorie value of the last record, which is determined as (1400 -600) / 2400=800 / 2400=4 / 12.
[0096] Record the weight of C: its weight is the remaining caloric value, which is determined to be (2400 -1000- 800) / 2400 =600 / 2400=3 / 12.
[0097] And calculate the weighted average fitting coefficient. Assuming that the fitting coefficients of records A, B, and C are PA, PB, and PC respectively, the weighted average fitting coefficient (i.e., target mean) is determined as (weight of record A * PA) + (weight of record B * PB) + (weight of record C * PC);
[0098] Get the fitting coefficient corresponding to the remaining heat value (i.e., target resource amount) at the current time and get the target parameter value, where:
[0099] When calories are taken in (greater than zero):
[0100]
[0101] When the heat is consumed (less than zero):
[0102]
[0103] Apply stop loss ratio: that is, when the target loss ratio exceeds the preset ratio threshold, the target operation is performed on the target object, so that when the actual weight value reaches the stop loss point, the system will automatically remind you to increase or reduce calorie consumption, plan exercise time, and help effectively manage weight.
[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0105] In the present embodiment, a device for resource management is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the description has been made no further. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented with software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0106] Figure 4 is a structural block diagram of a resource management device according to an embodiment of the present invention, such as Figure 4As shown, the device includes: an acquisition module 402, used to acquire the total amount of resources of the target object, wherein the total amount of resources is the cumulative sum of resources of the target object within a historical time range, and the historical time range includes a preset time length before the current moment; a determination module 404, used to determine the target loss ratio of the target object according to the target resource amount of the target object at the current moment when the total amount of resources exceeds a preset resource threshold; and an execution module 406, used to perform a target operation on the target object when the target loss ratio exceeds a preset ratio threshold.
[0107] In an exemplary embodiment, the device is further configured to determine the target loss ratio according to the direction of the target resource amount when the target resource amount is greater than or equal to a preset resource amount.
[0108] In an exemplary embodiment, the device is also used to determine the value of a first parameter that is consistent with the direction of the target resource quantity in the resource records within the historical time range to obtain a first parameter value set; determine the record containing the first parameter value in the resource record as the target record to obtain a target record set; obtain the value of a second parameter in each target record in the target record set to obtain a second parameter value set; and determine the target loss ratio based on the second parameter set value.
[0109] In an exemplary embodiment, the device is also used to obtain the weight of each target record in the target record set to obtain a target weight set; and determine the target loss ratio according to the second parameter value set and the target weight set.
[0110] In an exemplary embodiment, the device is also used to perform a weighted average operation on each second parameter value of the second parameter value set and the corresponding weight in the target weight set to obtain a target mean; and determine the target loss ratio based on the target mean.
[0111] In an exemplary embodiment, the device is also used to obtain the value of a second parameter of the target object at the current moment to obtain a target parameter value; when the direction of the target resource quantity is positive, the difference between the target parameter value and the target mean is determined as a first difference; and the ratio between the first difference and the target mean is determined as the target loss ratio.
[0112] In an exemplary embodiment, the device is also used to determine the difference between the target mean and the target parameter value as a second difference when the direction of the target resource quantity is a negative direction; and determine the ratio between the second difference and the target parameter value as the target loss ratio.
[0113] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0114] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0115] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0116] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0117] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0118] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.
[0119] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0120] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0121] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for resource management, characterized in that: include: Obtaining the total amount of resources of the target object, wherein the total amount of resources is the cumulative sum of resources of the target object within a historical time range, and the historical time range includes a preset time period before the current moment; In the case where the total amount of resources exceeds a preset resource threshold, determining the target loss ratio of the target object according to the target resource amount of the target object at the current moment; When the target loss ratio exceeds a preset ratio threshold, a target operation is performed on the target object.
2. The method according to claim 1, characterized in that Determining a target loss ratio of the target object according to a target resource amount of the target object at the current moment includes: When the target resource amount is greater than or equal to a preset resource amount, the target loss ratio is determined according to the direction of the target resource amount.
3. The method according to claim 2, characterized in that Determining the target loss ratio according to the direction of the target resource volume includes: Determine, in the resource records within the historical time range, a value of a first parameter that is consistent with the direction of the target resource quantity, to obtain a first parameter value set; Determine the record containing the first parameter value in the resource record as a target record to obtain a target record set; Obtaining a value of a second parameter in each target record in the target record set to obtain a second parameter value set; The target loss ratio is determined according to the second parameter set value.
4. The method according to claim 3, characterized in that The determining the target loss ratio according to the second parameter value set includes: Obtaining the weight of each target record in the target record set to obtain a target weight set; The target loss ratio is determined according to the second parameter value set and the target weight set.
5. The method according to claim 4, characterized in that Determining the target loss ratio according to the second parameter value set and the target weight set includes: Performing a weighted average operation on each second parameter value of the second parameter value set and a corresponding weight in the target weight set to obtain a target mean value; The target loss ratio is determined according to the target mean.
6. The method according to claim 5, characterized in that Determining the target loss ratio according to the target mean includes: Obtaining the value of the second parameter of the target object at the current moment to obtain the target parameter value; When the direction of the target resource amount is positive, determining the difference between the target parameter value and the target mean as a first difference; The ratio between the first difference and the target mean is determined as the target loss ratio.
7. The method according to claim 6, characterized in that The method further comprises: When the direction of the target resource amount is a negative direction, determining the difference between the target mean value and the target parameter value as a second difference value; The ratio between the second difference and the target parameter value is determined as the target loss ratio.
8. A resource management device, characterized in that: include: An acquisition module, used to acquire the total amount of resources of the target object, wherein the total amount of resources is the cumulative sum of resources of the target object within a historical time range, and the historical time range includes a preset time length before the current moment; A determination module, configured to determine a target loss ratio of the target object according to a target resource amount of the target object at the current moment when the total amount of resources exceeds a preset resource threshold; An execution module is used to perform a target operation on the target object when the target loss ratio exceeds a preset ratio threshold.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.