Communication method and device, computer equipment and storage medium
Through the business card exchange function, private instant communication between users is achieved in live video broadcast, solving the problem of lack of privacy and immediacy of social functions in live broadcast, and improving user experience.
Patent Information
- Application Number
- CN202411159648.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The social functions in live videos lack privacy and immediacy, and users cannot communicate privately with other users, limiting the social experience.
Through the business card exchange function, users can establish a one-to-one instant communication connection with other users in the live broadcast scenario, and use the communication link identifier generated by the server to ensure information security and privacy, and realize private communication.
It expands the social functions of the application, takes into account the privacy, immediacy and extensibility of social interaction, and improves the user's social experience.
Smart Images

Figure CN119109896A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and in particular to a communication method, apparatus, computer equipment and storage medium. Background Art
[0002] With the continuous development of the Internet and terminal technology, live video has been widely used in all walks of life. When users watch live video, they can comment while watching the live broadcast through the comment function. However, when users want to communicate with other users who have made comments or watched the live broadcast, they can only communicate in the comments, and the comments are visible to all users, not private, and there is no way to ensure that the other party can see the information in the comments. Therefore, the social function of live video has certain limitations, and the user's social experience is poor. Summary of the invention
[0003] To overcome the problems existing in the related art, the present disclosure provides a communication method, apparatus, computer device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a communication method is provided, which is applied to a first device, and the method includes:
[0005] Sending an exchange request for exchanging business cards to a server, wherein the exchange request includes a first user account, the business card is used to display identity information, and a login device for the first user account is a second device;
[0006] Receiving exchange response information sent by the server;
[0007] When the exchange response information indicates that the exchange is allowed, sending a business card of the second user account to the server, and receiving a communication link identifier and the business card of the first user account sent by the server, the login device of the first user account being the first device;
[0008] Based on the communication link identifier and the business card of the first user account, instant communication is performed with the second device.
[0009] In an exemplary embodiment, the instant communication with the second device based on the communication link identifier and the business card of the first user account includes:
[0010] When the business card of the first user account meets a preset condition, establishing a target communication link with the second device based on the communication link identifier;
[0011] Perform instant communication with the second device via the target communication link.
[0012] In an exemplary embodiment, when the business card of the first user account meets a preset condition, establishing a target communication link with the second device based on the communication link identifier includes:
[0013] When receiving the communication connection instruction, sending a WSS connection request to the server, wherein the WSS connection request includes the communication link identifier;
[0014] Receiving connection response information sent by the server, wherein the connection response information indicates that establishment of the target communication link is complete;
[0015] Based on the connection response information, it is determined that establishment of the target communication link is complete.
[0016] In an exemplary embodiment, the method further comprises:
[0017] Acquire configuration information, wherein the configuration information includes identity information and display style, and the display style includes a hidden state and a display state;
[0018] A business card of the second user account is determined according to the configuration information.
[0019] According to a second aspect of an embodiment of the present disclosure, a communication method is provided, which is applied to a server, and the method includes:
[0020] receiving an exchange request for business card exchange sent by a first device, wherein the exchange request includes a first user account, the business card is used to display identity information, and a login device for the first user account is a second device;
[0021] Sending exchange response information to the first device, where the exchange response information is generated by the second device according to the exchange request and sent to the server;
[0022] When the exchange response information indicates that the exchange is allowed, generating a communication link identifier, receiving a business card of a second user account sent by the first device, and sending the communication link identifier and the business card of the first user account to the first device, the login device of the second user account is the first device, and the business card of the first user account is sent to the server by the second device;
[0023] The communication link identifier and the business card of the second user account are sent to the second device.
[0024] In an exemplary embodiment, the method further comprises:
[0025] receiving a WSS connection request sent by the first device, wherein the WSS connection request includes the communication link identifier;
[0026] According to the communication link identifier, respectively establish a communication link between the server and the first device, and a communication link between the server and the second device;
[0027] Sending a connection response message to the first device, wherein the connection response message indicates that the target communication link is established.
[0028] According to a third aspect of an embodiment of the present disclosure, a communication apparatus is provided, which is applied to a first device, and the apparatus includes:
[0029] A sending module, used to send an exchange request for business card exchange to a server, wherein the exchange request includes a first user account, the business card is used to display identity information, and a login device of the first user account is a second device;
[0030] A receiving module, used for receiving the exchange response information sent by the server;
[0031] The sending module and the receiving module are further configured to send a business card of the second user account to the server when the exchange response information indicates that the exchange is allowed, and receive a communication link identifier and the business card of the first user account sent by the server, wherein the login device of the first user account is the first device;
[0032] A communication module is used to perform instant communication with a second device based on the communication link identifier and the business card of the first user account.
[0033] According to a fourth aspect of an embodiment of the present disclosure, a communication device is provided, which is applied to a server, and the device includes:
[0034] A receiving module, configured to receive an exchange request for business card exchange sent by a first device, wherein the exchange request includes a first user account, the business card is used to display identity information, and a login device for the first user account is a second device;
[0035] a sending module, configured to send exchange response information to the first device, wherein the exchange response information is generated by the second device according to the exchange request and sent to the server;
[0036] The receiving module and the sending module are further configured to generate a communication link identifier when the exchange response information indicates that the exchange is allowed, receive a business card of a second user account sent by the first device, and send the communication link identifier and the business card of the first user account to the first device, the login device of the second user account is the first device, and the business card of the first user account is sent to the server by the second device;
[0037] The sending module is further used to send the communication link identifier and the business card of the second user account to the second device.
[0038] According to a fifth aspect of an embodiment of the present disclosure, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect or the second aspect is implemented.
[0039] According to a sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect or the second aspect is implemented.
[0040] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the method adds business cards and business card exchange functions to the user account, which can expand the social functions of the application. At the same time, business cards can only be exchanged with the permission of both parties, which can ensure the security and privacy of the identity information in the business cards. In addition, after exchanging business cards, a one-to-one instant messaging connection is established with the second device, which can take into account the privacy, immediacy and scalability of social interaction.
[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0043] Figure 1 is a flow chart of a communication method according to an exemplary embodiment;
[0044] Figure 2 is a flow chart of a communication method according to an exemplary embodiment;
[0045] Figure 3 is a flow chart of a communication method according to an exemplary embodiment;
[0046] Figure 4 is a flow chart of a communication method according to an exemplary embodiment;
[0047] Figure 5 is a flow chart of a communication method according to an exemplary embodiment;
[0048] Figure 6 is an interactive flow chart of a communication method according to an exemplary embodiment;
[0049] Figure 7is a block diagram of a communication device according to an exemplary embodiment;
[0050] Figure 8 is a block diagram of a communication device according to an exemplary embodiment;
[0051] Fig. 9 It is a block diagram of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION
[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same 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 invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0053] In an exemplary embodiment of the present disclosure, in order to overcome the problem of limitations of social functions during live broadcast in related technologies, a communication method is provided, which is applied to a first device, including: sending an exchange request for business card exchange to a server, the exchange request includes a first user account, the business card is used to display identity information, and the login device of the first user account is a second device; receiving an exchange response message sent by the server; when the exchange response message indicates that the exchange is allowed, sending the business card of the second user account to the server, and receiving the communication link identifier and the business card of the first user account sent by the server, and the login device of the second user account is the first device; based on the communication link identifier and the business card of the first user account, instant communication is performed with the second device. This method adds business cards and business card exchange functions to user accounts, can expand the social functions of applications, and can ensure the security and privacy of identity information in business cards, taking into account the privacy, immediacy and scalability of social interaction.
[0054] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a first device. Figure 1 is a flow chart of a communication method according to an exemplary embodiment. Figure 1 As shown, the following steps are included:
[0055] Step S101, sending an exchange request for exchanging business cards to a server, the exchange request including a first user account, the business card is used to display identity information, and the login device of the first user account is a second device;
[0056] Step S102, receiving exchange response information sent by the server;
[0057] Step S103, when the exchange response information indicates that the exchange is allowed, the business card of the second user account is sent to the server, and the communication link identifier and the business card of the first user account sent by the server are received, and the login device of the second user account is the first device;
[0058] Step S104: Perform instant communication with the second device based on the communication link identifier and the business card of the first user account.
[0059] The first device and the second device are any electronic device, including electronic devices with live broadcast function such as smart phones, tablets, personal computers, smart wearable devices, etc. The first device and the second device can be the same or different. The communication method in this embodiment is applied to the live broadcast interface. Live broadcast means that the video data collected by the live broadcast client is transmitted to the audience client in real time, including product introduction live broadcast, online conference and other scenarios. The communication method in this embodiment can be used as an optional function in the live broadcast interface, and the user can choose to turn on or off the function in the live broadcast interface according to personal needs.
[0060] In step S101, the user can set up a business card for his or her user account in the live broadcast application to display identity information. The identity information includes the real name of the real-name authentication, account avatar, contact information and other basic information. For online meeting scenarios, the identity information can also include other information such as technical field and work unit. The basic information can be set as required items, and other information can be set as optional items. The user can choose whether to fill in or not to meet the user's personalized positioning and display needs. At the same time, the user can also choose the information to be displayed in the business card and hide the unselected information to meet differentiated social needs.
[0061] The live broadcast interface will display the user account of each user watching the live broadcast, but the business card of the user account will not be displayed. If the current user wants to view the business card of the first user account, it is necessary to send an exchange request for exchanging business cards to the first user account through the server. The first device sends a business card exchange request to the server, and the exchange request carries the first user account. Since the login device of the first user account is the second device, after receiving the exchange request, the server sends the exchange request to the second device.
[0062] It should be noted that each user account watching the live broadcast can set whether his or her business card is visible to the user account conducting the live broadcast. If it is set to be visible, when the user account watching the live broadcast enters the live broadcast room, the user account conducting the live broadcast can directly view and export the business card of the user account watching the live broadcast.
[0063] In step S102, the exchange response information includes accepting the exchange or rejecting the exchange, which is generated by the first user account and sent to the server by the login device of the first user account, that is, sent to the server by the second device, and then forwarded to the first device by the server. After receiving the exchange request for business card exchange sent by the first device, the server reads the first user account in the exchange request, and then forwards the exchange request to the login device of the first user account, that is, the second device. After receiving the exchange request, the second device automatically pops up the exchange request message on the live broadcast page of the first user account, for example, displays the exchange request message in a pop-up window or displays the exchange request message in a specific display area. The user account of the inviting party and the "Accept" and "Reject" buttons are displayed in the exchange request message at the same time. The invited user can choose whether to accept the business card exchange through the pop-up window. After the invited user makes a choice, the second device sends the selection result to the server, and the server then forwards the selection result to the first device as the exchange response information.
[0064] In step S103, when the invited user agrees to exchange business cards, the exchange response information received from the server is an acceptance of the exchange, that is, the exchange response information indicates that the exchange is allowed. When the exchange response information indicates that the exchange is allowed, the first device sends the business card of the second user account to the server, and the server sends the business card of the second user account to the second device, that is, the login device of the first user account, so that the first user account can view the business card of the second user account. At the same time, the server also receives the business card of the first user account sent by the second device, and sends the business card of the first user account to the first device, that is, the login device of the second user account, so that the second user account can view the business card of the first user account, thereby completing the business card exchange between the first user account and the second user account.
[0065] In addition, the server also needs to establish a communication link between the second user account and the first user account so that the two user accounts can communicate. Since there may be multiple pairs of user accounts communicating in the same live broadcast, in order to clearly distinguish the communication links between multiple pairs of user accounts and avoid communication confusion, the server generates a communication link identifier for the communication link between the first user account and the second user account when receiving an exchange request for business card exchange sent by the first device, and the communication link identifier can uniquely represent the communication link. For example, when the second user account requests to exchange business cards with user account A, the server marks the communication link between the second user account and user account A as communication link 1, and when the second user account requests to exchange business cards with user account B, the server marks the communication link between the second user account and user account B as communication link 2, wherein communication link 1 and communication link 2 are the communication link identifiers of their respective communication links. After generating the communication link identifier between the second user account and the first user account, the server will send the communication link identifier to the first device and the second device respectively, so that the two user accounts can communicate privately according to the communication link identifier.
[0066] In step S104, after receiving the business card and communication link identifier of the first user account, if the first device is interested in the business card of the first user account, that is, wants to communicate privately with the first user account, a communication link with the second device can be established through the server according to the communication link identifier, and based on the communication link, the second user account can conduct one-to-one instant communication with the first user account.
[0067] In an exemplary embodiment of the present disclosure, a first device sends an exchange request for exchanging business cards to a server, the exchange request includes a first user account, receives an exchange response message sent by the server, sends a business card of a second user account to the server when the exchange response message indicates that the exchange is allowed, and receives a communication link identifier and the business card of the first user account sent by the server, and communicates with a second device based on the communication link identifier and the business card of the first user account. This method adds business cards and business card exchange functions to user accounts, which can expand the social functions of applications. At the same time, business cards can only be exchanged with the permission of both parties, which can ensure the security and privacy of identity information in the business cards. In addition, after exchanging business cards, a one-to-one instant messaging connection is established with the second device, which can take into account the privacy, immediacy and scalability of social interaction. Especially in live broadcast scenarios, it is convenient for user accounts watching the same live broadcast to conduct private social interaction, or for user accounts participating in the same online meeting to conduct private social interaction.
[0068] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a first device. Figure 2 is a flow chart of a communication method according to an exemplary embodiment. Figure 2 As shown, the following steps are included:
[0069] Step S201, sending an exchange request for exchanging business cards to a server, where the exchange request includes a first user account, the business card is used to display identity information, and the login device of the first user account is the second device;
[0070] Step S202, receiving exchange response information sent by the server;
[0071] Step S203, when the exchange response information indicates that the exchange is allowed, the business card of the second user account is sent to the server, and the communication link identifier and the business card of the first user account sent by the server are received, and the login device of the second user account is the first device;
[0072] Step S204, when the business card of the first user account meets the preset condition, a target communication link is established with the second device based on the communication link identifier;
[0073] Step S205: Perform instant communication with the second device via the target communication link.
[0074] The specific implementation of steps S201 to S203 refers to steps S101 to S103 and will not be described in detail here.
[0075] In step S204, after the first device receives the business card of the second user account sent by the server, the second user account can view the business card of the first user account. If the second user account wants to communicate privately with the first user account by viewing the business card, the business card of the first user account meets the preset conditions.
[0076] In some embodiments, this step includes the following steps:
[0077] S24-1, upon receiving the communication connection instruction, sending a WSS connection request to the server, the WSS connection request including a communication link identifier;
[0078] S24-2, receiving a connection response message sent by the server, where the connection response message indicates that the target communication link is established;
[0079] S24-3, based on the connection response information, determine that the target communication link is established.
[0080] After receiving the communication link identifier sent by the server, the second user account displays the communication link identifier in the business card of the second user account. If the second user account wants to communicate privately with the first user account after viewing the business card of the first user account, the user can trigger the communication connection instruction by clicking the communication link identifier displayed in the business card of the second user account. When the first device receives the communication connection instruction, it indicates that the business card of the first user account meets the preset conditions. If there are multiple communication link identifiers displayed in the business card of the second user account, the user can click the communication link identifier corresponding to the user account with which he wants to communicate. Therefore, when the first device receives the communication connection instruction, it determines the target user account to establish the communication connection according to the communication link identifier carried by the communication connection instruction.
[0081] The first device sends a WSS (WebSocket Secure) connection request to the server according to the communication connection instruction. The WSS connection request carries a communication link identifier so that the server can determine the target user account to be connected when receiving the connection request. In one example, the user initiates a WSS connection request through the user interface or application of the second user account. This function is implemented on the first device using JavaScript technology and is operated using the WebSocket API. Since WSS communication uses the TLS (Transport Layer Security) protocol to encrypt communication data, the way to establish a communication connection is to perform a TLS handshake to ensure that a secure communication channel is established between the first device and the server. Therefore, after receiving the WSS connection request, if the server supports WSS communication, it establishes a WSS communication link with the first device and the second device respectively, and after the establishment is completed, it returns a handshake response, that is, sends a connection response message to the first device, indicating that the connection has been established. When the first device receives the connection response message, it determines that the target communication link has been established, and can transmit data in real time with the second device through the server.
[0082] In step S205, since the target communication link is a WSS communication connection, when instant communication is performed with the second device through the target communication link, the data to be transmitted will be encrypted using the TLS protocol to ensure the security of the communication content during transmission. The target communication link can load multimodal information, including ordinary text, rich text, audio information, picture information, video information, and file formats. When the user ends the communication connection or the current live broadcast ends, the WSS connection is closed to release resources to ensure that subsequent communications are carried out in the new connection.
[0083] In one example, the instant communication between the first device and the second device includes the following two situations:
[0084] The first method is to receive the first information input by the user, encrypt the first information through the TLS protocol, and send the encrypted first information to the server. After receiving the encrypted first information, the server forwards it to the second device.
[0085] The second method is to receive the encrypted second information sent by the second device to the server, decrypt the second information through the TLS protocol, and obtain the decrypted second information.
[0086] In this embodiment, by establishing a WSS communication connection to perform instant communication with the second device, the privacy of the user and the security of the communication content can be protected.
[0087] In some implementations, in addition to encrypting instant messaging data via a WSS communication connection, the website of the live broadcast application is also encrypted via HTTPS to ensure a secure communication channel is established between the user device and the server.
[0088] The entire communication solution adopts dual communication encryption of HTTPS and WSS. HTTPS uses the TLS / SSL protocol to establish a secure communication channel between the user device and the server, uses public key encryption and private key decryption to exchange the key of the symmetric encryption algorithm, and uses the symmetric encryption algorithm to encrypt and decrypt the communication data between the user device and the server. At the same time, the data integrity is verified by the message authentication code, which can ensure the confidentiality and integrity of the data during transmission; WSS uses the TLS / SSL protocol to establish a secure communication channel for instant communication between two user devices, uses handshake encryption to exchange the key of the symmetric encryption algorithm, uses the symmetric encryption algorithm to encrypt and decrypt the instant communication data, and verifies the data integrity by the message authentication code, which can further ensure the confidentiality and integrity of data transmission.
[0089] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a first device. Figure 3 is a flow chart of a communication method according to an exemplary embodiment. Figure 3 As shown, the following steps are included:
[0090] Step S301, obtaining configuration information, the configuration information includes identity information and display style, the display style includes hidden state and display state;
[0091] Step S302, determining the business card of the second user account according to the configuration information, and the login device of the second user account is the first device;
[0092] Step S303, sending an exchange request for exchanging business cards to the server, where the exchange request includes the first user account, the business card is used to display identity information, and the login device of the first user account is the second device;
[0093] Step S304, receiving the exchange response information sent by the server;
[0094] Step S305, when the exchange response information indicates that the exchange is allowed, sending the business card of the second user account to the server, and receiving the communication link identifier and the business card of the first user account sent by the server;
[0095] Step S306: Perform instant communication with the second device based on the communication link identifier and the business card of the first user account.
[0096] The specific implementation of steps S303 to S306 refers to steps S101 to S104 or steps S201 to S205, which will not be described in detail here.
[0097] In steps S301-S302, the configuration information is input by the user, and the configuration information includes identity information and display style, and the display style includes hidden state and display state. Identity information includes basic user information publicly displayed by the system real-name authentication, such as the user's real name, uploaded avatar, and work contact information, etc., which is used to ensure the accurate correspondence between the digital identity and the real identity, and to ensure accurate and efficient communication; it also includes personal information disclosed by the user to meet the user's personalized positioning and display needs. At the same time, the corresponding display style can be set for the identity information. The identity information in the hidden state will not be publicly displayed and can only be viewed by the user himself. The identity information in the displayed state is publicly displayed and can be viewed by other users through business card exchange. The personalized display style can meet the differentiated work social needs and is more suitable for business meeting application scenarios. According to the configuration information, the business card of the second user account can be determined. In addition, after the second user account receives the communication link identifier sent by the server, the communication link identifier is simultaneously displayed in the business card so that the user can communicate with the first user account through the communication link identifier. In some implementations, for online conference scenarios, the user account conducting the live broadcast needs to review the business card of each user account watching the live broadcast. Only after the review and verification is passed can the business card be exchanged with other user accounts to further ensure the security of the communication connection.
[0098] In this embodiment, the user can choose whether to display the real name and other sensitive information in the business card, and freely edit other displayed information to protect personal privacy.
[0099] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a server. Figure 4 is a flow chart of a communication method according to an exemplary embodiment. Figure 4 As shown, the following steps are included:
[0100] Step S401, receiving an exchange request for exchanging business cards sent by a first device, where the exchange request includes a first user account, the business card is used to display identity information, and the login device of the first user account is a second device;
[0101] Step S402, sending exchange response information to the first device, where the exchange response information is generated by the second device according to the exchange request and sent to the server;
[0102] Step S403, when the exchange response information indicates that the exchange is allowed, a communication link identifier is generated, a business card of the second user account sent by the first device is received, and the communication link identifier and the business card of the first user account are sent to the first device, the login device of the second user account is the first device, and the business card of the first user account is sent by the second device to the server;
[0103] Step S404: Send the communication link identifier and the business card of the second user account to the second device.
[0104] In step S401, the login device of the first user account is the second device, and the login device of the first user account is the second device. The server can identify the login device of each user account and interact with it to achieve interaction between user accounts. When the server receives an exchange request for business card exchange sent by the first device, it parses the first user account from the exchange request and determines that the login device of the first user account is the second device.
[0105] In step S402, the server sends an exchange request to the login device of the first user account, that is, the second device, and carries the second user account, so that after receiving the exchange request, the second device generates exchange response information according to the exchange request and sends the exchange response information to the server. After receiving the exchange response information sent by the second device, the server forwards the exchange response information to the first device.
[0106] In step S403, the exchange response information includes accepting the exchange or rejecting the exchange. When the server determines that the exchange response information includes accepting the exchange, that is, indicating that the exchange is allowed, a communication link identifier for the first user account and the second user account is generated. At the same time, the business card of the second user account sent by the first device and the business card of the first user account sent by the second device are received, and the communication link identifier and the business card of the first user account are sent to the first device.
[0107] In step S404, the server forwards the business card of the second user account received from the first device to the second device, and sends the communication link identification page to the second device, so that the second device can also perform instant communication with the first device according to the communication link identification.
[0108] In the embodiment, the business card exchange function between user accounts is implemented through the server, which can expand the social function of the application. At the same time, business cards can be exchanged only with the permission of both parties, which can ensure the security and privacy of the identity information in the business card.
[0109] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a server. Figure 5 is a flow chart of a communication method according to an exemplary embodiment. Figure 5 As shown, the following steps are included:
[0110] Step S501, receiving an exchange request for exchanging business cards sent by a first device, where the exchange request includes a first user account, the business card is used to display identity information, and the login device of the first user account is a second device;
[0111] Step S502, sending exchange response information to the first device, where the exchange response information is generated by the second device according to the exchange request and sent to the server;
[0112] Step S503, when the exchange response information indicates that the exchange is allowed, a communication link identifier is generated, a business card of the second user account sent by the first device is received, and the communication link identifier and the business card of the first user account are sent to the first device, the login device of the second user account is the first device, and the business card of the first user account is sent by the second device to the server;
[0113] Step S504, sending the communication link identifier and the business card of the second user account to the second device;
[0114] Step S505, receiving a WSS connection request sent by the first device, where the WSS connection request includes a communication link identifier;
[0115] Step S506, establishing a communication link between the server and the first device, and a communication link between the server and the second device, respectively, according to the communication link identifier;
[0116] Step S507: Send connection response information to the first device, where the connection response information indicates that the target communication link is established.
[0117] The specific implementation of steps S501 to S504 refers to steps S401 to S404, which will not be described in detail here.
[0118] In step S505-step S507, the correspondence between the communication link identifier and the user account is stored in the server. After receiving the WSS connection request sent by the first device, the server parses the communication link identifier, reads the corresponding user account from the above correspondence, and determines the login device of the user account. After receiving the WSS connection request sent by the first device, the server establishes a communication link between the server and the first device, and at the same time, establishes a communication link between the server and the second device according to the communication link identifier. After the establishment is completed, a connection response message is sent to the first device to notify the first device that the target communication link is established and can communicate with the second device in real time.
[0119] In this embodiment, a target communication link based on a WSS connection is established through the server to encrypt the communication transmission data through the TLS protocol, which can further ensure the confidentiality of data transmission.
[0120] In an exemplary embodiment of the present disclosure, a communication method is provided. Figure 6 is an interactive flow chart of a communication method according to an exemplary embodiment. Figure 6 As shown, the following steps are included:
[0121] Step S601: The first device sends a first exchange request for exchanging business cards to a server, where the first exchange request includes a first user account, the login device of the first user account is the second device, and the business card is used to display identity information;
[0122] Step S602: The server sends a second exchange request for exchanging business cards to the second device, where the second exchange request includes a second user account, and the login device of the second user account is the first device.
[0123] Step S603, the second device sends an exchange response message and a business card of the first user account to the server, where the exchange response message indicates that the exchange is allowed;
[0124] Step S604, the server generates a communication link identifier;
[0125] Step S605, the server sends the exchange response information, the communication link identifier and the business card of the first user account to the first device;
[0126] Step S606, the first device sends the business card of the second user account to the server;
[0127] Step S607, the server sends the business card and communication link identifier of the second user account to the second device;
[0128] Step S608: The first device and the second device perform instant communication via the communication link identifier.
[0129] In an exemplary embodiment of the present disclosure, a communication apparatus is provided, which is applied to a first device. Figure 7 is a block diagram of a communication device according to an exemplary embodiment. Figure 7 As shown, including:
[0130] A sending module 701 is used to send an exchange request for exchanging business cards to a server, where the exchange request includes a first user account, the business card is used to display identity information, and the login device of the first user account is the second device;
[0131] The receiving module 702 is used to receive the exchange response information sent by the server;
[0132] The sending module 701 and the receiving module 702 are further configured to send the business card of the second user account to the server when the exchange response information indicates that the exchange is allowed, and receive the communication link identifier and the business card of the first user account sent by the server, and the login device of the first user account is the first device;
[0133] The communication module 703 is used to perform instant communication with the second device based on the communication link identifier and the business card of the first user account.
[0134] In an exemplary embodiment, the communication module 703 is further configured to:
[0135] When the business card of the first user account meets a preset condition, establishing a target communication link with the second device based on the communication link identifier;
[0136] Instantly communicate with the second device via the target communication link.
[0137] In an exemplary embodiment, the communication module 703 is further configured to:
[0138] Upon receiving the communication connection instruction, a WSS connection request is sent to the server, wherein the WSS connection request includes a communication link identifier;
[0139] Receiving a connection response message sent by the server, the connection response message indicating that the target communication link is established;
[0140] Based on the connection response information, it is determined that the target communication link is established.
[0141] In an exemplary embodiment, the communication device further includes a determining module 704, configured to:
[0142] Get configuration information, which includes identity information and display style, and the display style includes hidden state and display state;
[0143] A business card of the second user account is determined according to the configuration information.
[0144] In an exemplary embodiment of the present disclosure, a communication device is provided, which is applied to a server. Figure 8 is a block diagram of a communication device according to an exemplary embodiment. Figure 8 As shown, including:
[0145] The receiving module 801 is used to receive an exchange request for business card exchange sent by the first device, where the exchange request includes a first user account, the business card is used to display identity information, and the login device of the first user account is the second device;
[0146] A sending module 802 is used to send exchange response information to the first device, where the exchange response information is generated by the second device according to the exchange request and sent to the server;
[0147] The receiving module 801 and the sending module 802 are further configured to generate a communication link identifier when the exchange response information indicates that the exchange is allowed, receive a business card of a second user account sent by the first device, and send the communication link identifier and the business card of the first user account to the first device, the login device of the second user account is the first device, and the business card of the first user account is sent by the second device to the server;
[0148] The sending module 802 is further configured to send the communication link identifier and the business card of the second user account to the second device.
[0149] In an exemplary embodiment, the receiving module 801 and the sending module 802 are further configured to:
[0150] receiving a WSS connection request sent by the first device, where the WSS connection request includes a communication link identifier;
[0151] According to the communication link identifier, respectively establish a communication link between the server and the first device, and a communication link between the server and the second device;
[0152] A connection response message is sent to the first device, where the connection response message indicates that the target communication link is established.
[0153] Each module in the above communication device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0154] In an exemplary embodiment, a computer device is provided, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any of the above communication methods are implemented.
[0155] In an exemplary embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above communication methods are implemented. The computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0156] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of any of the above communication directions are implemented.
[0157] Fig. 9 is a block diagram of a computer device 900 according to an exemplary embodiment. The computer device may be a first device or a server.
[0158] refer to Fig. 9 , a block diagram of a computer device that can be used as the camera 2 or terminal 1 of the present disclosure will now be described, and the computer device includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 to a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the computer device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0159] A plurality of components in the computer device 900 are connected to the I / O interface 905, including: an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909. The input unit 906 may be any type of device capable of inputting information to the computer device 900, the input unit 906 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the computer device 900, and may include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 907 may be any type of device capable of presenting information, and may include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 908 may include but is not limited to a disk, an optical disk. The communication unit 909 allows the computer device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0160] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as communication methods. For example, in some embodiments, the communication method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the computer device 900 via ROM 902 and / or a communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the communication method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the communication method in any other appropriate manner (e.g., by means of firmware).
[0161] The computer device 900 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned communication method.
[0162] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0163] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A communication method, It is characterized in that Applied to a first device, the method includes: Sending an exchange request for exchanging business cards to a server, wherein the exchange request includes a first user account, the business card is used to display identity information, and a login device for the first user account is a second device; Receiving exchange response information sent by the server; When the exchange response information indicates that the exchange is allowed, sending a business card of the second user account to the server, and receiving a communication link identifier and the business card of the first user account sent by the server, the login device of the first user account being the first device; Based on the communication link identifier and the business card of the first user account, instant communication is performed with the second device.
2. The communication method according to claim 1, It is characterized in that The instant communication with the second device based on the communication link identifier and the business card of the first user account includes: When the business card of the first user account meets a preset condition, establishing a target communication link with the second device based on the communication link identifier; Perform instant communication with the second device via the target communication link.
3. The communication method according to claim 2, It is characterized in that The establishing of a target communication link with the second device based on the communication link identifier when the business card of the first user account meets a preset condition includes: When receiving the communication connection instruction, sending a WSS connection request to the server, wherein the WSS connection request includes the communication link identifier; Receiving connection response information sent by the server, wherein the connection response information indicates that establishment of the target communication link is complete; Based on the connection response information, it is determined that establishment of the target communication link is complete.
4. The communication method according to claim 1, It is characterized in that The method further comprises: Acquire configuration information, wherein the configuration information includes identity information and display style, and the display style includes a hidden state and a display state; A business card of the second user account is determined according to the configuration information.
5. A communication method, It is characterized in that Applied to a server, the method comprises: receiving an exchange request for business card exchange sent by a first device, wherein the exchange request includes a first user account, the business card is used to display identity information, and a login device for the first user account is a second device; Sending exchange response information to the first device, where the exchange response information is generated by the second device according to the exchange request and sent to the server; When the exchange response information indicates that the exchange is allowed, generating a communication link identifier, receiving a business card of a second user account sent by the first device, and sending the communication link identifier and the business card of the first user account to the first device, the login device of the second user account is the first device, and the business card of the first user account is sent to the server by the second device; The communication link identifier and the business card of the second user account are sent to the second device.
6. The communication method according to claim 1, It is characterized in that The method further comprises: receiving a WSS connection request sent by the first device, wherein the WSS connection request includes the communication link identifier; According to the communication link identifier, respectively establish a communication link between the server and the first device, and a communication link between the server and the second device; Sending a connection response message to the first device, wherein the connection response message indicates that the target communication link is established.
7. A communication device, It is characterized in that Applied to a first device, the apparatus comprises: A sending module, used to send an exchange request for business card exchange to a server, wherein the exchange request includes a first user account, the business card is used to display identity information, and a login device of the first user account is a second device; A receiving module, used for receiving the exchange response information sent by the server; The sending module and the receiving module are further configured to send a business card of the second user account to the server when the exchange response information indicates that the exchange is allowed, and receive a communication link identifier and the business card of the first user account sent by the server, wherein the login device of the first user account is the first device; A communication module is used to perform instant communication with a second device based on the communication link identifier and the business card of the first user account.
8. A communication device, It is characterized in that Applied to a server, the device comprises: A receiving module, configured to receive an exchange request for business card exchange sent by a first device, wherein the exchange request includes a first user account, the business card is used to display identity information, and a login device for the first user account is a second device; a sending module, configured to send exchange response information to the first device, wherein the exchange response information is generated by the second device according to the exchange request and sent to the server; The receiving module and the sending module are further configured to generate a communication link identifier when the exchange response information indicates that the exchange is allowed, receive a business card of a second user account sent by the first device, and send the communication link identifier and the business card of the first user account to the first device, the login device of the second user account is the first device, and the business card of the first user account is sent to the server by the second device; The sending module is further used to send the communication link identifier and the business card of the second user account to the second device.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 4 or 5 to 6 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 4 or 5 to 6 is implemented.
