Data updating method and device, electronic equipment and storage medium

By counting the number of object operations and updating the total number of tag operations within a preset time period, the problem of high storage service pressure in existing technologies is solved, achieving efficient data updates and resource savings.

CN115357589BActive Publication Date: 2026-05-12BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
Filing Date
2022-08-03
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, the total number of operations performed on objects under a tag consumes a large amount of computing resources, leading to excessive pressure on storage services.

Method used

By counting the number of operations on objects within a preset time period and updating the total number of operations on tags based on the incremental number of operations, the frequency of reading from the storage service is reduced. Data updates are optimized by using interval statistics commands and object change logs.

Benefits of technology

It effectively saves computing resources, reduces read pressure on storage services, improves data update efficiency, and ensures accurate statistics on the number of objects and operations under a tag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115357589B_ABST
    Figure CN115357589B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data updating method and device, electronic equipment and storage medium, and is applied to a first server. The method comprises: based on a statistical instruction, counting a first operation number generated by any object within a last statistical time to a current statistical time; determining a first label corresponding to the any object; and updating a total operation number corresponding to the first label based on the first operation number. The present disclosure can obtain an operation number increment corresponding to any object based on a statistical instruction, so as to update the total operation number corresponding to the label to which the object belongs according to the operation number increment, thereby improving the updating efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing, and more particularly to a data updating method, apparatus, electronic device, and storage medium. Background Technology

[0002] In related technologies, clients that publish articles, videos, or products will have data statistics needs. For trending tags, such as current news, they will count the total number of views, likes, or favorites of all objects under that trending tag.

[0003] Currently, the general implementation of total operation counts for objects under a tag is as follows: the server on the client side periodically counts the total number of operations for all objects under each tag and overwrites the original data statistics for each tag individually. However, since it requires frequent reading of stored data from the storage service, this may put storage pressure on the relevant read storage service. Summary of the Invention

[0004] This disclosure provides a data updating method, apparatus, electronic device, and storage medium to at least solve the problem in related technologies where statistical counting consumes a large amount of computing resources, potentially putting storage pressure on related storage services. The technical solution of this disclosure is as follows:

[0005] According to a first aspect of the present disclosure, a data update method is provided, applied to a first server, the method comprising:

[0006] Based on statistical instructions, for any object, count the number of first operations performed by the object from the previous statistical time to the current statistical time.

[0007] Determine the first label corresponding to any of the objects;

[0008] Update the total number of operations corresponding to the first tag based on the first number of operations.

[0009] In some embodiments, the method further includes:

[0010] The statistical instructions are generated at preset intervals.

[0011] The step of counting the number of first operations performed by any object within the period from the previous statistical time to the current statistical time based on the statistical instruction includes:

[0012] Based on the statistical instructions, for any object, the first number of operations performed by the object within the first preset time period is obtained from the object change log of the object within the preset time period.

[0013] In some embodiments, before the step of counting the number of first operations performed by any object from the previous statistical time to the current statistical time based on statistical instructions, the method further includes:

[0014] Upon receiving the statistical instruction sent by the second server, the statistical instruction is generated by the second server after counting the number of first operations performed by any object within the preset time interval at preset time intervals;

[0015] The step of counting the number of first operations performed by any object within the period from the previous statistical time to the current statistical time, based on statistical instructions, includes:

[0016] Determine the first number of operations performed by any object included in the statistical instructions within the preset time period.

[0017] In some embodiments, the step preceding the step of counting the number of first operations performed by any object within the period from the previous statistical time to the current statistical time based on statistical instructions further includes:

[0018] The statistical instruction sent by the second server is received. The statistical instruction is generated by the second server after accumulating the number of times the first operation is performed by any object since the previous statistical time.

[0019] The method of counting the number of first operations performed by any object within the period from the previous statistical time to the current statistical time, based on statistical instructions, includes:

[0020] Determine the number of times the first operation corresponds to any object included in the statistical instruction.

[0021] In some embodiments, the method further includes:

[0022] In response to an object update instruction for the second tag, obtain the number of updated objects corresponding to the update object instruction;

[0023] Update the number of objects corresponding to the second tag based on the number of updated objects.

[0024] In some embodiments, the second server updates the total number of object operations on the object in the first counting database based on the number of first operations corresponding to any object;

[0025] When the object update instruction is an object deletion instruction, the step of updating the number of objects corresponding to the second label in response to the object update instruction for the second label further includes:

[0026] The total number of object operations on the deleted object is obtained from the first counting database of the second server, and used as the second number of operations.

[0027] Use the second number of operations to update the total number of operations corresponding to the second tag.

[0028] In some embodiments, the step of updating the total number of operations corresponding to the second tag using the second number of operations includes:

[0029] The total number of operations corresponding to the current second tag is obtained from the second counting database. The second counting database stores any tag and the total number of operations corresponding to any tag.

[0030] If the second operation count is less than or equal to the total operation count corresponding to the current second tag.

[0031] Subtract the number of operations from the total number of operations corresponding to the second label to update the total number of operations corresponding to the second label;

[0032] If the number of the second operation is greater than the total number of operations corresponding to the current second tag, then identify multiple objects corresponding to the second tag other than the deleted object;

[0033] Obtain the total number of object operations corresponding to each of the multiple objects from the first counting database;

[0034] The total number of object operations corresponding to each of the multiple objects is summed to update the total number of operations corresponding to the second label.

[0035] In some embodiments, the step of updating the number of objects corresponding to the second label in response to an object update instruction for the second label further includes:

[0036] Calculate the initial number of objects and the initial total number of operations corresponding to each of the multiple tags from the tag-object mapping table stored on the server.

[0037] In some embodiments, the method further includes:

[0038] The number of objects and the total number of operations corresponding to the different tags are output to multiple clients corresponding to the server, so that the multiple clients can display the number of objects and the total number of operations.

[0039] According to a second aspect of the present disclosure, a data update method is provided, applied to a second server, the method comprising:

[0040] Count the number of operations performed on any object between the previous statistical time and the current statistical time.

[0041] Update the number of operations corresponding to any object based on the number of operations;

[0042] Statistical instructions are generated based on the number of operations;

[0043] The statistical instruction is sent to the consumer so that the consumer can update the total number of operations on the tag to which any object belongs based on the statistical instruction.

[0044] In some embodiments, the step of counting the number of operations performed by any object from the previous statistical time to the current statistical time includes:

[0045] At preset intervals, the number of operations performed on any object within the preset interval is counted.

[0046] In some embodiments, the step of counting the number of operations performed by any object from the previous statistical time to the current statistical time includes:

[0047] If the number of operations corresponding to any object reaches a preset number of operations, the number of operations corresponding to any object is obtained.

[0048] According to a third aspect of the present disclosure, a data updating apparatus is provided, applied to a first server, the apparatus comprising:

[0049] The statistics module is used to count the number of first operations performed by any object from the previous statistical time to the current statistical time, based on statistical instructions.

[0050] A determination module is used to determine the first label corresponding to any one of the objects;

[0051] The update module is configured to perform an update of the total number of operations corresponding to the first tag based on the first number of operations.

[0052] In some embodiments, the apparatus further includes:

[0053] The first generation module is configured to generate the statistical instructions at preset intervals.

[0054] The statistics module is specifically configured to execute:

[0055] Based on the statistical instructions, for any object, the first number of operations performed by the object within the first preset time period is obtained from the object change log of the object within the preset time period.

[0056] In some embodiments, the apparatus further includes:

[0057] The first receiving module is configured to execute the statistical instruction sent by the second server upon receiving the statistical instruction. The statistical instruction is generated by the second server after counting the number of first operations performed by any object within the preset time interval at preset time intervals.

[0058] The statistics module is specifically configured to execute:

[0059] Determine the first number of operations performed by any object included in the statistical instructions within the preset time period.

[0060] In some embodiments, the apparatus further includes:

[0061] The second receiving module is configured to execute the statistical instruction sent by the second server upon receiving the statistical instruction, which is generated by the second server after accumulating the number of first operations performed by any object since the previous statistical time.

[0062] The statistics module is specifically configured to execute:

[0063] Determine the number of times the first operation corresponds to any object included in the statistical instruction.

[0064] In some embodiments, the apparatus further includes:

[0065] The acquisition module is used to acquire the number of updated objects corresponding to the update object instruction in response to the object update instruction for the second tag;

[0066] The update module is used to update the number of objects corresponding to the second tag based on the number of updated objects; and to update the total number of operations corresponding to the first tag based on the number of first operations.

[0067] In some embodiments, the second server updates the total number of object operations on the object in the first counting database based on the number of first operations corresponding to any object;

[0068] When the object update instruction is an object deletion instruction, the apparatus further includes:

[0069] The acquisition module is configured to perform the following: retrieve the total number of object operations on the deleted object from the first counting database of the second server, as the second number of operations;

[0070] The update module is also configured to perform the following: update the total number of operations corresponding to the second tag using the second number of operations.

[0071] In some embodiments, the update module is specifically configured to perform any of the following:

[0072] The total number of operations corresponding to the current second tag is obtained from the second counting database. The second counting database stores any tag and the total number of operations corresponding to any tag.

[0073] If the second operation count is less than or equal to the total operation count corresponding to the current second tag.

[0074] Subtract the number of operations from the total number of operations corresponding to the second label to update the total number of operations corresponding to the second label;

[0075] If the number of the second operation is greater than the total number of operations corresponding to the current second tag, then identify multiple objects corresponding to the second tag other than the deleted object;

[0076] Obtain the total number of object operations corresponding to each of the multiple objects from the first counting database;

[0077] The total number of object operations corresponding to each of the multiple objects is summed to update the total number of operations corresponding to the second label.

[0078] In some embodiments, the apparatus further includes:

[0079] The calculation module is configured to execute the calculation from the tag-object mapping table stored on the server to obtain the initial number of objects corresponding to multiple tags and the initial total number of operations.

[0080] In some embodiments, the apparatus further includes:

[0081] The output module is configured to output the number of objects and the total number of operations corresponding to the different tags to multiple clients corresponding to the server, so that the multiple clients can display the number of objects and the total number of operations.

[0082] According to a fourth aspect of the present disclosure, a data updating apparatus is provided, applied to a second server, the apparatus comprising:

[0083] The statistics module is configured to perform the following: count the number of operations performed on any object from the previous statistical time to the current statistical time.

[0084] The update module is configured to perform operations based on the number of operations performed to update the number of operations corresponding to any one of the objects.

[0085] The generation module is configured to execute statistical instructions based on the number of operations;

[0086] The sending module is configured to send the statistical instructions to a first server, so that the first server updates the total number of operations on the tag to which any object belongs based on the statistical instructions.

[0087] In some embodiments, the statistics module is specifically configured to perform:

[0088] At preset intervals, the number of operations performed on any object within the preset interval is counted.

[0089] In some embodiments, the statistics module is specifically configured to perform:

[0090] If the number of operations corresponding to any object reaches a preset number of operations, the number of operations corresponding to any object is obtained.

[0091] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising:

[0092] processor;

[0093] Memory used to store the processor's executable instructions;

[0094] The processor is configured to execute the instructions to implement the data update method as described in either the first or second aspect.

[0095] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform a data update method as described in any one of the first or second aspects.

[0096] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program / instructions, wherein the computer instructions, when executed by a processor, implement the data update method described in the first or second aspect of the claims.

[0097] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:

[0098] This disclosure can obtain the operation count increment corresponding to any object based on statistical instructions, and then update the total operation count corresponding to the tag to which the object belongs based on the operation count increment. By updating the number of objects and the operation count increment, the number of objects and the total operation count under the tag can be statistically analyzed, which can effectively save computing resources and reduce the excessive read pressure on related storage services.

[0099] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0100] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0101] Figure 1 This is a schematic diagram illustrating the implementation environment of a data update method according to an exemplary embodiment.

[0102] Figure 2 This is a flowchart illustrating a data update method according to an exemplary embodiment.

[0103] Figure 3 This is a flowchart illustrating another data update method according to an exemplary embodiment.

[0104] Figure 4 This is a flowchart illustrating yet another data update method according to an exemplary embodiment.

[0105] Figure 5 This is a flowchart illustrating yet another data update method according to an exemplary embodiment.

[0106] Figure 6 This is a block diagram illustrating a data update apparatus according to an exemplary embodiment.

[0107] Figure 7 This is a block diagram illustrating another data update apparatus according to an exemplary embodiment.

[0108] Figure 8 This is a structural diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0109] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0110] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0111] Figure 1This is a schematic diagram illustrating an implementation environment for a data update method according to an exemplary embodiment, such as... Figure 1 As shown, the implementation environment includes: electronic device 101 and server 102.

[0112] Electronic device 101 is at least one of the following: smartphone, smartwatch, laptop, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), and laptop computer. Electronic device 101 is connected to server 102 via wired or wireless communication, which is not limited in this embodiment. Electronic device 101 has a client installed corresponding to the server. The client can display videos, articles, and other objects sent by the server, and can receive user actions such as viewing, liking, and saving these objects. The client can also receive videos, articles, and other objects posted by users, thereby sending these objects to server 102.

[0113] Electronic device 101 can refer to one of a plurality of electronic devices; this embodiment uses electronic device 101 as an example only. Those skilled in the art will understand that the number of the aforementioned terminals may be greater or less. For example, there may be only a few, or dozens or hundreds, or even more, electronic devices. This disclosure does not limit the number or type of electronic devices.

[0114] Server 102 can be at least one of a single server, multiple servers, a cloud server, a cloud computing platform, and a virtualization center. Server 102 connects to electronic device 101 via wired or wireless communication, which is not limited in this embodiment. Server 102 can receive videos, articles, and other objects published by clients on electronic device 101, determine the tags corresponding to each received object, and then update the number of objects corresponding to each tag in the server's corresponding counting database based on the number of received objects corresponding to each tag. Furthermore, server 102 can also monitor all clients corresponding to it, and can determine the increment of operation counts for each tag corresponding to each object at the current and previous statistical times based on the log information of all clients, thereby updating the total number of operations corresponding to each tag in the counting database based on the increment of operation counts. In some embodiments, the number of servers may be more or less, which is not limited in this embodiment. Of course, in other embodiments, server 102 may also include other functional servers to provide more comprehensive and diversified services.

[0115] Furthermore, in some embodiments, server 102 includes a first server and a second server. The first server can receive objects such as videos and articles published by clients in electronic device 101, determine the tags corresponding to each received object, and then update the number of objects corresponding to each tag in the counting database corresponding to the first server based on the number of received objects corresponding to each tag. The second server can monitor all clients corresponding to server 102, and determine the operation count increment corresponding to any object at the current statistical time and the previous statistical time based on the log information corresponding to all clients. Based on the operation count increment, the operation count corresponding to any object is updated in the technical database corresponding to the generating end. Further, a corresponding object change log is generated based on the operation count increment, and the object change log is sent to the first server so that the first server can determine the tag corresponding to any object and obtain the operation count increment corresponding to any object based on the object change log, so as to update the total operation count of the tag corresponding to any object in the counting database of the first server based on the operation count increment.

[0116] Figure 2 This is a flowchart illustrating a data update method according to an exemplary embodiment, such as... Figure 1 As shown, the data update method used in the first server includes the following steps:

[0117] In step S201, based on the statistical instruction, the number of first operations performed by any object between the previous statistical time and the current statistical time is counted.

[0118] The statistical instructions can be generated by the first server or sent from the second server to the first server.

[0119] Statistical instructions can be generated under preset conditions. As one possible implementation method, statistical instructions can be generated at preset intervals.

[0120] The first server can be equipped with a timer. Every preset time interval, the timer can generate statistical instruction generation information, and the first server can generate statistical instructions based on this information.

[0121] Based on statistical instructions, the method to count the number of first operations performed by any object within the period from the previous statistical time to the current statistical time can be implemented as follows: Based on statistical instructions, for any object, obtain the number of first operations performed by any object within the first preset time period from the object change log of the object within the preset time period.

[0122] The first server can count the number of operations corresponding to any object in real time. However, in order to reduce the burden on the first server, the statistical instructions can be generated by the first server. That is, the first server generates statistical instructions at certain intervals, such as every 10 minutes. Based on the statistical instructions, the first number of operations generated by any object within a first preset time period can be obtained in the object change log.

[0123] The change log includes the number of times a user performs operations on any object.

[0124] As another implementation, the above statistical instructions can also be triggered by a second server, which can listen to the logs sent by the client and thus count the number of operations corresponding to any object in the logs.

[0125] Optionally, the generation of statistical instructions can also be implemented as follows: based on statistical instructions, for any object, before the step of counting the number of first operations generated by any object from the previous statistical time to the current statistical time, the method further includes: receiving a statistical instruction sent by a second server, wherein the statistical instruction is generated by the second server after counting the number of first operations generated by any object within a preset time interval at preset time intervals.

[0126] The second server can count the number of operations corresponding to any object in real time. However, in order to reduce the burden on the second server, it can send a statistical instruction to the first server every preset time interval, so that the first server can obtain the first number of operations corresponding to any object in the statistical instruction.

[0127] After counting the number of first operations for any object, the second server first updates the total number of object operations for the object using the number of first operations and the number of operations for that object stored in the first counting database. Then, it generates a statistical instruction based on the number of first operations for that object and sends it to the first server.

[0128] In some embodiments, based on statistical instructions, counting the number of first operations performed by any object from the previous statistical time to the current statistical time includes: determining the number of first operations performed by any object included in the statistical instructions within a preset time period;

[0129] Understandably, if the interval is too short, the number of first operations counted during this period may be very small. Frequently counting a small number of first operations would lead to a serious waste of server resources. Therefore, the second server can also send a counting instruction to the first server after accumulating the number of first operations generated by any object from the previous counting time.

[0130] In some embodiments, the generation of statistical instructions can also be implemented as follows: before the step of counting the number of first operations generated by any object from the previous statistical time to the current statistical time based on statistical instructions, the step further includes: receiving a statistical instruction sent by a second server, wherein the statistical instruction is generated by the second server after accumulating the number of first operations generated by any object from the previous statistical time.

[0131] Based on statistical instructions, counting the number of first operations performed by any object from the previous statistical time to the current statistical time includes: determining the number of first operations corresponding to any object included in the statistical instructions.

[0132] In step S202, the first label corresponding to any object is determined.

[0133] The first server may have a mapping table that stores the correspondence between objects and tags. Therefore, the first server can determine the first tag corresponding to any object from the mapping table.

[0134] In step S203, the total number of operations corresponding to the first tag is updated based on the first number of operations.

[0135] The first server is equipped with a second counting database, which stores multiple tags and the number of operations corresponding to each tag.

[0136] After determining the first label corresponding to any object, the existing number of operations corresponding to the first label can be determined in the second counting database, so that the total number of operations corresponding to the first label can be updated using the first number of operations and the existing number of operations.

[0137] Furthermore, since the purpose of counting the number of objects and the total number of operations corresponding to different tags is to allow users on the client side to view them, after determining the number of objects and the total number of operations corresponding to different tags, the number of objects and the total number of operations corresponding to different tags can be output to multiple clients on the server so that multiple clients can display the number of objects and the total number of operations.

[0138] This disclosure relates to a data update method applied to a first server. Upon receiving an object update instruction for any tag, this disclosure can update the number of objects corresponding to the second tag based on the number of updated objects, and can obtain the operation count increment corresponding to any object based on a statistical instruction, thereby updating the total number of operations corresponding to the tag to which the object belongs based on the operation count increment. By updating the number of objects and the operation count increment to statistically analyze the number of objects and the total number of operations under the tag, computing resources can be effectively saved and the excessive read pressure on related storage services can be reduced.

[0139] Furthermore, since the number of objects can affect the total number of operations corresponding to the tag to which the object belongs, it is also possible to count the number of objects under a certain tag.

[0140] In an optional embodiment, the method further includes: in response to an object update instruction for the second tag, obtaining the number of updated objects corresponding to the update object instruction; and updating the number of objects corresponding to the second tag based on the number of updated objects.

[0141] The first tag can be any interactive object displayed on the client side, such as articles, videos, or products. The second tag can indicate the type of article, video, or product; for example, the second tag could be current events, sports, or business. The first and second tags can be the same or different.

[0142] Among them, the object update instruction can be either an object addition instruction or an object deletion instruction.

[0143] For cases where the object update instruction is an object addition instruction, the object content corresponding to the object update instruction is obtained, and the second tag corresponding to the updated object is determined based on the object content. Furthermore, the second tag and the updated object can be stored in a relationship lookup table on the first server. For example, when the updated object is an article and the article content is ball sports, the second tag corresponding to the updated object can be determined to be sports.

[0144] When the object update instruction is an object deletion instruction, since the deleted object and its corresponding tag are stored in the relation lookup table of the first server when the deleted object is added, the second tag corresponding to the deleted object can be found from the relation lookup table.

[0145] Optionally, the first server may also be configured to store multiple tags and the number of objects corresponding to each tag. Correspondingly, upon receiving an object update instruction and determining the second tag corresponding to the object to be updated, the number of objects to be updated can be determined, and the number of objects with the second tag in the first server can be updated based on the existing number of objects with the second tag in the first server and the number of objects to be updated.

[0146] Understandably, before applying this data update method, the server will also store multiple tags and their respective initial object counts and initial total number of operations. Therefore, before receiving the first object addition instruction to apply this data update method, it can first obtain multiple tags and their respective initial object counts and initial total number of operations. Optionally, in response to the object update instruction for the second tag, before updating the object count corresponding to the second tag, it also includes: calculating the initial object counts and initial total number of operations corresponding to the multiple tags from the tag-object correspondence table stored on the server.

[0147] Furthermore, after receiving the first object addition instruction applying this data update method, the number of objects corresponding to the label can be updated based on any added object and the initial number of objects corresponding to the label of the added object.

[0148] It should be noted that the processing method for other added objects is the same as that for any one of the added objects, and will not be repeated here.

[0149] Furthermore, when the object update instruction is an object deletion instruction, there may be a situation where the total operation count corresponding to the label of the deleted object is inaccurate. Therefore, it is also necessary to perform a compensation count process for the label of the deleted object. Figure 3 This is a flowchart illustrating a data update method according to an exemplary embodiment. The method, applied when the object update instruction is an object deletion instruction, includes the following steps after updating the number of objects corresponding to a second label in response to an object update instruction for a second label:

[0150] In step S301, the total number of object operations on the deleted object is obtained from the first counting database of the second server, which is used as the second operation count.

[0151] The second server can update the total number of operations on any object in the first counting database based on the first number of operations corresponding to any object.

[0152] The second server is equipped with a first counting database. After counting the number of first operations corresponding to any object, the second server first updates the total number of object operations for the object using the first operation count and the number of operations corresponding to the object stored in the first counting database. Furthermore, the second server generates a statistical instruction based on the first operation count corresponding to the object and sends it to the first server. The first server then obtains the first operation count from the statistical instruction and updates the number of operations corresponding to the tag of the object. The first counting database and the second counting database can have the same function, only they are located on different servers.

[0153] In step S302, the total number of operations corresponding to the second label is updated using the second number of operations.

[0154] Optionally, the step of updating the total number of operations corresponding to the second tag using the second operation count includes: obtaining the total number of operations corresponding to the current second tag from the second counting database, the second counting database storing any tag and the total number of operations corresponding to any tag; if the second operation count is less than or equal to the total number of operations corresponding to the current second tag, subtracting the second operation count from the total number of operations corresponding to the current second tag to update the total number of operations corresponding to the second tag; if the second operation count is greater than the total number of operations corresponding to the current second tag, determining multiple objects corresponding to the second tag other than the deleted object; obtaining the total number of object operations corresponding to each of the multiple objects from the first counting database; and adding the total number of object operations corresponding to each of the multiple objects to update the total number of operations corresponding to the second tag.

[0155] If the number of the second operation is less than or equal to the total number of operations corresponding to the current second label, it means that there is no problem with the current count. In this case, the number of the second operation can be subtracted from the total number of operations corresponding to the current second label to update the total number of operations corresponding to the second label.

[0156] Furthermore, if the number of second operations is greater than the total number of operations corresponding to the current second tag, it indicates that there is a problem with the current count. In this case, multiple objects corresponding to the second tag, excluding the deleted object, are identified. The total number of object operations corresponding to each of the multiple objects is obtained from the first count database. The total number of object operations corresponding to each of the multiple objects is added together to update the total number of operations corresponding to the second tag.

[0157] In the process of counting the total number of operations corresponding to a tag, the total number of operations corresponding to the tag in the counting database of the second server is updated first, and then the total number of operations corresponding to the tag in the counting database of the first server is updated. That is, there is a delay in updating the counting database of the first server.

[0158] If the number of first operations corresponding to any object is relatively large and the number of objects corresponding to the label of any object is relatively small, and there is a delay in updating the counting database of the first server, then the number of operations corresponding to any object in the first counting database may be greater than the number of operations corresponding to the label of any object in the second counting database.

[0159] For example, suppose the tag is "motion," and the corresponding object is only two videos. Assume the initial view count for both videos is 50. At this point, the total number of operations (view counts) for the "motion" tag in both the first and second counting databases are updated to 100. Some time later, one video's view count is 30. This time, the first counting database is updated, but due to a delay, the second counting database is not updated. At this point, the first counting database shows 130 views for the "motion" tag, and the second counting database shows 100 views. If the user deletes the video at this time, and 30 views occurred between the first counting database update and the video's deletion, then the first counting database shows 180 views for the "motion" tag, and the second counting database shows 100 views. Therefore, a compensation count needs to be performed on the second counting database to determine the video corresponding to the "motion" tag, and then, based on the video's view count, determine that the view count for the "motion" tag is 50.

[0160] Figure 4 This is a flowchart illustrating a data update method according to an exemplary embodiment, such as... Figure 1 As shown, this data update method is used in the second server and includes the following steps.

[0161] In step S401, the number of operations performed by any object from the previous statistical time to the current statistical time is counted.

[0162] The steps for counting the number of operations performed on any object from the previous statistical time to the current statistical time include: counting the number of operations performed on any object within a preset time interval.

[0163] The steps for counting the number of operations performed on any object from the previous statistical time to the current statistical time include: if the number of operations performed on any object reaches a preset number of operations, then obtain the number of operations performed on any object.

[0164] In step S402, the number of operations corresponding to any object in the counting database of the generating end is updated based on the number of operations.

[0165] In step S403, a statistical instruction is generated based on the number of operations.

[0166] In step S404, a statistical instruction is sent to the first server so that the first server updates the total number of operations on the tag to which any object belongs based on the statistical instruction.

[0167] In this embodiment, the second server counts the number of operations performed on any object from the previous counting time to the current counting time; updates the number of operations corresponding to any object in the counting database of the generating end based on the number of operations; generates a statistical instruction based on the number of operations; and sends the statistical instruction to the first server so that the first server updates the total number of operations of the tag to which any object belongs based on the statistical instruction. This disclosure can obtain the increment of the number of operations corresponding to any object based on the statistical instruction, thereby updating the total number of operations corresponding to the tag to which the object belongs based on the increment of the number of operations, thus improving the update efficiency.

[0168] Figure 5 This illustration shows an interactive scenario where the object is a video and the number of operations is the number of plays. The technical solution of this application embodiment is used to implement a scenario interaction diagram. By counting the number of video works and the number of plays, the number of videos and the number of plays can be updated in a timely manner for users to know.

[0169] The scenario includes a first server, which has a second counting database. The second counting database stores video tags and video counts, as well as video tags and video play counts. First, the counting database is initialized by calculating the initial number of objects and the initial total number of operations corresponding to multiple tags from the tag-object mapping table stored in the service. The service can be the one that previously performed the video count and video play count statistics.

[0170] Furthermore, the client receives the user's publishing operation for the video, generates a publishing instruction, and the second server responds to the publishing instruction by determining the video's tag and updating the number of videos corresponding to that tag in the corresponding second counting database. Further, the first server receives a playback count statistics instruction from the second server for a specific video, which is sent every 10 seconds. Based on this instruction, the first server determines the number of views generated by the video from the client's log information within the time frame from 10 seconds prior to receiving the instruction, and then determines the tag corresponding to the video in the counting database. Finally, based on the calculated playback count and the original playback count corresponding to that tag in the counting database, the total playback count corresponding to that tag is determined.

[0171] It should be noted that before sending the statistical command, the second server first updated the total number of operations for the corresponding tag in the corresponding counting database.

[0172] At a certain moment, the second server detects a client's deletion operation on a video, determines that the video's tag is a motion tag, and updates the number of videos corresponding to the motion tag and the corresponding video views in the corresponding counting database. There are two videos corresponding to the motion tag, and the first count of views for both videos is 50. At that time, the total number of operations corresponding to the motion tag in both the first and second counting databases, i.e., the video views, is updated to 100. After a period of time, the view count for one of the videos is 30. This time, the first counting database is updated, but due to a delay, the second counting database is not updated. At this point, the view count for the motion tag in the first counting database is 130, and the view count for the motion tag in the second counting database is 100. Coincidentally, at this moment, the second server detects the client's deletion operation on a video, and 30 views occurred between the update of the first counting database and the deletion of the video. Therefore, the view count for the motion tag in the first counting database is now 180, and the view count for the motion tag in the second counting database is 100. The view count for the motion tag in the first counting database is greater than the view count for the motion tag in the second counting database. Therefore, it is necessary to perform compensation counting on the second counting database, that is, to determine the video corresponding to the motion tag, and then, based on the number of views of the video, determine that the number of views corresponding to the motion tag is 50.

[0173] Figure 6 This is a block diagram illustrating a data update apparatus according to an exemplary embodiment. (Refer to...) Figure 6 The device is applied to the first server and includes a statistics module 61, a determination module 62, and an update module 63.

[0174] The statistics module 61 is used to count the number of first operations performed by any object from the previous statistics time to the current statistics time based on statistics instructions.

[0175] The determination module 62 is used to determine the first label corresponding to any one of the objects.

[0176] Update module 63 is configured to perform an update of the total number of operations corresponding to the first tag based on the first number of operations.

[0177] Optionally, the device further includes:

[0178] The first generation module is configured to generate the statistical instructions at preset intervals.

[0179] The statistics module 61 is specifically configured to execute:

[0180] Based on the statistical instructions, for any object, the first number of operations performed by the object within the first preset time period is obtained from the object change log of the object within the preset time period.

[0181] Optionally, the device further includes:

[0182] The first receiving module is configured to execute the statistical instruction sent by the second server upon receiving the statistical instruction. The statistical instruction is generated by the second server after counting the number of first operations performed by any object within the preset time interval at preset time intervals.

[0183] The statistics module 61 is specifically configured to execute:

[0184] Determine the first number of operations performed by any object included in the statistical instruction within the preset time period;

[0185] Optionally, the device further includes:

[0186] The second receiving module is configured to execute the statistical instruction sent by the second server upon receiving the statistical instruction, which is generated by the second server after accumulating the number of first operations performed by any object since the previous statistical time.

[0187] The statistics module 61 is specifically configured to execute:

[0188] Determine the number of times the first operation corresponds to any object included in the statistical instruction.

[0189] Optionally, the above-mentioned device further includes:

[0190] The acquisition module is used to acquire the number of updated objects corresponding to the update object instruction in response to the object update instruction for the second tag;

[0191] Optionally, the update module is used to update the number of objects corresponding to the second tag based on the number of updated objects; and to update the total number of operations corresponding to the first tag based on the first number of operations.

[0192] Optionally, the second server updates the total number of object operations on the object in the first counting database based on the number of first operations corresponding to any object;

[0193] When the object update instruction is an object deletion instruction, the apparatus further includes:

[0194] The acquisition module is configured to perform the following: retrieve the total number of object operations on the deleted object from the first counting database of the second server, as the second number of operations;

[0195] The update module is also configured to perform the following: update the total number of operations corresponding to the second tag using the second number of operations.

[0196] Optionally, the update module is specifically configured to perform any of the following:

[0197] The total number of operations corresponding to the current second tag is obtained from the second counting database. The second counting database stores any tag and the total number of operations corresponding to any tag.

[0198] If the second operation count is less than or equal to the total operation count corresponding to the current second tag.

[0199] Subtract the number of operations from the total number of operations corresponding to the second label to update the total number of operations corresponding to the second label;

[0200] If the number of the second operation is greater than the total number of operations corresponding to the current second tag, then identify multiple objects corresponding to the second tag other than the deleted object;

[0201] Obtain the total number of object operations corresponding to each of the multiple objects from the first counting database;

[0202] The total number of object operations corresponding to each of the multiple objects is summed to update the total number of operations corresponding to the second label.

[0203] Optionally, the device further includes:

[0204] The calculation module is configured to execute the calculation from the tag-object mapping table stored on the server to obtain the initial number of objects corresponding to multiple tags and the initial total number of operations.

[0205] Optionally, the device further includes:

[0206] The output module is configured to output the number of objects and the total number of operations corresponding to the different tags to multiple clients corresponding to the server, so that the multiple clients can display the number of objects and the total number of operations.

[0207] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0208] Figure 7 This is a block diagram illustrating a data update apparatus according to an exemplary embodiment. (Refer to...) Figure 7 The device is used on a second server and includes a statistics module 71, an update module 72, a generation module 73, and a sending module 74.

[0209] Statistics module 71 is configured to perform the following: count the number of operations performed by any object from the previous statistical time to the current statistical time.

[0210] Update module 72 is configured to perform operations based on the number of operations performed to update the number of operations corresponding to any one of the objects.

[0211] Generation module 73 is configured to execute a statistical instruction based on the number of operations;

[0212] The sending module 74 is configured to send the statistical instruction to the first server so that the first server updates the total number of operations of the tag to which any object belongs based on the statistical instruction.

[0213] Optionally, the statistics module 71 is specifically configured to perform:

[0214] At preset intervals, the number of operations performed on any object within the preset interval is counted.

[0215] Optionally, the statistics module 71 is specifically configured to perform:

[0216] If the number of operations corresponding to any object reaches a preset number of operations, the number of operations corresponding to any object is obtained.

[0217] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0218] In one possible design, Figure 8 The data update device in the illustrated embodiment can be implemented as an electronic device, such as... Figure 8 As shown, the electronic device may include a memory 801 and a processor 802;

[0219] The memory 801 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processor 802.

[0220] The processor 802 is configured to: execute the instructions to achieve, as follows Figure 2 or Figure 4 The data update method described above.

[0221] The processor 802 may include one or more processors to execute computer instructions to complete all or part of the steps in the above-described method. Alternatively, the processor may be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method.

[0222] The memory 801 is configured to store various types of data to support operations at the terminal. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0223] Of course, computing devices may also include other components, such as input / output interfaces, communicators, etc.

[0224] Input / output interfaces provide interfaces between the processor and peripheral interface modules, which can be output devices, input devices, etc.

[0225] The communicator is configured to facilitate wired or wireless communication between computing devices and other devices.

[0226] The computing device can be a physical device or an elastic computing host provided by a cloud computing platform. In this case, the computing device can refer to the cloud server. The processor, memory, etc. mentioned above can be basic server resources rented or purchased from the cloud computing platform.

[0227] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, wherein the instructions can be derived from... Figure 8 The processor 802 of the illustrated electronic device executes the above method. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0228] In an exemplary embodiment, a computer program product is also provided, including a computer program / instructions, which, when executed by a processor, implement... Figure 2 or Figure 4 The data update method described above.

[0229] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0230] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0231] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0232] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions 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 this application.

[0233] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0234] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A data update method, characterized in that, Applied to a first server, the method includes: Based on statistical instructions, count the number of first operations performed by any object between the previous statistical time and the current statistical time. Determine the first label corresponding to any of the objects; Update the total number of operations corresponding to the first tag based on the first number of operations; When the object update instruction is an object deletion instruction, in response to the object update instruction for the second tag, the number of objects corresponding to the second tag is updated; the total number of object operations on the deleted object is obtained from the first counting database of the second server as the second operation count; the total number of operations corresponding to the current second tag is obtained from the second counting database of the first server, which stores any tag and the total number of operations corresponding to any tag; if the second operation count is less than or equal to the total number of operations corresponding to the current second tag, the second operation count is subtracted from the total number of operations corresponding to the current second tag to update the total number of operations corresponding to the second tag; if the second operation count is greater than the total number of operations corresponding to the current second tag, multiple objects other than the deleted object corresponding to the second tag are identified; the total number of object operations corresponding to each of the multiple objects is obtained from the first counting database; the total number of object operations corresponding to each of the multiple objects is added together to update the total number of operations corresponding to the second tag, wherein the second server updates the total number of object operations of the object in the first counting database according to the first operation count corresponding to any object.

2. The data update method according to claim 1, characterized in that, Also includes: The statistical instructions are generated at preset intervals. The step of counting the number of first operations performed by any object within the period from the previous statistical time to the current statistical time, based on statistical instructions, includes: Based on the statistical instructions, the first number of operations performed by any object within the first preset time period is obtained from the object change log of any object within the preset time period.

3. The data update method according to claim 1, characterized in that, Before the step of counting the number of first operations performed by any object within the period from the previous statistical time to the current statistical time based on statistical instructions, the method further includes: Upon receiving the statistical instruction sent by the second server, the statistical instruction is generated by the second server after counting the number of first operations performed by any object within the preset time interval at preset time intervals; The method of counting the number of first operations performed by any object within the period from the previous statistical time to the current statistical time, based on statistical instructions, includes: Determine the first number of operations performed by any object included in the statistical instructions within the preset time period.

4. The data update method according to claim 1, characterized in that, Before the step of counting the number of first operations performed by any object within the period from the previous statistical time to the current statistical time based on statistical instructions, the method further includes: The statistical instruction sent by the second server is received. The statistical instruction is generated by the second server after accumulating the number of first operations performed by any object since the previous statistical time. The method of counting the number of first operations performed by any object within the period from the previous statistical time to the current statistical time, based on statistical instructions, includes: Determine the number of times the first operation corresponds to any object included in the statistical instruction.

5. The data update method according to claim 1, characterized in that, The step of updating the number of objects corresponding to the second tag in response to an object update instruction for the second tag includes: In response to an object update instruction for the second tag, obtain the number of updated objects corresponding to the object update instruction; Update the number of objects corresponding to the second tag based on the number of updated objects.

6. The data update method according to claim 5, characterized in that, The step of updating the number of objects corresponding to the second label in response to an object update instruction for the second label further includes: Calculate the initial number of objects and the initial total number of operations corresponding to each of the multiple tags from the tag-object mapping table stored on the server.

7. The data update method according to claim 1, characterized in that, The method further includes: The number of objects and the total number of operations corresponding to different tags are output to multiple clients on the server so that the multiple clients can display the number of objects and the total number of operations.

8. A data update device, characterized in that, Applied to a first server, the device includes: The statistics module is configured to execute statistics instructions to count the number of first operations performed by any object from the previous statistics time to the current statistics time. The determination module is configured to determine the first tag corresponding to any one of the objects; The update module is configured to perform an update of the total number of operations corresponding to the first tag based on the first number of operations; The acquisition module is configured to perform the following: when the object update instruction is an object deletion instruction, in response to the object update instruction for the second label, update the number of objects corresponding to the second label, and retrieve the total number of object operations on the deleted objects from the first counting database of the second server as the second operation count; The update module is further configured to perform the following: obtaining the total number of operations corresponding to the current second tag in the second counting database of the first server, wherein the second counting database stores any tag and the total number of operations corresponding to the any tag; if the second number of operations is less than or equal to the total number of operations corresponding to the current second tag, subtracting the second number of operations from the current total number of operations corresponding to the second tag to update the total number of operations corresponding to the second tag; if the second number of operations is greater than the current total number of operations corresponding to the second tag, determining multiple objects corresponding to the second tag other than the deleted object; obtaining the total number of object operations corresponding to each of the multiple objects in the first counting database; and summing the total number of object operations corresponding to each of the multiple objects to update the total number of operations corresponding to the second tag, wherein the second server updates the total number of object operations of the object in the first counting database according to the first number of operations corresponding to any object.

9. The data update device according to claim 8, characterized in that, The device further includes: The first generation module is configured to generate the statistical instructions at preset intervals. The statistics module is specifically configured to execute: Based on the statistical instructions, for any object, the first number of operations performed by the object within the first preset time period is obtained from the object change log of the object within the preset time period.

10. The data update device according to claim 8, characterized in that, The device further includes: The first receiving module is configured to execute the statistical instruction sent by the second server upon receiving the statistical instruction. The statistical instruction is generated by the second server after counting the number of first operations performed by any object within the preset time interval at preset time intervals. The statistics module is specifically configured to execute: Determine the first number of operations performed by any object included in the statistical instructions within the preset time period.

11. The data update apparatus according to claim 8, characterized in that, The device further includes: The second receiving module is configured to execute the statistical instruction sent by the second server upon receiving the statistical instruction, which is generated by the second server after accumulating the number of first operations performed by any object since the previous statistical time. The statistics module is specifically configured to execute: Determine the number of times the first operation corresponds to any object included in the statistical instruction.

12. The data update device according to claim 8, characterized in that, The update module is further configured to execute an object update instruction in response to the second tag, obtain the number of updated objects corresponding to the object update instruction, and update the number of objects corresponding to the second tag based on the number of updated objects.

13. The data update apparatus according to claim 8, characterized in that, The device further includes: The calculation module is configured to execute the calculation from the tag-object mapping table stored on the server to obtain the initial number of objects corresponding to multiple tags and the initial total number of operations.

14. The data update device according to claim 8, characterized in that, The device further includes: The output module is configured to output the number of objects and the total number of operations corresponding to different tags to multiple clients on the server, so that the multiple clients can display the number of objects and the total number of operations.

15. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the data update method as described in any one of claims 1 to 7.

16. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the data update method as described in any one of claims 1 to 7.

17. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the data update method according to any one of claims 1 to 7.