Data processing method, device, electronic device and storage medium
By using a Bloom filter and bit array with cache and source storage integration, the method addresses resource limitations in data processing systems, enhancing operation determination accuracy and reducing resource usage.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2026-03-10
AI Technical Summary
Existing data processing systems face challenges in accurately determining user operations on entities with limited storage resources, leading to high misjudgment rates due to cache eviction and increased access traffic, which exacerbates false positives.
Employing a Bloom filter to process entity identifiers and store data in a bit array, combined with cache and source storage, to efficiently determine user operations, reducing resource occupation and improving accuracy.
The method significantly reduces cache occupancy and back-source service invocations while maintaining high determination accuracy, achieving over 99% accuracy with reduced resource usage.
Smart Images

Figure 2026508130000001_ABST
Abstract
Description
[Technical Field]
[0001] [CROSS-REFERENCE TO RELATED APPLICATIONS] This application is based on and claims priority from a Chinese application having application number 202310111187.1 and filing date February 3, 2023, the entire disclosure of which is incorporated herein by reference.
[0002] TECHNICAL FIELD Embodiments of the present disclosure relate to the field of computer technology, and in particular to data processing methods, devices, electronic devices, and storage media. [Background technology]
[0003] For some application platforms, there is a need to quickly determine whether a user has performed an operation on an entity. Related technologies often use a combination of cache lookup and backsource lookup to determine whether a user has performed an operation on an entity. As the number of users and entities increases, more storage resources are required to ensure high availability and accuracy of services. Summary of the Invention
[0004] According to a first aspect, an embodiment of the present disclosure comprises: Obtaining a first identifier of a target entity object; processing the first identifier through a predetermined function in a predetermined Bloom filter to obtain first data; determining whether a subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in a predetermined bit array; The data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with the predetermined function in response to the subject object performing the predetermined operation on the entity object.
[0005] According to a second aspect, an embodiment of the present disclosure comprises: a retrieval module for retrieving a first identifier of the target entity object; a processing module for processing the first identifier through a predetermined function in a predetermined Bloom filter to obtain first data; a checking module for determining whether a subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in a predetermined bit array; The data processing device further provides, in which the data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with the predetermined function in response to the subject object performing the predetermined operation on the entity object.
[0006] According to a third aspect, an embodiment of the present disclosure comprises: one or more processors; a storage device for storing one or more programs; The present invention further provides an electronic device that, when the one or more programs are executed by the one or more processors, causes the one or more processors to implement a data processing method described in any one of the embodiments of the present disclosure.
[0007] According to a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions that, when executed by a computer processor, cause the storage medium to perform the data processing method described in any one of the embodiments of the present disclosure.
[0008] According to a fifth aspect, an embodiment of the present disclosure further provides a computer program comprising instructions that, when executed by a processor, cause the processor to perform a data processing method according to any one of the embodiments of the present disclosure. [Brief explanation of the drawings]
[0009] These and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent by reference to the following detailed description taken in conjunction with the drawings, in which the same or similar elements are designated by the same or similar reference numerals throughout the drawings. It should be understood that the drawings are schematic and that the materials and elements are not necessarily drawn to scale. [Figure 1] 1 is a schematic diagram illustrating the flow of a data processing method according to an embodiment of the present disclosure. [Figure 2] 2 is a schematic diagram of a predetermined bit arrangement in a data processing method according to an embodiment of the present disclosure; [Figure 3] 1 is a flow block diagram of a data processing method according to an embodiment of the present disclosure. [Figure 4] 1 is a schematic diagram illustrating the flow of a data processing method according to an embodiment of the present disclosure. [Figure 5] FIG. 2 is a flow block diagram of writing data in a data processing method according to an embodiment of the present disclosure. [Figure 6] FIG. 2 is a flow block diagram of reading data in a data processing method according to an embodiment of the present disclosure. [Figure 7] FIG. 2 is a hierarchical schematic diagram of a predetermined bit arrangement in a data processing method according to an embodiment of the present disclosure. [Figure 8] 1 is a frame schematic diagram of processing a predetermined bit sequence in a data processing method according to an embodiment of the present disclosure; [Figure 9] 1 is a schematic diagram illustrating the configuration of a data processing device according to an embodiment of the present disclosure. [Figure 10] FIG. 1 is a schematic diagram illustrating the configuration of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0010] The following describes in more detail the embodiments of the present disclosure with reference to the drawings. Although the drawings illustrate several embodiments of the present disclosure, it should be understood that the present disclosure can be realized in various forms and should not be construed as being limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are merely illustrative and do not limit the scope of protection of the present disclosure.
[0011] It should be understood that the steps described in the method embodiments of the present disclosure may be performed in a different order and / or in parallel. Furthermore, method embodiments may include additional steps and / or omit performing steps as shown. The scope of the present disclosure is not limited in this respect.
[0012] As used herein, the term "comprises" and variations thereof are open-ended, meaning "including, but not limited to." The term "based on" means "based at least in part on." The term "in one embodiment" means "at least one embodiment," the term "in another embodiment" means "at least one other embodiment," and the term "in some embodiments" means "at least some embodiments." Relevant definitions of other terms are provided below.
[0013] It should be noted that the concepts of "first," "second," etc. described in this disclosure are merely intended to distinguish between different devices, modules, or units, and are not intended to limit the order or interdependence of functions performed by these devices, modules, or units.
[0014] It should be noted that the modifications of "one" and "plurality" described in the present disclosure are illustrative and not limiting. Unless otherwise specified, it is obvious to those skilled in the art that they should be understood as "one or plural."
[0015] As can be understood, before using the technical solutions disclosed in each embodiment of the present disclosure, the type, scope of use, and usage scenarios of the personal information related to the present disclosure should be informed to users in an appropriate manner in accordance with relevant laws and regulations, and their approval should be obtained.
[0016] As a result of analyzing related technologies, it was found that when storage resources are tight, data in the cache is easily evicted, resulting in a high rate of misjudgment, and high access traffic to the source storage also puts stress on the storage service, making misjudgment more likely to occur due to factors such as jitter. Embodiments of the present disclosure provide a data processing method, device, electronic device, and storage medium that can increase the accuracy of judgment when storage resources are limited.
[0017] 1 is a schematic diagram illustrating the flow of a data processing method according to an embodiment of the present disclosure. The embodiment of the present disclosure is applied to checking whether a subject object has performed a certain operation on a target entity object. The method may be executed by a data processing device, which may be realized in the form of software and / or hardware, and which may be located in an electronic device, for example, a back-end server of an application platform.
[0018] As shown in FIG. 1, the data processing method according to this embodiment may include the following steps.
[0019] S110: Obtain a first identifier of the target entity object.
[0020] S120: Process the first identifier by a predetermined function in a predetermined bloom filter to obtain first data.
[0021] S130: Determine whether the subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in a predetermined bit array; The data in the predetermined bit array may include second data obtained by processing a second identifier of the entity object with a predetermined function in response to the subject object performing a predetermined operation on the entity object.
[0022] In the embodiments of the present disclosure, an object that can initiate a predetermined operation may be referred to as a subject object, and an object that allows a predetermined operation to be performed may be referred to as an entity object. Here, the subject object, entity object, and predetermined operation may be predefined according to a specific application scenario. For example, in a social situation, the subject object and entity object may both be account objects, and the predetermined operation may be operations such as following and reporting. For example, in a comment scenario, the subject object may be an account object, the entity object may be a comment, and the predetermined operation may be operations such as "liking" and "disliking."
[0023] Here, the target entity object may be considered as an entity object for which it is necessary to determine whether a given operation has currently been performed by a subject object. The first identifier of the target entity object may be considered as information that can uniquely represent the target entity object, and may be composed of at least one element of alphabets, numbers, special symbols, etc. As can be understood, the second identifier of the entity object and the first identifier of the target entity object are essentially the same, and when a certain entity object is determined as the target entity object for which it is necessary to currently determine, the second identifier may be referred to as the first identifier.
[0024] The Bloom filter may include at least one predetermined function. Here, the at least one predetermined function may include, for example, at least one hash function (e.g., a Hash function) and may be used to map information into a binary vector. Here, the number of dimensions of the vector obtained by mapping may be the same as the number of bits in the predetermined bit array, and the vector obtained by mapping may be stored using the predetermined bit array. Here, elements at each position in the predetermined bit array in its initial state may all be 0, and when storing the vector obtained by mapping, elements of the predetermined bit array at positions corresponding to dimensions in the vector that are 1 may be set to 1, and elements of the predetermined bit array at remaining positions may be kept 0. After determining a target dimension of the first data whose value is 1, if the values in the target dimension in the predetermined bit array are also all 1, the first data is considered to be stored in the predetermined bit array.
[0025] In an embodiment of the present disclosure, a corresponding Bloom filter may be created in advance for each operation of each subject object. When a subject object performs a certain operation on any entity object, a predetermined function of the corresponding Bloom filter may be employed to process a second identifier of the entity object to obtain second data. Here, the second data may be regarded as a binary vector. The second data may then be stored in a predetermined bit array corresponding to the Bloom filter, and the fact that the subject object performed the certain operation on the entity object may be recorded in the predetermined bit array. The process of storing the second data in the predetermined bit array may be regarded as a process of determining a target bit in the second data whose dimension value is 1 and setting the value of the bit corresponding to the target bit in the predetermined bit array to 1. For example, if the value of the fifth dimension of the second data is 1, after storing the second data in the predetermined bit array, the value of the fifth dimension (i.e., the fifth bit) of the predetermined bit array is also 1.
[0026] Here, the predetermined bit array may be stored in a storage space such as Redis. In one implementation, each operation of each subject object may correspond to a unique key. When storing the predetermined bit array, the key corresponding to the predetermined bit array may also be stored at the same time. This makes it possible to distinguish predetermined bit arrays corresponding to different subject objects and / or different operation actions.
[0027] Accordingly, after obtaining at least one target entity object, a process of checking whether the subject object has performed a predetermined operation on each target entity object using a Bloom filter may include: obtaining a Bloom filter and a predetermined bit array corresponding to the current subject object and the predetermined operation; processing a first identifier of each target entity object using a predetermined function of the Bloom filter to obtain each first data item, which may be viewed as a binary vector; and determining whether the subject object has performed the predetermined operation on each target entity object by checking whether an element of the predetermined bit array corresponding to a dimension of each first data item that is 1 is also 1.
[0028] In some embodiments, a dimension of the first data whose value is 1 is determined, and in response to the elements of the predetermined bit array corresponding to the dimension not being all 1, it is determined that the subject object has not performed the predetermined operation on the target entity object. Here, if the elements of the predetermined bit array corresponding to the dimension of the first data whose value is 1 are not all 1, it is determined that the subject object has not performed the predetermined operation on the target entity object, while if the elements of the predetermined bit array corresponding to the dimension of the first data whose value is 1 are all 1, it is determined that there is a high probability that the subject object has performed the predetermined operation on the target entity object.
[0029] For example, FIG. 2 is a schematic diagram of a predetermined bit array in a data processing method according to an embodiment of the present disclosure. Referring to FIG. 2, the predetermined bit array may be, for example, a 19-bit binary array. X may represent first data corresponding to a first identifier of target entity object A, and Y may represent first data corresponding to a first identifier of target entity object B. FIG. 2 illustrates elements in the predetermined bit array corresponding to a dimension of X that is 1, and elements in the predetermined bit array corresponding to a dimension of Y that is 1. If the elements in the predetermined bit array corresponding to the dimension of X that is 1 are not all 1, it can be determined that the subject object has not performed the predetermined operation on target entity object A. If the elements in the predetermined bit array corresponding to the dimension of Y that is 1 are all 1, it can be determined that there is a high probability that the subject object has performed the predetermined operation on target entity object B.
[0030] In the embodiments of the present disclosure, the number of bits in the predetermined bit array can be preset through experience or experimentation to ensure the accuracy of determining whether a subject object has performed a predetermined operation on a target entity object. Furthermore, the space efficiency and query efficiency of the Bloom filter are much higher than those of general algorithms, so that when memory resources are limited, it is possible to quickly and accurately determine whether a subject object has performed a predetermined operation on a target entity object.
[0031] In some alternative implementations, the subject object includes an account object, the entity object includes a content object, and the predetermined operation includes at least one of a "like" operation, a "dislike" operation, a forward, a comment, and a value attribute object transition.
[0032] Here, the content object may be a multimedia object including at least one mode of text, image, video, audio, etc. Here, the value attribute object transition may be considered as an operation in which an account object gives a tip to a content object. In addition to the predetermined operations disclosed above, an account object may also perform other predetermined operations on a content object, such as reporting, and this is not a complete list.
[0033] In related technologies, a method that combines a cache search and a back-source search is often adopted when determining whether an account object has performed an operation, such as a "like" or "dislike" operation, on a content object. For example, corresponding cache data and source storage data may be maintained based on the creation time of the content object. For example, operations on an associated account object of a content object created within the last 20 days may be stored in the cache, and operations on an associated account object of a content object created more than 20 days may be stored in the source storage space. By searching the cache data and the source storage data, it is possible to check whether an account object has performed a predetermined operation on a content object.
[0034] In the related art, as the number of account objects and content objects increases, if cache resources are limited, the internal data is easily evicted, resulting in a high false positive rate. In addition, the increasing back-source access traffic puts a great stress on the storage service of the source storage space, which is prone to false positives due to storage service jitter or request downgrades, further increasing the false positive rate.
[0035] Meanwhile, in these alternative implementations, a Bloom filter is a typical processing method for mapping large amounts of information with small amounts of data, and can process relatively large business requests with very little resource occupation, making it an excellent choice for sparse data, such as checking whether a subject object has performed a certain operation on a content object. By employing a Bloom filter to determine whether an account object has performed a certain operation on a content object, when storage resources are limited, it is possible to quickly and accurately determine whether a subject object has performed a certain operation on a target entity object, thereby reducing the occupation of cache resources and the invocation of backsource services.
[0036] A technical solution of an embodiment of the present disclosure includes obtaining a first identifier of a target entity object, processing the first identifier with a predetermined function in a predetermined Bloom filter to obtain first data, and determining whether a subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in a predetermined bit array, where the data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with the predetermined function in response to the subject object performing the predetermined operation on the entity object. A Bloom filter can map information to a bit array, which occupies less storage resources and has higher search efficiency than directly storing information. In an embodiment of the present disclosure, based on the storage status of the Bloom filter processing result in the corresponding predetermined bit array, it is possible to quickly and accurately determine whether a subject object has performed a predetermined operation on the target entity object even when storage resources are limited.
[0037] The embodiments of the present disclosure may be combined with the various alternative forms of the data processing method according to the above embodiments. The data processing method according to the present embodiments can combine data in a predetermined cache space or further combine data in a source storage space based on data in a predetermined bit array to jointly determine whether a subject object has performed a predetermined operation on a target entity object, thereby further improving the accuracy of the determination and still reducing the occupation of cache resources and the invocation of back-source services compared with conventional forms.
[0038] In the data processing method according to the embodiment of the present disclosure, determining whether a subject object has performed a predetermined operation on a target entity object based on a storage status of the first data in a predetermined bit array includes: The method may include determining that the subject object has not performed a predetermined operation on the target entity object if the first data is not stored in the predetermined bit array, and if the first data is stored in the predetermined bit array, determining a search identifier from the first identifier and the subject identifier of the subject object, and determining whether the subject object has performed the predetermined operation on the target entity object based on the storage status of the search identifier in the predetermined cache space, wherein the data in the predetermined cache space may include a storage identifier generated from the second identifier of the entity object and the subject identifier if the second data has already been stored in the predetermined bit array.
[0039] Between second data pieces obtained by processing different second identifiers using a predetermined function, the numerical values of at least some dimensions may be the same and may all be 1. As a result, when these second data pieces are stored in a predetermined bit array, a 1 at the same position in the predetermined bit array may correspond to multiple second data pieces. As the amount of second data pieces stored in the predetermined bit array increases, there is a possibility that a predetermined bit array element at a position corresponding to a dimension that is 1 in the second data pieces has already been set to 1 before the second data pieces are stored in the predetermined bit array, i.e., the second data pieces have already been stored in the predetermined bit array. In this case, a storage identifier may be generated from the second identifier of the entity object and the subject identifier of the subject object. For example, the two may be connected to a storage identifier according to a predetermined connection rule, and the storage identifier may be stored in a predetermined cache space, and a task of recording that the subject object has performed a predetermined operation on the entity object may be performed using the predetermined bit array.
[0040] Accordingly, when determining whether the subject object has performed the predetermined operation on the target entity object, a preliminary determination may be made based on the storage status of the first data in a predetermined bit array, and the preliminary determination step may include determining that the subject object has not performed the predetermined operation on the target entity object if the first data is not stored in the predetermined bit array. If the first data is stored in the predetermined bit array, it may be that the subject object has performed the predetermined operation on the target entity object, or that the subject object has performed the predetermined operation on another entity object, and may further be determined based on data in a predetermined cache space.
[0041] The step of further determining based on data in the specified cache space may include determining a search identifier from the first identifier and the subject identifier of the subject object, where the search identifier and the storage identifier are generated in the same manner, and when an entity object is determined to be the target entity object that currently needs to be determined, the storage identifier generated from the second identifier may be called the search identifier; determining that the subject object has not performed a specified operation on the target entity object if the search identifier is not stored in the specified cache space; and determining that the subject object has performed a specified operation on the target entity object if the search identifier is stored in the specified cache space.
[0042] In the embodiment of the present disclosure, by recording a storage identifier in a predetermined cache space, if it is not possible to determine whether a subject object has performed a predetermined operation on a target entity object based on the data in the predetermined bit array, additional basis for judgment can be provided, thereby increasing the accuracy of the judgment. Furthermore, compared to the conventional method of recording recent operation actions of all associated accounts of entity objects in the cache, this embodiment only needs to record the predetermined actions of the subject object on the entity object that have already been stored in the predetermined bit array in the predetermined cache space, thereby significantly reducing cache occupancy. Experiments have proven that this embodiment can reduce cache occupancy by at least 40% and cache access frequency by approximately 90% compared to the conventional method.
[0043] Also, in some further implementations, the data processing method includes: If the search identifier is not stored in the specified cache space, the method may further include determining whether the subject object has performed a specified operation on the target entity object based on the storage status of the search identifier in the specified source storage space, wherein the data in the specified source storage space includes a storage identifier generated from the second identifier of the entity object and the subject identifier in response to the subject object performing the specified operation on the entity object.
[0044] Because the validity period of data in a predetermined cache space is short, the storage identifier stored in the predetermined cache space may expire and be deleted. If a search identifier is not stored in a predetermined cache space, it is possible that the storage identifier corresponding to the search identifier has already been deleted. Therefore, in these further implementations, when a subject object performs a predetermined operation on an entity object, a storage identifier may be generated from the second identifier of the entity object and the subject identifier and stored in a predetermined source storage space. Here, the predetermined source storage space may include a storage space with a long storage validity period and whose internal data is unlikely to be automatically deleted.
[0045] Accordingly, if the search identifier is not stored in the predetermined cache space, a back-source search may be further performed, i.e., whether the search identifier is stored in the predetermined source storage space is searched for. If the search identifier is not stored in the predetermined source storage space, it is determined that the subject object has not performed the predetermined operation on the target entity object, and if the search identifier is stored in the predetermined source storage space, it is determined that the subject object has performed the predetermined operation on the target entity object.
[0046] In these further implementations, based on the predetermined bit array and the data in the predetermined cache space, it is possible to accurately determine whether the subject object has performed a predetermined operation on the target entity object, thereby significantly reducing the number of calls to the back-source service, avoiding stress on the storage service of the source storage, and ensuring the accuracy of the determination based on the data in the source storage space. Based on the data in the predetermined bit array, the data in the predetermined cache space and the data in the source storage space are combined to jointly complete the determination of whether the subject object has performed a predetermined operation on the target entity object, and the accuracy of the determination can be above 99%.
[0047] Illustratively, Figure 3 is a flow block diagram of a data processing method according to an embodiment of the present disclosure. As shown in Figure 3, the data processing method may include the following steps:
[0048] S301: Start the flow.
[0049] S302: Obtain a first identifier of at least one target entity object.
[0050] S303: Obtain a Bloom filter corresponding to the subject object and a predetermined operation. If the acquisition is successful, jump to S304, and if the acquisition fails, jump to S307.
[0051] S304: For each target entity object, process the first identifier through a predetermined function in the Bloom filter to obtain first data.
[0052] S305: Determine whether the first data is stored in a predetermined bit array, and if YES, jump to S306, and if NO, jump to S309.
[0053] S306: Determine whether the search identifier determined from the first identifier and the subject identifier of the subject object is stored in a predetermined cache space, and if YES, jump to S308, and if NO, jump to S307.
[0054] S307: Determine whether the search identifier determined from the first identifier and the subject identifier of the subject object is stored in a predetermined source storage space; if YES, jump to S308; if NO, jump to S309.
[0055] S308: Determine that the subject object has performed the predetermined operation on the target entity object, and jump to S310.
[0056] S309: Determine that the subject object has not performed the predetermined operation on the target entity object, and jump to S310.
[0057] S310: The flow is terminated.
[0058] If it is determined that the search identifier is stored in the specified source storage space but not in the specified cache space, it may be considered that the search identifier has been deleted from the specified cache space, but there is still a need to search for the search identifier. Therefore, at this time, the search identifier may be newly written to the specified cache space, which facilitates quick search for the search identifier the next time and reduces the amount of back-source access.
[0059] In this embodiment, the data in the predetermined bit array can support the majority of determinations of whether a predetermined operation has been performed on a target entity object, thereby reducing storage space occupation and increasing determination speed. Because the data in the predetermined cache space is highly read-efficient, determination speed can be ensured by first using the data in the predetermined cache space to support the predetermined bit array. Because the data in the predetermined source storage space has a long validity period, determination accuracy can be ensured by finally using the data in the predetermined source storage space to support the predetermined bit array and the predetermined cache space.
[0060] The technical solution of the embodiments of the present disclosure can combine data in a predetermined cache space or further combine data in a source storage space based on data in a predetermined bit array to jointly complete the judgment of whether a subject object has performed a predetermined operation on a target entity object, thereby further improving the accuracy of the judgment and still reducing the occupation of cache resources and the invocation of back-source services compared to conventional approaches. In addition, the data processing method according to the embodiments of the present disclosure belongs to the same disclosed concept as the data processing method according to the above embodiments, and technical details not described in detail in this embodiment may refer to the above embodiments, and the same technical features have the same beneficial effects in this embodiment and the above embodiments.
[0061] The embodiments of the present disclosure may be combined with each optional aspect of the data processing method according to the above embodiments. In the data processing method according to this embodiment, the second creation time of an entity object may represent to some extent the probability that it is the target entity object, and it may be considered that the smaller the difference between the second creation time and the current time, the greater the probability that the corresponding entity object is the target entity object.
[0062] In this embodiment, second data corresponding to entity objects whose second creation times and operation times are less than or equal to a first predetermined value are stored in a predetermined bit array, thereby recording a predetermined operation by a subject object on a recently created entity object in the predetermined bit array. Accordingly, when checking whether a subject object has performed a predetermined operation on a target entity object, recently created entity objects are more likely to be the target entity object. Therefore, based on the data in the predetermined bit array, most determinations that a subject object has performed a predetermined operation on a target entity object can be covered, thereby further reducing the occupation of storage resources. Based on this, storage identifiers corresponding to entity objects whose second creation times and operation times are greater than the first predetermined value are stored in a predetermined cache space, thereby recording a predetermined operation by a subject object on a not recently created entity object in the predetermined cache space. This effectively supplements the determination based on the predetermined bit array and further improves the accuracy of the determination.
[0063] 4 is a schematic diagram showing the flow of a data processing method according to an embodiment of the present disclosure. As shown in FIG. 4, the data processing method according to this embodiment may include the following steps:
[0064] S410: Obtain a first identifier and a first creation time of the target entity object.
[0065] S421: If the difference between the first creation time and the acquisition time at which the target entity object is acquired is less than or equal to a first predetermined value, process the first identifier according to a predetermined function in a Bloom filter corresponding to the subject object and a predetermined operation to obtain first data.
[0066] S431: Determine whether the subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in the predetermined bit array; The data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with a predetermined function when the subject object performs a predetermined operation on the entity object and the difference between a second creation time of the entity object and an operation time when the subject object performs the predetermined operation on the entity object is less than or equal to a first predetermined value.
[0067] S422: If the difference between the first creation time and the acquisition time is greater than a first predetermined value, a search identifier is determined from the first identifier and the subject identifier of the subject object.
[0068] S432: Determine whether the subject object has performed a predetermined operation on the target entity object based on the storage status of the search identifier in a predetermined cache space; The data in the predetermined cache space includes a storage identifier generated from the second identifier of the entity object and the subject identifier when a subject object performs a predetermined operation on an entity object and the difference between the second creation time of the entity object and the operation time is greater than a first predetermined value.
[0069] In the embodiment of the present disclosure, a first predetermined value (e.g., 90 days) may be preset according to the actual application scenario, thereby ensuring that an entity object whose second creation time and operation time are less than or equal to the first predetermined value is highly likely to be the target entity object. Therefore, whether to store the second data corresponding to the entity object in a predetermined bit array or to store the search identifier corresponding to the entity object in a predetermined cache space can be determined based on the first predetermined value, which can ensure the accuracy of the subsequent determination of whether the subject object has performed the predetermined operation on the target entity object and more rationally utilize storage resources.
[0070] In addition, the data in the predetermined cache space in this embodiment may also include a storage identifier generated from the second identifier of the entity object and the subject identifier if the second data has already been stored in the predetermined bit array. Accordingly, step S431 may include: determining that the subject object has not performed the predetermined operation on the target entity object if the first data is not stored in the predetermined bit array; and determining a search identifier from the first identifier and the subject identifier of the subject object if the first data is stored in the predetermined bit array, and determining whether the subject object has performed the predetermined operation on the target entity object based on the storage status of the search identifier in the predetermined cache space.
[0071] Furthermore, determining whether the subject object has performed a predetermined operation on the target entity object based on the storage status of the search identifier in a predetermined cache space may further include, if the search identifier is not stored in the predetermined cache space, determining whether the subject object has performed a predetermined operation on the target entity object based on the storage status of the search identifier in a predetermined source storage space, wherein the data in the predetermined source storage space includes a storage identifier generated from the second identifier of the entity object and the subject identifier in response to the subject object performing the predetermined operation on the entity object.
[0072] 5 is a flow block diagram of a data processing method according to an embodiment of the present disclosure for writing data, which may include the following steps:
[0073] S501: In response to a subject object executing a predetermined operation on an entity object, a flow is started.
[0074] S5021: A storage identifier is generated from the second identifier of the entity object and the subject identifier, and the storage identifier is stored in a predetermined source storage space, and the process jumps to S507.
[0075] S5022: Determine whether the difference between the second creation time and the operation time of the entity object is equal to or less than a first predetermined value, and if YES, jump to S503, and if NO, jump to S505.
[0076] S503: Obtain a Bloom filter corresponding to the subject object and a predetermined operation, and process the second identifier of the entity object according to a predetermined function in the Bloom filter to obtain second data.
[0077] S504: Determine whether the second data has already been stored in the predetermined bit array, and if YES, jump to S505, and if NO, jump to S506.
[0078] S505: A storage identifier is generated from the second identifier of the entity object and the subject identifier, the storage identifier is stored in a predetermined cache space, and the process jumps to S507.
[0079] S506: The second data is stored in a predetermined bit array, and the process jumps to S507.
[0080] S507: The flow is ended.
[0081] Furthermore, if storage fails when "storing the storage identifier in a specified source storage space," "storing the storage identifier in a specified cache space," or "storing the second data in a specified bit array," further asynchronous retries may be performed to improve disaster resistance when writing data.
[0082] 6 is a block diagram illustrating a flow of reading data in a data processing method according to an embodiment of the present disclosure. Fig. 6 illustrates a flow of checking whether a subject object has performed a predetermined operation on a target entity object based on the read data in a predetermined bit array, data in a predetermined cache space, or data in a predetermined source storage space in the data processing method. This flow may correspond to the flow of writing data shown in Fig. 5, and may include the following steps:
[0083] S601: Start the flow.
[0084] S602: Obtain a first identifier and a first creation time of at least one target entity object.
[0085] S603: For each target entity object, determine whether the difference between the first creation time and the acquisition time at which the target entity object was acquired is less than or equal to a first predetermined value; if YES, jump to S604; if NO, jump to S606.
[0086] S604: Process the first identifier according to a predetermined function in a Bloom filter corresponding to the subject object and a predetermined operation to obtain first data.
[0087] S605: Determine whether the first data is stored in a predetermined bit array, and if YES, jump to S606, and if NO, jump to S609.
[0088] S606: Determine whether the search identifier determined from the first identifier and the subject identifier of the subject object is stored in a predetermined cache space, and if YES, jump to S608, and if NO, jump to S607.
[0089] S607: Determine whether the search identifier is stored in the predetermined source storage space, and if YES, jump to S608, and if NO, jump to S609.
[0090] S608: Determine that the subject object has performed the predetermined operation on the target entity object, and jump to S610.
[0091] S609: Determine that the subject object has not performed the predetermined operation on the target entity object, and jump to S610.
[0092] S610: The flow is ended.
[0093] Furthermore, in the flow shown in FIG. 5, when "storing the storage identifier in a specified cache space," a validity period may be further added. Accordingly, in the flow shown in FIG. 6, if the data in the specified cache space has expired, it may be considered that the corresponding storage identifier has been automatically deleted from the specified cache space. At this time, it may be determined whether the subject object has performed a specified operation on the target entity object by directly determining whether the search identifier is stored in the specified source storage space. If it is determined that the search identifier is stored in the specified source storage space but not in the specified cache space, it may be considered that the search identifier has been deleted from the specified cache space, but there is still a need to search for the search identifier. Therefore, at this time, the search identifier may be newly written to the specified cache space. This facilitates quick search for the search identifier the next time and reduces the amount of backsource access.
[0094] In a technical solution of an embodiment of the present disclosure, second data corresponding to an entity object whose second creation time and operation time are less than or equal to a first predetermined value are stored in a predetermined bit array, thereby realizing recording of a predetermined operation by a subject object on a recently created entity object in the predetermined bit array. Accordingly, when checking whether a subject object has performed a predetermined operation on a target entity object, a recently created entity object is more likely to be the target entity object. Therefore, based on the data in the predetermined bit array, most determinations that a subject object has performed a predetermined operation on a target entity object can be covered, thereby further reducing the occupation of storage resources. Based on this, storage identifiers corresponding to entity objects whose second creation time and operation time are greater than the first predetermined value are stored in a predetermined cache space, thereby realizing recording of a predetermined operation by a subject object on a not recently created entity object in the predetermined cache space, which effectively supplements the determination based on the predetermined bit array and further improves the accuracy of the determination.
[0095] Furthermore, the data processing method according to the embodiments of the present disclosure belongs to the same disclosed concept as the data processing method according to the above embodiments, and technical details not described in detail in this embodiment may refer to the above embodiments, and the same technical features have the same beneficial effects in this embodiment and the above embodiments.
[0096] The embodiments of the present disclosure may be combined with various optional aspects of the data processing method according to the above embodiments. The data processing method according to this embodiment describes in detail the processing steps of expanding and reconstructing a predetermined bit array. By performing dynamic hierarchical expansion on a predetermined bit array instead of allocating an extremely large amount of space to each predetermined bit array from the beginning, it is possible to save storage resources and realize on-demand allocation of storage resources, as well as ensure the accuracy of determining whether a subject object has performed a predetermined operation on a target entity object based on the predetermined bit array. If the expansion of a predetermined bit array cannot be continued, the predetermined bit array can be reconstructed to erase unnecessary data from the predetermined bit array, thereby rationally utilizing storage resources in the predetermined bit array and improving the accuracy of determining whether a subject object has performed a predetermined operation on a target entity object based on the predetermined bit array.
[0097] A data processing method according to an embodiment of the present disclosure includes: If the filling rate of the predetermined bit array is greater than a second predetermined value, the method may further include determining the current number of layers of the predetermined bit array, determining the actual extension space of the next-level array of the predetermined bit array from the predetermined extension space corresponding to the current number of layers and the current available space of the subject object, and creating the next-level array from the actual extension space and using it to store the second data.
[0098] Because a 1 at the same position in a given bit array may correspond to multiple second data, clearing a 1 at a position in the given bit array may affect the determination of whether multiple entity objects have performed a given operation. Therefore, data in a given bit array should generally not be arbitrarily deleted. As more second data is written to the given bit array, the number of bits set to 1 in the given bit array increases, and the fill rate can be considered to be higher. When the fill rate of the given bit array increases to a certain extent, the possibility of first data being stored in the given bit array also increases, resulting in a higher error rate in determining whether a subject object has performed a given operation on a target entity object based on the data in the given bit array. In this case, to ensure the accuracy of the determination, more storage space must be consumed to create the given cache space, which supports the determination of the given bit array. This is disadvantageous for determination tasks when resources are limited.
[0099] In the embodiment of the present disclosure, a second predetermined value may be preset according to a specific application scenario, so that if the filling rate is greater than the second predetermined value, it can indicate that the error rate of determining whether the subject object has performed a specific operation on the target entity object based on the data in the specific bit array has reached the acceptable limit (e.g., 2.5%) for the application scenario. In this case, the specific bit array may be expanded.
[0100] In this embodiment, a dynamic hierarchical extension method may be employed to extend the predetermined bit array. For example, FIG. 7 is a hierarchical schematic diagram of the predetermined bit array in the data processing method according to the embodiment of the present disclosure. Referring to FIG. 7, the maximum number of hierarchical levels to which the predetermined bit array can be extended and the space of the predetermined bit array in each hierarchical level may be preset according to a specific application scenario. For example, in FIG. 7, the maximum number of hierarchical levels to which the predetermined bit array can be extended is four, and the first hierarchical level can store 500 elements, and the second to fourth hierarchical levels can each store 2500 elements, and each element can represent a predetermined operation performed by a subject object on an entity object.
[0101] In the scenario shown in FIG. 7, 500 elements in the first hierarchy can cover approximately 90% of the needs for determining whether a subject object has performed a given operation on a target entity object. 3,000 elements in the first and second hierarchy can cover approximately 97% of the needs for determining whether a subject object has performed a given operation on a target entity object. 5,500 elements in the first to third hierarchy can cover approximately 98% of the needs for determining whether a subject object has performed a given operation on a target entity object. 8,000 elements in the first to fourth hierarchy can cover approximately 99% of the needs for determining whether a subject object has performed a given operation on a target entity object. The maximum available space for each subject object can be considered to be the sum of the spaces for the given bit arrays in each hierarchy. For example, in FIG. 7, the maximum available space for the subject object is 8,000 elements.
[0102] Taking FIG. 7 as an example, the predetermined bit array may initially be an array of the first layer, and then arrays of the second, third and fourth layers may be created in sequence. This allows dynamic hierarchical extension of the predetermined bit array. Here, a corresponding second predetermined value may be set for each predetermined bit array of each layer. For example, dynamic hierarchical extension of the predetermined bit array can be performed as follows: The second data may be first stored in a predetermined bit array of the first layer; If the filling rate of the predetermined bit array of the first layer is greater than a second predetermined value corresponding to the layer, determining that the current layer number is the first layer; The space of the array of the next layer (i.e., the second layer) of the current layer number may be set as the predetermined extended space corresponding to the current layer number, and the difference between the maximum available space of the subject object and the filled space in the created predetermined bit array (i.e., the difference between 8000 and the filled space in the predetermined bit array of the first layer) may be set as the currently available space; To avoid wasting storage resources due to excessive expansion at one time, the actual expansion space (i.e., the space of the second-level array) is determined to be the smaller of the predetermined expansion space and the currently available space; It may also include creating an array in the next layer (that is, creating an array in the second layer) according to the actual extended space.
[0103] The above steps are then repeated to store the newly generated second data in a predetermined bit array in the second layer, and if the filling rate of the predetermined bit array in the second layer is greater than the corresponding second predetermined value, the predetermined bit array in the third layer may be extended. For the same reason, the above steps may be repeated again to determine whether the filling rate of the predetermined bit array in the third layer is greater than the corresponding second predetermined value, thereby extending the predetermined bit array in the fourth layer. This allows dynamic hierarchical extension of the predetermined bit array.
[0104] In this embodiment, the determination of whether the filling rate of the specified bit array is greater than the second specified value may occur each time before the second data is written to the specified bit array, may occur each time after the second data is written to the specified bit array, or may be made once every fixed time, and the trigger timing is not strictly limited here.
[0105] The embodiments of the present disclosure do not allocate an extremely large space for each predetermined bit array from the beginning, but instead perform dynamic hierarchical expansion for the predetermined bit array, which not only saves storage resources and realizes on-demand allocation of storage resources, but also ensures the accuracy of determining whether a subject object has performed a predetermined operation on a target entity object based on the predetermined bit array, and reduces the occupation of cache resources and the invocation of backsource services.
[0106] Also, in some alternative implementations, after determining the actual extension space of the next hierarchy array of a given bit array, The method may further include obtaining a previous reconstruction time of the predetermined bit array if the actual extended space does not meet the current writing space requirement of the second data, and reconstructing the predetermined bit array if the difference between the reconstruction time and the current time is equal to or greater than a third predetermined value.
[0107] Here, the fact that the actual expansion space does not meet the current write space requirement for the second data may be interpreted as indicating that expansion for the specified bit array cannot continue. Referring to the dynamic expansion flow for the specified bit array described above, when expansion for the second, third, and fourth layer arrays is complete, the current layer number is the fourth layer. Since the maximum number of layers allowed for expansion is four, if the fill rate of the specified bit array for the fourth layer is greater than the second predetermined value corresponding to that layer, the specified expansion space corresponding to the current layer number may be considered to be zero. Even if there is currently available space in the subject object, the actual expansion space obtained by taking the smaller of the two values remains zero. In this case, if the actual expansion space does not meet the current write space requirement for the second data and the acquired previous reconstruction time is empty, the first reconstruction for the specified bit array may be performed directly, and the reconstruction time may be recorded.
[0108] Here, performing an initial reconstruction of the specified bit array may include creating a new first-level specified bit array based on the sum of the filled spaces of the specified bit arrays of each created level; obtaining a third identifier of the reconstructed entity object in the specified source storage space, wherein the reconstructed entity object includes an entity object whose difference between the second creation time and the current reconstruction time is less than or equal to a first specified value and on which a specified operation has been performed by the subject object; processing the third identifier with a specified function to obtain third data; and storing the third data in the new first-level specified bit array.
[0109] By determining the reconstructed entity object based on the first predetermined value, the predetermined operation performed by the subject object on the recently created entity object can be recorded in the reconstructed predetermined bit array, thereby realizing rational use of storage resources in the predetermined bit array and improving the accuracy of determining whether the subject object has performed the predetermined operation on the target entity object based on the predetermined bit array.
[0110] After the first reconstruction of the given bit array is completed, the given bit array becomes a first-level array with a relatively large space, and at this time, the dynamic layer expansion step can still be performed.
[0111] At this time, the maximum number of layers that can be expanded and the space of the predetermined bit array of each layer other than the first layer may still refer to the predetermined values before reconstruction.
[0112] During the expansion of a predetermined bit array that has completed the initial reconstruction, if the actual expansion space does not meet the current write space requirements for the second data, the time of the previous reconstruction of the predetermined bit array may be obtained. If the difference between the reconstruction time and the current time is equal to or greater than a third predetermined value, the predetermined bit array may be reconstructed again. Here, the third predetermined value (e.g., 20 days) may be preset according to the actual application scenario. This controls the frequency of reconstruction and avoids frequent reconstruction of the predetermined bit array in a short period of time, which would waste resources.
[0113] In these selective implementation forms, if the extension to the specified bit array cannot be continued, the specified bit array is reconstructed to eliminate unnecessary data in the specified bit array, thereby realizing rational use of storage resources in the specified bit array and increasing the accuracy of determining whether the subject object has performed a specified operation on the target entity object based on the specified bit array.
[0114] 8 is a frame schematic diagram of processing a predetermined bit sequence in a data processing method according to an embodiment of the present disclosure. Referring to FIG. 8, the processing steps of expanding, reconstructing, etc. for the predetermined bit sequence may include the following steps:
[0115] S801: In response to second data being generated, a flow is initiated.
[0116] S802: Determine whether the filling rate of the predetermined bit array for the current number of layers is greater than the corresponding second predetermined value. If YES, jump to S803; if NO, jump to S809.
[0117] S803: The actual extension space of the next layer array of the predetermined bit array is determined from the predetermined extension space corresponding to the current layer number and the current available space of the subject object.
[0118] S804: Determine whether the actual expansion space meets the current write required space of the second data, if yes, jump to S805, if no, jump to S806.
[0119] S805: The next layer of array is created according to the actual extended space, and used to store the second data, and the process jumps to S810.
[0120] S806: Obtain the previous reconstruction time of the specified bit array, and determine whether the difference between the reconstruction time and the current time is greater than or equal to a third specified value. If YES, jump to S807; if NO, jump to S808.
[0121] S807: The predetermined bit array is reconstructed and used to store the second data, and the process jumps to S810.
[0122] S808: The second data may be discarded without being reconstructed for the predetermined bit sequence, and the process jumps to S810.
[0123] S809: The second data is stored in a predetermined bit array of the current layer number, and the process jumps to S810.
[0124] S810: The flow is terminated.
[0125] If the difference between the reconstruction time and the current time is less than a third predetermined value, reconstruction is not performed on the predetermined array, and the second data is not written to the predetermined bit array, but the storage identifier corresponding to the entity object may still be stored in the predetermined source storage space, thereby ensuring the normal execution of the task of determining whether the subject object has performed the predetermined operation on the target entity object.
[0126] The technical solutions of the embodiments of the present disclosure provide detailed descriptions of processing steps such as expansion and reconstruction of a predetermined bit array. By performing dynamic hierarchical expansion on a predetermined bit array, rather than allocating an extremely large amount of space to each predetermined bit array from the beginning, it is possible to not only save storage resources and realize on-demand allocation of storage resources, but also ensure the accuracy of determining whether a subject object has performed a predetermined operation on a target entity object based on the predetermined bit array. If the expansion of a predetermined bit array cannot be continued, the predetermined bit array can be reconstructed to erase unnecessary data from the predetermined bit array, thereby rationally utilizing storage resources in the predetermined bit array and improving the accuracy of determining whether a subject object has performed a predetermined operation on a target entity object based on the predetermined bit array.
[0127] Furthermore, the data processing method according to the embodiments of the present disclosure belongs to the same disclosed concept as the data processing method according to the above embodiments, and technical details not described in detail in this embodiment may refer to the above embodiments, and the same technical features have the same beneficial effects in this embodiment and the above embodiments.
[0128] 9 is a schematic diagram of a data processing device according to an embodiment of the present disclosure. The data processing device according to this embodiment is applied to a case where it is checked whether a subject object has performed a certain operation on a target entity object.
[0129] As shown in FIG. 9, a data processing device according to an embodiment of the present disclosure includes: an acquisition module 910 for acquiring a first identifier of the target entity object; a processing module 920 for processing the first identifier through a predetermined function in a predetermined Bloom filter to obtain first data; and a checking module 930 for determining whether the subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in the predetermined bit array; The data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with a predetermined function in response to the subject object performing a predetermined operation on the entity object.
[0130] In some alternative implementations, the inspection module: determining that the subject object has not performed the predetermined operation on the target entity object if the first data is not stored in the predetermined bit array; If the first data is stored in a predetermined bit array, the method may be used to determine a search identifier from the first identifier and the subject identifier of the subject object, and determine whether the subject object has performed a predetermined operation on the target entity object based on a storage status of the search identifier in a predetermined cache space; The data in the predetermined cache space includes a storage identifier generated from the second identifier of the entity object and the subject identifier if the second data has already been stored in the predetermined bit array.
[0131] In some alternative implementations, the inspection module further comprises: If the search identifier is not stored in the predetermined cache space, the search identifier may be used to determine whether the subject object has performed a predetermined operation on the target entity object based on the storage status of the search identifier in the predetermined source storage space; The data in the given source storage space includes a storage identifier generated from a second identifier of the entity object and the subject identifier in response to the subject object performing a given operation on the entity object.
[0132] In some alternative implementations, the acquisition module further comprises: may be used to obtain the first creation time of the target entity object; In response, the processing module: may be used to process the first identifier by a predetermined function if a difference between the first creation time and a fetch time at which the target entity object is fetched is less than or equal to a first predetermined value; The data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with a predetermined function when the subject object performs a predetermined operation on the entity object and the difference between a second creation time of the entity object and an operation time when the subject object performs the predetermined operation on the entity object is less than or equal to a first predetermined value.
[0133] In some alternative implementations, the processing module further comprises: may be used to determine a search identifier from the first identifier and the subject identifier of the subject object when the difference between the first creation time and the acquisition time is greater than a first predetermined value; In response, the inspection module: The search identifier may be used to determine whether the subject object has performed a predetermined operation on the target entity object based on the storage status of the search identifier in a predetermined cache space; The data in the predetermined cache space includes a storage identifier generated from the second identifier of the entity object and the subject identifier when a subject object performs a predetermined operation on an entity object and the difference between the second creation time of the entity object and the operation time is greater than a first predetermined value.
[0134] In some alternative implementations, the data processing device comprises: If the filling rate of the predetermined bit array is greater than a second predetermined value, determine the current number of layers of the predetermined bit array; Determine the actual extension space of the next layer of the predetermined bit array from the predetermined extension space corresponding to the current layer number and the current available space of the subject object; The memory device may further include an expansion module for creating a next-level array according to the actual expansion space and using it to store second data.
[0135] In some alternative implementations, the data processing device comprises: After determining the actual extension space of the next-level array of the predetermined bit array, if the actual extension space does not satisfy the current writing space requirement of the second data, obtain the previous reconstruction time of the predetermined bit array; The device may further include a reconstruction module for reconstructing the predetermined bit sequence when the difference between the reconstruction time and the current time is equal to or greater than a third predetermined value.
[0136] In some alternative implementations, the subject object includes an account object, the entity object includes a content object, and the predetermined operation includes at least one of a "like" operation, a "dislike" operation, a forward, a comment, and a value attribute object transition.
[0137] The data processing device according to the embodiments of the present disclosure can execute the data processing method according to any embodiment of the present disclosure, and has beneficial effects with the functional modules corresponding to the execution of the method.
[0138] The units and modules included in the above-described device are merely divided according to functional logic, and are not limited to the above divisions as long as they can achieve the corresponding functions. Furthermore, the specific names of the functional units are merely used for convenience to distinguish them from one another, and do not limit the scope of protection of the embodiments of the present disclosure.
[0139] Reference will now be made to FIG. 10 , which illustrates a schematic configuration diagram of an electronic device (e.g., a terminal device or server in FIG. 10 ) 1000 suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablets (PADs), portable multimedia players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG. 10 is merely an example and does not impose any limitations on the functionality and scope of use of the embodiment of the present disclosure.
[0140] 10, electronic device 1000 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate operations and processes according to programs stored in read-only memory (ROM) 1002 or programs loaded from storage device 1008 into random access memory (RAM) 1003. RAM 1003 further stores various programs and data necessary for the operation of electronic device 1000. Processing unit 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.
[0141] Typically, input devices 1006, including, for example, a touch screen, touch panel, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007, including, for example, a liquid crystal display (LCD), speaker, oscillator, etc.; storage devices 1008, including, for example, a magnetic tape, hard disk, etc.; and communication devices 1009 may be connected to the I / O interface 1005. The communication devices 1009 enable the electronic device 1000 to communicate wirelessly or via wires with other devices to exchange data. While FIG. 10 illustrates the electronic device 1000 with various devices, it should be understood that it is not intended to require the implementation or inclusion of all of the devices shown. More or fewer devices may alternatively be implemented or included.
[0142] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product, which includes a computer program embodied in a non-transitory computer-readable medium, the computer program including program code for performing the methods illustrated in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, it performs the functions defined above in the data processing methods of the embodiments of the present disclosure.
[0143] The electronic device according to the embodiments of the present disclosure belongs to the same disclosed concept as the data processing method according to the above embodiments, and the technical details not described in detail in this embodiment may be referred to the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0144] According to an embodiment of the present disclosure, a computer storage medium is provided, which stores a computer program, which, when executed by a processor, implements the data processing method according to the above embodiment.
[0145] Note that the computer-readable medium in this disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory (FLASH), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used in or in combination with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated at baseband or a data signal propagated as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take various forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transport a program used in or in connection with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium may be transmitted over any suitable medium, including, but not limited to, electrical wire, optical cable, RF (radio frequency), or the like, or any suitable combination thereof.
[0146] In some embodiments, clients and servers may communicate using any now known or later developed network protocol, such as HTTP (Hyper Text Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the World Wide Web (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any now known or later developed network.
[0147] The computer-readable medium may be included in the electronic device, or may be a standalone medium without being mounted on the electronic device.
[0148] The computer-readable medium has one or more programs stored therein, and when the one or more programs are executed by the electronic device, the electronic device The method includes obtaining a first identifier of the target entity object, processing the first identifier with a predetermined function in a predetermined Bloom filter to obtain first data, and determining whether the subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in a predetermined bit array, the data in the predetermined bit array including second data obtained by processing a second identifier of the entity object with the predetermined function in response to the subject object performing the predetermined operation on the entity object.
[0149] Computer program code for carrying out the operations of the present disclosure can be written using one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, and C++, as well as general procedural programming languages such as "C" or similar programming languages. The program code can execute entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer by any network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet Service Provider).
[0150] The flowcharts and block diagrams in the figures illustrate possible system architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment, or portion of code, which includes one or more executable instructions for implementing a specified logical function. It should be noted that in some alternative implementations, the functions depicted in the blocks may occur in a different order than depicted in the figures. For example, two successively shown blocks may be executed substantially in parallel, or, depending on the functionality, they may be executed in the reverse order. It should be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or operation, or by a combination of dedicated hardware and computer instructions.
[0151] The units according to the embodiments of the present disclosure may be realized by software or hardware. Here, the names of the units and modules may not necessarily limit the units and modules themselves.
[0152] The functions described herein above may be performed, at least in part, by one or more hardware logic units. For example, exemplary hardware logic components that may be used include, but are not limited to, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Parts (ASSPs), Systems on Chips (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0153] In the context of this disclosure, a machine-readable medium may be a tangible medium, capable of containing or storing a program used by or in connection with an instruction execution system, device, or apparatus. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples of machine-readable storage media include one or more wire-based electrical connections, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0154] According to one or more embodiments of the present disclosure, Obtaining a first identifier of a target entity object; processing the first identifier through a predetermined function in a predetermined Bloom filter to obtain first data; determining whether a subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in a predetermined bit array; The data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with the predetermined function in response to the subject object performing the predetermined operation on the entity object.
[0155] In some alternative implementations, determining whether a subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in a predetermined bit array as described above includes: If the first data is not stored in the predetermined bit array, determining that the subject object has not performed the predetermined operation on the target entity object.
[0156] In some alternative implementations, determining that the subject object has not performed the predetermined operation on the target entity object if first data is not stored in the predetermined bit array, as described above, comprises: determining a dimension of the first data that has a value of 1; and determining that the subject object has not performed the specified operation on the target entity object in response to the elements of the specified bit array corresponding to the dimension not being all 1.
[0157] In some alternative implementations, if the first data is stored in the predetermined bit array, determining a search identifier from the first identifier and a subject identifier of the subject object, and determining whether the subject object has performed the predetermined operation on the target entity object based on a storage status of the search identifier in a predetermined cache space; The data in the predetermined cache space includes a storage identifier generated from a second identifier of the entity object and the subject identifier if the second data has already been stored in the predetermined bit array.
[0158] In some alternative implementations, the method includes: If the search identifier is not stored in the predetermined cache space, determining whether a subject object has performed the predetermined operation on the target entity object based on a storage status of the search identifier in the predetermined source storage space; The data in the predetermined source storage space includes a storage identifier generated from a second identifier of the entity object and the subject identifier in response to the subject object performing the predetermined operation on the entity object.
[0159] In some alternative implementations, the method includes: obtaining a first creation time of the target entity object; Accordingly, processing the first identifier through a predetermined function in a predetermined Bloom filter as described above may include: processing the first identifier through the predetermined function if a difference between the first creation time and a fetch time at which the target entity object was fetched is less than or equal to a first predetermined value; The data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with the predetermined function when the subject object performs the predetermined operation on the entity object and the difference between a second creation time of the entity object and an operation time when the subject object performs the predetermined operation on the entity object is less than or equal to the first predetermined value.
[0160] In some alternative implementations, the method includes: If the difference between the first creation time and the acquisition time is greater than the first predetermined value, determining a search identifier from the first identifier and a subject identifier of the subject object, and determining whether the subject object has performed the predetermined operation on the target entity object based on a storage status of the search identifier in a predetermined cache space; The data in the specified cache space includes a second identifier of the entity object and a storage identifier generated from the subject identifier when the subject object performs the specified operation on the entity object and the difference between a second creation time of the entity object and the operation time is greater than the first specified value.
[0161] In some alternative implementations, the method includes: If the filling rate of the predetermined bit array is greater than a second predetermined value, determining the current number of layers of the predetermined bit array; determining an actual extension space of the next layer of the predetermined bit array from a predetermined extension space corresponding to the current layer number and a current available space of the subject object; The method further includes creating the next layer array according to the actual extended space and using the next layer array for storing the second data.
[0162] In some alternative implementations, After determining the actual extension space of the next-level array of the predetermined bit array, if the actual extension space does not satisfy the current write required space of the second data, obtaining the previous reconstruction time of the predetermined bit array; The method further includes reconstructing the predetermined bit sequence if a difference between the reconstruction time and the current time is equal to or greater than a third predetermined value.
[0163] In some alternative implementations, in response to the subject object performing the predetermined operation on the entity object, a second identifier of the entity object is processed by the predetermined function of a Bloom filter corresponding to the predetermined operation to obtain the second data.
[0164] In some alternative implementations, the subject object includes an account object, the entity object includes an account object or a content object, and the predetermined operation includes at least one of a "like" operation, a "dislike" operation, a forward, a comment, and a value attribute object transition.
[0165] a retrieval module for retrieving a first identifier of the target entity object; a processing module for processing the first identifier through a predetermined function in a predetermined Bloom filter to obtain first data; a checking module for determining whether a subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in a predetermined bit array; The data processing device includes a data processing device in which the data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with the predetermined function in response to the subject object performing the predetermined operation on the entity object.
[0166] The above is merely a description of preferred embodiments and the technical principles applied in the present disclosure. It is obvious to those skilled in the art that the scope of the present disclosure is not limited to the technical solution based on a specific combination of the above technical features, but should also include other technical solutions formed by any combination of the above technical features or features equivalent thereto within the scope of the concept of the above disclosure. For example, it also includes technical solutions formed by mutually replacing the above features with technical features having similar functions disclosed in the present disclosure (but not limited to those).
[0167] Also, although operations are described in a particular order, this should not be understood as requiring such operations to be performed in the particular order shown, or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above description, they should not be construed as limiting the scope of the present disclosure. Some features that are described in association with each embodiment may also be implemented in combination in a single embodiment. Rather, various features that are described in association with a single embodiment may also be implemented in multiple embodiments separately or in any suitable subcombination.
[0168] Although the present subject matter has been described in language specific to structural features and / or methodological operations, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or operations described above. Rather, the specific features and operations described above are merely example forms of implementing the claims.
Claims
1. Obtaining a first identifier of a target entity object; processing the first identifier with a predetermined function in a predetermined Bloom filter to obtain first data; determining whether a subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in a predetermined bit array; The data processing method, wherein the data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with the predetermined function in response to the subject object performing the predetermined operation on the entity object.
2. The step of determining whether the subject object has executed a predetermined operation on the target entity object based on the storage status of the first data in the predetermined bit array includes:
2. The data processing method of claim 1, further comprising: determining that the subject object has not performed the predetermined operation on the target entity object if the first data is not stored in the predetermined bit array.
3. Determining that the subject object has not performed the predetermined operation on the target entity object if the first data is not stored in the predetermined bit array, as described above, includes: determining a dimension of the first data that has a value of 1; 3. The data processing method of claim 1, further comprising: determining that the subject object has not performed the specified operation on the target entity object in response to the elements of the specified bit array corresponding to the dimension not being all 1.
4. The step of determining whether the subject object has executed a predetermined operation on the target entity object based on the storage status of the first data in the predetermined bit array includes: If the first data is stored in the predetermined bit array, determining a search identifier from the first identifier and a subject identifier of the subject object, and determining whether the subject object has performed the predetermined operation on the target entity object based on a storage status of the search identifier in a predetermined cache space; The data processing method according to any one of claims 1 to 3, wherein the data in the specified cache space includes a storage identifier generated from a second identifier of the entity object and the subject identifier if the second data has already been stored in the specified bit array.
5. If the search identifier is not stored in the predetermined cache space, determining whether a subject object has performed the predetermined operation on the target entity object based on a storage status of the search identifier in the predetermined source storage space; 5. The data processing method of claim 2, wherein the data in the specified source storage space includes a storage identifier generated from a second identifier of the entity object and the subject identifier in response to the subject object performing the specified operation on an entity object.
6. The method comprises: obtaining a first creation time of the target entity object; The step of processing the first identifier through a predetermined function in the predetermined Bloom filter as described above may include: processing the first identifier through the predetermined function if a difference between the first creation time and a fetch time at which the target entity object was fetched is less than or equal to a first predetermined value; 6. A data processing method according to claim 1, wherein the data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object using the predetermined function when the subject object performs the predetermined operation on the entity object and the difference between a second creation time of the entity object and an operation time when the subject object performs the predetermined operation on the entity object is less than or equal to the first predetermined value.
7. If the difference between the first creation time and the acquisition time is greater than the first predetermined value, determining a search identifier from the first identifier and a subject identifier of the subject object, and determining whether the subject object has performed the predetermined operation on the target entity object based on a storage status of the search identifier in a predetermined cache space; 7. The data processing method of claim 6, wherein the data in the predetermined cache space includes a second identifier of the entity object and a storage identifier generated from the subject identifier when the subject object performs the predetermined operation on the entity object and a difference between a second creation time of the entity object and the operation time is greater than the first predetermined value.
8. If the filling rate of the predetermined bit array is greater than a second predetermined value, determining the current number of layers of the predetermined bit array; determining an actual extension space of the next layer of the predetermined bit array from a predetermined extension space corresponding to the current layer number and a current available space of the subject object; 8. The data processing method according to claim 1, further comprising: creating an array of the next hierarchy in accordance with the actual extended space, and using the array to store the second data.
9. After determining the actual extension space of the next-level array of the predetermined bit array, if the actual extension space does not satisfy the current write required space of the second data, obtaining the previous reconstruction time of the predetermined bit array; 9. The data processing method of claim 8, further comprising: reconstructing the predetermined bit array if a difference between the reconstruction time and a current time is equal to or greater than a third predetermined value.
10. 10. The data processing method according to claim 1, further comprising, in response to the subject object performing the predetermined operation on the entity object, processing a second identifier of the entity object using the predetermined function of a Bloom filter corresponding to the predetermined operation to obtain the second data.
11. The data processing method according to any one of claims 1 to 10, wherein the subject object includes an account object, the entity object includes an account object or a content object, and the predetermined operation includes at least one of a "like" operation, a "dislike" operation, a forward, a comment, and a value attribute object transition.
12. a retrieval module for retrieving a first identifier of a target entity object; a processing module for processing the first identifier through a predetermined function in a predetermined Bloom filter to obtain first data; a checking module for determining whether a subject object has performed a predetermined operation on the target entity object based on the storage status of the first data in a predetermined bit array; The data in the predetermined bit array includes second data obtained by processing a second identifier of the entity object with the predetermined function in response to the subject object performing the predetermined operation on the entity object.
13. one or more processors; a storage device for storing one or more programs; An electronic device that, when the one or more programs are executed by the one or more processors, causes the one or more processors to implement the data processing method according to any one of claims 1 to 11.
14. A storage medium containing computer-executable instructions which, when executed by a computer processor, cause the data processing method of any one of claims 1 to 12 to be carried out.