US 12,229,802 B2
Efficient storage for segment store
Xingpeng Xiao, Beijing (CN); Yanhui Shi, Beijing (CN); Wen Luo, Beijing (CN); Mengyang Jiang, Beijing (CN); and Junhao Zhou, Beijing (CN)
Assigned to Beijing YoJaJa Software Technology Development Co., Ltd., Beijing (CN)
Filed by Beijing YoJaJa Software Technology Development Co., Ltd., Beijing (CN)
Filed on Jun. 20, 2023, as Appl. No. 18/338,290.
Application 18/338,290 is a continuation of application No. PCT/CN2023/097961, filed on Jun. 2, 2023.
Prior Publication US 2024/0403919 A1, Dec. 5, 2024
Int. Cl. G06Q 30/02 (2023.01); G06Q 30/0251 (2023.01)
CPC G06Q 30/0269 (2013.01) [G06Q 30/0254 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
analyzing, by a computing device, segments for segment lists associated with a plurality of user identifiers to generate an index of segments;
determining, by the computing device, a frequency of respective segments, wherein the frequency is based on a segment being included in one or more segment lists;
calculating, by the computing device, a first threshold for an array storage type based on at least the frequency of respective segments;
calculating, by the computing device, a second threshold for a run-length encoding storage type based on removing x segments from a bitmap storage type based on the x segments being less than or equal to the (first threshold/2)-1;
analyzing, by the computing device, a characteristic of a segment list for a user identifier;
comparing, by the computing device, the characteristic for the segment list to the first threshold and the second threshold, wherein the first threshold and the second threshold are used to determine which of the array storage type, the run-length encoding storage type, and the bitmap storage type to use to store a segment value for the user identifier;
selecting, by the computing device, a storage type from the array storage type, the run-length encoding storage type, and a bitmap storage type for the segment list based on the comparing to the first threshold and the second threshold, wherein the bitmap storage type is selected when the first threshold and the second threshold are not met;
storing, by the computing device, the segment value for the segment list and a type value in a value formate for a key in storage, wherein the segment value is stored using the storage type and the key is associated with the user identifier;
retrieving, by the computing device, the value format using the key for a request that is associated with the user identifier;
determining, by the computing device, a type value stored in the value format, wherein the type value indicates the storage type that was used to store the segment value;
calculating, by the computing device, the segment list using the storage type from the segment value of the value format; and
outputting, by the computing device, the segment list to respond to the request.