Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a flowchart illustrating an implementation method of instant messaging according to an exemplary embodiment of the present application.
Referring to fig. 1, the method for implementing instant messaging can be applied to a client with an instant messaging function (hereinafter, referred to as a client), and includes the following steps:
step 101, when detecting the operation of opening the session interface by the user, acquiring the link copied or cut by the user.
In this embodiment, the session interface is an interface for a user to implement a session chat with one or more users, and when the user opens a session interface facing a friend or a group, the client may obtain a link copied or cut by the user from a clipboard of the system.
And 102, displaying the linked analysis information in the opened session interface in a card form.
Based on the foregoing step 101, after the link is obtained, the link may be sent to the server, and after the server receives the link, the server may analyze the link to obtain analysis information of the link, and return the analysis information to the client. Wherein the parsing information may include: the links point to information such as the title, abstract and picture of the page.
In this embodiment, after receiving the analysis information sent by the server, the client may automatically display the analysis information in the form of a card in the opened session interface. Such as: and displaying the analytic information in the form of a suspension frame.
It can be seen from the above description that the client of the present application can show the analysis information of the link copied or cut by the user in the form of a card in the session interface when the user opens the session interface, so that the user can intuitively know the related content of the copied or cut link, and the use experience of the user is improved.
Optionally, in an example of the present application, when detecting that the user opens a session interface facing a friend or a group, the client may obtain all links copied or cut by the user from a clipboard of the system. Such as: the client can sequentially judge whether the data copied or cut by the user in the clipboard is a link according to the preset characters, and if the data copied or cut by the user in the clipboard is the link, the link is acquired. In practical applications, when there are multiple links copied or cut by the user, the client may obtain all the links copied or cut by the user, and display each piece of resolution information of each link in the open session interface, such as: the client may display all the analysis information of all the links in one card, and the client may also generate one corresponding card for each link, which is not particularly limited in this application.
Optionally, in another example of the present application, when detecting that the user opens a session interface facing a friend or a group, the client may only obtain a link that the user has copied or cut last time. Such as: the client may sequentially determine whether the data copied or cut by the user in the clipboard is a link according to the sequence of the copying or cutting time from late to early, and when the data copied or cut by the user in the clipboard is determined to be a link, the link may be acquired to obtain the link that the user copied or cut the last time.
Optionally, in another example of the present application, after the client displays the analysis information of the link in the form of a card in the opened session interface, the user may intuitively know the related content of the link that is copied or cut before the user knows the user, and the user may send the link and the analysis information thereof to the session object of the session interface by sending an instruction, for example: the user may click the send button of the message edit box in the session interface, and the user may click the send button corresponding to the card, which is not particularly limited in this application.
Fig. 2 is a flowchart illustrating another implementation method of instant messaging according to an exemplary embodiment of the present application.
Referring to fig. 2, the method for implementing instant messaging may be applied to a client having an instant messaging function, where the client may be installed in an intelligent terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), and the like, and the application is not limited to this. The method for realizing instant messaging can comprise the following steps:
step 201, when detecting the operation of opening the session interface by the user, acquiring the link that the user has copied or cut the last time.
In this embodiment, a user may register a user account in the instant messaging service end in advance, then input the registered user account (for example, a user name and a password) in the client for authentication, and after the user passes the authentication, the user may perform a conversation chat with a friend or a group through the client. The processing and implementation of this part can refer to the related art, and the detailed description of this application is omitted here.
In this embodiment, when detecting that the user opens a session interface facing a friend or a group, the client may obtain a link that the user has copied or cut last time. In one example, the client may obtain the link that the user copied or cut last time from a clipboard of the smart device, where the link that the user copied or cut in the clipboard includes the link that the user copied or cut based on the client, and also includes the link that the user copied or cut in other application software.
Step 202, sending the link to the server, and receiving the analysis information corresponding to the link returned by the server.
Based on the foregoing step 201, when the client acquires the link that the user copied or cut last time, the client may send the link to the server, and after receiving the link, the server may analyze the link to acquire analysis information corresponding to the link. Wherein the parsing information may include: and the information such as the title, the abstract and the picture of the page pointed by the link.
In this embodiment, when the server successfully analyzes the link and acquires the analysis information corresponding to the link, the analysis information may be returned to the client. When the server fails to resolve the link, the subsequent processes of the application may be ended, for example: the server side can return the analysis failure message to the client side, and the client side does not need to perform subsequent processing after receiving the analysis failure message.
Step 203, judging whether the time interval between the copying or cutting time of the link and the current time is within a preset threshold value. If within the preset threshold, step 204 may be performed, and if not, step 206 may be performed.
In this embodiment, after acquiring the link that the user copied or cut last time, the client may calculate a time interval between the copying or cutting time of the link and the current time, and then determine whether the time interval is within a preset threshold, and when the time interval is within the preset threshold, step 204 may be executed. If the time interval is not within the preset threshold, step 206 may be performed.
In this embodiment, the preset threshold may be set by a developer, for example: 30 seconds, etc., which the present application does not specifically limit.
It should be noted that, in practical applications, after obtaining the link, the client may first execute step 202 to send the link to the server, or may first execute this step to determine whether the time interval is within a preset threshold, and the client may also start a parallel thread and execute step 202 and this step at the same time, which is not limited by this application.
And step 204, displaying the linked analysis information in the opened session interface in a card form.
Based on the judgment result of the foregoing step 203, when the time interval between the copying or cutting time of the link and the current time is within the preset threshold, it indicates that the time interval between the operation of copying or cutting by the user and the operation of opening the session interface is short, the probability that the link is sent to the session object after the user opens the session interface is high, and the client may display the analysis information in the session interface in the form of a card. Wherein the "card" is an image understanding of the presentation form of the analysis information, and the presentation form of the card may include: a floating frame, buttons, etc. For example, the client may generate a floating frame in the session interface and display the parsing information in the floating frame. The client may also generate a button in the session interface and present the parsing information in the button. The client displays the analysis information in a card form, so that a user can visually distinguish the analysis information from past conversation messages in a conversation interface. In this embodiment, when the user wants to browse the page to which the link points, the user may click on the card, and the client may open the page to which the link points when the user clicks on the card.
Step 205, after receiving the sending instruction, sending the link and the analysis information thereof to a session object of the session interface.
Based on the foregoing step 204, after the user opens the session interface, the user can visually see the link just copied or cut and the analysis information thereof, and after the user inputs the sending instruction, the client can send the link and the analysis information thereof to the session object. In one example, the client may provide a send button and a cancel button in the card, such as: the send button and cancel button may be provided in the lower right corner of the card. If the user wants to send the link to the session object, the user can click the sending button, the client side regards as receiving the sending instruction and sends the link and the analysis information thereof to the session object, the client side of the session object can display the analysis information in a form of a card in a session interface after receiving the link and the analysis information thereof, and the session object can click the card to open a page of the link. If the user does not want to send the link to the session object, the user can click a cancel button and the client can hide the card that is shown. In another example, the client may also provide a send button and a cancel button for the card, such as: the client may provide the send button and the cancel button on the top of the card, and the application is not limited in this respect. Optionally, the client may not provide a send button and a cancel button separately, and the client may send the link and the analysis information thereof to the session object after the user clicks the send button of the message edit box in the session interface.
It should be noted that, when the session interface is a friend-oriented session interface, the session object is an opposite-end friend. And when the session interface is a group-oriented session interface, the session object is other group members except the user in the group. In addition, when the client sends the link and the analysis information thereof to the session object, the link and the analysis information thereof are often sent to the server first, and then forwarded to the session object by the server, and the processing and implementation of this part may refer to the related technology, which is not described herein any more.
And step 206, when the user pastes the link to the message editing box of the session interface, displaying the analysis information of the link in the session interface in a card form.
Based on the judgment result of the foregoing step 203, when the time interval between the copying or cutting time of the link and the current time is not within the preset threshold, it indicates that the user has copied or cut the link for a certain period of time, and the probability of sending the link after the user opens the session interface is low, so that the analysis information does not need to be displayed at this time.
In this embodiment, if the user wants to send a previously copied or cut link to the session object, the user may paste the link into a message edit box of the session interface. After detecting the paste operation of the user, the client may display the link in the message edit box and simultaneously display the parsing information of the link in the session interface in the form of a card, such as: and generating a suspension frame in the session interface, and displaying the analysis information of the link in the suspension frame.
And step 207, after receiving the sending instruction, sending the link and the analysis information thereof to a session object of a session interface, and deleting the link in the message editing frame.
Based on the foregoing step 206, after the client displays the parsed information of the link, the user can visually see the parsed information of the link. Optionally, similar to the foregoing step 205, the client may further provide a send or cancel button corresponding to the card, and if the user wants to send the link to the session object, the user may click the send button, and the client may send the link and the parsing information thereof to the session object, and simultaneously delete the link pasted by the user in the message edit box. If the user does not want to send the link to the session object, the user can click a cancel button and the client can hide the displayed card.
From the above description, it can be seen that the client of the present application can automatically display the parsing information of the link in the open session interface when the time interval between the time when the user copies or cuts the link and the current time is within the preset threshold, so that the user can intuitively know the related content of the copied or cut link. The user can directly send the link and the analysis information thereof by clicking the sending button, the whole process does not need the user to carry out pasting operation, the operation complexity of the user is greatly simplified, the interaction efficiency of instant messaging is improved, and the use experience of the user is improved.
In this embodiment, when the user browses information, the user can send the browsed information to the instant messaging friend through the sharing button of the information page, and when the software for browsing information of the user is incompatible with the instant messaging software, the user can copy the link of the information and share the information by adopting the scheme provided by the application. Of course, when the software for browsing information by the user is compatible with the instant messaging software, the user can also share the information by using the scheme provided by the application, which is not particularly limited by the application.
The implementation of the present application is described below with reference to specific examples.
Suppose that the user has a mobile phone loaded with a Payment client and a Baidu browser. The method comprises the steps that a user browses news by using a hundred-degree browser, after the user sees an interesting piece of news, the user can copy a link of the news and open a conversation interface with friends in a Paibao client, the client confirms that the time interval between the time when the user copies the link last and the current time is within 30 seconds, the client sends the link to a server, the server analyzes the link and returns the title, the abstract and pictures of the news to the client, and therefore the client can display the title, the abstract and the pictures of the news in the conversation interface in a card mode. For the user, after the user opens the conversation interface with the friend, the user can see the title, the abstract and the picture of the news, and the user can send the link, the title, the abstract and the picture of the news to the friend by clicking the sending button corresponding to the card. For the user, the whole process does not need to carry out pasting operation, and the interaction efficiency of the user is improved.
Fig. 3 is a flowchart illustrating another implementation method of instant messaging according to an exemplary embodiment of the present application.
Referring to fig. 3, the method for implementing instant messaging may be applied to a client with an instant messaging function, and includes the following steps:
step 301, when detecting that the user starts the operation of the instant messaging client, acquiring a link copied or cut by the user.
Step 302, displaying the linked analysis information in the form of a card in the home page of the instant messaging client.
In this embodiment, when a user opens a client, the client may obtain a link copied or cut by the user, display analysis information of the link in a form of a card in a home page, and provide a sending button corresponding to the card. The user can select the session object for sending the link from the session index list, and the client can further send the link and the analysis information thereof to the session object selected by the user.
From the above description, the client of the application can display the parsing information of the user or the cut link in the form of a card in the home page, so that the user can intuitively know the related content of the copied or cut link. The client can send the link and the analysis information thereof to the session object selected by the user in the session index list, and the whole process does not need the user to paste or open a session interface, thereby greatly simplifying the operation complexity of the user, improving the interaction efficiency of instant messaging and simultaneously improving the use experience of the user.
Corresponding to the embodiment of the implementation method of instant messaging, the application also provides an embodiment of an implementation device of instant messaging.
The embodiment of the instant messaging implementation device can be applied to an instant messaging client loaded in terminal equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the terminal device where the device is located. From a hardware aspect, as shown in fig. 4, the present application is a hardware structure diagram of a terminal device where an apparatus for implementing instant messaging is located, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 4, the terminal device where the apparatus is located in the embodiment may also include other hardware according to the actual function of the terminal device, which is not described again.
Fig. 5 is a schematic structural diagram of an instant messaging implementation apparatus according to an exemplary embodiment of the present application.
Referring to fig. 5, the instant messaging implementation apparatus 400 can be applied to the instant messaging client installed in the terminal device shown in fig. 4, and includes: a first obtaining unit 401, a first showing unit 402, a second showing unit 403, a first sending unit 404 and a second sending unit 405.
The first obtaining unit 401 obtains a link copied or cut by a user when detecting that the user opens a session interface;
the first display unit 402, which displays the linked parsing information in the form of a card in the opened session interface;
the conversation interface is an interface for realizing conversation chat between the user and one or more users.
Optionally, the first obtaining unit 401 obtains a link that the user copied or cut last time.
Optionally, the first displaying unit 402 determines whether a time interval between the copy or cut time of the link that is copied or cut by the user last time and the current time is within a preset threshold; and when the current session interface is within a preset threshold value, displaying the analysis information of the link in the form of a card in the opened session interface.
The second display unit 403 displays the parsing information of the link in the session interface in the form of a card when the user pastes the link to the message edit box of the session interface.
The first sending unit 404, after receiving the sending instruction, sends the link and the parsing information thereof to the session object of the session interface, so as to display the parsing information of the link in the session interface of the session object in the form of a card;
deleting the link in the message edit box.
The second sending unit 405, upon receiving the sending instruction, sends the link and the parsing information thereof to the session object of the session interface, so as to display the parsing information of the link in the session interface of the session object in the form of a card.
Optionally, the sending instruction includes: the card sending method comprises the steps that a user clicks a sending button of a message editing box, the user clicks the sending button corresponding to the card, and the user clicks the card.
Optionally, the parsing information includes: the links point to the title, summary, and pictures of the page.
Fig. 6 is a schematic structural diagram of another instant messaging implementation apparatus according to an exemplary embodiment of the present application.
Referring to fig. 6, the instant messaging implementation apparatus 400 can also be applied to the instant messaging client installed in the terminal device shown in fig. 4, and includes: a second obtaining unit 410, a third presenting unit 420, a list presenting unit 430 and a third sending unit 440.
The second obtaining unit 410 obtains a link copied or cut by a user when detecting that the user starts an operation of the instant messaging client;
the third display unit 420 displays the linked parsing information in a form of a card in a home page of the instant messaging client.
The list display unit 430, when receiving the sending instruction, displays the session index list;
the third sending unit 440 sends the link and the parsing information thereof to the session object selected by the user in the session index list.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.