Disclosure of Invention
In order to improve the success rate of pushing information, the invention provides a method and a device for pushing information. The technical scheme is as follows:
a method of pushing information, the method comprising:
acquiring an access request message sent by a terminal, and determining whether information needs to be pushed to the terminal according to an address of a server and an identifier of a user carried by the access request message;
if so, sending a response message to the terminal, wherein the response message carries an address of an information pushing system, so that the terminal sends a pushing request message according to the address of the information pushing system, and the pushing request message carries the identification of the user;
and receiving the push request message, acquiring information needing to be pushed to the terminal according to the push request message, and pushing the information to the terminal.
The determining whether information needs to be pushed to the terminal according to the address of the server and the identifier of the user carried by the access request message includes:
acquiring interest information of the user according to the address of the server or the identification of the user carried by the access request message;
and determining whether information needs to be pushed to the terminal according to the interest information of the user and the identification of the user.
The obtaining of the interest information of the user according to the address of the server or the identifier of the user carried by the access request message includes:
according to the address of the server carried by the access request message, obtaining the interest information of the user from the corresponding relation between the stored address of the server and the interest information; or,
and acquiring the interest information of the user from the stored corresponding relation between the user identification and the interest information according to the user identification carried by the access request message.
The determining whether information needs to be pushed to the terminal according to the interest information of the user and the identifier of the user includes:
according to the interest information of the user, obtaining an interest classification to which the interest information of the user belongs from the corresponding relation between the stored interest information and the interest classification;
according to the interest classification to which the interest information of the user belongs, acquiring a corresponding audience range from the corresponding relation between the stored interest classification and the audience range;
and judging whether the obtained audience range comprises a user corresponding to the user identification of the user, if so, judging that the information needs to be pushed to the terminal, and if not, judging that the information does not need to be pushed to the terminal.
The determining whether information needs to be pushed to the terminal according to the interest information of the user and the identifier of the user includes:
determining the audience range to which the user belongs according to the user information of the user, and acquiring the interest classification corresponding to the audience range to which the user belongs from the stored corresponding relation between the interest classification and the audience range according to the audience range to which the user belongs;
acquiring corresponding interest information from the corresponding relation between the stored interest information and the interest classification according to the interest classification corresponding to the audience range to which the user belongs;
and judging whether the acquired interest information comprises the interest information of the user, if so, judging that the information needs to be pushed to the terminal, and if not, judging that the information does not need to be pushed to the terminal.
The determining whether information needs to be pushed to the terminal according to the interest information of the user and the identifier of the user includes:
determining the audience range to which the user belongs according to the user information of the user, and acquiring the interest classification corresponding to the audience range to which the user belongs from the stored corresponding relation between the interest classification and the audience range according to the audience range to which the user belongs;
according to the interest information of the user, obtaining an interest classification to which the interest information of the user belongs from the corresponding relation between the stored interest information and the interest classification;
and comparing the interest classification corresponding to the audience range to which the user belongs with the interest classification to which the interest information of the user belongs, if the two interest classifications are the same, judging that the information needs to be pushed to the terminal, and if the two interest classifications are different, judging that the information does not need to be pushed to the terminal.
The acquiring information to be pushed to the terminal according to the push request message, and pushing the information to the terminal includes:
acquiring an identifier of information to be pushed to the terminal from a corresponding relation between the stored identifier of the user and the stored identifier of the information according to the identifier of the user carried by the push request message;
and acquiring information needing to be pushed to the terminal according to the identifier of the information, and pushing the information to the terminal.
Before acquiring the identifier of the information to be pushed to the terminal from the stored correspondence between the identifier of the user and the identifier of the information according to the identifier of the user carried in the push request message, the method further includes:
and acquiring an identifier of the information needing to be pushed to the terminal according to the interest classification of the interest information of the user and the audience range of the user, and storing the corresponding relation between the identifier of the user and the identifier of the information.
The acquiring information to be pushed to the terminal according to the push request message, and pushing the information to the terminal includes:
obtaining an interest classification to which the interest information of the user belongs and an audience range to which the user belongs according to the pushing request message;
according to the interest classification to which the interest information of the user belongs, acquiring a first information set from the corresponding relation between the stored interest classification and the information identifier, wherein the first information set comprises the information identifier corresponding to the interest classification to which the interest information of the user belongs;
acquiring a second information set from the stored corresponding relation between the audience range and the information identification according to the audience range to which the user belongs, wherein the second information set comprises the information identification corresponding to the audience range to which the user belongs;
obtaining a third information set by taking an intersection of the first information set and the second information set, and determining an identifier of information included in the third information set as an identifier of information needing to be pushed to the terminal;
and acquiring the information according to the identifier of the information, and pushing the acquired information to the terminal.
An apparatus to push information, the apparatus comprising:
the acquisition module is used for acquiring an access request message sent by a terminal and determining whether information needs to be pushed to the terminal according to an address of a server and an identifier of a user carried by the access request message;
a sending module, configured to send a response message to the terminal if needed, where the response message carries an address of an information push system, so that the terminal sends a push request message according to the address of the information push system, where the push request message carries an identifier of the user;
and the pushing module is used for receiving the pushing request message, acquiring information needing to be pushed to the terminal according to the pushing request message, and pushing the information to the terminal.
The acquisition module includes:
a first obtaining unit, configured to obtain an access request message sent by a terminal, and obtain interest information of a user according to an address of a server or an identifier of the user, where the address is carried by the access request message;
and the first determining unit is used for determining whether information needs to be pushed to the terminal according to the interest information of the user and the identification of the user.
The first acquisition unit includes:
the first obtaining subunit is configured to obtain an access request message sent by a terminal, and obtain, according to an address of a server carried by the access request message, interest information of the user from a correspondence between the stored address of the server and the interest information; or,
and the second obtaining subunit is configured to obtain, according to the identifier of the user carried in the access request message, the interest information of the user from the stored correspondence between the identifier of the user and the interest information.
The first determination unit includes:
a third obtaining subunit, configured to obtain, according to the interest information of the user, an interest category to which the interest information of the user belongs from a correspondence between stored interest information and the interest category;
a fourth obtaining subunit, configured to obtain, according to an interest classification to which the interest information of the user belongs, a corresponding audience range from a correspondence between a stored interest classification and an audience range;
the first judging unit is used for judging whether the obtained audience range comprises a user corresponding to the user identification of the user, if so, judging that the information needs to be pushed to the terminal, and if not, judging that the information does not need to be pushed to the terminal.
The first determination unit includes:
a fifth obtaining subunit, configured to determine, according to the user information of the user, an audience range to which the user belongs, and obtain, according to the audience range to which the user belongs, an interest classification corresponding to the audience range to which the user belongs from a correspondence between stored interest classifications and the audience range;
a sixth obtaining subunit, configured to obtain, according to an interest category corresponding to the audience range to which the user belongs, corresponding interest information from a correspondence between the stored interest information and the interest category;
and the second judging subunit is configured to judge whether the obtained interest information includes the interest information of the user, judge that information needs to be pushed to the terminal if the obtained interest information includes the interest information of the user, and judge that information does not need to be pushed to the terminal if the obtained interest information does not include the interest information of the user.
The first determination unit includes:
a seventh obtaining subunit, configured to determine, according to the user information of the user, an audience range to which the user belongs, and obtain, according to the audience range to which the user belongs, an interest classification corresponding to the audience range to which the user belongs from a correspondence between stored interest classifications and the audience range;
an eighth obtaining subunit, configured to obtain, according to the interest information of the user, an interest category to which the interest information of the user belongs from a correspondence between stored interest information and the interest category;
and the comparison unit is used for comparing the interest classification corresponding to the audience range to which the user belongs with the interest classification to which the interest information of the user belongs, judging that the information needs to be pushed to the terminal if the two interest classifications are the same, and judging that the information does not need to be pushed to the terminal if the two interest classifications are different.
The push module comprises:
a second obtaining unit, configured to obtain, according to the identifier of the user carried in the push request message, an identifier of information to be pushed to the terminal from a correspondence between a stored identifier of the user and an identifier of the information;
and the first pushing unit is used for acquiring the information needing to be pushed to the terminal according to the identifier of the information and pushing the information to the terminal.
The device further comprises:
and the storage module is used for acquiring the identifier of the information needing to be pushed to the terminal according to the interest classification to which the interest information of the user belongs and the audience range to which the user belongs, and storing the corresponding relation between the identifier of the user and the identifier of the information.
The push module comprises:
a third obtaining unit, configured to obtain, according to the push request message, an interest category to which the interest information of the user belongs and an audience range to which the user belongs;
a fourth obtaining unit, configured to obtain, according to an interest category to which the interest information of the user belongs, a first information set from a correspondence between a stored interest category and an identifier of information, where the first information set includes an identifier of information corresponding to the interest category to which the interest information of the user belongs;
a fifth obtaining unit, configured to obtain, according to an audience range to which the user belongs, a second information set from a correspondence between a stored audience range and an identifier of information, where the second information set includes an identifier of information corresponding to the audience range to which the user belongs;
a second determining unit, configured to obtain a third information set by taking an intersection between the first information set and the second information set, and determine an identifier of information included in the third information set as an identifier of information that needs to be pushed to the terminal;
and the second pushing unit is used for acquiring the information according to the identifier of the information and pushing the acquired information to the terminal.
In the embodiment of the invention, an access request message sent by a terminal is obtained, whether information needs to be pushed to the terminal is determined according to the address of a server and the identification of a user carried by the access request message, if so, a response message is sent to the terminal, the response message carries the address of an information pushing system, so that the terminal sends the pushing request message according to the address of the information pushing system, the pushing request message carries the identification of the user, the pushing request message is received, the information needing to be pushed to the terminal is obtained according to the pushing request message, and the information is pushed to the terminal. After the access request message of the terminal is acquired, only whether the information needs to be pushed to the terminal is judged, if yes, a response message is sent to the terminal, the time for response waiting of the terminal is shortened, and therefore the success rate of pushing the information is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides a method for pushing information, including:
step 101: acquiring an access request message sent by a terminal, and determining whether information needs to be pushed to the terminal according to an address of a server and an identifier of a user carried by the access request message;
step 102: if so, sending a response message to the terminal, wherein the response message carries the address of the information push system, so that the terminal sends a push request message according to the address of the information push system, and the push request message carries the identification of the user;
step 103: and receiving the push request message, acquiring information needing to be pushed to the terminal according to the push request message, and pushing the information to the terminal.
In the embodiment of the invention, an access request message sent by a terminal is obtained, whether information needs to be pushed to the terminal is determined according to the address of a server and the identification of a user carried by the access request message, if so, a response message is sent to the terminal, the response message carries the address of an information pushing system, so that the terminal sends the pushing request message according to the address of the information pushing system, the pushing request message carries the identification of the user, the pushing request message is received, the information needing to be pushed to the terminal is obtained according to the pushing request message, and the information is pushed to the terminal. After the access request message is acquired, the prior art judges whether the information needs to be pushed or not and acquires the information needing to be pushed or not according to the access request message, and the operation of acquiring the information needing to be pushed is an operation with a large calculation amount and needs to take a long time.
Referring to fig. 2, an embodiment of the present invention provides a method for pushing information, including:
step 201: the information push system acquires an access request message sent by a terminal, wherein the access request message carries an address of a server and an identification of a user;
the terminal sends an access request message to a destination server, the access request message is used for accessing the destination server, and the address of the server carried by the access request message at least comprises the address of the destination server.
If the user accesses the third-party server first and obtains the address of the destination server from the third-party server, and then the user sends an access request message to the destination server through the terminal, the address of the server carried by the access request message may include the address of the destination server and the address of the third-party server.
Referring to fig. 3, the information push system includes a data detection unit, a data analysis unit, and an information push unit, where when the data detection unit detects an access request message sent by a terminal to a destination server, the data detection unit mirrors the access request message to obtain the access request message.
Among them, it should be noted that: the data detection unit simply mirrors the detected access request message, and the access request message is still sent to the destination server, so in order to ensure that the information can be successfully pushed to the terminal, the data detection unit needs to quickly forge the destination server to send a response message to the terminal.
The address of the server may be a URL (Uniform resource locator) or an IP (internet protocol ) address of the server; the access request message may be an http (hypertext transfer protocol) request message or a WAP (wireless application protocol) request message.
For example, the information push system acquires an access request message sent by a terminal, where the access request message carries a URL1 as an address of a server and a user identification UserID1 of a user.
Step 202: the information pushing system acquires the interest information of the user according to the address of the server or the identification of the user carried by the access request message;
specifically, the data detection unit included in the information push system acquires the interest information of the user from the corresponding relationship between the stored address of the server and the interest information according to the address of the server carried by the access request message; or, according to the user identifier carried in the access request message, obtaining the interest information of the user from the stored corresponding relationship between the user identifier and the interest information.
The interest information of each user is analyzed in advance according to the log of the user access server, and the user identification of each user and the interest information of each user are stored in the corresponding relation between the identification of the user and the interest information.
For example, the information push system stores in advance the correspondence between the address of the server and the interest information as shown in table 1. The information pushing system obtains the interest information of the user as the automobile news from the corresponding relation between the address of the server and the interest information shown in table 1 according to the address URL1 of the server carried by the access request message.
TABLE 1
Address of server |
Interest information |
URL1 |
Automobile news |
URL2 |
Times news |
…… |
…… |
Step 203: the information pushing system judges whether information needs to be pushed to the terminal according to the identification and the interest information of the user, and if so, step 204 is executed;
specifically, the step may be specifically implemented as follows: the information pushing system comprises a data detection unit, a data pushing unit and a judging unit, wherein the data detection unit obtains interest classification to which the interest information of a user belongs from the corresponding relation between the stored interest information and the interest classification according to the interest information of the user, obtains audience range corresponding to the interest classification to which the interest information of the user belongs from the corresponding relation between the stored interest classification and the audience range according to the interest classification to which the interest information of the user belongs, judges whether the audience range corresponding to the interest classification to which the interest information of the user belongs comprises a user corresponding to a user identification of the user or not, judges that the information needs to be pushed to the terminal if the audience range corresponding to the interest classification to which the interest information of the user belongs comprises the user corresponding to the user identification of the user.
The audience range includes region information and/or group information, and accordingly, the operation of determining whether the audience range corresponding to the interest classification to which the interest information of the user belongs includes the user corresponding to the user identifier of the user may be: the information pushing system determines the region information or the group information of the user according to the identification of the user, if the audience range corresponding to the interest classification to which the interest information of the user belongs includes the region information or the group information of the user, it is determined whether the audience range corresponding to the interest classification to which the interest information of the user belongs includes the user corresponding to the user identification of the user, and if the audience range corresponding to the interest classification to which the interest information of the user belongs does not include the region information or the group information of the user, it is determined whether the audience range corresponding to the interest classification to which the interest information of the user belongs does not include the user corresponding to the user identification of the user. The user identifiers of the users of different region information or group information include different prefixes, and each region information or group information corresponds to one prefix, so that the region information or group information where the user is located can be directly determined according to the user identifier.
For example, the information push system stores in advance the correspondence between the interest information and the interest category as shown in table 2, and stores the correspondence between the interest category and the audience range as shown in table 3.
TABLE 2
Interest information |
Interest classification |
Automobile news |
News |
Times news |
News |
…… |
…… |
TABLE 3
Interest classification |
Audience scope |
News |
Audience range 1 |
…… |
…… |
According to the fact that the interest information of the user is automobile news, the interest classification to which the interest information of the user belongs is obtained from the corresponding relation between the interest information and the interest classification shown in the table 2, the interest classification to which the interest information of the user belongs is news, the audience range 1 to which the user belongs is obtained from the corresponding relation between the interest classification and the audience range shown in the table 3, and the fact that the corresponding user is located in the obtained audience range 1 is judged according to the user identification UserID1 of the user, so that information needs to be pushed to a terminal.
Or,
the step can be realized by: the information pushing system comprises a data detection unit, a storage unit, a judgment unit and a pushing unit, wherein the data detection unit determines the audience range to which a user belongs according to the user information of the user, acquires the interest classification corresponding to the audience range to which the user belongs from the corresponding relation between the stored interest classification and the audience range according to the audience range to which the user belongs, acquires the corresponding interest information from the corresponding relation between the stored interest information and the interest classification according to the interest classification corresponding to the audience range to which the user belongs, judges whether the acquired interest information comprises the interest information of the user, judges that the information needs to be pushed to the terminal if the acquired interest information comprises the interest information of the user, and judges that the information does not need to be pushed to the terminal if the acquired interest information does not comprise the.
Or,
the step can be realized by: the information pushing system comprises a data detection unit, a storage unit, a comparison unit and a terminal, wherein the data detection unit determines an audience range to which a user belongs according to a user identifier of the user, acquires an interest classification corresponding to the audience range to which the user belongs from a corresponding relation between the stored interest classification and the audience range according to the audience range to which the user belongs, acquires an interest classification to which the interest information of the user belongs from a corresponding relation between the stored interest information and the interest classification according to the interest information of the user, compares the interest classification corresponding to the audience range to which the user belongs with the interest classification to which the interest information of the user belongs, judges that information needs to be pushed to the terminal if the interest classification and the interest classification are the same, and judges that the information does not need to be pushed to the terminal if the interest classification and the interest.
Step 204: the information push system sends a response message to the terminal, wherein the response message at least carries the address of the information push system;
the data detection unit included in the information push system sends a response message to the terminal, and the response message at least carries the address of the data push unit included in the information push system.
The information push system forges the destination server to send a response message to the terminal, and the response message can carry the address of the destination server, the interest information of the user and the like.
In the embodiment of the present invention, after acquiring an access request message sent by a terminal, an information push system determines whether information needs to be pushed to the terminal, and if it is determined that information needs to be pushed, a response message is sent to the terminal, whereas in the prior art, it is determined whether information needs to be pushed to the terminal, and if it is determined that information needs to be pushed to the terminal, information needs to be pushed to the terminal is obtained.
If the terminal receives the response message sent by the destination server after receiving the response message sent by the information push system, the terminal discards the response message sent by the destination server, thereby ensuring the success of information push.
After receiving a response message sent by the information push system, the terminal sends a push request message to the information push system of the information push system according to the address of the information push system carried by the response message, wherein the push request message carries the identification of the user.
Further, if the response message also carries interest information of the user, etc., the push request message may also carry interest information of the user, etc.
The address of the information push system is the address of a data push unit included in the information push system; correspondingly, after receiving a response message sent by the information push system, the terminal sends a push request message to the data push unit of the information push system according to the address of the data push unit included in the information push system carried by the response message, wherein the push request message carries the identification of the user.
For example, the information push system sends a response message to the terminal, where the response message at least carries an address IP of the information push system; the terminal receives the response message and sends a push request message to the information push system, wherein the push request message carries the identification UserID1 of the user.
Step 205: the information pushing system acquires the identifier of the information needing to be pushed to the terminal according to the identifier of the user and the interest information;
the data detection unit of the information pushing system sends the identification and the interest information of the user to the data analysis unit of the information pushing system, the data analysis unit of the information pushing system obtains the audience range to which the user belongs according to the identification of the user, obtains the interest classification to which the interest information of the user belongs according to the interest information of the user, obtains a first information set from the corresponding relation between the stored interest classification and the identification of the information according to the interest classification to which the interest information of the user belongs, the first information set comprises the identification of the information corresponding to the interest classification to which the interest information of the user belongs, and obtains a second information set from the corresponding relation between the stored audience range and the identification of the information according to the audience range to which the user belongs, and the second information set comprises the identification of the information corresponding to the audience range to which the user belongs, and acquiring an intersection of the first information set and the second information set to obtain a third information set, and determining the identifier of the information included in the third information set as the identifier of the information needing to be pushed to the terminal.
Step 206: the information pushing system stores the corresponding relation between the identification of the user and the identification of the information needing to be pushed to the terminal;
the data analysis unit of the information pushing system stores the identification of the user and the identification of the information needing to be pushed to the terminal in the corresponding relation between the identification of the user and the identification of the information.
For example, the information push system acquires the identifier MessageID1 of the information to be pushed to the terminal according to the identifier UserID1 of the user and the interest information of the user as the news of the automobile, and stores the identifier UeserID1 of the user and the identifier MessageID1 of the information in the correspondence between the identifier of the user and the identifier of the information as shown in table 4.
TABLE 4
Identification of a user |
Identification of information |
User ID1 |
Message ID1 |
…… |
…… |
Step 207: an information push system receiving terminal sends a push request message, wherein the push request message carries an identification of a user;
the information pushing system comprises a data pushing unit and a receiving terminal, wherein the data pushing unit and the receiving terminal send a pushing request message, and the pushing request message carries an identification of a user.
Step 208: and the information pushing system acquires the information to be pushed to the terminal according to the pushing request message and the corresponding relation between the user identification and the information identification, and pushes the acquired information to the terminal.
The information pushing system comprises a data pushing unit, a data sending unit and a terminal, wherein the data pushing unit acquires an identifier of information needing to be pushed to the terminal from a corresponding relation between the identifier of the user and the identifier of the information according to the identifier of the user carried by the pushing request message, acquires the information needing to be pushed to the terminal according to the identifier of the information needing to be pushed to the terminal, and pushes the acquired information to the terminal.
For example, the information push system receives a push request message sent by a terminal, where the push request message carries an identifier UserID1 of a user, obtains, according to an identifier UserID1 of the user, an identifier of information to be pushed to the terminal, which is MessageID1, from a correspondence between the identifier of the user and an identifier of the information shown in table 4, obtains corresponding information according to the identifier MessageID1 of the information, and pushes the information to the terminal.
In the embodiment of the present invention, the information push system may not perform the steps 205 and 206 before receiving the push request message, but after receiving the push request message, directly obtain an interest classification to which the interest information of the user belongs and an audience range to which the user belongs according to the push request message, obtain a first information set from a correspondence between the stored interest classification and an identifier of the information according to the interest classification to which the interest information of the user belongs, obtain a second information set from a correspondence between the stored audience range and the identifier of the information according to the audience range to which the user belongs, where the second information set includes an identifier of the information corresponding to the audience range to which the user belongs, and obtain a third information set by intersecting the first information set and the second information set, and determining the identifier of the information included in the third information set as the identifier of the information needing to be pushed to the terminal, acquiring the information according to the identifier of the information, and pushing the acquired information to the terminal.
In the embodiment of the invention, an access request message sent by a terminal is obtained, whether information needs to be pushed to the terminal is determined according to the address of a server and the identification of a user carried by the access request message, if so, a response message is sent to the terminal, the response message carries the address of an information pushing system, so that the terminal sends the pushing request message according to the address of the information pushing system, the pushing request message carries the identification of the user, the pushing request message is received, the information needing to be pushed to the terminal is obtained according to the pushing request message, and the information is pushed to the terminal. After the access request message of the terminal is acquired, if the fact that the information needs to be pushed to the terminal is judged, the response message is sent to the terminal, the response waiting time of the terminal is shortened, and therefore the success rate of pushing the information is improved.
Referring to fig. 4, an embodiment of the present invention provides an apparatus for pushing information, including:
an obtaining module 301, configured to obtain an access request message sent by a terminal, and determine whether information needs to be pushed to the terminal according to an address of a server and an identifier of a user, where the address and the identifier are carried in the access request message;
a sending module 302, configured to send a response message to the terminal if needed, where the response message carries an address of an information push system, so that the terminal sends a push request message according to the address of the information push system, where the push request message carries an identifier of the user;
the pushing module 303 is configured to receive the pushing request message, obtain information to be pushed to the terminal according to the pushing request message, and push the information to the terminal.
Wherein the obtaining module 301 comprises:
a first obtaining unit, configured to obtain an access request message sent by a terminal, and obtain interest information of a user according to an address of a server or an identifier of the user, where the address is carried by the access request message;
and the first determining unit is used for determining whether information needs to be pushed to the terminal according to the interest information of the user and the identification of the user.
Wherein the first acquisition unit includes:
the first obtaining subunit is configured to obtain an access request message sent by a terminal, and obtain, according to an address of a server carried by the access request message, interest information of the user from a correspondence between the stored address of the server and the interest information; or,
and the second obtaining subunit is configured to obtain, according to the identifier of the user carried in the access request message, the interest information of the user from the stored correspondence between the identifier of the user and the interest information.
Wherein the first determination unit includes:
a third obtaining subunit, configured to obtain, according to the interest information of the user, an interest category to which the interest information of the user belongs from a correspondence between stored interest information and the interest category;
a fourth obtaining subunit, configured to obtain, according to an interest classification to which the interest information of the user belongs, a corresponding audience range from a correspondence between a stored interest classification and an audience range;
the first judging unit is used for judging whether the obtained audience range comprises a user corresponding to the user identification of the user, if so, judging that the information needs to be pushed to the terminal, and if not, judging that the information does not need to be pushed to the terminal.
Wherein the first determination unit includes:
a fifth obtaining subunit, configured to determine, according to the user information of the user, an audience range to which the user belongs, and obtain, according to the audience range to which the user belongs, an interest classification corresponding to the audience range to which the user belongs from a correspondence between stored interest classifications and the audience range;
a sixth obtaining subunit, configured to obtain, according to an interest category corresponding to the audience range to which the user belongs, corresponding interest information from a correspondence between the stored interest information and the interest category;
and the second judging subunit is configured to judge whether the obtained interest information includes the interest information of the user, judge that information needs to be pushed to the terminal if the obtained interest information includes the interest information of the user, and judge that information does not need to be pushed to the terminal if the obtained interest information does not include the interest information of the user.
Wherein the first determination unit includes:
a seventh obtaining subunit, configured to determine, according to the user information of the user, an audience range to which the user belongs, and obtain, according to the audience range to which the user belongs, an interest classification corresponding to the audience range to which the user belongs from a correspondence between stored interest classifications and the audience range;
an eighth obtaining subunit, configured to obtain, according to the interest information of the user, an interest category to which the interest information of the user belongs from a correspondence between stored interest information and the interest category;
and the comparison unit is used for comparing the interest classification corresponding to the audience range to which the user belongs with the interest classification to which the interest information of the user belongs, judging that the information needs to be pushed to the terminal if the two interest classifications are the same, and judging that the information does not need to be pushed to the terminal if the two interest classifications are different.
Wherein the pushing module 303 comprises:
a second obtaining unit, configured to obtain, according to the identifier of the user carried in the push request message, an identifier of information to be pushed to the terminal from a correspondence between a stored identifier of the user and an identifier of the information;
and the first pushing unit is used for acquiring the information needing to be pushed to the terminal according to the identifier of the information and pushing the information to the terminal.
Further, the apparatus further comprises:
and the storage module is used for acquiring the identifier of the information needing to be pushed to the terminal according to the interest classification to which the interest information of the user belongs and the audience range to which the user belongs, and storing the corresponding relation between the identifier of the user and the identifier of the information.
Wherein the pushing module 303 comprises:
a third obtaining unit, configured to obtain, according to the push request message, an interest category to which the interest information of the user belongs and an audience range to which the user belongs;
a fourth obtaining unit, configured to obtain, according to an interest category to which the interest information of the user belongs, a first information set from a correspondence between a stored interest category and an identifier of information, where the first information set includes an identifier of information corresponding to the interest category to which the interest information of the user belongs;
a fifth obtaining unit, configured to obtain, according to an audience range to which the user belongs, a second information set from a correspondence between a stored audience range and an identifier of information, where the second information set includes an identifier of information corresponding to the audience range to which the user belongs;
a second determining unit, configured to obtain a third information set by taking an intersection between the first information set and the second information set, and determine an identifier of information included in the third information set as an identifier of information that needs to be pushed to the terminal;
and the second pushing unit is used for acquiring the information according to the identifier of the information and pushing the acquired information to the terminal.
In the embodiment of the invention, an access request message sent by a terminal is obtained, whether information needs to be pushed to the terminal is determined according to the address of a server and the identification of a user carried by the access request message, if so, a response message is sent to the terminal, the response message carries the address of an information pushing system, so that the terminal sends the pushing request message according to the address of the information pushing system, the pushing request message carries the identification of the user, the pushing request message is received, the information needing to be pushed to the terminal is obtained according to the pushing request message, and the information is pushed to the terminal. After the access request message of the terminal is acquired, if the fact that the information needs to be pushed to the terminal is judged, the response message is sent to the terminal, the response waiting time of the terminal is shortened, and therefore the success rate of pushing the information is improved.
Referring to fig. 5, an embodiment of the present invention provides an apparatus for pushing information, including:
a memory 401 and a processor 402 for performing a method of pushing information as follows;
acquiring an access request message sent by a terminal, and determining whether information needs to be pushed to the terminal according to an address of a server and an identifier of a user carried by the access request message;
if so, sending a response message to the terminal, wherein the response message carries an address of an information pushing system, so that the terminal sends a pushing request message according to the address of the information pushing system, and the pushing request message carries the identification of the user;
and receiving the push request message, acquiring information needing to be pushed to the terminal according to the push request message, and pushing the information to the terminal.
The determining whether information needs to be pushed to the terminal according to the address of the server and the identifier of the user carried by the access request message includes:
acquiring interest information of the user according to the address of the server or the identification of the user carried by the access request message;
and determining whether information needs to be pushed to the terminal according to the interest information of the user and the identification of the user.
The obtaining of the interest information of the user according to the address of the server or the identifier of the user carried by the access request message includes:
according to the address of the server carried by the access request message, obtaining the interest information of the user from the corresponding relation between the stored address of the server and the interest information; or,
and acquiring the interest information of the user from the stored corresponding relation between the user identification and the interest information according to the user identification carried by the access request message.
The determining whether information needs to be pushed to the terminal according to the interest information of the user and the identifier of the user includes:
according to the interest information of the user, obtaining an interest classification to which the interest information of the user belongs from the corresponding relation between the stored interest information and the interest classification;
according to the interest classification to which the interest information of the user belongs, acquiring a corresponding audience range from the corresponding relation between the stored interest classification and the audience range;
and judging whether the obtained audience range comprises a user corresponding to the user identification of the user, if so, judging that the information needs to be pushed to the terminal, and if not, judging that the information does not need to be pushed to the terminal.
The determining whether information needs to be pushed to the terminal according to the interest information of the user and the identifier of the user includes:
determining the audience range to which the user belongs according to the user information of the user, and acquiring the interest classification corresponding to the audience range to which the user belongs from the stored corresponding relation between the interest classification and the audience range according to the audience range to which the user belongs;
acquiring corresponding interest information from the corresponding relation between the stored interest information and the interest classification according to the interest classification corresponding to the audience range to which the user belongs;
and judging whether the acquired interest information comprises the interest information of the user, if so, judging that the information needs to be pushed to the terminal, and if not, judging that the information does not need to be pushed to the terminal.
The determining whether information needs to be pushed to the terminal according to the interest information of the user and the identifier of the user includes:
determining the audience range to which the user belongs according to the user information of the user, and acquiring the interest classification corresponding to the audience range to which the user belongs from the stored corresponding relation between the interest classification and the audience range according to the audience range to which the user belongs;
according to the interest information of the user, obtaining an interest classification to which the interest information of the user belongs from the corresponding relation between the stored interest information and the interest classification;
and comparing the interest classification corresponding to the audience range to which the user belongs with the interest classification to which the interest information of the user belongs, if the two interest classifications are the same, judging that the information needs to be pushed to the terminal, and if the two interest classifications are different, judging that the information does not need to be pushed to the terminal.
The acquiring information to be pushed to the terminal according to the push request message, and pushing the information to the terminal includes:
acquiring an identifier of information to be pushed to the terminal from a corresponding relation between the stored identifier of the user and the stored identifier of the information according to the identifier of the user carried by the push request message;
and acquiring information needing to be pushed to the terminal according to the identifier of the information, and pushing the information to the terminal.
Before acquiring the identifier of the information to be pushed to the terminal from the stored correspondence between the identifier of the user and the identifier of the information according to the identifier of the user carried in the push request message, the method further includes:
and acquiring an identifier of the information needing to be pushed to the terminal according to the interest classification of the interest information of the user and the audience range of the user, and storing the corresponding relation between the identifier of the user and the identifier of the information.
The acquiring information to be pushed to the terminal according to the push request message, and pushing the information to the terminal includes:
obtaining an interest classification to which the interest information of the user belongs and an audience range to which the user belongs according to the pushing request message;
according to the interest classification to which the interest information of the user belongs, acquiring a first information set from the corresponding relation between the stored interest classification and the information identifier, wherein the first information set comprises the information identifier corresponding to the interest classification to which the interest information of the user belongs;
acquiring a second information set from the stored corresponding relation between the audience range and the information identification according to the audience range to which the user belongs, wherein the second information set comprises the information identification corresponding to the audience range to which the user belongs;
obtaining a third information set by taking an intersection of the first information set and the second information set, and determining an identifier of information included in the third information set as an identifier of information needing to be pushed to the terminal;
and acquiring the information according to the identifier of the information, and pushing the acquired information to the terminal.
In the embodiment of the invention, an access request message sent by a terminal is obtained, whether information needs to be pushed to the terminal is determined according to the address of a server and the identification of a user carried by the access request message, if so, a response message is sent to the terminal, the response message carries the address of an information pushing system, so that the terminal sends the pushing request message according to the address of the information pushing system, the pushing request message carries the identification of the user, the pushing request message is received, the information needing to be pushed to the terminal is obtained according to the pushing request message, and the information is pushed to the terminal. After the access request message of the terminal is acquired, if the fact that the information needs to be pushed to the terminal is judged, the response message is sent to the terminal, the response waiting time of the terminal is shortened, and therefore the success rate of pushing the information is improved.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.