Resource price processing method and device, electronic equipment, storage medium and program product
By analyzing the request information related to resource prices in the order, dynamically updating the latest resource customization price in the resource price list, the complexity and billing accuracy of preferential information processing in the cloud product billing system is solved, and the resource change scenario is realized Accurate billing.
Patent Information
- Application Number
- CN202411233271.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-11-26
AI Technical Summary
When the existing cloud product billing system handles resource changes, order dismantling, and order collection scenarios, the preferential information processing is complex and prone to errors, resulting in the synchronization and update consistency of order billing information, affecting the accuracy of billing.
By obtaining and parsing request information related to resource prices in the order, extracting user ID information and resource ID information, establishing correspondence between them, dynamically update the latest resource customization prices in the resource price list, and ensuring the real-time and accuracy.
The price information processing logic is optimized, the billing complexity in resource change scenarios is reduced, the order billing accuracy is improved, and billing errors caused by lag or inconsistent price information are avoided.
Smart Images

Figure CN119027198A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of resource management technology, and in particular to a resource processing method, device, electronic device, storage medium and program product. Background Art
[0002] With the rapid development of cloud computing technology and the continuous launch of cloud product services, the billing model of cloud products has gradually diversified to meet the needs of different customers. Although the traditional annual and monthly billing model is simple and clear, it has certain limitations in terms of resource usage flexibility and cost control. Therefore, the pay-as-you-go model based on the actual usage of resources is increasingly favored by customers. This model can better reflect the actual consumption of resources and improve the accuracy and fairness of billing. In cloud product billing, each type of cloud product contains multiple attributes, and different combinations of these attributes form multiple product specifications that can be sold. This flexible pricing method provides customers with more choices, but it also brings complexity to pricing management. In particular, in terms of supporting customer discounts, in addition to regular marketing activities and self-ordering discounts, marketers often need to offer price discounts for some resources or some billing attributes under a resource, which requires the billing system of cloud products to support more refined pricing strategies.
[0003] The existing technology usually processes price discounts under the order dimension. This method binds discount information to orders, which makes the processing of discount information complicated and error-prone when processing resource changes, splitting orders, and combining orders. The synchronization and update of order billing information may also cause consistency problems, thereby affecting the accuracy of billing. Therefore, there is an urgent need for a method to improve the accuracy of order billing. Summary of the invention
[0004] The embodiments of the present application provide a resource price processing method, device, electronic device, storage medium and program product to achieve the effect of improving the accuracy of order billing.
[0005] In a first aspect, an embodiment of the present application provides a resource price processing method, comprising: obtaining request information related to resource prices in an order, the request information comprising resource customization price request information at a customer level and resource price change request information at a system level, the order comprising at least one resource;
[0006] Parsing the request information to obtain identification information corresponding to the request information in the resource dimension, wherein the identification information includes user ID information and resource ID information, and the user ID information and the resource ID information correspond to each other;
[0007] Acquire the type of the order according to the identification information, and update the latest resource customization price corresponding to the user ID information in the resource price table according to the type of the order and the request information;
[0008] The billing price of the order is obtained according to the resource price table.
[0009] In a possible implementation manner, parsing the request information to obtain identification information corresponding to the request information in the resource dimension includes:
[0010] Preprocessing the request information, removing invalid data in the request information and unifying the data format in the request information;
[0011] The preprocessed request information is parsed according to preset parsing rules to obtain user ID information, resource ID information, and a corresponding relationship between the user ID information and the resource ID information.
[0012] In a possible implementation, the user ID information is customer ID information or system ID information, and acquiring the type of the order according to the identification information includes:
[0013] When the user ID information is the customer ID information, determining that the type of the order is a customer-level order;
[0014] When the user ID information is the system ID information, it is determined that the type of the order is a system-level order.
[0015] In a possible implementation manner, updating the latest resource customization price corresponding to the user ID information in the resource price table according to the type of the order and the request information includes:
[0016] When the type of the order is a customer-level order, the resource price corresponding to the order is obtained according to the resource customization price request information at the customer level,
[0017] Update the latest resource customization price in the resource price table according to the customer ID information, the resource ID information and the resource price;
[0018] When the type of the order is a system-level order, the resource price to be changed corresponding to the order is obtained according to the resource price change request information at the system level, and the latest resource customized price in the resource price table is updated according to the system ID information, the resource ID information and the resource price to be changed.
[0019] In a possible implementation manner, updating the latest resource customization price in the resource price table according to the customer ID information, the resource ID information, and the resource price includes:
[0020] Determine whether the mapping relationship between the customer ID information and the resource ID information exists in the resource price table, and if not, determine the order as a new purchase order;
[0021] Determine whether the resource price corresponding to the customer ID information is a resource customized price. If so, use the resource customized price as the latest resource customized price, and store the customer ID information, the resource ID information, and the latest resource customized price in the resource price table in association;
[0022] If not, the resource standard price is used as the latest resource customized price, and the customer ID information, the resource ID information and the latest resource customized price are associated and stored in the resource price table.
[0023] In a possible implementation manner, if the mapping relationship between the customer ID information and the resource ID information exists in the resource price table, the method further includes:
[0024] Determine the order as a purchased order, where the purchased order at least includes an upgrade order and a downgrade order;
[0025] When the purchased order is an upgrade or downgrade order, find out whether the corresponding historical resource customization price already exists for the customer ID information in the resource price table; if so, determine whether the resource price corresponding to the customer ID information in the request information is the resource customization price;
[0026] If so, the historical resource customization price in the resource price table is invalidated, the resource customization price corresponding to the customer ID information is used as the latest resource customization price, and the customer ID information, the resource ID information and the latest resource customization price are associated and stored in the resource price table;
[0027] If not, the resource standard price corresponding to the customer ID in the request information is used as the latest resource customized price, and the customer ID information, the resource ID information and the latest resource customized price are associated and stored in the resource price table.
[0028] In a possible implementation manner, when the purchased order is an order for upgrading or downgrading configuration, and when the customer ID information in the resource price table does not have a corresponding historical resource customization price, the method further includes:
[0029] Determine whether the resource price corresponding to the customer ID information in the request information is the resource customized price; if so, determine whether the specification ID and specification size of the resource price table have changed;
[0030] If yes, the existing historical resource standard price in the resource price table is invalidated, and the resource customized price is used as the latest resource customized price;
[0031] If not, the historical resource standard price already in the resource price table is retained.
[0032] In a possible implementation manner, updating the latest resource customized price in the resource price table according to the system ID information, the resource ID information, and the price of the resource to be changed includes:
[0033] According to the resource price change request information, obtain the customer ID information of the order to be changed and the corresponding resource price to be changed;
[0034] Determine whether the customer ID information in the resource price table already has a corresponding historical resource customization price; if so, set the historical resource customization price to be invalid, and use the resource price to be changed as the latest resource customization price;
[0035] If not, the resource standard price corresponding to the customer ID in the resource price table is set to be invalid, and the resource price to be changed is used as the latest resource customized price.
[0036] In a second aspect, an embodiment of the present application provides a resource price processing device, including:
[0037] An acquisition module, used to acquire request information related to resource prices in an order, wherein the request information includes resource customization price request information at the customer level and resource price change request information at the system level, and the order includes at least one resource;
[0038] A parsing module, used to parse the request information to obtain identification information corresponding to the request information in the resource dimension, wherein the identification information includes user ID information and resource ID information, and the user ID information and the resource ID information correspond to each other;
[0039] The processing module is used to obtain the type of the order according to the identification information, and update the latest resource customization price corresponding to the user ID information in the resource price table according to the type of the order and the request information;
[0040] The charging module is used to obtain the charging price of the order according to the resource price table.
[0041] In a third aspect, an embodiment of the present application provides a resource price processing device, comprising: a memory, and a memory communicatively connected to the processor;
[0042] The memory stores computer-executable instructions;
[0043] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0045] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0046] The resource price processing method, device, electronic device, storage medium and program product provided in the embodiments of the present application can determine the source of the request message and obtain the resource customization price or resource change price by obtaining and parsing the request information related to the resource price in the order, and can obtain the identification information corresponding to the request information in the resource dimension by parsing the request information, and then can update the latest resource customization price in the resource price table according to the identification information and the request information. The above method associates the price information with the resource itself, rather than with the order, thereby optimizing the processing logic of the price information and reducing the complexity of billing in the resource change processing scenario, thereby achieving the effect of improving the accuracy of order billing. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0048] Figure 1 Schematic diagram of the resource price processing method provided for this application Figure 1 ;
[0049] Figure 2 Schematic diagram of the resource price processing method provided for this application Figure 2 ;
[0050] Figure 3 Schematic diagram of the resource price processing method provided for this application Figure 3 ;
[0051] Figure 4Schematic diagram of the resource price processing method provided for this application Figure 4 ;
[0052] Figure 5 Schematic diagram of the resource price processing method provided for this application Figure 5 ;
[0053] Figure 6 A schematic diagram of the structure of the resource price processing device provided for this application;
[0054] Figure 7 A schematic diagram of the structure of the resource price processing device provided for this application.
[0055] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0056] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0057] Cloud computing is the product of the integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage, and virtualization. The development of these technologies provides a technical basis for resource-based billing. Cloud computing uses virtualization technology to encapsulate computing resources, storage resources, and network resources into an independent virtual environment to provide services for enterprise users. The dynamic allocation and elastic scaling of resources make resource-based billing possible. In cloud product billing, each type of cloud product contains multiple attributes, and different combinations of these attributes form multiple product specifications that can be sold. This flexible pricing method provides customers with more choices, but it also brings complexity to pricing management. In particular, in terms of supporting customer discounts, in addition to regular marketing activities and self-ordering discounts, marketers often need to offer price discounts for some resources or some billing attributes under a resource, which requires the billing system of cloud products to support more refined pricing strategies.
[0058] In the prior art, price discounts are usually processed under the order dimension. This method binds the discount information to the order, resulting in the processing of discount information becoming complicated and prone to errors when processing scenarios such as resource changes, order splitting, and order merging. The synchronization and update of order billing information may also bring consistency issues, thereby affecting the accuracy of billing.
[0059] The resource price processing method provided by the present application obtains the request information related to the resource price in the order, and the above request information not only covers the resource customization price request at the customer level, but also includes the resource price change request at the system level. By parsing the request information, extracting key identification information such as user ID information and resource ID information, and establishing a corresponding relationship between them, it can provide a basis for subsequent order type identification and price update. By parsing the identification information obtained, the type of order is judged, and based on this and the specific requirements in the request information, the latest resource customization price corresponding to the user ID information in the resource price table is dynamically updated. Finally, based on the updated resource price table, the billing price of the order is determined, thereby ensuring the real-time and accuracy of the price information, effectively avoiding billing errors caused by lagging or inconsistent price information, and thus improving the accuracy of order billing.
[0060] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0061] The resource customization price request information at the customer level refers to the customized price request specified by the customer for the resources in the order (such as computing instances, storage, databases, etc.) when the customer submits the order. The resource customization price request information contains the price that the customer wants to pay for the resources in the order. This price can be customized based on factors such as the customer's specific needs, purchase volume, and purchase duration. The resource customization price request information at the customer level allows customers to make their own requirements for the price of resources when submitting an order, increasing price flexibility and customer participation.
[0062] The resource price change request information at the system level refers to the request initiated by the cloud platform management system to change the resource price in the order. The resource price change request information contains the new price of the resource corresponding to the order to be changed. This price change may be based on market changes, cost adjustments, promotional activities and other factors. The resource price change request information at the system level allows the cloud platform management system to dynamically adjust the resource price in the order according to internal policies or external factors to keep the price reasonable. And each order contains at least one resource, and each resource can involve the customer-level customization price request and the system-level price change request. By processing the request information at these two levels, the cloud platform management system can manage the resource price in the order more flexibly, which can not only meet the personalized needs of customers, but also make rapid adjustments according to market changes.
[0063] Figure 1 Schematic diagram of the resource price processing method provided for this application Figure 1 ,like Figure 1 As shown, the method includes:
[0064] S101. Obtain request information related to resource prices in an order, where the request information includes resource customization price request information at the customer level and resource price change request information at the system level. The order includes at least one resource.
[0065] In the specific implementation process, the cloud resource management platform can provide customers with an order submission interface, which includes options such as resource selection, configuration, and price setting. Customers can select the required resource types (such as computing resources, storage resources, network resources, etc.) according to their needs, and make corresponding configurations (such as the number of CPU cores, memory size, storage capacity, etc.). During the configuration process, the platform can provide a price estimation function to display the estimated cost in real time according to the customer's configuration. Customers can confirm or adjust the price based on this. For customers with special price requirements, the platform can provide a price customization function. Customers can submit their own price expectations or special price terms through this function. The resource customization price request information submitted by the customer will be recorded in the order and serve as an important basis for subsequent processing. After the customer submits the order, the order will enter the review process. The reviewer will check the various information in the order, including the resource customization price request information at the customer level. If the review is passed, the order will enter the execution stage and the latest resource customization price of the order will be updated in the cloud resource management platform.
[0066] When the market changes or costs are adjusted, the cloud resource management platform can also change resource prices. The price management staff submits a price change request, which includes information such as the resource type to be changed, the price of the resource to be changed, and the reason for the change. The cloud resource management platform can verify and review the price change request to ensure the rationality of the change.
[0067] S102: parse the request information to obtain identification information corresponding to the request information in the resource dimension, where the identification information includes user ID information and resource ID information, and the user ID information and the resource ID information correspond to each other.
[0068] User ID information is an identifier used to identify users of the cloud resource management platform. Each user registered with the cloud resource management platform is assigned a unique user ID. Through the user ID, the cloud resource management platform can track user behavior, record user usage data, verify user identity and permissions, etc. During the request information parsing process, user ID information is used to associate request information with users to ensure that the cloud resource management platform can accurately identify and process each user's request.
[0069] Resource ID information is an identifier used to identify resources in the cloud resource management platform. Each resource in the cloud resource management platform (such as computing instances, storage volumes, databases, etc.) is assigned a unique resource ID. Through the resource ID, the cloud resource management platform can accurately manage and schedule resources to ensure effective utilization and reasonable allocation of resources. During the request information parsing process, the resource ID information is used to associate the request information with specific resources.
[0070] In the specific implementation process, the cloud resource management platform can parse the request information and establish a corresponding relationship between the parsed user ID information and resource ID information through order logic. When the user submits an order, the cloud resource management platform can parse and record the user ID and resource ID corresponding to the order and associate them. In this way, the cloud resource management platform can record the resources corresponding to each user, thereby providing personalized services and management for users. At the same time, it also helps the cloud resource management platform to perform tasks such as permission verification and billing management.
[0071] S103: Acquire the type of order according to the identification information, and update the latest resource customization price corresponding to the user ID information in the resource price table according to the type of order and the request information.
[0072] Specifically, the types of orders include system-level orders and customer-level orders. System-level orders are orders initiated by the cloud resource management platform itself. Customer-level orders are orders initiated directly by customers and are related to customers' use, purchase, and management needs for resources.
[0073] The resource price list is the core data structure used to manage and store various resource pricing information in the cloud resource management platform. The resource price list records the price information of different types of resources, including customized resource prices, standard resource prices, and minimum resource prices. The resource price list is the key to ensuring that the cloud resource management platform can accurately bill. The latest customized resource price refers to the latest effective price of the resource corresponding to a certain user in the resource price list. The latest customized resource price can be used as the billing basis for the user's current purchase or use of the resource until the next price update. In the cloud resource management platform, updating the latest customized resource price is a dynamic and continuous process.
[0074] S104. Obtain the billing price of the order according to the resource price table.
[0075] In the specific implementation process, the cloud resource management platform can bill orders according to the latest resource customization price in the resource price table during the billing cycle. During the billing cycle, the cloud resource management platform regularly (such as every day, every hour, etc.) queries the resource price table to obtain the latest resource customization price. The cloud resource management platform matches the corresponding resource price according to the billing cycle of the order. Among them, if the resource price of the order has not changed during the billing cycle, the order fee is calculated according to the current resource price. If the resource price of the order changes during the billing cycle, the cloud resource management platform can use segmented billing to calculate the order fee. That is, the usage generated before the resource price changes is calculated according to the historical resource price in the resource price table, and the usage generated after the price change is calculated according to the latest resource customization price in the resource price table.
[0076] The resource price processing method provided in the embodiment of the present application can determine the source of the request message and obtain the resource customization price or resource change price by obtaining and parsing the request information related to the resource price in the order. By parsing the request information, the identification information corresponding to the request information in the resource dimension can be obtained, and then the latest resource customization price in the resource price table can be updated according to the identification information and the request information. The above method associates the price information with the resource itself, rather than with the order, thereby optimizing the processing logic of the price information and reducing the complexity of billing in the resource change processing scenario, thereby achieving the effect of improving the accuracy of order billing.
[0077] Figure 2 Schematic diagram of the resource price processing method provided for this application Figure 2 ,like Figure 2 As shown, in this embodiment Figure 1 Based on the embodiment, the process of parsing request information to obtain different order types is described in detail. The method includes:
[0078] S201. Obtain request information related to resource prices in an order, where the request information includes resource customization price request information at the customer level and resource price change request information at the system level. The order includes at least one resource.
[0079] Step S201 and Figure 1 Step S101 in the embodiment is similar and will not be described in detail in this embodiment.
[0080] S202: pre-process the request information, remove invalid data in the request information and unify the data format in the request information.
[0081] In one possible design, the cloud resource management platform can perform data cleansing on the request information. Specifically, data cleansing includes invalid data in the request information, such as blank characters, empty fields, illegal characters, etc. Check the consistency and integrity of the data to ensure that each field in the request information is a valid value. The cloud resource management platform can perform data formatting on the request information. Unify the data format in the request information. The cloud resource management platform can perform data validation on the request information. Verify whether the data in the request information conforms to the expected format and range, such as whether the user ID and resource ID are legal numbers or strings. Check whether the request information contains necessary fields, such as user ID, resource ID, etc.
[0082] S203, parsing the pre-processed request information according to the preset parsing rules to obtain the user ID information, the resource ID information and the corresponding relationship between the user ID information and the resource ID information. Then, executing S204 or S207.
[0083] In a possible design, the cloud resource management platform can obtain the user ID field from the request information according to the preset parsing rules and extract the value of the user ID. Similarly, the cloud resource management platform can find the resource ID field from the request information according to the preset parsing rules and extract the value of the resource ID. Then, according to the data structure in the request information, the corresponding relationship between the user ID information and the resource ID information is parsed.
[0084] S204: When the user ID information is system ID information, determine that the type of the order is a system-level order.
[0085] Specifically, the user ID information can include system ID information and customer ID information.
[0086] S205. When the order type is a system-level order, obtain the resource price to be changed corresponding to the order according to the resource price change request information at the system level.
[0087] S206: Update the latest resource customization price in the resource price table according to the system ID information, resource ID information and the price of the resource to be changed. Then execute S210.
[0088] In the specific implementation process, after the cloud resource management platform parses the pre-processed request information according to the preset parsing rules, when it determines that the user ID information is the system ID information, it can change the request information according to the resource price at the system level and obtain the resource price to be changed corresponding to the order.
[0089] S207: When the user ID information is customer ID information, determine that the type of the order is a customer-level order.
[0090] S208. When the order type is a customer-level order, obtain the resource price corresponding to the order according to the customer-level resource customization price request information.
[0091] S209: Update the latest resource customization price in the resource price table according to the customer ID information, resource ID information and resource price, and then execute S210.
[0092] In the specific implementation process, after the cloud resource management platform parses the pre-processed request information according to the preset parsing rules, when it determines that the user ID information is the customer ID information, it can obtain the resource price corresponding to the order based on the resource customization price request information at the customer level.
[0093] S210: Obtain the billing price of the order according to the resource price table.
[0094] The resource price processing method provided in the embodiment of the present application can achieve accurate parsing and classification processing of request information by preprocessing the request information. According to the different user ID information, the type of order can be accurately judged, which provides an accurate basis for the setting of subsequent order resource prices and the change of order resource prices. By updating the latest resource customization price in the resource price table, the real-time and accuracy of the price can be ensured.
[0095] Figure 3 Schematic diagram of the resource price processing method provided for this application Figure 3 ,like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, a process of updating the latest resource customization price in the resource price table when the user ID information is the customer ID information is described in detail. The method includes:
[0096] S301. Obtain request information related to resource prices in an order, where the request information includes resource customization price request information at the customer level and resource price change request information at the system level.
[0097] S302: parse the request information to obtain identification information corresponding to the request information in the resource dimension.
[0098] Steps S301-S302 and Figure 1 Steps S101-S102 in the embodiment are similar and will not be described in detail in this embodiment.
[0099] S303: When the user ID information is the customer ID information, the resource price corresponding to the order is obtained according to the resource customization price request information at the customer level.
[0100] S304: Determine whether the mapping relationship between the client ID information and the resource ID information exists in the resource price table. If yes, execute S305. If no, execute S310.
[0101] That is to say, in the process of processing customer resource customization price request information, the cloud resource management platform can record the mapping relationship between customer ID information and resource ID information in the resource price table. This usually means adding or updating a row of data in the resource price table, which contains customer ID information, resource ID information, and the corresponding resource price. The resource price table is a continuously updated database table that records the price customization of all customers for different resources. Whenever new customer resource customization price request information is processed, the resource price table will be updated accordingly to reflect the latest resource customization price.
[0102] S305: Determine the order as a purchased order, where the purchased order at least includes an upgrade order and a downgrade order. When the purchased order is an upgrade order or a downgrade order.
[0103] S306: Look up in the resource price table whether the customer ID information already has a corresponding historical resource customization price. If so, execute S307.
[0104] S307: Determine whether the resource price corresponding to the customer ID information in the request information is a customized resource price. If yes, execute S308. If no, execute S309.
[0105] S308: invalidate the existing historical resource customization prices in the resource price table, use the resource customization price corresponding to the customer ID information as the latest resource customization price, and store the customer ID information, resource ID information, and the latest resource customization price in the resource price table in association.
[0106] S309: Use the resource standard price corresponding to the customer ID in the request information as the latest resource customized price, and associate the customer ID information, resource ID information and the latest resource customized price and store them in a resource price table.
[0107] That is to say, if the cloud resource management platform finds that a historical resource customization price corresponding to the customer ID already exists in the resource price list when checking the resource price list, it means that the customer has previously customized prices for specific resources. When the cloud resource management platform processes the customer's upgrade or downgrade order, the historical resource customization price corresponding to the above-mentioned specific resource can be invalidated.
[0108] In the specific implementation process, after the cloud resource management platform sets the historical resource customization price corresponding to the above-mentioned specific resource as invalid, if the resource price corresponding to the customer is the resource customization price, the cloud resource management platform will use the resource customization price as the latest price of the above-mentioned specific resource, that is, the latest resource customization price. If the resource price corresponding to the customer is not the resource customization price, the cloud resource management platform will use the resource standard price corresponding to the above-mentioned specific resource as the latest resource customization price.
[0109] In a possible design, the purchased orders also include split and merge orders. Splitting an order means splitting a larger resource or service into multiple smaller resources or services. Merging an order means merging multiple resources or services into a larger resource or service. Since the split and merge order operations themselves do not change the price of the resources, they only change the quantity or configuration of the resources. In this process, the price of each resource remains unchanged. Therefore, the cloud resource management platform does not need to update the latest resource customization price of each resource in the resource price table.
[0110] In a possible design, the purchased order also includes a cancellation order. When the purchased order is a cancellation order, the cloud resource management platform searches the resource price table for the latest resource customization price corresponding to the order and sets the latest resource customization price corresponding to the order to be invalid.
[0111] S310: Determine the order as a new purchase order.
[0112] S311, determine whether the resource price corresponding to the customer ID information is a customized resource price. If yes, execute S312. If no, execute S313.
[0113] S312: The resource customization price is used as the latest resource customization price, and the customer ID information, resource ID information, and the latest resource customization price are associated and stored in a resource price table.
[0114] S313: Use the resource standard price as the latest resource customized price, and associate the customer ID information, resource ID information, and the latest resource customized price and store them in a resource price table.
[0115] That is to say, when the order is a new purchase order, the cloud resource management platform can obtain the resource price corresponding to the customer ID information. When the resource price is a customized resource price, it means that the customer or account manager has set a customized price for the resources under the order. The customized price may be related to the customer's purchase volume, purchase history, service level agreement or other negotiation conditions. When the resource price is a standard resource price, it means that the customer or account manager has not set a customized price for the resources under the order. In this case, the cloud resource management platform will use the common standard resource price in the market as the billing basis for the order.
[0116] In the specific implementation process, the cloud resource management platform determines whether there is a resource customization price for the order corresponding to the customer. If there is a resource customization price for the order, the cloud resource management platform can use the resource customization price as the latest resource customization price, and store the customer ID information, resource ID information, and the latest resource customization price in the resource price table. If there is no resource customization price for the order, the cloud resource management platform can use the resource standard price as the latest resource customization price, and store the customer ID information, resource ID information, and the latest resource customization price in the resource price table.
[0117] The resource price processing method provided in the embodiment of the present application, by parsing the request information and obtaining the mapping relationship between the customer ID information and the resource ID information, the cloud resource management platform can accurately manage each customer's customized price for different resources, thereby ensuring that the customer's resource price information is always up to date, avoiding price confusion and billing errors. When processing upgrade and downgrade orders, the cloud resource management platform can invalidate the existing historical resource customization prices and store the latest resource customization prices in the resource price table. This historical price processing mechanism can ensure that the price information in the resource price table is always up to date while retaining the validity of the historical price information. In addition, the cloud resource management platform can determine whether the resource price corresponding to the customer ID information is a resource customization price or a resource standard price, and update the resource price table based on the judgment result. The above judgment mechanism can reduce manual intervention and improve the efficiency and accuracy of resource price processing.
[0118] Figure 4 Schematic diagram of the resource price processing method provided for this application Figure 4 ,like Figure 4 As shown, in this embodiment Figure 3 Based on the embodiment, a solution for customizing historical resource prices corresponding to client ID information in a resource price table is described in detail. The method includes:
[0119] S401. Obtain request information related to resource prices in an order, where the request information includes resource customization price request information at the customer level and resource price change request information at the system level.
[0120] S402: parse the request information to obtain identification information corresponding to the request information in the resource dimension.
[0121] S403: When the user ID information is the customer ID information, obtain the resource price corresponding to the order according to the resource customization price request information at the customer level.
[0122] S404: Determine whether the mapping relationship between the client ID information and the resource ID information exists in the resource price table. If yes, execute S405. If no, execute S411.
[0123] S405: Determine the order as a purchased order, where the purchased order at least includes an upgrade order and a downgrade order. When the purchased order is an upgrade order or a downgrade order.
[0124] S406: Look up in the resource price table whether the corresponding historical resource customization price already exists for the customer ID information. If not, execute S407.
[0125] Steps S401-S406 and Figure 3 Steps S301 to S306 in the embodiment are similar and will not be described in detail in this embodiment.
[0126] S407: Determine whether the resource price corresponding to the customer ID information in the request information is a customized resource price. If yes, execute S408. If no, execute S410.
[0127] That is to say, if there is no corresponding historical resource customized price in the resource price table, it is considered that the resources under the order use the resource standard price by default. If the resource price corresponding to the customer ID information in the request information is the resource customized price, it is considered that the resources under the order are assigned a customized price, and then the cloud resource management platform can invalidate the historical resource standard price in the resource price table and use the resource customized price as the latest resource customized price. If the resource price corresponding to the customer ID information in the request information is not the resource customized price, it is considered that the resources under the order still use the resource customized price, and then the cloud resource management platform can retain the historical resource standard price in the resource price table.
[0128] S408: Determine whether the specification ID and specification size of the resource price table have changed. If so, execute S409. If not, execute S410.
[0129] Specifically, resource configuration change scenarios include changes in product specification IDs, such as the upgrade of ECS from 1 core 2G to 2 core 4G. Resource configuration change scenarios also include unchanged product specification IDs, but only product configurations change, such as the change of public network bandwidth from 1Mbps to 2Mbps, in which case the product specification ID remains unchanged. The unchanged product specification ID means that the basic type and configuration category of the resource have not changed, but the specific configuration parameters of the resource have changed. At this point, the basic characteristics of the resource remain unchanged, and there is no need to change or adjust the resource price. The change in product specification ID means that the basic type or configuration category of the resource has changed. In this case, the basic characteristics of the resource have changed, which usually involves significant changes in the performance, function, and cost of the resource, and thus requires changes or adjustments to the resource price. In other words, whether the specification ID and specification size of the resource price table have changed is the basis for whether the resource price needs to be changed or adjusted.
[0130] S409: invalidate the existing historical resource standard prices in the resource price table, and use the resource customized price as the latest resource customized price.
[0131] S410. Reserve the existing historical resource standard prices in the resource price table.
[0132] S411. Determine the order as a new purchase order.
[0133] S412: Determine whether the resource price corresponding to the customer ID information is a customized resource price. If yes, execute S413. If no, execute S414.
[0134] S413: The resource customization price is used as the latest resource customization price, and the customer ID information, resource ID information, and the latest resource customization price are associated and stored in a resource price table.
[0135] S414: Use the resource standard price as the latest resource customized price, and associate the customer ID information, resource ID information, and the latest resource customized price with each other and store them in a resource price table.
[0136] The resource price processing method provided in the embodiment of the present application can manage resource prices more accurately by judging the changes in specification ID and specification size. When the basic type or configuration category of the resource changes, the cloud resource management platform can adjust the resource price accordingly. If the specification ID remains unchanged and only the product configuration changes, the cloud resource management platform does not need to change or adjust the resource price, which helps to avoid unnecessary price changes and ensure the accuracy of order billing.
[0137] Figure 5 Schematic diagram of the resource price processing method provided for this application Figure 5 ,like Figure 5As shown, in this embodiment Figure 2 Based on the embodiment, a process of updating the latest resource customization price in the resource price table when the user ID information is the system ID information is described in detail. The method includes:
[0138] S501. Obtain request information related to resource prices in an order, where the request information includes resource customization price request information at the customer level and resource price change request information at the system level.
[0139] S502: parse the request information to obtain identification information corresponding to the request information in the resource dimension.
[0140] Steps S501-S502 and Figure 1 Steps S101-S102 in the embodiment are similar and will not be described in detail in this embodiment.
[0141] S503: When the user ID information is system ID information, the resource price to be changed corresponding to the order is obtained according to the resource price change request information at the system level.
[0142] S504: Obtain the customer ID information of the order to be changed and the corresponding resource price to be changed according to the resource price change request information.
[0143] S505: Determine whether the customer ID information in the resource price table already has a corresponding historical resource customization price. If so, execute S506. If not, execute S507.
[0144] That is to say, when the user ID information is the system ID information, the cloud resource management platform will change the resource price internally. The price change behavior within the cloud resource management platform may be based on various reasons such as changes in market demand, changes in cost structure, promotional activities, etc. When changing the resource price within the cloud resource management platform, it is only necessary to change the resource price according to the price to be changed of the resource, without considering whether the historical resource price is a resource customized price or a resource standard price. If there is a corresponding historical resource customized price for the customer ID information in the resource price table, the cloud resource management platform can set the historical resource customized price to invalid and use the resource price to be changed as the latest resource customized price. If there is no corresponding historical resource customized price for the customer ID information in the resource price table, the cloud resource management platform can set the resource standard price corresponding to the customer ID in the resource price table to invalid and use the resource price to be changed as the latest resource customized price.
[0145] S506: Set the historical resource customization price to invalid, and use the resource price to be changed as the latest resource customization price.
[0146] S507: Set the resource standard price corresponding to the customer ID in the resource price table to invalid, and use the resource price to be changed as the latest resource customized price.
[0147] The resource price processing method provided in the embodiment of the present application allows the cloud resource management platform to flexibly change the resource price according to the needs of the system level when the resource price is a customized resource price or a standard resource price, thereby improving the adjustment speed of the price policy. Through clear price update steps, the price processing process within the cloud resource management platform is simplified, and the efficiency and accuracy of price processing are improved.
[0148] Figure 6 The schematic diagram of the structure of the resource price processing device provided in this application is as follows: Figure 6 As shown, the resource price processing device 60 provided in this embodiment includes:
[0149] The acquisition module 601 is used to acquire request information related to resource prices in an order, the request information including resource customization price request information at the customer level and resource price change request information at the system level, and the order includes at least one resource.
[0150] The parsing module 602 is used to parse the request information to obtain the identification information corresponding to the request information in the resource dimension. The identification information includes user ID information and resource ID information. The user ID information and the resource ID information correspond to each other.
[0151] Processing module 603 is used to obtain the type of order according to the identification information, and update the latest resource customization price corresponding to the user ID information in the resource price table according to the type of order and the request information.
[0152] The charging module 604 is used to obtain the charging price of the order according to the resource price table.
[0153] In a possible implementation, the parsing module 602 is further configured to:
[0154] Preprocess the request information, remove invalid data in the request information and unify the data format in the request information;
[0155] The preprocessed request information is parsed according to preset parsing rules to obtain user ID information, resource ID information, and a corresponding relationship between the user ID information and the resource ID information.
[0156] In a possible implementation, the processing module 603 is further configured to:
[0157] When the user ID information is customer ID information, the type of the order is determined to be a customer-level order;
[0158] When the user ID information is system ID information, the type of the order is determined to be a system-level order.
[0159] In a possible implementation, the processing module 603 is further configured to:
[0160] When the order type is a customer-level order, the resource price corresponding to the order is obtained according to the customer-level resource customization price request information.
[0161] Update the latest resource customization price in the resource price table according to customer ID information, resource ID information and resource price;
[0162] When the order type is a system-level order, the resource price to be changed corresponding to the order is obtained according to the resource price change request information at the system level.
[0163] Update the latest resource customization price in the resource price table based on the system ID information, resource ID information, and the price of the resource to be changed.
[0164] In a possible implementation, the processing module 603 is further configured to:
[0165] Determine whether the mapping relationship between the customer ID information and the resource ID information exists in the resource price table. If not, determine the order as a new purchase order.
[0166] Determine whether the resource price corresponding to the customer ID information is a resource customized price. If so, use the resource customized price as the latest resource customized price, and associate the customer ID information, resource ID information, and the latest resource customized price and store them in the resource price table;
[0167] If not, the resource standard price is used as the latest resource customized price, and the customer ID information, resource ID information and the latest resource customized price are associated and stored in the resource price table.
[0168] In a possible implementation, the processing module 603 is further configured to:
[0169] Determine the order as a purchased order, which at least includes an upgrade order and a downgrade order;
[0170] When the purchased order is an upgrade or downgrade order, check whether the customer ID information already has a corresponding historical resource customization price in the resource price table; if so, determine whether the resource price corresponding to the customer ID information in the request information is a resource customization price;
[0171] If so, the existing historical resource customization price in the resource price table is invalidated, the resource customization price corresponding to the customer ID information is used as the latest resource customization price, and the customer ID information, resource ID information and the latest resource customization price are associated and stored in the resource price table;
[0172] If not, the resource standard price corresponding to the customer ID in the request information is used as the latest resource customized price, and the customer ID information, resource ID information and the latest resource customized price are associated and stored in the resource price table.
[0173] In a possible implementation, the processing module 603 is further configured to:
[0174] Determine whether the resource price corresponding to the customer ID information in the request information is a customized resource price; if so, determine whether the specification ID and specification size in the resource price table have changed;
[0175] If yes, the existing historical resource standard price in the resource price table is invalidated, and the resource customized price is used as the latest resource customized price;
[0176] If not, the existing historical resource standard prices in the resource price table will be retained.
[0177] In a possible implementation, the processing module 603 is further configured to:
[0178] According to the resource price change request information, obtain the customer ID information of the order to be changed and the corresponding resource price to be changed;
[0179] Determine whether the corresponding historical resource customization price already exists for the customer ID information in the resource price table; if so, set the historical resource customization price to invalid and use the resource price to be changed as the latest resource customization price;
[0180] If not, the resource standard price corresponding to the customer ID in the resource price table will be set as invalid, and the resource price to be changed will be used as the latest resource customized price.
[0181] The resource price processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0182] Figure 7 This is a schematic diagram of the structure of the resource price processing device provided in this application. Figure 7 As shown, the resource price processing device 70 provided in this embodiment includes: at least one processor 701 and a memory 702. Optionally, the device 70 also includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected via a bus 704.
[0183] In a specific implementation process, at least one processor 701 executes the computer-executable instructions stored in the memory 702, so that at least one processor 701 executes the above method.
[0184] The specific implementation process of the processor 701 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0185] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0186] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
[0187] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0188] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0189] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0190] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0191] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0192] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0193] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0194] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0195] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0196] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0197] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A resource price processing method, characterized in that: include: Acquire request information related to resource prices in an order, the request information including resource customization price request information at a customer level and resource price change request information at a system level, the order including at least one resource; Parsing the request information to obtain identification information corresponding to the request information in the resource dimension, wherein the identification information includes user ID information and resource ID information, and the user ID information and the resource ID information correspond to each other; Acquire the type of the order according to the identification information, and update the latest resource customization price corresponding to the user ID information in the resource price table according to the type of the order and the request information; The billing price of the order is obtained according to the resource price table.
2. The method according to claim 1, characterized in that: The parsing of the request information to obtain identification information corresponding to the request information in the resource dimension includes: Preprocessing the request information, removing invalid data in the request information and unifying the data format in the request information; The preprocessed request information is parsed according to preset parsing rules to obtain user ID information, resource ID information, and a corresponding relationship between the user ID information and the resource ID information.
3. The method according to claim 2, characterized in that The user ID information is customer ID information or system ID information, and obtaining the type of the order according to the identification information includes: When the user ID information is the customer ID information, determining that the type of the order is a customer-level order; When the user ID information is the system ID information, it is determined that the type of the order is a system-level order.
4. The method according to claim 3, characterized in that The updating of the latest resource customization price corresponding to the user ID information in the resource price table according to the type of the order and the request information includes: When the type of the order is a customer-level order, the resource price corresponding to the order is obtained according to the resource customization price request information at the customer level, Update the latest resource customization price in the resource price table according to the customer ID information, the resource ID information and the resource price; When the type of the order is a system-level order, the resource price to be changed corresponding to the order is obtained according to the resource price change request information at the system level, The latest resource customized price in the resource price table is updated according to the system ID information, the resource ID information and the price of the resource to be changed.
5. The method according to claim 4, characterized in that The updating of the latest resource customization price in the resource price table according to the client ID information, the resource ID information and the resource price comprises: Determine whether the mapping relationship between the customer ID information and the resource ID information exists in the resource price table, and if not, determine the order as a new purchase order; Determine whether the resource price corresponding to the customer ID information is a resource customized price. If so, use the resource customized price as the latest resource customized price, and store the customer ID information, the resource ID information, and the latest resource customized price in the resource price table in association; If not, the resource standard price is used as the latest resource customized price, and the customer ID information, the resource ID information and the latest resource customized price are associated and stored in the resource price table.
6. The method according to claim 5, characterized in that If the mapping relationship between the client ID information and the resource ID information exists in the resource price table, the method further includes: Determine the order as a purchased order, where the purchased order at least includes an upgrade order and a downgrade order; When the purchased order is an upgrade or downgrade order, find out whether the corresponding historical resource customization price already exists for the customer ID information in the resource price table; if so, determine whether the resource price corresponding to the customer ID information in the request information is the resource customization price; If so, the historical resource customization price in the resource price table is invalidated, the resource customization price corresponding to the customer ID information is used as the latest resource customization price, and the customer ID information, the resource ID information and the latest resource customization price are associated and stored in the resource price table; If not, the resource standard price corresponding to the customer ID in the request information is used as the latest resource customized price, and the customer ID information, the resource ID information and the latest resource customized price are associated and stored in the resource price table.
7. The method according to claim 6, characterized in that When the purchased order is an order for upgrading or downgrading configuration, and when the customer ID information in the resource price table does not have a corresponding historical resource customization price, the method further includes: Determine whether the resource price corresponding to the customer ID information in the request information is the resource customized price; if so, determine whether the specification ID and specification size of the resource price table have changed; If yes, the existing historical resource standard price in the resource price table is invalidated, and the resource customized price is used as the latest resource customized price; If not, the historical resource standard price already in the resource price table is retained.
8. The method according to claim 4, characterized in that The updating of the latest resource customization price in the resource price table according to the system ID information, the resource ID information and the price of the resource to be changed comprises: According to the resource price change request information, obtain the customer ID information of the order to be changed and the corresponding resource price to be changed; Determine whether the customer ID information in the resource price table already has a corresponding historical resource customization price; if so, set the historical resource customization price to be invalid, and use the resource price to be changed as the latest resource customization price; If not, the resource standard price corresponding to the customer ID in the resource price table is set to be invalid, and the resource price to be changed is used as the latest resource customized price.
9. A resource price processing device, characterized in that: include: An acquisition module, used to acquire request information related to resource prices in an order, wherein the request information includes resource customization price request information at the customer level and resource price change request information at the system level, and the order includes at least one resource; A parsing module, used to parse the request information to obtain identification information corresponding to the request information in the resource dimension, wherein the identification information includes user ID information and resource ID information, and the user ID information and the resource ID information correspond to each other; A processing module, configured to obtain the type of the order according to the identification information, and update the latest resource customization price corresponding to the user ID information in the resource price table according to the type of the order and the request information; The charging module is used to obtain the charging price of the order according to the resource price table.
10. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.
12. A computer program product, comprising a computer program, which implements the method according to any one of claims 1 to 8 when executed by a processor.
