Inventory data processing method, system and device, storage medium and program product

By obtaining the current inventory data at the target moment and determining the inventory change amount within the target period, checking the current inventory data to solve the statistical lag of virtual resource inventory data, the accuracy of the inventory data and the matching of user needs is achieved.

CN120353566APending Publication Date: 2025-07-22HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410089151.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-22
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

In the prior art, there is a lag in the statistics of virtual resource inventory data, resulting in the phenomenon of "oversold" or "selling less" of virtual resources, which cannot accurately reflect user needs.

Method used

By obtaining the current inventory data at the target moment and determining the inventory change amount within the target period, the current inventory data is verified using this change amount to obtain the real inventory data at the target moment.

Benefits of technology

Accurately reflect the inventory data at the target moment, reduce the "oversold" and "selling less" phenomena of virtual resources, and improve the accuracy of inventory data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120353566A_ABST
    Figure CN120353566A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an inventory data processing method, system and device, a storage medium and a program product, and the method comprises the steps that when a user generates a creation request of a virtual resource at a target moment, a data consumer can obtain the current inventory data, counted before the target moment, of the virtual resource; in a target time period formed by a target moment and a timestamp corresponding to the current inventory data, the inventory data can be changed, so that the current inventory data cannot accurately reflect the inventory at the target moment. In this case, the inventory variable quantity of the virtual resources in the target time period can be further determined, and the current inventory data is verified by using the inventory variable quantity, so that the real inventory data at the target time is obtained. Visibly, in the scheme, the current inventory data can be compensated by using the inventory variation in the target time period to obtain the real inventory data at the target time, so that the hysteresis of the inventory data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular, to a method, system, device, storage medium and program product for processing inventory data. Background Art

[0002] With the continuous development of information technology, cloud computing, as an emerging technology model, is increasingly attracting people's attention and emphasis. In cloud computing, computing resources can be virtualized into various services, such as storage, computing, network, etc. The services used by users are delivered to users in the form of virtual resources. For example, an Elastic Cloud Server (ECS) can be provided to users as a virtual resource to meet the users' usage requirements for computing services.

[0003] When a user needs to use virtual resources, the cloud service provider needs to determine whether it can allocate virtual resources to the user based on the inventory data of the virtual resources. In the prior art, however, the statistics of virtual resource inventory data often have a lag, and this lag may lead to the phenomenon of "overselling" or "underselling" of virtual resources.

[0004] Then how to improve the lag in inventory data statistics becomes an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method, system, device, storage medium and program product for processing inventory data to improve the lag in inventory data statistics.

[0006] In a first aspect, an embodiment of the present invention provides a method for processing inventory data, including:

[0007] Responding to a creation request for virtual resources generated at a target moment, and obtaining current inventory data statistically obtained before the target moment;

[0008] Determining an inventory change amount of virtual resources within a target time period, where the target time period is composed of the target moment and the time stamp corresponding to the current inventory data;

[0009] Verifying the current inventory data according to the inventory change amount within the target time period to obtain verified inventory data of virtual resources at the target moment.

[0010] In a second aspect, an embodiment of the present invention provides a system for processing inventory data, including: a data generation party and a data consumption party;

[0011] The data generation party is configured to statistically obtain inventory data of virtual resources within different statistical periods; and synchronize the statistically obtained inventory to the data consumption party;

[0012] The data consumer is configured to receive a creation request for virtual resources generated at a target time; obtain the current inventory data counted before the target time; determine the inventory change amount of virtual resources within a target time period, where the target time period is composed of the target time and the timestamp corresponding to the current inventory data; and verify the current inventory data according to the inventory change amount within the target time period to obtain the verified inventory data of virtual resources at the target time.

[0013] In a third aspect, an embodiment of the present invention provides an electronic device, including: the memory is configured to store one or more computer instructions, where when the one or more computer instructions are executed by the processor, the inventory data processing method described in the first aspect above is implemented. The electronic device may further include a communication interface for communicating with other devices or communication systems.

[0014] In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the inventory data processing method described in the first aspect.

[0015] In a fifth aspect, an embodiment of the present invention provides a computer program product. The computer program product includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the processor can implement the inventory data processing method described in the first aspect.

[0016] For the inventory data processing method provided by the embodiment of the present invention, when the user generates a creation request for virtual resources at the target time, it indicates that the user has a demand for virtual resources. Then the data consumer can obtain the current inventory data of virtual resources counted before the target time. In practice, the timestamp corresponding to the current inventory data and the target time may not be the same, and within the target time period composed of the target time and the timestamp corresponding to the current inventory data, there may also be changes in the inventory data. Therefore, the current inventory data cannot accurately reflect the inventory at the target time. And the length of the target time period can also reflect the lag degree of the current inventory data. Based on this, the data consumer can further determine the inventory change amount of virtual resources within the target time period, and use the inventory change amount within this target time period to verify the current inventory data to obtain the verified inventory data, which is also the real inventory data at the target time.

[0017] It can be seen that in the above solution, the inventory change amount within the target time period can be used as a compensation value to compensate the current inventory data, so as to obtain the true inventory data at the target moment. And in this solution, since the generation time of the creation request is not fixed and the statistical timestamp of the current inventory data is also not fixed, the length of the target time period is dynamic. Compared with using a time period with a fixed length, this dynamic time period can accurately reflect the lag degree of the current inventory data, so as to obtain a more accurate inventory change amount, accurately compensate the inventory data, and finally obtain the true inventory data. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0019] Figure 1 It is a schematic diagram of an inventory data generation and consumption process;

[0020] Figure 2 It is a schematic diagram of the reasons for inventory data verification;

[0021] Figure 3 It is a schematic diagram of the structure of an inventory data processing system provided by an embodiment of the present invention;

[0022] Figure 4 It is a schematic diagram of an inventory data verification process provided by an embodiment of the present invention;

[0023] Figure 5 It is a schematic diagram of an inventory change amount statistical process provided by an embodiment of the present invention;

[0024] Figure 6 It is a flowchart of an inventory data processing method provided by an embodiment of the present invention;

[0025] Figure 7a It is a flowchart of another inventory data processing method provided by an embodiment of the present invention;

[0026] Figure 7b It is a schematic diagram of the relationship between inventory data and time periods provided by an embodiment of the present invention;

[0027] Figure 8 It is a flowchart of a target time period determination method provided by an embodiment of the present invention;

[0028] Figure 9 It is a schematic diagram of a virtual resource trading process provided by an embodiment of the present invention;

[0029] Figure 10 This is a schematic structural diagram of an inventory data processing device provided by an embodiment of the present invention;

[0030] Figure 11 This is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0032] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the", and "said" used in the embodiments of the present invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. "Plural" generally includes at least two, but does not exclude the case of including at least one.

[0033] It should be understood that the term "and / or" used herein is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the front and rear associated objects.

[0034] Depending on the context, the words "if", "when" as used herein can be interpreted as "when" or "while" or "in response to determining" or "in response to recognizing". Similarly, depending on the context, the phrase "if determined" or "if recognized (stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when recognizing (stated condition or event)" or "in response to recognizing (stated condition or event)".

[0035] 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 for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for users to select authorization or rejection.

[0036] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a commodity or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such commodity or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the commodity or system including said element.

[0037] The following will describe in detail some embodiments of the present invention with reference to the accompanying drawings. In the case of no conflict between the embodiments, the following embodiments and the features in the embodiments may be combined with each other. In addition, the step timing in the following method embodiments is only an example and not strictly limited.

[0038] Before describing the following embodiments of the present invention in detail, it is also possible to describe the process of generating and consuming inventory data. The following content can also be combined with Figure 1 understanding.

[0039] In the process of generating and consuming inventory data, two roles are involved, namely the data generation party and the data consumption party. The data generated or consumed by both parties is the inventory data of virtual resources. Optionally, the virtual resources can be ECS servers, relational databases, containers, etc. And in the systems and methods mentioned in the embodiments of the present invention, the steps executed by each role are actually completed by the devices corresponding to each role. It's just that for the sake of clear subsequent description, the following embodiments continue to use the names of the data generation party and the data consumption party.

[0040] In practice, a user can generate a scheduling request for virtual resources. Optionally, the user can directly trigger a scheduling request on the platform providing virtual resource trading services. The scheduling request contains the resource quantity. And the inventory data processing system composed of the data service party and the data consumption party can be integrated into this platform. The data consumption party can receive the scheduling request generated by the user using its own set processing flow, and the data generation party can also receive the scheduling request forwarded by the data generation party using its own set processing flow. And considering that the execution speed of the processing flow is relatively fast, therefore, the generation moment of the scheduling request can be approximately considered the same as the receiving moment of the data consumption party for this scheduling request.

[0041] The data generation party can periodically count the inventory data of virtual resources according to the resource quantity in the received scheduling request, that is, complete the generation of inventory data. Optionally, the platform providing trading services can display or not display the counted inventory data to the user.

[0042] Among them, more specifically, this scheduling request may include a creation request for virtual resources or a release request for virtual resources. The number of resources in the creation request is the number of virtual resources that need to be created, and the number of resources in the release request is the number of virtual resources that can be released by the user.

[0043] For virtual resources manifested as ECS cloud servers, the process of the platform's response to the scheduling request is the process of providing the user with Elastic Compute Service (ECS); for virtual resources manifested as relational databases, the process of the platform's response to the scheduling request is the process of providing the user with Relational Database Service (RDS); for virtual resources manifested as containers, the process of the platform's response to the scheduling request is the process of providing the user with Cloud Container Compute Service (CS).

[0044] Among them, within the statistical period, after the user generates a creation request and / or a release request, the computing resources in the physical host will also be correspondingly deducted or returned. Then, the statistical process of the inventory data can be considered as: the process of converting the remaining computing resources in the physical host into the number of virtual resources. Therefore, this conversion process takes a certain amount of time. This computing process can be implemented by a computing engine provided by the data consumer.

[0045] And the statistically obtained inventory data can also be synchronized to the data consumer. This synchronization process also takes a certain amount of time.

[0046] After receiving the inventory data synchronized by the data producer, the data consumer can also receive a new creation request from the user. If the number of resources included in this creation request is less than the inventory data received by the data consumer, indicating that the inventory of current virtual resources is sufficient, the data consumer can consider this creation request valid, that is, the consumption of the inventory data is completed. Finally, the platform providing the virtual resource trading service can create the corresponding number of virtual resources for the user.

[0047] In the above process, since the statistics and synchronization of the inventory data both take time, the inventory data obtained by the data consumer is lagged. The lag of the inventory data can also be combined with Figure 2 understood. Such as Figure 2As shown in the figure, time T1 is the start time for statistical calculation of inventory data, time T2 is the end time for statistical calculation of inventory data, time T3 is the start time for synchronization of inventory data, and time T4 is the end time for synchronization of inventory data. Time T5 is the generation time of a scheduling request. During the time period from time T1 to time T5, while the data generation party is performing statistical calculation and synchronization of inventory data, the user can also generate creation requests C1 and C2 for virtual resources and release requests R1 and R2 for virtual resources during this time period, that is, the inventory of virtual resources changes during this time period, and this change is not known to the data consuming party. Therefore, the inventory data received by the data consuming party at time T4 actually reflects the inventory of virtual resources at time T1, and it cannot truly reflect the inventory of virtual resources at time T5. So, from the perspective of the data consuming party, there is a lag in the statistical calculation of inventory data. At this time, the "overselling" and "underselling" phenomena mentioned in the background art are likely to occur.

[0048] In order to improve the lag in the statistical calculation of inventory data and further improve the "overselling" and "underselling" problems, the methods and systems provided in the following embodiments of the present solution can be used.

[0049] Figure 3 The following is a schematic structural diagram of an inventory data processing system provided by an embodiment of the present invention. As Figure 3 shown, this system can be integrated into a platform that provides virtual resource trading services. This system can include: a data generation party and a data consuming party.

[0050] The data generation party is used to statistically calculate the inventory data of virtual resources and synchronize the statistically calculated inventory to the data consuming party. Optionally, the inventory data statistically calculated by the data generation party can be stored in a first database local to the data generation party, and the data consuming party can store the inventory data synchronized by the data generation party in a second database local to the data consuming party.

[0051] When the user has a creation requirement for virtual resources, a creation request for virtual resources can be generated through the platform, and this request can be generated at a target time. At this time, the data consuming party can obtain the current inventory data from the second database. Among them, the current inventory data is the latest inventory data stored in the second database, that is, the current inventory data is statistically calculated and synchronized to the data consuming party before the target time, and the start time of statistical calculation corresponding to this current inventory data is later than the start time of statistical calculation corresponding to other inventory data in the second database; similarly, the end time of statistical calculation corresponding to the current inventory data is also later than the end time of statistical calculation corresponding to other inventory data.

[0052] After obtaining the current inventory data, the data consumer can further determine the inventory change amount of virtual resources within the target period, where the target period is composed of the target time and the timestamp corresponding to the current inventory data. Optionally, the timestamp corresponding to the current inventory data can be used to describe a moment during the inventory data statistics process. This timestamp can have different meanings, and different statistical timestamps with different meanings are applicable to different situations.

[0053] When the accuracy requirement for the calibrated inventory data is relatively high, the timestamp corresponding to the current inventory data can be used to describe the start moment of the statistics of the current inventory data. Based on what is shown in Figure 2 If a user generates a creation request for virtual resources at time T5 (i.e., the target time), the target period can be composed of time T1 and time T5. Optionally, the timestamp corresponding to the current inventory data can also be used to describe the end moment of the statistics of the current inventory data. Based on what is shown in Figure 2 the target period can be composed of time T2 and time T5.

[0054] When the accuracy requirement for the verified inventory data is relatively low, optionally, the timestamp corresponding to the current inventory data can be used to describe the start moment of the synchronization of the current inventory data. Based on what is shown in Figure 2 the target period can be composed of time T3 and time T5. Optionally, the timestamp corresponding to the current inventory data can also be used to describe the end moment of the synchronization of the current inventory data. Based on what is shown in Figure 2 the target period can be composed of time T4 and time T5.

[0055] Optionally, for the convenience of calculation, the target time and the statistical timestamp used to determine the target period can be rounded to the nearest minute. And it is easy to understand from the above examples that the longer the target period, the higher the lag degree of the current inventory data.

[0056] For the determination method of the inventory change amount, optionally, the data consumer can obtain the creation requests and release requests of virtual resources generated by different users within the target period, and calculate the sum of the resource quantities included in the creation requests and the resource quantities included in the release requests. The result of this summation is the inventory change amount within the target period. Among them, the virtual quantity in the creation request is represented by a positive number, and the resource quantity in the release request is represented by a negative number.

[0057] Finally, the data consumer can verify the current inventory data based on the inventory change amount within this target period, so as to obtain the verified inventory data of virtual resources at the target time. This inventory change amount is also the compensation value of the current inventory data, which is used to realize the verification of the inventory data.

[0058] According to the above description, the data generator's statistics and synchronization of inventory data are carried out periodically, while the data consumer determines the inventory change amount after receiving the creation request generated by the user. And the working processes of all parties in the above system can also be combined with Figure 4 understanding.

[0059] The working processes of all parties in this system can also be combined with, for example, Figure 5 as shown in the following example for understanding: The user can generate a creation request for virtual resources at time T5. The data consumer can obtain the current inventory data that has been completed in statistics and synchronization at time T4. Assume that the current inventory data is 100. During the target time period from T1 to T5, the user also sequentially generates creation requests C3, release request R3, and creation request C4 at times T6 to T8. Among them, the number of resources included in creation request C3 is 15, the number of resources included in release request R3 is -12, and the number of resources included in creation request C4 is 10. Then the inventory change amount during the target time period is 15 - 12 + 10 = 13. Finally, the verified inventory data is 113.

[0060] The statistical process of the above inventory change amount can also be expressed by the following general formula:

[0061]

[0062] where n is the time period, t is the timestamp corresponding to the current inventory data, d(t,n) is the inventory change amount within time period n, C i is the number of resources included in the creation request at time i, and R i is the number of resources included in the release request at time i.

[0063] The verification process of the current inventory can also be expressed by the following formula: I t+n = I t + d(t,n).

[0064] where I t+n is the verified inventory data at the target time, and I t is the current inventory data.

[0065] In this embodiment, when a user generates a creation request for a virtual resource at a target moment, it indicates that the user has a demand for the virtual resource. Then, the data consumer can obtain the current inventory data of the virtual resource counted before the target moment. However, this current inventory data is often lagged, that is, the current inventory data cannot accurately reflect the inventory at the target moment. Among them, the length of the target time period can reflect the lag degree of the current inventory data. In this case, the data consumer can further determine the inventory change amount of the virtual resource within the target time period, and use the inventory change amount within this target time period to verify the current inventory data, so as to obtain the verified inventory data of the virtual resource at the target moment, that is, the real inventory data at the target moment.

[0066] It can be seen that in the above solution, the inventory change amount within the target time period can be used to compensate the current inventory data to obtain the real inventory data at the target moment. And in this solution, since the generation moment of the creation request is not fixed, and the duration required for the statistics and synchronization of the current inventory data is also not fixed, the length of the target time period is dynamic. Compared with using a time period with a fixed length, this dynamic time period can accurately reflect the lag degree of the current inventory data, so as to obtain a more accurate inventory change amount to accurately compensate the inventory data and finally obtain the real inventory data.

[0067] Optionally, in practice, the inventory data counted by the data generator can be stored in a database. In the above embodiment, when the data consumer receives the creation request generated at the target moment, since the data generator has performed at least one statistics and synchronization of the inventory data, the data consumer can directly obtain the current inventory data from the database. And in practice, the following situation may also occur: when the data consumer receives the creation request generated at the target moment, the data generator has not completed a statistics and synchronization of the inventory data, so there is no current inventory data in the database, or more precisely, the database is empty, and then the data consumer cannot obtain the current inventory data.

[0068] For this situation, the data consumer can also directly determine the inventory change amount of the virtual resource within the target time period. Among them, since there is no time stamp corresponding to the current inventory data in this case, the target time period can be composed of the target moment and a reference moment with a preset duration before the target moment. Optionally, this preset duration can be the average time required for the data generator to complete a statistics and synchronization of the inventory data. Then, the data consumer can directly determine the inventory change amount of the target time period as the verified current inventory data of the virtual resource at the target moment.

[0069] And in order to distinguish from the preset duration involved in the subsequent embodiments, the preset duration mentioned in this embodiment can be called the first preset duration.

[0070] In either of the above cases, the data consumer can complete the verification to obtain the current inventory data after verification. Optionally, the data consumer can further verify the validity of the creation request based on the inventory data after verification, so that the platform providing the virtual resource trading service can respond to the valid creation request and create the corresponding amount of training resources for the user. Specifically, if the inventory data after verification is greater than the resource quantity in the creation request, the creation request can be considered valid.

[0071] In this embodiment, since the verified inventory data can accurately reflect the inventory data at the target moment, further, the validity of the creation request can be accurately determined, thereby reducing the phenomena of "overselling" and "underselling" of virtual resources.

[0072] The working process of the data consumer can be further described in detail from the perspective of the process. Then Figure 6 is a flowchart of a method for processing inventory data provided by an embodiment of the present invention. The method provided by the embodiment of the present invention can be executed by the data consumer in the above inventory data processing system. As Figure 6 shown, the method may include the following steps:

[0073] S101, in response to a creation request for a virtual resource generated at a target moment, obtain the current inventory data statistically obtained before the target moment.

[0074] S102, determine the inventory change amount of the virtual resource within a target time period, where the target time period is composed of the target moment and the time stamp corresponding to the current inventory data.

[0075] S103, verify the current inventory data according to the inventory change amount within the target time period to obtain the verified inventory data of the virtual resource at the target moment.

[0076] The data consumer can receive a creation request for a virtual resource generated by a user at a target moment. In response to the reception of the request, the data consumer can also obtain the current inventory data stored locally and statistically obtained before this target moment. As recorded in the above embodiments, the current inventory data is synchronized from the data producer.

[0077] At the same time, the data consumer can also obtain the inventory change amount of the virtual resource within the target time period. For the specific composition of the target time period and the specific process of obtaining the inventory change amount, reference can be made to Figure 3 the relevant descriptions in the embodiments shown, which will not be elaborated here.

[0078] Finally, the data consumer can verify the current inventory data according to the inventory change amount within the target time period to obtain the verified inventory data that can accurately reflect the virtual resource inventory at the target moment.

[0079] In addition, for the specific implementation manners of the steps in this embodiment and the achievable technical effects, reference may be made to the relevant descriptions in the embodiments shown above. Figure 3 Details are not described herein again.

[0080] In this embodiment, when the user generates a creation request for a virtual resource at a target moment, it indicates that the user has a demand for the virtual resource. Then, the data consumer can obtain the current inventory data of the virtual resource counted before the target moment. However, this current inventory data is often lagged, that is, the current inventory data cannot accurately reflect the inventory at the target moment. Among them, the length of the target time period can reflect the lag degree of the current inventory data. In this case, the data consumer can further determine the inventory change amount of the virtual resource within the target time period, and use the inventory change amount within this target time period to verify the current inventory data, so as to obtain the verified inventory data of the virtual resource at the target moment, that is, the real inventory data at the target moment.

[0081] It can be seen that in the above solution, the inventory change amount within the target time period can be used to compensate the current inventory data to obtain the real inventory data at the target moment. And in this solution, since the generation moment of the creation request is not fixed, and the duration required for the statistics and synchronization of the current inventory data is also not fixed, the length of the target time period is dynamic. Compared with using a time period with a fixed length, this dynamic time period can accurately reflect the lag degree of the current inventory data, so as to obtain a more accurate inventory change amount, accurately compensate the inventory data, and finally obtain the real inventory data.

[0082] As Figure 3 described in the embodiments shown above, the data consumer can store the inventory data synchronized by the data generator into the second database, and the data in this database can be stored in the form of data bodies. The data consumer can then determine the current database from the data bodies by inputting a query statement. And common data bodies can include key-value pairs, documents, row elements (records), or column elements, etc.

[0083] When the data body is specifically a key-value pair, that is, the inventory data counted before the target moment and the time stamp corresponding to the inventory data can be stored in the second database in the form of key-value pairs. Among them, the second database can be Redis, and the key-value pair can be expressed as: Pair<SK, historyNum>, where SK in the key-value pair is the primary key (key) used to represent the statistical time stamp; historyNum is the key value (value) used to represent the inventory data.

[0084] For the process of the data consumer obtaining the current inventory data, optionally, the data consumer can query in the second database based on the primary key to query the first target key-value pair. The primary key in the first target key-value pair includes the time stamp closest to the target moment, and the key-value in the certain target key-value pair is the current inventory data.

[0085] As time accumulates, the number of key-value pairs in the second database will gradually increase. To improve the query speed of the target key-value pair, optionally, at least one key-value pair in the second database can be stored in the cache of the data consumer. Each of these at least one key-value pairs contains a time stamp with a second preset time interval from the target moment. This second preset time interval can be set as the average time required for multiple inventory data statistics and synchronizations. Suppose the average time required for one inventory data statistics and update is, for example, 7 minutes, then the second preset time interval can be an integer multiple of 7.

[0086] Optionally, the time stamp in the key-value pair can also be at the minute level, which can eliminate Figure 3 the minute-level rounding process mentioned in the embodiments shown, thus simplifying the verification process of the inventory data.

[0087] In practice, virtual resources of the same type can also have different specifications. Taking the ECS server as an example, the virtual resource specifications of the server specifications can specifically include the running area of the server, the number of cores, the memory size, the operating system version, etc. And the key-value pairs in the second database are also associated with the resource specifications. At this time, the key-value pairs in the second database can be expressed as PK-<Pair<SK,historyNum>>. Among them, PK is the resource specification associated with the key-value pair, SK in the key-value pair is the primary key (key), used to represent the statistical time stamp; historyNum is the key-value (value), used to represent the inventory data. Then when the user generates a creation request, the data consumer can determine the first target key-value pair associated with the target resource specification from the second database according to the target resource specification in the creation request. Among them, the target resource specification in the creation request is used to describe the specification of the virtual resource to be created. As exemplified above, when the virtual resource is specifically an ECS server, the target resource specification is the server specification. When the virtual resource is specifically a relational database, the target resource specification is the database specification, such as the database size, the size of the largest column in the database, etc.

[0088] In this embodiment, since the key-value contains two types of data, namely "key" and "value", and the "value" can be directly accessed through the "key", the time complexity of his search is O(1), that is, the target can be found through one search. Therefore, using this data format of key-value pairs can improve the query speed of the first target key-value pair, that is, improve the acquisition speed of the current inventory data. And in order to further improve the acquisition speed of inventory data, the query range of key-value pairs can also be narrowed, that is, query the key-value pairs in the cache of the data consumer.

[0089] Optionally, the generation timestamp of the scheduling request and the number of resources included in the scheduling request can also be stored in the form of a structure. Then, the data consumer can first obtain the scheduling requests of virtual resources generated within the target period according to the respective generation timestamps of different scheduling requests in the structure, that is, the creation request and release request of virtual resources, and determine the inventory change amount within the target period based on the number of resources included in the scheduling request. Then based on Figure 3 As described in the embodiment shown, the data consumer also calculates the sum of the number of resources included in the creation request and the number of resources included in the release request, and the result of this summation is the inventory change amount of the target period.

[0090] When the data body is specifically represented as a key-value pair, the generation timestamp of the request can be used as the primary key in the key-value pair, and the number of resources can be used as the key value in the key-value pair. This key-value pair can be stored in the third database in the data consumer. And the key-value pairs in this third database can be represented as Pair<T, Num>>. Among them, T in the key-value pair is the primary key (key), which is used to represent the generation timestamp of the request; Num is the key value (value), which is used to represent the number of resources in the request.

[0091] Based on this, the data consumer can query the second target key-value pair in the third database according to the key value, and calculate based on the key value in this second target key-value pair, and the calculation result is the inventory change amount. Among them, the primary key in the second target key-value pair is within the target period.

[0092] Optionally, in order to improve the query speed of the second target key-value pair, at least one key-value pair in the third database can also be stored in the cache of the data consumer. The generation timestamps included in each of these at least one key-value pairs are all separated from the target moment by a third preset duration. This third preset duration can be set to the average duration required for a statistical and synchronization of inventory data, such as 7 minutes.

[0093] Similar to the above example, in this embodiment, using this data format of key-value pairs can also improve the query speed of the second target key-value pair, that is, improve the calculation speed of the inventory change amount. And in order to further improve the acquisition speed of inventory data, the query range of key-value pairs can also be narrowed, that is, query the key-value pairs in the cache.

[0094] According to Figure 3 the description in the embodiments shown, the accuracy of the inventory change amount as the compensation value can directly affect the accuracy of the current inventory data verification. To improve the accuracy of the inventory data verification, the data consumer can also execute the method shown in FIG. 7.

[0095] FIG. 7 is a flowchart of another inventory data processing method provided by an embodiment of the present invention. As shown in FIG. 7, the method may include the following steps:

[0096] S201, in response to a creation request for a virtual resource generated at a target time, obtain the current inventory data statistically obtained before the target time.

[0097] For the specific implementation process of the above step S201, reference may be made to Figure 6 the specific description of the relevant steps in the embodiments shown, which will not be elaborated here.

[0098] S202, obtain historical inventory data statistically obtained before the current inventory data, and a preset time period is set between the time stamps corresponding to the current inventory data and the historical inventory data respectively.

[0099] In addition to storing the current inventory data, the second database of the data consumer may also store historical inventory data. Among them, a preset time period may be set between the time stamps corresponding to the historical inventory data and the current inventory data respectively, and this preset time period can be regarded as the statistical period for the data generator to perform inventory data statistics. And the time stamp corresponding to the historical inventory data is earlier than the time stamp corresponding to the current inventory data.

[0100] S203, determine the inventory change amount during the historical period according to the resource quantity included in the scheduling request generated during the historical period, and the historical period is composed of the time stamps corresponding to the historical inventory data and the current inventory data respectively.

[0101] The data consumer may also obtain the scheduling requests generated during the historical period, that is, obtain the creation requests and release requests for virtual resources generated by different users during the historical period, and calculate the sum of the resource quantities included in the creation requests and the resource quantities included in the release requests, and the summation result is the inventory change amount during the historical period. Among them, the historical period is composed of the time stamps corresponding to the historical inventory data and the current inventory data respectively.

[0102] S204, if the difference between the historical inventory data and the current inventory data is less than the inventory change amount during the historical period, verify the historical inventory data according to the inventory change amount during the target period.

[0103] In a case, if the difference between the historical inventory data and the current inventory data is less than the inventory change amount within the historical period, it indicates that the current inventory data is inaccurate. Then, the data consumer can use the inventory change amount within the target period to verify the historical inventory data. Herein, the target period is composed of the target moment and the time stamp corresponding to the current inventory data.

[0104] And optionally, when the user generates a new creation request after the target moment, the inventory data needs to be verified again. To prevent the inaccurate current inventory data from having an adverse impact during the process of re-verifying the inventory data, the data consumer can also delete this current inventory data.

[0105] S205, if the difference between the historical inventory data and the current inventory data is greater than or equal to the inventory change amount within the historical period, verify the current inventory data according to the inventory change amount within the target period.

[0106] In another case, if the difference between the historical inventory data and the current inventory data is greater than or equal to the inventory change amount within the historical period, it indicates that the current inventory data is accurate but lagged. Then, the data consumer can use the inventory change amount of the target period to verify this current inventory data.

[0107] In this embodiment, the relationship between the historical inventory data, the time stamps respectively corresponding to the current inventory data, the historical period, and the target period can also be combined Figure 7b for understanding.

[0108] In this embodiment, by comparing the magnitude relationship between the difference between the historical inventory data and the current inventory data and the inventory change amount within the historical period, it can be determined whether the current inventory data is accurate, so that the data consumer uses the inventory change amount within the target period as a compensation value to verify the accurate but lagged current inventory data or the historical inventory data, so as to ensure that the verified inventory data can truly reflect the inventory of virtual resources at the target moment.

[0109] As can be seen from the description in the above embodiments, when the difference between the historical inventory data and the current inventory data is greater than or equal to the inventory change amount within the historical period, it can be considered that the current inventory data is accurate but lagged. Only at this time does it meet the condition for verifying the current inventory data, that is, it is possible to verify this current inventory data based on the inventory change amount within the target period. In practice, it is also possible that the difference is always less than the inventory change amount within the historical period. At this time, as can be seen from the description in step S204, the data consumer will always verify the historical inventory data. Since the earlier the statistical timestamp of the historical inventory data, the longer the time interval between this statistical timestamp and the target moment, the lower the confidence level of the historical inventory data. Therefore, the verified inventory data obtained by continuously verifying the historical inventory data cannot accurately reflect the inventory at the target moment. At this time, there may be a phenomenon of "under-selling" of virtual resources. Among them, the lag of inventory data may be because it takes a certain amount of time for inventory data calculation and synchronization, but this time consumption can be calculated; there may also be time consumption generated by other calculations that cannot be accurately calculated, and this time consumption will accumulate over time, resulting in the earlier the statistical timestamp of the historical inventory data, the lower the confidence level of the historical inventory data.

[0110] To improve the above problems, it is necessary to determine a reasonable length of the historical period. Based on this reasonable historical period scenario, it is also possible to ensure the reasonableness of the inventory change amount within the historical period, so that the difference between the historical inventory data and the current inventory data will not always be less than the inventory change amount within the historical period. The data consumer can then calibrate the current inventory data, and the accuracy of the verified inventory data will not be affected by the high or low confidence level of the historical inventory data.

[0111] At this time, the Figure 8 illustrated embodiment can be used to determine an appropriate historical period. Figure 8 The flowchart of a method for determining a historical period provided by an embodiment of the present invention is shown. As shown in Figure 7, the method may include the following steps:

[0112] S301, Obtain historical inventory data counted before the current inventory data, and there is a preset time interval between the timestamps corresponding to the current inventory data and the historical inventory data.

[0113] For the specific implementation process of the above step S301, reference can be made to the specific description of the relevant steps in the embodiment shown in Figure 7, which will not be elaborated here.

[0114] S302, If the timestamp corresponding to the historical inventory data is earlier than the reference moment, then determine the period composed of the timestamp corresponding to the current inventory data and the reference moment as the historical period, and the reference moment is earlier than the target moment by a preset time interval.

[0115] In S303, if the timestamp corresponding to the historical inventory data is later than the reference time, the period formed by the timestamps corresponding to the historical inventory data and the current inventory data respectively is determined as the historical period.

[0116] Then, the data consumer can first determine the chronological relationship between the timestamp corresponding to the historical inventory data and the reference time. Among them, the reference time is earlier than the target time, and there is a first preset duration between the reference time and the target time, and the same first preset duration is the average duration required for the data generator to perform a statistical and synchronization of the inventory data.

[0117] In one case, if the timestamp corresponding to the historical inventory data is later than the reference time, it indicates that the timestamps of the historical inventory data and the current inventory data are relatively close, and the interval between the two timestamps is less than the first preset duration. Then, the data consumer can determine the period formed by the timestamps corresponding to the historical inventory data and the current inventory data respectively as the historical period.

[0118] In another case, if the timestamp corresponding to the historical inventory data is earlier than the reference time, it indicates that the timestamps of the historical inventory data and the current inventory data are relatively far apart, and the interval between the two timestamps is greater than the first preset duration. Then, the data consumer determines the period formed by the timestamp corresponding to the current inventory data and the reference time as the historical period.

[0119] According to the above two cases, the reference time can be considered as a retrospective time point, which is used to finally ensure that the length of the obtained target period does not exceed the first preset duration, so as to ensure that the historical period will not be too long.

[0120] S304, determine the inventory change amount within the historical period according to the number of resources included in the scheduling requests generated within the historical period.

[0121] S305, if the difference between the historical inventory data and the current inventory data is less than the inventory change amount within the historical period, then verify the historical inventory data according to the inventory change amount within the target period.

[0122] S306, if the difference between the historical inventory data and the current inventory data is greater than or equal to the inventory change amount within the historical period, then verify the current inventory data according to the inventory change amount within the target period.

[0123] For the specific implementation process of the above steps S304 to S306, reference can be made to Figure 7a the specific descriptions of the relevant steps in the illustrated embodiments, which will not be elaborated here.

[0124] In this embodiment, through the setting of the reference time, a historical period with an appropriate length can be obtained, and finally the phenomenon of "underselling" of virtual resources can be improved.

[0125] In addition, for the methods and systems provided in the above embodiments, the process of the data consumer verifying the inventory data and the process of the platform providing virtual resource trading services responding to the creation request can also be combined with the following content and Figure 9 understood.

[0126] Assume that the virtual resource traded on the platform is an ECS server. Then, following Figure 3 the example in the illustrated embodiment, a user can generate a creation request for an ECS server at time T. The creation request may include a resource quantity of 10, and may also include the target resource specification of the required ECS server: 2 cores and 4G, running in region A. For this creation request, the data consumer can read from the cache the current inventory data of ECS servers with the above specifications as 100, and the historical inventory data as 200.

[0127] Furthermore, the data consumer can calculate the difference between the historical inventory data and the current inventory data as 100. At the same time, the data consumer can also calculate the inventory change amount during the historical period as 100 based on the call requests generated during the historical period; calculate the inventory change amount during the target period as 10 based on the creation request C6 and the release request R6 generated during the target period. Among them, the determination of the historical period can also be determined according to the sequence relationship between the time stamp corresponding to the historical inventory data and the reference moment. The specific process can be referred to the following description. The target period can be composed of the statistical time stamp of the current inventory data and time T.

[0128] Since the inventory change amount during this historical period is the same as the difference between the two inventory data, indicating that the current inventory data is accurate but lagging, the data consumer can use the inventory change amount of 10 during the target period to calibrate the current inventory data of 100. After verification, the inventory data is 110.

[0129] At this time, the verified inventory data of 110 is greater than the resource quantity of 10 included in the creation request generated at time T. Then, the platform providing virtual resource trading services can allocate 10 ECS servers with the above target resource specifications to the user.

[0130] For the determination of the historical period, as Figure 9 illustrated, if the time stamp corresponding to the historical inventory data is earlier than the reference moment, indicating that the statistical time of the historical inventory is earlier, then the historical period is composed of the reference moment and the time stamp corresponding to the current inventory data. The inventory change amount during the historical period can be determined according to the creation request C5 and the release request R5 generated during the historical period. If the time stamp corresponding to the historical inventory data is later than the reference moment, then the historical period is composed of the time stamps corresponding to the historical inventory data and the current inventory data respectively. The inventory change amount during the historical period can be determined according to the release request R5 generated during the historical period.

[0131] Among them, as described in the above method and system embodiments, the timestamp corresponding to the inventory data can be any one of the start time of inventory data statistics, the end time, the start time of inventory data synchronization, or the end time.

[0132] In addition, for the content not described in detail in this embodiment and the technical effects achieved, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.

[0133] The inventory data processing device of one or more embodiments of the present invention will be described in detail below. Those skilled in the art can understand that these inventory data processing devices can all be configured by using commercially available hardware components through the steps taught by this solution.

[0134] Figure 10 For a schematic structural diagram of an inventory data processing device provided in an embodiment of the present invention, as Figure 10 shown, the device may include:

[0135] An acquisition module 11, configured to acquire current inventory data statistically obtained before the target moment in response to a creation request for a virtual resource generated at the target moment.

[0136] A change amount determination module 12, configured to determine an inventory change amount of the virtual resource within a target time period, where the target time period is composed of the target moment and the timestamp corresponding to the current inventory data.

[0137] A verification module 13, configured to verify the current inventory data according to the inventory change amount within the target time period to obtain verified inventory data of the virtual resource at the target moment.

[0138] Optionally, the acquisition module 11 is configured to acquire the inventory data statistically obtained before the target moment and the timestamp corresponding to the inventory data, where the inventory data and the timestamp are stored in the form of a structure. Determine the current inventory data in the structure.

[0139] Optionally, the structure includes key-value pairs, and there is an associated relationship between the key-value pairs and the resource specifications.

[0140] The acquisition module 11 is configured to determine a first target key-value pair having an associated relationship with the target resource specification according to the target resource specification included in the creation request, where the primary key in the first target key-value pair includes the timestamp closest to the target moment;

[0141] Determine the key value in the first target key-value pair as the current inventory data.

[0142] Optionally, the generation timestamp of the scheduling request and the number of resources included in the scheduling request are stored in the form of a structure.

[0143] The change amount determination module 12 is configured to obtain scheduling requests for virtual resources generated within the target period according to the generation timestamps of different scheduling requests in the structure, where the scheduling requests include creation requests and / or release requests for virtual resources; determine the number of resources included in the scheduling requests generated within the target period from the structure; and determine the inventory change amount within the target period according to the number of resources included in the scheduling requests.

[0144] Optionally, the structure includes key-value pairs.

[0145] The change amount determination module 12 is configured to determine a second target key-value pair, where the primary key in the second target key-value pair includes the generation timestamp of the scheduling request, the generation timestamp is within the target period, and the key value in the second target key-value pair includes the number of resources in the scheduling request; the determining the inventory change amount within the target period according to the number of resources includes: determining the inventory change amount within the target period according to the key value in the second target key-value pair.

[0146] Optionally, the obtaining module 11 is configured to obtain historical inventory data counted before the current inventory data, and there is a preset time interval between the timestamps corresponding to the current inventory data and the historical inventory data.

[0147] The change amount determination module 12 is configured to determine the inventory change amount within the historical period according to the number of resources included in the scheduling requests generated within the historical period, where the historical period is the period formed by the timestamps corresponding to the historical inventory data and the current inventory data, and the scheduling requests include creation requests and / or release requests for virtual resources.

[0148] The verification module 13 is configured to, if the difference between the historical inventory data and the current inventory data is greater than or equal to the inventory change amount within the historical period, verify the current inventory data according to the inventory change amount within the target period.

[0149] Optionally, the apparatus further includes: a period determination module 14 configured to, if the timestamp corresponding to the historical inventory data is later than the reference time, determine the period formed by the timestamps corresponding to the historical inventory data and the current inventory data as the historical period, where the reference time is earlier than the target time by a preset time interval;

[0150] If the timestamp corresponding to the historical inventory data is earlier than the reference time, the period formed by the statistical timestamp of the current inventory data and the reference time is determined as the historical period.

[0151] Optionally, the verification module 13 is configured to, in response to a creation request for a virtual resource generated at a target time, if the database storing the inventory data is empty, determine the inventory change amount of the virtual resource within a target period, where the target period is formed by the target time and a reference time, and the reference time is a preset duration before the target time; and determine the inventory change amount within the target period as the verified inventory data of the virtual resource at the target time.

[0152] Optionally, the apparatus further includes: a validity determination module 15, configured to determine that the creation request is valid to create a virtual resource if the verified inventory data is greater than the resource quantity included in the creation request.

[0153] Figure 10 The illustrated apparatus can execute Figures 6 - 8 the method of the illustrated embodiment. For parts not described in detail in this embodiment, reference can be made to the relevant descriptions of Figures 6 - 8 the illustrated embodiment. For the execution process and technical effects of this technical solution, refer to the descriptions in Figures 6 - 8 the illustrated embodiment and will not be elaborated herein.

[0154] In a possible design, the inventory data processing method provided in the above embodiments can be applied to an electronic device, such as Figure 11 illustrated. The electronic device may include: a processor 31 and a memory 32. Among them, the memory 32 is used to store a program that supports the electronic device to execute the inventory data processing method provided in the above Figures 6 - 8 illustrated embodiment, and the processor 31 is configured to execute the program stored in the memory 32.

[0155] The program includes one or more computer instructions. When the one or more computer instructions are executed by the first processor 31, the following steps can be implemented:

[0156] In response to a creation request for a virtual resource generated at a target time, obtain the current inventory data statistically obtained before the target time;

[0157] Determine the inventory change amount of the virtual resource within a target period, where the target period is formed by the target time and the timestamp corresponding to the current inventory data;

[0158] Verify the current inventory data according to the inventory change amount within the target period to obtain the verified inventory data of the virtual resource at the target time.

[0159] Optionally, the processor 31 is further configured to execute all or part of the steps in the foregoing Figures 6 - 8 illustrated embodiments.

[0160] Wherein, the structure of the electronic device may further include a communication interface 33 for communicating the electronic device with other devices or communication systems.

[0161] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the foregoing electronic device, which includes a program for executing the Figures 6 - 8 inventory data processing method shown above.

[0162] In addition, an embodiment of the present invention provides a computer program product. The computer program product includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is caused to implement the Figures 6 - 8 steps or functions of the inventory data processing method shown above.

[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for processing inventory data, characterized in that, Including: In response to a creation request for a virtual resource generated at a target moment, obtain the current inventory data statistically obtained before the target moment; Determine the inventory change amount of the virtual resource within a target time period, where the target time period is composed of the target moment and the timestamp corresponding to the current inventory data; Verify the current inventory data according to the inventory change amount within the target time period to obtain the verified inventory data of the virtual resource at the target moment.

2. The method according to claim 1, characterized in that, The obtaining of the current inventory data statistically obtained before the target moment includes: Obtain the inventory data statistically obtained before the target moment and the timestamp corresponding to the inventory data, where the inventory data and the timestamp are stored in the form of a structure; Determine the current inventory data in the structure.

3. The method according to claim 2, wherein The structure includes key-value pairs, and the key-value pairs have an associated relationship with the resource specification; The determining of the current inventory data in the structure includes: According to the target resource specification included in the creation request, determine a first target key-value pair having an associated relationship with the target resource specification, where the primary key in the first target key-value pair includes the timestamp closest to the target moment; Determine the key value in the first target key-value pair as the current inventory data.

4. The method according to claim 1, wherein The generation timestamp of the scheduling request and the resource quantity included in the scheduling request are stored in the form of a structure; The determining of the inventory change amount of the virtual resource within the target time period includes: According to the generation timestamps of different scheduling requests in the structure, obtain the scheduling requests generated within the target time period, where the scheduling requests include creation requests for virtual resources and / or release requests for virtual resources; Determine the resource quantity included in the scheduling requests generated within the target time period from the structure; Determine the inventory change amount within the target time period according to the resource quantity included in the scheduling request.

5. The method according to claim 4, wherein The structure includes key-value pairs; The obtaining of the resource scheduling requests for virtual resources generated within the target time period according to the generation timestamps of different scheduling requests in the structure includes: Determine a second target key-value pair, where the primary key in the second target key-value pair includes the generation timestamp of the scheduling request, the generation timestamp is within the target time period, and the key value in the second target key-value pair includes the resource quantity in the scheduling request; The determining of the inventory change amount within the target time period according to the resource quantity includes: Determine the inventory change amount within the target time period according to the key value in the second target key-value pair.

6. The method according to claim 1, characterized in that, The method further includes: Obtain historical inventory data statistically obtained before the current inventory data, where there is a preset time interval between the timestamps corresponding to the current inventory data and the historical inventory data; Determine the inventory change amount within the historical time period according to the resource quantity included in the scheduling requests generated within the historical time period, where the historical time period is the time period composed of the timestamps corresponding to the historical inventory data and the current inventory data, and the scheduling requests include creation requests for virtual resources and / or release requests for virtual resources; The verifying of the current inventory data according to the inventory change amount within the target time period includes: If the difference between the historical inventory data and the current inventory data is greater than or equal to the inventory change amount within the historical period, then verify the current inventory data according to the inventory change amount within the target period.

7. The method according to claim 6, characterized in that The method further includes: If the timestamp corresponding to the historical inventory data is later than the reference time, then determine the period composed of the timestamps corresponding to the historical inventory data and the current inventory data as the historical period, where the reference time is earlier than the target time by a preset duration; If the timestamp corresponding to the historical inventory data is earlier than the reference time, then determine the period composed of the statistical timestamp of the current inventory data and the reference time as the historical period.

8. The method according to claim 1, wherein The method further includes: In response to a creation request for a virtual resource generated at the target time, if the database storing the inventory data is empty, then determine the inventory change amount of the virtual resource within the target period, where the target period is composed of the target time and the reference time, and the reference time is earlier than the target time by a preset duration; Determine the inventory change amount within the target period as the verified inventory data of the virtual resource at the target time.

9. The method according to claim 1, characterized in that, The method further includes: If the verified inventory data is greater than the resource quantity included in the creation request, then determine that the creation request is valid to create a virtual resource.

10. An inventory data processing system, characterized in that, Includes: A data generation party and a data consumption party; The data generation party is used to count the inventory data of virtual resources within different statistical periods; Synchronize the counted inventory to the data consumption party; The data consumption party is used to receive a creation request for a virtual resource generated at the target time; Obtain the current inventory data counted before the target time; Determine the inventory change amount of the virtual resource within the target period, where the target period is composed of the target time and the timestamp corresponding to the current inventory data; Verify the current inventory data according to the inventory change amount within the target period to obtain the verified inventory data of the virtual resource at the target time.

11. The system according to claim 10, wherein The timestamp includes any one of the statistical start time of the inventory data, the statistical end time, the synchronization start time of the inventory data, or the synchronization end time.

12. An electronic device, characterized in that, Includes: A memory and a processor; wherein, an executable code is stored on the memory, and when the executable code is executed by the processor, the processor executes the inventory data processing method according to any one of claims 1 to 9.

13. A non-transitory machine-readable storage medium, characterized in that, An executable code is stored on the non-transitory machine-readable storage medium, and when the executable code is executed by the processor of the electronic device, the processor executes the inventory data processing method according to any one of claims 1 to 9.

14. A computer program product, characterized in that, Includes a computer program or instruction, and when the computer program or instruction is executed by the processor, the processor is caused to be able to implement the steps in the inventory data processing method according to any one of claims 1 to 9.