The present invention relates to content sharing technologies, and specifically, to a content sharing method and a social synchronization apparatus.
Currently, in order to vitalize and promote provided content, communication circles may be established on some over the top (OTT) content servers for the provided content, and popularity of the content is increased as members in the communication circles communicate with each other about the content, where the content may be: social TV, an online book, an online game, online music, video content, and the like. However, because a quantity of persons and a vitality degree of the communication circles established on the content servers are restricted by users of the content servers, there may be seriously insufficient users, which leads to a low popularity of the content; whereas some third-party social networking sites (SNS) are very popular, and it is desirable that the OTT content of the OTT content servers be promoted by virtue of popularity of the third-party SNSs. Therefore, the OTT content servers further need to provide a capability of sharing the OTT content on the third-party SNSs.
For example, after opening a video on a video website, a user may choose to share the video on a third-party SNS, and a new microblog or a new post published by the user may appear on the third-party SNS, where content of the microblog or the post includes a link address of the shared video. In this way, a follower or a friend of the user on the third-party SNS may see the link shared in the microblog or the post, watch content of the video by clicking the link, and may further perform an operation such as commenting on or forwarding the microblog or the post.
However, same content of a content server that is shared on the third-party SNS by different users is not associated, so that attention to the content on the third-party SNS cannot be accurately reflected.
Embodiments of the present invention provide a content sharing method and a social synchronization apparatus, which can solve a problem that same content of a content server that is shared by different users on a third-party SNS is not associated, so that attention to the content on the third-party SNS can be accurately reflected.
According to a first aspect, an embodiment of the present invention provides a content sharing method, including:
receiving a first content sharing request sent by a content server, where the first content sharing request includes an internal identifier of content that a user requests to share and an identifier of a destination website, where the internal identifier of the content is an identifier of the content on the content server; acquiring an identifier of the user on the destination website; querying a stored first correspondence among the internal identifier of the content, the identifier of the destination website, and an external identifier of the content according to the internal identifier of the content and the identifier of the destination website, to acquire the external identifier of the content on the destination website, where the external identifier of the content is an identifier generated by the destination website for the content when the content is shared by using the content server for the first time on the destination website; and sending a second content sharing request to the destination website according to the identifier of the destination website and the identifier of the user on the destination website, where the second content sharing request carries the external identifier of the content and the identifier of the user on the destination website, so as to share the content on a home page of the user on the destination website.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the method further includes: when no external identifier corresponding to the content on the destination website is acquired by querying the stored first correspondence according to the internal identifier of the content and the identifier of the destination website, sending a content publishing request to the destination website according to the identifier of the destination website and the identifier of the user on the destination website, where the content publishing request carries the internal identifier of the content and the identifier of the user on the destination website, so as to publish the content on the home page of the user on the destination website; receiving a content publishing response returned by the destination website, where the content publishing response includes an external identifier of the content; and storing a first correspondence among the internal identifier of the content, the identifier of the destination website, and the external identifier of the content.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the method further includes: receiving a first comment sharing request, sent by the content server, to comment on the content, where the first comment sharing request includes the internal identifier of the content, an internal identifier of a comment, the identifier of the destination website, and the comment, where the internal identifier of the comment is an identifier of the comment on the content server; acquiring, according to the internal identifier of the content, the identifier of the destination website, and the stored first correspondence, the external identifier of the content that is on the destination website and corresponding to the internal identifier of the content; sending a second comment sharing request to comment on the content to the destination website according to the external identifier of the content and the identifier of the destination website, where the second comment sharing request includes the comment and the external identifier of the content, so as to publish the comment to the content on the destination website; receiving a comment sharing response sent by the destination website, where the comment sharing response includes an external identifier of the comment and the external identifier of the content, where the external identifier of the comment is generated when the comment is published to the content on the destination website; and storing a second correspondence among the internal identifier of the content, the internal identifier of the comment, and the external identifier of the comment.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the method further includes: sending a comment acquisition request to the destination website, where the comment acquisition request includes the external identifier of the content; and receiving a comment acquisition response returned by the destination website, where the comment acquisition response includes a third correspondence between the comment on the content and the external identifier of the comment.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes: acquiring external identifiers of all comments on the content from the second correspondence according to the second correspondence and the internal identifier of the content; searching the second correspondence and the third correspondence for a duplicate external identifier of a comment, and deleting, from the third correspondence, the comment corresponding to the duplicate external identifier of the comment; and sending a remaining comment in the third correspondence after the deletion to the content server according to the internal identifier of the content, so that the content server publishes the remaining comment to the content.
With reference to the first aspect or any of the first to the fourth possible implementation manners of the first aspect, in a fifth possible implementation manner of the first aspect, the method further includes: when the first content sharing request further includes an account of the user on the content server, the acquiring an identifier of the user on the destination website is specifically: acquiring the identifier of the user on the destination website according to the account of the user on the content server, the identifier of the destination website, and a stored fourth correspondence between the account of the user on the content server and the identifier of the user on the destination website; or when the first content sharing request further includes an account of the user on the content server, the acquiring an identifier of the user on the destination website is specifically: acquiring, from a fourth correspondence stored on the content server, the identifier of the user on the destination website according to the account of the user on the content server and the identifier of the destination website; or when the first content sharing request further includes the identifier of the user on the destination website, the acquiring an identifier of the user on the destination website is specifically: acquiring the identifier of the user on the destination website from the first content sharing request.
According to a second aspect, the present invention provides a social synchronization apparatus, including: a first receiving unit, configured to receive a first content sharing request sent by a content server, where the first content sharing request includes an internal identifier of content that a user requests to share and an identifier of a destination website, where the internal identifier of the content is an identifier of the content on the content server; a first acquiring unit, configured to acquire an identifier of the user on the destination website; a second acquiring unit, configured to acquire the internal identifier of the content and the identifier of the destination website from the first receiving unit, and query a stored first correspondence among the internal identifier of the content, the identifier of the destination website, and an external identifier of the content according to the internal identifier of the content and the identifier of the destination website, to acquire the external identifier of the content on the destination website, where the external identifier of the content is an identifier generated by the destination website for the content when the content is shared by using the content server for the first time on the destination website; and a first sending unit, configured to receive the external identifier that is acquired by the second acquiring unit and that is corresponding to the content on the destination website, and send a second content sharing request to the destination website according to the identifier of the destination website and the identifier of the user on the destination website, where the second content sharing request carries the external identifier of the content and the identifier of the user on the destination website, so as to share the content on a home page of the user on the destination website.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the social synchronization apparatus further includes: a publishing unit, configured to: when no external identifier corresponding to the content on the destination website is acquired by querying the stored first correspondence according to the internal identifier of the content and the identifier of the destination website, send a content publishing request to the destination website according to the identifier of the destination website and the identifier of the user on the destination website, where the content publishing request carries the internal identifier of the content and the identifier of the user on the destination website, so as to publish the content on the home page of the user on the destination website; a second receiving unit, configured to receive a content publishing response returned by the destination website, where the content publishing response includes an external identifier of the content; and a first storage unit, configured to receive the external identifier of the content that is sent by the second receiving unit, and store a first correspondence among the internal identifier of the content, the identifier of the destination website, and the external identifier of the content.
With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the social synchronization apparatus further includes: a third receiving unit, configured to receive a first comment sharing request, sent by the content server, to comment on the content, where the first comment sharing request includes the internal identifier of the content, an internal identifier of a comment, the identifier of the destination website, and the comment, where the internal identifier of the comment is an identifier of the comment on the content server; a third acquiring unit, configured to receive the internal identifier of the content and the identifier of the destination website that are sent by the third receiving unit, and acquire, according to the internal identifier of the content, the identifier of the destination web site, and the stored first correspondence, the external identifier of the content that is on the destination website and corresponding to the internal identifier of the content; a second sending unit, configured to receive the external identifier of the content that is sent by the third acquiring unit, and send a second comment sharing request to comment on the content to the destination website according to the external identifier of the content and the identifier of the destination website, where the second comment sharing request includes the comment and the external identifier of the content, so as to publish the comment to the content on the destination website; a fourth receiving unit, configured to receive a comment sharing response sent by the destination website, where the comment sharing response includes an external identifier of the comment and the external identifier of the content, where the external identifier of the comment is generated when the comment is published to the content on the destination website; and a second storage unit, configured to receive the external identifier of the comment and the external identifier of the content that are sent by the fourth receiving unit, and store a second correspondence among the internal identifier of the content, the internal identifier of the comment, and the external identifier of the comment.
With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the social synchronization apparatus further includes: a third sending unit, configured to send a comment acquisition request to the destination website, where the comment acquisition request includes the external identifier of the content; and a fifth receiving unit, configured to receive a comment acquisition response returned by the destination website, where the comment acquisition response includes a third correspondence between the comment on the content and the external identifier of the comment.
With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the social synchronization apparatus further includes: a fourth acquiring unit, configured to acquire external identifiers of all comments on the content from the second correspondence according to the second correspondence and the internal identifier of the content; a deduplication unit, configured to delete, from the third correspondence, a comment with a duplicate external identifier of the comment in the second correspondence and the external identifier of the comment according to an external identifier of each comment on the content in the third correspondence and the external identifiers of all the comments on the same content in the second correspondence; and a fourth sending unit, configured to send a comment in the third correspondence after the deletion to the content server according to the internal identifier of the content, so that the content server publishes the comment to the content.
With reference to the second aspect, in a fifth possible implementation manner of the second aspect, the first acquiring unit is specifically configured to: when the first content sharing request further includes an account of the user on the content server, acquire the identifier of the user on the destination website according to the account of the user on the content server, the identifier of the destination website, and a stored fourth correspondence between the account of the user on the content server and the identifier of the user on the destination website; or when the first content sharing request further includes an account of the user on the content server, acquire, from a fourth correspondence stored on the content server, the identifier of the user on the destination website according to the account of the user on the content server and the identifier of the destination website; or when the first content sharing request further includes the identifier of the user on the destination website, acquire the identifier of the user on the destination website from the first content sharing request.
It can be seen from the foregoing technical solutions provided in the embodiments of the present invention that a first correspondence is stored in a social synchronization apparatus; when receiving a first content sharing request, the social synchronization apparatus first queries the stored first correspondence according to the first correspondence and an internal identifier of content, to acquire an external identifier of content on a destination website, and then sends a second content sharing request including the external identifier of the content to the destination website. In this way, the content can be shared on the destination website. Further, because the second content sharing request includes the external identifier of the existing content, the destination website can send the existing content on a home page of a user according to the external identifier of the existing content. In this way, when same content is shared on a same destination website by different users, the content is associated, so that attention to the content on the destination website can be accurately reflected.
To describe the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings required for describing the embodiments. Apparently, the accompanying drawings in the following description show merely some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.
The following clearly describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are merely some but not all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
101: A social synchronization apparatus receives a first content sharing request sent by a content server, where the first content sharing request includes an internal identifier of content that a user requests to share and an identifier of a destination website, where the internal identifier of the content is an identifier of the content on the content server.
Herein, the internal identifier of the content may be a link address of the content on the content server, or may be a code name of the content on the content server, and a link address of the content on the content server may be acquired by using the code name.
102: The social synchronization apparatus acquires an identifier of the user on the destination website.
When the first content sharing request further includes an account of the user on the content server, and a fourth correspondence between the account of the user on the content server and the identifier of the user on the destination website is stored in the social synchronization apparatus, that the social synchronization apparatus acquires an identifier of the user on the destination website is specifically: acquiring the identifier of the user on the destination website according to the account of the user on the content server, the identifier of the destination website, and the stored fourth correspondence; or
when the first content sharing request further includes an account of the user on the content server, and a fourth correspondence is stored on the content server, that the social synchronization apparatus acquires an identifier of the user on the destination website is specifically: acquiring, from the fourth correspondence stored on the content server, the identifier of the user on the destination website according to the account of the user on the content server and the identifier of the destination website; or
when the first content sharing request further includes the identifier of the user on the destination website, that the social synchronization apparatus acquires an identifier of the user on the destination website is specifically: acquiring the identifier of the user on the destination website from the first content sharing request.
103: The social synchronization apparatus queries a stored first correspondence among the internal identifier of the content, the identifier of the destination website, and an external identifier of the content according to the internal identifier of the content and the identifier of the destination website, to acquire the external identifier of the content on the destination website, where the external identifier of the content is an identifier generated by the destination website for the content when the content is shared by using the content server for the first time on the destination website.
104: Send a second content sharing request to the destination website according to the identifier of the destination website and the identifier of the user on the destination website, where the second content sharing request carries the external identifier of the content and the identifier of the user on the destination website, so as to share the content on a home page of the user on the destination website.
It can be seen from the technical solution provided in this embodiment of the present invention that a first correspondence is stored in a social synchronization apparatus; when receiving a first content sharing request, the social synchronization apparatus first queries the stored first correspondence according to the first correspondence and an internal identifier of content, to acquire an external identifier of content on a destination website, and then sends a second content sharing request including the external identifier of the content to the destination website. In this way, the content can be shared on the destination website. Further, because the second content sharing request includes the external identifier of the existing content, the destination website can send the existing content on a home page of a user according to the external identifier of the existing content. In this way, when same content is shared on a same destination website by different users, the content is associated, so that attention to the content on the destination website can be accurately reflected.
When no external identifier corresponding to the content on the destination website is acquired by the social synchronization apparatus by querying the stored first correspondence according to the internal identifier of the content and the identifier of the destination website, that is, the content has not been shared on the destination website yet, the social synchronization apparatus then sends a content publishing request to the destination website according to the identifier of the destination website and the identifier of the user on the destination website, where the content publishing request carries the internal identifier of the content and the identifier of the user on the destination website, so that the user publishes the content on the home page of the user on the destination website; the social synchronization apparatus receives a content publishing response returned by the destination website, where the content publishing response includes an external identifier of the content; and the social synchronization apparatus stores a first correspondence among the internal identifier of the content, the identifier of the destination website, and the external identifier of the content.
The user may further synchronously share a comment on the content on the destination website. In this case, the method further includes: receiving, by the social synchronization apparatus, a first comment sharing request, sent by the content server, to comment on the content, where the first comment sharing request includes the internal identifier of the content, an internal identifier of a comment, the identifier of the destination website, and the comment, where the internal identifier of the comment is an identifier of the comment on the content server; acquiring, according to the internal identifier of the content, the identifier of the destination website, and the stored first correspondence, the external identifier of the content that is on the destination website and corresponding to the internal identifier of the content; sending a second comment sharing request to comment on the content to the destination website according to the external identifier of the content and the identifier of the destination website, where the second comment sharing request includes the comment and the external identifier of the content, so as to publish the comment to the content on the destination website; receiving a comment sharing response sent by the destination website, where the comment sharing response includes an external identifier of the comment and the external identifier of the content, where the external identifier of the comment is generated when the comment is published to the content on the destination website; and storing a second correspondence among the internal identifier of the content, the internal identifier of the comment, and the external identifier of the comment.
After the comment is also shared on the destination website, the social synchronization apparatus may further acquire, from the destination website, all comments on the content on the destination website, and the method further includes: sending, by the social synchronization apparatus, a comment acquisition request to the destination website, where the comment acquisition request includes the external identifier of the content; and receiving a comment acquisition response returned by the destination website, where the comment acquisition response includes a third correspondence between each comment on the content and an external identifier corresponding to each comment.
Because a comment acquired from the destination website and a comment on the content server may be published by a same user, and there is a possibility of duplication, the social synchronization apparatus further needs to delete a duplicate comment acquired from the destination website. In this case, the method further includes: acquiring external identifiers of all comments on the content from the second correspondence according to the second correspondence and the internal identifier of the content; searching the second correspondence and the third correspondence for a duplicate external identifier of a comment, and deleting, from the third correspondence, the comment corresponding to the duplicate external identifier of the comment; and sending a remaining comment in the third correspondence after the deletion to the content server according to the internal identifier of the content, so that the content server publishes the remaining comment to the content.
A content sharing method provided in an embodiment of the present invention is introduced first. In this method, a user has accounts on both an OTT content server (hereinafter referred to as a content server) and a third-party SNS (a destination website); the user may publish content by using the account on the content server, and may also share content of the content server on a home page of the user on the third-party SNS by using the account on the third-party SNS. The home page herein includes a form of microblog, such as Sina Weibo. A home page of an SNS is taken as an example in this embodiment, and a microblog or another social network form may also implement the technical solutions of the present invention. The user gives comment permission by using the accounts on the content server and the third-party SNS, and a friend of the user or other people comment on content shared by the user.
201: When a user uses, by using a terminal, content provided by a content server, and the user needs to share the content on a home page of the user on a third-party SNS, the user sends a first content sharing request to the content server by using the terminal, where the first content sharing request includes an internal ID of the content that needs to be shared and an identifier of the third-party SNS.
In this embodiment of the present invention, the content may be a video, a flash, a song, a game, and the like; the internal ID of the content refers to an ID of the content on the content server, where the ID may be a link address, or may be represented by a code name such as a number, a word, or a letter, where by using the code name, the content server may acquire a link address of the content on the content server or the content on the content server; the identifier of the third-party SNS may be a full name, an abbreviated name, a code name, or the like of the third-party SNS.
202: After receiving the first content sharing request, the content server sends the first content sharing request to a social synchronization apparatus.
203: After receiving the first content sharing request, the social synchronization apparatus acquires an identifier of the user on the third-party SNS.
The identifier of the user on the third-party SNS may be an authentication sequence number generated after an account of the user on the content server and an account of the user on the third-party SNS are bound.
When the first content sharing request further includes the account of the user on the content server, and a fourth correspondence between the account of the user on the content server and the identifier of the user on the foregoing destination website is stored in the social synchronization apparatus, that the social synchronization apparatus acquires an identifier of the user on the destination website is specifically: acquiring the identifier of the user on the destination website according to the account of the user on the content server, the identifier of the destination website, and the stored fourth correspondence; or
when the first content sharing request further includes the account of the user on the content server, and a fourth correspondence is stored on the content server, that the social synchronization apparatus acquires an identifier of the user on the destination website is specifically: acquiring, from the fourth correspondence stored on the content server, the identifier of the user on the destination website according to the account of the user on the content server and the identifier of the destination website; or
when the first content sharing request further includes the identifier of the user on the destination website, that the social synchronization apparatus acquires an identifier of the user on the destination website is specifically: acquiring the identifier of the user on the destination website from the first content sharing request.
204: The social synchronization apparatus determines, according to the internal ID of the content that the user needs to share and the identifier of the third-party SNS, whether the content that needs to be shared has already been shared on the third-party SNS. When the content has not been shared on the third-party SNS, steps 205 to 208 are performed, and when the content has already been shared on the third-party SNS, steps 209 to 210 are performed.
A first correspondence among the internal ID of the content, the identifier of the third-party SNS, and an external ID of the content on the third-party SNS is stored in the social synchronization apparatus, where the external ID of the content is an identifier generated by the third-party SNS when the content is shared by using the content server for the first time on the third-party SNS. The external ID of the content may be a link address generated by the third-party SNS when the content is shared on the third-party SNS for the first time, or may be represented by a code name such as a number, a word, or a letter, where by using the code name, the third-party SNS may acquire a link address generated when the content is shared on the third-party SNS for the first time. Each correspondence in this embodiment of the present invention may be represented by using a content relationship table, or may be represented by using a content relationship file. In this embodiment of the present invention, description is made by using an example in which a content relationship table is used to store the first correspondence among the internal ID of the content, the identifier of the third-party SNS, and the external ID of the content on the third-party SNS, as shown in Table 1. The first correspondence may also be stored in anther manner, which is not limited in this embodiment.
The social synchronization apparatus queries the content relationship table according to the internal ID of the content, to determine whether the identifier of the third-party SNS is included. If included, it can be determined that the content has already been shared on the third-party SNS; if not included, it can be determined that the content has not been shared on the third-party SNS.
205: When the content has not been shared on the third-party SNS, that is, the content is shared on the third-party SNS for the first time by the user on the content server, the social synchronization apparatus then sends a content publishing request to the third-party SNS, where the content publishing request includes the internal ID of the content and the identifier of the user on the third-party SNS.
If the first content sharing request carries the link address of the content on the content server, the social synchronization apparatus may obtain the link address of the content on the content server from the first content sharing request; if the first content sharing request does not carry the link address of the content on the content server, the social synchronization apparatus may obtain the link address of the content on the content server from the content server according to the internal ID of the content. Herein, the content publishing request may not include the link address of the content on the content server, or the content publishing request may include the link address of the content on the content server. Under special circumstances, if the internal ID is the link address of the content on the content server, the content publishing request may not include the link address of the content on the content server.
206: After receiving the content publishing request, the third-party SNS acquires, according to the identifier of the user on the third-party SNS, an account of the user on the third-party SNS that is corresponding to the identifier of the user on the third-party SNS, publishes the content on the home page of the user on the third-party SNS, and generates an external ID of the content on the third-party SNS at the same time.
There may be two manners for publishing the content on the home page of the user on the third-party SNS. In a first manner, the link address corresponding to the content may be published on the home page of the user on the third-party SNS; in a second manner, the third-party SNS acquires, from the content server according to the link address carried in the content publishing request, specific content corresponding to the link address, and publishes the content on the home page of the user on the third-party SNS, or the third-party SNS acquires, from the content server according to the internal ID of the content carried in the content publishing request, specific content corresponding to the internal ID of the content, and publishes the specific content on the home page of the user on the third-party SNS.
207: The third-party SNS sends a content publishing response to the social synchronization apparatus, where the content publishing response includes the internal ID of the content, the identifier of the third-party SNS, and the external ID of the content.
208: The social synchronization apparatus receives the content publishing response, and stores a first correspondence among the internal ID of the content, the identifier of the third-party SNS, and the external ID of the content.
Specifically, the correspondence among the internal ID of the content, the identifier of the third-party SNS, and the external ID of the content is added to the content relationship table.
209: When the content has been shared on the third-party SNS, that is, the content is not shared on the third-party SNS for the first time, the social synchronization apparatus acquires, from the content relationship table according to the internal ID of the content and the identifier of the third-party SNS, an external ID of the corresponding content on the third-party SNS that is corresponding to the internal ID of the content, and sends a second content sharing request to the third-party SNS, where the second content sharing request carries the external ID of the content and the identifier of the user on the third-party SNS.
210: After receiving the second content sharing request, the third-party SNS first determines, according to the external ID of the content, that a user of the third-party SNS has already shared the content corresponding to the external ID of the content, and the third-party SNS acquires, by using the external ID of the content, the link address of the content that is generated when the content is shared on the third-party SNS for the first time; and then the third-party SNS learns about, according to the identifier of user on the third-party SNS, the home page corresponding to the account of the user on the third-party SNS that is corresponding to the identifier of the user on the third-party SNS, and publishes, on the home page of the user on the third-party SNS, the link address of the content that is generated when the content is shared on the third-party SNS for the first time. In this way, the content is successfully shared on the home page of the user on the third-party SNS.
In this way, provided that the content on the content server has already been shared on the third-party SNS, when the same content is shared on the third-party SNS again, what is published by a user on a home page of the user on the third-party SNS is always the link address of the content that is generated when the content is shared on the third-party SNS for the first time. In this way, statistics about a quantity of times the content is shared on the third-party SNS can be collected according to the same shared link address or external ID of the content, so that attention to the content on the third-party SNS can be accurately reflected, and popularity of the content on the third-party SNS can be further increased, thereby magnifying a propagation effect of the content.
After the user shares the content on the third-party SNS, a user on the content server may comment on the content on the content server. When the comment is made, the process may include the following:
211: A user on the content server comments, by using a terminal, on the content on the content server, the content server generates an internal ID of the comment and stores the comment and the internal ID of the comment, and the user sends a first comment sharing request to the content server by using the terminal, where the first comment sharing request includes the comment, the internal ID of the comment, the identifier of the third-party SNS, and the internal ID of the commented content.
The user may be the user who publishes the content, and may also be another user registered on the content server.
212: After receiving the comment sharing request sent by the terminal, the content server sends the first comment sharing request to the social synchronization apparatus.
213: After receiving the first comment sharing request, the social synchronization apparatus obtains the external ID of the commented content from the content relationship table according to the identifier of the third-party SNS and the internal ID of the commented content, and sends a second comment sharing request to the third-party SNS according to the external ID of the commented content, where the second comment sharing request includes the internal ID of the comment, the comment, and the external ID of the commented content.
214: The third-party SNS receives the second comment sharing request, displays the comment on the content on the third-party SNS, generates an external ID of the comment on the third-party SNS, and sends a comment sharing response to the social synchronization apparatus, where the comment sharing response includes the external ID of the commented content and the external ID of the commented content.
215: The social synchronization apparatus receives the comment sharing response sent by the third-party SNS, and stores a second correspondence among the internal identifier of the content, the external ID of the commented content, and the external ID of the comment.
The social synchronization apparatus may store the correspondence among the internal ID of the content, the internal ID of the comment, and the external ID of the comment in a comment relationship table, where the comment relationship table is shown in Table 2. After receiving the comment sharing response, the social synchronization apparatus adds the correspondence among the internal ID of the commented content, the external ID of the comment, and the internal ID of the content to the comment relationship table.
In order to increase comments on the content on the content server and attract more users to follow the content, the social synchronization apparatus may acquire various comments on the content on the third-party SNS and send the comments to the content server. The social synchronization apparatus may periodically acquire all latest comments on a piece of content from each third-party SNS, and may also acquire all latest comments on a piece of content when triggered by an event.
216: The social synchronization apparatus sends a comment acquisition request to the third-party SNS, where the comment acquisition request includes the external ID of the content.
217: The third-party SNS receives the comment acquisition request, obtains, according to the external ID of the content, all comments on the content corresponding to the external ID and external IDs of the comments, and sends a comment acquisition response to the social synchronization apparatus, where the comment acquisition response carries a third correspondence between a comment on the content and an external ID of the comment.
The comment acquisition response carries all the comments on the content on the third-party SNS and the corresponding external identifiers of the comments. Among all the comments on the content, some are published by a user of the third-party SNS, and some are shared by a user of the content server.
218: After receiving the comment acquisition response, the social synchronization apparatus performs deduplication and convergence on all the comments on the content.
The social synchronization apparatus acquires the external identifiers of all the comments on the content from the second correspondence according to the second correspondence and the internal identifier of the content; searches the second correspondence and the third correspondence for a duplicate external identifier of a comment, and deletes, from the third correspondence, the comment corresponding to the duplicate external identifier of the comment; and sends a remaining comment in the third correspondence after the deletion to the content server according to the internal identifier of the content, so that the content server publishes the remaining comment to the content.
In this embodiment of the present invention, a first correspondence is stored in a social synchronization apparatus; when receiving a first content sharing request, the social synchronization apparatus first queries the stored first correspondence according to the first correspondence and an internal identifier of content, to acquire an external identifier of the content on a third-party SNS, and then sends a second content sharing request including the external identifier of the content to the third-party SNS. In this way, the content can be shared on the third-party SNS. Further, because the second content sharing request includes the external identifier of the existing content, the third-party SNS may publish the existing content on a home page of a user according to the external identifier of the existing content. In this way, when same content is shared on a same destination website by different users, the content is associated, thereby increasing attention and popularity of the content on the destination website.
As shown in
a first receiving unit 31, configured to receive a first content sharing request sent by a content server, where the first content sharing request includes an internal identifier of content that a user requests to share and an identifier of a destination website, where the internal identifier of the content is an identifier of the content on the content server;
a first acquiring unit 32, configured to acquire an identifier of the user on the destination website;
a second acquiring unit 33, configured to acquire the internal identifier of the content and the identifier of the destination website from the first receiving unit, and query a stored first correspondence among the internal identifier of the content, the identifier of the destination website, and an external identifier of the content according to the internal identifier of the content and the identifier of the destination website, to acquire the external identifier of the content on the destination website, where the external identifier of the content is an identifier generated by the destination website for the content when the content is shared by using the content server for the first time on the destination website; and
a first sending unit 34, configured to receive the external identifier that is acquired by the second acquiring unit and that is corresponding to the content on the destination website, and send a second content sharing request to the destination website according to the identifier of the destination website and the identifier of the user on the destination website, where the second content sharing request carries the external identifier of the content and the identifier of the user on the destination website, so as to share the content on a home page of the user on the destination website.
It can be seen from the technical solution provided in this embodiment of the present invention that a first correspondence is stored in a social synchronization apparatus; when receiving a first content sharing request, the social synchronization apparatus first queries the stored first correspondence according to the first correspondence and an internal identifier of content, to acquire an external identifier of content on a destination website, and then sends a second content sharing request including the external identifier of the content to the destination website. In this way, the content can be shared on the destination website. Further, because the second content sharing request includes the external identifier of the existing content, the destination website can send the existing content on a home page of a user according to the external identifier of the existing content. In this way, when same content is shared on a same destination website by different users, the content is associated, so that attention to the content on the destination website can be accurately reflected.
Optionally, as shown in
Optionally, as shown in
a third receiving unit 38, configured to receive a first comment sharing request, sent by the content server, to comment on the content, where the first comment sharing request includes the internal identifier of the content, an internal identifier of a comment, the identifier of the destination website, and the comment, where the internal identifier of the comment is an identifier of the comment on the content server; a third acquiring unit 39, configured to receive the internal identifier of the content and the identifier of the destination website that are sent by the third receiving unit, and acquire, according to the internal identifier of the content, the identifier of the destination website, and the stored first correspondence, the external identifier of the content that is on the destination website and corresponding to the internal identifier of the content; a second sending unit 310, configured to receive the external identifier of the content that is sent by the third acquiring unit, and send a second comment sharing request to comment on the content to the destination website according to the external identifier of the content and the identifier of the destination website, where the second comment sharing request includes the comment and the external identifier of the content, so as to publish the comment to the content on the destination web site; a fourth receiving unit 311, configured to receive a comment sharing response sent by the destination website, where the comment sharing response includes an external identifier of the comment and the external identifier of the content, where the external identifier of the comment is generated when the comment is published to the content on the destination website; and a second storage unit 312, configured to receive the external identifier of the comment and the external identifier of the content that are sent by the fourth receiving unit, and store a second correspondence among the internal identifier of the content, the internal identifier of the comment, and the external identifier of the comment.
Optionally, as shown in
a third sending unit 313, configured to send a comment acquisition request to the destination website, where the comment acquisition request includes the external identifier of the content; and a fifth receiving unit 314, configured to receive a comment acquisition response returned by the destination website, where the comment acquisition response includes a third correspondence between each comment on the content and an external identifier corresponding to each comment.
Optionally, as shown in
a fourth acquiring unit 315, configured to acquire external identifiers of all comments on the content from the second correspondence according to the second correspondence and the internal identifier of the content; a deduplication unit 316, configured to delete, from the third correspondence, a comment with a duplicate external identifier of the comment in the second correspondence and the external identifier of the comment according to the external identifier of each comment on the content in the third correspondence and the external identifiers of all the comments on the same content in the second correspondence; and a fourth sending unit 317, configured to send a comment in the third correspondence after the deletion to the content server according to the internal identifier of the content, so that the content server publishes the comment to the content.
Optionally, as shown in
The social synchronization apparatus in this embodiment of the present invention may be implemented based on a computer system. Both the methods shown in
Content such as information exchange and an execution process between the modules in the apparatus and system is based on a same concept as the method embodiments of the present invention. For detailed content, reference may be made to descriptions in the method embodiments of the present invention, and details are not described herein again.
A person of ordinary skill in the art may understand that all or some of the processes of the methods in the embodiments may be implemented by a computer program instructing relevant hardware. The program may be stored in a computer-readable storage medium. When the program runs, the processes of the methods in the embodiments are performed. The storage medium may include: a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM).
Specific examples are used in this specification to describe the principle and implementation manners of the present invention. The descriptions of the embodiments are merely intended to help understand the method and idea of the present invention. In addition, with respect to the implementation manners and the application scope, modifications may be made by a person of ordinary skill in the art according to the idea of the present invention. Therefore, this specification shall not be construed as a limitation on the present invention.
This application is a continuation of International Application No. PCT/CN2013/078505, filed on Jun. 29, 2013, which is hereby incorporated by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2013/078505 | Jun 2013 | US |
Child | 14964881 | US |