CN-116582718-B - Data processing method, device, electronic equipment and storage medium
Abstract
The disclosure relates to a data processing method, a device, electronic equipment and a storage medium, wherein the method comprises the steps of responding to a virtual article issuing request aiming at a target user account, obtaining an article to be issued identifier, an expiration time to be issued and the quantity of articles to be issued of the virtual article to be issued to the target user account, obtaining at least one article record corresponding to the target user account, determining whether the at least one article record comprises a matched article record according to the expiration time to be issued and the article identifier to be issued, and updating the quantity of target articles in the matched article record according to the quantity of articles to be issued when the at least one article record comprises the matched article record. The method and the device can realize the record of the issued virtual article by matching the update of the quantity of the articles in the article record, thereby reducing the consumed storage space and shortening the inquiry time.
Inventors
- Jia Wenwu
- TAN PEIQIANG
Assignees
- 北京达佳互联信息技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20230511
Claims (11)
- 1. A method of data processing, comprising: Responding to a virtual article issuing request aiming at a target user account, and acquiring an article to be issued identifier, an expiration time to be issued and the quantity of articles to be issued of the virtual article to be issued to the target user account, wherein the expiration time to be issued is a fixed time point in a time period corresponding to the expected expiration time of the virtual article to be issued to the target user account; The method comprises the steps of obtaining at least one target item record corresponding to a target user account, wherein one target item record comprises a target item identifier, target expiration time and target item quantity, wherein the target item quantity is the quantity of virtual items with the item identifier being the target item identifier and the expiration time being the target expiration time in the virtual items of the target user account; determining whether the at least one item object record comprises a matched object record according to the to-be-issued expiration time and the to-be-issued object identifier, wherein the target object identifier in the matched object record is the same as the to-be-issued object identifier, and the target expiration time in the matched object record is the same as the to-be-issued expiration time; and under the condition that the at least one item target item record comprises the matching item record, updating the target item number in the matching item record according to the item number to be issued.
- 2. The method of claim 1, wherein the expiration time is a fixed point in time in a time period; obtaining the to-be-issued expiration time of the virtual article to be issued to the target user account, including: acquiring expected expiration time of a virtual article to be issued to the target user account; determining a time period to which the expected expiration time belongs; And determining the fixed time point in the time period as the waiting-to-be-issued expiration time.
- 3. The method of claim 1, wherein the target item record includes an identification of the target user account; In the case that the matching item record is not included in the at least one item target item record, the method further includes: Acquiring the identification of the target user account; Generating an initialized article record according to the identification of the target user account, the identification of the article to be issued and the expiration time to be issued, wherein the number of articles in the initialized article record is 0; performing locking reading on the initialized article record; And updating the number of the articles of the initialized article record according to the to-be-issued number to obtain a new article record, and unlocking the locking reading of the new article record.
- 4. The method of claim 1, wherein the target item record includes an identification of the target user account; the obtaining at least one target object record corresponding to the target user account includes: Acquiring the identification of the target user account; Determining a target data table for storing the target article records according to the identification of the target user account; And reading the at least one item object record from the target data table according to the identification of the target user account.
- 5. The method as recited in claim 1, further comprising: Responding to a virtual article display request of the target user account, and acquiring at least one target article record corresponding to the target user account; Determining the number of each virtual article according to the number of the target articles contained in at least one target article record with the same target article identifier, wherein the article identifiers of the virtual articles belonging to the same type are the same; Determining the expiration time to be displayed of each virtual article according to the target expiration time contained in at least one target article record with the same target article identifier; Generating a display instruction according to the article identifiers, the quantity and the to-be-displayed expiration time of each virtual article, and sending the display instruction to a client of the target user account, wherein the display instruction is used for instructing the client to perform aggregation display on each virtual article according to the article identifiers and the quantity, and displaying the quantity and the to-be-displayed expiration time of each virtual article.
- 6. The method of claim 5, wherein the virtual item display request for the target user account includes information for a display page, further comprising: acquiring information of the display page; the generating a display instruction according to the item identification, the quantity and the to-be-displayed expiration time of each virtual item comprises the following steps: According to the information of the display page, filtering the virtual articles which are not matched with the display page to obtain filtered virtual articles; And generating a filtered display instruction according to the article identification, the quantity and the to-be-displayed expiration time of each filtered virtual article.
- 7. The method of claim 5, wherein said determining the expiration time to be exhibited for each of said virtual items based on said target expiration time each contained in at least one of said target item records having the same target item identity comprises: determining the expiration time of each virtual article belonging to the same object according to the object expiration time contained in at least one object record with the same object identifier; And determining the expiration time to be displayed of each virtual article according to the expiration time of each virtual article belonging to the same type.
- 8. The method of any one of claims 1-7, further comprising: traversing each item record in response to the timed cleaning task being initiated; Determining an expired item record according to the expiration time and the number of items included in the item record; And deleting the expired article records in batches.
- 9. A data processing apparatus, comprising: The system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is configured to respond to a virtual article issuing request aiming at a target user account, and acquire an article identifier to be issued, an expiration time to be issued and the number of articles to be issued of the virtual article to be issued to the target user account, wherein the expiration time to be issued is a fixed time point in a time period corresponding to the expected expiration time of the virtual article to be issued to the target user account; The record acquisition module is configured to acquire at least one target article record corresponding to the target user account, wherein one target article record comprises a target article identifier, target expiration time and target article quantity, wherein the target article quantity is the quantity of virtual articles with the article identifier of the target article identifier and the expiration time of the target expiration time in the virtual articles of the target user account; The determining module is configured to determine whether the at least one item object record comprises a matching item record according to the to-be-issued expiration time and the to-be-issued item identifier, the target item identifier in the matching item record is identical to the to-be-issued item identifier, and the target expiration time in the matching item record is identical to the to-be-issued expiration time; and the updating module is configured to update the target article number in the matching article record according to the number of the articles to be issued when the matching article record is included in the at least one target article record.
- 10. An electronic device, comprising: A processor; a memory for storing the processor-executable instructions; Wherein the processor is configured to execute the instructions to implement the data processing method of any one of claims 1 to 8.
- 11. A computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the data processing method of any of claims 1 to 8.
Description
Data processing method, device, electronic equipment and storage medium Technical Field The disclosure relates to the field of computer technology, and in particular, to a data processing method, a data processing device, electronic equipment and a storage medium. Background After the user account reaches the order of the wound, a virtual article is issued to the user account. Each time a virtual article is issued, a record is generated, resulting in a huge magnitude of record being generated. And when the user account inquires the own virtual articles, the virtual articles of the user account need to be filtered from massive records, and the inquiring time is long. Disclosure of Invention To overcome the problems in the related art, the present disclosure provides a data processing method, apparatus, electronic device, and storage medium. The technical scheme of the present disclosure is as follows: According to a first aspect of an embodiment of the present disclosure, there is provided a data processing method, including: Responding to a virtual article issuing request aiming at a target user account, and acquiring an article identifier to be issued, an expiration time to be issued and the number of articles to be issued of the virtual article to be issued to the target user account; The method comprises the steps of obtaining at least one target item record corresponding to a target user account, wherein one target item record comprises a target item identifier, target expiration time and target item quantity, wherein the target item quantity is the quantity of virtual items with the item identifier being the target item identifier and the expiration time being the target expiration time in the virtual items of the target user account; determining whether the at least one item object record comprises a matched object record according to the to-be-issued expiration time and the to-be-issued object identifier, wherein the target object identifier in the matched object record is the same as the to-be-issued object identifier, and the target expiration time in the matched object record is the same as the to-be-issued expiration time; and under the condition that the at least one item target item record comprises the matching item record, updating the target item number in the matching item record according to the item number to be issued. Optionally, the expiration time is a fixed point in time in a time period; obtaining the to-be-issued expiration time of the virtual article to be issued to the target user account, including: acquiring expected expiration time of a virtual article to be issued to the target user account; determining a time period to which the expected expiration time belongs; And determining the fixed time point in the time period as the waiting-to-be-issued expiration time. Optionally, the target item record includes an identification of the target user account; In the case that the matching item record is not included in the at least one item target item record, the method further includes: Acquiring the identification of the target user account; Generating an initialized article record according to the identification of the target user account, the identification of the article to be issued and the expiration time to be issued, wherein the number of articles in the initialized article record is 0; performing locking reading on the initialized article record; And updating the number of the articles of the initialized article record according to the to-be-issued number to obtain a new article record, and unlocking the locking reading of the new article record. Optionally, the target item record includes an identification of the target user account; the obtaining at least one target object record corresponding to the target user account includes: Acquiring the identification of the target user account; Determining a target data table for storing the target article records according to the identification of the target user account; And reading the at least one item object record from the target data table according to the identification of the target user account. Optionally, the method further comprises: Responding to a virtual article display request of the target user account, and acquiring at least one target article record corresponding to the target user account; Determining the number of each virtual article according to the number of the target articles contained in at least one target article record with the same target article identifier, wherein the article identifiers of the virtual articles belonging to the same type are the same; Determining the expiration time to be displayed of each virtual article according to the target expiration time contained in at least one target article record with the same target article identifier; Generating a display instruction according to the article identifiers, the quantity and the to-be-displayed expiration time of each virtual article, an