Resource data processing methods, devices, servers and storage media
By updating and processing the transfer status of virtual resources, the problem of low data processing accuracy caused by changes in the value of virtual resources is solved, and higher resource data processing accuracy is achieved.
Patent Information
- Application Number
- CN202111403593.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-11-22
AI Technical Summary
When the existing technology counts the value of virtual resources, if the value of the virtual resource changes, the accuracy of the resource data processing results will be low.
By obtaining the resource identification associated with the resource transfer data and the resource transfer status in the corresponding resource record data in the database, the resource record data in the untransferred state is updated to the transferred state, and the resource record data in the transferred state is processed to obtain Resource data processing results.
It improves the accuracy of resource data processing results and avoids the shortcomings of low accuracy under fixed statistical methods caused by changes in resource data.
Smart Images

Figure CN114119222B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and in particular to a resource data processing method, device, electronic device and storage medium. Background Art
[0002] With the development of Internet technology, there are more and more types of virtual resources on the Internet, and it is becoming more and more common to obtain corresponding services by consuming virtual resources.
[0003] In the related art, when the total value of virtual resources is counted, it is counted based on the fixed value of the virtual resources and the number of virtual resources consumed; however, if the value of the virtual resources changes, it is still processed according to the above statistical method, which will result in a low accuracy rate of the resource data processing results. Summary of the invention
[0004] The present disclosure provides a resource data processing method, device, electronic device and storage medium to at least solve the problem of low accuracy of resource data processing results in related technologies. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a resource data processing method is provided, comprising:
[0006] Acquire a resource identifier associated with the resource transfer data, and a resource transfer status in resource record data corresponding to the resource identifier in a database;
[0007] The resource record data whose resource transfer status is not transferred is updated to a transferred status; the database stores resource record data corresponding to a plurality of resource identifiers, each resource record data is used to record the resource transfer status and resource data of the resource corresponding to the corresponding resource identifier, and the resource data is used to represent the unit resource value;
[0008] Acquire resource record data in the database whose resource transfer status is the transferred status as target resource record data;
[0009] The resource data in the target resource record data is processed to obtain a resource data processing result.
[0010] In an exemplary embodiment, before obtaining the resource identifier associated with the resource transfer data and the resource transfer status in the resource record data corresponding to the resource identifier in the database, the method further includes:
[0011] Determine the resource transfer state and resource data of each resource corresponding to the resource to be converted; the resource transfer state is an untransferred state;
[0012] Generate resource record data of each resource according to the resource transfer status and resource data of each resource;
[0013] According to the resource identifier of each resource, the resource record data of each resource is stored in the database.
[0014] In an exemplary embodiment, after obtaining the resource identifier associated with the resource transfer data, the method further includes:
[0015] Filtering out a target resource identifier from the resource identifiers associated with the resource transfer data; the target resource identifier is used to represent a resource identifier of a valid resource;
[0016] The resource transfer status in the resource record data corresponding to the resource identifier is obtained by:
[0017] The resource transfer status in the resource record data corresponding to the target resource identifier in the database is obtained.
[0018] In an exemplary embodiment, filtering out a target resource identifier from resource identifiers associated with the resource transfer data includes:
[0019] From the resource identifiers associated with the resource transfer data, a resource identifier whose corresponding resource is a valid resource is screened out as the target resource identifier.
[0020] In an exemplary embodiment, before processing the resource data in the target resource record data to obtain the resource data processing result, the method further includes:
[0021] Acquire a verification file corresponding to the target resource record data; the verification file is used to verify whether the resource transfer state in the target resource record data is the transferred state;
[0022] Verifying the target resource record data according to the verification file;
[0023] The processing of the resource data in the target resource record data to obtain a resource data processing result includes:
[0024] When the target resource record data passes the verification, the resource data in the target resource record data is added to obtain a resource data processing result.
[0025] In an exemplary embodiment, the verifying the target resource record data according to the verification file includes:
[0026] According to the verification file, determining whether the resource transfer state in the target resource record data is the transferred state;
[0027] When the resource transfer state in the target resource record data is the transferred state, it is confirmed that the target resource record data has passed the verification.
[0028] In an exemplary embodiment, obtaining a resource identifier associated with the resource transfer data includes:
[0029] Acquire the resources transferred by the resource transfer data;
[0030] A resource identifier corresponding to the resource is obtained as the resource identifier associated with the resource transfer data.
[0031] According to a second aspect of an embodiment of the present disclosure, there is provided a resource data processing device, including:
[0032] an identification acquisition unit, configured to acquire a resource identification associated with the resource transfer data, and a resource transfer state in resource record data corresponding to the resource identification in a database;
[0033] A state updating unit is configured to update the resource record data whose resource transfer state is a non-transferred state to a transferred state; the database stores resource record data corresponding to a plurality of resource identifiers, each resource record data is used to record the resource transfer state and resource data of the resource corresponding to the corresponding resource identifier, and the resource data is used to represent the unit resource value;
[0034] A data acquisition unit is configured to acquire resource record data in the database whose resource transfer status is the transferred status as target resource record data;
[0035] The data processing unit is configured to process the resource data in the target resource record data to obtain a resource data processing result.
[0036] In an exemplary embodiment, the device also includes a data storage unit, which is configured to determine the resource transfer status and resource data of each resource corresponding to the resource to be converted; the resource transfer status is an untransferred state; generate resource record data of each resource according to the resource transfer status and resource data of each resource; and store the resource record data of each resource in the database according to the resource identifier of each resource.
[0037] In an exemplary embodiment, the device further comprises an identification screening unit configured to screen out a target resource identification from the resource identification associated with the resource transfer data; the target resource identification is used to represent a resource identification of a valid resource;
[0038] The identifier acquisition unit is further configured to acquire the resource transfer status in the resource record data corresponding to the target resource identifier in the database.
[0039] In an exemplary embodiment, the identifier screening unit is further configured to screen out, from the resource identifiers associated with the resource transfer data, a resource identifier whose corresponding resource is a valid resource as the target resource identifier.
[0040] In an exemplary embodiment, the device further includes a data verification unit configured to execute obtaining a verification file corresponding to the target resource record data; the verification file is used to verify whether the resource transfer state in the target resource record data is the transferred state; and verify the target resource record data according to the verification file;
[0041] The data processing unit is further configured to add the resource data in the target resource record data to obtain a resource data processing result when the target resource record data passes verification.
[0042] In an exemplary embodiment, the data verification unit is further configured to execute, based on the verification file, a determination as to whether the resource transfer status in the target resource record data is the transferred status; when the resource transfer status in the target resource record data is the transferred status, it is confirmed that the target resource record data verification has passed.
[0043] In an exemplary embodiment, the identifier acquisition unit is further configured to execute acquisition of the resource transferred by the resource transfer data; and acquire a resource identifier corresponding to the resource as the resource identifier associated with the resource transfer data.
[0044] According to a third aspect of an embodiment of the present disclosure, a server is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the resource data processing method as described in any one of the embodiments of the first aspect.
[0045] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to execute the resource data processing method described in any one of the embodiments of the first aspect.
[0046] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, wherein the computer program product comprises instructions, and when the instructions are executed by a processor of a server, the server is enabled to execute the resource data processing method described in any one of the embodiments of the first aspect.
[0047] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0048] By obtaining the resource identifier associated with the resource transfer data and the resource transfer status in the resource record data corresponding to the resource identifier in the database; then updating the resource record data in the database whose resource transfer status is not transferred to a transferred status; the database stores resource record data corresponding to multiple resource identifiers, each resource record data is used to record the resource transfer status and resource data of the resource corresponding to the corresponding resource identifier, and the resource data is used to represent the unit resource value; finally, obtaining the resource record data in the database whose resource transfer status is a transferred status as the target resource record data, and processing the resource data in the target resource record data to obtain the resource data processing result. In this way, the purpose of processing the resource data in each resource record data whose resource transfer status is a transferred status is achieved, avoiding the defect of low accuracy of the resource data processing result caused by statistics according to fixed resource data and the number of transferred resources when the resource data of the resource changes, thereby improving the accuracy of the resource data processing result.
[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0051] Figure 1 The figure is a flowchart of a resource data processing method according to an exemplary embodiment.
[0052] Figure 2 The invention is a flowchart showing steps of storing resource record data into a database according to an exemplary embodiment.
[0053] Figure 3 The figure is a flowchart of another resource data processing method according to an exemplary embodiment.
[0054] Figure 4 The diagram is a block diagram of a resource data processing device according to an exemplary embodiment.
[0055] Figure 5 It is a block diagram of a server according to an exemplary embodiment. DETAILED DESCRIPTION
[0056] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0058] It should also 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 display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0059] Figure 1 is a flow chart of a resource data processing method according to an exemplary embodiment. Figure 1 As shown, the resource data processing method is used in a server and includes the following steps:
[0060] In step S110, a resource identifier associated with the resource transfer data and a resource transfer status in resource record data corresponding to the resource identifier in a database are obtained.
[0061] Among them, resource transfer data refers to data related to resource transfer, such as data generated by purchasing a paid service (such as membership service, virtual gift, etc.) using N virtual resources. Resource identification refers to the unique identification information of a resource, such as resource name, resource number, etc. It should be noted that the resources involved in this disclosure refer to virtual resources, such as virtual currency.
[0062] The resource identifier associated with the resource transfer data refers to the resource identifier of the resource transferred in the resource transfer data.
[0063] Specifically, the server obtains resource transfer data within a preset time period (such as the past week), parses the resource transfer data through a resource identifier acquisition instruction, and obtains the resource identifier of the transferred resource as the resource identifier associated with the resource transfer data; then obtains the resource transfer status in the resource record data corresponding to the resource identifier from the database.
[0064] For example, assuming that the resource transfer data is data generated by purchasing a paid service using N virtual currencies, the resource identifier associated with the resource transfer data is the resource identifier corresponding to each of the N virtual currencies, and the resource transfer status in the resource record data corresponding to the resource identifier is obtained from the database.
[0065] In step S120, the resource record data whose resource transfer status is not transferred is updated to transferred status; the database stores resource record data corresponding to multiple resource identifiers, each resource record data is used to record the resource transfer status and resource data of the resource corresponding to the corresponding resource identifier; the resource data is used to represent the unit resource value.
[0066] Among them, multiple resource record data are stored in the database, each resource identifier corresponds to a resource record data, which means that each resource corresponds to a resource record data; resource record data refers to data that records the resource transfer status and resource data of each resource. For example, the format of a resource record data is: resource identifier (10000), resource data (0.1), resource status (not transferred).
[0067] Among them, the resource transfer status is used to indicate whether the resource has been transferred, for example, the untransferred status is used to indicate that the resource has not been transferred, and the transferred status is used to indicate that the resource has been transferred; the resource data refers to the unit resource value corresponding to the resource, such as 0.1 yuan, 0.2 yuan, etc.
[0068] Wherein, updating the resource record data whose resource transfer status is the untransferred status to the transferred status refers to updating the resource transfer status in the resource record data corresponding to the resource identifier in the database from the untransferred status to the transferred status.
[0069] Specifically, the server queries resource record data corresponding to multiple resource identifiers according to the resource identifier, obtains the resource record data corresponding to the resource identifier, and updates the resource transfer status in the resource record data corresponding to the resource identifier from the untransferred status to the transferred status.
[0070] For example, the format of a resource record data is: resource identifier (10000), resource data (0.1), resource status (not transferred). When the server updates the resource transfer status in the resource record data, the format of the resource record data is updated to: resource identifier (10000), resource data (0.1), resource status (transferred).
[0071] In step S130, resource record data whose resource transfer status is the transferred status in the database is obtained as the target resource record data.
[0072] The target resource record data refers to the resource record data in the database whose resource transfer status is the transferred status.
[0073] Specifically, the server identifies the resource transfer status in each resource record data in the database according to the resource status identification instruction to obtain an identification result; based on the identification result, the server selects the resource record data whose resource transfer status is the transferred status from the database and uses it as the target resource record data.
[0074] In step S140, the resource data in the target resource record data is processed to obtain a resource data processing result.
[0075] The resource data processing result refers to the result obtained after processing the resource data in each target resource record data, specifically refers to the platform revenue.
[0076] Specifically, the server adds the resource data in each target resource record data to obtain an addition result, and uses the addition result as the resource data processing result.
[0077] For example, if the target resource record data is A resource record data and B resource record data, the format of A resource record data is: resource identifier (10000), resource data (0.1), resource status (transferred); the format of B resource record data is: resource identifier (10000), resource data (0.1), resource status (transferred); then the platform revenue is 0.1+0.1=0.2 yuan.
[0078] In the above resource data processing method, the resource identifier associated with the resource transfer data and the resource transfer status in the resource record data corresponding to the resource identifier in the database are obtained; then the resource record data in the database whose resource transfer status is not transferred is updated to a transferred status; the database stores resource record data corresponding to multiple resource identifiers, each resource record data is used to record the resource transfer status and resource data of the resource corresponding to the corresponding resource identifier, and the resource data is used to represent the unit resource value; finally, the resource record data in the database whose resource transfer status is a transferred status is obtained as the target resource record data, and the resource data in the target resource record data is processed to obtain the resource data processing result. In this way, the purpose of processing the resource data in each resource record data whose resource transfer status is a transferred status is achieved, and the defect of low accuracy of the resource data processing result is avoided when the resource data of the resource changes, according to the fixed resource data and the number of transferred resources, thereby improving the accuracy of the resource data processing result.
[0079] In an exemplary embodiment, if Figure 2As shown, in step S110, before obtaining the resource identifier associated with the received resource transfer data and the resource transfer status in the resource record data corresponding to the resource identifier in the database, the step of storing the resource record data in the database is also included, which specifically includes the following steps:
[0080] In step S210, the resource transfer status and resource data of each resource corresponding to the resource to be converted are determined; the resource transfer status is a non-transferred status.
[0081] In step S220, resource record data of each resource is generated according to the resource transfer status and resource data of each resource.
[0082] In step S230, the resource record data of each resource is stored in the database according to the resource identifier of each resource.
[0083] Among them, the resources to be converted refer to the resources that need to be converted into virtual resources. For example, if 10 virtual currencies are purchased with 1 yuan, then the 1 yuan is the resource to be converted, and the virtual currency is the converted virtual resource.
[0084] Specifically, the server obtains resource conversion data of the resources to be converted, and parses the resource conversion data of the resources to be converted to obtain the resource transfer status and resource data of each resource corresponding to the resources to be converted; generates instructions through resource record data, and generates resource record data of each resource according to the resource transfer status and resource data of each resource; obtains the resource identifier of each resource, and stores the resource record data of each resource in the database according to the resource identifier of each resource, so as to store resource record data corresponding to multiple resource identifiers through the database.
[0085] For example, if a user spends 0.5 yuan to buy 5 virtual currencies, there will be 5 records in the database as follows: A resource record data [resource identifier (10000), resource data (0.1), resource status (not transferred)], B resource record data [resource identifier (10001), resource data (0.1), resource status (not transferred)], C resource record data [resource identifier (10002), resource data (0.1), resource status (not transferred)], D resource record data [resource identifier (10003), resource data (0.1), resource status (not transferred)], E resource record data [resource identifier (10004), resource data (0.1), resource status (not transferred)].
[0086] The technical solution provided by the embodiment of the present disclosure stores the resource record data of each resource in a database according to the resource identifier of each resource, which is conducive to the subsequent separate processing of the resource data in each resource record data whose resource transfer status is the transferred status, so that the final resource data processing result is more accurate.
[0087] In an exemplary embodiment, the above step S110, after obtaining the resource identifier associated with the resource transfer data, further includes: filtering out the target resource identifier from the resource identifier associated with the resource transfer data; the target resource identifier is used to represent the resource identifier of a valid resource; then, the above step S110 specifically includes: obtaining the resource transfer status in the resource record data corresponding to the target resource identifier in the database.
[0088] Among them, the target resource identifier refers to the resource identifier of the effective resource. The effective resource refers to the valuable virtual resource, such as valuable virtual currency, not the virtual currency given by the platform.
[0089] Specifically, the server identifies the resource corresponding to the resource identifier associated with the resource transfer data through a valid resource identification instruction to determine whether the resource corresponding to the resource identifier associated with the resource transfer data is a valid resource; when the resource corresponding to the resource identifier associated with the resource transfer data is a valid resource, the resource identifier is marked; the marked resource identifier is screened out from the resource identifiers associated with the resource transfer data, and is used as the target resource identifier; resource record data corresponding to multiple resource identifiers is queried according to the target resource identifier to obtain the resource record data corresponding to the target resource identifier and the resource transfer status in the resource record data corresponding to the target resource identifier, and the resource transfer status in the resource record data corresponding to the target resource identifier is updated from a non-transferred state to a transferred state.
[0090] The technical solution provided by the embodiment of the present disclosure is beneficial to improving the updating accuracy of the resource transfer status of the resource record data in the database by screening out the target resource identifier from the resource identifiers associated with the resource transfer data, and updating the resource transfer status in the resource record data corresponding to the target resource identifier in the database from the untransferred state to the transferred state.
[0091] In an exemplary embodiment, the target resource identifier is selected from the resource identifiers associated with the resource transfer data, specifically including: selecting a resource identifier whose corresponding resource is a valid resource from the resource identifiers associated with the resource transfer data as the target resource identifier.
[0092] Specifically, the server identifies the resource corresponding to the resource identifier associated with the resource transfer data through a valid resource identification instruction to obtain an identification result; based on the identification result, the server selects the resource identifier of the corresponding resource as a valid resource from the resource identifiers associated with the resource transfer data, and uses it as the target resource identifier.
[0093] For example, assuming that the resource identifiers associated with the resource transfer data are 10001, 10002, and 10003, and the resources corresponding to 10001 and 10002 are valuable virtual currencies, and the resource corresponding to 10003 is the virtual currency given by the platform, then the target resource identifiers are 10001 and 10002.
[0094] The technical solution provided by the embodiment of the present disclosure, by screening out the target resource identifier from the resource identifiers associated with the resource transfer data, is conducive to improving the subsequent updating of the resource transfer status in the corresponding resource record data from the untransferred state to the transferred state based on the target resource identifier.
[0095] In an exemplary embodiment, the above-mentioned step S140, before processing the resource data in the target resource record data to obtain the resource data processing result, also includes: obtaining a verification file corresponding to the target resource record data; the verification file is used to verify whether the resource transfer status in the target resource record data is a transferred status; according to the verification file, the target resource record data is verified; then, the above-mentioned step S140, processing the resource data in the target resource record data to obtain the resource data processing result, specifically includes: when the target resource record data verification passes, adding the resource data in the target resource record data to obtain the resource data processing result.
[0096] The verification file is an algorithm file used to verify whether the resource transfer status in the target resource record data is a transferred status.
[0097] Specifically, the server obtains a verification file corresponding to the target resource record data, verifies the target resource record data according to the verification file, and obtains a verification result; according to the verification result, determines whether the resource transfer status in the target resource record data is a transferred state, and when the resource transfer status in the target resource record data is a transferred state, it is confirmed that the target resource record data verification has passed; when the target resource record data verification has passed, the resource data in all the target resource record data are added together to obtain the resource data processing result.
[0098] Furthermore, when there is resource record data whose resource transfer status is not transferred in the target resource record data, the resource record data whose resource transfer status is not transferred is deleted from the target resource record data through the server to obtain the remaining resource record data; the resource data in the remaining resource record data is added to obtain the resource data processing result.
[0099] The technical solution provided by the embodiment of the present disclosure adds the resource data in the target resource record data to obtain the resource data processing result when the target resource record data is verified, which is conducive to further improving the accuracy of the resource data processing result.
[0100] In an exemplary embodiment, the target resource record data is verified according to the verification file, specifically including: judging whether the resource transfer status in the target resource record data is a transferred status according to the verification file; when the resource transfer status in the target resource record data is a transferred status, confirming that the target resource record data verification has passed.
[0101] For example, assuming that the target resource record data includes: A resource record data [resource identifier (10000), resource data (0.1), resource status (transferred)], B resource record data [resource identifier (10001), resource data (0.1), resource status (transferred)], C resource record data [resource identifier (10002), resource data (0.1), resource status (transferred)], and the resource transfer status in A resource record data, B resource record data and C resource record data are all transferred status, then it is confirmed that these target resource record data have all passed the verification.
[0102] The technical solution provided by the embodiment of the present disclosure determines whether the resource transfer status in the target resource record data is a transferred status according to the verification file corresponding to the target resource record data, which is beneficial for subsequently adding the resource data in the target resource record data to obtain the resource data processing result when the resource transfer status in the target resource record data is a transferred status, thereby further improving the accuracy of the resource data processing result.
[0103] In an exemplary embodiment, the above step S110, obtaining the resource identifier associated with the resource transfer data, specifically includes: obtaining the resource transferred by the resource transfer data; obtaining the resource identifier corresponding to the resource as the resource identifier associated with the resource transfer data.
[0104] Specifically, the server parses the resource transfer data to obtain the resource transferred by the resource transfer data; obtains the resource identifier corresponding to the transferred resource by querying the corresponding relationship between the resource and the resource identifier, and uses it as the resource identifier associated with the resource transfer data.
[0105] The technical solution provided by the embodiment of the present disclosure, by obtaining the resource identifier corresponding to the resource transferred by the resource transfer data and using it as the resource identifier associated with the resource transfer data, is conducive to subsequently accurately updating the resource transfer status in the resource record data corresponding to the resource identifier in the database from the untransferred state to the transferred state.
[0106] Figure 3 is a flow chart showing another resource data processing method according to an exemplary embodiment. Figure 3 As shown, the resource data processing method is used in a server and includes the following steps:
[0107] In step S310, the resource transfer status and resource data of each resource corresponding to the resource to be converted are determined; the resource transfer status is the untransferred status; and resource record data of each resource is generated according to the resource transfer status and resource data of each resource.
[0108] In step S320, the resource record data of each resource is stored in a database according to the resource identifier of each resource.
[0109] In step S330, the resource transferred by the resource transfer data is obtained; and the resource identifier corresponding to the resource is obtained as the resource identifier associated with the resource transfer data.
[0110] In step S340, a resource identifier of a valid resource corresponding to the resource is selected from the resource identifiers associated with the resource transfer data as a target resource identifier; the target resource identifier is used to represent the resource identifier of the valid resource.
[0111] In step S350, the resource transfer state in the resource record data corresponding to the target resource identifier in the database is updated from a non-transferred state to a transferred state.
[0112] In step S360, resource record data whose resource transfer status is the transferred status in the database is obtained as the target resource record data.
[0113] In step S370, a verification file corresponding to the target resource record data is obtained; the verification file is used to verify whether the resource transfer status in the target resource record data is a transferred status; based on the verification file, it is determined whether the resource transfer status in the target resource record data is a transferred status.
[0114] In step S380, when the resource transfer status in the target resource record data is the transferred status, it is confirmed that the target resource record data has passed the verification.
[0115] In step S390, when the target resource record data passes the verification, the resource data in the target resource record data is added to obtain a resource data processing result.
[0116] In the above-mentioned resource data processing method, the purpose of processing the resource data in each resource record data whose resource transfer status is the transferred status is achieved, avoiding the defect of low accuracy of resource data processing results due to statistics based on fixed resource data and the number of transferred resources when the resource data of the resource changes, thereby improving the accuracy of the resource data processing results.
[0117] In order to more clearly illustrate the resource data processing method provided by the embodiment of the present disclosure, the resource data processing method is specifically described below with a specific embodiment. In one embodiment, the present disclosure also provides a resource data processing method, which can accurately calculate the value of each virtual currency by storing the purchase record of each virtual currency separately, specifically including the following contents:
[0118] Instead of only recording the number of virtual gifts, each currency is now a database record. Each record records the actual price of each currency purchased. When a user consumes a gift, the gift record status is set to consumed. The company's actual profit is the cumulative sum of the gifts with a status of consumed. Since the purchase record of each currency is stored, the impact of currency value changes on the company's profit calculation can be accommodated. The specific process is: 1. Store the actual price of each currency, unit price = purchase price / currency quantity; 2. After the currency is consumed, set the status of the consumed currency to consumed; 3. Calculate the profit, profit = the cumulative price of the currency with a status of consumed.
[0119] For example, if a user spends 1 yuan to buy 10 virtual currencies, there will be 10 records in the database, as shown in Table 1; the user consumes 2 of them to buy paid services, and sets 2 of the virtual currencies as consumed, as shown in Table 2; the IDs 10000 and 10001 with a consumed status are filtered out, and the cumulative unit price is 0.2 yuan, so the company's profit is 0.2 yuan.
[0120] Table 1
[0121]
[0122]
[0123] Table 2
[0124] Unique ID Unit price (unit: yuan) state Purchase time 10000 0.1 Consumed yyyy-MM-dd HH:mm:ss 10001 0.1 Consumed yyyy-MM-dd HH:mm:ss
[0125] The resource data processing method described above can accurately calculate the platform revenue through the consumption of virtual currency by storing the purchase record of each virtual currency. Even if the price of virtual currency changes, it will not affect the calculation of revenue.
[0126] It should be understood that although Figure 1-Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-Figure 3 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0127] It can be understood that the same / similar parts between the various embodiments of the above method in this specification can refer to each other, and each embodiment focuses on the differences from other embodiments. For related points, please refer to the description of other method embodiments.
[0128] Figure 4 is a block diagram of a resource data processing device according to an exemplary embodiment. Figure 4 The device includes an identification acquisition unit 410, a state update unit 420, a data acquisition unit 430 and a data processing unit 440.
[0129] The identification acquisition unit 410 is configured to acquire the resource identification associated with the resource transfer data and the resource transfer status in the resource record data corresponding to the resource identification in the database.
[0130] The status update unit 420 is configured to execute the update of resource record data whose resource transfer status is not transferred to a transferred state; the database stores resource record data corresponding to multiple resource identifiers, each resource record data is used to record the resource transfer status and resource data of the resource corresponding to the corresponding resource identifier, and the resource data is used to represent the unit resource value.
[0131] The data acquisition unit 430 is configured to acquire resource record data in the database whose resource transfer status is the transferred status as the target resource record data.
[0132] The data processing unit 440 is configured to process the resource data in the target resource record data to obtain a resource data processing result.
[0133] In an exemplary embodiment, the resource data processing device also includes a data storage unit, which is configured to determine the resource transfer status and resource data of each resource corresponding to the resource to be converted; the resource transfer status is an untransferred state; generate resource record data for each resource according to the resource transfer status and resource data of each resource; and store the resource record data of each resource in a database according to the resource identifier of each resource.
[0134] In an exemplary embodiment, the resource data processing device further includes an identification screening unit configured to screen out a target resource identification from resource identifications associated with the resource transfer data; the target resource identification is used to represent a resource identification of a valid resource;
[0135] The identification acquisition unit 410 is further configured to acquire the resource transfer status in the resource record data corresponding to the target resource identification in the database.
[0136] In an exemplary embodiment, the identifier screening unit is further configured to screen out, from the resource identifiers associated with the resource transfer data, resource identifiers whose corresponding resources are valid resources as target resource identifiers.
[0137] In an exemplary embodiment, the resource data processing device further includes a data verification unit configured to execute and obtain a verification file corresponding to the target resource record data; the verification file is used to verify whether the resource transfer status in the target resource record data is a transferred status; and verify each target resource record data according to the verification file;
[0138] The data processing unit 440 is further configured to add the resource data in the target resource record data to obtain a resource data processing result when the target resource record data passes the verification.
[0139] In an exemplary embodiment, the data verification unit is further configured to execute, based on the verification file, determining whether the resource transfer status in the target resource record data is a transferred state; when the resource transfer status in the target resource record data is a transferred state, confirming that the target resource record data verification has passed.
[0140] In an exemplary embodiment, the identifier acquisition unit 410 is further configured to execute acquisition of the resource transferred by the resource transfer data; and to acquire a resource identifier corresponding to the resource as the resource identifier associated with the resource transfer data.
[0141] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0142] Figure 5is a block diagram of a device 500 for executing a resource data processing method according to an exemplary embodiment. For example, the device 500 may be a server. Figure 5 , the device 500 includes a processing component 520, which further includes one or more processors, and a memory resource represented by a memory 522 for storing instructions executable by the processing component 520, such as an application. The application stored in the memory 522 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 520 is configured to execute the instructions to perform the above method.
[0143] The device 500 may also include a power supply component 524 configured to perform power management of the device 500, a wired or wireless network interface 526 configured to connect the device 500 to a network, and an input / output (I / O) interface 528. The device 500 may operate based on an operating system stored in the memory 522, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, or the like.
[0144] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 522 including instructions, which can be executed by a processor of the device 500 to perform the above method. The storage medium can be a computer-readable storage medium, for example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0145] In an exemplary embodiment, a computer program product is also provided. The computer program product includes instructions, and the instructions can be executed by a processor of the device 500 to implement the above method.
[0146] It should be noted that the above-mentioned devices, equipment, computer-readable storage media, computer program products, etc. may also include other implementation methods according to the description of the method embodiments. The specific implementation methods can refer to the description of the relevant method embodiments and will not be described one by one here.
[0147] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0148] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A resource data processing method, It is characterized in that include: Acquire a resource identifier associated with the resource transfer data, and a resource transfer status in resource record data corresponding to the resource identifier in a database; The resource record data whose resource transfer status is not transferred is updated to a transferred status; the database stores resource record data corresponding to a plurality of resource identifiers, each resource record data is used to record the resource transfer status and resource data of the resource corresponding to the corresponding resource identifier, and the resource data is used to represent the unit resource value; Acquire resource record data in the database whose resource transfer status is the transferred status as target resource record data; The resource data in the target resource record data are added to obtain a resource data processing result.
2. The resource data processing method according to claim 1, It is characterized in that Before obtaining the resource identifier associated with the resource transfer data and the resource transfer status in the resource record data corresponding to the resource identifier in the database, the method further includes: Determine the resource transfer state and resource data of each resource corresponding to the resource to be converted; the resource transfer state is an untransferred state; Generate resource record data of each resource according to the resource transfer status and resource data of each resource; According to the resource identifier of each resource, the resource record data of each resource is stored in the database.
3. The resource data processing method according to claim 1, It is characterized in that After obtaining the resource identifier associated with the resource transfer data, it also includes: Filtering out a target resource identifier from the resource identifiers associated with the resource transfer data; the target resource identifier is used to represent a resource identifier of a valid resource; The resource transfer status in the resource record data corresponding to the resource identifier is obtained in the following manner: The resource transfer status in the resource record data corresponding to the target resource identifier in the database is obtained.
4. The resource data processing method according to claim 3, It is characterized in that The step of filtering out a target resource identifier from the resource identifiers associated with the resource transfer data includes: From the resource identifiers associated with the resource transfer data, a resource identifier whose corresponding resource is a valid resource is screened out as the target resource identifier.
5. The resource data processing method according to claim 1, It is characterized in that Before adding the resource data in the target resource record data to obtain the resource data processing result, the method further includes: Acquire a verification file corresponding to the target resource record data; the verification file is used to verify whether the resource transfer state in the target resource record data is the transferred state; Verifying the target resource record data according to the verification file; The adding of the resource data in the target resource record data to obtain a resource data processing result includes: When the target resource record data passes the verification, the resource data in the target resource record data is added to obtain a resource data processing result.
6. The resource data processing method according to claim 5, It is characterized in that The verifying the target resource record data according to the verification file includes: According to the verification file, determining whether the resource transfer state in the target resource record data is the transferred state; When the resource transfer state in the target resource record data is the transferred state, it is confirmed that the target resource record data has passed the verification.
7. The resource data processing method according to any one of claims 1 to 6, It is characterized in that The step of obtaining the resource identifier associated with the resource transfer data includes: Acquire the resources transferred by the resource transfer data; A resource identifier corresponding to the resource is obtained as the resource identifier associated with the resource transfer data.
8. A resource data processing device, It is characterized in that include: an identification acquisition unit, configured to acquire a resource identification associated with the resource transfer data, and a resource transfer state in resource record data corresponding to the resource identification in a database; A state updating unit, configured to update the resource record data whose resource transfer state is a non-transferred state to a transferred state; The database stores resource record data corresponding to a plurality of resource identifiers, each resource record data is used to record the resource transfer status and resource data of the resource corresponding to the corresponding resource identifier, and the resource data is used to represent the unit resource value; A data acquisition unit is configured to acquire resource record data in the database whose resource transfer status is the transferred status as target resource record data; The data processing unit is configured to add the resource data in the target resource record data to obtain a resource data processing result.
9. The resource data processing device according to claim 8, It is characterized in that The device also includes a data storage unit, which is configured to determine the resource transfer status and resource data of each resource corresponding to the resource to be converted; the resource transfer status is a non-transferred state; generate resource record data of each resource according to the resource transfer status and resource data of each resource; and store the resource record data of each resource in the database according to the resource identifier of each resource.
10. The resource data processing device according to claim 8, It is characterized in that The device further comprises an identification screening unit configured to screen out a target resource identification from the resource identification associated with the resource transfer data; the target resource identification is used to represent a resource identification of a valid resource; The identifier acquisition unit is further configured to execute acquisition of the resource transfer status in the resource record data corresponding to the target resource identifier in the database.
11. The resource data processing device according to claim 10, It is characterized in that The identifier screening unit is further configured to screen out a resource identifier of a corresponding resource that is a valid resource from the resource identifiers associated with the resource transfer data, and use the resource identifier as the target resource identifier.
12. The resource data processing device according to claim 8, It is characterized in that The device also includes a data verification unit configured to execute and obtain a verification file corresponding to the target resource record data; the verification file is used to verify whether the resource transfer state in the target resource record data is the transferred state; and verify the target resource record data according to the verification file respectively; The data processing unit is further configured to add the resource data in the target resource record data to obtain a resource data processing result when the target resource record data passes verification.
13. The resource data processing device according to claim 12, It is characterized in that The data verification unit is further configured to execute, based on the verification file, determining whether the resource transfer status in the target resource record data is the transferred status; when the resource transfer status in the target resource record data is the transferred status, confirming that the target resource record data verification has passed.
14. The resource data processing device according to any one of claims 8 to 13, It is characterized in that The identifier acquisition unit is further configured to execute acquisition of the resource transferred by the resource transfer data; and acquire a resource identifier corresponding to the resource as the resource identifier associated with the resource transfer data.
15. A server, It is characterized in that include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the resource data processing method according to any one of claims 1 to 7.
16. A computer-readable storage medium, It is characterized in that When the instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to execute the resource data processing method according to any one of claims 1 to 7.
17. A computer program product comprising instructions, It is characterized in that When the instruction is executed by the processor of the server, the server is enabled to execute the resource data processing method as described in any one of claims 1 to 7.
