CN106470150B - Relation chain storage method and device - Google Patents
Relation chain storage method and device Download PDFInfo
- Publication number
- CN106470150B CN106470150B CN201510519913.9A CN201510519913A CN106470150B CN 106470150 B CN106470150 B CN 106470150B CN 201510519913 A CN201510519913 A CN 201510519913A CN 106470150 B CN106470150 B CN 106470150B
- Authority
- CN
- China
- Prior art keywords
- user
- index
- public
- identification
- data entry
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a relation chain storage method and device, and belongs to the technical field of networks. The method comprises the following steps: receiving a user identifier concerning a public identifier; determining a target index and a first target offset address of the user identifier according to the user identifier and a data entry with the index as grouping information; determining a target storage address in the target data entry by taking the target index as an index and the first target offset address as an offset address; and storing the user identification and the attention state to a target storage address. According to the invention, the subscription users with public identifications are stored in groups by adopting a hierarchical storage mode, and the user identifications and the attention states of the subscription users are correspondingly stored in a unique position based on the established secondary indexes according to the user identifications of the subscription users and specific grouping information, so that a state marking function is provided for the subsequent changes of the user attention states and the like, and the high efficiency of operation is ensured and the data consistency can be ensured.
Description
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for storing a relationship chain.
Background
With the development of network technology, the functions of information service platforms become more and more powerful. The information service actually provides a processing platform for message transmission between users, and the premise for realizing the message transmission is that a relationship chain between the users is stored on the information service platform. For a user a and a user B who are both parties of message transmission, the user a has a plurality of friends, the user B also has a plurality of friends, and relationship chains of the users need to be maintained. The relational chain storage in the prior art is mainly based on a database approach: for example, all data corresponding to friends of a user are stored in a database, friend records in the database are inquired by using user identifications such as QQ (QQ) as primary keys, and a data structure of a linked list is constructed in a memory according to the database during management and maintenance, so that variable-length data operation is realized.
However, with diversification of information services, information service forms such as public identification have appeared. The merchant (i.e. side B) can transmit various notification messages, marketing messages or activity messages to the user (i.e. side C) through the public identification to accumulate the user, and the side C user can actively communicate with the merchant at side B, transmit uplink messages or actively pay attention to the offline operation activities to become a subscriber at side B. The information service form is accumulated along with time, so that the number of the subscription users corresponding to the public identification is larger and larger, the relationship chain of the public identification is longer and longer, and the relationship chain related to the huge number of the subscription users is called as a long relationship chain.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
for a long relationship chain, because the number of involved subscribing users is huge, if the existing storage mode is adopted, once a large number of relationship chain operations such as high concurrent access or addition, deletion and modification occur, the efficiency of the relationship chain operation is low, and the data consistency is difficult to ensure.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for storing a relationship chain. The technical scheme is as follows:
in one aspect, a method for storing a relationship chain is provided, where the method includes:
receiving a user identifier concerning a public identifier;
determining a target index and a first target offset address of the user identifier according to the user identifier and a data entry with an index as grouping information, wherein the data entry with the index as the grouping information comprises a plurality of types of grouping information of concerned users of the public identifier, and the target index is the grouping identifier of a group in which the user identifier is located;
determining a target storage address in a target data entry by taking the target index as an index and the first target offset address as an offset address;
and storing the user identification and the attention state to the target storage address.
In another aspect, there is provided a relationship chain storage device, the device comprising:
the receiving module is used for receiving a user identifier concerning a public identifier;
a determining module, configured to determine a target index and a first target offset address of the user identifier according to the user identifier and a data entry with an index as group information, where the data entry with the index as group information includes multiple types of group information of a user concerned with the public identifier, and the target index is a group identifier of a group where the user identifier is located;
a storage address determining module, configured to determine a target storage address in a target data entry by using the target index as an index and using the first target offset address as an offset address;
and the storage module is used for storing the user identification and the attention state to the target storage address.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
by adopting a hierarchical storage mode, the subscription users with public identifications are stored in groups, based on the established secondary index, the user identifications and the attention states of the subscription users are correspondingly stored in a unique position according to the user identifications and the specific grouping information of the subscription users, a state marking function is provided for the subsequent change of the user attention states and the like, the high efficiency of operation is guaranteed, meanwhile, the data consistency can be guaranteed, further, the storage mode can effectively save the storage space, the memory copy operation is reduced, and the overall performance is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a relationship chain storage method according to an embodiment of the present invention;
fig. 2 is a flowchart of a relationship chain storage method according to an embodiment of the present invention;
FIG. 3A is a schematic diagram of a storage format according to an embodiment of the present invention;
FIG. 3B is a schematic diagram of another storage format provided by an embodiment of the invention;
FIG. 4 is a block diagram of an information service system according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a relationship chain storage device according to an embodiment of the present invention;
fig. 6 is a block diagram of a relationship chain storage device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Information services refer to services related to information interaction, such as instant messaging services, social application services, and B2P (Business to Person).
Instant messaging: instant Messaging (IM) is a terminal service that allows two or more people to use a network to deliver text messages, files, voice and video in real time. The instant messaging can be divided into enterprise instant messaging and website instant messaging according to the use purpose, and can be divided into mobile phone instant messaging and Personal Computer (PC) instant messaging according to the bearing object, wherein the mobile phone instant messaging can represent short messages, and the PC instant messaging can represent website and video instant messaging.
The social application service is a terminal service and can provide services such as personal information display and information interaction among users.
Information: the method refers to objects transmitted and processed by audio, message and communication systems, and generally refers to all contents transmitted by human society, such as characters, pictures, voice, video and the like. People can recognize and reform the world by obtaining and identifying different information of the nature and the society to distinguish different things. In all communication and control systems, information is a form of universal association.
The C2C Message (client-to-client Message) in the present invention mainly refers to the information between instant messaging clients, which is usually the information mutually sent by the clients during the chat and communication process, and usually the messages need to be relayed by the server.
The present invention relates to a B2C Message (Business-to-Customer Message), which mainly refers to various information actively sent to an instant messaging terminal from a server, a merchant and a service provider, including multimedia information such as text, pictures, audio and video.
The invention relates to a C2B Message (client-to-Business Message), which mainly refers to various messages sent by a terminal user from a terminal to a merchant at a server end, wherein the messages belong to information of an uplink channel, and comprise multimedia information such as texts, pictures, audios and videos.
The social relationship chain refers to a point-to-point relationship between people, each person can be regarded as a node in a social group, and a connecting line between two points becomes a relationship chain. Relationship chains formed for an acquaintance relationship network may be referred to as strong relationship chains, and relationship chains formed based on hobbies, interests, and the like may be referred to as weak relationship chains or micro relationship chains.
The public identification is an application account number applied by a developer or a merchant on the information service platform, and the developer or the merchant can realize information push to vast users in an all-around manner or communication or interaction with the vast users on the information service platform through the public identification based on the modes of characters, pictures, voice, video and the like. The social relationship chain corresponding to the public identification with a larger number of users can become a long relationship chain.
Fig. 1 is a flowchart of a relationship chain storage method according to an embodiment of the present invention. Referring to fig. 1, the method includes:
101. user identities that focus on public identities are received.
102. And determining a target index and a first target offset address of the user identifier according to the user identifier and a data entry with an index as grouping information, wherein the data entry with the index as the grouping information comprises a plurality of types of grouping information of concerned users of the public identifier, and the target index is the grouping identifier of a group in which the user identifier is positioned.
103. And determining a target storage address in the target data entry by taking the target index as an index and the first target offset address as an offset address.
104. And storing the user identification and the attention state to the target storage address.
Optionally, determining the target index and the first target offset address of the user identifier according to the user identifier and the data entry with the index as the grouping information includes:
acquiring a user characteristic value of the user identifier through a first preset characteristic value algorithm, wherein the user characteristic value is used for uniquely representing the user identifier; the target index and the first target offset address are looked up in the data entry according to the user characteristic value.
Optionally, after storing the user identifier and the attention state to the target storage address, the method further includes: and when a relation chain request sent by the user identification is received, editing the attention state corresponding to the user identification corresponding to the relation chain request.
Optionally, the relationship chain request is for: modifying the attention state to a deletion state; or, modifying the attention state into a shielding state; or, the state of attention is modified to a state of cancellation of attention.
Optionally, the method further comprises:
storing the storage address information of the user identifier into a data entry corresponding to a first specified index, wherein the data entry corresponding to the first specified index at least comprises the user identifier which is not concerned; or the like, or, alternatively,
when a batch deleting operation is received, storing storage address information of a plurality of user identifications corresponding to the batch deleting operation into a data entry corresponding to a second specified index, wherein the data entry corresponding to the second specified index at least comprises the deleted user identification; or the like, or, alternatively,
when a shielding request sent by the user identifier is received, storing the storage address information of the user identifier into a data entry corresponding to a third assigned index, wherein the data entry corresponding to the third assigned index at least comprises the user identifier which has shielded the public identifier.
Optionally, after receiving the user identifier concerning the public identifier, the method further includes:
determining a user data entry indexed by the user identifier;
acquiring a public characteristic value of the public identification through a second preset characteristic value algorithm, wherein the public characteristic value is used for uniquely representing the public identification;
determining a second target offset address in the user data entry based on the known characteristic value;
and storing the public identification and the attention behavior information in the second target offset address.
Optionally, the attention behavior information includes: the message sending method comprises one or more of a public identification group, a public identification group sending message identification, a public identification position identification, a push message receiving or not identification, a public identification single sending message identification, time information and listening type information.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Fig. 2 is a flowchart of a relationship chain storage method according to an embodiment of the present invention. Referring to fig. 2, this embodiment specifically includes:
201. user identities that focus on public identities are received.
The receiving process may be an operation of receiving a user's attention to public identification. When receiving the attention operation, the relationship chain may be stored according to the user identifier for performing the attention operation and the public identifier for which the attention operation is focused.
202. And acquiring a user characteristic value of the user identifier through a first preset characteristic value algorithm, wherein the user characteristic value is used for uniquely representing the user identifier.
The first preset characteristic value algorithm may be a hash algorithm, and an input with an arbitrary length may be converted into an output with a fixed length through the hash algorithm, so that the user identifier may be mapped to a storage location according to a uniform rule.
203. And determining the target index and the first target offset address in a data entry with the index as grouping information according to the user characteristic value, wherein the target index is the grouping identification of the group where the user identification is located.
For the storage of the grouping information, a key-Value storage manner may be adopted, that is, the index is the grouping information, the key values in the data entries are a plurality of types of grouping information of concerned users of public identities, and the data entries with the index as the grouping information may also be regarded as metadata.
Further, the key of the data entry may further include fields in table 1 below on the basis of containing the above-mentioned multiple types of grouping information.
TABLE 1
Through the analysis of the user characteristic value, the target storage address can be determined, and the specific analysis process can be as follows: and determining a target group identifier according to the value of the first specified digit of the user characteristic value, and determining a first target offset address in the group according to the value of the second specified digit of the user characteristic value. Of course, the analysis process may also take other forms, such as performing secondary eigenvalue calculation on the user-based eigenvalue to avoid the storage location conflict, and the embodiment of the present invention is not limited in particular.
By adopting the key value structure to store the grouping information and storing the user identification in each grouping through a plurality of key value structures, the subscribing users on one B2C relationship chain can be managed through grouping. Fig. 3A is a schematic diagram of a storage format according to an embodiment of the present invention. Referring to fig. 3A, the data entry indexed as the grouping information (bin _ info) is a first-level storage, and the data entries indexed as the grouping identification are second-level storages, each of the data entries indexed as the grouping identification including a plurality of user data. For example, the puin _ gid _ N indicates the nth packet, and each user data of the data entry may be represented as binary data { state of interest, user identification }, i.e., value [ { state, uin } ]. In addition, as for the add queue, delete queue, recycle queue, virtual group list, and the like shown in table 1, a form as shown in the last line in fig. 3A may be adopted.
It should be noted that, in each queue described in the embodiment of the present invention, taking a recycle queue as an example, the recycle queue may also use a feature value algorithm to obtain a feature value of a recycled user identifier, and then determine a storage location of storage address information of the recycled user identifier in the recycle queue according to the feature value, that is, key is r (uin) and r _ is a hash function. Generally, when a user cancels attention or cleans up a subscription user in batch, in addition to editing the attention state of the user in the data entry of the group identifier, the storage address information of the user identifier may also be stored in the data entry corresponding to the first specified index, and the determination process is the same as the process of determining the target storage address, which is not described herein again.
For each queue described in other embodiments of the present invention, for the recycle queue, the following steps may be performed: and storing the storage address information of the user identifier into a data entry corresponding to a first specified index, wherein the data entry corresponding to the first specified index at least comprises the user identifier which is not concerned.
For a delete queue, there may be the following steps: when a batch deleting operation is received, storing the storage address information of a plurality of user identifications corresponding to the batch deleting operation into a data entry corresponding to a second specified index, wherein the data entry corresponding to the second specified index at least comprises the deleted user identification.
For a mask queue, there may be the following steps: when a shielding request sent by the user identifier is received, storing the storage address information of the user identifier into a data entry corresponding to a third assigned index, wherein the data entry corresponding to the third assigned index at least comprises the user identifier which has shielded the public identifier.
It should be noted that maintaining a queue such as a recycle queue in the storage format can avoid data errors during subsequent consistency check, and can also be used as a user identification basis for some sending scenarios, for example, when determining whether to send a message to a certain user, it can be determined whether the message is in the recycle queue, so as to improve the consistency of data, improve the accuracy of the relation chain operation, and improve the efficiency of the relation chain operation.
204. And determining a target storage address in the target data entry by taking the target index as an index and the first target offset address as an offset address.
205. And storing the user identification and the attention state to the target storage address.
In the above steps 204 and 205, which can be regarded as an addressing procedure, the user id and the attention status are stored in the determined target storage address.
Based on the above storage format, in order to save the storage space, the user data is usually stored as binary data { state of interest, user id }, i.e., { state, uin }. The concerned state is used to identify the state of the user, such as a delete state, a mask state, or a cancel concerned state, so as to facilitate subsequent transaction operations and consistency check. Alternatively, the data size of the concerned state may be 1Byte, i.e., 8 flag bits. The user identifier may be information for uniquely identifying the user, such as a QQ number of the user, and may have a data size of 4 Bytes.
After the storing step is performed, information interaction can be performed in subsequent transaction operations, such as sending a notification message to a group of users.
206. And when a relation chain request sent by the user identification is received, editing the attention state corresponding to the user identification corresponding to the relation chain request.
The relationship chain request may have the following role: modifying the attention state to a deletion state; or, modifying the attention state into a shielding state; or, the state of attention is modified to a state of cancellation of attention.
Then, for the change of the attention state, the attention state corresponding to the user identifier stored in the target storage location may be changed. Specifically, how to determine to edit the attention state stored in which storage location may be determined according to the user identifier of the request object requested by the relationship chain in the manner of the characteristic value mentioned in the above process, which is not described herein again.
Correspondingly, the storage position information corresponding to the user identifier as the request object can be determined to be stored in which queue according to the specific request operation type of the relationship chain request, so as to ensure the consistency of subsequent data.
Further, when receiving a user identifier concerning a public identifier, the method further needs to maintain a relationship chain of the user identifier, and the specific process may include: determining a user data entry indexed by the user identifier; acquiring a public characteristic value of the public identification through a second preset characteristic value algorithm, wherein the public characteristic value is used for uniquely representing the public identification; determining a second target offset address in the user data entry based on the public characteristic value; and storing the public identification and the attention behavior information in the second target offset address.
For the user identifier, based on the storage format, it can be used to store which public identifiers a user is interested in and the attention behavior information of each public identifier. The storage format may also adopt a key Value mode, as shown in table 2 and fig. 3B, in table 2, the public identifier and the attention behavior information are stored in the Value of the user data entry indexed by the user identifier. Further, the attention behavior information includes: the message receiving method comprises one or more of a public identification group, a public identification group sending message identification, a public identification position identification, a push message receiving or not identification, a public identification single sending message identification, a position, time information and listening type information. The public mark location mark refers to a data entry storage location indexed by a public mark concerned by the user, and the location may refer to a storage location of a data entry of the user mark itself.
TABLE 2
It should be noted that, for the storage of B2C and the storage of C2B, the eigenvalue algorithms used may be different, that is, the first preset eigenvalue algorithm and the second preset eigenvalue algorithm may be different, and this is not specifically limited in the embodiment of the present invention.
Further, the storage of B2C and the storage of C2B may be queried in both directions, that is, when querying through the relationship chain of B2C, data entries corresponding to any user identifier in the relationship chain may be further queried, and when querying through the relationship chain of C2B, data entries corresponding to any public identifier in the relationship chain and grouping information of public identifiers may be further queried.
According to the method provided by the embodiment of the invention, the subscription users with public identification are stored in groups by adopting a hierarchical storage mode, the user identification and the attention state of the subscription user are correspondingly stored in a unique position according to the user identification and the specific grouping information of the subscription user based on the established secondary index, a state marking function is provided for the subsequent change of the user attention state and the like, the high efficiency of operation is ensured, the data consistency can be ensured, further, the storage mode can effectively save the storage space, the memory copy operation is reduced, and the overall performance is effectively improved. Furthermore, independent data entries independent of the storage user identifier, such as an adding queue, a deleting queue, a shielding queue, a recycling queue and the like, are maintained, so that the distributed storage space can be operated in a step-by-step transaction mode, and meanwhile, for specific operation requirements, the import and export of relationship chain data can be rapidly carried out in batches at the back end. Moreover, based on the index mode of the intercommunicating formulas from B2C to C2B, the data structure related to attention can be quickly searched and positioned, various high-efficiency operations are realized, and the consistency of final relationship chain data can be maintained under high-concurrency operations; the memory copy method can effectively save storage space, reduce memory copy operation and effectively improve overall performance.
To further describe the method provided by the embodiment of the present invention, the following introduces the relationship chain storage process related to the embodiment of the present invention in detail based on the basic architecture of the information service system and the specific functions of each service module, where fig. 4 is an architecture schematic diagram of the information service system provided by the embodiment of the present invention, and referring to fig. 4, the information service system includes:
the information service client can be an instant messaging client or a social application client, and can be used for sending and receiving messages such as characters, pictures, videos and audios and displaying the messages. Specifically, the information service client may perform message pulling through the message system interface server. When the information service client receives the message notification sent by the message system server, the message is actively pulled from the message server. The information service client can also report various operation behavior information and corresponding parameters of the client to a statistical reporting interface server of the information service side through a message uplink channel, simultaneously form a new relation chain system of the B side and the C side or report the operation of actively paying attention to, canceling attention to, shielding and the like by a user, and report the click behavior of the user to the message pushed by the B side to the system.
And the relationship chain system is used for storing and recording the association relationship between the accounts. The association relationship may be a strong association such as a friend relationship, or a weak association such as an attention relationship or a listening relationship. Under the condition of strong association relationship, the accounts and the accounts can be in one-to-one relationship, under the condition of weak association, the common form is that one account A identifies one sender, and one set B identifies all accounts which can receive information sent by the account A. When the account a has a message to send, the message service may obtain, from the relationship chain system, an account for sending the message and an account for receiving the message on the relationship chain related to the account a through the scheduling service. Certainly, the relationship chain system is a changeable system, and when a client user actively cancels or pays attention to a certain account, an uplink message can be sent through the message system interface server, so that the relationship chain system modifies the corresponding attention relationship.
The relationship chain system is used as a main interface server for the information service client and the back-end long relationship chain system to be in butt joint, and is generally deployed as a nearby access server for different operator ISPs. And the relationship chain system can transmit various operation behaviors of the user on the B-side account, such as cancelling, focusing, shielding and the like, to the long relationship chain logical server through the server.
The long relation chain logic server is used as a main business logic server for realizing the establishment and maintenance and the relevant update of the relation chain, and can receive various operation behaviors of the terminal transmitted by the relation chain business. For C2B and B2C, different eigenvalue algorithms are selected according to the data structure and organization method described above, the secondary storage structure is maintained, and finally the user identification is stored in the relationship chain storage system. The long relation logic server is also used for reading the number packet data from the fan number server and operating the relation chain storage system in batches.
The fan management server is a main entrance server for maintaining a long relationship chain system, generally, no fans exist or people concerned about when a public identifier is just created, a batch of fans are usually imported from other corresponding service scenes for operation needs, for example, users of e-commerce shopping behaviors are led in, the users are led to pay attention to the corresponding e-commerce public identifier, at the moment, the fans are imported through a fan manager, however, the fans concerned need to be exported for secondary analysis and mining as one B-side public identifier is accumulated with time, and the operation needs to be carried out through the server. In order to ensure the consistency of the final data of the relationship chain, for example, if a user pays attention to a certain public identifier, in the list of concerned fans corresponding to the public identifier, the fan or the user who has been deleted in the deletion list must be stored, and the fan list which does not correspond to the public identifier needs to be periodically maintained by the fan management server, for example, every day or every several hours (generally, the more frequently the period for maintaining consistency is undetermined according to the frequency of change of fans, the shorter the period is). And reading data such as shielding behaviors reported by users of the statistical analysis system to generate shielding number packages and fans, and completely deleting the shielding number packages and fans from the relationship chain system.
The fan number packet service is used for receiving the management of the fan management server, importing various public identifications to be operated and actively added into concerned fan number packets or temporarily storing the number packets to be exported, and providing the long relation chain logic server for reading different number packets.
The relation chain storage system is used for providing the relation chain storage method described above, and can adopt primary storage for C2B relation chain data, and can adopt secondary storage for B2C long relation chain data, and a distributed key-value system is generally adopted, so that data is ensured not to be lost and reliable, and finally the relation chain data is stored in a ground manner. The relationship chain storage system may accept various operations of the long relationship chain logical server such as cancellation and attention and masking operations, etc.
And the statistical analysis system is used for receiving the shielding, cancelling and concerned behaviors of the terminal reporting user and the click behavior data of the user on the message operation pushed by the B side, and providing the vermicelli management server for reading the analysis log result of the operation behavior of the vermicelli user. It should be noted that the fans described herein are the subscribing users and the interested users in the above embodiments, and refer to users who are interested in a certain public identifier.
Fig. 5 is a schematic structural diagram of a relationship chain storage device according to an embodiment of the present invention. Referring to fig. 5, the apparatus includes:
a receiving module 501, configured to receive a user identifier concerning a public identifier;
a determining module 502, configured to determine a target index and a first target offset address of the user identifier according to the user identifier and a data entry with an index as group information, where the data entry with the index as group information includes multiple types of group information of a user concerned with the public identifier, and the target index is a group identifier of a group where the user identifier is located;
a storage address determining module 503, configured to determine a target storage address in a target data entry by using the target index as an index and using the first target offset address as an offset address;
a storage module 504, configured to store the user identifier and the attention state to the target storage address.
Optionally, the determining module is configured to obtain a user feature value of the user identifier through a first preset feature value algorithm, where the user feature value is used to uniquely represent the user identifier; determining the target index and the first target offset address in the data entry according to the user characteristic value.
Optionally, the apparatus further comprises:
and the editing module is used for editing the attention state corresponding to the user identifier corresponding to the relation chain request when the relation chain request sent by the user identifier is received.
Optionally, the relationship chain request is for:
modifying the attention state to a deletion state; or the like, or, alternatively,
modifying the attention state to a mask state; or the like, or, alternatively,
and modifying the attention state into a cancellation attention state.
Optionally, the storage module is configured to:
storing the storage address information of the user identifier into a data entry corresponding to a first specified index, wherein the data entry corresponding to the first specified index at least comprises the user identifier which is not concerned; or the like, or, alternatively,
when a batch deleting operation is received, storing storage address information of a plurality of user identifications corresponding to the batch deleting operation into a data entry corresponding to a second specified index, wherein the data entry corresponding to the second specified index at least comprises the deleted user identification; or the like, or, alternatively,
when a shielding request sent by the user identifier is received, storing the storage address information of the user identifier into a data entry corresponding to a third assigned index, wherein the data entry corresponding to the third assigned index at least comprises the user identifier which has shielded the public identifier.
Optionally, the apparatus further comprises:
the data entry determining module is used for determining a user data entry with the user identification as an index;
the characteristic value acquisition module is used for acquiring a public characteristic value of the public identification through a second preset characteristic value algorithm, and the public characteristic value is used for uniquely representing the public identification;
an offset address determination module for determining a second target offset address in the user data entry according to the public eigenvalue;
and the concerned behavior information storage module is used for storing the public identification and the concerned behavior information in the second target offset address.
Optionally, the attention behavior information includes: the message sending method comprises one or more of a public identification group, a public identification group sending message identification, a public identification position identification, a push message receiving or not identification, a public identification single sending message identification, time information and listening type information.
It should be noted that: in the above-described embodiment, the relational chain storage device is only illustrated by dividing the functional modules when storing the relational chain, and in practical applications, the above-described function distribution may be performed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above. In addition, the related chain storage device and the related chain storage method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
FIG. 6 is a block diagram illustrating a relationship chain storage 600, according to an example embodiment. For example, the apparatus 600 may be provided as a server. Referring to fig. 6, the apparatus 600 includes a processing component 622 that further includes one or more processors and memory resources, represented by memory 632, for storing instructions, such as applications, that are executable by the processing component 622. The application programs stored in memory 632 may include one or more modules that each correspond to a set of instructions. Further, processing component 622 is configured to execute instructions to perform the above-described relationship chain storage method.
The apparatus 600 may also include a power component 626 configured to perform power management of the apparatus 600, and a wired or wireless network interface 650 configured to connect the apparatus 600 toConnected to a network, and an input-output (I/O) interface 658. The apparatus 600 may operate based on an operating system, such as Windows Server, stored in the memory 632TM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTMOr the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (14)
1. A method of relational chain storage, the method comprising:
receiving a user identifier concerning a public identifier;
determining a target index and a first target offset address of the user identifier according to the user identifier and a data entry with an index as grouping information, wherein the data entry with the index as the grouping information comprises a plurality of types of grouping information of concerned users of the public identifier, and the target index is the grouping identifier of a group in which the user identifier is located;
determining a target storage address in a target data entry by taking the target index as an index and the first target offset address as an offset address;
and storing the user identification and the attention state to the target storage address.
2. The method of claim 1, wherein determining the target index and the first target offset address of the user id according to the user id and a data entry whose index is packet information comprises:
acquiring a user characteristic value of the user identifier through a first preset characteristic value algorithm, wherein the user characteristic value is used for uniquely representing the user identifier;
determining the target index and the first target offset address in the data entry according to the user characteristic value.
3. The method of claim 1, wherein after storing the user identification and attention status to the target storage address, the method further comprises:
and when a relation chain request sent by the user identification is received, editing the attention state corresponding to the user identification corresponding to the relation chain request.
4. The method of claim 3, wherein the relationship chain request is for:
modifying the attention state to a deletion state; or the like, or, alternatively,
modifying the attention state to a mask state; or the like, or, alternatively,
and modifying the attention state into a cancellation attention state.
5. The method of claim 4, further comprising:
storing the storage address information of the user identifier into a data entry corresponding to a first specified index, wherein the data entry corresponding to the first specified index at least comprises the user identifier which is not concerned; or the like, or, alternatively,
when a batch deleting operation is received, storing storage address information of a plurality of user identifications corresponding to the batch deleting operation into a data entry corresponding to a second specified index, wherein the data entry corresponding to the second specified index at least comprises the user identification of which the public identification is deleted; or the like, or, alternatively,
when a shielding request sent by the user identifier is received, storing the storage address information of the user identifier into a data entry corresponding to a third assigned index, wherein the data entry corresponding to the third assigned index at least comprises the user identifier which has shielded the public identifier.
6. The method of claim 1, wherein after receiving the user identity concerning the public identity, the method further comprises:
determining a user data entry indexed by the user identifier;
acquiring a public characteristic value of the public identification through a second preset characteristic value algorithm, wherein the public characteristic value is used for uniquely representing the public identification;
determining a second target offset address in the user data entry based on the public characteristic value;
and storing the public identification and the attention behavior information in the second target offset address.
7. The method of claim 6, wherein the behavior of interest information comprises: the message sending method comprises one or more of a public identification group, a public identification group sending message identification, a public identification position identification, a push message receiving or not identification, a public identification single sending message identification, time information and listening type information.
8. A relational chain storage apparatus, comprising:
the receiving module is used for receiving a user identifier concerning a public identifier;
a determining module, configured to determine a target index and a first target offset address of the user identifier according to the user identifier and a data entry with an index as group information, where the data entry with the index as group information includes multiple types of group information of a user concerned with the public identifier, and the target index is a group identifier of a group where the user identifier is located;
a storage address determining module, configured to determine a target storage address in a target data entry by using the target index as an index and using the first target offset address as an offset address;
and the storage module is used for storing the user identification and the attention state to the target storage address.
9. The device according to claim 8, wherein the determining module is configured to obtain a user feature value of the user identifier through a first preset feature value algorithm, where the user feature value is used to uniquely represent the user identifier; determining the target index and the first target offset address in the data entry according to the user characteristic value.
10. The apparatus of claim 8, further comprising:
and the editing module is used for editing the attention state corresponding to the user identifier corresponding to the relation chain request when the relation chain request sent by the user identifier is received.
11. The apparatus of claim 10, wherein the relationship chain request is configured to:
modifying the attention state to a deletion state; or the like, or, alternatively,
modifying the attention state to a mask state; or the like, or, alternatively,
and modifying the attention state into a cancellation attention state.
12. The apparatus of claim 11, wherein the storage module is configured to:
storing the storage address information of the user identifier into a data entry corresponding to a first specified index, wherein the data entry corresponding to the first specified index at least comprises the user identifier which is not concerned; or the like, or, alternatively,
when a batch deleting operation is received, storing storage address information of a plurality of user identifications corresponding to the batch deleting operation into a data entry corresponding to a second specified index, wherein the data entry corresponding to the second specified index at least comprises the user identification of which the public identification is deleted; or the like, or, alternatively,
when a shielding request sent by the user identifier is received, storing the storage address information of the user identifier into a data entry corresponding to a third assigned index, wherein the data entry corresponding to the third assigned index at least comprises the user identifier which has shielded the public identifier.
13. The apparatus of claim 8, further comprising:
the data entry determining module is used for determining a user data entry with the user identification as an index;
the characteristic value acquisition module is used for acquiring a public characteristic value of the public identification through a second preset characteristic value algorithm, and the public characteristic value is used for uniquely representing the public identification;
an offset address determination module for determining a second target offset address in the user data entry according to the public eigenvalue;
and the concerned behavior information storage module is used for storing the public identification and the concerned behavior information in the second target offset address.
14. The apparatus of claim 13, wherein the behavior of interest information comprises: the message sending method comprises one or more of a public identification group, a public identification group sending message identification, a public identification position identification, a push message receiving or not identification, a public identification single sending message identification, time information and listening type information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510519913.9A CN106470150B (en) | 2015-08-21 | 2015-08-21 | Relation chain storage method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510519913.9A CN106470150B (en) | 2015-08-21 | 2015-08-21 | Relation chain storage method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106470150A CN106470150A (en) | 2017-03-01 |
CN106470150B true CN106470150B (en) | 2020-04-24 |
Family
ID=58229105
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510519913.9A Active CN106470150B (en) | 2015-08-21 | 2015-08-21 | Relation chain storage method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106470150B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108830704B (en) * | 2018-06-28 | 2020-10-23 | 中国建设银行股份有限公司 | Supervision identifier configuration method and device |
CN110781375B (en) * | 2018-07-31 | 2023-07-07 | 阿里巴巴集团控股有限公司 | User state identification determining method and device |
CN111064657B (en) * | 2019-12-30 | 2022-03-15 | 广州酷狗计算机科技有限公司 | Method, device and system for grouping concerned accounts |
CN111324674B (en) * | 2020-01-20 | 2021-10-15 | 腾讯科技(深圳)有限公司 | Service processing method, device, server and storage medium |
US11494119B2 (en) * | 2020-09-10 | 2022-11-08 | Micron Technology, Inc. | Memory searching component |
CN112182027B (en) * | 2020-09-11 | 2024-03-01 | 北京达佳互联信息技术有限公司 | Information query method, device, electronic equipment and storage medium |
CN112153476B (en) * | 2020-09-22 | 2022-07-22 | 游艺星际(北京)科技有限公司 | Interactive data processing method and device, server and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103731459A (en) * | 2012-10-15 | 2014-04-16 | 阿里巴巴集团控股有限公司 | Interaction data propagation method and server based on social network service |
CN103838757A (en) * | 2012-11-26 | 2014-06-04 | 腾讯科技(深圳)有限公司 | System and method for processing long relation chain data of user |
CN104468318A (en) * | 2013-09-18 | 2015-03-25 | 腾讯科技(北京)有限公司 | Method and server for recovering reverse relationship chain in network communication |
CN104615595A (en) * | 2013-11-04 | 2015-05-13 | 腾讯科技(北京)有限公司 | Data processing method and social media storage platform |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008146517A (en) * | 2006-12-13 | 2008-06-26 | Hitachi Ltd | System for distributing data and apparatus for maintaining index |
-
2015
- 2015-08-21 CN CN201510519913.9A patent/CN106470150B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103731459A (en) * | 2012-10-15 | 2014-04-16 | 阿里巴巴集团控股有限公司 | Interaction data propagation method and server based on social network service |
CN103838757A (en) * | 2012-11-26 | 2014-06-04 | 腾讯科技(深圳)有限公司 | System and method for processing long relation chain data of user |
CN104468318A (en) * | 2013-09-18 | 2015-03-25 | 腾讯科技(北京)有限公司 | Method and server for recovering reverse relationship chain in network communication |
CN104615595A (en) * | 2013-11-04 | 2015-05-13 | 腾讯科技(北京)有限公司 | Data processing method and social media storage platform |
Also Published As
Publication number | Publication date |
---|---|
CN106470150A (en) | 2017-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106470150B (en) | Relation chain storage method and device | |
US9521104B2 (en) | Outgoing communications inventory | |
CN106470149B (en) | Message sending method and device | |
CN105847020B (en) | Message pushing method and device | |
US20130054707A1 (en) | Online monitoring for customer service | |
CN108881354B (en) | Push information storage method and device, server and computer storage medium | |
US11171994B2 (en) | Tag-based security policy creation in a distributed computing environment | |
CN102769640B (en) | The update method of user profile, server and system | |
CN106095789B (en) | Message subscription management device and method | |
CN112202661A (en) | Session message processing method and device, computer equipment and storage medium | |
WO2020030959A1 (en) | Resource recommendation method and apparatus, device/terminal/server, and computer-readable medium | |
US20230206089A1 (en) | Content delivery optimization | |
US20130031178A1 (en) | Method and Apparatus for Managing Message | |
US20130332540A1 (en) | Structural Presentation and Smart Alerts for Instant Messaging Contacts | |
CN104956393A (en) | Third-party communications to social networking system users using user descriptors | |
CA3065729A1 (en) | Business rules processing framework | |
US8854372B2 (en) | Consolidation and visualization of a set of raw data corresponding to a communication between a person of interest and a correspondent across a plurality of mediums of communication | |
CN113014618B (en) | Message processing method and system and electronic equipment | |
US20220138144A1 (en) | Longevity management of social network data | |
US9930000B2 (en) | Method for posing requests in a social networking site | |
KR20150132647A (en) | Method and system for notifying of online posting | |
US20130117458A1 (en) | Build a Person from Multiple Contacts | |
US10200324B2 (en) | Dynamically partitioning a mailing list based on a-priori categories and contextual analysis | |
US11842077B2 (en) | Method, device, and computer program product for transmitting data for object storage | |
WO2023015982A1 (en) | Message sending method, message sending end, and server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |