Movatterモバイル変換


[0]ホーム

URL:


CN110647615A - Information pushing method and device, storage medium and electronic device - Google Patents

Information pushing method and device, storage medium and electronic device
Download PDF

Info

Publication number
CN110647615A
CN110647615ACN201910860069.4ACN201910860069ACN110647615ACN 110647615 ACN110647615 ACN 110647615ACN 201910860069 ACN201910860069 ACN 201910860069ACN 110647615 ACN110647615 ACN 110647615A
Authority
CN
China
Prior art keywords
word
user
information
client
processing
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.)
Pending
Application number
CN201910860069.4A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co LtdfiledCriticalTencent Technology Shenzhen Co Ltd
Priority to CN201910860069.4ApriorityCriticalpatent/CN110647615A/en
Publication of CN110647615ApublicationCriticalpatent/CN110647615A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention discloses an information pushing method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: the method comprises the steps of obtaining communication information for online communication through a client, wherein the communication information is information pushed to a second user by a first user through the client, the first user is a service recommending party, and the second user is a service consulting party; identifying whether the exchange information comprises a target word or not through the client; and under the condition that the communication information comprises the target word, the client acquires the service information related to the target word from the server and pushes the service information. The invention solves the technical problems that the server carries out natural language processing on each piece of online communication information of the user in the related technology, so that the server has heavier load and low retrieval efficiency.

Description

Information pushing method and device, storage medium and electronic device
Technical Field
The invention relates to the field of computers, in particular to a method and a device for pushing information, a storage medium and an electronic device.
Background
At present, with the development of networks, more and more people can order food, go out, shop, consult and the like by means of networks in daily life. These can all be done online over a network; therefore, a large amount of online information communication is generated, and how to push useful information in the large amount of online information communication, for example, for online medical search, the existing solution is to perform natural language processing on each conversation content of a doctor and a consultant, extract keywords related to medicines therein, and then search in a medicine library by using the keywords, if there are N conversations, each conversation can be separated into M words on average, and thus N × M times of search are required. Because the online inquiry has many conversation contents every day, and tens of millions of conversation messages are expected at most, if the existing natural language processing method is used, all the conversation contents need to be participled and are searched in the drug library once, the server load is heavy, and the searching efficiency is low.
In view of the above problems in the prior art, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides an information pushing method and device, a storage medium and an electronic device, which are used for at least solving the technical problems that the server is heavier in load and low in retrieval efficiency because a server carries out natural language processing on each piece of online communication information of a user in the related technology.
According to an aspect of the embodiments of the present invention, there is provided a method for pushing information, including: the method comprises the steps of obtaining communication information for online communication through a client, wherein the communication information is information pushed to a second user by a first user through the client, the first user is a service recommending party, and the second user is a service consulting party; identifying whether the exchange information comprises a target word or not through the client; and under the condition that the communication information comprises the target word, the client acquires the service information related to the target word from the server and pushes the service information.
According to another aspect of the embodiments of the present invention, there is also provided an information pushing apparatus, including: the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring communication information which is communicated online through a client, the communication information is information which is pushed to a second user by a first user through the client, the first user is a service recommending party, and the second user is a service consulting party; the identification module is used for identifying whether the exchange information comprises the target words or not through the client; and the pushing module is used for acquiring the service information related to the target word from the server by the client under the condition that the communication information comprises the target word, and pushing the service information. .
According to a further aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is configured to perform the above method when executed.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method by the computer program.
In the embodiment of the invention, for the information of online communication of users, only the communication information of one user needs to be identified to determine whether the communication information comprises a target word, if so, the service information corresponding to the target word is pushed without identifying all communication information, so that the identification workload is reduced, the identification process is also completed at a client, the communication information does not need to be identified at a server, the load of the server is reduced, and the problems that the server has heavier load and the retrieval efficiency is low because the server carries out natural language processing on each piece of online communication information of the users in the related technology are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of an application environment of a push method of information according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for pushing information according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of an alternative information pushing method according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a mapping of a target word to a digit group according to an embodiment of the invention;
FIG. 5 is a diagram illustrating an alternative mapping of target words to digit groups, in accordance with an embodiment of the present invention;
FIG. 6 is a diagram illustrating an alternative mapping of target words to digit groups, according to an embodiment of the invention;
fig. 7 is a schematic structural diagram of an information pushing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an alternative information pushing device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiment of the invention, a method for pushing information is provided. Alternatively, the above information pushing method can be applied, but not limited to, in the application environment as shown in fig. 1. As shown in fig. 1, a user and a doctor communicate online through a terminal 102 and a terminal 104, and after recognizing that information related to a medicine is included in the online communicated information, the terminal acquires corresponding information from a server 108 through a network 106. The server 108 pushes the inquired medicine information to the terminal 102 and the terminal 104, and displays the pushed information on an online communication interface. Of course, the consultant and the service party can also consult in other application scenarios, such as shopping, online ordering, and the like.
Optionally, in this embodiment, the terminal may include, but is not limited to, at least one of the following: mobile phones, tablet computers, and the like. Such networks may include, but are not limited to: a wired network, a wireless network, wherein the wired network comprises: a local area network, a metropolitan area network, and a wide area network, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communication. The above is only an example, and the present embodiment is not limited to this.
Optionally, in this embodiment, as an optional implementation manner, as shown in fig. 2, the information pushing method may include:
s202, obtaining communication information for online communication through a client, wherein the communication information is information pushed by a first user to a second user through the client, the first user is a service recommending party, and the second user is a service consulting party;
s204, identifying whether the exchange information comprises the target word or not through the client;
and S206, under the condition that the exchange information comprises the target word, the client acquires the service information related to the target word from the server and pushes the service information.
It should be noted that in this embodiment, the online communication may be performed through an APP built in the client, or may be performed through a webpage of the client; and the service may be: shopping consultation, travel consultation, inquiry consultation and the like can be applied to the method in the embodiment as long as the services can be consulted online.
If the service is shopping consultation, the first user is a shop and the second user is a customer, and if the content of the whole online communication is as follows:
the second user, good, i 43 yard foot, can recommend? a few relatively suitable basketball shoes
The first user: good, i recommend three shoes here: basketball shoes A, basketball shoes B and basketball shoes C.
The second user: good, thanks.
According to the communication process between the first user and the second user in the shopping consultation scene, the obtained communication information pushed by the first user to the second user is 'good', and three types of shoes are recommended at this point: basketball shoes A, basketball shoes B and basketball shoes C ". The target words in the communication are "basketball shoe a", "basketball shoe B" and "basketball shoe C", that is, the target words are related to the core of the online service, that is, if the online service is shopping, the target words are the names of the goods. Therefore, the service information corresponding to the target word, namely the information related to the commodity in the application scene, can be pushed, and the commodity information can be pushed.
In another application scenario, if the service is online inquiry, the first user is a doctor, the second user is a patient, and if the content of the entire online communication is:
the second user: the doctor is very well, i am now sneezing, coughing, headache and loss of appetite;
the first user: can be eaten for treating cold;
the second user: good, thanks.
According to the communication process between the first user and the second user in the inquiry and consultation scene, the obtained communication information pushed to the second user by the first user is 'Can eat Gaoling'. The target word in the communication information is the "Ganmaoling", that is, the target word is related to the core of the service of online communication, that is, if the service is an inquiry service, the target word is the name of a medicine. Therefore, the service information corresponding to the target word, namely the information related to the medicine in the application scene, can be pushed, and the medicine information can be pushed.
Through the above manner in this embodiment, for information that users communicate online, only the communication information of one of the users needs to be identified to determine whether the communication information includes a target word, if so, the service information corresponding to the target word is pushed without identifying all the communication information, so that the workload of identification is reduced, the identification process is also completed at the client, the communication information does not need to be identified at the server, and the load of the server is reduced, thereby solving the problems that the server load is heavy and the retrieval efficiency is low because the server performs natural language processing on each piece of the online communication information of the users in the related art.
Optionally, as shown in fig. 3, before obtaining the communication information that is communicated online through the client, the information pushing method of this embodiment further includes:
step S302, sample data composed of a plurality of target words is obtained;
step S304, calculating the data in the sample data one by one through a plurality of preset hash functions, and performing modulus extraction on the calculation result;
step S306, a position in the bit array corresponding to the modulo value is set as abinary number 1, wherein a position in the bit array not corresponding to the modulo value is set as abinary number 0.
As can be seen from the above steps S302 to S306, a relationship between the processing result of the target word processed by the hash function and the digit group needs to be established in advance. If the application scenario in this embodiment is an inquiry service, the target word is medicine information related to medicine, and sample data composed of a plurality of target words may be: acipimox, maoling, cough syrup; in this embodiment, the number of the preset hash functions is 3, which are f (1), f (2) and f (3), respectively, the target word in each sample data is calculated by three hash functions, and after a modulo calculation result is obtained, the result of the acipimox is 1, 4, 18, and the position of the 1 st, 4 th, 18 th in-place array is set as abinary number 1. The result of the Ganmaoling is 8, 12, 18, then the corresponding bit position in the 8 th, 12 th, 18 th bit array is set to a binary number of 1. The result of cough syrup is 18, 3, 8, the corresponding 18 th, 3 th, 8 th position of the bit array is set to thebinary number 1, and the other positions are set to thebinary number 0, as shown in fig. 4.
If the application scenario in this embodiment is a shopping service, the target word is information related to a commodity, and sample data composed of a plurality of target words may be: basketball shoes A, B and C; in this embodiment, the number of preset hash functions is 3, which is f (1), f (2), and f (3), respectively, the target word in each sample data is calculated by three hash functions, and after a modulus is taken for a calculation result, the result of the basketball shoe a is 1, 4, and 18, and the position of thecorresponding position array 1, 4, and 18 is set as abinary number 1. The result for basketball shoe B is 8, 12, 18, and the corresponding position in the 8 th, 12 th, 18 th bit array is set to thebinary number 1. Basketball shoe C has a result of 18, 3, 8, the corresponding position in the digit group at 18, 3, 8 is set to thebinary number 1, and the other positions are set to thebinary number 0.
Optionally, in this embodiment, the identifying, by the client, whether the communication information includes the target word in the step S204 may further include:
step S204-1, performing word segmentation processing on the communication information;
step S204-2, processing the words obtained by word segmentation processing through a plurality of preset hash functions;
and step S204-3, determining whether each word obtained according to word segmentation processing comprises a target word or not according to the processing result.
As can be seen from the above steps S302 to S306, the words obtained by the word segmentation processing are processed through a plurality of preset hash functions, and the words are binary numbers of corresponding positions in the bit array in the processing result; wherein, the step S204-2 can be further realized by:
step S204-21, extracting the same word and a plurality of preset hash functions from each word obtained by word segmentation processing to carry out calculation so as to obtain a plurality of calculation results;
step S204-22, performing modulus processing on a plurality of calculation results to obtain a plurality of corresponding numerical values;
and S204-23, determining a plurality of binary numbers at positions corresponding to the plurality of numerical values in the bit array, wherein the binary numbers are preset at each position in the bit array.
Taking the service as an example of online inquiry, the content of the whole online communication is as follows:
the second user: the doctor is very well, i am now sneezing, coughing, headache and loss of appetite;
the first user: can be eaten for treating cold;
the second user: good, thanks.
According to the communication process between the first user and the second user in the inquiry and consultation scene, the obtained communication information pushed to the second user by the first user is 'Can eat Gaoling', and then the communication information is processed into the following parts: can/eat a little/Ganmaoling; processing the word after word segmentation processing by a plurality of preset hash functions respectively, based on fig. 4, after the three hash functions f (1), f (2) and f (3), the binary numbers corresponding to the bit arrays are 0, 0, 0, and the "ganling" result is 8, 12, 18, the positions of the 8 th, 12 th, 18 th of the corresponding bit arrays are set asbinary numbers 1, 1, 1; the result of the cough syrup is 18, 3, 8, then the position of the 18 th, 3 th, 8 th position of the corresponding bit array is set to thebinary number 1, 1, 1; that is, "Ganmaoling" and "cough syrup" are the target words, while "may", "eat" and "are not the target words.
In another application scenario of this embodiment, the service is taken as an example of online inquiry, and the content of the whole online communication is as follows:
the second user: the doctor is very well, i am now sneezing, coughing, headache and loss of appetite;
the first user: can be eaten with Ganmaoling and cough syrup;
the second user: good, thanks.
According to the communication process between the first user and the second user in the inquiry and consultation scene, the obtained communication information pushed to the second user by the first user is 'Can eat Gaoling', and then the communication information is processed into the following parts: can/eat/Ganmaoling/and/cough syrup; after the words after word segmentation processing are respectively processed by a plurality of preset hash functions, the binary numbers corresponding to the bit arrays are 0, 0 and 0 after being processed by three hash functions f (1), f (2) and f (3), and as shown in fig. 5, the result of the "Ganming" is 8, 12 and 18, the position of the 8 th, 12 th and 18 th bit arrays is set as thebinary number 1, namely, the "Ganming" is the target word, and the "Mammy" and the "eating" are not the target word.
Wherein, the step S204-3 can be further realized by:
step S204-31, determining the first word as a target word under the condition that the binary numbers corresponding to the numerical values of the first word processed by the plurality of preset hash functions in the bit array are all 1; the first word is a word obtained by performing word segmentation processing on the communication information;
step S204-32, under the condition that the binary numbers corresponding to the numerical values of the first word processed by the plurality of preset hash functions in the bit array are not all 1, determining that the first word is not the target word.
The steps S204-31 and S204-32 are exemplified below with reference to fig. 4;
taking the service as an example of online inquiry, the content of the whole online communication is as follows:
the second user: the doctor is very well, i am now sneezing, coughing, headache and loss of appetite;
the first user: can be eaten for treating cold;
the second user: good, thanks.
According to the communication process between the first user and the second user in the inquiry and consultation scene, the obtained communication information pushed to the second user by the first user is 'Can eat Gaoling', and then the communication information is processed into the following parts: can/eat a little/Ganmaoling; after the word after word segmentation processing is respectively processed through a plurality of preset hash functions, after the word can be processed and the click is processed through three hash functions f (1), f (2) and f (3), the binary numbers corresponding to the bit arrays are 0, 0 and 0, and as shown in fig. 6, the result of the "Ganmaoling" is 8, 12 and 18, the positions of the 8 th, 12 th and 18 th positions of the corresponding bit arrays are set as thebinary numbers 1, 1 and 1; the result of the cough syrup is 18, 3, 8, then the position of the 18 th, 3 th, 8 th position of the corresponding bit array is set to thebinary number 1, 1, 1; that is, "Ganmaoling" and "cough syrup" are the target words, while "may", "eat" and "are not the target words.
In another application scenario of this embodiment, the service is taken as an example of online inquiry, and the content of the whole online communication is as follows:
the second user: the doctor is very well, i am now sneezing, coughing, headache and loss of appetite;
the first user: can be eaten with Ganmaoling and cough syrup;
the second user: good, thanks.
According to the communication process between the first user and the second user in the inquiry and consultation scene, the obtained communication information pushed to the second user by the first user is 'Can eat Gaoling', and then the communication information is processed into the following parts: can/eat/Ganmaoling/and/cough syrup; after the words after word segmentation processing are respectively processed through a plurality of preset hash functions, based on fig. 4, it can be seen that after "can", "eat" and "are processed through three hash functions f (1), f (2) and f (3), the binary numbers corresponding to the bit arrays are all 0, 0, 0, and the" Ganmaoling "result is 8, 12, 18, the position of the 8 th, 12 th, 18 th of the corresponding bit array is set asbinary number 1, that is," Ganmaoling "is the target word, and" can "and" eat "are not the target word.
It can be seen that, in the method steps of this embodiment, the process of recognizing the word after the word processing is equivalent to a filter, and assuming that the number of words to be filtered is 100 ten thousand, the number of spaces required for recognition and the number of hash functions can be determined by the following formulas:
Figure BDA0002199468710000102
wherein m is the size of the total space required by identification, and the unit is bit; n is a word to be recognized; p is the misjudgment rate, and k is the number of the hash functions;
wherein, the number of the filtered words is 100 ten thousand, and the value of n is 100 ten thousand; if the tolerable misjudgment rate is 1%, p is 0.01, so that the result obtained by the above formula is that m is 9583522, and occupies about 1.15 MB; k is 6.64, and the number of the rounded optimal hash functions is 7.
It should be noted that the hash function in this embodiment may be a gorgle open-source murmurmurhash function.
Therefore, compared with the prior art, the information pushing mode in the application has the advantages that the number of the information pushed by the first user every day is ten million, 5 words can be separated from each message on average, wherein the number of the information including only 1 ten thousand of medicine data is added with 1% error rate, and the load of target word retrieval is only 1/5000; since each message is required to invoke the target word retrieval service before, the delay is about 300ms, and now if no medicine information is contained, the transmission only takes more than 20ms, which is only 1/15 from the original time, by using the method of the present embodiment.
According to another aspect of the embodiments of the present invention, there is also provided an information pushing apparatus for implementing the information pushing method, as shown in fig. 7, the apparatus including:
(1) the first obtaining module 72 is configured to obtain communication information that is used for performing online communication through a client, where the communication information is information that is pushed by a first user to a second user through the client, the first user is a service recommender, and the second user is a service advisor;
(2) the identification module 74 is used for identifying whether the target words are included in the communication information through the client;
(3) and a pushing module 76, configured to, in a case where the communication information includes the target word, obtain, by the client, service information related to the target word from the server, and push the service information.
It should be noted that in this embodiment, the online communication may be performed through an APP built in the client, or may be performed through a webpage of the client; and the service may be: shopping consultation, travel consultation, inquiry consultation and the like can be applied to the method in the embodiment as long as the services can be consulted online.
If the service is shopping consultation, the first user is a shop and the second user is a customer, and if the content of the whole online communication is as follows:
the second user, good, i 43 yard foot, can recommend? a few relatively suitable basketball shoes
The first user: good, i recommend three shoes here: basketball shoes A, basketball shoes B and basketball shoes C.
The second user: good, thanks.
According to the communication process between the first user and the second user in the shopping consultation scene, the obtained communication information pushed by the first user to the second user is 'good', and three types of shoes are recommended at this point: basketball shoes A, basketball shoes B and basketball shoes C ". The target words in the communication are "basketball shoe a", "basketball shoe B" and "basketball shoe C", that is, the target words are related to the core of the online service, that is, if the online service is shopping, the target words are the names of the goods. Therefore, the service information corresponding to the target word, namely the information related to the commodity in the application scene, can be pushed, and the commodity information can be pushed.
In another application scenario, if the service is online inquiry, the first user is a doctor, the second user is a patient, and if the content of the entire online communication is:
the second user: the doctor is very well, i am now sneezing, coughing, headache and loss of appetite;
the first user: can be eaten for treating cold;
the second user: good, thanks.
According to the communication process between the first user and the second user in the inquiry and consultation scene, the obtained communication information pushed to the second user by the first user is 'Can eat Gaoling'. The target word in the communication information is the "Ganmaoling", that is, the target word is related to the core of the service of online communication, that is, if the service is an inquiry service, the target word is the name of a medicine. Therefore, the service information corresponding to the target word, namely the information related to the medicine in the application scene, can be pushed, and the medicine information can be pushed.
Through the above manner in this embodiment, for information that users communicate online, only the communication information of one of the users needs to be identified to determine whether the communication information includes a target word, if so, the service information corresponding to the target word is pushed without identifying all the communication information, so that the workload of identification is reduced, the identification process is also completed at the client, the communication information does not need to be identified at the server, and the load of the server is reduced, thereby solving the problems that the server load is heavy and the retrieval efficiency is low because the server performs natural language processing on each piece of the online communication information of the users in the related art.
Optionally, as shown in fig. 8, the apparatus in the present application may further include:
(1) a second obtaining module 82, configured to obtain sample data composed of a plurality of target words before obtaining the communication information for performing online communication through the client;
(2) the processing module 84 is configured to calculate data in the sample data one by one through a plurality of preset hash functions, and modulo the calculation result;
(3) a setting module 86, configured to set a position in the bit array corresponding to the modulo value as abinary number 1, where a position in the bit array not corresponding to the modulo value is set as abinary number 0.
As can be seen from the modules shown in fig. 8, a relationship between the processing result of the target word after processing by the hash function and the bit array needs to be established in advance. If the application scenario in this embodiment is an inquiry service, the target word is medicine information related to medicine, and sample data composed of a plurality of target words may be: acipimox, maoling, cough syrup; in this embodiment, the number of the preset hash functions is 3, which are f (1), f (2) and f (3), respectively, the target word in each sample data is calculated by three hash functions, and after a modulo calculation result is obtained, the result of the acipimox is 1, 4, 18, and the position of the 1 st, 4 th, 18 th in-place array is set as abinary number 1. The result of the Ganmaoling is 8, 12, 18, then the corresponding bit position in the 8 th, 12 th, 18 th bit array is set to a binary number of 1. The result of cough syrup is 18, 3, 8, the corresponding 18 th, 3 th, 8 th position of the bit array is set to thebinary number 1, and the other positions are set to thebinary number 0, as shown in fig. 4.
If the application scenario in this embodiment is a shopping service, the target word is information related to a commodity, and sample data composed of a plurality of target words may be: basketball shoes A, B and C; in this embodiment, the number of preset hash functions is 3, which is f (1), f (2), and f (3), respectively, the target word in each sample data is calculated by three hash functions, and after a modulus is taken for a calculation result, the result of the basketball shoe a is 1, 4, and 18, and the position of thecorresponding position array 1, 4, and 18 is set as abinary number 1. The result for basketball shoe B is 8, 12, 18, and the corresponding position in the 8 th, 12 th, 18 th bit array is set to thebinary number 1. Basketball shoe C has a result of 18, 3, 8, the corresponding position in the digit group at 18, 3, 8 is set to thebinary number 1, and the other positions are set to thebinary number 0.
Optionally, the identification module 74 in the present application includes: the word segmentation unit is used for carrying out word segmentation processing on the communication information; the processing unit is used for processing the words obtained by word segmentation processing through a plurality of preset hash functions; and the determining unit is used for determining whether each word obtained according to the word segmentation processing comprises the target word or not according to the processing result.
Wherein the processing unit further may comprise: the first processing subunit is used for taking out the same word from each word obtained by word segmentation processing and calculating the same word and a plurality of preset hash functions to obtain a plurality of calculation results; the second processing subunit is used for performing modulo processing on the plurality of calculation results to obtain a plurality of corresponding numerical values; the first determining subunit is used for determining a plurality of binary numbers at positions corresponding to the plurality of numerical values in the bit array, wherein the binary numbers are preset at each position in the bit array.
For the processing unit, taking the service as an online inquiry as an example, and the content of the whole online communication is as follows:
the second user: the doctor is very well, i am now sneezing, coughing, headache and loss of appetite;
the first user: can be eaten for treating cold;
the second user: good, thanks.
According to the communication process between the first user and the second user in the inquiry and consultation scene, the obtained communication information pushed to the second user by the first user is 'Can eat Gaoling', and then the communication information is processed into the following parts: can/eat a little/Ganmaoling; processing the word after word segmentation processing by a plurality of preset hash functions respectively, based on fig. 4, after the three hash functions f (1), f (2) and f (3), the binary numbers corresponding to the bit arrays are 0, 0, 0, and the "ganling" result is 8, 12, 18, the positions of the 8 th, 12 th, 18 th of the corresponding bit arrays are set asbinary numbers 1, 1, 1; the result of the cough syrup is 18, 3, 8, then the position of the 18 th, 3 th, 8 th position of the corresponding bit array is set to thebinary number 1, 1, 1; that is, "Ganmaoling" and "cough syrup" are the target words, while "may", "eat" and "are not the target words.
In another application scenario of this embodiment, the service is taken as an example of online inquiry, and the content of the whole online communication is as follows:
the second user: the doctor is very well, i am now sneezing, coughing, headache and loss of appetite;
the first user: can be eaten with Ganmaoling and cough syrup;
the second user: good, thanks.
According to the communication process between the first user and the second user in the inquiry and consultation scene, the obtained communication information pushed to the second user by the first user is 'Can eat Gaoling', and then the communication information is processed into the following parts: can/eat/Ganmaoling/and/cough syrup; after the words after word segmentation processing are respectively processed by a plurality of preset hash functions, the binary numbers corresponding to the bit arrays are 0, 0 and 0 after being processed by three hash functions f (1), f (2) and f (3), and as shown in fig. 5, the result of the "Ganming" is 8, 12 and 18, the position of the 8 th, 12 th and 18 th bit arrays is set as thebinary number 1, namely, the "Ganming" is the target word, and the "Mammy" and the "eating" are not the target word.
Optionally, the determining unit may further include: the second determining subunit is configured to determine that the first word is the target word when binary numbers corresponding to the numerical values of the first word processed by the multiple preset hash functions in the bit array are all 1; the first word is a word obtained by performing word segmentation processing on the communication information; and the third determining subunit is used for determining that the first word is not the target word under the condition that the binary numbers corresponding to the numerical values of the first word processed by the plurality of preset hash functions in the bit array are not all 1.
The steps S204-31 and S204-32 are exemplified below with reference to fig. 4;
taking the service as an example of online inquiry, the content of the whole online communication is as follows:
the second user: the doctor is very well, i am now sneezing, coughing, headache and loss of appetite;
the first user: can be eaten for treating cold;
the second user: good, thanks.
According to the communication process between the first user and the second user in the inquiry and consultation scene, the obtained communication information pushed to the second user by the first user is 'Can eat Gaoling', and then the communication information is processed into the following parts: can/eat a little/Ganmaoling; after the word after word segmentation processing is respectively processed through a plurality of preset hash functions, after the word can be processed and the click is processed through three hash functions f (1), f (2) and f (3), the binary numbers corresponding to the bit arrays are 0, 0 and 0, and as shown in fig. 6, the result of the "Ganmaoling" is 8, 12 and 18, the positions of the 8 th, 12 th and 18 th positions of the corresponding bit arrays are set as thebinary numbers 1, 1 and 1; the result of the cough syrup is 18, 3, 8, then the position of the 18 th, 3 th, 8 th position of the corresponding bit array is set to thebinary number 1, 1, 1; that is, "Ganmaoling" and "cough syrup" are the target words, while "may", "eat" and "are not the target words.
In another application scenario of this embodiment, the service is taken as an example of online inquiry, and the content of the whole online communication is as follows:
the second user: the doctor is very well, i am now sneezing, coughing, headache and loss of appetite;
the first user: can be eaten with Ganmaoling and cough syrup;
the second user: good, thanks.
According to the communication process between the first user and the second user in the inquiry and consultation scene, the obtained communication information pushed to the second user by the first user is 'Can eat Gaoling', and then the communication information is processed into the following parts: can/eat/Ganmaoling/and/cough syrup; after the words after word segmentation processing are respectively processed through a plurality of preset hash functions, based on fig. 4, it can be seen that after "can", "eat" and "are processed through three hash functions f (1), f (2) and f (3), the binary numbers corresponding to the bit arrays are all 0, 0, 0, and the" Ganmaoling "result is 8, 12, 18, the position of the 8 th, 12 th, 18 th of the corresponding bit array is set asbinary number 1, that is," Ganmaoling "is the target word, and" can "and" eat "are not the target word.
It can be seen that, in the method steps of this embodiment, the process of recognizing the word after the word processing is equivalent to a filter, and assuming that the number of words to be filtered is 100 ten thousand, the number of spaces required for recognition and the number of hash functions can be determined by the following formulas:
Figure BDA0002199468710000161
Figure BDA0002199468710000162
wherein m is the size of the total space required by identification, and the unit is bit; n is a word to be recognized; p is the misjudgment rate, and k is the number of the hash functions;
wherein, the number of the filtered words is 100 ten thousand, and the value of n is 100 ten thousand; if the tolerable misjudgment rate is 1%, p is 0.01, so that the result obtained by the above formula is that m is 9583522, and occupies about 1.15 MB; k is 6.64, and the number of the rounded optimal hash functions is 7.
It should be noted that the hash function in this embodiment is a gorgle open-source murmurmurhash function.
Therefore, compared with the prior art, the information pushing mode in the application has the advantages that the number of the information pushed by the first user every day is ten million, 5 words can be separated from each message on average, wherein the number of the information including only 1 ten thousand of medicine data is added with 1% error rate, and the load of target word retrieval is only 1/5000; since each message is required to invoke the target word retrieval service before, the delay is about 300ms, and now if no medicine information is contained, the transmission only takes more than 20ms, which is only 1/15 from the original time, by using the method of the present embodiment.
According to a further aspect of embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, obtaining communication information for online communication through a client, wherein the communication information is information pushed by a first user to a second user through the client, the first user is a service recommending party, and the second user is a service consulting party;
s2, identifying whether the exchange information includes the target word through the client;
and S3, under the condition that the exchange information includes the target word, the client acquires the service information related to the target word from the server and pushes the service information.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, performing word segmentation processing on the communication information;
s2, processing the words obtained by word segmentation processing through a plurality of preset hash functions;
and S3, determining whether each word obtained by word segmentation processing includes the target word according to the processing result.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, extracting the same word from each word obtained by word segmentation processing and calculating the same word and a plurality of preset hash functions to obtain a plurality of calculation results;
s2, performing modulus processing on the calculation results to obtain a plurality of corresponding numerical values;
and S3, determining a plurality of binary numbers on positions corresponding to a plurality of numerical values in a bit array, wherein each position in the bit array is preset with a binary number.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, determining that the first word is the target word under the condition that binary numbers corresponding to numerical values of the first word processed by a plurality of preset hash functions in the digit group are all 1; the first word is a word obtained by performing word segmentation processing on the communication information;
s2, determining that the first word is not the target word when all binary numbers corresponding to the numeric values of the first word processed by the plurality of preset hash functions in the digit group are 1.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring sample data consisting of a plurality of target words;
s2, calculating the data in the sample data one by one through a plurality of preset hash functions, and performing modulus extraction on the calculation result;
s3, setting a position in the bit array corresponding to the modulo value tobinary number 1, wherein a position in the bit array not corresponding to the modulo value is set tobinary number 0.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the above-mentioned information push method, as shown in fig. 9, the electronic device includes: aprocessor 902, amemory 904, adisplay 906, auser interface 908, atransmission device 910, and the like. The memory has stored therein a computer program, and the processor is arranged to execute the steps of any of the above method embodiments by means of the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, obtaining communication information for online communication through a client, wherein the communication information is information pushed by a first user to a second user through the client, the first user is a service recommending party, and the second user is a service consulting party;
s2, identifying whether the exchange information includes the target word through the client;
and S3, under the condition that the exchange information includes the target word, the client acquires the service information related to the target word from the server and pushes the service information.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 9 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 9 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
Thememory 904 may be used to store software programs and modules, such as program instructions/modules corresponding to the information pushing method and apparatus in the embodiments of the present invention, and theprocessor 902 executes various functional applications and data processing by running the software programs and modules stored in thememory 904, that is, implements the information pushing method. Thememory 904 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, thememory 904 may further include memory located remotely from theprocessor 902, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Thetransmission device 910 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, thetransmission device 910 includes a network adapter (NIC) that can be connected to a router via a network cable and other network devices so as to communicate with the internet or a local area network. In one example, thetransmission device 910 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Thedisplay 906 displays an online communication interface, and theuser interface 908 is used for acquiring input operation instructions.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for pushing information is characterized by comprising the following steps:
the method comprises the steps of obtaining communication information for online communication through a client, wherein the communication information is information pushed to a second user by a first user through the client, the first user is a service recommending party, and the second user is a service consulting party;
identifying whether the exchange information comprises a target word or not through the client;
and under the condition that the communication information comprises the target word, the client acquires the service information related to the target word from the server and pushes the service information.
2. The method of claim 1, wherein the identifying, by the client, whether the communication includes the target word comprises:
performing word segmentation processing on the communication information;
processing the words obtained by word segmentation processing through a plurality of preset hash functions;
and determining whether each word obtained according to word segmentation processing comprises a target word or not according to the processing result.
3. The method according to claim 2, wherein the processing the word obtained by the word segmentation processing through a plurality of preset hash functions comprises:
taking out the same word from each word obtained by word segmentation processing and calculating the same word and a plurality of preset hash functions to obtain a plurality of calculation results;
performing modulus processing on the calculation results to obtain a plurality of corresponding numerical values;
and determining a plurality of binary numbers at positions corresponding to the plurality of numerical values in the bit array, wherein the binary numbers are preset at each position in the bit array.
4. The method according to claim 3, wherein the determining whether each word obtained by the word segmentation processing includes the target word according to the processing result comprises:
under the condition that binary numbers corresponding to numerical values of a first word processed by a plurality of preset hash functions in the digit group are all 1, determining the first word as the target word;
the first word is a word obtained by performing word segmentation processing on the communication information;
and under the condition that the binary numbers corresponding to the numerical values of the first word processed by the preset hash functions in the digit group are not all 1, determining that the first word is not the target word.
5. The method of claim 3, wherein prior to obtaining the communication information for online communication via the client, the method further comprises:
acquiring sample data consisting of a plurality of target words;
calculating the data in the sample data one by one through a plurality of preset hash functions, and performing modulus extraction on the calculation result;
setting the position in the bit array corresponding to the value obtained by modulus as a binary number 1, wherein the position in the bit array not corresponding to the value obtained by modulus is set as a binary number 0.
6. An apparatus for pushing information, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring communication information which is communicated online through a client, the communication information is information which is pushed to a second user by a first user through the client, the first user is a service recommending party, and the second user is a service consulting party;
the identification module is used for identifying whether the exchange information comprises the target words or not through the client;
and the pushing module is used for acquiring the service information related to the target word from the server by the client under the condition that the communication information comprises the target word, and pushing the service information.
7. The apparatus of claim 6, wherein the identification module comprises:
the word segmentation unit is used for carrying out word segmentation processing on the communication information;
the processing unit is used for processing the words obtained by word segmentation processing through a plurality of preset hash functions;
and the determining unit is used for determining whether each word obtained according to the word segmentation processing comprises the target word or not according to the processing result.
8. The apparatus of claim 7, wherein the processing unit comprises:
the first processing subunit is configured to take out the same word from each word obtained by the word segmentation processing and perform calculation with the plurality of preset hash functions to obtain a plurality of calculation results;
the second processing subunit is used for performing modulo processing on the plurality of calculation results to obtain a plurality of corresponding numerical values;
the first determining subunit is used for determining a plurality of binary numbers at positions corresponding to a plurality of numerical values in a bit array, wherein the binary numbers are preset at each position in the bit array.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 5 when executed.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
CN201910860069.4A2019-09-112019-09-11Information pushing method and device, storage medium and electronic devicePendingCN110647615A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910860069.4ACN110647615A (en)2019-09-112019-09-11Information pushing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910860069.4ACN110647615A (en)2019-09-112019-09-11Information pushing method and device, storage medium and electronic device

Publications (1)

Publication NumberPublication Date
CN110647615Atrue CN110647615A (en)2020-01-03

Family

ID=69010355

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910860069.4APendingCN110647615A (en)2019-09-112019-09-11Information pushing method and device, storage medium and electronic device

Country Status (1)

CountryLink
CN (1)CN110647615A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101072193A (en)*2007-03-302007-11-14腾讯科技(深圳)有限公司On-line advertising interacting system and method based on instant messaging tool
US20140074842A1 (en)*2012-09-122014-03-13Lior TalComputer Method and System for Detecting the Subject Matter of Online Communications
CN104933028A (en)*2015-06-232015-09-23百度在线网络技术(北京)有限公司Information pushing method and information pushing device
CN105843962A (en)*2016-04-182016-08-10百度在线网络技术(北京)有限公司Information processing and displaying methods, information processing and displaying devices as well as information processing and displaying system
CN105975622A (en)*2016-05-282016-09-28蔡宏铭Multi-role intelligent chatting method and system
US20160337290A1 (en)*2014-01-102016-11-17Huawei Technologies Co., Ltd.Message Push Method and Apparatus
CN108306814A (en)*2017-08-112018-07-20腾讯科技(深圳)有限公司Information-pushing method, device, terminal based on instant messaging and storage medium
CN108900612A (en)*2018-06-292018-11-27百度在线网络技术(北京)有限公司Method and apparatus for pushed information
CN109817351A (en)*2019-01-312019-05-28百度在线网络技术(北京)有限公司A kind of information recommendation method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101072193A (en)*2007-03-302007-11-14腾讯科技(深圳)有限公司On-line advertising interacting system and method based on instant messaging tool
US20140074842A1 (en)*2012-09-122014-03-13Lior TalComputer Method and System for Detecting the Subject Matter of Online Communications
US20160337290A1 (en)*2014-01-102016-11-17Huawei Technologies Co., Ltd.Message Push Method and Apparatus
CN104933028A (en)*2015-06-232015-09-23百度在线网络技术(北京)有限公司Information pushing method and information pushing device
CN105843962A (en)*2016-04-182016-08-10百度在线网络技术(北京)有限公司Information processing and displaying methods, information processing and displaying devices as well as information processing and displaying system
CN105975622A (en)*2016-05-282016-09-28蔡宏铭Multi-role intelligent chatting method and system
CN108306814A (en)*2017-08-112018-07-20腾讯科技(深圳)有限公司Information-pushing method, device, terminal based on instant messaging and storage medium
CN108900612A (en)*2018-06-292018-11-27百度在线网络技术(北京)有限公司Method and apparatus for pushed information
CN109817351A (en)*2019-01-312019-05-28百度在线网络技术(北京)有限公司A kind of information recommendation method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵晓永: "面向云计算的数据存储关键技术研究", 河北科学技术出版社, pages: 85*

Similar Documents

PublicationPublication DateTitle
CN108334533B (en)Keyword extraction method and device, storage medium and electronic device
CN109697629B (en)Product data pushing method and device, storage medium and computer equipment
CN105354202B (en)Data push method and device
CN111506801A (en)Sequencing method and device for sub-applications in application App
CN110209921B (en)Method and device for pushing media resource, storage medium and electronic device
US20170132318A1 (en)Method, system, and device for item search
CN106933897A (en)Data query method and apparatus
CN112417164A (en)Information recommendation method and device, storage medium and electronic device
CN105868225A (en)Data query method, client, server and system
CN111753210A (en)Resource pushing method and device, computer equipment and computer readable storage medium
CN105589873B (en)Data searching method, terminal and server
CN112785069A (en)Prediction method and device for terminal equipment changing machine, storage medium and electronic equipment
CN115809371A (en)Learning demand determination method and system based on data analysis
CN110852338B (en)User portrait construction method and device
CN113139102A (en)Data processing method, data processing device, nonvolatile storage medium and processor
CN110543457A (en)Track type document processing method and device, storage medium and electronic device
HK40018343A (en)Method, apparatus, storage medium, and electronic device for pushing information
CN110647615A (en)Information pushing method and device, storage medium and electronic device
CN107301192A (en)A kind of terminal identification method and identification server
CN117749873A (en)Information pushing method, information processing method, storage medium and electronic device
CN111858994A (en)Character retrieval method and device
CN113052647A (en)Recommendation method and device for cold start and computer readable storage medium
CN109992346A (en) Display method, device and equipment for virtual items
CN110826582A (en)Image feature training method, device and system
CN116578777A (en) A message push method and device, storage medium, and computer equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
REGReference to a national code

Ref country code:HK

Ref legal event code:DE

Ref document number:40018343

Country of ref document:HK

SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp