User data processing method and device, user data query method and device, medium and equipment

By using a plural Bloom filter with date and task as the primary key in the database to record the status of the user's task completion, the database crash caused by task data complexity is solved, efficient storage and query is achieved, and data security and response speed are improved. .

CN119088849APending Publication Date: 2024-12-06QINGDAO HAIER TECH +2

Patent Information

Application Number
CN202411138803.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Against the background of huge user base and complicated information, the task data is complex, resulting in low data processing efficiency, affecting subsequent data queries and user responses, and may even lead to database crashes.

Method used

A plural Bloom filter with date and task as the primary key is used to record the status of the user completing tasks in the database. The hash algorithm is used to update and query the task status, saving storage space, avoiding database crashes, and improving data query efficiency.

Benefits of technology

It effectively saves storage space, improves efficient storage and query performance of massive user data, avoids database crashes caused by excessive data volume, and improves data security and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088849A_ABST
    Figure CN119088849A_ABST
Patent Text Reader

Abstract

The invention discloses a user data processing method and device, a user data query method and device, a medium and equipment, and relates to the technical field of computers.The method comprises the steps that when a user side participates in a task through an application program, corresponding task data are obtained, and the task data comprise a task identifier and a preset time period to which task completion time belongs; according to the task data, a filtering tool corresponding to the task in a database is determined, a filtering tool group is deployed in the database, the filtering tool group comprises a plurality of filtering tools, and each filtering tool corresponds to one task in the preset time period; and recording the task state of the task executed by the user side by using the filtering tool. According to the method, the storage space is effectively saved, and mass user data can be efficiently stored. The problem of database collapse caused by overlarge data volume is effectively avoided, so that the data security is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a user data processing and query method, device, medium and equipment. Background Art

[0002] As APPs play an increasingly important role in daily life, in order to increase the number of active users and visits to APPs, APP operators actively build a diversified task system to attract users to participate in activities within the APPs. This task system plays a vital role in APPs. Its perfection and efficiency can not only greatly improve the efficiency and satisfaction of users, but also significantly enhance the user experience, support the implementation of complex functions, promote user retention and activity, support data analysis and optimization, and provide a seamless synchronization experience across platforms and devices.

[0003] However, with a huge user base and complex information, users participate in a wide variety of activities, which makes the task data extremely complex. In the process of completing the task, the processing of a large amount of data often fails to achieve the expected results, affecting the efficiency of subsequent data query and user response, and even causing database crashes. Summary of the invention

[0004] In response to the above problems, the present application provides a user data processing and query method, device, medium and equipment.

[0005] In a first aspect, the present application provides a method for processing user data, the method comprising:

[0006] When a user terminal participates in a task through an application, corresponding task data is obtained, wherein the task data includes an identifier of the task and a preset time period to which the task completion time belongs;

[0007] Determine, according to the task data, a filtering tool corresponding to the task in a database, wherein a filtering tool group is deployed in the database, the filtering tool group includes a plurality of filtering tools, and each filtering tool corresponds to a task within the preset time period;

[0008] The filtering tool is used to record the task status of the user terminal executing the task; wherein the task status is used to record whether the user terminal has completed the task.

[0009] In a possible implementation, the filtering tool is a Bloom filter, and before determining the Bloom filter corresponding to the task in the database, the method further includes:

[0010] Acquire a task list corresponding to the preset time period, the task list including at least one task corresponding to the application within the preset time period, and an identifier corresponding to each task;

[0011] According to the task list, a Bloom filter corresponding to each task is created, wherein the Bloom filter is distinguished by an identifier of the corresponding task and a preset time period.

[0012] In a possible implementation, creating a Bloom filter corresponding to each task according to the task list includes:

[0013] Obtain the number of users corresponding to each task in the task list;

[0014] According to a preset relationship, a target false positive rate and the number of users, the storage capacity of the Bloom filter corresponding to each task is obtained, wherein the preset relationship is used to indicate a mapping relationship between the target false positive rate, the number of users and the storage capacity of the Bloom filter, and the target false positive rate is used to indicate the probability that the Bloom filter judges an unfinished task on the user end as a completed task;

[0015] Create a Bloom filter for each task's corresponding storage capacity.

[0016] In a possible implementation, the Bloom filter includes: an array of a preset size and a hash transformation module;

[0017] The hash transformation module is used to encode according to the identifier of the user terminal to obtain the key of the task corresponding to the user terminal; according to the state of the task corresponding to the user terminal and the number of bits of the array, update the values ​​corresponding to multiple bits in the array so that the values ​​obtained by updating the multiple bits correspond to the task state of the task.

[0018] In a second aspect, the present application provides a user data query method, wherein a database is deployed with a filtering tool group, the filtering tool group includes a plurality of filtering tools, each of the filtering tools corresponds to a task within the preset time period, and the filtering tool is used to record the task status of the user terminal executing the task; the method includes:

[0019] In response to the query request, obtaining target task data corresponding to the query request, the target task data including a task identifier and a preset time period to which the target query time belongs;

[0020] Determine, according to the target task data, a filtering tool corresponding to the task in a database;

[0021] Based on the filtering tool, the task status of the user terminal executing the task is recorded, a query result corresponding to the query request is obtained, and the query result is returned, where the query result is used to indicate whether the user terminal has completed the task.

[0022] In a possible implementation, the filtering tool is a Bloom filter, and the step of recording the task status of the user terminal executing the task based on the filtering tool and obtaining the query result corresponding to the query request includes:

[0023] Determine, according to the key of the client corresponding to the task, values ​​of a plurality of bits corresponding to the array of the Bloom filter;

[0024] If the task status corresponding to the values ​​of the plurality of bits indicates completion, the query result is that the user terminal has completed the task;

[0025] If the task status corresponding to the values ​​of the plurality of bits indicates that the task is not completed, it indicates that the query result is that the user terminal has not completed the task.

[0026] In a third aspect, the present application provides a user data processing device, the device comprising:

[0027] A first acquisition module, used to acquire corresponding task data when a user terminal participates in a task through an application program, wherein the task data includes an identifier of the task and a preset time period to which the task completion time belongs;

[0028] A first processing module is used to determine, according to the task data, a filtering tool corresponding to the task in a database, wherein a filtering tool group is deployed in the database, the filtering tool group includes a plurality of filtering tools, and each filtering tool corresponds to a task within the preset time period;

[0029] The first processing module is further used to use the filtering tool to record the task status of the user terminal executing the task; wherein the task status is used to record whether the user terminal has completed the task.

[0030] In a fourth aspect, the present application provides a user data query device, wherein a database is deployed with a filtering tool group, wherein the filtering tool group includes a plurality of filtering tools, each of the filtering tools corresponds to a task within the preset time period, and the filtering tool is used to record the task status of the user terminal executing the task, and the device includes:

[0031] A second acquisition module is used to respond to the query request and acquire target task data corresponding to the query request, wherein the target task data includes a task identifier and a preset time period to which the target query time belongs;

[0032] A second processing module, for determining a filtering tool corresponding to the task in a database according to the task data;

[0033] The second processing module is also used to record the task status of the user terminal executing the task based on the filtering tool, obtain the query result corresponding to the query request, and return the query result, wherein the query result is used to indicate whether the user terminal has completed the task.

[0034] In a fifth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of the first aspect and / or the second aspect when running.

[0035] In a sixth aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the method described in any one of the first aspect and / or the second aspect through the computer program.

[0036] The present invention provides a user data processing and query method, device, medium and equipment, wherein a plurality of Bloom filters with date and task as primary keys are used in a database to record users who complete tasks on the same day. When a user terminal participates in a task through an application, the corresponding task data is obtained, and the task data includes an identifier of the task and a preset time period to which the task completion time belongs. According to the task data, a Bloom filter corresponding to the task in the database is determined, wherein a Bloom filter group is deployed in the database, and the Bloom filter group includes multiple Bloom filters, and each Bloom filter corresponds to a task within the preset time period. The Bloom filter is used to record the task status of the user terminal executing the task. This method effectively saves storage space and enables efficient storage of massive user data. It effectively avoids the problem of database crash caused by excessive data volume, thereby greatly improving data security. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

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

[0040] Figure 2 A schematic diagram of a user data processing method provided in an embodiment of the present application;

[0041] Figure 3 A schematic diagram of a user data query method flow provided in an embodiment of the present application;

[0042] Figure 4 A diagram of a user data processing device provided in an embodiment of the present application;

[0043] Figure 5 A diagram of a user data query device provided in an embodiment of the present application;

[0044] Figure 6 A hardware schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0047] Although the existing high-availability task recording mechanism mainly relies on the combination of cache and database, in actual application scenarios, this mechanism is often difficult to fully meet the requirements of efficient and stable use. Especially in relational database environments, as the amount of data continues to grow, a series of challenges have gradually emerged, including decreased data processing speed, long query and statistical operations, huge resource consumption, and the resulting user response delays, which may even trigger database performance bottlenecks and increase the risk of crashes. In order to meet these challenges, the following two optimization strategies are currently commonly used to save task data:

[0048] Cache optimization strategy: By introducing a cache mechanism, such as Redis or Memcached, to store commonly used data or query results, this strategy can greatly reduce the number of direct database accesses, increase data reading speed, and thus speed up user response.

[0049] Database optimization strategy: Optimize the database itself, including but not limited to index optimization, query optimization, partition table design, read-write separation, etc. These strategies are designed to improve the data processing efficiency within the database, reduce resource consumption, and ensure the stability and performance of the database in high-concurrency scenarios.

[0050] Although the cache optimization strategy and database optimization strategy in current technology can improve the performance of high-availability task recording mechanism, they also have their own shortcomings. The cache strategy may cause data inconsistency, cache penetration, avalanche and breakdown, increasing the complexity and maintenance cost of the system. Database optimization may require high-cost hardware support, involving complex index design, query optimization and other technologies, which limits the flexibility and scalability of the system. In addition, as the amount of data grows, database expansion and maintenance also face challenges.

[0051] In order to solve the above problems, the present application provides a user data processing method, in which a plurality of Bloom filters with date and task as primary keys are used in a database to record users who complete tasks on the same day. When a user terminal participates in a task through an application, the corresponding task data is obtained, and the task data includes the identification of the task and the preset time period to which the task completion time belongs. According to the task data, the Bloom filter corresponding to the task in the database is determined, wherein a Bloom filter group is deployed in the database, and the Bloom filter group includes multiple Bloom filters, each of which corresponds to a task within the preset time period. The Bloom filter is used to record the task status of the user terminal executing the task. Even in the case of a large number of users, the user's completion status can be accurately recorded. More importantly, only one piece of data needs to be saved every day, which greatly saves storage space and enables mass data to be stored efficiently. In terms of data query and deduplication, the present invention also shows significant performance improvement, effectively avoiding the problem of database crash caused by excessive data volume, thereby greatly improving data security.

[0052] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1As shown, when user terminal A participates in a task in an application, the server obtains Task 1 data, including the date when user terminal A completes Task 1, and the identifier of Task 1. The corresponding Bloom filter in the database is searched according to Task 1 data. After finding the corresponding Bloom filter, the Bloom filter updates the status of user terminal A completing the task on the corresponding multiple bits in the array of the specified number of subscript bits through a hash algorithm according to the user identifier corresponding to user terminal A. Specifically, the values ​​of multiple bits are updated from 0 to 1 at the same time. After the update is completed, the server can also send the update information to the application so that the application can actively display the status of the task completion to user terminal A through a page list or the like.

[0053] When the application sends a request to query whether user terminal A has completed task 1, the server responds to the query request, obtains the task 1 data corresponding to the query request, and determines the Bloom filter corresponding to task 1 in the database based on the task 1 data. In the task 1 Bloom filter, the positions of multiple bits corresponding to the user identification of user terminal A are obtained through a hash algorithm, and when it is determined that the values ​​of the multiple bits are all 1, it means that user terminal A has completed task 1. After obtaining the query result, the server returns the completed result to the application.

[0054] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0055] Figure 2 This is a flow chart of the user data processing method provided in the embodiment of the present application. Figure 2 As shown, the method includes:

[0056] S201. When a user terminal participates in a task through an application program, corresponding task data is obtained.

[0057] The task data includes the task identifier and the preset time period to which the task completion time belongs.

[0058] In this step, when the user participates in the task through the application, the server needs to identify and obtain the identification information of the task and the preset time period to which the task completion time belongs. The task identification is important information to distinguish different tasks, similar to the "ID number" of each task. The preset time period can refer to time dimensions such as day, month or year. Its purpose is to disperse tasks into different filtering tools to prevent data collision and excessive concentration. Exemplarily, when the preset time period is a date, when the user terminal completes the task at a certain time point on a certain day, the preset time period to which the task completion time belongs is the date of that day. Therefore, the preset time period also represents the time dimension information created by the filtering tool, and each filtering tool corresponds to a task within the preset time period.

[0059] S202: Determine, according to the task data, a filtering tool corresponding to the task in a database.

[0060] A filtering tool group is deployed in the database, and the filtering tool group includes a plurality of filtering tools, each of which corresponds to a task within the preset time period.

[0061] In this step, the server will use the task data to locate the corresponding filter tool in the database. In the database, a group of filter tools is pre-set, and each filter tool is associated with the task completion status record of a specific time period. The filter tool is a highly space-efficient data structure used to test whether an element belongs to a set. It tests the existence of an element through one or more hash functions, and can return whether an element may belong to a set with very high accuracy, and maintain efficient query performance even when the number of elements is very large. To determine the corresponding filter tool, it is necessary to search according to the preset time period of the task completion time. For example, if the task completion time is the date corresponding to a certain day, then find the filter tool responsible for this date. An index table can be maintained in the database to record the time period managed by each filter tool and the filter itself.

[0062] Exemplarily, the filtering tool may be a data structure that can record whether a user has completed a specific task and help retrieve and update this information in a database, such as a Bloom filter, a hash table, or a bitmap.

[0063] Exemplarily, the filtering tool is a Bloom filter, and before determining the filtering tool corresponding to the task in the database, the method further includes:

[0064] Acquire a task list corresponding to the preset time period, the task list including at least one task corresponding to the application within the preset time period, and an identifier corresponding to each task;

[0065] According to the task list, a Bloom filter corresponding to each task is created, wherein the Bloom filter is distinguished by an identifier of the corresponding task and a preset time period.

[0066] It should be noted that the task list is a list of tasks that the application needs the user to perform within a preset period of time, and each task has a unique identifier. By obtaining the task list corresponding to the preset period of time, the tasks that the application needs the user to perform within the preset period of time are clearly identified. According to the tasks in the list, a corresponding Bloom filter is created. For example, the server constructs a Bloom filter corresponding to the task within the preset period of time in the database based on the date and task identifier every day. Furthermore, a Bloom filter of a corresponding array size can be adapted for it according to the user scale and business requirements.

[0067] Exemplarily, creating a Bloom filter corresponding to each task according to the task list includes:

[0068] Obtain the number of users corresponding to each task in the task list;

[0069] According to a preset relationship, a target false positive rate and the number of users, the storage capacity of the Bloom filter corresponding to each task is obtained, wherein the preset relationship is used to indicate a mapping relationship between the target false positive rate, the number of users and the storage capacity of the Bloom filter, and the target false positive rate is used to indicate the probability that the Bloom filter judges an unfinished task on the user end as a completed task;

[0070] Create a Bloom filter for each task's corresponding storage capacity.

[0071] It should be noted that when constructing a Bloom filter, one or more hash functions will be determined and a sufficiently large array will be selected. The size of the array is related to the number of elements stored and the allowed false positive rate, that is, the array size is proportional to the number of elements and inversely proportional to the false positive rate. The mapping relationship between the target false positive rate, the number of users and the storage capacity of the Bloom filter can be determined based on actual scenarios and experiments, and before creating a Bloom filter, the corresponding storage capacity is determined according to the preset preset relationship based on the number of users and the target false positive rate required by the business. For example, taking 1 million users as an example, if a Bloom filter with a false positive rate of less than 5% and capable of accommodating 1 million users is to be constructed, the required space is approximately 875KB. Therefore, recording the information of all users completing the task within one day only takes up 875KB of storage space.

[0072] S203: Use the filtering tool to record the task status of the user terminal executing the task.

[0073] The task status is used to record whether the user terminal has completed the task.

[0074] In this step, when the user completes a task, the system will update the information in the corresponding filtering tool to indicate that the task has been completed. The process of updating the information can be to update the values ​​of multiple bits on the array in the filtering tool to specific values. In the creation of the aforementioned filtering tool, each bit in the array can be initialized to a specific initial value, such as 0. When updating the information, each hash function maps an element to a certain position in the array and updates the value of the position to a specific value, such as 1. This element can be user information, such as a user ID, etc.

[0075] Exemplarily, the Bloom filter includes: an array of a preset size and a hash transformation module;

[0076] The hash transformation module is used to encode according to the identifier of the user terminal to obtain the key of the task corresponding to the user terminal; according to the state of the task corresponding to the user terminal and the number of bits of the array, update the values ​​corresponding to multiple bits in the array so that the values ​​obtained by updating the multiple bits correspond to the task state of the task.

[0077] It should be noted that the array of preset size represents the storage capacity of the Bloom filter, which is used to store bit data. The hash transformation module is responsible for converting the user's identification (such as a user ID) into a key in the Bloom filter through a series of hash functions. When a user participates in and completes a task, the corresponding key is obtained through the hash function according to the user's identity, and the value of the number of bits specified by this key in the Bloom filter is updated. For example, the value of the specified number of bits is updated from 0 to 1.

[0078] When the number of bits corresponding to the key is obtained through the hash algorithm, it can be determined through the modulus operation. In the Bloom filter, the length of the bit array of the Bloom filter is determined, and the modulus operation is performed on the hash value calculated by each hash function, that is, the remainder of the hash value divided by the length of the bit array, which represents the position in the bit array. The position obtained by the modulus operation is set to a specific value in the bit array. The use of modulus operation in the Bloom filter is to effectively map the hash value to a fixed-length bit array, so that in subsequent query operations, it can quickly locate whether the element may exist in the set. Since the Bloom filter can use multiple hash functions, each element may correspond to multiple positions, which greatly reduces the probability of hash collisions and improves the efficiency of queries. However, this also means that the judgment of the Bloom filter may not be absolutely accurate, and there is a certain misjudgment rate.

[0079] It should be noted that the user terminal identifier can be obtained together with the aforementioned task data acquisition, or can be obtained separately when matching the corresponding Bloom filter for storage, and there is no limitation here.

[0080] The user data processing method provided in the embodiment of the present application adopts a plurality of filtering tools with date and task as primary keys in the database to record users who complete tasks on the same day. When a user terminal participates in a task through an application, the corresponding task data is obtained, and the task data includes the identifier of the task and the preset time period to which the task completion time belongs. According to the task data, the filtering tool corresponding to the task in the database is determined, wherein a filtering tool group is deployed in the database, and the filtering tool group includes multiple filtering tools, each of which corresponds to a task within the preset time period. The filtering tool is used to record the task status of the user terminal executing the task. This method effectively saves storage space and enables efficient storage of massive user data. It effectively avoids the problem of database crash caused by excessive data volume, thereby greatly improving data security.

[0081] Figure 3 A flowchart of a user data query method provided by an embodiment of the present application. The database is deployed with a filter tool group, the filter tool group includes multiple filter tools, each of the filter tools corresponds to a task within the preset time period, and the filter tool is used to record the task status of the user terminal executing the task. Figure 3 As shown, the method includes:

[0082] S301. In response to a query request, obtain target task data corresponding to the query request.

[0083] The target task data includes the task identifier and the preset time period to which the target query time belongs.

[0084] In this step, the application may automatically initiate a query request periodically or under specific conditions (such as user login, task reward issuance, user repeated clicks to participate in tasks, etc.) to confirm whether the user has completed the task. For example, the application may query all tasks completed by the user in the previous day when synchronizing data in the early morning of each day. The system needs to find the corresponding task identifier and time range based on the query request in order to further query the task completion status. When the application initiates a query request, the request will carry the identifier of the task to be queried and the preset time period to which the target query time belongs. For example, a request is made to query whether the user has completed the task "Task001" on a certain date.

[0085] S302: Determine, according to the target task data, a filtering tool corresponding to the task in a database.

[0086] S303, based on the task status of the task executed by the user terminal recorded by the filtering tool, obtaining the query result corresponding to the query request, and returning the query result, wherein the query result is used to indicate whether the user terminal has completed the task.

[0087] It should be noted that, according to the task identifier and time range in the query request, the corresponding task filtering tool in the database is located. For example, according to the query request of the application, the filtering tool corresponding to the date and "Task001" in the database is located. Further, the server uses the identifier of the user end to find the corresponding position in the filtering tool and check the values ​​of these positions. Finally, the server returns the query result to the application. Further, for example, according to the query result, the application can update the user's task completion status and further process subsequent operations such as reward issuance and data statistics.

[0088] Exemplarily, the filtering tool is a Bloom filter, and the step of recording the task status of the user terminal executing the task based on the filtering tool and obtaining the query result corresponding to the query request includes:

[0089] Determine, according to the key of the client corresponding to the task, values ​​of a plurality of bits corresponding to the array of the Bloom filter;

[0090] If the task status corresponding to the values ​​of the plurality of bits indicates completion, the query result is that the user terminal has completed the task;

[0091] If the task status corresponding to the values ​​of the plurality of bits indicates that the task is not completed, it indicates that the query result is that the user terminal has not completed the task.

[0092] It should be noted that, corresponding to the storage process of the Bloom filter, each user terminal has a corresponding key in the Bloom filter, which represents the key of the task corresponding to the user terminal. The server locates the corresponding position in the Bloom filter array through this key. The values ​​of these positions represent the completion status of the user on the task. Exemplarily, if the values ​​of the corresponding positions are all 1, this means that the user has indicated that the task has been completed at these positions, so the query result determines that the user has completed the task. If at least one of the corresponding positions checked in the Bloom filter has a value of 0, it means that there is no record of the user completing the task at these positions, so the query result determines that the user has not completed the task.

[0093] The user data query method provided by the embodiment of the present application allows the application to efficiently query the status of the user's task completion without accessing the complete record. Through the filtering tool, it is possible to accurately and quickly check whether the user has completed the task, and the space efficiency is higher than the traditional database query. For applications that handle a large number of users and tasks, it effectively improves its response speed and ensures the security and stability of the data.

[0094] Figure 4 A diagram of a user data processing device provided in an embodiment of the present application; Figure 4As shown, the processing device 40 includes:

[0095] The first acquisition module 401 is used to acquire corresponding task data when the user terminal participates in a task through an application program, wherein the task data includes an identifier of the task and a preset time period to which the task completion time belongs;

[0096] A first processing module 402 is used to determine a filtering tool corresponding to the task in a database according to the task data, wherein a filtering tool group is deployed in the database, the filtering tool group includes a plurality of filtering tools, and each filtering tool corresponds to a task within the preset time period;

[0097] The first processing module 402 is further used to use the filtering tool to record the task status of the user terminal executing the task; wherein the task status is used to record whether the user terminal has completed the task.

[0098] Figure 5 A diagram of a user data query device provided in an embodiment of the present application; Figure 5 As shown, the database is deployed with a filtering tool group, the filtering tool group includes a plurality of filtering tools, each of the filtering tools corresponds to a task within the preset time period, the filtering tool is used to record the task status of the user terminal executing the task, and the query device 50 includes:

[0099] The second acquisition module 501 is used to respond to the query request and acquire the target task data corresponding to the query request, wherein the target task data includes the task identifier and the preset time period to which the query time belongs;

[0100] The second processing module 502 is used to determine a filtering tool corresponding to the task in a database according to the task data;

[0101] The second processing module 502 is also used to record the task status of the user terminal executing the task based on the filtering tool, obtain the query result corresponding to the query request, and return the query result, wherein the query result is used to indicate whether the user terminal has completed the task.

[0102] Figure 6 The hardware diagram of the electronic device provided in the embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device 60 provided in this embodiment includes: at least one processor 601 and a memory 602. The device 60 also includes a communication component 603. The processor 601, the memory 602 and the communication component 603 are connected via a bus 604.

[0103] In a specific implementation process, at least one processor 601 executes the computer-executable instructions stored in the memory 602, so that at least one processor 601 executes the above method.

[0104] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0105] In the above Figure 6 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0106] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

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

[0108] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method described above is implemented.

[0109] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0110] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0111] The division of the units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.

[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0113] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0114] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0115] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0116] So far, the technical solution of the present application has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments, and the above embodiments are only used to illustrate the technical solution of the present application rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A user data processing method, characterized in that: The method comprises: When a user terminal participates in a task through an application, corresponding task data is obtained, wherein the task data includes an identifier of the task and a preset time period to which the task completion time belongs; Determine, according to the task data, a filtering tool corresponding to the task in a database, wherein a filtering tool group is deployed in the database, the filtering tool group includes a plurality of filtering tools, and each filtering tool corresponds to a task within the preset time period; The filtering tool is used to record the task status of the user terminal executing the task; wherein the task status is used to record whether the user terminal has completed the task.

2. The user data processing method according to claim 1, characterized in that: The filtering tool is a Bloom filter, and before determining the filtering tool corresponding to the task in the database, the method further includes: Acquire a task list corresponding to the preset time period, the task list including at least one task corresponding to the application within the preset time period, and an identifier corresponding to each task; According to the task list, a Bloom filter corresponding to each task is created, wherein the Bloom filter is distinguished by an identifier of the corresponding task and a preset time period.

3. The user data processing method according to claim 2, characterized in that: The step of creating a Bloom filter corresponding to each task according to the task list includes: Obtain the number of users corresponding to each task in the task list; According to a preset relationship, a target false positive rate and the number of users, the storage capacity of the Bloom filter corresponding to each task is obtained, wherein the preset relationship is used to indicate a mapping relationship between the target false positive rate, the number of users and the storage capacity of the Bloom filter, and the target false positive rate is used to indicate the probability that the Bloom filter judges an unfinished task on the user end as a completed task; Create a Bloom filter for each task's corresponding storage capacity.

4. The user data processing method according to claim 3, characterized in that: The Bloom filter includes: an array of a preset size and a hash transformation module; The hash transformation module is used to encode according to the identifier of the user terminal to obtain the key of the task corresponding to the user terminal; according to the state of the task corresponding to the user terminal and the number of bits of the array, update the values ​​corresponding to multiple bits in the array so that the values ​​obtained by updating the multiple bits correspond to the task state of the task.

5. A user data query method, characterized in that: The database is deployed with a filtering tool group, the filtering tool group includes a plurality of filtering tools, each of the filtering tools corresponds to a task within a preset time period, and the filtering tool is used to record the task status of the user terminal executing the task; The method comprises: In response to the query request, obtaining target task data corresponding to the query request, the target task data including a task identifier and a preset time period to which the target query time belongs; Determine, according to the target task data, a filtering tool corresponding to the task in a database; Based on the filtering tool, the task status of the user terminal executing the task is recorded, a query result corresponding to the query request is obtained, and the query result is returned, where the query result is used to indicate whether the user terminal has completed the task.

6. The user data query method according to claim 5, characterized in that: The filtering tool is a Bloom filter, and the step of recording the task status of the user terminal executing the task based on the filtering tool and obtaining the query result corresponding to the query request includes: Determine, according to the key of the client corresponding to the task, values ​​of a plurality of bits corresponding to the array of the Bloom filter; If the task status corresponding to the values ​​of the plurality of bits indicates completion, the query result is that the user terminal has completed the task; If the task status corresponding to the values ​​of the plurality of bits indicates that the task is not completed, it indicates that the query result is that the user terminal has not completed the task.

7. A user data processing device, characterized in that: The device comprises: A first acquisition module, used to acquire corresponding task data when a user terminal participates in a task through an application program, wherein the task data includes an identifier of the task and a preset time period to which the task completion time belongs; A first processing module is used to determine, according to the task data, a filtering tool corresponding to the task in a database, wherein a filtering tool group is deployed in the database, the filtering tool group includes a plurality of filtering tools, and each filtering tool corresponds to a task within the preset time period; The first processing module is further used to use the filtering tool to record the task status of the user terminal executing the task; wherein the task status is used to record whether the user terminal has completed the task.

8. A user data query device, characterized in that: The database is deployed with a filtering tool group, the filtering tool group includes a plurality of filtering tools, each of the filtering tools corresponds to a task within a preset time period, the filtering tool is used to record the task status of the user terminal executing the task, and the device includes: A second acquisition module is used to respond to the query request and acquire target task data corresponding to the query request, wherein the target task data includes a task identifier and a preset time period to which the target query time belongs; A second processing module, for determining a filtering tool corresponding to the task in a database according to the task data; The second processing module is also used to record the task status of the user terminal executing the task based on the filtering tool, obtain the query result corresponding to the query request, and return the query result, wherein the query result is used to indicate whether the user terminal has completed the task.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program, when running, executes the user data processing method according to any one of claims 1 to 4 and / or the user data query method according to any one of claims 5 to 6.

10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the user data processing method according to any one of claims 1 to 4 and / or the user data query method according to any one of claims 5 to 6 through the computer program.

Citation Information

Patent Citations

  • Message sending determination method and apparatus, and data table creation method and apparatus

    CN106970930A

  • Storage task breakpoint synchronization method and device, medium and equipment

    CN117743472A

  • Indexing partitions using distributed bloom filters

    US11531666B1

  • Efficient query optimization on distributed data sets

    US11816081B1

  • Session identification metrics through bloom filters

    US20200160401A1

Cited By

  • Universal parallel mass data processing method

    CN120407583A

  • A general parallel mass data processing method

    CN120407583B