CN111324674B - Service processing method, device, server and storage medium - Google Patents

Service processing method, device, server and storage medium Download PDF

Info

Publication number
CN111324674B
CN111324674B CN202010068140.8A CN202010068140A CN111324674B CN 111324674 B CN111324674 B CN 111324674B CN 202010068140 A CN202010068140 A CN 202010068140A CN 111324674 B CN111324674 B CN 111324674B
Authority
CN
China
Prior art keywords
user
attention
target
relationship
time
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
Application number
CN202010068140.8A
Other languages
Chinese (zh)
Other versions
CN111324674A (en
Inventor
戴礼松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010068140.8A priority Critical patent/CN111324674B/en
Publication of CN111324674A publication Critical patent/CN111324674A/en
Application granted granted Critical
Publication of CN111324674B publication Critical patent/CN111324674B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a service processing method, a device, a server and a storage medium, wherein the method comprises the following steps: receiving a trigger instruction for acquiring target relation chain data corresponding to a target user; responding to a trigger instruction, acquiring target relation chain data related to a target user, wherein the target relation chain data comprises first attention time information of the target user concerning the associated user and second attention time information of the associated user concerning the target user; and executing the business related to the attention relationship according to the first attention time information and the second attention time information included in the target relationship chain data. The embodiment of the invention can improve the efficiency of service execution.

Description

Service processing method, device, server and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a service processing method, an apparatus, a server, and a storage medium.
Background
With the development of science and technology, more and more applications support users to publish articles, information or posts in the applications to attract more users, so that the utilization rate of the applications is improved. In order to improve the interaction among users and reduce the user loss rate, the application program can support any user to add the author of the favorite post as the attention user, so that any user can view the post or article issued by the attention user at any time. In a specific implementation, data for recording a concern between an arbitrary user and another user is referred to as relationship chain data of the arbitrary user, and the concern may include when the arbitrary user concerns the other user and when the other user concerns the arbitrary user. When executing a service related to a concern relationship, a server first needs to acquire relationship chain data. For example, when executing a message service for pushing a new article issued by a user a to a fan user who pays attention to the user a, the server needs to acquire relationship chain data of the user a, determine the fan user of the user a according to the relationship chain data, and finally send a push message to the fan user.
In general, when recording relationship chain data, a server generates a new attention relationship record each time an attention request of a user for adding another user is received, and the new attention relationship record is used for storing attention time of the user for another user, for example, a user a requests to pay attention to a user B, and the server generates an attention relationship record to store time of the user a paying attention to the user B; the user B requests to pay attention to the user A, and the server also generates an attention relation record of information to store the time when the user B pays attention to the user A. When the server needs to acquire the attention chain data between the user a and the user B, two attention relationship records need to be acquired, and thus, much time is consumed, thereby reducing the execution efficiency of the service. Therefore, how to efficiently acquire relationship chain data of any user and execute a service becomes a hot issue of current research.
Disclosure of Invention
The embodiment of the invention provides a service processing method, a service processing device, a server and a storage medium, which can improve service execution efficiency.
In one aspect, an embodiment of the present invention provides a service processing method, including:
receiving a trigger instruction for acquiring target relation chain data corresponding to a target user;
responding to the trigger instruction, acquiring target relation chain data related to the target user, wherein the target relation chain data comprise first attention time information of the target user concerning the associated user and second attention time information of the associated user concerning the target user;
and executing the business related to the attention relationship according to the first attention time information and the second attention time information included in the target relationship chain data.
In another aspect, an embodiment of the present invention provides a service processing apparatus, including:
the receiving unit is used for receiving a trigger instruction for acquiring target relation chain data corresponding to a target user;
the processing unit is used for responding to the trigger instruction, and acquiring target relation chain data related to the target user, wherein the target relation chain data comprise first attention time information of the target user concerning the related user and second attention time information of the related user concerning the target user;
and the execution unit is used for executing the business related to the attention relationship according to the first attention time information and the second attention time information included in the target relationship chain data.
In another aspect, an embodiment of the present invention provides a server, where the server includes:
a processor adapted to implement one or more instructions; and the number of the first and second groups,
a computer storage medium storing one or more instructions adapted to be loaded by the processor and to perform the steps of:
receiving a trigger instruction for acquiring target relation chain data corresponding to a target user;
responding to the trigger instruction, acquiring target relation chain data related to the target user, wherein the target relation chain data comprise first attention time information of the target user concerning the associated user and second attention time information of the associated user concerning the target user;
and executing the business related to the concern relationship according to the target relationship chain data.
In another aspect, an embodiment of the present invention provides a computer storage medium, where computer program instructions are stored in the computer storage medium, and when the computer program instructions are executed by a processor, the computer program instructions are configured to execute the service processing method as described above.
In the embodiment of the invention, in response to a trigger instruction for acquiring target relation chain data corresponding to a target user, target relation chain data related to the target user is acquired, wherein the target relation chain data comprises first attention time information of the target user concerning the related user and second attention time information of the related user concerning the target user; the attention relationship between the target user and the associated user and the attention time information of the attention between the target user and the associated user are recorded by using a relationship chain data, so that the storage space for storing the relationship chain data can be saved; the server can execute the service related to the concern relationship according to the acquired target relationship chain data, and compared with the prior art that the service related to the concern relationship can be executed only by acquiring two pieces of concern relationship data, the service execution time is saved, so that the service execution efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are 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. 1a is a schematic structural diagram of a service processing system according to an embodiment of the present invention;
FIG. 1b is a diagram illustrating operations performed on an application according to an embodiment of the present invention;
fig. 1c is a schematic structural diagram of a logic layer in a server according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a service processing method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of another service processing method according to an embodiment of the present invention;
FIG. 4a is a diagram of a concern relationship record table according to an embodiment of the present invention;
FIG. 4b is a diagram of another concern relationship record table provided by an embodiment of the present invention;
FIG. 4c is a diagram of another concern relationship record table provided by an embodiment of the present invention;
FIG. 5a is a diagram of a table of attention relationship records according to another embodiment of the present invention;
FIG. 5b is a diagram of another concern relationship record table according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a concern relationship type determination table according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a service processing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The embodiment of the invention provides a business processing scheme, wherein a server stores the attention relationship condition between any two users with attention relationship in a relationship chain data, and compared with the prior art that two attention relationship records are adopted to store the attention relationship condition between any two users with attention relationship, the number of the attention relationship records to be stored can be reduced to a certain extent, and a part of storage space is saved. When the server receives a trigger instruction for acquiring target relation chain data of a target user (the target user is any user), the target relation chain data related to the target user is found, and the attention relation between the target user and the associated user can be quickly determined according to first attention time information and second attention time information included in the target relation chain data.
Based on the foregoing service processing scheme, an embodiment of the present invention provides a service processing system, and referring to fig. 1a, a schematic structural diagram of the service processing system provided in the embodiment of the present invention is shown. The business processing system shown in fig. 1a may include a server 101, an author user terminal 102, and a browsing user terminal 103, where the author user terminal 102 is a terminal used by a user who issues a post, an article, or other information (in the following description, the post, the article, or the other information are collectively referred to as a work), and the browsing user terminal 103 is a terminal used by a user who reads the post, the article, or the other information. Wherein, the author user terminal 102 and the browsing user terminal 103 can run an application program supporting publishing or reading works, such as a micro gold community, and the server 101 stores service data supporting the running of the application program.
In one embodiment, the author user and the browsing user can perform operations in the application program as shown in fig. 1b, and the author user can publish or delete posts or articles in the application program after logging in the application program; alternatively, the author user may modify the browsing rights of the works distributed by the author user, such as setting that the works distributed by the author user in the application program are only visible to the author user, and then visible to all or part of the users of the application program. Operations which can be executed on works published by an author user after a browsing user logs in an application program comprise browsing and reading, and interactive operations such as praise and comment.
In one embodiment, the author user and the browsing user can add the application program to the application program as their concerned users or cancel the attention of a certain user. For example, the browsing user may add an attention user of the author user, and the browsing user may cancel the attention of the author user at any time. After the browsing user pays attention to the author user, the browsing user is called a fan user of the author user, and the author user is called an attention user of the browsing user. Optionally, the author user or the browsing user may view a list of users interested in themselves and a list of fan users interested in themselves in the application.
In one embodiment, in the process of browsing information such as articles and posts released by an author user, a browsing user adds works such as articles or posts which are interested in the browsing user to an attention information list, and a subsequent browsing user can quickly view the works which are interested in the browsing user from the attention information list at any time.
In one embodiment, a logical layer is provided in the server 101 to support the running of applications in the author terminal 102 and the browsing user terminal 103. Referring to fig. 1c, a schematic diagram of logical layers in a server according to an embodiment of the present invention is provided, where the logical layers may include a relationship chain service module 11, a work detail service module 12, a publisher service module 13, and a personal homepage service module 14. In addition, as can be seen from fig. 1c, the server 101 may further include a relationship chain database 15, a composition database 16, and a personal composition list 17.
The relation chain database 15 is used for storing relation chain data of all users of the application program, wherein each relation chain data comprises first attention time information of one user concerning another user, and second attention time information of another user concerning one user; a works database 16 for storing all works distributed by all author users; the personal work list 17 is a work divided by author user dimension, in which only key information of the work posted by the author user such as an identification of a post posted, a time at which the post was posted, and a status of posting the post are stored. In other words, the relationship between the key information of the work-the work is stored in the work database 16, and the relationship between the author-the work key information is stored in the personal work list. The works corresponding to the key information of the works can be obtained from the works database 16 through the relationship between the authors and the key information of the works in the personal works list.
In one embodiment, when the author user wants to publish a work, the publisher service module 13 saves the work published in the author terminal 102 into the work database 16 by the author user terminal 102 sending a request to the publisher service module 13 in the server 101; meanwhile, key information in the works issued by the author terminal 102 is acquired, and the key information and the identification information of the author are stored in the personal works list 17.
In one embodiment, after the browsing user reads the works published by the author user, the browsing user may send an attention adding request of the attention author user to the relationship chain service module 11 through the browsing user terminal 103 if the browsing user is interested in the works and wants to continue reading the works subsequently published by the author user; the relationship chain service module 11 generates relationship chain data of the browsing user and saves the relationship chain data in the relationship chain database 15. The subsequent browsing user can obtain the own relationship chain data from the relationship chain database 15 through the browsing user terminal 103.
In one embodiment, after detecting that the author user issues a new work, the server 101 may obtain relationship chain data of the author user from the relationship chain database 15, so as to determine a fan user who concerns the author user according to the relationship chain data of the author user; and sending prompt information that the author user publishes the new work to each fan user. Alternatively, if the browsing user pays attention to the author user, the author user is referred to as an attention user of the browsing user, and the browsing user may transmit an inquiry request for inquiring about the works of the author user to the server 101 through the browsing user terminal 102; the server 101 determines that the author user is an interested user of the browsing user by querying the relationship chain database 11, and then obtains key information of works related to the author user from the personal work list 17; then, the works of the author user are acquired from the works database 16 according to the acquired key information of the works, and finally, the works are output to the browsing user terminal 102 for the browsing user to view.
In one embodiment, the server 101 may store the data in the relationship chain database 15, the work database 16, and the personal work list 17 into a blockchain network. In a specific implementation, the server 101 may send a storage request to the blockchain network, where the storage request carries the data in the relationship chain database 15, the data in the work database 16, and the data in the personal work list 17; after receiving the storage request, the blockchain network stores the databases in the blockchain network, and then may return a storage notification to the server 101, where the storage notification is used to notify the server 101 that the data in the databases has been successfully stored in the blockchain network.
Optionally, the server 101 may output a prompt message stored in the blockchain in response to the received storage notification, so as to notify an administrator of the server 101 that the data in the databases are successfully stored in the blockchain network.
In one embodiment, the blockchain network may be regarded as a data sharing system, the blockchain network may include a plurality of nodes, and the data sharing system refers to a system for performing data sharing between nodes. Optionally, the server 101 according to the embodiment of the present invention may be a node in a block chain network. Each node may receive input information for normal operation and maintain shared data within the data sharing system based on the received input information. In order to ensure information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and information transmission can be carried out between the nodes through the information connection. For example, when an arbitrary node in the data sharing system receives input information, other nodes in the data sharing system acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all the nodes in the data sharing system are consistent.
Each node in the data sharing system stores a same block chain, the block chain is composed of a plurality of blocks, a starting block comprises a block head and a block main body, an input information characteristic value, a version number, a timestamp and a difficulty value are stored in the block head, and input information is stored in the block main body; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When the block is generated, the node in the block chain network verifies the received request, the request and other requests in the transaction pool can be packaged into a block after the verification is passed, the block needs to be sent to other nodes in the block chain network for verification, and if the verification is passed, the block is added into the block chain.
Based on the above description, the storage request sent by the server 101 to the blockchain network is packed into a block and is connected to the blockchain after being verified by multiple nodes. Therefore, the data security in each database can be ensured, and the accuracy of the data acquired according to each database can be further ensured.
Based on the description of the service processing system, an embodiment of the present invention provides a service processing method, and referring to fig. 2, a flowchart of the service processing method provided by the embodiment of the present invention is shown. The service processing method shown in fig. 2 may be executed by a server, and may specifically be executed by a processor of the server. The service processing method shown in fig. 2 may include the following steps:
s201, receiving a trigger instruction for acquiring target relation chain data corresponding to a target user.
Wherein a target user may refer to any user using an application that supports publishing or browsing of works. As can be seen from the foregoing, the application program may include two types of users, one is an author user who can publish the work, and the other is a browsing user who browses or interactively operates the work. The target user may belong to an author user or a browsing user, and is not limited in the embodiment of the present invention.
In an embodiment, the target relationship chain data corresponding to the target user records the attention situation between the associated user having the attention relationship with the target user and the target user, and the associated user having the attention relationship with the target user may refer to a user who pays attention to the target user, or a user who pays attention to the target user. The concern includes one or more of the following: whether the target user pays attention to the associated user or not, and if so, when the attention time of the target user paying attention to the associated user is; whether the associated user pays attention to the target user or not, and if so, when the attention time of the associated user paying attention to the target user is.
Optionally, the time of the target user concerning the associated user may be reflected by first time information of interest, where the first time information of interest includes a time value, and if the time value included in the first time information of interest is a non-null value, it is indicated that the target user concerns the associated user, and the time of the target user concerning the associated user is equal to the time value in the first time information of interest; on the contrary, if the time value included in the first attention time information is null, it indicates that the target user is not concerned with the associated user. Similarly, the attention time of the attention target user of the associated user can be reflected by second attention time information, the second attention time information also includes a time value, if the time value included in the second attention time information is a non-null value, it is indicated that the associated user pays attention to the target user, and the attention time of the attention target user is equal to the time value in the second attention time information; on the contrary, if the time value included in the second attention time is a null value, it indicates that the associated user is not paying attention to the target user.
In one embodiment, as can be seen from the foregoing, the attention situation between the target user and the associated user is recorded in the target relationship chain data, in other words, the attention relationship between the target user and the associated user can be known according to the target relationship chain data, such as that the target user is a fan user of the associated user, the associated user is an attention user of the target user, or the associated user and the target user pay attention to each other. Therefore, the operation instruction that requires the server to acquire the target relationship chain can be called a trigger instruction for acquiring target relationship chain data corresponding to the target user.
In one embodiment, the triggering instruction may include: and acquiring fan users of the concerned target users. In one implementation mode, if a target user is an author user and the target user sets a function of actively pushing a new work to a fan user in a terminal, when the terminal of the target user detects that the target user issues the new work, the terminal of the target user informs a server to acquire the fan user concerning the target user, and the server needs to determine the fan user of the target user according to target relation chain data of the target user, so that when the server receives the fan user acquiring the target user, the server determines to receive a trigger instruction for acquiring the target relation chain data corresponding to the target user. Furthermore, the server determines the fan users of the concerned target users according to the acquired target relation chain data, so that push messages can be sent to the fan users conveniently.
In another implementation manner, when a target user wants to view its fan user, the server needs to be notified by the terminal of the target user to obtain the fan user of the target user, and at this time, the server is considered to receive a trigger instruction for obtaining the relationship chain data corresponding to the target user.
In other embodiments, the triggering instruction may further include: and acquiring the concerned user concerned by the target user. In one implementation, in order to increase the affinity between a target user and a concerned user thereof, when the target user browses a target content through a terminal of the target user, the terminal may notify a server to acquire the concerned user concerned by the target user, and the server needs to determine the concerned user of the target user according to target relation chain data of the target user, so that when the server receives the concerned user acquiring the target user, it is determined that a trigger instruction for acquiring target relation chain data corresponding to the target user is received; the server detects whether the concerned user concerned by the target user carries out comment, praise or other interactive operation on the target content; if so, a prompt message may be output to prompt the target user that the target user is interested in the target content.
In another implementation manner, when a target user wants to view a user of a relationship concerned by the target user, the server needs to be notified of obtaining the user concerned by the target user through a terminal of the target user, and at this time, the server is considered to receive a trigger instruction for obtaining target relationship chain data corresponding to the target user.
S202, responding to the trigger instruction, and acquiring target relation chain data related to the target user.
As can be seen from the foregoing, the target relationship chain data is stored in the server, and in particular, the server may include a relationship chain database in which the target relationship chain data is stored. In one embodiment, the implementation of storing relationship chain data in a relationship chain database may include: the method comprises the steps of storing in a form of an attention relation record table, in brief, maintaining an attention relation record table in a relation chain database, wherein each row of the attention relation record table corresponds to one relation chain data.
In other embodiments, the implementation of storing the relationship chain data in the relationship chain database may further include: the relational chain data is stored in a tree form, and in brief, a plurality of data trees are maintained in the relational chain database, and each data tree is used for representing one piece of relational chain data. It should be understood that the above are only two ways of storing relationship chain data in the relationship chain database according to the embodiment of the present invention, and other ways of storing relationship chain data, such as column storage, line storage, etc., may be set according to actual requirements in practical applications.
In the embodiment of the invention, the relation chain data stored in the server at least comprises concerned time information of concerned users between two users, the concerned time information comprises a time value, if the time value is a null value, the concerned time does not exist, and further the concerned time information corresponds to a user who does not pay attention to another user; and if the time value is a non-null value, indicating that the concerned time exists, and further indicating that the user corresponding to the concerned time information concerns another user.
In an embodiment, the relationship chain data stored in the server may further include user information corresponding to the attention time information, for example, target relationship chain data that records an attention situation between the target user and the associated user, where the target relationship chain data includes first attention time information of the target user concerning the associated user, second attention time information of the associated user concerning the target user, first user information corresponding to the first attention time information, and second user information corresponding to the second attention time. In this way, it can be accurately known from the first user information and the second user information in the target relationship chain data which is used for recording the attention situation between which two users.
In an embodiment, the relationship chain data stored in the server is generated or updated according to the received request for adding attention, and the server may further perform, taking the target relationship chain data as an example, before performing step S201 and step S202: receiving an attention adding request aiming at the target user and sent by the associated user; if target relation chain data for recording the attention relation between the associated user and the target user exists, updating the target relation chain data according to the attention adding request; and if target relation chain data for recording the attention information between the associated user and the target user does not exist, creating a target relation data chain according to the adding request.
In one embodiment, as can be seen from the foregoing description of the embodiments, a relationship chain database may be included in the server, and relationship chain data of a relationship of interest between any two users may be stored in the relationship chain database. Optionally, in order to ensure the security of the relationship chain data, the server may also upload the data stored in the relationship chain database to the blockchain network for storage. Based on this, the server determines whether the target relationship chain data exists in an implementation manner, which may be one or more of the following: detecting whether target relation chain data exist in a local relation chain database of a server; and sending a query request for querying the target relation chain data to the blockchain network.
In one embodiment, the storing of the destination relation chain data before receiving the request for adding attention for the target user sent by the associated user may include: and receiving an attention adding request aiming at the associated user sent by the target user, and creating target relationship chain data for recording attention between the associated user and the target user by the server. In this way, if a request related to the attention situation between the associated user and the target user is subsequently received, such as an attention request is added, an attention request is canceled, and the like, the information in the target relationship chain data may be updated according to the received request. By the method, the attention relationship between the target user and the associated user can be recorded only through one relationship chain data, two relationship chain data records are not needed, and the storage space can be saved.
For example, a user a submits an attention adding request of an attention user B to a server, the server generates a piece of relation chain data a, the relation chain data a includes attention time information of the attention user B of the user a and attention information of the attention user a of the user B, marks the attention of the attention user B of the user a in the relation chain data a, and stores a time when the attention adding request is received as a time value in the attention time information of the attention user B of the user a. In this case, the time value in the time information of interest of the user a who pays attention to the user B in the relationship chain data a is a non-null value, but the time value of interest in the time information of interest of the user B who pays attention to the user a is a null value. When the server receives an attention adding request of a user A concerned by a user B, the server searches and finds that a piece of relation chain data between the user A and the user B is generated before, at the moment, the server does not generate a new relation data chain, the relation chain data A continuously marks that the user B concerns the user A, and the time when the attention adding request is received is stored as a time value in attention time information of the user A concerned by the user B, and at the moment, the time value in the attention time information of the user B concerned by the user A and the time value in the attention time of the user A concerned by the user B are both non-null values.
In one embodiment, after the server generates the target relationship chain data according to the attention adding request, the generated target relationship chain data may be uploaded to the blockchain network for storage. In a specific implementation, after target relationship chain data are generated according to an attention adding request, the server sends a storage request carrying the target relationship chain data to a block chain network, and the storage request is used for indicating the block chain network to store the target relationship chain data into a block chain; and responding to the received storage notification sent by the block chain network, and outputting prompt information that the target relation chain network is stored to the block chain.
Based on the above, if the target relationship chain data already exists in the server, it indicates that the request for adding attention of the target user to pay attention to the associated user has already been received before the request for adding attention of the target user to pay attention to the associated user sent by the associated user is received, at this time, the time value marked in the target relationship chain data that the target user pays attention to the associated user and the first attention time information of the target user to pay attention to the associated user is a non-null value, and the time value in the second attention time information of the associated user to pay attention to the target user is a null value. Optionally, the updating the target relationship chain data according to the attention adding marker may include: and marking the concerned target user of the associated user in the target relation chain data, and storing the time when the associated user sends the attention adding request as a time value in second attention time information of the concerned target user of the associated user.
Optionally, if target relationship chain data does not exist in the server, indicating that an attention adding request of an attention associated user sent by a target user is not received before an attention adding request of the attention target user sent by the associated user is received, assuming that the target relationship chain data further includes first user information corresponding to the first attention time information and second user information corresponding to the second attention time information, the creating the target relationship chain data according to the attention adding request may include: creating target relation chain data, wherein the target relation chain data comprise first user information corresponding to the first attention time information and second user information corresponding to the second attention time information; adding the user identification of the target user to the first user information, and adding the user identification of the associated user to the second user information; and adding the time when the request for adding attention is received as a time value in second attention time information to the second attention time information.
It should be understood that, by including the first user information and the second user information in the target relationship chain data and storing the user identifier of the target user and the user identifier of the associated user in the first user information and the second user information respectively, it is possible to accurately know which user is the concern relationship between the two users according to the user identifiers stored in the first user information and the second user information. In addition, the user information and the attention time information included in the target relationship data chain are mutually corresponding, so that the attention situation between the target user and the associated user can be known according to the attention time information and the corresponding relationship between the attention time information and the user information. For example, if the time value in the first attention time information is a non-null value, since the first attention time information corresponds to the first user information in which the user identifier of the target user is stored, it may be determined that the target user pays attention to the associated user.
In one embodiment, the target user and the associated user may also submit a request for canceling attention to the server, and the server updates the target relationship chain data according to the request for canceling attention. Taking the case that the associated user sends a request for canceling attention as an example: receiving a request for canceling attention of the target user, which is sent by the associated user; deleting the time value stored in the second time of interest information in the target relationship chain data. Therefore, the target relation chain data can be dynamically updated in real time according to the change of the attention relation between the target user and the associated user, so that the follow-up operation of the business related to the attention relation based on the target relation chain data is more accurate.
S203, executing the business related to the attention relationship according to the first attention time information and the second attention time information included in the target relationship chain data.
In one embodiment, the services related to the concern relationship may include one or more of: the method comprises the steps of pushing a new work of a target user, inquiring business of fan users who pay attention to the target user, inquiring business of users who pay attention to the target user, prompting the target user that the users who pay attention to the target user input interactive operation on target content and the like. The new work pushing service of the target user refers to a service that the target user issues new works such as new posts, new articles, new small videos and the like in an application program and notifies the new works issued by the target user to a fan user who pays attention to the target user; the query of the business of the fan user who pays attention to the target user refers to the query of which users pay attention to the target user in the users using the application program; the service of the concerned user concerned by the inquiry target user refers to the concerned users of the inquiry target user; the service for prompting the target user that the concerned user inputs the interactive operation on the target content means that when the target user browses the target content, if the concerned user concerned by the target user is detected to browse the target content and input the interactive operation such as approval, comment and the like on the target content.
In one embodiment, the executing the service related to the attention relationship according to the first attention time and the second attention time included in the target relationship chain data includes: acquiring an attention relationship type between the target user and the associated user based on the first attention time information and the second attention time information; and executing the business related to the concern relationship according to the concern relationship type. Wherein the type of the attention relationship between the target user and the associated user comprises: the target user concerns the associated user, the associated user concerns the target user, the associated user and the target user concern each other, and the like.
In one embodiment, as can be seen from the foregoing, the obtaining of the attention relationship type between the target user and the associated user based on the first attention time and the second attention time includes: if the time value included in the first attention time information is a non-null value and the time value included in the second attention time information is a non-null value, determining that the attention relationship type is that the target user and the associated user pay attention to each other; if the time value included in the first attention time information is a non-null value and the time value included in the second attention time information is a null value, determining that the attention relationship type is that the target user pays attention to the associated user; and if the time value included in the first attention time information is a null value and the time value included in the second attention time information is a non-null value, determining that the attention relationship type is that the associated user pays attention to the target user.
It should be understood that the number of associated users having an attention relationship with the target user is at least one, and the above is only an example of any one of the associated users to illustrate how to determine the type of attention relationship between the target user and any one of the associated users. If the target user concerns the associated user, the target user is called a fan user of the associated user, and the associated user is called a concerned user of the target user. After the type of the attention relationship between the target user and the associated user is determined according to the first attention time information and the second attention information in the manner described above, which associated users of the at least one associated user are fan users of the target user and which associated users of the at least one associated user are attention users of the target user can be obtained, and further any service related to the attention relationship described above is executed.
In the embodiment of the invention, in response to a trigger instruction for acquiring target relation chain data corresponding to a target user, target relation chain data related to the target user is acquired, wherein the target relation chain data comprises first attention time information of the target user concerning the related user and second attention time information of the related user concerning the target user; the attention relationship between the target user and the associated user and the attention time information of the attention between the target user and the associated user are recorded by using a relationship chain data, so that the storage space for storing the relationship chain data can be saved; the server can execute the service related to the concern relationship according to the acquired target relationship chain data, and compared with the prior art that the service related to the concern relationship can be executed only by acquiring two pieces of concern relationship data, the service execution time is saved, so that the service execution efficiency can be improved.
Based on the service processing method shown in fig. 2, an embodiment of the present invention provides another service processing method, and referring to fig. 3, a flowchart of another service processing method provided in an embodiment of the present invention is shown. The service processing method shown in fig. 3 may be executed by a server, and may specifically be executed by a processor of the server. In the service processing method shown in fig. 3, the server records a plurality of pieces of relationship chain data in the form of a concern relationship record table. The service processing method shown in fig. 3 may include the following steps:
step S301, receiving an attention adding request aiming at a target user and sent by a related user.
Step S302, if target relation chain data for recording the concern relation between the associated user and the target user exists in the concern relation record table, updating the target relation chain data according to the concern adding request.
In an embodiment, some possible implementations included in step S301 and step S302 may refer to descriptions of related steps in the embodiment shown in fig. 2, and are not described herein again.
Step S303, if target relationship chain data for recording the relationship of interest between the associated user and the target user does not exist in the relationship record table of interest, creating a target data row in the relationship record table of interest, and adding data to each entry included in the target data row according to the request for adding interest to obtain target relationship chain data.
As can be seen from the foregoing, if the relationship chain data is stored in the server in the form of an attention relationship record table, each data row in the attention relationship record table corresponds to one relationship chain data, and each data column may include a first user identification entry, a second user identification entry, and a first attention time entry corresponding to the first user identification entry and a second attention time entry corresponding to the second user identification entry. The first user identification table entry may be used to store the smaller of the user identifications of the two users having an attention relationship, the second user table entry may be used to store the larger of the user identifications of the two users having an attention relationship, the first time table entry corresponding to the first user identification table entry may be used to store the attention time of the user corresponding to the larger of the user identifications corresponding to the smaller of the user identifications of the two users having an attention relationship, and the second time table entry corresponding to the second user identification table entry may be used to store the attention time of the user corresponding to the smaller of the user identifications corresponding to the larger of the user identifications of the two users having an attention relationship. Therefore, it can be said that the first user identification entry corresponds to the first time table entry, and the second user table entry corresponds to the second time table entry.
In an embodiment, the adding data to each entry included in the target data line according to the attention adding request to obtain target relationship chain data in step S303 may include: acquiring the user identification of a target user and the user identification of the associated user according to the attention adding request; determining the size relationship between the user identifier of the target user and the user identifier of the associated user, storing a larger user identifier in a first user identifier table entry of the target data row, and storing a smaller user identifier in a second user identifier table entry of the target data row; and storing the time when the attention adding request is received in a time table corresponding to a user identification table item storing the user identification of the associated user.
Optionally, in practical application, the specific storage of the larger user identifier and the smaller user identifier in which user identifier entry is not limited to the above manner, and for example, the following manner may also be used: and storing the smaller user identification in the first user identification table entry, and storing the larger user identification in the second user identification table entry.
In one embodiment, the first subscriber identity entry may be denoted as MIN _ ID, the second subscriber identity entry may be denoted as MAX _ ID, the first time entry may be denoted as MIN _ time of interest, and the second time entry may be denoted as MAX _ time of interest.
For example, assuming that the user id of the target user is qq2, and the user id of the associated user is qq3, the concern relationship record table may be as shown in fig. 4a, where the concern relationship record table shown in fig. 4a already includes multiple data rows, each data row includes corresponding data stored in a respective entry, and each data row represents one relationship chain data. After receiving an attention adding request sent by an associated user, a target data row is generated in the attention relationship record table, assuming that the target data row is represented as a data row with a sequence number of 3 in the attention relationship record table shown in fig. 4a, a first user identification entry included in the target data row is MIN _ ID 401, a second user identification entry MAX _ ID 402, a first time entry corresponding to the first user identification entry is MIN _ attention time 403, and a second time entry corresponding to the second user identification entry is MAX _ attention time 404. Further, comparing the magnitude relation between the user identifier of the target user and the user identifier of the associated user, and assuming that the user identifier qq2 of the target user is smaller than the user identifier qq3 of the associated user, storing qq2 in the first user identifier entry MIN _ ID also 401, and storing qq3 in the second user identifier entry MAX _ ID also 402; since the subscriber identity of the associated subscriber is added to the second subscriber identity entry, the time T2 at which the request for adding attention is received is added to the second timetable entry MAX _ attention time corresponding to the second subscriber identity entry, 404. At this point, the target data row filled with data is determined as target relationship chain data.
In one embodiment, based on the above description, the target data row for recording the attention between the target user and the associated user is already stored in the attention relationship record table, in this case, if other requests related to the attention between the target user and the associated user are received, the data in the target data row may be updated according to the received requests without creating new data rows.
For example, if an add attention request sent by the target user for the associated user is received, indicating that the target user pays attention to the associated user, the data in 401, 402, and 404 in the target data row is kept unchanged, since the add attention request is sent by the target user and the user identifier of the target user is stored in the first user identifier entry, the time T5 at which the add attention request is received is added to the first time entry corresponding to the first user identifier entry 403, as shown in fig. 4b, the data in the first user identifier entry 401, the second user identifier entry 402, and the second time entry 404 in the target data row are kept unchanged, and the time value in the first time entry is changed from the null value in fig. 4a to T5 shown in fig. 4 b.
For another example, if a request for canceling attention of the target user sent by the associated user is received, indicating that the associated user does not pay attention to the target user any more, the time value in the time table entry corresponding to the user identifier table entry storing the user identifier of the associated user in the target data row is deleted, and the time value becomes a null value. For example, in the attention relationship record table shown in fig. 4b, if a request for canceling attention sent by the associated user is received, since the request for canceling attention is sent by the associated user and the user identifier of the associated user is stored in the second user identifier entry 402, the time value T2 in the second time entry 404 corresponding to the second user identifier entry is deleted, and the time value in the second time entry becomes a null value, as shown in fig. 4 c.
It should be understood that, by recording the relationship chain data in the form of the concern relationship recording table, it may be implemented that the concern between any two users having concern relationships can be recorded by using one data row, whereas in the prior art, two data rows are required to store the concern between any two users having concern relationships. The following examples compare the relationship chain data stored by using the concern relationship record table shown in the embodiment of the present invention with the relationship chain data stored by using the concern relationship record table in the prior art:
for example, it is assumed that users having attention relationship may include a first user and a third user, the first user and the second user, and the second user and the third user, the user identification of the first user is qq1, the user identification of the second user is qq2, and the user identification of the third user is qq3, the time of the third user paying attention to the first user is T4, the time of the first user paying attention to the second user is T3, the time of the second user paying attention to the third user is T2, and the time of the second user paying attention to the first user is T1. It is assumed that the magnitude relationship between the respective user identities may be qq3> qq2> qq 1.
The attention relationship between any two users as described above may be in the form of an attention relationship record table in the prior art as shown in fig. 5a, and the manner of generating the attention relationship record table shown in fig. 5a may be described by taking the first user and the second user as an example: when an attention adding request which is sent by a first user and aims at a second user is received, a data line is created as shown in 501, wherein the data line comprises a source user identification table item, a target user identification table item and an attention time table item, the source user identification table item is used for recording a user identification of the first user sending the attention adding request, the target user identification table item is used for recording a user identification of the second user to be concerned, the attention time table item is used for recording the time when the first user pays attention to the second user, and the time when the attention adding request sent by the first user is received can be taken as the attention time of the first user to the second user in a normal condition; data is filled in each entry included in the data line 501 according to the request for adding attention, so that relationship chain data for recording attention between the first user and the second user is obtained, which may also be referred to as relationship chain data corresponding to the first user or the second user. Similarly, when receiving an attention adding request sent by a second user for a first user, the server creates a new data line 502 for recording attention between the first user and the second user in the same manner as described above.
The attention relationship between any two users in the above embodiment of the present invention may be in the form of an attention relationship record table as shown in fig. 5b, where each data row of the attention relationship record table shown in fig. 5b includes 4 entries, which are: MIN _ ID, MAX _ ID, MIN _ care, and MAX _ care time entries.
The MIN _ ID table entry is used for storing the smaller of the user identifications of the two users with concern, the MAX _ ID table entry is used for storing the larger of the user identifications of the two users with concern, the MIN _ concern time table entry is used for storing the concern time of the user corresponding to the smaller of the user identifications of the two users with concern to the user corresponding to the larger, and the MAX _ concern time table entry is used for storing the concern time of the user corresponding to the smaller of the user identifications of the two users with concern.
In the following, taking an example of storing the attention relationship between the first user and the second user in the attention relationship record table, how to adopt the above-mentioned attention situation between the users of the record attention relationship according to the embodiment of the present invention. Assuming that the 503 data line in fig. 5b is the relationship chain data created by the server for recording the attention situation between the first user and the second user, because the user identification qq1 of the first user is smaller than the user identification qq2 of the second user, qq1 is stored in the MIN _ ID entry of the 503 data line and qq2 is stored in the MAX _ ID entry of the 503 data line. In addition, the time that the first user attended to the second user was T3, the time that the second user attended to the first user was T1, T3 was stored in the MIN _ attended timetable entry of the 503 data line, and T1 was stored in the MAX _ attended timetable entry of the 503 data line. According to this method, the attention situation between the other two users having the attention relation is recorded in the attention relation record table, so as to obtain the attention relation record table shown in fig. 5 b.
Comparing the attention relationship record table shown in fig. 5a and fig. 5b, it can be seen that there are two data rows 501 and 502 for recording the attention between the first user and the second user in the attention relationship record table shown in fig. 5a, and there is only one data row 503 for recording the attention between the first user and the second user in the attention relationship record table shown in fig. 5 b. Thus, the attention relationship record table shown in fig. 5b can save storage space, and only one network call is needed when the attention condition between the first user and the second user needs to be acquired subsequently, which reduces the network call times compared with the prior art.
And step S304, receiving a trigger instruction for acquiring target relation chain data corresponding to the target user.
Step S305, responding to the trigger instruction, and acquiring target relation chain data related to the target user.
In one embodiment, the target relationship chain data may refer to a data row related to the target user in the concern relationship record table, and the target relationship chain data includes first concern time information of the target user concerning the associated user and second concern time information of the associated user concerning the target user, where the first concern time information includes a time value and an entry name stored in a time entry corresponding to the target user in the concern relationship record table; the second attention time information includes a time value and an entry name stored in a time entry corresponding to the attention relationship record table and the associated user. For example, the target user is the first user, the data row related to the first user in the concern relationship record table shown in fig. 5b includes 503 and 504, and for 503, the first concern time information included in the target relationship chain data may be MIN _ concern time T3, and the second concern time information may be MAX _ concern time T1.
And S306, acquiring the attention relationship type between the target user and the associated user based on the first attention time information and the second attention time information.
And step S307, executing the business related to the concern relationship according to the concern relationship type between the target user and the associated user.
In an embodiment, as can be seen from the foregoing, the time values included in the first attention time information and the second attention time information may be null values or non-null values, the first attention time information is used to record the attention time of the target user to the associated user, and if the time value in the first attention time information is null, it indicates that there is no attention time of the target user to the associated user, that is, the target user may never pay attention to the associated user, or the target user has paid attention to the associated user once but has cancelled attention to the associated user afterwards, in short, the target user does not pay attention to the associated user at the current time. Similarly, the second attention time information is used for recording the attention time of the associated user to the target user, and if the time value in the second attention time information is null, it indicates that there is no attention time of the associated user to the target user, that is, the associated user may never pay attention to the target user, or the associated user pays attention to the target user once, but cancels the attention to the target user afterwards, in short, the associated user does not pay attention to the target user at the current time.
Based on the above, the implementation of step S306 may include: if the time value included in the first attention time information is a non-null value and the time value included in the second attention time information is a non-null value, determining that the attention relationship type is that the target user and the associated user pay attention to each other; if the time value included in the first attention time information is a non-null value and the time value included in the second attention time information is a null value, determining that the attention relationship type is that the target user pays attention to the associated user; and if the time value included in the first attention time information is a null value and the time value included in the second attention time information is a non-null value, determining that the attention relationship type is that the associated user pays attention to the target user.
In an embodiment, an attention relationship type determination table for determining an attention relationship type between any two users may be stored in the server, where the attention relationship type determination table may include a first time table, a second time table, and an attention relationship type, and referring to fig. 6, a schematic diagram of an attention relationship type determination table according to an embodiment of the present invention is provided, and a correspondence relationship between time values of the first time table and the second time table and the attention relationship type is recorded in the attention relationship type determination table. In fig. 6, it is assumed that a first time table is represented as MIN _ attention time, and a second time table is represented as MAX _ attention time, and if a time value in the first time table is a non-null value and a time value in the second time table is a non-null value, it indicates that a user corresponding to a user identifier in the first user identifier table MIN _ ID and a user corresponding to a user identifier in the second user identifier table MAX _ ID pay attention to each other; if the time value in the first time table entry is null and the time value in the second time table entry is non-null, it indicates that the user corresponding to the user identifier MAX _ ID in the second user identifier table entry concerns the user corresponding to the user identifier in the first user identifier MIN _ ID table entry; if the time value in the first time table entry is a non-null value and the time value in the second time table entry is a null value, it indicates that the user corresponding to the user identifier in the first user identifier table entry MIN _ ID pays attention to the user in the second user identifier table entry MAX _ ID; if the time values in the first time table entry and the second time table entry are both null values, it indicates that there is no concern relationship between the user corresponding to the first user identification table entry MIN _ ID and the second user identification table entry MAX _ ID.
In the embodiment of the invention, a server stores each relationship chain data in the form of an attention relationship record table, and when an attention adding request which is sent by an associated user and aims at a target user is received, if target relationship chain data which records the attention relationship between the associated user and the target user exists in the attention relationship record table, the target relationship chain data is updated according to the attention adding request; if the target relation chain data does not exist in the concern relation record table, creating a target data row in the concern relation record table, and adding data to each table entry included in the target data row according to the concern adding request to obtain the target relation chain data. By the method, the attention relationship between any two users can be recorded by only one relationship chain data in the attention relationship recording table, and compared with a method of recording data by two relationship chains in the prior art, the method can save storage space. In addition, when a trigger instruction about acquiring target relation chain data corresponding to a target user is received, the trigger instruction is responded, the target relation chain data related to the target user is acquired, the attention relation type between the target user and the associated user is acquired based on the first attention time information and the second attention time information, finally, the business related to the attention relation is executed according to the attention relation type, and the server can determine the attention relation type between the target user and the associated user through the target relation chain data.
Based on the embodiment of the service processing method, the embodiment of the invention provides a service processing device. Referring to fig. 7, which is a schematic structural diagram of a service processing apparatus according to an embodiment of the present invention, the service processing apparatus shown in fig. 7 may operate the following units:
a receiving unit 701, configured to receive a trigger instruction for acquiring target relationship chain data corresponding to a target user;
a processing unit 702, configured to, in response to the trigger instruction, acquire target relationship chain data related to the target user, where the target relationship chain data includes first attention time information that the target user pays attention to an associated user and second attention time information that the associated user pays attention to the target user;
an executing unit 703 is configured to execute a service related to the attention relationship according to the first attention time information and the second attention time information included in the target relationship chain data.
In one embodiment, when executing a service related to an attention relationship according to the first attention time information and the second attention time information included in the target relationship chain data, the execution unit 703 executes the following operations: acquiring an attention relationship type between the target user and the associated user based on the first attention time information and the second attention time information; and executing the business related to the concern relationship according to the concern relationship type.
In one embodiment, the time value included in the first attention time information and the second attention time information is a null value or a non-null value, and the execution unit 703 performs the following operations when acquiring the attention relationship type between the target user and the associated user based on the first attention time and the second attention time: if the time value included in the first attention time information is a non-null value and the time value included in the second attention time information is a non-null value, determining that the attention relationship type is that the target user and the associated user pay attention to each other; if the time value included in the first attention time information is a non-null value and the time value included in the second attention time information is a null value, determining that the attention relationship type is that the target user pays attention to the associated user; and if the time value included in the first attention time information is a null value and the time value included in the second attention time information is a non-null value, determining that the attention relationship type is that the associated user pays attention to the target user.
In one embodiment, the receiving unit 701 is further configured to receive an attention adding request sent by the associated user and addressed to the target user; the processing unit 702 is further configured to, if there exists target relationship chain data for recording an attention relationship between the associated user and the target user, update the target relationship chain data according to the attention adding request; and if target relation chain data for recording the attention information between the associated user and the target user does not exist, generating the target relation chain data according to the adding request.
In one embodiment, the processing unit 702 performs the following operations when generating the target relationship chain data according to the request for adding attention: creating new relation chain data, wherein the new relation chain data comprise first attention time information, first user information corresponding to the first attention time information, second attention time information and second user information corresponding to the second attention time information; adding the user identification of the target user to the first user information, and adding the user identification of the associated user to the second user information; and adding the time of receiving the attention adding request as a time value in second attention time information into the second attention time information to obtain target relation chain data.
In one embodiment, the target relationship chain data is stored in the form of a concern relationship record table, where each data row is used to store one relationship chain data, and the processing unit 702 performs the following operations when generating the target relationship chain data according to the request for adding concern: creating a target data row in the concern relationship record table, where the target data row includes a first user identifier entry, a second user identifier entry, a first time entry corresponding to the first user identifier entry, and a second time entry corresponding to the second user identifier entry; and adding data in each table entry of the target data row according to the attention adding request to obtain target relation chain data.
In one embodiment, the processing unit 702, when adding data in each entry of the target data line according to the add attention request, performs the following operations: acquiring the user identification of a target user and the user identification of the associated user according to the attention adding request; determining the size relationship between the user identifier of the target user and the user identifier of the associated user, storing a larger user identifier in a first user identifier table entry of the target data row, and storing a smaller user identifier in a second user identifier table entry of the target data row; and storing the time when the attention adding request is received in a time table corresponding to a user identification table item storing the user identification of the associated user.
In one embodiment, the first attention time information includes a time value and an entry name stored in a time entry corresponding to the target user in the attention relationship record table; the second attention time information includes a time value and an entry name stored in a time entry corresponding to the attention relationship record table and the associated user.
In one embodiment, the receiving unit 701 is further configured to receive a request for canceling attention, sent by the associated user, for the target user; the processing unit 702 is further configured to delete the time value stored in the corresponding time table entry storing the associated user.
In an embodiment, the number of the associated users is at least one, the triggering instruction includes obtaining a fan user who pays attention to the target user, and the execution unit 703 executes the following operations when executing a service related to the attention relationship according to the type of the attention relationship: when the target user is detected to issue target information, a fan user concerning the target user is obtained from at least one associated user according to the concerning relationship type; and sending prompt information that the target user publishes the target information to the fan user.
In an embodiment, the number of the associated users is at least one, the triggering instruction includes obtaining an attention user concerned by the target user, and the execution unit 703 executes the following operations when executing the service related to the attention relationship according to the attention relationship type: when the target user is detected to browse target content in a user interface, acquiring an interactive user who inputs interactive operation information aiming at the target content; acquiring an attention user concerned by the target user from at least one associated user according to the attention relationship type; and if the interactive users comprise concerned users of the target users, outputting prompt information that the concerned users input interactive operation on the target content.
In an embodiment, the service processing apparatus further includes a sending unit 704 and an output unit 705, where the sending unit 704 is configured to send a storage request carrying the target relationship chain data to a blockchain network, and the storage request is used to instruct the blockchain network to store the target relationship chain data in the blockchain network; the output unit 705 is configured to output, in response to a received storage notification sent by a blockchain network, a notification that the target relationship chain data has been stored in the blockchain network.
According to an embodiment of the present invention, the steps involved in the service processing methods shown in fig. 2 and fig. 3 may be performed by the units in the service processing apparatus shown in fig. 7. For example, step S201 shown in fig. 2 may be executed by the receiving unit 701 in the service processing device shown in fig. 7, step S202 may be executed by the processing unit 702 in the service processing device shown in fig. 7, and step S203 may be executed by the executing unit 703 in the service processing device shown in fig. 7; as another example, step S301 and step S304 shown in fig. 3 may be executed by the receiving unit 701 in the service processing apparatus shown in fig. 7, step S302-step S303, and step S305-step S306 may be executed by the processing unit 702 in the service processing apparatus shown in fig. 7, and step S307 may be executed by the executing unit 703 in the service processing apparatus shown in fig. 7.
According to another embodiment of the present invention, the units in the service processing apparatus shown in fig. 7 may be respectively or entirely combined into one or several other units to form another unit, or some unit(s) therein may be further split into multiple units with smaller functions to form another unit, which may implement the same operation without affecting implementation of technical effects of the embodiment of the present invention. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present invention, the service-based processing device may also include other units, and in practical applications, these functions may also be implemented by being assisted by other units, and may be implemented by cooperation of multiple units.
According to another embodiment of the present invention, the business processing apparatus as shown in fig. 7 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the corresponding method as shown in fig. 2 or fig. 3 on a general-purpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and a storage element, and a business processing method according to an embodiment of the present invention may be implemented. The computer program may be embodied on a computer-readable storage medium, for example, and loaded into and executed by the above-described computing apparatus via the computer-readable storage medium.
In the embodiment of the invention, in response to a trigger instruction for acquiring target relation chain data corresponding to a target user, target relation chain data related to the target user is acquired, wherein the target relation chain data comprises first attention time information of the target user concerning the related user and second attention time information of the related user concerning the target user; the attention relationship between the target user and the associated user and the attention time information of the attention between the target user and the associated user are recorded by using a relationship chain data, so that the storage space for storing the relationship chain data can be saved; the server can execute the service related to the concern relationship according to the acquired target relationship chain data, and compared with the prior art that the service related to the concern relationship can be executed only by acquiring two pieces of concern relationship data, the service execution time is saved, so that the service execution efficiency can be improved.
Based on the above method embodiment and apparatus embodiment, an embodiment of the present invention further provides a server, referring to fig. 8, which is a schematic structural diagram of a server provided in an embodiment of the present invention, and the server shown in fig. 8 may at least include a processor 801, an input interface 802, an output interface 803, and a computer storage medium 804. The processor 801, the input interface 802, the output interface 803, and the computer storage medium 804 may be connected by a bus or other means.
A computer storage medium 804 may be stored in the memory of the node device, the computer storage medium 1304 being for storing a computer program comprising program instructions, the processor 1301 being for executing the program instructions stored by the computer storage medium 804. The processor 801 (or CPU) is a computing core and a control core of the server, and is adapted to implement one or more instructions, and in particular, is adapted to load and execute the one or more instructions so as to implement a corresponding method flow or a corresponding function; in one embodiment, the processor 801 according to the embodiment of the present invention may be configured to perform: receiving a trigger instruction for acquiring target relation chain data corresponding to a target user; responding to a trigger instruction, acquiring target relation chain data related to a target user, wherein the target relation chain data comprise first attention time information used for storing the target user to pay attention to the associated user and second attention time information used for storing the associated user to pay attention to the target user; and executing the business related to the attention relationship according to the first attention time information and the second attention time information included in the target relationship chain data.
An embodiment of the present invention further provides a computer storage medium (Memory), which is a Memory device in the node device and is used to store programs and data. It is understood that the computer storage medium herein may include a built-in storage medium in the server, and may also include an extended storage medium supported by the server. The computer storage media provides storage space that stores the operating system of the server. Also stored in this memory space are one or more instructions, which may be one or more computer programs (including program code), suitable for loading and execution by processor 801. The computer storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; and optionally at least one computer storage medium located remotely from the processor.
In one embodiment, one or more instructions stored in a computer storage medium may be loaded and executed by the processor 801 to implement the corresponding steps of the method in the embodiment of the business processing method described above with reference to fig. 2 and 3, and in particular, the one or more instructions stored in the computer storage medium may be loaded and executed by the processor 1301 to implement the following steps: receiving a trigger instruction for acquiring target relation chain data corresponding to a target user; responding to a trigger instruction, acquiring target relation chain data related to a target user, wherein the target relation chain data comprise first attention time information used for storing the target user to pay attention to the associated user and second attention time information used for storing the associated user to pay attention to the target user; and executing the business related to the attention relationship according to the first attention time information and the second attention time information included in the target relationship chain data.
In one embodiment, when executing a service related to an attention relationship according to the first attention time information and the second attention time information included in the target relationship chain data, the processor 801 performs the following operations: acquiring an attention relationship type between the target user and the associated user based on the first attention time information and the second attention time information; and executing the business related to the concern relationship according to the concern relationship type.
In one embodiment, the time value included in the first attention time information and the second attention time information is null or non-null, and the processor 801 performs the following operations when acquiring the attention relationship type between the target user and the associated user based on the first attention time and the second attention time: if the time value included in the first attention time information is a non-null value and the time value included in the second attention time information is a non-null value, determining that the attention relationship type is that the target user and the associated user pay attention to each other; if the time value included in the first attention time information is a non-null value and the time value included in the second attention time information is a null value, determining that the attention relationship type is that the target user pays attention to the associated user; and if the time value included in the first attention time information is a null value and the time value included in the second attention time information is a non-null value, determining that the attention relationship type is that the associated user pays attention to the target user.
In one embodiment, the processor 801 is further configured to receive an add attention request for the target user sent by the associated user; if target relation chain data for recording the attention relation between the associated user and the target user exists, updating the target relation chain data according to the attention adding request; and if target relation chain data for recording the attention information between the associated user and the target user does not exist, generating the target relation chain data according to the adding request.
In one embodiment, the processor 801 generating target relationship chain data according to the request for adding attention includes: creating new relation chain data, wherein the new relation chain data comprise first attention time information, first user information corresponding to the first attention time information, second attention time information and second user information corresponding to the second attention time information; adding the user identification of the target user to the first user information, and adding the user identification of the associated user to the second user information; and adding the time of receiving the attention adding request as a time value in second attention time information into the second attention time information to obtain target relation chain data.
In one embodiment, the target relationship chain data is stored in the form of a concern relationship record table, where each data row in the concern relationship record table is used to store one relationship chain data, and the processor 801 generates the target relationship chain data according to the request for adding concern, including: creating a target data row in the concern relationship record table, where the target data row includes a first user identifier entry, a second user identifier entry, a first time entry corresponding to the first user identifier entry, and a second time entry corresponding to the second user identifier entry; and adding data in each table entry of the target data row according to the attention adding request to obtain target relation chain data.
In one embodiment, the processor 801 adding data in each entry of the target data line according to the add attention request comprises: acquiring the user identification of a target user and the user identification of the associated user according to the attention adding request; determining the size relationship between the user identifier of the target user and the user identifier of the associated user, storing a larger user identifier in a first user identifier table entry of the target data row, and storing a smaller user identifier in a second user identifier table entry of the target data row; and storing the time when the attention adding request is received in a time table corresponding to a user identification table item storing the user identification of the associated user.
In one embodiment, the first attention time information includes a time value and an entry name stored in a time entry corresponding to the target user in the attention relationship record table; the second attention time information includes a time value and an entry name stored in a time entry corresponding to the attention relationship record table and the associated user.
In one embodiment, the processor 801 is further configured to receive a request for canceling attention from the associated user for the target user; and deleting the time value stored in the corresponding time table item for storing the associated user.
In one embodiment, the processor 801 includes at least one associated user, the triggering instruction includes obtaining a fan user who concerns the target user, and executing a service related to a concern relationship according to the concern relationship type, including: when the target user is detected to issue target information, a fan user concerning the target user is obtained from at least one associated user according to the concerning relationship type; and sending prompt information that the target user publishes the target information to the fan user.
In one embodiment, the number of the associated users is at least one, the triggering instruction includes obtaining an attention user concerned by the target user, and the processor 801 executes a service related to an attention relationship according to the attention relationship type, including: when the target user is detected to browse target content in a user interface, acquiring an interactive user who inputs interactive operation information aiming at the target content; acquiring an attention user concerned by the target user from at least one associated user according to the attention relationship type; and if the interactive users comprise concerned users of the target users, outputting prompt information that the concerned users input interactive operation on the target content.
In one embodiment, the processor 801 is further configured to: sending a storage request carrying the target relation chain data to a block chain network, wherein the storage request is used for indicating the block chain network to store the target relation chain data into the block chain network; and responding to the received storage notification sent by the blockchain network, and outputting prompt information that the target relation chain data is stored in the blockchain network.
An embodiment of the present invention further provides a computer storage medium (Memory), which is a Memory device in the node device and is used to store programs and data. It is understood that the computer storage medium herein may include a built-in storage medium in the server, and may also include an extended storage medium supported by the server. The computer storage media provides storage space that stores the operating system of the server. Also stored in this memory space are one or more instructions, which may be one or more computer programs (including program code), suitable for loading and execution by processor 801. The computer storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; and optionally at least one computer storage medium located remotely from the processor.
The above disclosure is intended to be illustrative of only some embodiments of the invention, and is not intended to limit the scope of the invention.

Claims (14)

1. A method for processing a service, comprising:
receiving a trigger instruction for acquiring target relation chain data corresponding to a target user;
responding to the trigger instruction, acquiring a piece of target relation chain data related to the target user, wherein the target relation chain data comprises first attention time information of the target user concerning the associated user and second attention time information of the associated user concerning the target user;
acquiring an attention relationship type between the target user and the associated user based on the first attention time information and the second attention time information;
and executing the business related to the concern relationship according to the concern relationship type.
2. The method of claim 1, wherein the first time of interest information and the second time of interest information comprise time values that are null or non-null, and wherein the obtaining the type of interest relationship between the target user and the associated user based on the first time of interest and the second time of interest comprises:
if the time value included in the first attention time information is a non-null value and the time value included in the second attention time information is a non-null value, determining that the attention relationship type is that the target user and the associated user pay attention to each other;
if the time value included in the first attention time information is a non-null value and the time value included in the second attention time information is a null value, determining that the attention relationship type is that the target user pays attention to the associated user;
and if the time value included in the first attention time information is a null value and the time value included in the second attention time information is a non-null value, determining that the attention relationship type is that the associated user pays attention to the target user.
3. The method of claim 1, wherein prior to said obtaining target relationship chain data associated with said target user, said method further comprises:
receiving an attention adding request aiming at the target user and sent by the associated user;
if target relation chain data for recording the attention relation between the associated user and the target user exists, updating the target relation chain data according to the attention adding request;
and if target relation chain data for recording the attention information between the associated user and the target user does not exist, generating the target relation chain data according to the adding request.
4. The method of claim 3, wherein the generating target relationship chain data from the add interest request comprises:
creating new relation chain data, wherein the new relation chain data comprise first attention time information, first user information corresponding to the first attention time information, second attention time information and second user information corresponding to the second attention time information;
adding the user identification of the target user to the first user information, and adding the user identification of the associated user to the second user information;
and adding the time of receiving the attention adding request as a time value in second attention time information into the second attention time information to obtain target relation chain data.
5. The method of claim 3, wherein the target relationship chain data is stored in the form of a concern relationship record table, each data row in the concern relationship record table is used for storing one relationship chain data, and the generating target relationship chain data according to the request for adding concern comprises:
creating a target data row in the concern relationship record table, where the target data row includes a first user identifier entry, a second user identifier entry, a first time entry corresponding to the first user identifier entry, and a second time entry corresponding to the second user identifier entry;
and adding data in each table entry of the target data row according to the attention adding request to obtain target relation chain data.
6. The method of claim 5, wherein said adding data in entries of said target data line in accordance with said add attention request comprises:
acquiring the user identification of a target user and the user identification of the associated user according to the attention adding request;
determining the size relationship between the user identifier of the target user and the user identifier of the associated user, storing a larger user identifier in a first user identifier table entry of the target data row, and storing a smaller user identifier in a second user identifier table entry of the target data row;
and storing the time when the attention adding request is received in a time table corresponding to a user identification table item storing the user identification of the associated user.
7. The method of claim 6, wherein the first attention time information includes a time value and an entry name stored in a time entry corresponding to the target user in the attention relationship record table; the second attention time information includes a time value and an entry name stored in a time entry corresponding to the attention relationship record table and the associated user.
8. The method of claim 6, wherein the method further comprises:
receiving a request for canceling attention of the target user, which is sent by the associated user;
and deleting the time value stored in the corresponding time table item for storing the associated user.
9. The method of claim 1, wherein the number of the associated users is at least one, the triggering instruction includes obtaining fan users who focus on the target user, and the executing the service related to the focus relationship according to the focus relationship type includes:
when the target user is detected to issue target information, a fan user concerning the target user is obtained from at least one associated user according to the concerning relationship type;
and sending prompt information that the target user publishes the target information to the fan user.
10. The method according to claim 1, wherein the number of the associated users is at least one, the triggering instruction includes obtaining a user of interest that the target user concerns, and the executing the service related to the relationship of interest according to the type of the relationship of interest includes:
when the target user is detected to browse target content in a user interface, acquiring an interactive user who inputs interactive operation information aiming at the target content;
acquiring an attention user concerned by the target user from at least one associated user according to the attention relationship type;
and if the interactive users comprise concerned users of the target users, outputting prompt information that the concerned users input interactive operation on the target content.
11. The method of claim 3, wherein after generating target relationship chain data according to the add request, the method further comprises:
sending a storage request carrying the target relation chain data to a block chain network, wherein the storage request is used for indicating the block chain network to store the target relation chain data into the block chain network;
and responding to the received storage notification sent by the blockchain network, and outputting prompt information that the target relation chain data is stored in the blockchain network.
12. A traffic processing apparatus, comprising:
the receiving unit is used for receiving a trigger instruction for acquiring target relation chain data corresponding to a target user;
the processing unit is used for responding to the trigger instruction, and acquiring a piece of target relation chain data related to the target user, wherein the target relation chain data comprises first attention time information of the target user concerning the associated user and second attention time information of the associated user concerning the target user;
an execution unit, configured to obtain a type of attention relationship between the target user and the associated user based on the first attention time information and the second attention time information; and executing the business related to the concern relationship according to the concern relationship type.
13. A server, characterized by further comprising:
a processor adapted to implement one or more instructions; and the number of the first and second groups,
computer storage medium storing one or more instructions adapted to be loaded by the processor and to perform a business process method according to claims 1-11.
14. A computer storage medium having computer program instructions stored therein, which when executed by a processor, is configured to perform a business process method according to any one of claims 1-11.
CN202010068140.8A 2020-01-20 2020-01-20 Service processing method, device, server and storage medium Active CN111324674B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010068140.8A CN111324674B (en) 2020-01-20 2020-01-20 Service processing method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010068140.8A CN111324674B (en) 2020-01-20 2020-01-20 Service processing method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN111324674A CN111324674A (en) 2020-06-23
CN111324674B true CN111324674B (en) 2021-10-15

Family

ID=71166963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010068140.8A Active CN111324674B (en) 2020-01-20 2020-01-20 Service processing method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111324674B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150278367A1 (en) * 2012-07-13 2015-10-01 Google Inc. Determination and Presentation of Content from Connections
CN103838831B (en) * 2014-02-21 2017-02-22 东南大学 On-line social network mass data storage method based on community division
CN106294373B (en) * 2015-05-15 2020-03-10 阿里巴巴集团控股有限公司 Comment information reply method and device
CN106470150B (en) * 2015-08-21 2020-04-24 腾讯科技(深圳)有限公司 Relation chain storage method and device
CN105184326A (en) * 2015-09-30 2015-12-23 广东工业大学 Active learning multi-label social network data analysis method based on graph data
CN109145201B (en) * 2018-07-26 2020-11-10 百度在线网络技术(北京)有限公司 Information management method, device, equipment and storage medium based on block chain

Also Published As

Publication number Publication date
CN111324674A (en) 2020-06-23

Similar Documents

Publication Publication Date Title
JP3489123B2 (en) Application binding method
US7574488B2 (en) Method and apparatus for peer-to-peer file sharing
JP4824110B2 (en) Computer-implemented method, computer program, and data processing system for inheriting page layout for a page
US20080126944A1 (en) Method for processing a web page for display in a wiki environment
US20080010387A1 (en) Method for defining a Wiki page layout using a Wiki page
US20080010338A1 (en) Method and apparatus for client and server interaction
US20080010609A1 (en) Method for extending the capabilities of a Wiki environment
US20120072465A1 (en) Dynamic schema-based api mapping for traversing inter-cloud application boundaries
US20080010345A1 (en) Method and apparatus for data hub objects
JP4787617B2 (en) Techniques for supporting application-specific access control using separate servers
JPH1069423A (en) Hypermedia system and its directory data managing method
JP2006505872A (en) Techniques for managing multiple hierarchies of data from a single interface
CN109189857A (en) Data-sharing systems, method and apparatus based on block chain
CN111680041A (en) Safe and efficient access method for heterogeneous data
CN110737747A (en) data operation method, device and system
US7640227B2 (en) Recording medium having a file sharing program recorded thereon and file sharing apparatus
JP5984355B2 (en) Distributed database system and distributed data processing system
CN105843809B (en) Data processing method and device
US20140032716A1 (en) System and method for locking exclusive access to a divided resource
CN111324674B (en) Service processing method, device, server and storage medium
US10949423B2 (en) Operation management device, operation management method, and operation management system
CN111858621B (en) Method, apparatus, device and computer readable medium for monitoring business process
US8655835B2 (en) Information generating device where information is distributed among node devices, information generating method where information is distributed among node devices, and computer readable recording medium for generating information which is distributed among node devices
JP2006146615A (en) Object-related information management program, management method and management apparatus
CN114281410A (en) Redis cluster proxy mode instruction response method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40025273

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant