Resource calling method and device, equipment and storage medium

By performing resource pre-occupying and verification when order creation, the problem of inventory pre-occupying in the existing technology after order payment is completed is solved, which improves the order success rate and reduces the system's failure caused by insufficient resources.

CN120106925APending Publication Date: 2025-06-06CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311657212.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-05
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing technology requires inventory pre-occupation after the order payment is completed, resulting in the inability to pre-occupation when the required resources and user quota do not match, resulting in resource creation failure and reducing the success rate of orders.

Method used

At the beginning of the pre-occupation, the resource creation request for the to-be-processed order is checked for the required resource. If the verification is passed, check whether the amount of to-be-used resources required for the order is sufficient. If sufficient, inventory lock is performed and a target pre-occupation record is generated. The resources required for the order are created based on the record, and the status information of the resource is changed after the resource creation is completed.

Benefits of technology

By first making resource pre-occupy regeneration orders, reduce order failures caused by insufficient resources, improve order success rate, and reduce order failure problems caused by system failures due to available resources through a unique pre-occupy record.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120106925A_ABST
    Figure CN120106925A_ABST
Patent Text Reader

Abstract

The invention provides a resource calling method and device, equipment and a storage medium. The method comprises the following steps: receiving a resource creation request which corresponds to a to-be-processed order and comprises order information and resource information, and verifying the resource creation request; when the resource creation request passes the verification, obtaining a to-be-processed pre-occupation record, and based on the order information and the to-be-processed pre-occupation record, determining whether the resource information satisfies a preset condition; the pre-occupation record is used for marking resources required by the to-be-processed order; if yes, carrying out inventory locking on resource information corresponding to the order information, and generating a target pre-occupation record; and calling the target resource based on the target pre-occupation record to complete resource creation, and changing the state information of the target resource. According to the method, the unique pre-occupation record is generated for the resources on which the order depends, so that logic pre-occupation of each resource is achieved, the order failure problem caused by the failure of the available resource quantity of the system and the unnecessary order process can be reduced, and the success rate of the order is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource calling method, device, equipment and storage medium. Background Art

[0002] With the development of Internet technology, microservice architecture has become a development trend. Under the microservice architecture, for software systems with orders and inventory, inventory pre-occupancy is an important technical issue. Inventory pre-occupancy means that before the customer places an order, the system locks the inventory or required resources to avoid insufficient inventory. Reasonable design of inventory pre-occupancy can significantly improve the capabilities of the system.

[0003] In the prior art, inventory pre-occupancy is performed by using logical pre-occupancy, that is, a field is used as a flag in the database before an order is created. When the order is successfully generated and the deduction is successful, the order service will initiate a request to lock the inventory and set the resources required for the order corresponding to the flag to an occupied state.

[0004] However, the above method requires that inventory be reserved after order payment is completed. When the resources required for reservation do not match the user quota, reservation cannot be successful, resulting in failure of resource creation and reducing the success rate of the order. Summary of the invention

[0005] The present application provides a resource calling method, apparatus, device and storage medium to solve the technical problems that inventory pre-occupancy must be performed after order payment is completed, and when the resources required for pre-occupancy do not match the user quota, pre-occupancy cannot be successful, resulting in resource creation failure and reducing the order success rate.

[0006] In a first aspect, the present application provides a resource calling method, the method comprising:

[0007] Receive a resource creation request corresponding to a pending order, and verify the resource creation request; the resource creation request includes: order information and resource information;

[0008] When the resource creation request passes the verification, obtain the pending reservation record, and determine whether the resource information meets the preset conditions based on the order information and the pending reservation record; the reservation record is used to mark the resources required for the pending order;

[0009] If so, the resource information corresponding to the order information is locked in inventory, and a target reservation record is generated;

[0010] The target resource is called based on the target pre-occupancy record to complete resource creation, and the state information of the target resource is changed.

[0011] Optionally, in the method described above, the resource creation request further includes: user information; verifying the resource creation request includes:

[0012] Compare the order information and the resource information with a preset data table to obtain a comparison result;

[0013] When it is determined that the comparison results are consistent, the current quota is checked based on the user information to determine whether the current user can create an order; the current quota is the amount of resources corresponding to the order that the current user can create.

[0014] Optionally, in the method described above, the order information includes an order identification number ID, order creation time, order amount and order expiration time; the user information includes a user ID, a user type, a user order initiation time, a user status and a user authority; the resource information includes: a resource ID, a resource name and a resource creation time; and verifying the resource creation request includes:

[0015] Using the first preset condition and the preset data table to verify the order identification number ID, order creation time, order amount and order expiration time, and / or using the second preset condition and the preset data table to verify the resource ID, resource name and resource creation time;

[0016] After the verification is passed, the user verification order is determined based on the time when the user initiated the order, the current quota of the current user is obtained based on the verification order, the user ID and the user type, and whether the current user meets the requirements for creating an order is determined based on the user status and the user authority;

[0017] If so, it is determined whether the current user can create an order based on the current quota.

[0018] Optionally, the method as described above, based on the order information and the reservation record to be processed, determines whether the resource information meets a preset condition, including:

[0019] Determine the amount of resources locked in the inventory based on the pre-occupancy record to be processed, and determine the amount of remaining resources based on the amount of resources locked in the inventory;

[0020] Determine pending orders based on the order information, and for each pending order, determine whether the resource amount corresponding to the resource information of the pending order is less than or equal to the remaining resource amount.

[0021] Optionally, the method as described above further comprises:

[0022] When it is determined that the resource creation request verification fails, order placement failure information is generated, and the order placement failure information is sent to the client for visual display;

[0023] When it is determined that the resource information does not meet the preset conditions, order creation failure information is generated, and the order creation failure information is sent to the client for visual display.

[0024] Optionally, in the method as described above, the target pre-occupancy record is used to mark the logical occupation of the target resource; the method further comprises:

[0025] After the target reservation record is generated, the order system is called to generate an order and deduction corresponding to the order information, and after the order deduction is successful, the order status of the order is modified;

[0026] Prompt information is generated based on the order status, and the prompt information is sent to the client for visual display; the prompt information is used to prompt the user that the order status is in the order creation process and needs to wait for the resource creation to be completed.

[0027] Optionally, the method as described above, calling the target resource based on the target pre-occupancy record to complete resource creation, and changing the state information of the target resource, includes:

[0028] Asynchronously calling a target resource based on the target pre-occupancy record, and creating a resource based on the target resource;

[0029] When it is determined that the resource creation fails, the inventory lock on the resource information is released, the target reservation record is deleted, and order failure information is returned when the client queries the order information;

[0030] When it is determined that the resource is created successfully, the state information of the target resource is changed, and the field information of the target resource is filled, and order success information is returned when the client queries the order information; the field information is used to identify that the target resource is used.

[0031] In a second aspect, the present application provides a resource calling device, the device comprising:

[0032] A verification module, used to receive a resource creation request corresponding to a pending order and verify the resource creation request; the resource creation request includes: order information and resource information;

[0033] A judgment module, used for obtaining a pending reservation record after the resource creation request is verified, and judging whether the resource information meets a preset condition based on the order information and the pending reservation record; the reservation record is used to mark the resources required for the pending order;

[0034] A locking module, used to lock the inventory of the resource information corresponding to the order information when the resource information meets the preset conditions, and generate a target pre-occupancy record;

[0035] The calling module is used to call the target resource based on the target pre-occupancy record to complete resource creation and change the state information of the target resource.

[0036] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0037] The memory stores computer-executable instructions;

[0038] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the first aspects.

[0039] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.

[0040] The resource calling method, apparatus, device and storage medium provided by the present application perform parameter verification on various parameters in the resource creation request corresponding to the order to be processed at the beginning of the pre-occupancy. After the parameter verification is passed, it is queried whether the available usage of various resources required for the order is sufficient. If the available usage of the resources is sufficient, the inventory is locked, and a database record is generated for all dependent resources, namely the target pre-occupancy record. Furthermore, the resources required for the order are created based on the target pre-occupancy record, and after the resource creation is completed, the status information of the resources is changed. In this way, the present application can pre-occupy resources first and then generate orders when creating order resources, thereby reducing the occurrence of subsequent order failures caused by insufficient resources, and by generating unique pre-occupancy records for the resources that the order depends on, it reduces the order failure problems caused by the failure of the system to use available resources and unnecessary order processes, thereby improving the success rate of orders. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] 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.

[0042] Figure 1 Flowchart for existing business inventory reservation;

[0043] Figure 2 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0044] Figure 3 A schematic diagram of a resource calling method provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of a scheme for designing pre-occupancy logic provided in an embodiment of the present application;

[0046] Figure 5 A flowchart of a specific resource calling method provided in an embodiment of the present application;

[0047] Figure 6 A schematic diagram of the structure of a resource calling device provided in an embodiment of the present application;

[0048] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0049] 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

[0050] 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.

[0051] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. For example, the first device and the second device are only used to distinguish different devices, and their order is not limited. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit them to be different.

[0052] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0053] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0054] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0055] With the continuous development of the Internet, microservice architecture has become a trend. Under the microservice architecture, inventory pre-occupancy is an important technical issue for software systems with orders and inventory. Therefore, a good inventory pre-occupancy design and technical implementation can significantly improve the capabilities of the system.

[0056] Among them, inventory pre-occupancy means that the system locks the inventory or required resources before the customer places an order to reduce the occurrence of insufficient inventory.

[0057] In one possible implementation, inventory is pre-occupied by using logical pre-occupancy, that is, a field is used as a flag in the database before an order is created. When the order is successfully generated and the deduction is successful, the order service will initiate a request to lock the inventory and set the resources required for the order corresponding to the flag to an occupied state.

[0058] However, the above method requires that inventory be reserved after order payment is completed. When the resources required for reservation do not match the user quota, reservation cannot be successful, resulting in failure of resource creation and reducing the success rate of the order.

[0059] For example, Figure 1 A flowchart for reserving existing business inventory, such as Figure 1As shown, the business inventory pre-occupancy is implemented based on the interaction between the client and the system. The system includes: order microservice, payment service, inventory microservice and resource microservice; the implementation process of the business inventory pre-occupancy includes the following steps:

[0060] Step 1: Order generation and deduction: After the user places an order, the client initiates an order request to the system, and the system generates order information, records the relevant order information in the database, and initiates a payment request for deduction. Among them, when deducting fees, the current payment mode is pre-deduction. When any subsequent link causes the order to fail, a refund operation will be generated.

[0061] Step 2: Inventory lock: Determine whether the payment is successful based on the payment request. If not, the order generation fails and the client is returned to the order failure information; if so, the order generation is successful, and the deduction is also successful. The order service will initiate an inventory lock request to enable the inventory microservice to lock the inventory; the locking logic is to lock the data in the order corresponding table in the database, or add a flag field to the inventory-related table to set the current data to the pre-occupied state.

[0062] Step 3: The system determines whether the inventory lock is successful. When the inventory lock fails, a refund request is initiated, and a refund is made based on the refund request and order failure information is generated. The order failure information is used to prompt that the order is unsuccessful, and then the failure is directly returned to the client, and the current order status is updated to failure. When the inventory is locked successfully, that is, the pre-occupancy is successful, the client is notified that the order has been created, but the status is in the resource creation process. At this time, the order status is incomplete. Accordingly, resource-related services need to be called at the same time to create resources.

[0063] Step 4: When the pre-occupancy is successful, the system will initiate a request to create resources so that resource-related services can create underlying resources, such as virtual machine resources, Internet Protocol (IP) resources, etc.; further, it is determined whether the resource creation is successful. If the resource creation is successful, the order microservice is notified to modify the lock status of the order, and the lock status is changed to actual use, and the currently locked data is unlocked; if the resource creation fails, the order microservice is notified to modify the status of the order, and a refund is made at the same time, releasing the lock on the inventory.

[0064] In the above-mentioned implementation method of business inventory pre-occupancy, since the existing business logic system only locks the relevant table data in the database during pre-occupancy, and does not restrict resources, after the order is created, the resources may exceed the underlying restrictions due to the underlying restrictions when the number of visits is large, resulting in creation failure. When the creation fails, the system will continuously call the order system to perform operations such as refunding the order, which will cause the order service to be frequently called and the load to be too heavy.

[0065] It should be noted that after resource creation fails, the system needs to notify the order system to perform operations such as order deletion or refund. The failure rate of the order system is much lower than that of the business system. At this time, the order system will be frequently called, causing a bottleneck in the order system.

[0066] According to experimental data statistics, in the existing business logic, the order failure rate is between 1% and 5%, of which 70% of the problems are: after the order payment is completed, it is pre-occupied, but due to restrictions related to resources and user quotas, the pre-occupancy cannot be successful. At this time, the order has been created, which causes the order to become a failed state. At this time, it is necessary to call the order service for refund, which is cumbersome.

[0067] In response to the above problems, the present application provides a resource calling method, which can perform parameter verification on various parameters in the resource creation request corresponding to the order to be processed at the beginning of pre-occupancy. After the parameter verification is passed, it is queried whether the available usage of various resources required for the order is sufficient. If the available usage of the resources is sufficient, the inventory is locked, and a database record is generated for all dependent resources, namely, the target pre-occupancy record. Furthermore, the resources required for the order are created based on the target pre-occupancy record, and after the resource creation is completed, the status information of the resources is changed. In this way, the present application can pre-occupy resources first and then generate orders when creating order resources, thereby reducing the occurrence of subsequent order failures caused by insufficient resources, and by generating unique pre-occupancy records for the resources that the order depends on, reducing the order failure problems caused by the failure of the system to obtain available resources and unnecessary order processes, thereby improving the success rate of orders.

[0068] For example, Figure 2 A schematic diagram of an application scenario provided in an embodiment of the present application, such as Figure 2 As shown, the application scenario can be applied to Internet activities interacting with users or resources launched for new business planning, such as a shopping application scenario or a server cluster application scenario. The application scenario includes: a user's terminal device 201 and a business system 202.

[0069] Specifically, after placing an order, the user's terminal device 201 can generate a resource creation request for the order and send the resource creation request to the business system 202; when the business system 202 receives the resource creation request, it locks the inventory based on the pre-occupancy logic and completes the resource creation; wherein, the pre-occupancy logic is to perform parameter verification on various parameters in the resource creation request at the beginning of the pre-occupancy, and after the parameter verification is passed, query whether the available usage of various resources required for the order is sufficient, and if the available usage of the resources is sufficient, then the inventory is locked and a database record is generated for all dependent resources.

[0070] Optionally, the terminal device is a client, which can be a wireless terminal or a wired terminal. The wireless terminal can be a device that provides voice and / or other business data connectivity to users, a handheld device with wireless connection function, or other processing devices connected to a wireless modem. The wireless terminal can communicate with one or more core network devices via a radio access network (Radio Access Network, referred to as RAN). The wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal. For example, it can be a portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile device that exchanges language and / or data with the radio access network. For another example, the wireless terminal can also be a personal communication service (Personal Communication Service, referred to as PCS) phone, a cordless phone, a Session Initiation Protocol (Session Initiation Protocol, referred to as SIP) phone, a wireless local loop (Wireless Local Loop, referred to as WLL) station, a personal digital assistant (Personal Digital Assistant, referred to as PDA) and other devices. A wireless terminal may also be referred to as a system, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, a remote terminal, an access terminal, a user terminal, a user agent, or a user device or user equipment, without limitation. Optionally, the terminal device may be a smart phone, a tablet computer, or the like.

[0071] 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.

[0072] Figure 3 A schematic diagram of a resource calling method provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the execution subject of the resource calling method is a business system; the business system includes a product microservice, an inventory microservice, and an order microservice; the resource calling method includes the following steps:

[0073] S301. Receive a resource creation request corresponding to a pending order, and verify the resource creation request; the resource creation request includes: order information and resource information.

[0074] In an embodiment of the present application, the order information may include parameter information such as an order identification number (Identity Document, ID), order creation time, order amount and order expiration time; the resource information may include parameter information such as resource ID, resource name and resource creation time; the order information is used to indicate the attribute information of the corresponding order after the user places an order; the resource information is used to indicate the resource quantity information required for the order and the processing time. The embodiment of the present application does not limit the specific parameter information included in the order information and resource information. The above is only an example.

[0075] In this step, after the user initiates an order, the client can generate a resource creation request corresponding to the pending order; the resource creation request is used to create resources for the pending order, such as virtual machine resources, IP resources, etc.; further, the client sends the resource creation request to the business system so that the business system can perform parameter verification on various parameters in the resource creation request.

[0076] Optionally, the resource creation request can be verified based on a comparison algorithm, or it can be verified by determining whether the parameters in the resource creation request meet specific conditions, such as whether the order creation time is greater than or equal to a first threshold, whether the order amount is empty, whether the order expiration time is greater than or equal to a second threshold, etc. The embodiment of the present application does not specifically limit the method for performing resource creation request verification.

[0077] S302. When the resource creation request is verified, obtain the pending reservation record, and determine whether the resource information meets the preset conditions based on the order information and the pending reservation record; the reservation record is used to mark the resources required for the pending order.

[0078] In an embodiment of the present application, the pending reservation record is a database record generated by processing the resource creation request corresponding to the order last time or several times. The pending reservation record is a reservation record that has not been processed or is being processed. The reservation record is a field unrelated to the actual resources and is only used to identify the resources required for the order. The reservation record can be expressed in the form of a resource primary key ID or in the form of other letters and / or numbers. The embodiment of the present application does not specifically limit this.

[0079] It should be noted that when the pending order is the first order in the business system, the pending reserved record does not exist, that is, it is 0.

[0080] In this step, when the business system determines that the verification of the resource creation request has passed, it can obtain the previous reservation records that have not been processed, and then determine the resource information corresponding to each pending order based on the order information, determine the amount of various types of resources required for each pending order, and query whether the remaining usage of various types of resources is sufficient for the resource usage corresponding to each pending order based on the reservation records, that is, query whether the various types of resources have reached the maximum usage.

[0081] It should be noted that the resource information includes multiple types of resources. Therefore, for each pending order in the order information, it is necessary to determine in turn whether various types of resources required for the order are sufficient.

[0082] S303: If yes, lock the inventory of the resource information corresponding to the order information and generate a target reservation record.

[0083] In an embodiment of the present application, a target pre-occupancy record may refer to a database record generated based on all dependent resources of a pending order; the target pre-occupancy record may include a resource primary key ID, resource primary key creation time, resource occupation time, and resource occupation status, etc. The resource occupation status is set to a pre-occupied state. The embodiment of the present application does not limit the specific content of the target pre-occupancy record.

[0084] Exemplarily, a unique resource primary key ID is generated for all underlying resources that the order depends on, and a piece of data is generated in the corresponding resource usage table to identify the logical pre-occupancy of each resource, rather than just locking the database.

[0085] In this step, if the remaining usage of resources in the database is sufficient, that is, the various types of resources corresponding to the order information have not reached the maximum usage, the inventory of the resource information corresponding to the order information is locked, and a target reservation record is generated; wherein, inventory locking refers to the logical occupation of various resources required for the current order, and resources will not be actually created.

[0086] It should be noted that when any resource required for an order reaches the maximum usage, the inventory cannot be locked, but a message indicating that the order creation failed will be returned to the client.

[0087] S304: Call the target resource based on the target pre-occupancy record to complete resource creation, and change the state information of the target resource.

[0088] In an embodiment of the present application, the target resources may refer to various underlying resources required for the current order, such as virtual machine resources, IP resources, network resources, disk resources, etc. Each target resource may have a corresponding record in the corresponding data table that only contains the resource primary key ID, resource primary key creation time, resource occupancy time, resource occupancy status and other data information that is not related to the actual resources, namely, the target pre-occupancy record. Therefore, the present application can call the corresponding target resource from the data table based on the target pre-occupancy record.

[0089] In this step, when the pre-occupancy is successful, the underlying resources can be called based on the target pre-occupancy record to create resources. After the creation of the underlying resources is completed, the data status corresponding to each resource primary key ID is updated to a successful creation status. At the same time, the order success information can also be returned to the client to prompt the user that the order resource creation is successful.

[0090] It should be noted that the embodiment of the present application does not specifically limit the sending form and content of the information sent to the client. For example, the information including "Order successful" can be sent in the form of a text message.

[0091] Therefore, an embodiment of the present application provides a resource calling method. When creating an order, the order of pre-occupancy is to pre-occupy first and then generate the order, thereby reducing order failures caused by insufficient resources and increasing the success rate of orders. By logically pre-occupying the resources required for processing orders, the number of concurrent requests of the system is reduced, unnecessary order processes are reduced, and the load on the business system is reduced.

[0092] Optionally, the above-mentioned business system may also be an order system, which is not specifically limited in the embodiments of the present application.

[0093] Optionally, in the method described above, the resource creation request further includes: user information; verifying the resource creation request includes:

[0094] Compare the order information and the resource information with a preset data table to obtain a comparison result;

[0095] When it is determined that the comparison results are consistent, the current quota is checked based on the user information to determine whether the current user can create an order; the current quota is the amount of resources corresponding to the order that the current user can create.

[0096] In the embodiment of the present application, the preset data table is a pre-set relationship mapping table for storing order information and the order information corresponding to resource information. In this data table, there are actual order information and resource information.

[0097] In this step, the parameters in the order information and resource information can be compared one by one with the parameters stored in advance in the preset data table to determine whether the information is consistent; when the comparison results are consistent, the user's current quota can be checked based on the user information to query how many resources the user can create and determine whether the current user can continue to create orders.

[0098] Among them, user information is used to indicate the resource quota authority of the user's current quota, that is, each user has a corresponding current quota, and different users correspond to different current quotas. The embodiment of the present application does not specifically limit the amount of the current quota of each user, which can be set in advance based on actual conditions or manually.

[0099] Therefore, the embodiment of the present application can verify the order information, resource information and user information in the resource creation request to verify the accuracy of the parameters in the resource creation request and the feasibility of creating the order, thereby improving the stability of resource creation.

[0100] Optionally, in the method described above, the order information includes an order identification number ID, order creation time, order amount and order expiration time; the user information includes a user ID, a user type, a user order initiation time, a user status and a user authority; the resource information includes: a resource ID, a resource name and a resource creation time; and verifying the resource creation request includes:

[0101] Using the first preset condition and the preset data table to verify the order identification number ID, order creation time, order amount and order expiration time, and / or using the second preset condition and the preset data table to verify the resource ID, resource name and resource creation time;

[0102] After the verification is passed, the user verification order is determined based on the time when the user initiated the order, the current quota of the current user is obtained based on the verification order, the user ID and the user type, and whether the current user meets the requirements for creating an order is determined based on the user status and the user authority;

[0103] If so, it is determined whether the current user can create an order based on the current quota.

[0104] In the embodiment of the present application, the first preset condition and the second preset condition are any one of the following possible implementation methods, and the embodiment of the present application does not specifically limit the first preset condition and the second preset condition.

[0105] Optionally, in some embodiments, the accuracy of the order information can be verified based on whether the order creation time is greater than or equal to a first threshold, and / or whether the order amount is empty, and / or whether the order expiration time is greater than or equal to a second threshold, and / or whether the order identification number ID is located in a preset data table.

[0106] Optionally, a machine learning model can also be used to verify the order identification number ID, order creation time, order amount and order expiration time to verify the accuracy of the order information.

[0107] It should be noted that after verifying the order information using the first preset condition and the preset data table, it is also possible to verify whether the resource information is consistent with the parameters in the preset data table based on a comparison algorithm.

[0108] Optionally, in other embodiments, a check can be performed to verify the accuracy of the resource information based on whether the resource ID is located in a preset data table, and / or whether the resource name is located in a preset data table, and / or whether there is a corresponding relationship between the resource ID and the resource name, and / or whether the resource creation time is greater than or equal to a third threshold.

[0109] Optionally, a machine learning model can be used to verify the resource ID, resource name, and resource creation time to verify the accuracy of the resource information.

[0110] It should be noted that after verifying the order information based on the comparison algorithm, the resource information may also be verified using the second preset condition and the preset data table.

[0111] Optionally, in some further embodiments, after determining that the order information satisfies the first preset condition and the resource information satisfies the second preset condition, the user verification order can be determined based on the time when the user initiates the order, and user verification can be performed in sequence based on the user verification order. Specifically, the user's current quota is obtained based on the user ID and user type, and whether the user can create an order is determined based on the user status and user permissions; if so, it is further determined whether the current quota can continue to create orders.

[0112] Furthermore, if the current user's credit limit is sufficient, the process may proceed to S303, otherwise, a message "order failed" is returned to the client.

[0113] It should be noted that the embodiments of the present application do not limit the specific numerical values ​​corresponding to the first threshold, the second threshold, and the third threshold, which can be set based on user needs and actual conditions. When the order creation time is less than the first threshold, and / or, and / or, the order expiration time is less than the second threshold, and / or, the order amount is not empty, and / or, the order identification number ID is located in the preset data table, and / or, the resource ID is located in the preset data table, and / or, the resource name is located in the preset data table, and / or, there is a corresponding relationship between the resource ID and the resource name and the resource creation time is less than the third threshold, the verification passes.

[0114] Therefore, the embodiments of the present application can verify order information, resource information and user information based on a variety of different verification methods, thereby improving the flexibility of verification to suit different scenarios.

[0115] Optionally, the method as described above, based on the order information and the reservation record to be processed, determines whether the resource information meets a preset condition, including:

[0116] Determine the amount of resources locked in the inventory based on the pre-occupancy record to be processed, and determine the amount of remaining resources based on the amount of resources locked in the inventory;

[0117] Determine pending orders based on the order information, and for each pending order, determine whether the resource amount corresponding to the resource information of the pending order is less than or equal to the remaining resource amount.

[0118] In an embodiment of the present application, the remaining amount of resources = the amount of various types of resources to be used in the system - the amount of resources locked in the inventory, wherein the amount of resources locked in the inventory includes multiple types of resources. When calculating the remaining amount of resources, separate calculations are performed based on the amount of resources of each type. For example, the amount of type 1 resources to be used in the system is 10, the amount of type 2 resources is 20, and the amount of type 3 resources is 5, the amount of type 1 resources locked in the inventory is 2, and the amount of type 2 resources is 3. At this time, the remaining amount of resources is 10-2=8 for type 1, 20-3=17 for type 2, and 5 for type 3.

[0119] In this step, for each pending order, the business system determines whether the remaining resources have reached the maximum usage. That is, when the amount of any type of resources required by the order reaches the maximum usage, it must return to the client that the order creation failed.

[0120] Therefore, the embodiments of the present application can determine in advance whether the remaining resources in the system meet the demand, reduce the occurrence of subsequent order failures caused by insufficient resources, and improve order processing efficiency.

[0121] Optionally, the method as described above further comprises:

[0122] When it is determined that the resource creation request verification fails, order placement failure information is generated, and the order placement failure information is sent to the client for visual display;

[0123] When it is determined that the resource information does not meet the preset conditions, order creation failure information is generated, and the order creation failure information is sent to the client for visual display.

[0124] In the embodiment of the present application, order placement failure information is used to indicate that the user's order placement failed, and the system does not need to initiate pre-occupancy; order creation failure information is used to indicate pre-occupancy failure, and the system does not need to create resources. The embodiment of the present application does not limit the specific content of the order placement failure information and the order creation failure information, and it can refer to the description of the order success information in the above embodiment.

[0125] For example, Figure 2 Taking the application scenario shown as an example, when the business system 202 determines that the resource creation request verification fails, it generates order failure information, and sends the order failure information in the form of a text message to the user's terminal device 201 for visual display; correspondingly, when the business system 202 determines that the resource information does not meet the preset conditions, it generates order creation failure information, and sends the order creation failure information in the form of a text message to the user's terminal device 201 for visual display.

[0126] Optionally, when the client receives the order placement failure information or order creation failure information, the order can be placed again to generate a new resource creation request for resource call.

[0127] Therefore, when the resource creation request verification fails or the resource information does not meet the preset conditions, the embodiment of the present application can generate information to prompt the user, so that the user can understand the situation in time and perform subsequent operations.

[0128] Optionally, in the method as described above, the target pre-occupancy record is used to mark the logical occupation of the target resource; the method further comprises:

[0129] After the target reservation record is generated, the order system is called to generate an order and deduction corresponding to the order information, and after the order deduction is successful, the order status of the order is modified;

[0130] Prompt information is generated based on the order status, and the prompt information is sent to the client for visual display; the prompt information is used to prompt the user that the order status is in the order creation process and needs to wait for the resource creation to be completed.

[0131] In an embodiment of the present application, the order status includes resource reservation, resource reservation failure, resource in use, resource creation, resource creation success, resource creation failure and other states; among which, successful resource creation corresponds to a successful order, and failed resource creation corresponds to a failed order. The order status is used to indicate the various operating states in the resource call process.

[0132] In this step, when resource reservation is successful, that is, after the target reservation record is generated, the target reservation record is the main field generated and has nothing to do with the actual resource, such as the resource primary key ID; further, the order system can be called to generate an order and deduct the fee, and after the order deduction is successful, the order status of the order is modified to resource creation; when the order creation fails, the reserved resources can be released and the client is returned to the order creation failure information; when the order creation is completed, a prompt message is returned to the client, which indicates that the order is being created. At this time, the order status is not a successful status. It is necessary to wait for the resource creation to be completed and successful before notifying the order system to modify the order status.

[0133] Therefore, the embodiment of the present application can pre-occupy resources before deducting the order fees, thereby reducing the occurrence of order refunds and simplifying the order process.

[0134] Optionally, the method as described above, calling the target resource based on the target pre-occupancy record to complete resource creation, and changing the state information of the target resource, includes:

[0135] Asynchronously calling a target resource based on the target pre-occupancy record, and creating a resource based on the target resource;

[0136] When it is determined that the resource creation fails, the inventory lock on the resource information is released, the target reservation record is deleted, and order failure information is returned when the client queries the order information;

[0137] When it is determined that the resource is created successfully, the state information of the target resource is changed, and the field information of the target resource is filled, and order success information is returned when the client queries the order information; the field information is used to identify that the target resource is used.

[0138] In this step, the physical resources of the underlying driver can be called according to the resource primary key ID in the target reservation record. After the underlying resources are asynchronously called, new data will not be repeatedly generated in the database, but the old reservation fields will be modified, that is, the order status will be changed from resource reservation to resource use. At the same time, the necessary fields of the resource can also be filled, such as the resource universally unique identifier (UUID), the region where the resource is located, etc., to broadcast that the resource is in use.

[0139] Furthermore, if the resource is created successfully, the order system can be notified, and the order success information can be returned the next time the client initiates a resource query request; the order success information is used to indicate that the resource is created successfully; if the resource creation fails, the order microservice in the order system can be notified that the resource creation failed, and the order failure information is returned the next time the client queries the order information, and the pre-occupied resource data record (target pre-occupation record) is deleted, and the pre-occupation lock is released.

[0140] For example, Figure 4 A schematic diagram of a scheme for designing pre-occupancy logic provided in an embodiment of the present application, such as Figure 4 As shown, at the beginning of pre-occupancy, the product microservice first queries the usage of various resources. When the usage of resources is sufficient, the inventory microservice locks the user inventory. After the inventory is locked, the product microservice can generate a resource primary key ID (target pre-occupancy record) for all associated resources, and then the pre-occupancy is completed.

[0141] Optionally, when resource creation fails, the product microservice needs to release the pre-occupancy, that is, the inventory microservice unlocks the user inventory and the product microservice deletes the key resource primary key ID, and the pre-occupancy is released.

[0142] Therefore, the embodiment of the present application can asynchronously call the target resource based on the unique target pre-occupancy record to complete resource creation, reduce the number of concurrent requests, and improve the success rate of resource creation.

[0143] In combination with the above embodiments, Figure 5 A flowchart of a specific resource calling method provided in an embodiment of the present application is shown as follows: Figure 5 As shown, the resource calling method includes the following steps:

[0144] Step A: After the user places an order, the client generates a resource creation request and sends it to the business system. Then the product microservice in the business system initiates a pre-occupancy request, and the inventory microservice locks the inventory. Furthermore, the product microservice pre-occupies all relevant resources based on the pre-occupancy request, and calls the order microservice to generate an order request. Correspondingly, the order microservice generates an order and deducts fees based on the order request.

[0145] Step B: The product microservice determines whether the pre-occupancy is successful: if so, it creates resources; otherwise, it deletes the pre-occupied associated resources, generates an order failure message, and releases the inventory lock.

[0146] Step C: Determine whether the resource creation is successful. If so, return the order success information and change the order status to order success; otherwise, if the corresponding resource creation fails, change the order status and refund, delete the reserved associated resources, generate order failure information, and release the inventory lock.

[0147] Using the above method, a large number of experiments have shown that when using the resource call of the present application, the order failure rate can be significantly reduced, reduced by between 0.01-0.1%, and the success rate can be significantly improved.

[0148] In the foregoing embodiments, the resource calling method provided by the embodiments of the present application is introduced, and in order to implement the various functions in the method provided by the embodiments of the present application, the electronic device as the execution subject may include a hardware structure and / or a software module, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.

[0149] For example, Figure 6 A schematic diagram of a resource calling device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the device includes: a verification module 601, a judgment module 602, a locking module 603 and a calling module 604; wherein the verification module 601 is used to receive a resource creation request corresponding to a pending order and verify the resource creation request; the resource creation request includes: order information and resource information;

[0150] The judgment module 602 is used to obtain a pending reservation record when the resource creation request is verified, and judge whether the resource information meets a preset condition based on the order information and the pending reservation record; the reservation record is used to mark the resources required for the pending order;

[0151] The locking module 603 is used to lock the inventory of the resource information corresponding to the order information and generate a target reservation record when the resource information meets the preset conditions;

[0152] The calling module 604 is used to call the target resource based on the target reservation record to complete resource creation and change the state information of the target resource.

[0153] Optionally, in the above device, the resource creation request further includes: user information; the verification module 601 is specifically used to:

[0154] Compare the order information and the resource information with a preset data table to obtain a comparison result;

[0155] When it is determined that the comparison results are consistent, the current quota is checked based on the user information to determine whether the current user can create an order; the current quota is the amount of resources corresponding to the order that the current user can create.

[0156] Optionally, in the above-mentioned device, the order information includes an order identification number ID, order creation time, order amount and order expiration time; the user information includes a user ID, a user type, a user order initiation time, a user status and a user authority; the resource information includes: a resource ID, a resource name and a resource creation time; the verification module 601 is specifically used to:

[0157] Using the first preset condition and the preset data table to verify the order identification number ID, order creation time, order amount and order expiration time, and / or using the second preset condition and the preset data table to verify the resource ID, resource name and resource creation time;

[0158] After the verification is passed, the user verification order is determined based on the time when the user initiated the order, the current quota of the current user is obtained based on the verification order, the user ID and the user type, and whether the current user meets the requirements for creating an order is determined based on the user status and the user authority;

[0159] If so, it is determined whether the current user can create an order based on the current quota.

[0160] Optionally, in the above device, the determining module 602 is specifically configured to:

[0161] Determine the amount of resources locked in the inventory based on the pre-occupancy record to be processed, and determine the amount of remaining resources based on the amount of resources locked in the inventory;

[0162] Determine pending orders based on the order information, and for each pending order, determine whether the resource amount corresponding to the resource information of the pending order is less than or equal to the remaining resource amount.

[0163] Optionally, the device as described above further comprises a generating module; the generating module is used to:

[0164] When it is determined that the resource creation request verification fails, order placement failure information is generated, and the order placement failure information is sent to the client for visual display;

[0165] When it is determined that the resource information does not meet the preset conditions, order creation failure information is generated, and the order creation failure information is sent to the client for visual display.

[0166] Optionally, in the above device, the target pre-occupancy record is used to mark the logical occupation of the target resource; the device further includes a processing module, the processing module is used to:

[0167] After the target reservation record is generated, the order system is called to generate an order and deduction corresponding to the order information, and after the order deduction is successful, the order status of the order is modified;

[0168] Prompt information is generated based on the order status, and the prompt information is sent to the client for visual display; the prompt information is used to prompt the user that the order status is in the order creation process and needs to wait for the resource creation to be completed.

[0169] Optionally, in the above-mentioned device, the calling module 604 is specifically used for:

[0170] Asynchronously calling a target resource based on the target pre-occupancy record, and creating a resource based on the target resource;

[0171] When it is determined that the resource creation fails, the inventory lock on the resource information is released, the target reservation record is deleted, and order failure information is returned when the client queries the order information;

[0172] When it is determined that the resource is created successfully, the state information of the target resource is changed, and the field information of the target resource is filled, and order success information is returned when the client queries the order information; the field information is used to identify that the target resource is used.

[0173] The specific implementation principle and effect of a resource calling device provided in an embodiment of the present application can be found in the relevant description and effects corresponding to the above embodiments, and will not be elaborated here.

[0174] The present application also provides a schematic diagram of the structure of an electronic device. Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 701 and a memory 702 communicatively connected to the processor; the memory 702 stores a computer program; the processor 701 executes the computer program stored in the memory 702, so that the processor 701 executes the method described in any of the above embodiments.

[0175] The memory 702 and the processor 701 may be connected via a bus 703 .

[0176] An embodiment of the present application further provides a computer-readable storage medium, which stores computer program execution instructions. When the computer program execution instructions are executed by a processor, they are used to implement the method described in any of the aforementioned embodiments of the present application.

[0177] An embodiment of the present application further provides a chip for executing instructions, wherein the chip is used to execute the method described in any of the aforementioned embodiments as executed by an electronic device in any of the aforementioned embodiments of the present application.

[0178] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method described in any of the aforementioned embodiments of the present application executed by an electronic device can be implemented.

[0179] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules 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 through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0180] The modules described as separate components may or may not be physically separated, and the components shown as modules 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 modules may be selected according to actual needs to implement the solution of this embodiment.

[0181] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0182] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application.

[0183] It should be understood that the processor may 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 may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.

[0184] The memory may include high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk storage, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.

[0185] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0186] The above 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 storage medium can be any available medium that can be accessed by a general or special computer.

[0187] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.

[0188] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0189] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0190] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0191] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.

[0192] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.

Claims

1. A resource calling method, It is characterized in that The method comprises: Receive a resource creation request corresponding to a pending order, and verify the resource creation request; the resource creation request includes: order information and resource information; When the resource creation request passes the verification, obtain the pending reservation record, and determine whether the resource information meets the preset conditions based on the order information and the pending reservation record; the reservation record is used to mark the resources required for the pending order; If so, the resource information corresponding to the order information is locked in inventory, and a target reservation record is generated; The target resource is called based on the target pre-occupancy record to complete resource creation, and the state information of the target resource is changed.

2. The method according to claim 1, It is characterized in that The resource creation request also includes: user information; verifying the resource creation request includes: Compare the order information and the resource information with a preset data table to obtain a comparison result; When it is determined that the comparison results are consistent, the current quota is checked based on the user information to determine whether the current user can create an order; the current quota is the amount of resources corresponding to the order that the current user can create.

3. The method according to claim 2, It is characterized in that The order information includes the order identification number ID, order creation time, order amount and order expiration time; The user information includes user ID, user type, time when the user initiated the order, user status and user authority; The resource information includes: resource ID, resource name and resource creation time; verifying the resource creation request includes: Using the first preset condition and the preset data table to verify the order identification number ID, order creation time, order amount and order expiration time, and / or using the second preset condition and the preset data table to verify the resource ID, resource name and resource creation time; After the verification is passed, the user verification order is determined based on the time when the user initiated the order, the current quota of the current user is obtained based on the verification order, the user ID and the user type, and whether the current user meets the requirements for creating an order is determined based on the user status and the user authority; If so, it is determined whether the current user can create an order based on the current quota.

4. The method according to claim 1, It is characterized in that Based on the order information and the reservation record to be processed, judging whether the resource information meets a preset condition includes: Determine the amount of resources locked in the inventory based on the pre-occupancy record to be processed, and determine the amount of remaining resources based on the amount of resources locked in the inventory; Determine pending orders based on the order information, and for each pending order, determine whether the resource amount corresponding to the resource information of the pending order is less than or equal to the remaining resource amount.

5. The method according to claim 1, It is characterized in that The method further comprises: When it is determined that the resource creation request verification fails, order placement failure information is generated, and the order placement failure information is sent to the client for visual display; When it is determined that the resource information does not meet the preset conditions, order creation failure information is generated, and the order creation failure information is sent to the client for visual display.

6. The method according to claim 1, It is characterized in that The target pre-occupancy record is used to mark the logical occupation of the target resource; the method further includes: After the target reservation record is generated, the order system is called to generate an order and deduction corresponding to the order information, and after the order deduction is successful, the order status of the order is modified; Prompt information is generated based on the order status, and the prompt information is sent to the client for visual display; the prompt information is used to prompt the user that the order status is in the order creation process and needs to wait for the resource creation to be completed.

7. The method according to any one of claims 1 to 6, It is characterized in that Calling the target resource based on the target pre-occupancy record to complete resource creation, and changing the state information of the target resource, including: Asynchronously calling a target resource based on the target pre-occupancy record, and creating a resource based on the target resource; When it is determined that the resource creation fails, the inventory lock on the resource information is released, the target reservation record is deleted, and order failure information is returned when the client queries the order information; When it is determined that the resource is created successfully, the state information of the target resource is changed, and the field information of the target resource is filled, and order success information is returned when the client queries the order information; the field information is used to identify that the target resource is used.

8. A resource calling device, It is characterized in that The device comprises: A verification module, used to receive a resource creation request corresponding to a pending order and verify the resource creation request; the resource creation request includes: order information and resource information; A judgment module, used for obtaining a pending reservation record after the resource creation request is verified, and judging whether the resource information meets a preset condition based on the order information and the pending reservation record; the reservation record is used to mark the resources required for the pending order; A locking module, used to lock the inventory of the resource information corresponding to the order information when the resource information meets the preset conditions, and generate a target pre-occupancy record; The calling module is used to call the target resource based on the target pre-occupancy record to complete resource creation and change the state information of the target resource.

9. An electronic device, It is 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 to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is 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 7 when executed by a processor.