Summary of the invention
To overcome the problems in correlation technique, present description provides the session method of chat robots, device and
Terminal.
According to this specification embodiment in a first aspect, provide a kind of session method of chat robots, the method packet
It includes:
According to the business conduct data of user, predict whether user has the demand with chat robots session;
According to prediction result determine have with after the demand of the chat robots session, the suspension display on current page
Characterize the suspension object of chat robots.
Optionally, the business conduct data include following one or more:
Indicate that user consults data, user and the historical session data of chat robots, user couple of business page number
Characterize operation data, instruction the user data of stay time, user couple in the business page of the suspension object of chat robots
Trigger action data, the order data of user of the business page.
Optionally, the method also includes: if receiving the trigger action for the suspension object, show and chatting machine
The conversation page of device people.
Optionally, the method also includes: obtain user concern session theme message, pass through the suspension object exhibition
Show the eap-message digest of the message.
Optionally, the conversation page displaying has the message.
Optionally, the method also includes the setting times after the suspension object described in suspension display, if not receiving pair
The trigger action of the suspension object then shows the suspension object in current page revocation.
Optionally, by the way that the suspension object respective view to be added to the top layer of current page respective view, with
The suspension object of suspension display characterization chat robots on current page.
Optionally, described in suspension display when suspension object, by the shift position parameter assignment of the suspension object to shifting
Dynamic function, controls the suspension object from the Boundary Moving of the target pages to setting position using move function.
Optionally, further includes: moved in suspension object from the boundary of the target pages using the control of mobile animation function
It moves to setting position, controls the side that the suspension object dynamic is retracted into the target pages using the mobile animation function
Boundary.
Optionally, the eap-message digest that the message is shown by the suspension object, comprising:
Sub- view of the bubble pop-up box respective view as the suspension object respective view is added, the bubble bullet is utilized
Frame shows the eap-message digest out.
According to the second aspect of this specification embodiment, a kind of conversational device of chat robots, described device packet are provided
It includes:
Prediction module is used for: according to the business conduct data of user, predicting whether user has and chat robots session
Demand;
Display module is used for: according to prediction result determine have with after the demand of the chat robots session, current
The suspension object of suspension display characterization chat robots on the page.
Optionally, the business conduct data include following one or more:
Indicate that user consults the data of business page number, instruction the user data of stay time, use in the business page
Trigger action data, the order data of user of the family to the business page.
Optionally, described device further includes conversation module, is used for: if receiving the triggering behaviour for the suspension object
Make, shows the conversation page with chat robots.
Optionally, the display module is also used to: being obtained the message of the session theme of user's concern, is passed through the suspension pair
Eap-message digest as showing the message.
Optionally, the conversation page displaying has the message.
Optionally, the display module is also used to: the setting time after the suspension object described in suspension display, if not receiving
To the trigger action to the suspension object, then the suspension object is shown in current page revocation.
Optionally, the display module is specifically used for: by the way that the suspension object respective view is added to current page
The top layer of respective view, with the suspension object of the suspension display characterization chat robots on current page.
Optionally, the display module is specifically used for: described in suspension display when suspension object, by the suspension object
Shift position parameter assignment controls the suspension object using move function and moves from the boundary of the target pages to move function
It moves to setting position.
Optionally, the display module is also used to: using the control of mobile animation function in suspension object from the target
After the Boundary Moving to setting position of the page, it is retracted into using the mobile animation function control suspension object dynamic described
The boundary of target pages.
Optionally, the display module is specifically used for:
Sub- view of the bubble pop-up box respective view as the suspension object respective view is added, the bubble bullet is utilized
Frame shows the eap-message digest out.
According to the third aspect of this specification embodiment, a kind of terminal is provided, including memory, processor and be stored in
On reservoir and the computer program that can run on a processor, wherein the processor realizes aforementioned chat when executing described program
The session method of its robot.
The technical solution that the embodiment of this specification provides can include the following benefits:
In this specification embodiment, it can predict whether user has and chat machine according to the business conduct data of user
The demand of conference can worked as after determining that user has the demand with the chat robots session according to prediction result
The suspension object of suspension display characterization chat robots on the preceding page.The present embodiment can initiatively show in any page and chat
Its robot actively triggers, it is possible to reduce user's operation without user.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
This specification can be limited.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with this specification.On the contrary, they are only and such as institute
The example of the consistent device and method of some aspects be described in detail in attached claims, this specification.
It is only to be not intended to be limiting this explanation merely for for the purpose of describing particular embodiments in the term that this specification uses
Book.The "an" of used singular, " described " and "the" are also intended to packet in this specification and in the appended claims
Most forms are included, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein is
Refer to and includes that one or more associated any or all of project listed may combine.
It will be appreciated that though various information may be described using term first, second, third, etc. in this specification, but
These information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not taking off
In the case where this specification range, the first information can also be referred to as the second information, and similarly, the second information can also be claimed
For the first information.Depending on context, word as used in this " if " can be construed to " ... when " or
" when ... " or " in response to determination ".
As shown in Figure 1, Fig. 1 is a kind of this specification session side of chat robots shown according to an exemplary embodiment
The flow chart of method, comprising the following steps:
In step 102, according to the business conduct data of user, predict whether user has the need with chat robots session
It asks.
After step 104, according to the determining demand having with the chat robots session of prediction result, in current page
The suspension object of upper suspension display characterization chat robots.
The scheme of this specification embodiment can be applied to it is a variety of need to provide the scene of chat robots, specifically can be industry
In the product that business side provides services to the user, such as webpage or APP (Application, application program) etc..In order to enable users to
It is enough to use chat robots more conveniently, the number of operations that user searches chat robots entrance is reduced, the present embodiment passes through
The effect that chat robots are shown initiatively, in any page may be implemented in the demand for predicting user and chat robots session
Fruit.Optionally, the present embodiment can be pre-configured with a variety of prediction rules, and business conduct data can refer to that user is using business
Any data in the product just provided can be current business conduct data, be also possible to history service data etc., specifically
Business conduct data can be there are many implementation.
As an example, if user often logs in the webpage or APP provided using business side, the industry that user provides business side
Business is familiar with, it is therefore desirable to which a possibility that using chat robots is relatively low.Conversely, if the less use of user, user
Weaker to the familiarity of business, then user is possible to and chat robots session.Based on this, the available instruction of the present embodiment
User consults the data of business page number as business conduct data, and consult business page number with user is to determine user
The no demand having with chat robots session.
In other examples, the historical session data of available user and chat robots are to predict active user
No needs conversate with chat robots, for example, historical session data instruction user be frequently necessary to chat robots session,
Then the desirability of user may be higher.In other examples, it can also be the suspension according to user to characterization chat robots
The operation data of object to predict the demand of user, such as after flex suspension object the frequent trigger action of user enters session page
Face, then the desirability of user may be higher;If the less triggering of user enters conversation page after flex suspension object, user's
Desirability may be lower.
In other examples, the data that instruction user's stay time in the business page can also be obtained, for example, for one
A little business pages, it may be possible to cause user's residence time in the business page longer since user does not know business tine,
Therefore user may be larger to the desirability of chat robots.Optionally, it can also be the touching according to user to the business page
Hair operation data is predicted, such as in some scenes, user is possible to because of unclear to business tine and in service page
Slided up and down repeatedly in face or be repeatedly input or delete etc. operation, therefore user may to chat robots have meeting
Words demand.
In other examples, it can also be and predicted using the order data of user, by taking online shopping scene as an example, there are many
Situation can determine that user has session demand, for example, user may be it should be understood that payment in the case where order pays and fails
The reason of failure;In successful situation of receiving, user may be it should be understood that goods return and replacement process etc..
Optionally, practical application can be combined with the session demand of above-mentioned one or more embodiment integrated forecasting users,
In some instances, there can also be prediction model using business conduct data of user etc. are trained in advance, use the product by the user
When predict user demand.In addition to above-mentioned example, other a variety of realizations can also be had according to specific business scenario in practical application
Mode, the present embodiment are not construed as limiting this.
After being determined according to prediction result and having demand with the chat robots session, this specification embodiment can be with
The suspension object of suspension display characterization chat robots in current page.Utilize the scheme of this specification embodiment, chatting machine
Appearance opportunity of the suspension object of device people not with the suspension object of chat robots in the page varies with each individual, and same user
When using product in varied situations, the opportunity occurred also not necessarily, can achieve the effect that occur automatically when user needs,
There can also be interference, the reduction reduced when user does not need chat robots to user equivalent to the occupancy of the page
Fruit.
Optionally, the suspension object of the present embodiment can suspension display on current page, suspension display can refer to that this is outstanding
Floating object is in the top layer of the page, which will not be covered by the content in the page, the position that suspension object is shown
It sets, it can be according to the content of corresponding position in the setting cover page of transparency.Optionally, suspension object can be a suspended window,
Suspension ball or suspension icon etc..Wherein, suspension object can characterize chat robots, user's clearly suspension object can be cut
Shift to the conversation page with chat robots.Wherein, for how utilize suspension object characterization chat robots implementation,
It can be customized image etc., flexibly configurable in practical application.Optionally, the present embodiment can also realize that detection user is
The no function that trigger action is carried out to suspension object, to obtain user to the trigger action of suspension object.Detecting that user holds
After row is to the trigger action of suspension object, the conversation page with chat robots can be provided.Wherein, the present embodiment does not limit and works as
Whether the preceding page and conversation page belong to the same page, and the conversation page of the displaying and chat robots can be from current page
A new page is switched to, is also possible to realize other various ways such as popup web page on the basis of target pages.
Optionally, the present embodiment can also cancel display suspension object as needed, such as be removed according to some setting conditions
Pin, by way of example, the setting time after the suspension object described in suspension display, if not receiving the triggering to the suspension object
Operation, show user may not be needed with chat robots session, therefore can the current page cancel show it is described outstanding
Floating object, to reduce the interference to user.Alternatively, being also possible to provide revocation display function, by receiving user's triggering
After cancelling display operation, the revocation display suspension object on current page.Optionally, implementation can there are many, such as will
The display properties of suspension object is updated to hidden state, such as adjustment transparency is 100% etc.;Either cancel the suspension object
Respective view.
In the present embodiment, since user has the demand with chat robots session, illustrate that user is likely to require chat
Certain problems are seeked advice from the help of robot.Optionally, the present embodiment can also further obtain the session theme of user's concern
Message, to show that certain user pays close attention to message in advance using suspension object, such as suspension object can show that the message of message is plucked
It wants, to make user that can directly find related content on current page.Optionally, the present embodiment can pass through a variety of sides
Formula determines the session theme of user's concern, by way of example, the current page that APP is shown in practical application may be with certain business
It is associated, such as the page of fund purchase function, the page for providing goods return and replacement function are provided etc., if user, which triggers, consults such page
Face, user are possible to more pay close attention to the associated business of the page, might have the demand of consulting relevant issues, the present embodiment can
To determine the session theme of one or more user's concerns previously according to the associated business tine of current page, and further obtain
The message of session theme.Wherein, the message acquisition modes of session theme can according to need flexible configuration, such as can be from
The message of required session theme is obtained in configured message library;Obtaining for the message of session theme is either initiated to server-side
After taking request, the message that server-side returns is received.
In other examples, it may show there is multinomial business tine in the page, user may trigger some of them business
For content to execute operation, it is that user is of interest, therefore can be based on that these, which have greater probability by the business tine that user triggers,
User determines session theme to the trigger action of business tine shown in the target pages, and further obtains session theme
Message.Optionally, user can be detected by the target pages to the trigger action of the business tine, by the industry of triggering
The business associated session theme of content is determined as the session theme of user's concern.
In other examples, some products may be provided with subscription function, and user can subscribe to the business interested to it
Theme, therefore the business-subject that user can also be subscribed in advance is determined as the session theme of user's concern, further to obtain
The message of session theme.Optionally, the message acquisition modes of session theme can according to need flexible configuration, such as the industry of subscription
The message of business theme is issued by server-side, then after the acquisition request that can be the message for initiating session theme to server-side, is received
The message that server-side returns;Either determine whether the message user for the session theme that current service end issues has consulted
Deng.
After getting the message of session theme of user's concern, the message can be shown by the suspension object
Eap-message digest.The present embodiment by predict user may it should be understood that message, and touch up to user, if user pays close attention to really
The message shown, user can tentatively understand related content by eap-message digest.Where it is possible to message content itself compared with
It is more, therefore the interference to target pages can be reduced using the exhibition method of eap-message digest.Optionally, eap-message digest, which can be, disappears
The main title of breath, message a variety of implementations, flexible configuration as needed, the present embodiment such as preceding N section do not limit this.
If user pays close attention to the session theme, user may need to consult the detailed content of message, optionally, have in displaying and disappear
In the case where breath abstract, if user triggers the suspension object, then it represents that user needs to further appreciate that this message, therefore shows
When with the conversation pages of chat robots, this message can be further shown in the conversation page, for user's access.It can
Choosing, can also further show with other more relevant informations of this message, can according to need flexibly in practical application
Configuration.
In the present embodiment, while user consults current page, the session theme of user's concern can be obtained, and utilize outstanding
Floating Object Push and the associated eap-message digest of session theme, so that user consults eap-message digest, if user needs to consult, also
Suspension object can be triggered, to switch to the conversation page with intelligent robot, displaying has associated with the session theme
Details.
Optionally, in order to improve interaction effect, the displaying of the suspension object of the present embodiment can be realized using animation form,
Chat robots are preferably communicated to user by animation mode when target pages are shown.As an example, current page
There is no flex suspension object at the beginning, after predicting the demand of user, intuitively shows that chat robots exist in order to more
State, the present embodiment can control setting position of the suspension object from the Boundary Moving of the page into the page from scratch in the page
It sets.It optionally, can be by the shift position parameter assignment of the suspension object to movement described in suspension display when suspension object
Animation function controls the suspension object from the Boundary Moving of the target pages to setting position using mobile animation function.
In practical application, the flexible configuration setting position can according to need, shift position parameter can be suspension object in the page
Coordinate information.
Wherein, suspension object may occupy a part of position of the page, in order to reduce the interference to user, utilize shifting
Dynamic animation function control after the Boundary Moving to setting position of the target pages, utilizes the mobile animation in suspension object
Function controls the suspension object dynamic and is retracted into the boundary of the target pages, by the above-mentioned means, being in suspension object
The boundary of the page prevents the excessive interference to user.The above process is illustrated in Fig. 2A, is current page respectively from left to right
Face, suspension object occur being moved to setting position and are retracted into the schematic diagram of page boundary from boundary.Suspension object specifically may be used
To be a robot icon in Fig. 2A, for characterizing chat robots;In the page that user enters purchase fund using APP,
According to user the page business conduct data, it is predicted that user may need with chat robots session to seek advice from fund
Relevant information, chat robots occur since the lower right field of the page in Fig. 2A, and side of turning left is moved to setting position, can
Choosing, the effect that suspension object is also added in Fig. 2A is shown, can be " Na of paying one's respects " text in Fig. 2A, specifically with to user
Conveying the suspension object is the entrance of chat robots " Anna ";After suspension object is moved to setting position, suspension object is again
It bounces back at page boundary.
Next Fig. 2 B and Fig. 2 C is combined to further illustrate, by taking the present embodiment method is applied to APP as an example.Optionally, APP
In generally included multiple pages, different user is different to the session demand of chat robots, during user uses APP,
The APP of the present embodiment neatly shows the suspension object of characterization chat robots according to user demand.Optionally, the industry of user
Business behavioral data may include history service behavioral data, can also include the data collected when APP be currently used by a user.Its
In, whether prediction user has to can be with the demand of chat robots session and is executed by APP and obtained prediction result, can also be with
It is that prediction result is pushed to APP after server-side executes.
Wherein, in order to realize in any page, suspension display suspension object in case of need, optionally, with iOS
For end, the black magic principle of runtime can use, hook lives frame and opens target pages and close the thing of target pages
Part obtains the keyWindow of APP frame, the view view for the object that suspends is passed through while opening target pages
The mode of addSubview is added to the upper surface of current page viewController.view.Wherein, prediction process can be by
APP is executed, then APP can store prediction rule, also, the prediction rule can also be pushed by configService, can
To realize real-time update.
Mobile animation processing can be executed when suspended window occurs in the present embodiment, can specifically call mobile animation letter
Number is realized, for example, center (x, the y) parameter assignment of suspended window is given to mobile animation function, since expectation suspension object is
It is moved to x=x2 from x=x1, shift position parameter " from x=x1 to x=x2 " mobile animation function can also be assigned to, made
Obtaining move function can control the movement of suspension object.Page boundary can be bounced back to after suspension object is moved to x=x2, i.e.,
Reversed displacement animation is done, i.e., is done from x=x2 to x=x1 instead using the center (x, y) of mobile animation function control suspended window
To displacement animation.
In the present embodiment, by taking touch screen as an example, suspension object can be moved with the movement of user's trigger action, until touching
Hair operates off screen, and suspended window stops movement.In order to reduce the interference to user, finally suspension object can rest on the page
It is adsorbed at right margin in boundary, such as Fig. 2A.Being adsorbed on the implementation at right margin can be suspension object center point
The maxX () of (x, y) is less than or equal to the width of screen, and the minX () of central point is more than or equal to screen width and subtracts suspended window half
Width, the up-and-down boundary of suspended window can arbitrarily slide in screen Y direction, i.e. the maxY () of central point (x, y) is less than
Equal to the height of screen, minY () is more than or equal to the height of navigation bar.
If getting message, suspension object can show eap-message digest, as shown in Figure 2 B, optionally, can execute and stuck out one's tongue
Head animation, that is, generate a bubble pop-up box, show eap-message digest in the bubble pop-up box.Optionally, it can be bubble bullet
Sub- view view1 of the frame respective view as suspension object view out, which can be (x, y), from
X=x3 at the left margin of suspension object does scaling animation to x=x4, and the scale factor of scaling, which can according to need, flexibly matches
It sets, such as α=10 indicates that bubble pop-up box can amplify 10 times;It optionally, can also be using contracting after eap-message digest is shown
It puts dynamic to retract bubble pop-up box, the center (x, y) of bubble pop-up box can configure and do from x=x4 to x=x3 reversely
Scaling animation, scale factor=0.1.
Optionally, message have it is a plurality of in the case where, can according to need using carousel animated show multiple messages make a summary;Example
Such as, needing to show n message, t=5 at t seconds, multiple bubble pop-up box views can be generated using carousel animation function in n > 1,
And each bubble pop-up box view is controlled using carousel animation function and is spaced mobile play according to setting.After finishing playing, gas
Bubble pop-up box can bounce back to cancel and show.
In order to realize the prompt of message, as shown in Figure 2 C, the present embodiment can also add logo badge respective view conduct
The sub- view of the suspension object respective view on i.e. badgeId to a sub- view of binding message, therefore gets message
Afterwards, the sub- view of the badge can be highlighted with red dot, to realize the prompt to message.
If user clicks suspended window, the page with chat robots session can be entered to, which can open up
It is shown with the detailed content of message;If user exits the conversation page, logo badge view revocation, so that it is highlighted to cancel red dot.
Corresponding with the embodiment of the session method of aforementioned chat robots, this specification additionally provides chat robots
The embodiment of conversational device and its applied terminal.
The embodiment of the conversational device of this specification chat robots can be such as smart phone, a using at the terminal
People's computer etc..Installation practice can also be realized by software realization by way of hardware or software and hardware combining.
Taking software implementation as an example, as the device on a logical meaning, being will be non-volatile by the processor of file process where it
Property memory in corresponding computer program instructions be read into memory operation formed.For hardware view, such as Fig. 3 institute
Show, is a kind of hardware structure diagram of computer equipment where the conversational device of this specification chat robots, in addition to shown in Fig. 3
Except processor 310, memory 330, network interface 320 and nonvolatile memory 340, in embodiment where device 331
Terminal device can also include other hardware, repeat no more to this generally according to the actual functional capability of the computer equipment.
As shown in figure 4, Fig. 4 is a kind of this specification session dress of chat robots shown according to an exemplary embodiment
The block diagram set, described device include:
Prediction module 41, is used for: according to the business conduct data of user, predicting whether user has and chat robots meeting
The demand of words;
Display module 42, is used for: determining have with after the demand of the chat robots session according to prediction result, is working as
The suspension object of suspension display characterization chat robots on the preceding page.
Optionally, the business conduct data include following one or more:
Indicate that user consults the data of business page number, instruction the user data of stay time, use in the business page
Trigger action data, the order data of user of the family to the business page.
Optionally, described device further includes conversation module, is used for: if receiving the triggering behaviour for the suspension object
Make, shows the conversation page with chat robots.
Optionally, the display module is also used to: being obtained the message of the session theme of user's concern, is passed through the suspension pair
Eap-message digest as showing the message.
Optionally, the conversation page displaying has the message.
Optionally, the display module is also used to: the setting time after the suspension object described in suspension display, if not receiving
To the trigger action to the suspension object, then the suspension object is shown in current page revocation.
Optionally, the display module is specifically used for: by the way that the suspension object respective view is added to current page
The top layer of respective view, with the suspension object of the suspension display characterization chat robots on current page.
Optionally, the display module is specifically used for: described in suspension display when suspension object, by the suspension object
Shift position parameter assignment controls the suspension object using move function and moves from the boundary of the target pages to move function
It moves to setting position.
Optionally, the display module is also used to: using the control of mobile animation function in suspension object from the target
After the Boundary Moving to setting position of the page, it is retracted into using the mobile animation function control suspension object dynamic described
The boundary of target pages.
Optionally, the display module is specifically used for:
Sub- view of the bubble pop-up box respective view as the suspension object respective view is added, the bubble bullet is utilized
Frame shows the eap-message digest out.
Correspondingly, this specification also provides a kind of terminal, including memory, processor and storage are on a memory and can be
The computer program run on processor, wherein the processor realizes the meeting of aforementioned chat robots when executing described program
Words method.
The function of modules and the realization process of effect are specifically detailed in above-mentioned in the conversational device of above-mentioned chat robots
The realization process of step is corresponded in the session method of chat robots, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The module of explanation may or may not be physically separated, and the component shown as module can be or can also be with
It is not physical module, it can it is in one place, or may be distributed on multiple network modules.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not
In the case where making the creative labor, it can understand and implement.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
Those skilled in the art will readily occur to this specification after considering specification and practicing the invention applied here
Other embodiments.This specification is intended to cover any variations, uses, or adaptations of this specification, these modifications,
Purposes or adaptive change follow the general principle of this specification and do not apply in the art including this specification
Common knowledge or conventional techniques.The description and examples are only to be considered as illustrative, the true scope of this specification and
Spirit is indicated by the following claims.
It should be understood that this specification is not limited to the precise structure that has been described above and shown in the drawings,
And various modifications and changes may be made without departing from the scope thereof.The range of this specification is only limited by the attached claims
System.
The foregoing is merely the preferred embodiments of this specification, all in this explanation not to limit this specification
Within the spirit and principle of book, any modification, equivalent substitution, improvement and etc. done should be included in the model of this specification protection
Within enclosing.