CN109474516B - Method and system for recommending instant messaging connection strategy based on convolutional neural network - Google Patents

Method and system for recommending instant messaging connection strategy based on convolutional neural network Download PDF

Info

Publication number
CN109474516B
CN109474516B CN201811349684.0A CN201811349684A CN109474516B CN 109474516 B CN109474516 B CN 109474516B CN 201811349684 A CN201811349684 A CN 201811349684A CN 109474516 B CN109474516 B CN 109474516B
Authority
CN
China
Prior art keywords
user
neural network
function
instant messaging
network model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811349684.0A
Other languages
Chinese (zh)
Other versions
CN109474516A (en
Inventor
汪天翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Genius Technology Co Ltd
Original Assignee
Guangdong Genius Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Genius Technology Co Ltd filed Critical Guangdong Genius Technology Co Ltd
Priority to CN201811349684.0A priority Critical patent/CN109474516B/en
Publication of CN109474516A publication Critical patent/CN109474516A/en
Application granted granted Critical
Publication of CN109474516B publication Critical patent/CN109474516B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/142Network analysis or design using statistical or mathematical methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/043Real-time or near real-time messaging, e.g. instant messaging [IM] using or handling presence information

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Algebra (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Probability & Statistics with Applications (AREA)
  • Pure & Applied Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Machine Translation (AREA)

Abstract

An instant messaging connection strategy recommendation method and system based on a convolutional neural network comprises the following steps: acquiring use data of a user for a target instant messaging function on wearable equipment in a preset time period, wherein the use data at least comprises use frequency; inputting usage data into a user classification model; wherein, the user classification model is a convolutional neural network model; and determining the type of the target user to which the user belongs based on the output result of the user classification model, and recommending an instant communication connection strategy corresponding to the type of the target user to the wearable device, wherein the instant communication connection strategy is used for indicating the connection frequency of the wearable device for instant communication connection. By implementing the embodiment of the invention, the electric quantity loss of the equipment can be reduced.

Description

Method and system for recommending instant messaging connection strategy based on convolutional neural network
Technical Field
The invention relates to the technical field of communication, in particular to an instant messaging connection strategy recommendation method and system based on a convolutional neural network.
Background
Instant Messaging (IM) is a system for real-time communication over a network that allows two or more people to communicate text messages, files, voice and video instantly using the network, and typically provides services in the form of a website, computer software or mobile application.
Because the instant messaging has the characteristics of receiving and sending information in real time, the instant messaging function requires that the network is in a continuous connection state in the using process. However, in real life, the situation that the network is unstable and even the connection is interrupted sometimes occurs, so that the instant messaging function fails to receive and send information in time, and the use experience of people in communication through the instant messaging function is affected. At present, aiming at the problem that the connection of the instant messaging function is interrupted, the mainly adopted connection strategy is to reconnect according to a time increasing rule, namely once the instant messaging connection is interrupted, the equipment reconnects uninterruptedly for a long time according to the time increasing rule. Therefore, the existing instant messaging connection strategy increases the power consumption of the equipment.
Disclosure of Invention
The embodiment of the invention discloses an instant messaging connection strategy recommendation method and system based on a convolutional neural network, which can reduce the electric quantity loss of equipment.
The first aspect of the embodiment of the invention discloses an instant messaging connection strategy recommendation method based on a convolutional neural network, which comprises the following steps:
acquiring use data of a user for a target instant messaging function on wearable equipment in a preset time period, wherein the use data at least comprises use frequency;
inputting the usage data into a user classification model; the user classification model is a convolutional neural network model;
and determining a target user type to which the user belongs based on an output result of the user classification model, and recommending an instant messaging connection strategy corresponding to the target user type to the wearable device, wherein the instant messaging connection strategy is used for indicating the connection frequency of instant messaging connection of the wearable device.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the target instant messaging function at least includes a first function, a second function, and a third function;
before the entering the usage data into a user classification model, the method further comprises:
determining a preset number of user samples, and acquiring first function data, second function data and third function data which are generated when each user sample uses the target instant messaging function every day in a preset number of days;
acquiring a first preset hyper-parameter corresponding to the first functional data, a second preset hyper-parameter corresponding to the second functional data and a third preset hyper-parameter corresponding to the third functional data;
determining a one-dimensional vector according to the first functional data, the second functional data, the third functional data, the first preset hyper-parameter, the second preset hyper-parameter and the third preset hyper-parameter, wherein the one-dimensional vector is used for reflecting the use condition of each user sample for using the target instant messaging function every day in the preset days;
according to the one-dimensional vector and the preset days, determining a multi-dimensional vector taking the numerical value of the preset days as the dimension, wherein the multi-dimensional vector is used for reflecting the use condition of each user sample using the target instant messaging function on the preset days;
determining a training set of an initial neural network model according to the multi-dimensional vectors of all the user samples;
and training the initial neural network model by using the training set to obtain a user classification model.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the training the initial neural network model by using the training set to obtain a user classification model includes:
inputting the training set into the initial neural network model, so that the training set sequentially passes through the superposition convolution operation of the convolution layer of the initial neural network model and the pooling operation of the pooling layer to obtain a first feature vector sample;
inputting the first feature vector sample into a full-connection layer of the initial neural network model to obtain a second feature vector sample;
and training the target classifier of the initial neural network model according to the second feature vector sample to obtain a user classification model.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the training set is a labeled training set, and the label is used to label an actual classification value of each user sample; the actual classification value is determined according to the frequency of the user sample actually using the target instant messaging function.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the training the target classifier of the initial neural network model according to the second feature vector sample to obtain a user classification model includes:
inputting the second feature vector sample into a target classifier of the initial neural network model to obtain an output classification value, and determining the output classification value as a prediction classification value; comparing the predicted classification value with the actual classification value to obtain a comparison result;
updating parameters of the initial neural network model according to the comparison result;
judging whether the loss function of the initial neural network model meets a preset condition or not; the loss function is used for reflecting the error between the output classification value and the actual classification value of the initial neural network model;
and when the loss function of the initial neural network model meets a preset condition, determining the current parameters of the initial neural network model as the parameters of a user classification model, and obtaining the user classification model according to the parameters.
The second aspect of the embodiments of the present invention discloses a wearable device, including:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring use data of a user aiming at a target instant messaging function on the wearable device in a preset time period, and the use data at least comprises use frequency;
an input unit for inputting the usage data into a user classification model; the user classification model is a convolutional neural network model;
the determining unit is used for determining the type of a target user to which the user belongs based on the output result of the user classification model;
and the recommending unit is used for recommending an instant messaging connection strategy corresponding to the target user type to the wearable device, and the instant messaging connection strategy is used for indicating the connection frequency of instant messaging connection of the wearable device.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the target instant messaging function includes at least a first function, a second function, and a third function;
the determining unit is further configured to determine a preset number of user samples before the input unit inputs the usage data into the user classification model;
the obtaining unit is further configured to obtain first function data, second function data and third function data, which are generated when each user sample uses the target instant messaging function every day in preset days, and a first preset hyper-parameter corresponding to the first function data, a second preset hyper-parameter corresponding to the second function data and a third preset hyper-parameter corresponding to the third function data;
the determining unit is further configured to determine a one-dimensional vector according to the first functional data, the second functional data, the third functional data, the first preset hyper-parameter, the second preset hyper-parameter, and the third preset hyper-parameter, and determine a multi-dimensional vector using a numerical value of the preset number of days as a dimension according to the one-dimensional vector and the preset number of days; the one-dimensional vector is used for reflecting the use condition of each user sample for using the target instant messaging function every day in the preset number of days; the multi-dimensional vector is used for reflecting the use condition of each user sample using the target instant messaging function on the preset days;
the determining unit is further configured to determine a training set of an initial neural network model according to the multidimensional vectors of all the user samples;
and the training unit is used for training the initial neural network model by using the training set to obtain a user classification model.
As an optional implementation manner, in a second aspect of the embodiment of the present invention, the training unit includes:
the first input subunit is used for inputting the training set into the neural network model so that the training set sequentially passes through the superposition convolution operation of convolution layers of the neural network model and the pooling operation of a pooling layer to obtain a first feature vector sample;
the second input subunit is used for inputting the first feature vector sample into a full connection layer of the neural network model to obtain a second feature vector sample;
and the training subunit is used for training the target classifier of the neural network model according to the second feature vector sample to obtain a user classification model.
As an alternative implementation manner, in the second aspect of the embodiment of the present invention, the training set is a labeled training set, and the label is used to label the actual classification value of each user sample; the actual classification value is determined according to the frequency of the user sample actually using the target instant messaging function.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the training subunit trains the target classifier of the neural network model according to the second feature vector sample, and a manner of obtaining the user classification model specifically is:
inputting the second feature vector sample into a target classifier of the neural network model to obtain an output classification value, and determining the output classification value as a prediction classification value; comparing the predicted classification value with the actual classification value to obtain a comparison result;
updating parameters of the initial neural network model according to the comparison result;
judging whether the loss function of the initial neural network model meets a preset condition or not; the loss function is used for reflecting the error between the output classification value and the actual classification value of the initial neural network model;
and when the loss function of the initial neural network model meets a preset condition, determining the current parameters of the initial neural network model as the parameters of a user classification model, and obtaining the user classification model according to the parameters.
A third aspect of an embodiment of the present invention discloses another wearable device, including:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute all or part of the steps of any one of the methods disclosed in the first aspect of the embodiments of the present invention.
A fourth aspect of the embodiments of the present invention discloses a computer-readable storage medium, which is characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute all or part of the steps in any one of the methods disclosed in the first aspect of the embodiments of the present invention.
A fifth aspect of embodiments of the present invention discloses a computer program product, which, when run on a computer, causes the computer to perform some or all of the steps of any one of the methods of the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the use data of a user for the target instant messaging function on the wearable device in a preset time period is obtained, and the use data at least comprises use frequency; inputting usage data into a user classification model; wherein, the user classification model is a convolutional neural network model; and determining the type of the target user to which the user belongs based on the output result of the user classification model, and recommending an instant communication connection strategy corresponding to the type of the target user to the wearable device, wherein the instant communication connection strategy is used for indicating the connection frequency of the wearable device for instant communication connection. Therefore, by implementing the embodiment of the invention, the habit of using the instant messaging function in the future of the user can be predicted based on the past using habit of the user and the user classification model, and the instant messaging connection strategy according with the using habit of the user is recommended to the wearable device according to the prediction result, so that the wearable device can be used for carrying out instant messaging connection only under the condition that the user has a using requirement.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an instant messaging connection policy recommendation method based on a convolutional neural network according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart of another method for recommending an instant messaging connection policy based on a convolutional neural network according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an instant messaging connection policy recommendation system based on a convolutional neural network according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another instant messaging connection policy recommendation system based on a convolutional neural network, which is disclosed in the embodiment of the present invention.
Detailed Description
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 is to be noted that the terms "comprises" and "comprising" and any variations thereof in the embodiments and drawings of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The embodiment of the invention discloses a voice question searching method based on a customized corpus and wearable equipment, which can improve the recognition accuracy of voice questions of students and further improve the question searching accuracy. The following are detailed below.
Example one
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an instant messaging connection policy recommendation method based on a convolutional neural network according to an embodiment of the present invention. As shown in fig. 1, the method for recommending an instant messaging connection policy based on a convolutional neural network may include the following steps:
101. the recommendation system acquires the use data of a user aiming at the target instant messaging function on the wearable device within a preset time period; wherein the usage data comprises at least a frequency of use.
In the embodiment of the invention, the preset time period can be five days, seven days or fifteen days; the target instant messaging function can comprise a micro chat function, a positioning function, a video call function and the like; the usage data may also include a point in time of usage, and embodiments of the present invention are not limited.
102. The recommendation system inputs the usage data into the user classification model; wherein, the user classification model is a convolutional neural network model.
In the embodiment of the invention, when the recommendation system inputs the use data into the user type model, the use data can be preprocessed, and the preprocessed use data is input into the user classification model; the user classification model is a pre-trained convolutional neural network model.
103. And the recommendation system determines the target user type of the user based on the output result of the user classification model.
In the embodiment of the invention, the recommendation system can determine the real-time requirement of the user for the target instant messaging function according to the use conditions of different users for the target instant messaging function, and divide the user type according to the requirement degree of the user for the real-time property of the target instant messaging function. Specifically, the user types may be divided into multiple user types according to the requirement level of the user for the real-time performance of the target instant messaging function from high to low, where a higher requirement level indicates that the user uses the target instant messaging function more frequently, that is, the user has a higher requirement for the real-time performance of the connection of the target instant messaging function. For example, 8 user types may be divided, which may include a high frequency usage type, a medium frequency usage type, a low frequency usage type, and the like, and the embodiment of the present invention is not limited thereto. Therefore, the embodiment of the invention can divide the user types based on the requirement degree of the user on the connection real-time performance of the target instant messaging function, and conforms to the daily use habit of the user, thereby not only realizing the reasonable division of different user groups, but also improving the use experience of the user.
104. The recommendation system recommends an instant messaging connection strategy corresponding to the target user type to the wearable device, wherein the instant messaging connection strategy is used for indicating the connection frequency of instant messaging connection of the wearable device.
In the embodiment of the present invention, the instant messaging connection policy may be used to indicate a connection time point and a connection frequency of the wearable device for instant messaging connection.
Therefore, by the method described in fig. 1, the habit of using instant messaging in the future of the user can be predicted based on the past use habit of the user for the instant messaging function and the user classification model, and an instant messaging connection strategy conforming to the use habit of the user is recommended to the wearable device according to the prediction result, so that the wearable device can perform instant messaging connection only when the user has a use demand, and compared with the long-time uninterrupted reconnection in the prior art, the method can reduce the electric quantity loss of the device; in addition, the user types can be divided based on the requirement degree of the user on the connection real-time performance of the target instant messaging function, the daily use habits of the user are complied with, the reasonable division of different user groups is realized, and the use experience of the user is improved.
Example two
Referring to fig. 2, fig. 2 is a flowchart illustrating another method for recommending an instant messaging connection policy based on a convolutional neural network according to an embodiment of the present invention. As shown in fig. 2, the method for recommending an instant messaging connection policy based on a convolutional neural network may include the following steps:
201. the recommendation system determines a preset number of user samples and obtains first function data, second function data and third function data generated when each user sample uses a target instant messaging function every day in a preset number of days.
In the embodiment of the present invention, optionally, in consideration of regional differences, a preset number of user samples are determined in a more fair manner, that is, target province and city autonomous regions may be determined, user samples are randomly selected from each target province and city autonomous region according to a preset ratio, and the preset number of user samples are determined from the user samples in each target province and city autonomous region. For example, the recommendation system may determine 20 target provincial and municipal municipalities, randomly select 250 user samples in each target provincial and municipal municipality according to the same proportion, and determine a total of 5000 user samples from the 250 user samples in each provincial and municipal municipality. Therefore, the embodiment of the invention can adopt a multi-place sampling mode, avoid sampling errors caused by regional differences, and further effectively ensure the accuracy and reliability of the training result obtained by training by using the sampling data.
In the embodiment of the present invention, the target instant messaging function may include at least a first function, a second function, and a third function; correspondingly, the data generated when each user sample uses the first function every day in the preset days is the first function data, the data generated when each user sample uses the second function every day in the preset days is the second function data, and the data generated when each user sample uses the third function every day in the preset days is the third function data.
202. The recommendation system obtains a first preset hyper-parameter corresponding to the first functional data, a second preset hyper-parameter corresponding to the second functional data and a third preset hyper-parameter corresponding to the third functional data.
203. The recommendation system determines a one-dimensional vector according to the first functional data, the second functional data, the third functional data, the first preset hyper-parameter, the second preset hyper-parameter and the third preset hyper-parameter; the one-dimensional vector is used for reflecting the use condition that each user sample uses the target instant messaging function every day in preset days.
204. The recommendation system determines a multi-dimensional vector taking the numerical value of the preset days as the dimension according to the one-dimensional vector and the preset days; and the multi-dimensional vector is used for reflecting the use condition that each user sample uses the target instant messaging function for a preset number of days.
205. And the recommendation system determines a training set of the initial neural network model according to the multi-dimensional vectors of all the user samples.
For steps 201-205, for example, the recommendation system may obtain 5000 user samples, and obtain video call function data V generated by using the video call function for each user sample within 30 days each daytPositioning function data L generated by using the positioning functiontAnd micro chat function data W generated using the micro chat functiont(ii) a Because the requirement of each instant messaging function on the instant messaging real-time rate is different, three hyper-parameters a, beta and gamma can be introduced, the sparsity of frequency is considered, a function for reflecting the daily network activity of each user sample is finally obtained, and the function is marked as F, namely:
F=[αlog(1+Vt)+βlog(1+Lt)+γlog(1+Wt)]
as can be seen, the function F is a one-dimensional vector representing the use condition of each user sample using the instant messaging function every day within 30 days; further, the preset number of days is known as 30 days, and therefore, the multidimensional vector F having 30 days as the dimension can be obtainedvIs (F)1,F2,F3,…,F29,F30) (ii) a Wherein, the multidimensional vector is used for reflecting the use condition of each user sample using the target instant messaging function within 30 days; further, the multi-dimensional vector F can be based on all user samplesvDetermining a training set and a testing set of the initial neural network model, wherein the training set and the testing set are 4000 matrixes 1 x 30 and 000 matrixes 1 x 30 respectively; wherein, the complete data form of the training set is as follows:
Figure BDA0001863945920000101
206. the recommendation system trains the initial neural network model by using the training set to obtain a user classification model.
As an alternative embodiment, the training the initial neural network model by the recommendation system using the training set, and obtaining the user classification model may include:
inputting the training set into an initial neural network model, so that the training set sequentially passes through the superposition convolution operation of convolution layers of the initial neural network model and the pooling operation of a pooling layer to obtain a first feature vector sample;
inputting the first feature vector sample into a full connection layer of the initial neural network model to obtain a second feature vector sample;
and training the target classifier of the initial neural network model according to the second feature vector sample to obtain a user classification model.
In an embodiment of the present invention, the initial neural network model may be composed of structures of an input layer, a hidden layer, a fully-connected layer, and an output layer, each layer may be composed of a single neuron or multiple neurons, where the neurons of the initial neural network model are as follows:
f(∑ixiwi+b);
the recommendation system can input the training set into the neuron as input data of the initial neural network model, the input data of the neuron is mapped to an output end by an activation function operated on the neuron to obtain output data of the neuron, and the output data is used as input data of the neuron of the next layer; wherein, in order to better fit the actual function, a non-linear activation function may be chosen, such as the ReLu function, i.e. the activation function f is expressed as:
Figure BDA0001863945920000111
wherein, the hidden layer of the initial neural network model can be a convolutional layer and a pooling layer; sequentially carrying out superposition convolution operation on the convolution layer and pooling operation on the pooling layer on input data input into an input layer of the initial neural network model so as to realize feature fusion on the input data and obtain a first feature vector sample; further inputting the first feature vector sample into a full connection layer of the initial neural network model to obtain a global feature vector sample, namely a second feature vector sample; and finally, training the target classifier according to the second feature vector sample to obtain a user classification model. The target classifier may be a softmax function, and is defined as follows:
Figure BDA0001863945920000112
further optionally, the training set is a training set with labels, and the labels are used for labeling actual classification values of each user sample; and the actual classification value is determined according to the frequency of use of the user sample actually using the target instant messaging function. Specifically, after the user samples and the use data of the target instant messaging function corresponding to each user sample are collected, an actual classification value corresponding to each user sample can be artificially defined according to the use data, and a label containing the actual classification value is marked on the user samples and the use data corresponding to the user samples; wherein each classification value may correspond to a different user type. For example, the user type may include a high frequency usage type, a medium frequency usage type, and a low frequency usage type, wherein the high frequency usage type may correspond to a classification value of 9; a medium frequency usage pattern may correspond to a classification value of 5; a low frequency usage pattern may correspond to a classification value of 2.
Still further optionally, according to the above embodiment, the training, by the recommendation system, the target classifier of the neural network model according to the second feature vector sample, and obtaining the user classification model may include:
inputting the second feature vector sample into a target classifier of the neural network model to obtain an output classification value, and determining the output classification value as a prediction classification value; comparing the predicted classification value with the actual classification value to obtain a comparison result;
updating parameters of the initial neural network model according to the comparison result;
judging whether a loss function of the initial neural network model meets a preset condition or not; the loss function is used for reflecting the error between the output classification value and the actual classification value of the initial neural network model;
and when the loss function of the initial neural network model meets a preset condition, determining the current parameters of the initial neural network model as the parameters of the user classification model, and obtaining the user classification model according to the parameters.
In the embodiment of the invention, the second feature vector sample can be subjected to a softmax function (target classifier) to obtain probability distribution of output classification, and then compared with a standard answer (probability distribution corresponding to an actual classification value) to calculate cross entropy to obtain a loss function; the loss function may be used to represent an error condition between an output classification value and an actual classification value of the initial neural network model, that is, assuming that the output classification value (predicted classification value) is y and the actual classification value is y, the loss function loss may perform error calculation by using cross entropy, that is:
Loss(y_,y)=-Σy_*logy
it should be noted that, in the process of updating the parameters of the initial neural network model according to the comparison result, the speed of updating the parameters may be adjusted by the learning rate. Specifically, the learning rate (learning _ rate) represents the magnitude of each parameter update; the too large learning rate can cause the parameters to be optimized to fluctuate near the minimum value and not converge; too small a learning rate may result in slow convergence of the parameters to be optimized. In the training process of updating the parameters of the initial neural network model according to the comparison result, the parameters are updated in the direction of descending gradient of the loss function. Because the learning rate at the beginning is large, which is beneficial to fast iterative search of the optimal solution, and the parameters are slowly adjusted at the later stage, the exponentially decaying learning rate can be used, namely the learning rate is dynamically updated along with the change of the number of training rounds, and the learning rate calculation formula is as follows:
Figure BDA0001863945920000131
the learning rate attenuation rate is obtained by recording the current training round number, which is an untrained parameter, and the learning rate is attenuated in a ladder-type manner. Finally, through multiple rounds of iteration, loss values are reduced through a back propagation algorithm (BP), and finally a training model function, namely a user type model, is obtained.
The method for recommending an instant messaging connection strategy based on a convolutional neural network further includes steps 207-210, and for the description of the steps 207-210, please refer to the detailed description of the steps 101-104 in the first embodiment, which is not repeated in the embodiments of the present invention.
Therefore, by the method described in fig. 2, the habit of using instant messaging in the future of the user can be predicted based on the past use habit of the user for the instant messaging function and the user classification model, and an instant messaging connection strategy conforming to the use habit of the user is recommended to the wearable device according to the prediction result, so that the wearable device can perform instant messaging connection only when the user has a use requirement, and compared with the long-time uninterrupted reconnection in the prior art, the method can reduce the electric quantity loss of the device; the user types can be divided based on the requirement degree of the user on the connection real-time performance of the target instant messaging function, the daily use habit of the user is followed, the reasonable division of different user groups is realized, and the use experience of the user is improved; in addition, a multi-place sampling mode is adopted, sampling errors caused by regional differences are avoided, and accuracy and reliability of training results obtained by training by using sampling data are effectively guaranteed.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic structural diagram of an instant messaging connection policy recommendation system based on a convolutional neural network according to an embodiment of the present invention. As shown in fig. 3, the recommendation system may include:
an obtaining unit 301, configured to obtain usage data of a user for a target instant messaging function on a wearable device within a preset time period, and provide the usage data to an input unit 302.
In the embodiment of the invention, the preset time period can be five days, seven days or fifteen days; the target instant messaging function can comprise a micro chat function, a positioning function, a video call function and the like; the usage data may include a usage frequency and a usage time point, and the embodiment of the present invention is not limited.
An input unit 302, configured to input usage data into the user classification model, and trigger the determination unit 303 to start; wherein, the user classification model is a convolutional neural network model.
In the embodiment of the present invention, when the input unit 302 inputs the usage data into the user type model, the input unit may perform data preprocessing on the usage data and input the usage data after data preprocessing into the user classification model; the user classification model is a pre-trained convolutional neural network model.
A determining unit 303, configured to determine a target user type to which the user belongs based on an output result of the user classification model, and provide the target user type to the recommending unit 304.
A recommending unit 304, configured to recommend, to the wearable device, an instant communication connection policy corresponding to the target user type, where the instant communication connection policy is used to indicate a connection frequency of an instant communication connection performed by the wearable device.
In the embodiment of the present invention, the instant messaging connection policy may be used to indicate a connection time point and a connection frequency of the wearable device for instant messaging connection.
Therefore, by the recommendation system described in fig. 3, the habit of using instant messaging by the user in the future can be predicted based on the past use habit of the user for the instant messaging function and the user classification model, and an instant messaging connection strategy according with the use habit of the user is recommended to the wearable device according to the prediction result, so that the wearable device can perform instant messaging connection only when the user needs to use the wearable device, and compared with the long-time uninterrupted reconnection in the prior art, the electric quantity loss of the device can be reduced by the scheme; in addition, the user types can be divided based on the requirement degree of the user on the connection real-time performance of the target instant messaging function, the daily use habits of the user are complied with, the reasonable division of different user groups is realized, and the use experience of the user is improved.
Example four
Referring to fig. 4, fig. 4 is a schematic structural diagram of another instant messaging connection policy recommendation system based on a convolutional neural network according to an embodiment of the present invention, wherein the recommendation system shown in fig. 4 is obtained by further optimizing the recommendation system shown in fig. 4. In comparison with the recommendation system shown in fig. 3, in the recommendation system shown in fig. 4:
the determining unit 303 is further configured to determine a preset number of user samples before the input unit 302 inputs the usage data into the user classification model, and provide the user samples to the obtaining unit 301.
In the embodiment of the present invention, the target instant messaging function may include at least a first function, a second function, and a third function.
In the embodiment of the present invention, optionally, in consideration of regional differences, a preset number of user samples are determined in a more fair manner, that is, target province and city autonomous regions may be determined, user samples are randomly selected from each target province and city autonomous region according to a preset ratio, and the preset number of user samples are determined from the user samples in each target province and city autonomous region. For example, the determining unit 303 may determine 20 target provincial municipalities, randomly select 250 user samples in each target provincial municipality according to the same proportion, and determine a total of 5000 user samples from the 250 user samples in each provincial municipality. Therefore, the embodiment of the invention can adopt a multi-place sampling mode, avoid sampling errors caused by regional differences, and further effectively ensure the accuracy and reliability of the training result obtained by training by using the sampling data.
In the embodiment of the present invention, the target instant messaging function may include at least a first function, a second function, and a third function; correspondingly, the data generated when each user sample uses the first function every day in the preset days is the first function data, the data generated when each user sample uses the second function every day in the preset days is the second function data, and the data generated when each user sample uses the third function every day in the preset days is the third function data.
The obtaining unit 301 is further configured to obtain first function data, second function data, and third function data generated when each user sample uses the target instant messaging function every day in preset days, and a first preset hyper-parameter corresponding to the first function data, a second preset hyper-parameter corresponding to the second function data, and a third preset hyper-parameter corresponding to the third function data.
The determining unit 303 is further configured to determine a one-dimensional vector according to the first functional data, the second functional data, the third functional data, the first preset hyper-parameter, the second preset hyper-parameter, and the third preset hyper-parameter, and determine a multi-dimensional vector using a value of a preset number of days as a dimension according to the one-dimensional vector and a preset number of days.
The one-dimensional vector is used for reflecting the use condition of each user sample for using the target instant messaging function every day in preset days; the multidimensional vector is used for reflecting the use condition of each user sample using the target instant messaging function in preset days.
The determining unit 303 is further configured to determine a training set of the initial neural network model according to the multidimensional vectors of all the user samples, and provide the training set to the training unit 305.
A training unit 305, configured to train the initial neural network model using the training set to obtain a user classification model.
In an embodiment of the present invention, the training unit 305 may provide the user classification model to the input unit 302.
As an alternative embodiment, as shown in fig. 4, the training unit 305 may include:
the first input subunit 3051 is configured to input the training set into the neural network model, so that the training set sequentially undergoes a superposition convolution operation of convolution layers of the neural network model and a pooling operation of a pooling layer to obtain a first feature vector sample, and provide the first feature vector sample to the second input subunit 3052.
The second input subunit 3052 is configured to input the first feature vector sample to the fully-connected layer of the neural network model to obtain a second feature vector sample, and provide the second feature vector sample to the training subunit 3053.
And the training subunit 3053 is configured to train the target classifier of the neural network model according to the second feature vector sample, so as to obtain a user classification model.
As another alternative implementation, as shown in fig. 4, the training subunit 3053 trains the target classifier of the neural network model according to the second feature vector sample, and the manner of obtaining the user classification model may specifically be:
inputting the second feature vector sample into a target classifier of the neural network model to obtain an output classification value, and determining the output classification value as a prediction classification value; comparing the predicted classification value with the actual classification value to obtain a comparison result;
updating parameters of the initial neural network model according to the comparison result;
judging whether a loss function of the initial neural network model meets a preset condition or not; the loss function is used for reflecting the error between the output classification value and the actual classification value of the initial neural network model;
and when the loss function of the initial neural network model meets a preset condition, determining the current parameters of the initial neural network model as the parameters of the user classification model, and obtaining the user classification model according to the parameters.
In the embodiment of the invention, the training set is a training set with labels, and the labels are used for marking the actual classification value of each user sample; the actual classification value is determined according to the frequency of use of the user sample to actually use the target instant messaging function.
Therefore, by the recommendation system described in fig. 4, the habit of using instant messaging by the user in the future can be predicted based on the past use habit of the user for the instant messaging function and the user classification model, and an instant messaging connection strategy according with the use habit of the user is recommended to the wearable device according to the prediction result, so that the wearable device can perform instant messaging connection only when the user needs to use the wearable device, and compared with the long-time uninterrupted reconnection in the prior art, the electric quantity loss of the device can be reduced by the scheme; the user types can be divided based on the requirement degree of the user on the connection real-time performance of the target instant messaging function, the daily use habit of the user is followed, the reasonable division of different user groups is realized, and the use experience of the user is improved; in addition, a multi-place sampling mode is adopted, sampling errors caused by regional differences are avoided, and accuracy and reliability of training results obtained by training by using sampling data are effectively guaranteed.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
The method and the system for recommending the instant messaging connection strategy based on the convolutional neural network disclosed by the embodiment of the invention are introduced in detail, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An instant messaging connection strategy recommendation method based on a convolutional neural network is characterized by comprising the following steps:
acquiring use data of a user for a target instant messaging function on wearable equipment in a preset time period, wherein the use data at least comprises use frequency;
inputting the usage data into a user classification model; the user classification model is a convolutional neural network model;
determining a target user type to which a user belongs based on an output result of the user classification model, and recommending an instant messaging connection strategy corresponding to the target user type to the wearable device, wherein the instant messaging connection strategy is used for indicating the connection frequency of instant messaging connection of the wearable device;
the target instant messaging function at least comprises a first function, a second function and a third function;
before the entering the usage data into a user classification model, the method further comprises:
determining a preset number of user samples, and acquiring first function data, second function data and third function data which are generated when each user sample uses the target instant messaging function every day in a preset number of days;
acquiring a first preset hyper-parameter corresponding to the first functional data, a second preset hyper-parameter corresponding to the second functional data and a third preset hyper-parameter corresponding to the third functional data;
determining a one-dimensional vector according to the first functional data, the second functional data, the third functional data, the first preset hyper-parameter, the second preset hyper-parameter and the third preset hyper-parameter, wherein the one-dimensional vector is used for reflecting the use condition of each user sample for using the target instant messaging function every day in the preset days;
according to the one-dimensional vector and the preset days, determining a multi-dimensional vector taking the numerical value of the preset days as the dimension, wherein the multi-dimensional vector is used for reflecting the use condition of each user sample using the target instant messaging function on the preset days;
determining a training set of an initial neural network model according to the multi-dimensional vectors of all the user samples;
and training the initial neural network model by using the training set to obtain a user classification model.
2. The method of claim 1, wherein training the initial neural network model using the training set to obtain a user classification model comprises:
inputting the training set into the initial neural network model, so that the training set sequentially passes through the superposition convolution operation of the convolution layer of the initial neural network model and the pooling operation of the pooling layer to obtain a first feature vector sample;
inputting the first feature vector sample into a full-connection layer of the initial neural network model to obtain a second feature vector sample;
and training the target classifier of the initial neural network model according to the second feature vector sample to obtain a user classification model.
3. The method of claim 2, wherein the training set is a labeled training set, the label being used to label the actual classification value of each of the user samples; the actual classification value is determined according to the frequency of the user sample actually using the target instant messaging function.
4. The method of claim 3, wherein training the target classifier of the initial neural network model according to the second feature vector sample to obtain a user classification model comprises:
inputting the second feature vector sample into a target classifier of the initial neural network model to obtain an output classification value, and determining the output classification value as a prediction classification value; comparing the predicted classification value with the actual classification value to obtain a comparison result;
updating parameters of the initial neural network model according to the comparison result;
judging whether the loss function of the initial neural network model meets a preset condition or not; the loss function is used for reflecting the error between the output classification value and the actual classification value of the initial neural network model;
and when the loss function of the initial neural network model meets a preset condition, determining the current parameters of the initial neural network model as the parameters of a user classification model, and obtaining the user classification model according to the parameters.
5. An instant messaging connection strategy recommendation system based on a convolutional neural network, comprising:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring use data of a user aiming at a target instant messaging function on the wearable device in a preset time period, and the use data at least comprises use frequency;
an input unit for inputting the usage data into a user classification model; the user classification model is a convolutional neural network model;
the determining unit is used for determining the type of a target user to which the user belongs based on the output result of the user classification model;
the recommending unit is used for recommending an instant messaging connection strategy corresponding to the target user type to the wearable device, and the instant messaging connection strategy is used for indicating the connection frequency of instant messaging connection of the wearable device;
the target instant messaging function at least comprises a first function, a second function and a third function;
the determining unit is further configured to determine a preset number of user samples before the input unit inputs the usage data into the user classification model;
the obtaining unit is further configured to obtain first function data, second function data and third function data, which are generated when each user sample uses the target instant messaging function every day in preset days, and a first preset hyper-parameter corresponding to the first function data, a second preset hyper-parameter corresponding to the second function data and a third preset hyper-parameter corresponding to the third function data;
the determining unit is further configured to determine a one-dimensional vector according to the first functional data, the second functional data, the third functional data, the first preset hyper-parameter, the second preset hyper-parameter, and the third preset hyper-parameter, and determine a multi-dimensional vector using a numerical value of the preset number of days as a dimension according to the one-dimensional vector and the preset number of days; the one-dimensional vector is used for reflecting the use condition of each user sample for using the target instant messaging function every day in the preset number of days; the multi-dimensional vector is used for reflecting the use condition of each user sample using the target instant messaging function on the preset days;
the determining unit is further configured to determine a training set of an initial neural network model according to the multidimensional vectors of all the user samples;
and the training unit is used for training the initial neural network model by using the training set to obtain a user classification model.
6. The recommendation system according to claim 5, wherein said training unit comprises:
the first input subunit is used for inputting the training set into the neural network model so that the training set sequentially passes through the superposition convolution operation of convolution layers of the neural network model and the pooling operation of a pooling layer to obtain a first feature vector sample;
the second input subunit is used for inputting the first feature vector sample into a full connection layer of the neural network model to obtain a second feature vector sample;
and the training subunit is used for training the target classifier of the neural network model according to the second feature vector sample to obtain a user classification model.
7. The recommendation system according to claim 6, wherein the training set is a labeled training set, the label being used to label the actual classification value of each of the user samples; the actual classification value is determined according to the frequency of the user sample actually using the target instant messaging function.
8. The recommendation system according to claim 7, wherein the training subunit trains the target classifier of the neural network model according to the second feature vector sample, and the manner of obtaining the user classification model is specifically:
inputting the second feature vector sample into a target classifier of the neural network model to obtain an output classification value, and determining the output classification value as a prediction classification value; comparing the predicted classification value with the actual classification value to obtain a comparison result;
updating parameters of the initial neural network model according to the comparison result;
judging whether the loss function of the initial neural network model meets a preset condition or not; the loss function is used for reflecting the error between the output classification value and the actual classification value of the initial neural network model;
and when the loss function of the initial neural network model meets a preset condition, determining the current parameters of the initial neural network model as the parameters of a user classification model, and obtaining the user classification model according to the parameters.
9. A wearable device, characterized in that the wearable device comprises:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute all or part of the steps of the instant communication connection strategy recommendation method according to any one of claims 1-4.
10. A computer-readable storage medium, which stores a computer program, wherein the computer program is executed to make a computer execute all or part of the steps of the instant messaging connection policy recommendation method according to any one of claims 1 to 4.
CN201811349684.0A 2018-11-13 2018-11-13 Method and system for recommending instant messaging connection strategy based on convolutional neural network Active CN109474516B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811349684.0A CN109474516B (en) 2018-11-13 2018-11-13 Method and system for recommending instant messaging connection strategy based on convolutional neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811349684.0A CN109474516B (en) 2018-11-13 2018-11-13 Method and system for recommending instant messaging connection strategy based on convolutional neural network

Publications (2)

Publication Number Publication Date
CN109474516A CN109474516A (en) 2019-03-15
CN109474516B true CN109474516B (en) 2021-06-01

Family

ID=65672548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811349684.0A Active CN109474516B (en) 2018-11-13 2018-11-13 Method and system for recommending instant messaging connection strategy based on convolutional neural network

Country Status (1)

Country Link
CN (1) CN109474516B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113469206A (en) * 2020-03-31 2021-10-01 华为技术有限公司 Method, device, equipment and storage medium for obtaining artificial intelligence model
CN112580713A (en) * 2020-12-15 2021-03-30 广州芯德通信科技股份有限公司 Routing equipment control method and system based on pattern recognition

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100583921C (en) * 2005-10-17 2010-01-20 华为技术有限公司 Method and device for collecting user communication characteristic information
CN1968527A (en) * 2006-09-27 2007-05-23 蒋晓海 Method for intelligent connection between mobile phone client and server
US8514717B2 (en) * 2011-01-21 2013-08-20 T-Mobile Usa, Inc. Smart connection manager
CN105681157B (en) * 2014-11-20 2019-05-28 腾讯科技(深圳)有限公司 Long switching performance reminding method and device based on instant messaging
CN107368718B (en) * 2017-07-06 2022-08-16 同济大学 User browsing behavior authentication method and system
CN108513344A (en) * 2018-03-16 2018-09-07 广东小天才科技有限公司 Suspension reconnection method, device, wearable device and the medium of wearable device

Also Published As

Publication number Publication date
CN109474516A (en) 2019-03-15

Similar Documents

Publication Publication Date Title
Kreyssig et al. Neural user simulation for corpus-based policy optimisation for spoken dialogue systems
CN111090756B (en) Artificial intelligence-based multi-target recommendation model training method and device
CN111523640B (en) Training method and device for neural network model
CN111753076B (en) Dialogue method, dialogue device, electronic equipment and readable storage medium
CN111783873B (en) User portrait method and device based on increment naive Bayes model
CN110598120A (en) Behavior data based financing recommendation method, device and equipment
CN109474516B (en) Method and system for recommending instant messaging connection strategy based on convolutional neural network
CN111858898A (en) Text processing method and device based on artificial intelligence and electronic equipment
CN114550705A (en) Dialogue recommendation method, model training method, device, equipment and medium
CN110489730A (en) Text handling method, device, terminal and storage medium
CN113723115A (en) Open domain question-answer prediction method based on pre-training model and related equipment
CN114119123A (en) Information pushing method and device
CN113569017A (en) Model processing method and device, electronic equipment and storage medium
CN115600818A (en) Multi-dimensional scoring method and device, electronic equipment and storage medium
CN115017362A (en) Data processing method, electronic device and storage medium
CN113010788B (en) Information pushing method and device, electronic equipment and computer readable storage medium
CN112818084B (en) Information interaction method, related device, equipment and computer readable medium
CN114580533A (en) Method, apparatus, device, medium, and program product for training feature extraction model
CN116150324A (en) Training method, device, equipment and medium of dialogue model
CN115329183A (en) Data processing method, device, storage medium and equipment
Benáček et al. Postprocessing of Ensemble Weather Forecast Using Decision Tree–Based Probabilistic Forecasting Methods
CN116431779B (en) FAQ question-answering matching method and device in legal field, storage medium and electronic device
CN117815674B (en) Game information recommendation method and device, computer readable medium and electronic equipment
CN113722470B (en) Information prompting method, device, equipment and storage medium
CN117556149B (en) Resource pushing method, device, electronic equipment and storage medium

Legal Events

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