CN107196843B - Instant messaging method and device - Google Patents

Instant messaging method and device Download PDF

Info

Publication number
CN107196843B
CN107196843B CN201610146755.1A CN201610146755A CN107196843B CN 107196843 B CN107196843 B CN 107196843B CN 201610146755 A CN201610146755 A CN 201610146755A CN 107196843 B CN107196843 B CN 107196843B
Authority
CN
China
Prior art keywords
user equipment
user
token
equipment
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610146755.1A
Other languages
Chinese (zh)
Other versions
CN107196843A (en
Inventor
郭金
谷铁峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201610146755.1A priority Critical patent/CN107196843B/en
Publication of CN107196843A publication Critical patent/CN107196843A/en
Application granted granted Critical
Publication of CN107196843B publication Critical patent/CN107196843B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a method and a device for instant messaging, which are used for determining second user equipment to which instant messaging information is to be sent and a corresponding equipment token; adding the device token to a message to be sent to the second user equipment to form the instant communication message; and sending the instant communication message to first network equipment so that the first network equipment can send the instant communication message to the second user equipment according to the equipment token. When a user transmits an instant communication message from first user equipment to second user equipment, the instant communication message is firstly sent to first network equipment from the first user equipment and then sent to the second user equipment through the first network equipment, and the second network equipment is not needed in the middle, so that the transmission path of the instant communication message is shortened, the transmission time of the message is shortened, the load of a network server is reduced, and the operation cost is reduced.

Description

Instant messaging method and device
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for instant messaging.
Background
In the existing instant messaging technology, when a user sends an instant messaging message from a first user equipment to a second user equipment, the commonly used technology is as follows: the user sends an instant message from a first user device to a second network device, such as a developer server, the second network device sends the instant message to the first network device, such as a push server of a push platform, and the first network device sends the instant message to the second user device. In the sending process, the transmission path of the instant messaging message is longer, the timeliness of sending the instant messaging message is reduced, the load of a server end is larger, and the operation cost is increased.
Therefore, it is an urgent problem to provide an instant messaging technology to shorten the transmission path of instant messaging messages and reduce the load of the server.
Disclosure of Invention
The invention aims to provide a method and a device for instant messaging.
According to an aspect of the present invention, a method for implementing instant messaging in a first user equipment is provided, wherein the method comprises the following steps:
determining second user equipment to which the instant communication message is to be sent and a corresponding equipment token thereof;
adding the device token to a message to be sent to the second user equipment to form the instant communication message;
and sending the instant communication message to first network equipment so that the first network equipment can send the instant communication message to the second user equipment according to the equipment token.
Preferably, the method comprises:
and uploading the local device token of the first user equipment to second network equipment during first login, and acquiring a device token list corresponding to the contact.
Preferably, the determining a device token corresponding to the second user equipment to which the instant communication message is to be sent comprises:
and determining the device token corresponding to the second user equipment from the device token list corresponding to the contact.
Preferably, the method comprises:
and associating the local device token of the first user device and the device related information thereof to generate an identification code.
Preferably, the device-related information comprises at least any one of:
a device ID;
a device name;
the telephone number corresponding to the device.
Preferably, the method further comprises:
and when the device token of the second user equipment is changed, the device token of the second user equipment is obtained again from the second network equipment.
Preferably, the method further comprises:
submitting feedback information to the second network equipment, wherein the feedback information comprises a local equipment token corresponding to the first user equipment;
and when the feedback response is acquired, acquiring the feedback response from the second network equipment if the first user equipment is connected with the second network equipment, and acquiring the feedback response from the first network equipment if the first user equipment is not connected with the second network equipment.
According to an aspect of the present invention, there is also provided a method for facilitating instant messaging in a first network device, wherein the method comprises the following steps:
receiving an instant messaging message sent by first user equipment, wherein the instant messaging message comprises an equipment token corresponding to second user equipment;
identifying the second user equipment to which the instant communication message is to be sent according to the equipment token;
and sending the instant communication message to the second user equipment.
Preferably, the method comprises:
obtaining a feedback response to be pushed to the first user equipment, wherein the feedback response is generated based on feedback information submitted by the first user equipment;
and if the first user equipment is not connected with second network equipment, pushing the feedback response to the first user equipment according to a local equipment token corresponding to the first user equipment, wherein the second network equipment is an application server.
Preferably, the first network device is a push platform.
According to another aspect of the present invention, there is provided a first communication apparatus for implementing instant messaging in a first user equipment, wherein the apparatus comprises:
means for determining a second user device to which the instant communication message is to be sent and a device token corresponding thereto;
means for adding the device token to a message intended for the second user device to compose the instant messaging message;
means for sending the instant communication message to a first network device for the first network device to send the instant communication message to the second user device according to the device token.
Preferably, the first communication device includes:
and the device is used for uploading the local device token of the first user equipment to second network equipment when logging in for the first time and acquiring a device token list corresponding to the contact.
Preferably, the means for determining a device token corresponding to the second user equipment to which the instant communication message is to be sent is configured to:
and determining the device token corresponding to the second user equipment from the device token list corresponding to the contact.
Preferably, the first communication device includes:
means for associating a local device token of the first user device with device-related information thereof to generate an identification code.
Preferably, the device-related information comprises at least any one of:
a device ID;
a device name;
the telephone number corresponding to the device.
Preferably, the first communication device further comprises:
and when the device token of the second user equipment is changed, the device token of the second user equipment is obtained again from the second network equipment.
Preferably, the first communication device further comprises:
means for submitting feedback information to the second network device, wherein the feedback information includes a local device token corresponding to the first user device;
and a device configured to, when obtaining the feedback response, obtain the feedback response from the second network device if the first user equipment is connected to the second network device, and obtain the feedback response from the first network device if the first user equipment is not connected to the second network device.
According to another aspect of the present invention, there is also provided a second communication apparatus for facilitating instant messaging in a first network device, wherein the second communication apparatus includes:
the apparatus comprises means for receiving an instant messaging message sent from a first user equipment, wherein the instant messaging message comprises a device token corresponding to a second user equipment;
means for identifying the second user equipment to which the instant communication message is intended based on the device token;
means for sending the instant communication message to the second user equipment.
Preferably, the second communication device includes:
means for obtaining a feedback response to be pushed to the first user equipment, wherein the feedback response is generated based on feedback information submitted by the first user equipment;
and if the first user equipment is not connected with second network equipment, pushing the feedback response to the first user equipment according to a local equipment token corresponding to the first user equipment, wherein the second network equipment is an application server.
Preferably, the first network device is a push platform.
Compared with the prior art, the invention has the following advantages:
when a user transmits an instant communication message from first user equipment to second user equipment, the instant communication message is firstly sent to first network equipment from the first user equipment and then sent to the second user equipment through the first network equipment, and the second network equipment is not needed in the middle, so that the transmission path of the instant communication message is shortened, the transmission time of the message is shortened, the load of a network server is reduced, the operation cost is reduced, and the use experience of the user is improved.
Further, when the user submits the feedback message through the first user equipment, the device token of the first user equipment is transmitted to the second network equipment, and when the application program operates in the background, the first network equipment pushes the feedback response corresponding to the feedback message to the first user equipment, so that the feedback of the user is responded in time, the product defect and the potential demand description are accurately acquired, and the use experience of the user is improved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 shows a schematic diagram of a first communication device for enabling instant messaging in a first user equipment, according to an aspect of the invention;
FIG. 2 is a diagram illustrating a second communication apparatus for facilitating instant messaging in a first network device, in accordance with an aspect of the present invention;
fig. 3 is a schematic diagram illustrating a process of implementing instant messaging based on a first communication device and a second communication device together according to an embodiment of the present invention;
FIG. 4 illustrates a flow chart of a method for implementing instant messaging in a first user device in accordance with another aspect of the invention;
fig. 5 illustrates a flow diagram of a method for facilitating instant messaging in a first network device in accordance with another aspect of the disclosure.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations as a sequential process, many of the operations can be performed in parallel, concurrently, or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The term "computer device" or "computer" in this context refers to an intelligent electronic device that can execute predetermined processes such as numerical calculation and/or logic calculation by running predetermined programs or instructions, and may include a processor and a memory, wherein the processor executes a pre-stored instruction stored in the memory to execute the predetermined processes, or the predetermined processes are executed by hardware such as ASIC, FPGA, DSP, or a combination thereof. Computer devices include, but are not limited to, servers, personal computers, laptops, tablets, smart phones, and the like.
The computer equipment comprises user equipment and network equipment. Wherein the user equipment includes but is not limited to computers, smart phones, PDAs, etc.; the network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of computers or network servers, wherein Cloud Computing is one of distributed Computing, a super virtual computer consisting of a collection of loosely coupled computers. Wherein the computer device can be operated alone to implement the invention, or can be accessed to a network and implement the invention through interoperation with other computer devices in the network. The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a VPN network, and the like.
It should be noted that the user equipment, the network device, the network, etc. are only examples, and other existing or future computer devices or networks may also be included in the scope of the present invention, and are included by reference.
The methods discussed below, some of which are illustrated by flow diagrams, may be implemented by hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented in software, firmware, middleware or microcode, the program code or code segments to perform the necessary tasks may be stored in a machine or computer readable medium such as a storage medium. The processor(s) may perform the necessary tasks.
Specific structural and functional details disclosed herein are merely representative and are provided for purposes of describing example embodiments of the present invention. The present invention may, however, be embodied in many alternate forms and should not be construed as limited to only the embodiments set forth herein.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element may be termed a second element, and, similarly, a second element may be termed a first element, without departing from the scope of example embodiments. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. In contrast, when an element is referred to as being "directly connected" or "directly coupled" to another element, there are no intervening elements present. Other words used to describe the relationship between elements (e.g., "between" versus "directly between", "adjacent" versus "directly adjacent to", etc.) should be interpreted in a similar manner.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be noted that, in some alternative implementations, the functions/acts noted may occur out of the order noted in the figures. For example, two figures shown in succession may, in fact, be executed substantially concurrently, or the figures may sometimes be executed in the reverse order, depending upon the functionality/acts involved.
The present invention is described in further detail below with reference to the attached drawing figures.
Fig. 1 shows a schematic diagram of a first communication device for implementing instant messaging in a first user equipment according to an aspect of the present invention. The first communication apparatus 1 includes: 1) means for determining a second user equipment to which an instant messaging message is to be sent and a device token corresponding thereto, hereinafter referred to as determining means 101; 2) means for adding the device token to a message to be sent to the second user equipment to form the instant messaging message, hereinafter referred to as adding means 102; 3) and a device, hereinafter referred to as a first sending device 103, configured to send the instant messaging message to a first network device, so that the first network device sends the instant messaging message to the second user equipment according to the device token.
Here, the first communication device 1 is located in the first user equipment, and the determining device 101, the adding device 102 and the first sending device 103 included in the first communication device 1 are also located in the first user equipment, and the first user equipment includes but is not limited to user equipment such as a personal computer, a laptop computer, a tablet computer, a smart phone and a PDA. It will be understood by those skilled in the art that the above-described user equipment is merely exemplary and that mobile devices, either currently existing or later that may occur, are also intended to be encompassed within the scope of the present invention, as may be applicable thereto, and are hereby incorporated by reference.
Wherein the determining means 101 determines the second user equipment to which the instant messaging message is to be sent and its corresponding device token. Specifically, when a user needs to send an instant messaging message from a first user equipment to a second user equipment, the first user equipment determines the second user equipment and an equipment token corresponding to the second user equipment from an equipment token list or from a called historical communication record through a determining device 101 in a first communication device 1 on the first user equipment according to an instruction sent by the user to send the instant messaging message, for example, matching search, precise search and the like, so that the first network equipment can identify the second user equipment according to the equipment token and accurately and unmistakably send the instant messaging message to the second user equipment. Here, the device token list is obtained from the second network device, for example, and corresponds to the local contact of the first user device, where the device token list is, for example, a list in which device-related information and device tokens are in one-to-one correspondence, and the first user device may find the device token corresponding to the user device in the list according to the device-related information, where the device-related information may be a device ID, a device name, or a phone number corresponding to the device. For example, a user sends an instant messaging message from a first user equipment to a second user equipment, if the first user equipment has acquired an equipment token list corresponding to a contact telephone number in the first user equipment, the user inputs a telephone number corresponding to the second user equipment, for example, through a recipient column of an instant messaging interface, and when the user clicks a send button, the first network communication device 1 is triggered, and the determining device 101 searches from the equipment token list through the telephone number input in the recipient information column, and determines the equipment token corresponding to the second user equipment.
It will be understood by those skilled in the art that the above method of determining the second user equipment and its corresponding device token to which an instant message is to be sent is merely exemplary, and other existing or future methods of determining a device token, such as may be applicable to the present invention, are also included within the scope of the present invention and are hereby incorporated by reference.
The adding means 102 adds the device token to a message to be sent to the second user equipment to compose the instant messaging message. Specifically, when a user sends an instant messaging message from a first user device to a second user device, the determining apparatus 101 determines the second user device and a device token corresponding to the second user device from a device token list corresponding to a contact of the first user device or from a called historical communication record, where the device token list is obtained from a first network device when the user first registers to log in the first user device, or obtained by adding a local contact to a friend or the like, where the first user device adds the contact on the device to the friend by, for example, scanning a code or searching a device token, a phone number, or the like. The adding device 102 adds the device token as the destination address information of the message to a specific field of the message to compose the instant messaging message. For example, the user sends an instant messaging message from the first user equipment to the second user equipment, and if the first user equipment has already obtained the device token list corresponding to the contact in the first user equipment, the user inputs a phone number corresponding to the second user equipment through a search interface, then, by means of the interaction between the determining means 101 and the first user equipment, for example, one or more calls to an Application Program Interface (API) provided by the first user equipment, from the device token list corresponding to the native contact, or searching from the called historical communication record, determining the second user equipment and the equipment token corresponding to the second user equipment, the search interface is, for example, an instant messaging message recipient information bar, and a search operation of the search interface is triggered when a user clicks a sending button; the adding device 102 adds the device token of the second user equipment determined by the determining device 101 to a specific field of a message to be sent to the second user equipment to form the instant messaging message, for example, by means of packaging, encapsulating, or forming a character string conforming to a specific structure, and the first communication device 1 sends the instant messaging message to a first network device, for example, the first network device may be an Apple Push Notification Service (Apple Push Notification Service).
Here, the device token of the second user equipment is added to the message to be sent as destination address information of the message to be sent to form the instant messaging message, so that a subsequent device determines a destination address of the instant messaging message according to the device token in the instant messaging message.
It will be understood by those skilled in the art that the above-described manner of adding device tokens is merely exemplary, and that other existing or future means of adding device tokens, such as those applicable to the present invention, are also encompassed within the scope of the present invention and are hereby incorporated by reference.
The first sending device 103 sends the instant communication message to a first network device, so that the first network device sends the instant communication message to the second user equipment according to the device token. Specifically, when the user sends an instant communication message from a first user equipment to a second user equipment, the determining device 101 determines the second user equipment and a device token corresponding to the second user equipment from the device token list corresponding to the local contact or from the called historical communication record by means of, for example, matching search, precise search, etc., the adding device 102 adds the device token to a specific field of a message to be sent to the second user equipment by means of, for example, packing, encapsulating or composing a character string conforming to a specific structure to compose the instant communication message, the first sending device 103 sends the instant communication message to the first network equipment by interaction with the first network equipment, for example, by calling an Application Program Interface (API) or other agreed communication modes provided by the first network equipment one or more times, the first network device identifies a device token of a target user device in the instant communication message, and then sends the instant communication message to the target user device, namely a second user device, according to the device token. For example, a user sends an instant messaging message from a first user equipment to a second user equipment, if the first user equipment has acquired an equipment token list corresponding to a contact in the first user equipment, the determining device 101 calls the equipment token list one or more times through interaction with the first user equipment according to an equipment name corresponding to the second user equipment and stored in the first user equipment, searches in the equipment token list, determines an equipment token corresponding to the equipment name of the second user equipment, the adding device 102 adds the equipment token of the second user equipment determined by the determining device 101 to a message to be sent to the second user equipment, for example, in a manner that a character string conforming to a specific structure is formed by identifiers such as a message intended to be sent by the first user equipment to the second user equipment and an equipment token of the second user equipment, the instant messaging message in the string format is sent to a first network device through a first sending device 103, for example, the first network device is a network push server, the network push server identifies a device token of the second user device, and a connection is established between the device token and the second user device according to the device token, so that the instant messaging message is accurately sent to the second user device.
Here, when a user wants to send a message from a first user device to a second user device, a first communication device 1 in the first user device determines a device token of the second user device in a device token list based on user device information of the second user device, such as a device name, a phone number corresponding to the device, and the like, combines the device token and the message to be sent to the second user device into an instant communication message with a definite destination address, and then sends the instant communication message to a first network device, thereby completing a sending process of the instant communication message from the first user device to the first network device. In the process, only when the user logs in for the first time, the first user equipment acquires the equipment token list from the second network equipment, and the instant communication message is sent from the first user equipment to the second user equipment through the first network equipment without passing through the second network equipment, so that a transmission link is shortened, the load of the second network equipment is relieved, network congestion is reduced, and the operation cost is reduced.
Preferably, the first communication device 1 further comprises: and a device (not shown) configured to upload the local device token of the first user equipment to the second network device and obtain a device token list corresponding to the contact when logging in for the first time, which is hereinafter referred to as an upload device. Specifically, the first user equipment registers with the first network equipment, after the registration is successful, the first network equipment returns the device token of the first user equipment to the first user equipment, when a user logs in the first user equipment for the first time, the uploading device uploads the device token, the telephone number corresponding to the first user equipment, and the identifier, name, software version, or system version user name of the device to the second network equipment and adds the device token to the device token list stored in the second network equipment, the first user equipment obtains the device token list corresponding to the local contact from the second network equipment, where the device token list is, for example, a list in which device-related information and device tokens are in one-to-one correspondence, and the determining device 101 can quickly find and determine the device token corresponding to the second user equipment by querying or searching in the device token list, the device-related information may be a device ID, a device name, or a phone number corresponding to the device. Preferably, the device token corresponding to the first user equipment is acquired from a second network device, and when a user logs in the first user equipment for the first time, the uploading device uploads the device token corresponding to the first user equipment to the second network device. Preferably, the device token corresponding to the first user equipment is derived from a device identifier of the first user equipment itself, for example, generated according to a device unique identifier of the first user equipment, or the like, or the device unique identifier of the first user equipment is directly used as the device token of the first user equipment. Further, when the instant messaging message fails to be sent due to the fact that the device token of the second user equipment is changed, the device token of the second user equipment is obtained again, the uploading device uploads the device token of the second user equipment to the second network equipment, and the first user equipment obtains the device token list corresponding to the local contact from the second network equipment again.
Preferably, the determining device 101 determines the device token corresponding to the second user equipment from the device token list corresponding to the contact. Specifically, if the device token list corresponding to the contact in the first user equipment has been obtained, the determining apparatus 101 may determine, for example, a device token corresponding to the second user equipment from the device token list corresponding to the contact through a matching search, an accurate search, and the like, for example, call the device token list through calling an Application Program Interface (API) in the first user equipment once or multiple times according to a phone number input by a user in an addressee column, perform a matching search according to the phone number in the device token list, and determine a device token identifying the second user equipment corresponding to the phone number. Preferably, the determining apparatus 101 may further determine the device token corresponding to the second user equipment according to the phone number or the name of the user equipment in a historical communication contact record list of the user equipment or a frequently-used contact record list of the user, where the historical communication record list is, for example, a communication contact record list in which the user sends an instant communication message within a certain time threshold, and the frequently-used contact record list of the user may be a frequently-used contact record list set by the user himself or a frequently-used contact record list automatically set by the system for the user according to the frequency of use of the user.
Preferably, the first communication device 1 comprises: means (not shown) for associating the local device token of the first user device with device related information thereof to generate an identification code, hereinafter referred to as associating means. Specifically, after acquiring the device token of the first user equipment, the associating device associates the device name, the phone number, or the device ID of the first user equipment with the local device token to generate an identification code, such as a two-dimensional code, of the first user equipment; preferably, the second user equipment scans the two-dimensional code of the first user equipment to form contacts with each other, and obtains device information of each other, if the phone number in the information of the two-dimensional code matches the phone number, corresponding to the first user equipment, recorded in the address book of the second user equipment, the second user equipment obtains the contact name of the first user equipment through the contact name, corresponding to the phone number, recorded in the address book of the second user equipment, and associates the contact name of the first user equipment with the device token of the first user equipment, similarly, the first user equipment also associates the contact name of the second user equipment with the device token of the second user equipment to generate a local contact device token list, when the user sends the instant messaging message from the first user equipment to the second user equipment, only the contact name needs to be input in the recipient column, the first communication apparatus 1 may determine the device token of the second user device directly according to the contact name, and send the instant communication message to the second user device via the first network device, for example, a network push server, according to the device token. The local contact person device token list can be synchronized before logging in or logging out for the first time, further, when the user device token is changed, the association is released, and the association operation is performed after the device token is acquired again. Here, the device-related information includes, but is not limited to: 1) a device ID, which may be a device unique identifier; 2) device name, a name defined by the user for the user device; 3) the telephone number corresponding to the equipment, and the telephone number commonly used by the equipment.
It should be understood by those skilled in the art that the above-mentioned device-related information is only an example, and other existing or future device-related information, such as may be applicable to the present invention, is also included within the scope of the present invention and is hereby incorporated by reference.
Preferably, the first communication device further comprises: means (not shown) for retrieving the device token of the second user equipment from the second network device when the device token of the second user equipment is changed. Specifically, for example, when a second user equipment reinstalls a system or a user changes a mobile phone, the device token of the second user equipment is invalid, the failure of the user device token may cause failure in sending the instant communication message to the second user equipment, the second user equipment reacquires the device token corresponding to the second user equipment and uploads the device token to the second network equipment, and the first acquisition device reacquires the device token of the second user equipment from the second network equipment.
Preferably, the first communication device further comprises: 1) means for submitting feedback information to the second network device, hereinafter referred to as submitting means (not shown), where the feedback information includes a local device token corresponding to the first user device; 2) and a device (not shown) configured to, when obtaining the feedback response, obtain the feedback response from the second network device if the first user equipment is connected to the second network device, and obtain the feedback response from the first network device if the first user equipment is not connected to the second network device.
The submitting device submits feedback information to the second network device, wherein the feedback information includes a local device token corresponding to the first user device. Specifically, for example, after the first user equipment acquires the local equipment token, when the user submits the user opinion feedback information from the first user equipment to the second network equipment through the submitting device, the user adds the equipment token to the user opinion feedback information to form feedback information, and the user transmits the feedback information to the second network equipment. For example, when the first network device is, for example, a network push server APNS, and the second network device is, for example, a developer server, in the IOS system, the first user device registers with the network push server APNS, after the registration is successful, the APNS returns a device token of the first user device to the first user device, and the user transmits feedback information to the developer server from the first user device through the submission apparatus, where the feedback information includes, but is not limited to, user opinion feedback and the device token of the first user device, and after receiving the feedback information, the product manager or the tester sends a corresponding feedback response to the first user device.
When the feedback response is obtained, if the first user equipment is connected with the second network equipment, the second obtaining device obtains the feedback response from the second network equipment, and if the first user equipment is not connected with the second network equipment, the second obtaining device obtains the feedback response from the first network equipment. Specifically, a user submits feedback information from a first user equipment to the second network equipment through the submitting device, wherein the feedback information includes, but is not limited to, user opinion feedback information and an equipment token of the first user equipment, and after receiving the feedback information, a product manager or a tester needs to judge whether the first user equipment is connected with the second network equipment, and if the first user equipment is connected with the second network equipment, the second obtaining device obtains a feedback response from the second network equipment; if the first user equipment is not connected with the second network equipment, the second obtaining device obtains a feedback response from the first network equipment. For example, in an IOS system, a first user equipment registers with a first network device, for example, a network push server APNS, and after the registration is successful, the APNS returns a device token of the first user equipment to the first user equipment, when a user transmits feedback information from a first user device via an application via the submitting means to a second network device, for example a developer server, the developer server, wherein the feedback information includes, but is not limited to, user opinion feedback and a device token of the first user device, after receiving the feedback information, a product manager or a tester sends a corresponding feedback response to the first user device, the second acquisition device judges whether the first user equipment is connected with the developer server, if so, the first user equipment indicates that the user stays in the current application program, and the developer server sends feedback response content to the user through the current application program; and if the first user equipment is not connected with the developer server, the application program is operated in the background, the user does not use the application program, and the network push server pushes the feedback response content to the user.
Fig. 2 is a schematic diagram of a second communication apparatus for facilitating instant messaging in a first network device, according to an aspect of the present invention, where the second communication apparatus 2 is located in the first network device and communicates with a user equipment through a network.
The first communication device 1 and the second communication device 2 perform interactive communication through a network, and jointly complete the sending of instant messaging. The first communication device 1 is located in a first user equipment and the second communication device 2 is located in a first network equipment.
The second communication device 2 includes: 1) a means for receiving an instant messaging message sent by a first user equipment, hereinafter referred to as a receiving means 201, where the instant messaging message includes a device token corresponding to a second user equipment; 2) means for identifying, according to the device token, the second user equipment to which the instant communication message is intended, hereinafter referred to as identifying means 202; 3) means for sending the instant communication message to the second user equipment, hereinafter referred to as second sending means 203.
The receiving apparatus 201 receives an instant messaging message sent from a first user equipment, where the instant messaging message includes a device token corresponding to a second user equipment. Specifically, when a user sends an instant messaging message from a first user equipment to a second user equipment, a first communication device 1 in the first user equipment determines a device token corresponding to the second user equipment from a device token list by means of, for example, matching search, accurate search, or calling a historical communication record; adding the device token into a message to be sent to a second user device to form the instant communication message in a mode of packaging, packaging or forming a character string conforming to a specific structure; then, the instant messaging message is sent to a first network device, and the receiving apparatus 201 in the first network device receives, through interaction with the first communication apparatus 1, an instant messaging message sent to the first network device by the first user device, for example, through one or more calls of an Application Program Interface (API) provided by the first user device where the first communication apparatus 1 is located, or through other agreed communication modes, where the instant messaging message includes a device token corresponding to a second user device.
The identifying means 202 identifies the second user equipment to which the instant message is intended according to the device token. Specifically, the identifying device 202 analyzes the instant messaging message received by the receiving device 201 from the first user equipment, analyzes a device token of the second user equipment to which the instant messaging message is intended according to a certain rule or an identifying method, and identifies the second user equipment to which the instant messaging message is intended based on addressing by the device token. For example, the first network device is, for example, a network push server APNS, and after receiving the instant messaging message sent by the first user device, the APNS analyzes the instant messaging message, for example, extracts a device token from a specific field of the instant messaging message, and identifies, according to the device token, a second user device corresponding to the device token, and the network push server APNS establishes a connection with the second user device, so as to ensure that the instant messaging message is accurately pushed to the second user device.
The second sending means 203 sends the instant communication message to the second user equipment. Specifically, after the receiving apparatus 201 receives the instant messaging message sent by the first user equipment and including the device token corresponding to the second user equipment, the identifying apparatus 202 analyzes the device token of the second user equipment to which the instant messaging message is intended, and performs addressing based on the device token to identify the second user equipment to which the instant messaging message is intended, and the second sending apparatus 203 sends the instant messaging message to the second user equipment. For example, the first network device is, for example, a network push server APNS, if a user sends an instant message from the first user device to a second user device, the determining device 101 determines a device token of the second user device from a device token list corresponding to a contact of the first user device, the adding device 102 adds the device token to a message to be sent to the second user device to form an instant communication message, the first sending device 103 directly sends the instant communication message to the network push server APNS, the receiving device 201 in the network push server APNS receives the instant communication message sent by the first user device and including the device token of the second user device, the identifying device 202 identifies the second user device receiving the instant communication message according to the device token in a specific field of the instant communication message, the second sending device 203 directly pushes the instant messaging message to the second user equipment through the network push server APNS, and completes the transmission of the instant messaging message from the first user equipment to the second user equipment through the network push server.
Preferably, the second communication device 2 includes: 1) means for obtaining a feedback response to be pushed to the first user equipment, hereinafter referred to as a third obtaining means (not shown), where the feedback response is generated based on feedback information submitted by the first user equipment; 2) and a device (not shown) configured to push the feedback response to the first user equipment according to a local device token corresponding to the first user equipment if the first user equipment is not connected to a second network device, where the second network device is an application server.
The third obtaining device obtains a feedback response to be pushed to the first user equipment, wherein the feedback response is generated based on feedback information submitted by the first user equipment. Specifically, the first user equipment registers with a first network device, such as a network push server, after the registration is successful, the network push server returns a device token of the first user equipment to the first user equipment, when a user submits user opinion feedback information from the first user equipment to the second network device through the submitting device, the device token of the user is added to the user opinion feedback information to form feedback information, the user transmits the feedback information to the second network device, after receiving the feedback information, a product manager or a tester gives a feedback response to the feedback information, if the first user equipment is connected with the second network device, the first user equipment is executing a current application program, and the feedback response is sent to the first user equipment through the second network device, the third obtaining means does not obtain the feedback response; if the first user equipment is not connected with the second network equipment, which indicates that the first user equipment is not executing the current application program, the third acquiring device acquires the feedback to be pushed to the first user equipment and responds to the feedback message.
And if the first user equipment is not connected with second network equipment, pushing the feedback response to the first user equipment by a pushing device according to a local equipment token corresponding to the first user equipment, wherein the second network equipment is an application server. Specifically, for example, the first network device is a network push server, the second network device is a developer server, if the first user device is not connected to the developer server and the first user device is not executing a current application program, the third obtaining device obtains a feedback response to be pushed to the first user device, and the pushing device directly pushes the feedback response to the first user device through the network push server according to a local device token corresponding to the first user device.
Here, the first network device is a push platform, and the instant messaging message is directly pushed to the second user device via the push platform, so that the instant messaging message is accurately and timely sent to the second user device.
The process of the first communication device and the second communication device cooperating to realize instant communication is described as a specific embodiment.
For example, as shown in fig. 3, fig. 3 is a schematic diagram illustrating a process of implementing instant messaging based on a first communication device and a second communication device together according to an embodiment of the present invention.
For example, the first network device is a network push server, and the second network device is a developer server. The method comprises the steps that a first user device registers in a network push server, after the registration is successful, the push server returns a device token of the first user device to the first user device, when a user logs in the first user device for the first time, the first user device uploads the local device token to a developer server and adds the local device token to a device token list stored in the developer server, and the first user device obtains a device token list corresponding to a local contact from the developer server, wherein the device token list is a list corresponding to the local contact telephone number or the contact name and the device token one to one. When a user sends an instant communication message from a first user equipment to a second user equipment, the user inputs a phone number or a contact name of a contact corresponding to the second user equipment in a recipient column, for example, a determining device 101 of a first communication device 1 on the first user equipment searches and determines an equipment token of the second user equipment in an equipment token list according to the phone number or the contact name of the contact, an adding device 102 of the first communication device 1 adds the equipment token to a message to be sent to form an instant communication message, a first sending device 103 of the first communication device 1 sends the instant communication message to a network push server, a receiving device 201 of a second communication device 2 on the network push server receives the instant communication message sent from the first user equipment to the network push server, and an identifying device 202 of the second communication device 2 identifies an equipment token of the second user equipment, the second sending device 203 of the second communication device 2 pushes the instant communication message from the network push server to the second user equipment. In the process, the instant messaging message is pushed from the first user equipment to the second user equipment through the network push server without passing through the developer server, so that the transmission path of the instant messaging message is shortened, the transmission time of the message is shortened, the load of the developer server is reduced, and the operation cost is reduced.
When the user transmits the instant communication message from the first user equipment to the second user equipment, the instant communication message is firstly sent to the first network equipment from the first user equipment and then sent to the second user equipment through the first network equipment, and the second network equipment is not needed in the middle, so that the transmission path of the instant communication message is shortened, the transmission time of the message is shortened, the load of a network server is reduced, and the operation cost is reduced.
Fig. 4 shows a flow chart of a method for implementing instant messaging in a first user equipment according to another aspect of the invention.
In step S401, the first communication apparatus 1 determines the second user device to which the instant communication message is to be sent and the corresponding device token. Specifically, when a user needs to send an instant communication message from a first user device to a second user device, the first user device determines, according to an instruction sent by the user to send the instant communication message, in step S401, the second user device and a device token corresponding to the second user device from a device token list or from a called historical communication record by using, for example, a matching search, an accurate search, and the like, so that the first network device identifies the second user device according to the device token and accurately sends the instant communication message to the second user device without error. Here, the device token list is obtained from the second network device, for example, and corresponds to the local contact of the first user device, where the device token list is, for example, a list in which device-related information and device tokens are in one-to-one correspondence, and the first user device may find the device token corresponding to the user device in the list according to the device-related information, where the device-related information may be a device ID, a device name, or a phone number corresponding to the device. For example, a user sends an instant messaging message from a first user equipment to a second user equipment, if the first user equipment has already acquired an equipment token list corresponding to a contact telephone number in the first user equipment, the user inputs a telephone number corresponding to the second user equipment, for example, through a recipient column of an instant messaging interface, and when the user clicks a send button, the first network communication device 1 is triggered, and in step S401, the first communication device 1 searches from the equipment token list through the telephone number input in the recipient information column to determine the equipment token corresponding to the second user equipment.
It will be understood by those skilled in the art that the above method of determining the second user equipment and its corresponding device token to which an instant message is to be sent is merely exemplary, and other existing or future methods of determining a device token, such as may be applicable to the present invention, are also included within the scope of the present invention and are hereby incorporated by reference.
In step S402, the first communication apparatus 1 adds the device token to a message to be sent to the second user equipment to compose the instant communication message. Specifically, when a user sends an instant messaging message from a first user device to a second user device, in step S401, the first communication apparatus 1 determines the second user device and a device token corresponding to the second user device from a device token list corresponding to a contact of the first user device or from a called historical communication record, where the device token list is obtained from a first network device when the user first registers to log in the first user device, or obtained by adding a local contact and the like, where the first user device adds the contact on the device by, for example, scanning a code or searching a device token, a phone number, and the like. In step S402, the first communication apparatus 1 adds the device token as destination address information of the message to a specific field of the message to compose the instant communication message. For example, the user sends an instant messaging message from the first user equipment to the second user equipment, and if the first user equipment has already obtained the device token list corresponding to the contact in the first user equipment, the user inputs a phone number corresponding to the second user equipment through a search interface, and then through interaction between the first communication device 1 and the first user equipment, for example, one or more calls to an Application Program Interface (API) provided by the first user equipment, from the device token list corresponding to the native contact, or searching from the called historical communication record, determining the second user equipment and the equipment token corresponding to the second user equipment, the search interface is, for example, an instant messaging message recipient information bar, and a search operation of the search interface is triggered when a user clicks a sending button; in step S402, the first communication device 1 adds the device token of the second user equipment determined by the first communication device 1 to a specific field of a message to be sent to the second user equipment, for example, by means of packaging, encapsulation, or forming a character string conforming to a specific structure, so as to form the instant communication message, and the first communication device 1 sends the instant communication message to a first network device, for example, the first network device may be an Apple Push Notification Service (APNS).
Here, the device token of the second user equipment is added to the message to be sent as destination address information of the message to be sent to form the instant messaging message, so that a subsequent device determines a destination address of the instant messaging message according to the device token in the instant messaging message.
It will be understood by those skilled in the art that the above-described manner of adding device tokens is merely exemplary, and that other existing or future means of adding device tokens, such as those applicable to the present invention, are also encompassed within the scope of the present invention and are hereby incorporated by reference.
In step S403, the first communication device 1 sends the instant communication message to the first network device, so that the first network device sends the instant communication message to the second user equipment according to the device token. Specifically, when the user sends an instant communication message from a first user equipment to a second user equipment, in step S401, the first communication apparatus 1 determines the second user equipment and a device token corresponding to the second user equipment from the device token list corresponding to the local contact or from the retrieved historical communication record by means of, for example, matching search, precise search, etc., in step S402, the first communication apparatus 1 adds the device token to a specific field of a message to be sent to the second user equipment by means of, for example, packing, encapsulating or composing a character string conforming to a specific structure to compose the instant communication message, in step S403, the first communication apparatus 1 composes the instant communication message by interacting with the first network equipment, for example, by calling an Application Program Interface (API) or other agreed communication method provided by the first network equipment one or more times, and sending the instant communication message to first network equipment, wherein the first network equipment identifies the equipment token of target user equipment in the instant communication message, and then sends the instant communication message to the target user equipment, namely second user equipment according to the equipment token. For example, a user sends an instant communication message from a first user equipment to a second user equipment, if the first user equipment has acquired a device token list corresponding to a contact in the first user equipment, in step S401, the first communication device 1 calls the device token list once or multiple times through interaction with the first user equipment according to a device name corresponding to the second user equipment already stored in the first user equipment, searches in the device token list, determines a device token corresponding to the device name of the second user equipment, in step S402, the first communication device 1 adds the device token of the second user equipment determined by the first communication device 1 to a message to be sent to the second user equipment, for example, in a manner that a character string conforming to a specific structure is formed by a message to be sent by the first user equipment to the second user equipment and a device token of the second user equipment and the like, the instant communication message in the string format is sent by the first communication device 1 to the first network device in step S403, for example, the first network device is a network push server, the network push server identifies the device token of the second user device, and a connection is established between the device token and the second user device according to the device token, so as to accurately send the instant communication message to the second user device.
Here, when a user wants to send a message from a first user device to a second user device, a first communication device 1 in the first user device determines a device token of the second user device in a device token list based on user device information of the second user device, such as a device name, a phone number corresponding to the device, and the like, combines the device token and the message to be sent to the second user device into an instant communication message with a definite destination address, and then sends the instant communication message to a first network device, thereby completing a sending process of the instant communication message from the first user device to the first network device. In the process, only when the user logs in for the first time, the first user equipment acquires the equipment token list from the second network equipment, and the instant communication message is sent from the first user equipment to the second user equipment through the first network equipment without passing through the second network equipment, so that a transmission link is shortened, the load of the second network equipment is relieved, network congestion is reduced, and the operation cost is reduced.
Preferably, the method further comprises step S404 (not shown). In step S404, the first communication apparatus 1 uploads the local device token of the first user device to the second network device when logging in for the first time, and obtains the device token list corresponding to the contact. Specifically, the first user equipment registers with the first network equipment, after the registration is successful, the first network equipment returns the device token of the first user equipment to the first user equipment, when the user logs in the first user equipment for the first time, in step S404, the first communication device 1 uploads the device token, the phone number corresponding to the first user equipment, and the identifier, name, software version, or system version user name of the device to the second network equipment, and adds the device token to the device token list stored in the second network equipment, the first user equipment obtains the device token list corresponding to the local contact from the second network equipment, where the device token list is, for example, a list in which device-related information corresponds to the device token one to one, and in step S401, the first communication device 1 can quickly find and determine the device token corresponding to the second user equipment by querying or searching in the device token list, the device-related information may be a device ID, a device name, or a phone number corresponding to the device. Preferably, the device token corresponding to the first user equipment is obtained from the second network equipment, and when the user logs in the first user equipment for the first time, in step S404, the first communication device 1 uploads the device token corresponding to the first user equipment to the second network equipment. Preferably, the device token corresponding to the first user equipment is derived from a device identifier of the first user equipment itself, for example, generated according to a device unique identifier of the first user equipment, or the like, or the device unique identifier of the first user equipment is directly used as the device token of the first user equipment. Further, when the instant messaging message fails to be sent due to a change in the device token of the second user equipment, the device token of the second user equipment is obtained again, in step S404, the first communication device 1 uploads the device token of the second user equipment to the second network equipment, and the first user equipment obtains the device token list corresponding to the local contact from the second network equipment again.
Preferably, the step S401 further includes a sub-step S4011 (not shown). In sub-step S4011, the first communication apparatus 1 determines the device token corresponding to the second user equipment from the device token list corresponding to the contact. Specifically, if the device token list corresponding to the contact in the first user device has been obtained, in sub-step S4011, the first communication device 1 may determine, for example, a device token corresponding to the second user device from the device token list corresponding to the contact through matching search, precise search, and the like, for example, call the device token list through calling an Application Program Interface (API) in the first user device one or more times according to a phone number input by a user in an addressee column, perform matching search according to the phone number in the device token list, and determine a device token identifying the second user device corresponding to the phone number. Preferably, in sub-step S4011, the first communication apparatus 1 may further determine the device token corresponding to the second user equipment according to the phone number or the name of the user equipment in a historical communication contact record list of the user equipment or a user frequent contact record list, where the historical communication record list is, for example, a communication contact record list that the user sends an instant communication message within a certain time threshold, and the user frequent contact record list may be a frequent contact record list set by the user himself or a frequent contact record list that the system automatically sets for the user according to the frequency of use of the user.
Preferably, the method further comprises step S405. In step S405, the first communication device 1 associates the local device token of the first user equipment and the device-related information thereof, and generates an identification code. Specifically, after acquiring the device token of the first user equipment, in step S405, the first communication device 1 associates the device name, the phone number, or the device ID of the first user equipment with the local device token, and generates an identification code, such as a two-dimensional code, of the first user equipment; preferably, the second user equipment scans the two-dimensional code of the first user equipment to form contacts with each other, and obtains device information of each other, if the phone number in the information of the two-dimensional code matches the phone number, corresponding to the first user equipment, recorded in the address book of the second user equipment, the second user equipment obtains the contact name of the first user equipment through the contact name, corresponding to the phone number, recorded in the address book of the second user equipment, and associates the contact name of the first user equipment with the device token of the first user equipment, similarly, the first user equipment also associates the contact name of the second user equipment with the device token of the second user equipment to generate a local contact device token list, when the user sends the instant messaging message from the first user equipment to the second user equipment, only the contact name needs to be input in the recipient column, the first communication apparatus 1 may determine the device token of the second user device directly according to the contact name, and send the instant communication message to the second user device via the first network device, for example, a network push server, according to the device token. The local contact person device token list can be synchronized before logging in or logging out for the first time, further, when the user device token is changed, the association is released, and the association operation is performed after the device token is acquired again. Here, the device-related information includes, but is not limited to: 1) a device ID, which may be a device unique identifier; 2) device name, a name defined by the user for the user device; 3) the telephone number corresponding to the equipment, and the telephone number commonly used by the equipment.
It should be understood by those skilled in the art that the above-mentioned device-related information is only an example, and other existing or future device-related information, such as may be applicable to the present invention, is also included within the scope of the present invention and is hereby incorporated by reference.
Preferably, the method further comprises step S406. In step S406, when the device token of the second user equipment is changed, the first communication device 1 obtains the device token of the second user equipment from the second network equipment again. Specifically, for example, when the second user equipment reinstalls the system or the user changes the mobile phone, the device token of the second user equipment is invalid, the failure of the user device token may cause failure in sending the instant communication message to the second user equipment, the second user equipment obtains the device token corresponding to the second user equipment again and uploads the device token to the second network equipment, and in step S406, the first communication device 1 obtains the device token of the second user equipment again from the second network equipment.
Preferably, this further comprises step S407 and step S408. In step S407, the first communication device 1 submits feedback information to the second network device, where the feedback information includes a local device token corresponding to the first user equipment; in step S408, when the first communication apparatus 1 obtains the feedback response, if the first user equipment is connected to the second network device, the feedback response is obtained from the second network device, and if the first user equipment is not connected to the second network device, the feedback response is obtained from the first network device.
In step S407, the first communication device 1 submits feedback information to the second network device, where the feedback information includes a local device token corresponding to the first user device. Specifically, for example, after the first user equipment acquires the local equipment token, when the user submits the user opinion feedback information from the first user equipment to the second network equipment through the first communication device 1 in step S407, the user token is added to the user opinion feedback information to form feedback information, and the user transmits the feedback information to the second network equipment. For example, when the first network device is, for example, a network push server APNS, and the second network device is, for example, a developer server, in the IOS system, the first user device registers with the network push server APNS, after the registration is successful, the APNS returns the device token of the first user device to the first user device, and the user transmits feedback information to the developer server from the first user device through the first communication device 1 in step S407, where the feedback information includes, but is not limited to, user opinion feedback and the device token of the first user device, and after receiving the feedback information, the product manager or the tester transmits a corresponding feedback response to the first user device.
When the feedback response is obtained, if the first user equipment is connected to the second network device, in step S408, the first communication device 1 obtains the feedback response from the second network device, and if the first user equipment is not connected to the second network device, in step S408, the first communication device 1 obtains the feedback response from the first network device. Specifically, a user submits feedback information to the second network device from a first user device through step S407, where the feedback information includes, but is not limited to, user opinion feedback information and a device token of the first user device, and after receiving the feedback information, a product manager or a tester needs to determine whether the first user device is connected to the second network device, and if the first user device is connected to the second network device, in step S408, the first communication device 1 obtains a feedback response from the second network device; if the first user equipment is not connected to the second network equipment, in step S408, the first communication device 1 obtains a feedback response from the first network equipment. For example, in the IOS system, after a first user equipment registers with a first network device, for example, a network push server APNS, and the registration is successful, the APNS returns a device token of the first user equipment to the first user equipment, when a user transmits feedback information from the first user equipment to a second network device, for example, a developer server, through a first communication device 1 in step S407, the developer server transmits the feedback information, wherein the feedback information includes but is not limited to user opinion feedback and the device token of the first user equipment, and after a product manager or a tester receives the feedback information, a corresponding feedback response is sent to the first user equipment, in step S408, the first communication device 1 determines whether the first user equipment is connected with the developer server, and if the first user equipment is connected with the developer server, it indicates that the user stays in the current application, the developer server sends feedback response content to the user through the current application program; and if the first user equipment is not connected with the developer server, the application program is operated in the background, the user does not use the application program, and the network push server pushes the feedback response content to the user.
Fig. 5 illustrates a flow diagram of a method for facilitating instant messaging in a first network device in accordance with another aspect of the disclosure.
In step S501, the second communication apparatus 2 receives an instant communication message sent from the first user equipment, where the instant communication message includes a device token corresponding to the second user equipment. Specifically, when a user sends an instant messaging message from a first user equipment to a second user equipment, a first communication device 1 in the first user equipment determines a device token corresponding to the second user equipment from a device token list by means of, for example, matching search, accurate search, or calling a historical communication record; adding the device token into a message to be sent to a second user device to form the instant communication message in a mode of packaging, packaging or forming a character string conforming to a specific structure; then, the instant messaging message is sent to the first network device, in step S501, the second communication apparatus 2 receives, through interaction with the first communication apparatus 1, an instant messaging message sent to the first network device by the first user device, for example, through one or more calls of an Application Program Interface (API) provided by the first user device where the first communication apparatus 1 is located, or through another agreed communication method, where the instant messaging message includes a device token corresponding to the second user device.
In step S502, the second communication apparatus 2 identifies the second user equipment to which the instant communication message is intended according to the device token. Specifically, in step S502, the second communication device 2 analyzes the instant communication message received from the first user equipment in step S501, analyzes a device token of the second user equipment to which the instant communication message is intended according to a certain rule or an identification method, and identifies the second user equipment to which the instant communication message is intended by addressing based on the device token. For example, the first network device is, for example, a network push server APNS, and after receiving the instant messaging message sent by the first user device, the APNS analyzes the instant messaging message, for example, extracts a device token from a specific field of the instant messaging message, and identifies, according to the device token, a second user device corresponding to the device token, and the network push server APNS establishes a connection with the second user device, so as to ensure that the instant messaging message is accurately pushed to the second user device.
In step S503, the second communication apparatus 2 sends the instant communication message to the second user equipment. Specifically, in step S501, after the second communication device 2 receives the instant communication message including the device token corresponding to the second user equipment and sent from the first user equipment, in step S502, the second communication device 2 analyzes the device token of the second user equipment to which the instant communication message is intended, performs addressing based on the device token, and identifies the second user equipment to which the instant communication message is intended, and in step S503, the second communication device 2 sends the instant communication message to the second user equipment. For example, the first network device is, for example, a network push server APNS, if a user sends an instant message from a first user device to a second user device, in step S301, the first communication device 1 determines a device token of the second user device from a device token list corresponding to a contact of the first user device, which is obtained from a second network device, for example, a developer server, in step S302, the first communication device 1 adds the device token to a message to be sent to the second user device to form an instant communication message, in step S302, the first communication device 1 directly sends the instant communication message to the network push server APNS, in step S501, the second communication device 2 in the network push server APNS receives the instant communication message including the device token of the second user device sent by the first user device, in step S502, the second communication apparatus 2 identifies the second user device receiving the instant communication message according to the device token in the specific field of the instant communication message, and in step S503, the second communication apparatus 2 directly pushes the instant communication message to the second user device through the network push server APNS, so as to complete the transmission of the instant communication message from the first user device to the second user device through the network push server.
Preferably, the second communication device 2 includes step S504 (not shown) and step S505 (not shown). In step S504, the second communication device 2 obtains a feedback response to be pushed to the first user equipment, where the feedback response is generated based on feedback information submitted by the first user equipment; in step S505, if the first user equipment is not connected to a second network device, the second communication device 2 pushes the feedback response to the first user equipment according to a local device token corresponding to the first user equipment, where the second network device is an application server.
In step S504, the second communication device 2 obtains a feedback response to be pushed to the first user equipment, where the feedback response is generated based on the feedback information submitted by the first user equipment. Specifically, the first user equipment registers with a first network device, for example, a network push server, after the registration is successful, the network push server returns a device token of the first user equipment to the first user equipment, when a user submits user opinion feedback information from the first user equipment to the second network device through the network, the device token of the user is added to the user opinion feedback information to form feedback information, the user transmits the feedback information to the second network device, after receiving the feedback information, a product manager or a tester gives a feedback response to the feedback information, if the first user equipment is connected with the second network device, it indicates that the first user equipment is executing a current application program, and the feedback response is sent to the first user equipment through the second network device, then in step S504 the second communication device 2 does not obtain the feedback response; if the first user equipment is not connected to the second network equipment, which indicates that the first user equipment is not executing the current application program, in step S504, the second communication device 2 obtains a feedback response to the feedback message to be pushed to the first user equipment.
If the first user equipment is not connected to the second network equipment, in step S505, the second communication device 2 pushes the feedback response to the first user equipment according to the local device token corresponding to the first user equipment, where the second network equipment is an application server. Specifically, for example, the first network device is a network push server, the second network device is a developer server, if the first user device is not connected to the developer server and the first user device is not executing the current application program, in step S504, the second communication device 2 obtains the feedback response to be pushed to the first user device, and in step S505, the second communication device 2 directly pushes the feedback response to the first user device through the network push server according to the local device token corresponding to the first user device.
Here, the first network device is a push platform, and the instant messaging message is directly pushed to the second user device via the push platform, so that the instant messaging message is accurately and timely sent to the second user device.
The process of the first communication device 1 and the second communication device 2 cooperatively realizing the instant messaging will be described below with a specific embodiment.
For example, as shown in fig. 3, the first network device is a network push server, and the second network device is a developer server. The method comprises the steps that a first user device registers in a network push server, after the registration is successful, the push server returns a device token of the first user device to the first user device, when a user logs in the first user device for the first time, the first user device uploads the local device token to a developer server and adds the local device token to a device token list stored in the developer server, and the first user device obtains a device token list corresponding to a local contact from the developer server, wherein the device token list is a list corresponding to the local contact telephone number or the contact name and the device token one to one. When a user sends an instant communication message from a first user equipment to a second user equipment, for example, the user inputs a phone number or a contact name of a contact corresponding to the second user equipment in a recipient column, a first communication device 1 on the first user equipment searches and determines an equipment token of the second user equipment in an equipment token list according to the phone number or the contact name of the contact in step S401, the first communication device 1 adds the equipment token to a message to be sent to form an instant communication message in step S402, the first communication device 1 sends the instant communication message to a network push server in step S403, the second communication device 2 receives the instant communication message sent from the first user equipment to the network push server in step S501, and after the second communication device 2 identifies the equipment token of the second user equipment in step S502, in step S503, the second communication device 2 pushes the instant communication message from the network push server to the second user equipment. In the process, the instant messaging message is pushed from the first user equipment to the second user equipment through the network push server without passing through the developer server, so that the transmission path of the instant messaging message is shortened, the transmission time of the message is shortened, the load of the developer server is reduced, and the operation cost is reduced.
When the user transmits the instant communication message from the first user equipment to the second user equipment, the instant communication message is firstly sent to the first network equipment from the first user equipment and then sent to the second user equipment through the first network equipment, and the second network equipment is not needed in the middle, so that the transmission path of the instant communication message is shortened, the transmission time of the message is shortened, the load of a network server is reduced, and the operation cost is reduced.
It is noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, the various means of the invention may be implemented using Application Specific Integrated Circuits (ASICs) or any other similar hardware devices. In one embodiment, the software program of the present invention may be executed by a processor to implement the steps or functions described above. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (14)

1. A method for enabling instant messaging in a first user equipment, wherein the method comprises the steps of:
determining second user equipment to which the instant communication message is to be sent and a corresponding equipment token thereof;
adding the device token into a message to be sent to the second user equipment to form the instant messaging message, wherein the device token is used for indicating destination address information of the instant messaging message;
sending the instant communication message to first network equipment, so that the first network equipment sends the instant communication message to the second user equipment according to the equipment token;
wherein, the method also comprises:
submitting feedback information to second network equipment, wherein the feedback information comprises a local equipment token corresponding to the first user equipment;
and when the feedback response is acquired, acquiring the feedback response from the second network equipment if the first user equipment is connected with the second network equipment, and acquiring the feedback response from the first network equipment if the first user equipment is not connected with the second network equipment.
2. The method of claim 1, wherein the method comprises:
and uploading the local device token of the first user equipment to second network equipment during first login, and acquiring a device token list corresponding to the contact.
3. The method of claim 2, wherein determining a device token corresponding to a second user device to which the instant communication message is to be sent comprises:
and determining the device token corresponding to the second user equipment from the device token list corresponding to the contact.
4. A method according to any one of claims 1 to 3, wherein the method comprises:
and associating the local device token of the first user device and the device related information thereof to generate an identification code.
5. The method of claim 4, wherein the device-related information comprises at least any one of:
a device ID;
a device name;
the telephone number corresponding to the device.
6. The method of claim 2 or 3, wherein the method further comprises:
and when the device token of the second user equipment is changed, the device token of the second user equipment is obtained again from the second network equipment.
7. A method for facilitating instant messaging in a first network device, wherein the method comprises the steps of:
receiving an instant messaging message sent by first user equipment, wherein the instant messaging message comprises a device token corresponding to second user equipment, and the device token is used for indicating destination address information of the instant messaging message;
identifying the second user equipment to which the instant communication message is to be sent according to the equipment token;
sending the instant communication message to the second user equipment;
wherein, the method comprises the following steps:
obtaining a feedback response to be pushed to the first user equipment, wherein the feedback response is generated based on feedback information submitted by the first user equipment;
and if the first user equipment is not connected with second network equipment, pushing the feedback response to the first user equipment according to a local equipment token corresponding to the first user equipment, wherein the second network equipment is an application server.
8. A first communication device for enabling instant messaging in a first user equipment, wherein the first communication device comprises:
means for determining a second user device to which the instant communication message is to be sent and a device token corresponding thereto;
means for adding the device token to a message intended for the second user equipment to compose the instant messaging message, the device token indicating destination address information of the instant messaging message;
means for sending the instant communication message to a first network device for the first network device to send the instant communication message to the second user device according to the device token;
wherein the first communication device further comprises:
means for submitting feedback information to a second network device, wherein the feedback information includes a local device token corresponding to the first user device;
and a device configured to, when obtaining the feedback response, obtain the feedback response from the second network device if the first user equipment is connected to the second network device, and obtain the feedback response from the first network device if the first user equipment is not connected to the second network device.
9. The first communication device of claim 8, wherein the first communication device comprises:
and the device is used for uploading the local device token of the first user equipment to second network equipment when logging in for the first time and acquiring a device token list corresponding to the contact.
10. The first communications apparatus of claim 9, wherein the means for determining a device token for the second user device to which the instant communication message is to be sent is configured to:
and determining the device token corresponding to the second user equipment from the device token list corresponding to the contact.
11. The first communication device of any of claims 8 to 10, wherein the first communication device comprises:
means for associating a local device token of the first user device with device-related information thereof to generate an identification code.
12. The first communications apparatus of claim 11, wherein the device-related information includes at least any one of:
a device ID;
a device name;
the telephone number corresponding to the device.
13. The first communication device of claim 9 or 10, wherein the first communication device further comprises:
and when the device token of the second user equipment is changed, the device token of the second user equipment is obtained again from the second network equipment.
14. A second communication apparatus for facilitating instant messaging in a first network device, wherein the second communication apparatus comprises:
the apparatus comprises means for receiving an instant messaging message sent from a first user equipment, wherein the instant messaging message comprises a device token corresponding to a second user equipment, and the device token is used for indicating destination address information of the instant messaging message;
means for identifying the second user equipment to which the instant communication message is intended based on the device token;
means for sending the instant communication message to the second user equipment;
wherein the second communication device comprises:
means for obtaining a feedback response to be pushed to the first user equipment, wherein the feedback response is generated based on feedback information submitted by the first user equipment;
and if the first user equipment is not connected with second network equipment, pushing the feedback response to the first user equipment according to a local equipment token corresponding to the first user equipment, wherein the second network equipment is an application server.
CN201610146755.1A 2016-03-15 2016-03-15 Instant messaging method and device Active CN107196843B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610146755.1A CN107196843B (en) 2016-03-15 2016-03-15 Instant messaging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610146755.1A CN107196843B (en) 2016-03-15 2016-03-15 Instant messaging method and device

Publications (2)

Publication Number Publication Date
CN107196843A CN107196843A (en) 2017-09-22
CN107196843B true CN107196843B (en) 2021-05-18

Family

ID=59870707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610146755.1A Active CN107196843B (en) 2016-03-15 2016-03-15 Instant messaging method and device

Country Status (1)

Country Link
CN (1) CN107196843B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112688857A (en) * 2020-12-08 2021-04-20 北京北信源软件股份有限公司 Method for calling instant messaging function and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881916A (en) * 2005-06-17 2006-12-20 腾讯科技(深圳)有限公司 Method and apparatus for realizing communication between communication equipments
CN101951597A (en) * 2010-08-13 2011-01-19 北京邮电大学 Method, device and system for communicating among different types of networks
CN102868970A (en) * 2012-09-21 2013-01-09 上海永畅信息科技有限公司 System and method for actively identifying and communicating with vehicles
CN103856520A (en) * 2012-12-03 2014-06-11 华为终端有限公司 Communication processing method, server and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8630624B2 (en) * 2009-02-25 2014-01-14 Apple Inc. Managing notification messages
CN103761327A (en) * 2014-01-29 2014-04-30 百度在线网络技术(北京)有限公司 Resource sharing method and system, terminal and server
CN103974210A (en) * 2014-04-08 2014-08-06 曹茗 Call forwarding notification push processing method and service terminal
CN104935674A (en) * 2015-07-08 2015-09-23 成都梦工厂网络信息有限公司 Cloud push system
CN105303441A (en) * 2015-10-28 2016-02-03 联动优势科技有限公司 Method and device for preventing application fraud through adoption of SIM card number and mobile phone identification codes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881916A (en) * 2005-06-17 2006-12-20 腾讯科技(深圳)有限公司 Method and apparatus for realizing communication between communication equipments
CN101951597A (en) * 2010-08-13 2011-01-19 北京邮电大学 Method, device and system for communicating among different types of networks
CN102868970A (en) * 2012-09-21 2013-01-09 上海永畅信息科技有限公司 System and method for actively identifying and communicating with vehicles
CN103856520A (en) * 2012-12-03 2014-06-11 华为终端有限公司 Communication processing method, server and terminal

Also Published As

Publication number Publication date
CN107196843A (en) 2017-09-22

Similar Documents

Publication Publication Date Title
US10469415B2 (en) Apparatus for providing document sharing service based on messaging service, and method using the apparatus
US10613717B2 (en) Reproducing state of source environment when image was screen captured on a different computing device using resource location, resource navigation and positional metadata embedded in image
EP3105893A1 (en) Syncrhonizing an unread message in instant communication
US10574782B2 (en) Method and server for generating contact relationship data in network communication system
WO2019205718A1 (en) Method and device for sharing hosted applications
US8689243B2 (en) Web service API for unified contact store
JP2017072976A (en) Information processing system, information processing method, and program
US11281761B2 (en) Method and system for using a plurality of accounts in an instant messaging application
EP2974159B1 (en) Method, device and system for voice communication
CN103957306A (en) Method and device for sharing information between communication terminals
EP3343890A1 (en) Method for processing data associated with a caller party, and equipment for implementing the method
EP3432559B1 (en) System and method for contextually based fulfillment of communicated service requests via a telephony platform
US20210112025A1 (en) Method and server for processing messages
CN107196843B (en) Instant messaging method and device
CN112838980A (en) Message processing method, system, device, electronic equipment and storage medium
CN109818851A (en) A kind of information persistence method, device and electronic equipment
CN109698774A (en) Method and device for monitoring device working condition
CN106899487B (en) Communication processing method, device, server and equipment
US20150281918A1 (en) Mobile community driven help for software applications
CN111385375A (en) Method and equipment for generating email address
CN105704686A (en) Instant communication method, apparatus, and system based on short messages
CN107181772B (en) Method and device for updating client state on line in real time
JP2015001777A (en) System and method for simultaneously debugging a plurality of mobile terminals
US10834527B1 (en) Location service based on device interaction data
US20230126482A1 (en) Managing links for tracking user interactions with content items

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant