System and method for processing long relation chain data of user
AssigneeTencent Technology (Shenzhen) Company Limited
InventorHui Wang
Life of this patent
Estimating the term…
Abstract
A cache module responds to an operation request, from a front end, for long relation chain data of a user, and synchronously sends a modification request in the operation request to a receiving module; the receiving module receives the modification request from the cache module, and synchronously stores the modification request into an operation log file of a storage device; a saving module reads the modification request in the operation log file of the receiving module, and modifies the long relation chain data in a database (DB) according to the read modification request.
Claims16
A system for processing long relation chain data of a user, comprising a memory and a processor communicating with the memory, the memory being configured to store instructions that when executed by the processor configure the system to:
- cause a cache module of the memory to respond to an operation request, from a front end, for the long relation chain data of the user, and synchronously send a modification request in the operation request;
- receive the modification request from the cache module, and synchronously store the modification request into an operation log file of a non-memory storage device;
- and
- read the modification request in the operation log file, and modify the long relation chain data in a database (DB) according to the read modification request;
- wherein when being executed by the processor, the instructions further configure the system to:
- perform unit division for users, cause the cache module to distinguish a unit to which a user that initiates the modification request belongs, and to synchronously send the modification request and unit information of the user;
- correspondingly create at least one operation log file for each different unit separately, and synchronously receive and store the modification request into an operation log file of the unit corresponding to the modification request;
- correspondingly create different DBs for the different units according to the unit information, and during DB modification, modify long relation chain data in a DB of the unit corresponding to the modification request according to the read modification request;
- record, in the memory and for each unit, synchronization progress information of synchronous storage of the modification request, and feed back the synchronization progress information to the cache module;
- and during a machine restarting, scan, for each unit, an operation log file of the unit, restore synchronization progress information of the unit according to a latest operation log file of the unit, and feed back the synchronization progress information of the unit to the cache module;
- and
- cause the cache module to synchronously send, according to the progress information of each unit fed back, a modification request listed after a latest synchronized modification request of a corresponding unit.
A method for processing long relation chain data of a user, comprising:
- caching, by a cache module of the memory, an operation request, from a front end, for the long relation chain data of the user, and synchronously sending a modification request in the operation request to a receiving module;
- receiving, by the receiving module, the modification request from the cache module, and synchronously storing the modification request into an operation log file of a non-memory storage device;
- and
- reading, by a saving module, the modification request in the operation log file of the receiving module, and modifying the long relation chain data in the DB according to the read modification request;
- wherein the method further comprises:
- performing unit division for users, causing the cache module to distinguish a unit to which a user that initiates the modification request belongs, and to synchronously send the modification request and unit information of the user;
- correspondingly creating at least one operation log file for each different unit separately, and synchronously receiving and storing the modification request into an operation log file of the unit corresponding to the modification request;
- correspondingly creating different DBs for the different units according to the unit information, and during DB modification, modifying long relation chain data in a DB of the unit corresponding to the modification request according to the read modification request;
- recording, by the receiving module, synchronization progress information of synchronous storage of the modification request, and feeding back the synchronization progress information to the cache module;
- after the receiving module is shut down and restarted, scanning, for each unit, an operation log file of the unit, restoring synchronization progress information of the unit according to a latest operation log file of the unit, and feeding back the synchronization progress information of the unit to the cache module;
- and
- synchronously sending, by the cache module, according to the progress information of each unit fed back, a modification request listed after a latest synchronized modification request of a corresponding unit.
A non-transitory storage medium, configured to store a computer executable instruction, the computer executable instruction being used for controlling a processor to execute a method for processing long relation chain data of a user, and the method comprising:
- responding, by a cache module of the memory, an operation request, from a front end, for the long relation chain data of the user, and synchronously sending a modification request in the operation request to a receiving module;
- receiving, by the receiving module, the modification request from the cache module, and synchronously storing the modification request into an operation log file of a non-memory storage device;
- and
- reading, by a saving module, the modification request in the operation log file of the receiving module, and modifying the long relation chain data in the DB according to the read modification request;
- wherein the method further comprises:
- performing unit division for users, causing the cache module to distinguish a unit to which a user that initiates the modification request belongs, and to synchronously send the modification request and unit information of the user;
- correspondingly creating at least one operation log file for each different unit separately, and synchronously receiving and storing the modification request into an operation log file of the unit corresponding to the modification request;
- correspondingly creating different DBs for the different units according to the unit information, and during DB modification, modifying long relation chain data in a DB of the unit corresponding to the modification request according to the read modification request;
- recording, by the receiving module, synchronization progress information of synchronous storage of the modification request, and feeding back the synchronization progress information to the cache module;
- after the receiving module is shut down and restarted, scanning, for each unit, an operation log file of the unit, restoring synchronization progress information of the unit according to a latest operation log file of the unit, and feeding back the synchronization progress information of the unit to the cache module;
- and
- synchronously sending, by the cache module, according to the progress information of each unit fed back, a modification request listed after a latest synchronized modification request of a corresponding unit.
Dependencies are inferred from the claim text.