The invention discloses a method for analyzing and storing redis for risk control anti-fraud ipv4. The method comprises the following steps: carrying out segmented disassembly and storage of an ip, storing the ip in the redis, and storing the ip in a hash form; dividing the ip into four segments A, B, C and D, wherein a starting ip is AsBsCsDs, a termination ip is AeBeCeDe, subscript s represents start, subscript e represents end, and according to allocated ip rules, the starting ip is changed into ABsCsDs and the termination ip is changed into ABeCeDe when a first bit A is the same; in ABCD, A represents a first segment, B represents a second segment, C represents a third segment, and D represents a fourth segment. According to the invention, ip segments are analyzed one by one and then stored, so that the problem that a large amount of memory space is occupied is caused; by splitting the segments, the analysis is greatly reduced, and the occupied memory space is reduced; in risk control anti-fraud services, the operation and transaction request of one client can be quickly judged through redis, and whether the operation and transaction request is in a blacklist or not is positioned.