# US 2017/0286527 A1 · Redis key management method and system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0286527 A1
- Document ID: US20170286527A1
- Status: Published application
- Kind: A1
- Application number: 15/508,339
- Filed: 2016-02-16
- Published: 2017-10-05
- Earliest claimed: 2015-11-06
- Assignees: Wangsu Science & Technology Co., Ltd.
- Applicants: Wangsu Science & Technology Co., Ltd.
- Inventors: Yuting LI; Yangbin LIU; Yingwang CHEN
- Web page: https://patentgrep.com/patent/US20170286527A1

## CPC

- G06F 16/316: {Indexing structures}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 16/24556: {Aggregation; Duplicate elimination}
- G06F 16/2465: {Query processing support for facilitating data mining operations in structured databases}
- G06F 16/11: File system administration, e.g. details of archiving or snapshots (error detection or correction of the data by redundancy in operations G06F11/14)
- G06F 16/2272: {Management thereof}
- G06F 16/328: {Management therefor}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure provides a Redis Key management method, for managing and controlling Redis Keys generated by a same task in a streaming framework, the Redis Key management method including: packaging the Redis Keys generated by the same task and storing packaged Redis Keys in a same Key bucket; performing a duplicate-removal processing on Redis Keys, in the same Key bucket for being called by external data; and performing a batch deletion on Redis Keys after being called by external data. In the present disclosure, Redis Keys in the same task and located in the same partition may be stored in a Key bucket. Key buckets may be located, Duplicate-removal processing may be performed on the Redis Keys in the same Key bucket so that the Redis Keys can be called by external data. A batch deletion may be performed on the Redis Keys after being called by external data.

## Claims

### Claim 1

A Redis Key management method, configured for managing and controlling Redis Keys generated by a same task in a streaming framework, the Redis Key management method comprising:
packaging the Redis Keys generated by the same task and storing packaged Redis Keys in a same Key bucket;
performing a duplicate-removal processing on Redis Keys in the same Key bucket for being called by external data; and
performing a batch deletion on Redis Keys alter being called by external data.

### Claim 2 (depends on 1)

The Redis Key management method according to claim 1, wherein: the Redis Keys generated by the same task are stored in the same Key bucket in a form of a duplicate-removal set datatype.

### Claim 3 (depends on 1)

The Redis Key management method according to claim 1, wherein: the performing a duplicate-removal processing on Redis Keys in the same Key bucket for being called by external data includes:
separating a subset having a preset number of Redis Keys from the Key bucket on a regular basis;
performing a duplicate-removal processing on;each subset separated from the Key bucket, such that no duplicated Redis Keys are included in each subset; and
labeling a subset after the duplicate-removal processing for being called by external data.

### Claim 4 (depends on 3)

The Redis Key management method according to claim 3, wherein: lua scripting is configured to separate subset having a preset number of Redis Keys from the Key bucket and perform a duplicate-removal processing on each subset separated from the Key bucket, such that no duplicated Redis Keys are included in each subset; and when reaching a preset time interval for the duplicate-removal processing, a lua script is executed.

### Claim 5 (depends on 3)

The Redis Key management method according to claim 3, wherein: the performing a batch deletion on Redis Keys after being called by external data includes:
labeling Redis Keys called by external data in the subset; and
determining: if all Redis Keys included in the subset are called by external data on a regular basis, and delete all Redis Keys in the subset if all the Redis Keys in the subset are called by external data.

### Claim 6 (depends on 5)

The Redis Key management method according to claim 5, wherein: the performing a batch deletion on Redis Keys after being called by external data further includes:
when reaching a preset time interval for deletion each time, determining if the subset is in a pre-labeled deleting state, if in the pre-labeled deleting state, further determining a length value of the subset, and when the length value of the subset is equal to zero or the length value of the subset is equal to a pre-recorded number of Redis Keys in the subset called by external data, deleting all the Redis Keys in the subset.

### Claim 7 (depends on 5)

The Redis Key management method according to claim 5, wherein: the Redis Keys in the subset called by external data are recorded in arrays.

### Claim 8 (depends on 7)

The Redis Key management method according to claim 7, wherein: a pipeline technique in Redis is used to, perform the batch deletion of Redis Keys.

### Claim 9

A Redis Key management system, configured for managing and controlling Redis Keys generated by a same task in a streaming framework, the Redis Key management system comprising:
a Key bucket storing module, configured for packaging Redis Keys generated by a same task and storing packaged Redis Keys in a same Key bucket;
a data duplicate-removal module, connected with the Key bucket storing module, configured for performing a duplicate-removal processing in Redis Keys in the same Key bucket for being called by external data; and
a data deletion module, connected with the data. duplicate-removal module, configured for performing a batch deletion on Redis Keys after being called by external data.

### Claim 10 (depends on 9)

The Redis Key management system according to claim 9, wherein: the Key bucket storing module packages the Redis Keys generated by a same task and stores packaged Redis Keys in a same Key bucket in a form of a duplicate-removal set datatype.

### Claim 11 (depends on 9)

The Redis Key management system according to claim 9, wherein: the data duplicate-removal module includes:
a subset separating unit, configured for separating a subset having a preset number of Redis Keys from the Key bucket on a regular basis;
a separation timing unit, connected with the subset separating unit, configured for setting a time interval for an execution of the subset separating unit each time;
a duplicate-removal processing unit, connected with the subset separating unit and the separation timing unit respectively, configured for performing a duplicate-removal processing each subset separated from the Key bucket such that no duplicated Redis Keys are included in each subset; and
a subset labeling unit, connected with the duplicate-removal processing unit, configured for labeling a subset after the duplicate-removal processing for being called by external data.

### Claim 12 (depends on 11)

The Redis Key management system according to claim 11, wherein: the subset separating unit, the separation timing unit, and the duplicate-removal processing unit are implemented through lua scripting, and when reaching a preset time interval for duplicate-removal processing, a lua script is executed.

### Claim 13 (depends on 11)

The Redis Key management system according to claim 11, wherein; the data deletion module includes:
a recording unit, connected with the subset labeling unit, configured for labeling Redis Keys in the subset called by external data;
a determining unit, connected with the subset labeling unit, the recording unit, and a deletion timing unit respectively, configured for determining if all Redis Keys in the subset are called by external data;
the deletion timing unit, connected with the determining unit, configured for setting a time interval for an execution of the determining unit each time; and
a deletion unit, connected with the determining unit, configured for deleting all the Redis Keys in the subset when all the Redis Keys in the subset are called by external data.

### Claim 14 (depends on 13)

The Redis Key management system according to claim 13, wherein: the determining unit further includes:
deleting-state determining subunit, configured for determining if the subset is in a pre-labeled deleting state when each time reaching a preset the time interval for deletion:
a length-value determining subunit, connected with the deleting-state determining subunit, configured for determining if a length value of the subset is equal to zero or if the length value of the subset is equal to a pre-recorded number of Redis Keys in the subset called by external data, when the subset is in the pre-labeled deleting state; and
when die length value of the subset is equal zero or the length value of the subset is equal to the pre-recorded number of Redis Keys in the subset called by external data, all the Redis Keys in the subset are deleted by the deletion unit.

### Claim 15 (depends on 13)

The Redis Key management system according to claim 13, wherein the Redis Keys in the subset called by external data are recorded using arrays.

### Claim 16 (depends on 15)

The Redis Key management method according to claim 15, wherein: a pipeline technique in Redis is used to perform the hatch deletion of Redis Keys.
