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:
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:
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.