WO2022012234A1 - Associated recommendation method, smart device and service device - Google Patents
Associated recommendation method, smart device and service device Download PDFInfo
- Publication number
- WO2022012234A1 WO2022012234A1 PCT/CN2021/099448 CN2021099448W WO2022012234A1 WO 2022012234 A1 WO2022012234 A1 WO 2022012234A1 CN 2021099448 W CN2021099448 W CN 2021099448W WO 2022012234 A1 WO2022012234 A1 WO 2022012234A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- entity
- sentence
- target
- service device
- recommended
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
Definitions
- the present application relates to the technical field of smart devices, and in particular, to a method for association recommendation, a smart device and a service device.
- the recommendation system can perform associated recommendation on the information queried by the user, so as to provide the user with relevant information of the queried information.
- Relevant recommendation has many advantages. For example, in this era of information overload, in the face of massive data, it is difficult for users to query all the information that may be of interest one by one. Help users to quickly find more information that may be of interest; for another example, when a user queries for some information, such as querying a specified person, if the specified person is not found, it is recommended to recommend related people of the specified person rather than simply returning "query failure". The result is a better user experience.
- Embodiments of the present application provide an association recommendation method, an intelligent device, and a service device, which are used for association recommendation according to a query sentence.
- an intelligent device including: an input interface and a controller;
- the above controller is configured to:
- a service device including:
- the receiving module is used to receive the current query statement from the smart device
- the association recommendation module is used to find the associated entity corresponding to the target entity in the established knowledge graph, the knowledge graph is used to represent the semantic relationship between the entities, and the target entity is the entity determined according to the current query sentence.
- a method for association recommendation is provided, applied to a smart device, including:
- the above-mentioned knowledge graph is used to represent the semantic relationship between entities, and the above-mentioned target entity is based on The entity identified by the above query statement;
- an association recommendation method is provided, applied to a service device, including:
- the associated entity corresponding to the target entity is searched in the established knowledge graph, the above knowledge graph is used to represent the semantic relationship between entities, and the above target entity is the entity determined according to the above current query sentence.
- a service device including: an input interface and a processor
- the processor is configured to:
- the query statement When a query statement is received through the input interface, the query statement is input into the configured question answering system to obtain a reply statement corresponding to the query statement;
- a recommended sentence is generated according to the corresponding relationship between attributes and attribute values configured by the answer entity; the recommended sentence includes a preset number of N attributes and corresponding attribute values, where N is greater than or equal to 1.
- a sixth aspect provides an information recommendation method, including:
- a recommended sentence is generated according to the corresponding relationship between attributes and attribute values configured by the answer entity; the recommended sentence includes a preset number of N attributes and corresponding attribute values, where N is greater than or equal to 1.
- FIG. 1 exemplarily shows a schematic diagram of an operation scene between a display device and a control apparatus according to some embodiments
- FIG. 2 exemplarily shows a hardware configuration block diagram of a display device 200 according to some embodiments
- FIG. 3 exemplarily shows a hardware configuration block diagram of the control device 100 according to some embodiments
- FIG. 4 exemplarily shows a schematic diagram of a network architecture provided by an embodiment of the present application
- FIG. 5 exemplarily shows a flowchart of the association recommendation method provided by the embodiment of the present application
- 6A-6G exemplarily show the schematic diagrams of the display screen when the associated entity is output
- FIG. 7 exemplarily shows a flowchart of an association recommendation method applied to a service device
- FIG. 8 illustrates a schematic diagram of a knowledge graph according to some embodiments.
- FIG. 9 exemplarily shows a flowchart of an information recommendation method according to some embodiments.
- FIG. 10 exemplarily shows a schematic diagram of a GUI provided by a service device when displaying a recommendation sentence according to some embodiments
- FIG. 11 exemplarily shows a flow chart of the implementation of step 103 according to some embodiments.
- FIG. 12 exemplarily shows a flowchart of the implementation of step 333 according to some embodiments.
- module refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware or/and software code capable of performing the functions associated with that element.
- FIG. 1 is a schematic diagram of an operation scenario between a display device and a control apparatus according to an embodiment. As shown in FIG. 1 , the user can operate the display device 200 through the smart terminal 300 or the control device 100 .
- the control apparatus 100 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-distance communication methods, and the display device 200 is controlled wirelessly or wiredly.
- the user can control the display device 200 by inputting user instructions through keys on the remote control, voice input, control panel input, and the like.
- a smart terminal 300 eg, a mobile terminal, a tablet computer, a computer, a notebook computer, etc.
- the display device 200 is controlled using an application running on the smart device.
- the display device 200 may also be controlled in a manner other than the control apparatus 100 and the smart device 300.
- the module for acquiring voice commands configured inside the display device 200 may directly receive the user's voice command for control.
- the user's voice command control can also be received through a voice control device provided outside the display device 200 device.
- the display device 200 is also in data communication with the server 400 .
- the display device 200 may be allowed to communicate via local area network (LAN), wireless local area network (WLAN), and other networks.
- the server 400 may provide various contents and interactions to the display device 200 .
- FIG. 2 exemplarily shows a configuration block diagram of the control apparatus 100 according to an exemplary embodiment.
- the control device 100 includes a controller 110 , a communication interface 130 , a user input/output interface 140 , a memory, and a power supply.
- the control device 100 can receive the user's input operation instruction, and convert the operation instruction into an instruction that the display device 200 can recognize and respond to, and play an intermediary role between the user and the display device 200 .
- FIG. 3 is a block diagram showing a hardware configuration of the display apparatus 200 according to an exemplary embodiment.
- Display apparatus 200 includes at least some of tuner 210, communicator 220, detector 230, external device interface 240, controller 250, display 275, audio output interface 285, memory, power supply, and user interface.
- the display 275 includes a display screen component for presenting pictures, and a driving component for driving image display, for receiving image signals output from the controller, components for displaying video content, image content, and menu manipulation interfaces, and user manipulation UI interfaces .
- the display 275 can be a liquid crystal display, an OLED display, and a projection display, as well as some projection devices and projection screens.
- the communicator 220 is a component for communicating with external devices or servers according to various communication protocol types.
- the communicator may include a Wifi module, a Bluetooth module, a wired Ethernet module and other network communication protocol chips or near field communication protocol chips, and at least some of the infrared receivers.
- the display device 200 may establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220 .
- the user interface can be used to receive control signals from the control device 100 (eg, an infrared remote control, etc.).
- control device 100 eg, an infrared remote control, etc.
- the detector 230 is used to collect external environment or external interaction signals.
- the detector 230 includes a light receiver, a sensor for collecting ambient light intensity; alternatively, the detector 230 includes an image collector, such as a camera, which can be used to collect external environmental scenes, user attributes or user interaction gestures, or , the detector 230 includes a sound collector, such as a microphone, for receiving external sound.
- the external device interface 240 may include but is not limited to the following: any one of a high-definition multimedia interface interface (HDMI), an analog or data high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. or multiple interfaces. It may also be a composite input/output interface formed by a plurality of the above-mentioned interfaces.
- HDMI high-definition multimedia interface interface
- component analog or data high-definition component input interface
- CVBS composite video input interface
- USB USB input interface
- RGB port etc.
- It may also be a composite input/output interface formed by a plurality of the above-mentioned interfaces.
- the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
- the controller 250 controls the operation of the display device and responds to the user's operation through various software control programs stored in the memory.
- the controller 250 controls the overall operation of the display apparatus 200 . For example, in response to receiving a user command for selecting a UI object to be displayed on the display 275, the controller 250 may perform an operation related to the object selected by the user command.
- Objects can be any of the optional objects, such as hyperlinks, icons, or other actionable controls.
- the operations related to the selected object include: displaying operations connected to hyperlinked pages, documents, images, etc., or executing operations of programs corresponding to the icons.
- the user may input user commands on a graphical user interface (GUI) displayed on the display 275, and the user input interface receives the user input commands through the graphical user interface (GUI).
- GUI graphical user interface
- the user may input a user command by inputting a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.
- GUI Graphical User Interface
- a system may include a kernel (Kernel), a command parser (shell), a file system, and applications.
- the kernel, shell, and file system make up the basic operating system structures that allow users to manage files, run programs, and use the system.
- the kernel starts, activates the kernel space, abstracts hardware, initializes hardware parameters, etc., runs and maintains virtual memory, scheduler, signals and inter-process communication (IPC).
- IPC inter-process communication
- the shell and user applications are loaded. An application is compiled into machine code after startup, forming a process.
- the embodiment of the present application provides an association recommendation method, which can determine the corresponding target entity according to the knowledge graph when it is determined that the target entity needs to be associated recommendation according to the query entered by the user. , and output the associated entity.
- the associated entity may include the answer entity.
- Knowledge graph Also known as scientific knowledge graph, it uses visualization technology to describe knowledge resources and their carriers, and mines, analyzes, constructs, draws and displays knowledge and their interconnections.
- a knowledge graph is essentially a semantic network that can represent semantic relationships between entities.
- entities are used as vertices or nodes, and relationships are used as edges.
- the knowledge graph can be constructed in various ways, and the embodiment of the present application does not focus on how to construct the knowledge graph, so it will not be described in detail.
- Entity In the knowledge graph, a node is called an entity, and an entity can be replaced by things that exist objectively and can be distinguished from each other, such as specific people, things, things, institutions, abstract concepts, etc.
- FIG. 4 is a schematic diagram of a network architecture provided by an embodiment of the present application.
- the smart device is used to receive the input information and output the processing result of the information;
- the speech recognition service device is an electronic device deployed with a speech recognition service
- the semantic service device is an electronic device deployed with a semantic service
- the business service device Electronic devices deployed with business services.
- one or more services can be integrated into the same electronic device.
- speech recognition services and semantic services can be integrated on one electronic device, and semantic services and business services can also be integrated on one electronic device. Services and business services are integrated on electronic devices.
- the number of electronic devices is not limited here, as long as the corresponding functions can be accomplished.
- the electronic device here may include a server, a computer, etc.
- the speech recognition service, the semantic service (also referred to as a semantic engine) and the business service are web services that can be deployed on the electronic device, wherein the speech recognition service is used to convert audio Recognized as text, the semantic service is used to semantically parse the text, and the business service is used to provide specific services such as weather query service, music query service, etc.
- the speech recognition service is used to convert audio Recognized as text
- the semantic service is used to semantically parse the text
- the business service is used to provide specific services such as weather query service, music query service, etc.
- the following describes the process of processing the information input to the display device based on the architecture shown in FIG. 4 as an example. Taking the information input to the display device as a query sentence input by voice as an example, the above process may include the following three stages:
- the smart device After receiving the query sentence input by voice, the smart device can upload the audio of the query sentence to the voice recognition service device, so that the voice recognition service device can recognize the audio as text through the voice recognition service and return it to the display device.
- the smart device may perform denoising processing on the audio of the query sentence, where the denoising processing may include steps such as removing echoes and ambient noise.
- the display device uploads the text of the query sentence recognized by the speech recognition service to the semantic service device, so that the semantic service device performs semantic analysis on the text through the semantic service to obtain the business field and intent of the text.
- the semantic service device sends a query instruction to the corresponding business service device to obtain the query result given by the business service.
- the display device can obtain the query result from the semantic service device and output it.
- the semantic service device may also send the semantic parsing result of the query statement to the display device, so that the display device outputs the feedback statement in the semantic parsing result.
- FIG. 4 is only an example, and does not limit the protection scope of the present application. In the embodiments of the present application, other architectures may also be used to implement similar functions, which will not be repeated here.
- association recommendation method provided by the embodiment of the present application is described below.
- the method can be applied to smart devices such as display devices, smart TVs, smart speakers, smart phones, and the like.
- smart devices such as display devices, smart TVs, smart speakers, smart phones, and the like.
- the description is mainly based on the application of the association recommendation method to a display device in a smart device as an example.
- the specific implementation of the association recommendation method applied to other smart devices is similar to that of the display device, and the following description will not be described one by one. .
- association recommendation method provided by the embodiment of the present application is described below with reference to FIG. 5 :
- FIG. 5 exemplarily shows a flowchart of the association recommendation method provided by the embodiment of the present application.
- the process may include the following steps:
- Step S01 sending the received query statement to the service device, so that the service device searches the established knowledge graph for an associated entity corresponding to a target entity, where the target entity is an entity determined according to the query statement.
- the above query statement may include: a query statement input through voice, a query statement input through a control device, and the like.
- the user can obtain the required information by entering a query statement into the smart device.
- the query statement can include various contents, for example, it can be a single entity name, such as "actor A", “movie B", etc.; another example, it can be a Sentences, such as "who is the star of movie B"; another example, can be words without actual meaning, such as "that", "I think”; and so on.
- the above query statement is a query statement input through an input interface.
- the service device in this step S01 is deployed with at least a semantic service.
- the display device may invoke a voice recognition service, and send the query sentence inputted by voice to the service device after recognizing it as text.
- step S01 how the service device specifically determines the target entity according to the query statement and how to search for the associated entity corresponding to the target entity is described below with an example, and will not be repeated here.
- Step S02 the above-mentioned associated entity is acquired from the service device and output.
- the search for the associated entity from the target entity is to broaden the recommended resources related to the user's voice input command.
- the service device will return the recommended resources related to A to the terminal device, and these recommended resources are all related to A.
- the service device also returns another entity B associated with A, which can also be selected by the user.
- the service device will also deliver B-related recommended resources to the terminal device.
- the service device can also deliver another entity C and D associated with entity B. In this way, although the user only inputs entity A once, the terminal device can present recommended resources of entity B, entity C, and entity D other than entity A, which enriches the diversity of recommended resources.
- the display device outputting the associated entity may include: outputting the associated entity through a voice, displaying the associated entity through a display, and the like.
- the display device outputting the associated entity may include: outputting the associated entity through a voice, displaying the associated entity through a display, and the like.
- the display device can send the received query statement to the service device, so as to obtain and output the associated entity found by the service device according to the query statement.
- a relatively comprehensive association recommendation can be implemented for the query sentence input to the display device.
- Figures 6A-6G exemplarily show schematic diagrams of the display screen when the associated entity is output. The following describes how the display device outputs the associated entity in the above step S02 with reference to Figures 6A-6G:
- the service device returns the associated entity in the form of entity information.
- the displaying device outputting the associated entity may include: displaying the entity information of the associated entity through a display.
- entity information may include: entity name, entity-related pictures, and the like.
- the entity-related pictures here, for example, when the entity is a person, the entity-related picture can be a person's avatar, a recent photo of the person, etc.; when the entity is a film and television, the entity-related picture can be a film and television cover, etc.; when the entity is a game, the entity-related pictures The image can be a game icon; etc.
- Each entity corresponds to a recommended resource entry, and the entity can be selected.
- the entry into the resource is triggered, and the user's selection is sent to the service device, and the service device returns the corresponding recommendation according to the selected entity. resource.
- FIG. 6A exemplarily shows a schematic diagram of a GUI provided by the display device when outputting the associated entity.
- the display device may provide a GUI 600 to the display, the GUI 600 includes an associated entity display area 61 for displaying associated entities, and the display area includes items 611-618, which correspond to associated entities 1-8, respectively. Items 611-618 may be specifically displayed as names and/or related pictures of associated entities.
- the entity information of the associated entity obtained from the service device may include a business domain to which the associated entity belongs, and the business domain here may also be referred to as an entity category, such as characters, movies, music, and so on.
- the display device may display associated entities of different business fields in different areas according to the business fields to which the associated entities belong. As shown in FIG. 6B , the associated entity display area is further divided into two areas, where associated entities belonging to characters and associated entities belonging to movies are arranged respectively, wherein entities 1-4 belong to characters, and entities 5-8 belong to movies.
- the display device may use at least one associated entity among the associated entities acquired from the service device as a focused associated entity to display. Compared with other associated entities, the display device can display more entity information, occupy more display area for display, and so on, for the highlighted associated entities. As shown in FIG. 6C , entity 1 is an associated entity that is highlighted. As an embodiment, the first associated entity among the associated entities returned by the service device may be used as the highlighted associated entity.
- the displaying device outputting the associated entity may include: outputting entity information of the associated entity through voice.
- the display device may generate the text to be outputted by voice according to a preset text template and entity information of the associated entity, and output the text by voice. Taking the text template as "recommend [entity name] for you" and the entity name of the associated entity as "person A", the text to be outputted by voice generated according to the text template and the entity name of the associated entity is "recommended for you" Person A".
- the display device may acquire and output the text to be outputted by voice from the service device.
- the display device voice outputs the associated entity the text corresponding to the voice output may be displayed on the display.
- outputting the associated entity by the display device may include: outputting the associated entity through a voice and displaying the associated entity through a display, which will be described below with reference to FIGS. 6D-6E as examples.
- the associated entity output through the voice may be one of the associated entities displayed on the display.
- the GUI 600 provided by the display device to the display further includes a voice text display area 62 for displaying the text corresponding to the voice output.
- the text displayed in the voice text display area 62 is the text corresponding to the voice output entity 1
- the entity 1 is an associated entity that is highlighted in the associated entity display area 61 .
- the related entities output through voice may be at least two related entities among the related entities displayed on the display.
- the text displayed in the voice text display area 62 is the text corresponding to the voice output entities 1 - 4
- the entities 1 - 4 are a plurality of related entities displayed in the related entity display area 61 .
- the display device when the display device acquires the associated entity from the service device, it also acquires the target entity corresponding to the associated entity.
- the display device may output the target entity by voice, and display the target entity and the associated entity through the display.
- the GUI 600 provided by the display device to the display further includes a target entity display area 63 for displaying the target entity.
- the target entity display area 63 can be used to display entity information of the target entity.
- the target entity display area 63 displays the entity A as the target entity
- the text displayed in the voice text display area 62 is the text corresponding to the voice output entity A
- the association entity display area 61 displays the association corresponding to the entity A entity.
- the display device may further display the text of the query statement received in step S01 through the display.
- the GUI 600 provided by the display device to the display further includes a query statement display area 64 for displaying the text of the received query statement.
- the text of the query statement may be the text obtained by calling the speech recognition service on the display device to recognize the query statement.
- the display device when the display device acquires the associated entity from the service device, it can also acquire the query result of the query statement.
- the display device may respectively display the query result and the associated entity in different areas on the display, which will not be described in detail here.
- each embodiment may be used separately, or each embodiment may be used in combination, which is not specifically limited in the present application.
- the display device to output the associated entity, and the above embodiments are only examples, and are not intended to be limiting.
- FIG. 7 exemplarily shows a flowchart of an association recommendation method applied to a service device. As shown in Figure 7, the process includes the following steps:
- Step S11 the service device receives the query statement from the display device, and determines whether the query statement satisfies the preset association recommendation condition; if so, determines the target entity according to the query statement.
- the service device may perform semantic analysis on the query statement, so as to subsequently determine whether the query statement satisfies the associated recommendation condition.
- the service device may perform semantic parsing on the query statement through the deployed semantic service. This application does not limit the specific semantic parsing process.
- the target entity there are many ways to determine the target entity according to the query statement.
- the query statement contains an entity name
- the entity corresponding to the entity name contained in the query statement can be determined as the target entity; if the query statement does not contain an entity name If the entity name is included, the query statement is used as the current query statement, and the target entity is determined according to the previous query statement of the current query statement.
- the previous query statement and the current query statement here come from the same display device, and the process of determining the target entity according to the previous query statement can refer to the above-mentioned process of determining the target entity according to the current query statement.
- the query statement received within a preset time before the current query statement and received most recently from the current query statement may be determined as the previous query statement, and if there is no previous query statement, the query statement received in advance may be determined as the previous query statement
- the default entity set is determined as the target entity.
- the query statement when the query statement is a single entity name, it is determined that a preset association recommendation condition is satisfied.
- the entity name here, such as: character name, movie name, music name, game name, food name, etc.
- the query statement is determined to be a single entity name, the entity corresponding to the single entity name may be determined as the target entity.
- the service device may determine the entity included in the query statement as the target entity.
- query statements that do not have explicit semantics here can be "that", "I think", and so on.
- the service device may determine the entity corresponding to the entity name contained in the previous query statement of the received query statement as the target entity.
- relevant recommendations are made for the query statements previously output by the user, which can help users find the required information. As well as guide the user to the next query.
- the service device may determine the entity contained in the query statement with the same semantics as the target entity. The number of query statements with the same semantics reaches the threshold, which means that the user has input query statements with the same semantics to the display device multiple times. Generally speaking, this happens because the query that the user has performed does not get the desired query result. In this case, the association recommendation can achieve a better user experience than simply returning the same query results.
- each embodiment may be used separately, or at least two embodiments may be used in combination.
- the query statement when used in combination, as an embodiment, when the query statement does not satisfy all the association recommendation conditions in the embodiments used in combination, it may be determined that it does not satisfy the association recommendation conditions.
- Step S12 according to the preset association recommendation rule, search for the associated entity corresponding to the target entity in the established knowledge graph.
- This step S12 is executed when it is determined in the above step S11 that the query statement satisfies the association recommendation condition, and the target entity has been determined according to the query statement.
- the association recommendation rules in this step S12 include: association recommendation rules corresponding to the business domain to which the target entity belongs.
- the service device is provided with a corresponding relationship between a business domain and an association recommendation rule. Before searching for the associated entity corresponding to the target entity according to the associated recommendation rule, the service device may determine the business domain to which the target entity belongs, and search for the associated recommendation rule corresponding to the business domain in the correspondence between the business domain and the associated recommendation rule.
- the business domain to which the target entity belongs can be determined in various ways, for example, determining the business domain of the target entity according to the attribute value of the business domain attribute of the target entity, determining the business domain of the target entity according to the tag of the target entity, and so on. .
- the association recommendation rule corresponding to the business domain may be determined according to the analysis of query sentences input by a large number of users. For example, a large number of adjacent query statements input by the user can be obtained to analyze the relationship existing among the entities queried by the user, and the like. As an embodiment, the association recommendation rule may be appropriately adjusted according to the query statement input by the user within a certain period of time.
- association recommendation rule how to find the associated entity corresponding to the target entity in the knowledge graph according to the association recommendation rule is described below with an example, and will not be repeated here.
- the business domain to which the target entity belongs may correspond to one association recommendation rule, or may correspond to at least two association recommendation rules.
- the service device may search the knowledge graph for the associated entity corresponding to the target entity according to the association recommendation rule.
- the service device may search the knowledge graph for the associated entity corresponding to the target entity according to the at least two association recommendation rules.
- the associated entities returned by the service device to the display device are in a certain order. For the same associated entities found according to the above at least two association recommendation rules, they can be placed in the respective associated entities during sorting. front end.
- the service device may search for the associated entity corresponding to the target entity according to one of the above at least two association recommendation rules, and, in the found association, When the entity does not meet the preset conditions, the search is further performed according to other association recommendation rules in the above at least two association recommendation rules.
- the preset conditions here may include: the number of found associated entities is less than a threshold, and the like.
- association recommendation method provided by the embodiment of the present application is described from the perspective of a service device.
- target entities in different business fields can be recommended according to different association recommendation rules.
- the service device may execute the process shown in FIG. 7 through multiple modules.
- the service device may include a receiving module and an association recommendation module.
- the receiving module is used to receive the query statement from the display device;
- the association recommendation module is used to determine whether the query statement satisfies the preset association recommendation condition;
- the association recommendation rule of finds the associated entity corresponding to the target entity in the knowledge graph.
- the business domain may include at least one of characters, movies, music, games, and food.
- the following is an example description of the association recommendation rules corresponding to each business field:
- the association recommendation rule corresponding to a character may include: recommending a character entity that has a specified character relationship with the target entity, where the specified character relationship may include: spouse, child, parent, teammate, mentor, etc.; recommending a character entity with the target entity Characters belonging to the same occupation, the same occupation here may include: doctors, film and television actors, singers, athletes, etc.
- different subclasses can be determined as different occupations respectively.
- an athlete has multiple sub-categories according to different sports, such as basketball players, football players, table tennis players, etc., and different sub-categories can be regarded as different occupations respectively.
- the association recommendation rules corresponding to movies may include: recommend movies of the same movie type as the target entity; recommend the star of the target entity; recommend the director of the target entity; recommend the same movie as the star of the target entity; recommend the target entity other films directed by the director;
- the associated recommendation rule corresponding to music may include: recommending music belonging to the same music style as the target entity, and recommending music with a high similarity in name to the target entity when recommending.
- the music style may include: national style , pop, classical, lyrical, etc.; recommends the same music as the original singer of the target entity; recommends the same music as the target entity's lyricist; recommends the same music as the target entity's composer; recommends singing by a non-original singer the target entity; etc.
- the association recommendation rule corresponding to the game may include: recommending games that belong to the same game type as the target entity; recommending games that belong to the same theme as the target entity.
- the above-mentioned game types may include: first-person shooter, puzzle, strategy, role-playing, etc., and the above-mentioned themes may include: war, strategy, fashion, etc.
- the associated recommendation rule corresponding to the food may include: recommending the food belonging to the same cuisine as the target entity; recommending the food belonging to the same taste as the target entity.
- the above-mentioned cuisines may include the eight traditional Chinese cuisines, and may also include other cuisines such as Beijing cuisine and Northeastern cuisine.
- the above-mentioned tastes may include: one or a combination of sour, sweet, bitter, spicy, salty, and fresh.
- the target entity in the association recommendation rule in the above embodiments is the entity determined according to the query statement.
- searching for the associated entity corresponding to the target entity in the knowledge graph according to the association recommendation rule may include: according to the business domain to which the target entity belongs, the association relationship between the target entity and other entities and/or the attributes possessed by the target entity, in the Determine the associated entity corresponding to the target entity in the knowledge graph.
- an entity with a specified association relationship with the target entity can be searched in the knowledge graph, and the found entity can be determined as the associated entity corresponding to the target entity;
- the business domain to which it belongs searches the knowledge graph for entities with the same specified attribute value as the target entity, and determines the found entity as the associated entity corresponding to the target entity.
- the above-mentioned specified relationship and specified attribute value may be determined according to the association recommendation rule corresponding to the business domain to which the target entity belongs.
- the specified relationship can be determined to be a specified person relationship according to the association recommendation rules corresponding to the person, and the entity whose relationship with the target entity is a specified person relationship can be searched in the knowledge graph.
- the received entity is determined to be the associated entity of the target entity; it is also possible to determine the “occupational attribute value” of the target entity with the specified attribute value according to the association recommendation rules corresponding to the character, and find the entity with the specified attribute value in the knowledge graph, The found entity is determined to be the associated entity of the target entity.
- the knowledge graph may be a knowledge graph constructed based on tools such as Neo4j, TigerGraph, and OrientDB.
- tools such as Neo4j, TigerGraph, and OrientDB.
- the following takes the knowledge graph constructed based on Neo4j as an example to describe how to find the associated entity corresponding to the target entity in the knowledge graph:
- a specified entity can be searched in the knowledge graph through a rule expression relationship chain.
- the rule expresses the relationship chain and can search for the specified entity by defining the attributes of the entity, the relationship between the entity and the entity, etc.
- the service device may generate a rule expression relationship chain according to the association recommendation rule, so as to find the associated entity corresponding to the target entity in the knowledge graph.
- the service device may determine the corresponding relationship between the association recommendation rule corresponding to the business domain to which the target entity belongs, according to the preset association recommendation rule and the corresponding relationship between the rule expression relationship chain template.
- a rule expression relationship chain template which includes a part that needs to input keywords; the service device can obtain the specified attribute value of the target entity as a keyword, input it into the determined rule expression relationship chain template, and generate a rule expression relationship chain.
- the number and order of the found associated entities may also be limited.
- the target entity is sweet and sour pork loin
- the business field of the target entity is gourmet
- the associated recommendation rule corresponding to the gourmet is: recommend the gourmet that belongs to the same cuisine as the target entity, then the service device searches for the gourmet that is the same as the "recommended and the target entity belongs to the same cuisine" "The corresponding rule expression relationship chain template.
- the rule expression relationship chain is used to find entities whose business domain is cuisine and whose cuisine is [cuisine attribute value]. Among them, [cuisine attribute value], [name attribute value] are the parts that need to input keywords.
- m is [name attribute value]
- RETURN s indicates that the output entity is the entity represented by s in the rule expression relationship chain template; "order by s.describeNum” indicates that the output entities are sorted according to the describeNum attribute; "LIMIT 10" indicates that the number of output entities is limited to 10.
- the service device can obtain the attribute value of the "cuisine” attribute and the attribute value of the "name” attribute of the target entity sweet and sour pork loin as a keyword, and input the keyword into the rule expression relationship chain template to generate Rules express chains of relationships.
- association recommendation rules may exist in practical application, as well as other ways of finding the associated entity corresponding to the target entity in the knowledge graph, which will not be described one by one here.
- the display device can send the received query statement to the service device, so that the service device can determine the target entity that needs to be recommended for association according to the query statement, and search the knowledge graph for the corresponding target entity.
- the associated entity is obtained by the display device and output, so that during the interaction between the display device and the user, a relatively rich and comprehensive association recommendation can be made for the query statement input by the user, thereby improving the user experience.
- FIG. 8 exemplarily shows a schematic diagram of a knowledge graph according to some embodiments.
- a node is called an entity, and the entity can be replaced by things that exist objectively and can be distinguished from each other, such as specific people, things, things, institutions, abstract concepts, etc.
- the corresponding relationship between attributes and attribute values can be configured according to actual requirements during specific implementation.
- the pre-configured attributes of this entity may be: occupation, height, gender, etc.
- the attribute values may be: specific occupation type (taking the driver as an example), specific height value (take 180cm as an example), specific gender (take male as an example).
- the service device includes: an input interface and a processor.
- the processor is configured to: when a query statement is received through the input interface, input the query statement into the configured question answering system to obtain a reply statement corresponding to the query statement; find the corresponding reply statement in the established knowledge graph The associated answer entity; according to the corresponding relationship between the configured attributes and attribute values of the answer entity, a recommended sentence is generated; the recommended sentence includes a preset number of N attributes and corresponding attribute values, where N is greater than or equal to 1.
- FIG. 9 is a schematic flowchart of an information recommendation method provided by an embodiment of the present application.
- the process may include the following steps:
- Step 31 When the query sentence is received, the query sentence is input into the configured question answering system to obtain a reply sentence corresponding to the query sentence.
- the query statement may be input to the service device by the smart device. That is, the service device and the smart device are two independent devices. In this case, the service device can be a server. In another example, the query statement may be directly input to the service device by the user, or input to the service device by the user operating the control device of the service device. That is, the service device and the aforementioned smart device can be understood as one device.
- the query statement received by the service device may be a query statement in a voice format or a query statement in a text format.
- smart devices may be smart speakers, smart TVs, mobile phones, computers, or the aforementioned display devices and other devices, and the application does not limit the specific types of smart devices.
- the above query statement may be input to the service device through an input interface on the service device.
- the service device cannot generate a corresponding recommendation statement for any query statement. Therefore, it is necessary to set recommendation conditions in advance to determine whether a recommendation statement can be generated for the received query statement, and when the received query statement is received If the query statement satisfies the above recommendation conditions, a recommendation statement is generated for the query statement.
- the preset recommendation condition may include: the query statement includes at least a main entity and a semantic relationship between the main entity and the answer entity to be queried, and the semantic relationship is the same as the preset semantic relationship.
- a query statement when a query statement includes a person and a person relationship, the person in the query statement can be used as the main entity, and the person relationship can be used as a semantic relationship. For example, if the query sentence is "Who is Yao's wife?", the main entity in the query sentence is "Yao", and the semantic relationship between the main entity "Yao" and the answer entity to be queried is is "wife".
- the main entity and semantic relationship in the query statement can be, in addition to the above examples of characters and character relationships, regions and positions (such as governors, mayors, etc.), film and television works and work information (such as actors, directors, screenwriters, etc.) , producer, host, etc.), songs and song information (e.g. singer, lyricist, MV director, producer, arranger, etc.), countries and rulers/national leaders (e.g. president, prime minister, prime minister, deputy President, Emperor, etc.), books and book information (author, translator, editor-in-chief, etc.), school and school information (principal, famous alumni, etc.), etc.
- This application does not limit the main entity and semantic relationship specifically included in the query statement .
- the semantic relationship in the above-mentioned preset recommendation conditions may be set according to the actual situation, and the present application does not specifically limit the semantic relationship in the recommendation conditions.
- the service device When the service device receives the query statement and determines that the query statement satisfies the above-mentioned preset recommendation conditions, the service device will input the query statement into the configured question answering system, so that the question answering system output corresponds to the query
- the statement's reply statement may include the answer entity queried by the query statement.
- the reply statement may carry the answer entity ID of the answer entity queried by the query statement (the entity ID will be described below).
- the reply statement can also include other information according to the actual situation, such as the main entity in the query statement, and the semantic relationship between the main entity in the query statement and the answer entity to be queried.
- the content is not specifically limited.
- the above question and answer system can be deployed in a service device, so that the service device can locally input query sentences into the question and answer system, and locally obtain the reply sentences output by the question and answer system.
- the above question answering system can also be deployed in other devices (denoted as the target device) other than the service device. In this way, the service device needs to input the query sentence into the question answering system through the communication connection with the target device, and obtain the question answer Reply statement output by the system.
- the above question answering system can be implemented in various implementation manners.
- the question answering system is implemented through a search engine, or the question answering system is implemented through a knowledge graph, etc. This application does not limit the specific implementation of the question answering system.
- Step 32 Find the answer entity associated with the reply sentence in the established knowledge graph.
- a knowledge graph needs to be pre-established in the service device, and the knowledge graph can be established by referring to the establishment methods well known to those skilled in the art, and details are not repeated here. Since there may be different entities with the same entity name in the knowledge graph, in order to realize the distinction between the aforementioned different entities with the same entity name, each entity in the knowledge graph can be assigned a unique entity ID.
- the answer entity associated with the reply sentence there are multiple implementations for finding the answer entity associated with the reply sentence in the established knowledge graph.
- an entity matching the answer entity ID can be searched in the established knowledge graph, and then the found This entity is identified as the answer entity.
- the answer entity ID can uniquely identify the answer entity, even if there are multiple other entities with the same entity name as the answer entity, the answer entity can be accurately searched.
- Step 33 generating a recommended sentence according to the corresponding relationship between the configured attributes and attribute values of the answer entity; the recommended sentence includes a preset number of N attributes and corresponding attribute values, where N is greater than or equal to 1.
- the corresponding relationship between attributes and attribute values is configured for the answer entity in the knowledge graph in advance, and the corresponding relationship between the attributes and attribute values can be used to describe the relevant information of the answer entity.
- Table 1 exemplarily lists some attributes used to configure entities, see Table 1:
- first-level attribute category second-level attribute category third-level attribute category Attributes figure Universal Character Relationships friend figure Universal Character Relationships predecessor figure Universal Character Relationships son figure Universal Character Relationships Mother figure Universal Character Relationships friend figure Universal Character Relationships daughter figure Universal Character Relationships wife figure Universal Character Relationships husband figure Universal Character Relationships Father figure Universal Character Relationships first love figure Universal character attributes Constellation figure Universal character attributes Hometown figure Universal character attributes height figure Universal character attributes place of birth figure Universal Character attributes Profession
- figure Universal character attributes date of birth figure Universal character attributes representative work figure Universal character attributes Major achievements figure entertainment figures stage name figure entertainment figures actor play figure entertainment figures fan name figure entertainment figures
- figure entertainment figures agency figure entertainment figures measurements figure entertainment figures Debut time figure sports figures nation figure sports figures sports figure sports figures athlete coach figure sports figures athlete sports team figure sports figures athlete Field position figure sports figures athlete Field number figure sports figures athlete dominant foot
- first-level, second-level and third-level attribute categories in the above Table 1 are used to classify different attributes, so as to facilitate the management and planning of different attributes, and are not necessary in the process of configuring attributes for entities. .
- the N attributes and corresponding attribute values included in the recommendation sentence are attributes and attribute values included in the corresponding relationship between attributes and attribute values preconfigured by the answer entity.
- the following will be described in detail with reference to the process shown in FIG. 11 , and details will not be described here for the time being.
- the generated recommendation sentence also includes a preset number of N attributes and corresponding attribute values, so through the recommendation The statement can learn the relevant information of the answer entity corresponding to the query statement, which can expand the user's vision, help the user to understand more knowledge related to the answer entity, let the user have a specific understanding of the answer entity, and stimulate the user's Cognitive interest, triggering further searches for answer entities.
- the service device to output the recommended sentence.
- the service device can send the recommended sentence and the reply sentence to the smart device, and the smart device sends the received recommended sentence and reply sentence
- For output for example, output is performed by means of voice playback, or, if a display is provided, output is performed by means of display display.
- the service device when the service device and the smart device are the same device, the service device can output through voice playback, or, in the case of a display, output through display display .
- the service device sends some related information to the display device, and the display device presents the related interface. How to display the above recommended sentence on the display will be described in detail, which will not be repeated here.
- the user can learn the relevant information of the answer entity through the recommendation sentence.
- information which can expand the user's vision, help the user to understand more knowledge related to the answer entity, let the user have a specific understanding of the answer entity, and at the same time stimulate the user's cognitive interest and trigger further search for the answer entity.
- the user can learn the relevant information of the answer entity through the recommendation sentence.
- information which can expand the user's vision, help the user to understand more knowledge related to the answer entity, let the user have a specific understanding of the answer entity, and at the same time stimulate the user's cognitive interest and trigger further search for the answer entity.
- FIG. 10 exemplarily shows a schematic diagram of the GUI provided by the display device when displaying the recommended sentence.
- the display provides a GUI 800 for presenting a query sentence and a reply sentence and a recommended sentence returned by the service device.
- the GUI 800 includes a first display area 81 for displaying the query sentence, and the first display area 81 includes an item 81a.
- Item 81a is used to display a query statement.
- the GUI 800 also includes a second display area 82 for displaying reply sentences and a third display area 83 for displaying recommended sentences, wherein the second display area 82 includes an item 82a, and the item 82a is used for displaying reply sentences;
- the display area 83 includes an item 83a, and the item 83a is used to display a recommended sentence.
- FIG. 10 is only a schematic diagram illustrating a GUI for displaying recommended sentences.
- other contents other than the above query sentence, reply sentence and recommendation sentence may also be displayed according to the actual situation, which is not specifically limited in this application.
- step 103 it is a flowchart of the implementation of step 103 provided in this embodiment of the present application.
- the process may include the following steps:
- Step 331 Select N attributes and corresponding attribute values in the corresponding relationship between attributes and attribute values that have been configured in the answer entity.
- this step 331 among all the attributes-attribute value correspondences that have been configured in the answer entity in the knowledge graph, there are multiple implementations for selecting N attributes and corresponding attribute values.
- a selection ratio may be preset, such as 10%, 20%, etc. This application does not specifically limit the preset selection ratio. Based on this, when selecting N attributes and corresponding attribute values, the corresponding relationship between the configured attributes and attribute values of the answer entity can be selected according to the preset selection ratio, so as to select the attributes with the preset selection ratio. , and the corresponding attribute value.
- a selection quantity may be preset, such as 2, 4, etc., and this application does not specifically limit the preset selection quantity. Based on this, when selecting N attributes and corresponding attribute values, the corresponding relationship between the configured attributes and attribute values of the answer entity can be selected according to the preset selection number, so as to select the preset selection number of attributes. , and the corresponding attribute value.
- Step 332 determine whether the selected attribute values have the same attribute value as the main entity in the query statement or the reply statement; if so, go back to step 331 ; if not, go to step 333 .
- the reason why each selected attribute value is judged to determine whether the attribute value is consistent with the main entity in the query sentence or the reply sentence is because: the attribute configured for the answer entity in advance Among the values, there may be an attribute with the same value as the main entity in the query or reply statement.
- the query sentence is "who is the singer of song A?”
- the reply sentence corresponding to the query sentence is "the singer of song A is Zhao”
- the attribute in the knowledge graph corresponding to Zhao's answer entity is configured
- the attribute value corresponding to "Masterpiece" is "Song A”.
- the recommended sentence can include "Zhao's representative work is song A", and the relationship between the recommended sentence and the reply sentence The meanings are similar, so the recommendation effect that the recommendation sentence should have cannot be achieved. Therefore, by judging each of the selected attribute values, it is possible to avoid recommending useless information for the user by the subsequently generated recommendation sentences.
- Step 333 Input each attribute and the corresponding attribute value into the set recommended sentence generation model to obtain a recommended sentence.
- This step 333 is executed on the premise that each of the selected attribute values is different from the main entity in the reply sentence or the query sentence.
- each selected attribute value is different from the main entity in the reply sentence or query sentence, it means that each attribute value in the subsequently generated recommendation sentence is different from the main entity, and neither the generation nor the reply will be generated.
- Statements with similar meanings are recommended statements.
- each selected attribute and the corresponding attribute value can be input into the preset recommended sentence generation model to obtain the recommended sentence.
- the following will describe in detail how the recommended sentence generation model in this step 333 obtains the recommended sentence with reference to the process shown in FIG. 12 , which will not be repeated here.
- FIG. 12 is a flowchart of implementing step 333 provided in this embodiment of the present application.
- the process may include:
- Step 3331 for each attribute of the input and the corresponding attribute value, find the corresponding target sentence template in the set sentence template, fill the attribute and the attribute value correspondingly to the filling position of the target sentence template, according to the target sentence
- the populated attributes and attribute values in the template generate corresponding recommended sub-statements.
- At least one statement template may be preset in the statement generation model, and these statement templates may be statement templates of the same category, or may be statement templates of different categories respectively.
- the first type of statement template includes at least: a filling position (referred to as the first filling position) for filling attributes, for The filling position of the filling attribute value (referred to as the second filling position), and the connective connecting the first filling position and the second filling position.
- the statement template can be "[attribute] is [attribute value]", where "[attribute]” is the first fill position for filling the attribute and "[attribute value]” is the first fill position for filling the attribute value
- the second stuffing position, "is” is a connective that connects the first stuffing position and the second stuffing position.
- statement generation model when the statement generation model includes only one type of statement template, when the statement generation model generates a recommended sub-statement for each input attribute and the corresponding attribute value, it may include:
- a target sentence template is selected from the set first type of sentence templates. Then, the attribute is correspondingly filled into the first filling position in the target sentence template, and the attribute value is correspondingly filled into the second filling position in the target sentence template. Finally, set corresponding punctuation marks for the above target sentence template filled with attributes and attribute values to generate corresponding recommended sub-sentences. For example, if the attribute is height, the corresponding attribute value is 180cm.
- the target sentence template is [[attribute] is [attribute value]" as an example, after filling the aforementioned assumed height and 180cm corresponding to the height into the target sentence template, a filling such as "height is 180cm" can be obtained.
- a target statement template with attributes and corresponding attribute values After that, add corresponding punctuation marks such as ";” to the target sentence template filled with attributes and corresponding attribute values, and then a recommended sub-sentence such as "height is 180 cm;” can be obtained.
- the first type of statement template is the same as the first type of statement template in the foregoing implementation manner, which is not repeated here.
- the second type of statement template is different from the first type of statement template.
- the second type of statement template includes at least: a filling position for filling the answer entity (referred to as the fifth filling position), a filling position for filling the attribute (referred to as the first filling position) Three padding bits), the padding position (referred to as the fourth padding position) for padding the attribute value, the first connective connecting the third padding position and the fourth padding position, and the fifth padding position and the third padding position. second conjunction.
- the second type of statement template can be "[attribute] of [answer entity] is [attribute value]", where "[answer entity]” is the fifth padding position used to populate the answer entity name, "[ attribute]” is the third fill position for filling the attribute, “[attribute value]” is the fourth fill position for filling the attribute value, "yes" is the first connection connecting the third fill position and the fourth fill position word, "of” is the second connective that connects the fifth stuffing position and the third stuffing position.
- the statement generation model when the statement generation model includes two types of statement templates, when the statement generation model generates a recommended sub-statement for each attribute of the input and the corresponding attribute value, it may include: each attribute of the input and the corresponding An attribute and a corresponding attribute value are selected from the attribute values as the first attribute and attribute value. Select a target sentence template (marked as the first target sentence template) from the second type of sentence templates, fill the first attribute and attribute value into the above-mentioned first target sentence template and add punctuation to obtain the corresponding first target sentence template. Recommended sub-statements for attributes and attribute values.
- target sentence template For each of the remaining attributes and corresponding attribute values, select a target sentence template (referred to as the second target sentence template) in the first type of sentence template, and fill the attribute and corresponding attribute value into the above-mentioned second sentence template.
- the target sentence template is added and punctuation marks are added to obtain the recommended sub-sentence corresponding to the attribute and the corresponding attribute value.
- the above statement template may also include other information according to the actual situation, and the connectives in the above statement template and the punctuation marks set for the statement template can also be selected according to the actual situation, which are not limited in this application.
- Step 3332 splicing each attribute and the recommended sub-sentences corresponding to the corresponding attribute values to obtain a recommended sentence.
- this step 3332 there are multiple implementations for splicing each recommended sub-sentence into a recommended sentence.
- the recommended sub-sentences corresponding to the input attributes and corresponding attribute values are all generated according to the aforementioned first-type sentence template, then the recommended sub-sentences can be directly spliced .
- splicing can be performed in a random manner, in the order in which each attribute and corresponding attribute value are input into the recommended sentence generation model, and the like.
- the present application does not specifically limit the splicing method of each recommended sub-sentence.
- the first recommended sub-sentence As another implementation manner, if there is a recommended sub-sentence (referred to as the first recommended sub-sentence) generated according to the foregoing second type of sentence template in the recommended sub-sentences corresponding to the input attributes and corresponding attribute values, it is necessary to The first recommended sub-sentence is used as the first recommended sub-sentence in the recommended sentence. Afterwards, the other recommended sub-sentences except the first recommended sub-sentence are spliced after the first recommended sub-sentence to generate a recommended sentence. In the process of splicing the remaining recommended sub-sentences after the first recommended sub-sentence, the splicing can be performed in a random manner, in the order in which each attribute and the corresponding attribute value are input into the recommended sentence generation model, etc. It does not specifically limit the splicing method of the remaining recommended sub-sentences.
- the present invention also provides some non-volatile computer storage media, wherein the computer storage medium can store a program, and when the program is executed, it can include various embodiments of the screen saver display method and the screen saver jump method provided by the present invention some or all of the steps in .
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (English: read-only memory, abbreviated as: ROM) or a random access memory (English: random access memory, abbreviated as: RAM) and the like.
- the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform.
- the technical solutions in the embodiments of the present invention may be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products may be stored in a storage medium, such as ROM/RAM , magnetic disk, optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
- a computer device which may be a personal computer, a server, or a network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Provided in the present application are an associated recommendation method, a smart device and a service device, which are used to make associated recommendations on the basis of a query phrase. The smart device comprises: an input interface and a controller. The controller is configured for use in: sending, to the service device, a query phrase which is inputted by means of the input interface so as to allow the service device to search, within an established knowledge graph, for an associated entity that corresponds to a target entity, wherein the knowledge graph is used to represent the semantic relationship between entities, and the target entity is an entity that is determined on the basis of the query phrase; and acquiring and outputting the associated entity from the service device.
Description
本申请要求在2020年7月17日提交中国专利局、申请号为202010692647.0、申请名称为“一种关联推荐方法、智能设备及服务设备”的中国专利申请的优先权,和在2020年8月7日提交中国专利局、申请号为202010790355.0、申请名称为“一种信息推荐方法和服务设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on July 17, 2020 with the application number 202010692647.0, and the application title is "A method of association recommendation, intelligent equipment and service equipment", and filed in August 2020 The priority of the Chinese patent application filed with the Chinese Patent Office on the 7th with the application number of 202010790355.0 and the application title of "An Information Recommending Method and Service Equipment", the entire contents of which are incorporated in this application by reference.
本申请涉及智能设备技术领域,尤其涉及一种关联推荐方法、智能设备及服务设备。The present application relates to the technical field of smart devices, and in particular, to a method for association recommendation, a smart device and a service device.
目前,用户可以通过智能电视、智能音箱等智能设备查询并获取信息,为了更好地满足用户对信息的获取需求,推荐***应运而生。推荐***能够对用户查询的信息进行关联推荐,从而向用户提供所查询信息的相关信息。At present, users can query and obtain information through smart devices such as smart TVs and smart speakers. In order to better meet users' needs for information acquisition, recommendation systems emerge as the times require. The recommendation system can perform associated recommendation on the information queried by the user, so as to provide the user with relevant information of the queried information.
关联推荐具有多种优点,比如,在这个信息过载的时代,面对海量数据,用户难以逐一查询所有可能感兴趣的信息,在这种情况下,如果对用户已查询的信息进行关联推荐,可以帮助用户快速发现更多可能感兴趣的信息;又如,当用户查询某些信息比如查询指定人物时,若未查找到该指定人物,推荐该指定人物的相关人物比单纯返回“查询失败”这一结果更能提升用户体验。Relevant recommendation has many advantages. For example, in this era of information overload, in the face of massive data, it is difficult for users to query all the information that may be of interest one by one. Help users to quickly find more information that may be of interest; for another example, when a user queries for some information, such as querying a specified person, if the specified person is not found, it is recommended to recommend related people of the specified person rather than simply returning "query failure". The result is a better user experience.
为进一步提升用户体验,如何提供更加全面、丰富的关联推荐是目前仍需解决的问题。In order to further improve the user experience, how to provide a more comprehensive and rich association recommendation is a problem that still needs to be solved.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种关联推荐方法、智能设备及服务设备,用以依据查询语句进行关联推荐。Embodiments of the present application provide an association recommendation method, an intelligent device, and a service device, which are used for association recommendation according to a query sentence.
第一方面,提供一种智能设备,包括:输入接口和控制器;In a first aspect, an intelligent device is provided, including: an input interface and a controller;
上述控制器被配置用于:The above controller is configured to:
将通过上述输入接口输入的查询语句发送至服务设备,以使服务设备在已建立的知识图谱中查找目标实体对应的关联实体,上述知识图谱用于表示实体之间的语义关系,上述目标实体为依据上述查询语句确定的实体;Send the query statement input through the above input interface to the service device, so that the service device searches for the associated entity corresponding to the target entity in the established knowledge graph, and the above knowledge graph is used to represent the semantic relationship between entities, and the above target entity is The entity determined according to the above query statement;
从上述服务设备获取上述关联实体并输出。Obtain the above-mentioned associated entity from the above-mentioned service device and output it.
第二方面,提供一种服务设备,包括:In a second aspect, a service device is provided, including:
接收模块,用于接收来自智能设备的当前查询语句;The receiving module is used to receive the current query statement from the smart device;
关联推荐模块,用于在已建立的知识图谱中查找目标实体对应的关联实体,上述知识图谱用于表示实体之间的语义关系,上述目标实体为依据上述当前查询语句确定的实体。The association recommendation module is used to find the associated entity corresponding to the target entity in the established knowledge graph, the knowledge graph is used to represent the semantic relationship between the entities, and the target entity is the entity determined according to the current query sentence.
第三方面,提供一种关联推荐方法,应用于智能设备,包括:In a third aspect, a method for association recommendation is provided, applied to a smart device, including:
将通过输入接口输入的查询语句发送至服务设备,以使服务设备在已建立的知识图谱中查找目标实体对应的关联实体,上述知识图谱用于表示实体之间的语义关系,上述目标实体为依据上述查询语句确定的实体;Send the query statement input through the input interface to the service device, so that the service device searches for the associated entity corresponding to the target entity in the established knowledge graph. The above-mentioned knowledge graph is used to represent the semantic relationship between entities, and the above-mentioned target entity is based on The entity identified by the above query statement;
从上述服务设备获取上述关联实体并输出。Obtain the above-mentioned associated entity from the above-mentioned service device and output it.
第四方面,提供一种关联推荐方法,应用于服务设备,包括:In a fourth aspect, an association recommendation method is provided, applied to a service device, including:
接收来自智能设备的当前查询语句;Receive the current query statement from the smart device;
在已建立的知识图谱中查找目标实体对应的关联实体,上述知识图谱用于表示实体之间的语义关系,上述目标实体为依据上述当前查询语句确定的实体。The associated entity corresponding to the target entity is searched in the established knowledge graph, the above knowledge graph is used to represent the semantic relationship between entities, and the above target entity is the entity determined according to the above current query sentence.
第五方面,提供一种服务设备,包括:输入接口和处理器;In a fifth aspect, a service device is provided, including: an input interface and a processor;
所述处理器被配置为:The processor is configured to:
当通过所述输入接口接收到查询语句时,将所述查询语句输入至已配置的问答***,以得到所述查询语句对应的回复语句;When a query statement is received through the input interface, the query statement is input into the configured question answering system to obtain a reply statement corresponding to the query statement;
在已建立的知识图谱中查找到与所述回复语句相关联的答案实体;Find the answer entity associated with the reply sentence in the established knowledge graph;
依据所述答案实体已配置的属性-属性值之间的对应关系,生成推荐语句;所述推荐语句包括预设数量N个属性、以及对应的属性值,N大于等于1。A recommended sentence is generated according to the corresponding relationship between attributes and attribute values configured by the answer entity; the recommended sentence includes a preset number of N attributes and corresponding attribute values, where N is greater than or equal to 1.
第六方面,提供一种信息推荐方法,包括:A sixth aspect provides an information recommendation method, including:
当接收到查询语句时,将所述查询语句输入至已配置的问答***,以得到所述查询语句对应的回复语句;When receiving a query statement, inputting the query statement into the configured question answering system to obtain a reply statement corresponding to the query statement;
在已建立的知识图谱中查找到与所述回复语句相关联的答案实体;Find the answer entity associated with the reply sentence in the established knowledge graph;
依据所述答案实体已配置的属性-属性值之间的对应关系,生成推荐语句;所述推荐语句包括预设数量N个属性、以及对应的属性值,N大于等于1。A recommended sentence is generated according to the corresponding relationship between attributes and attribute values configured by the answer entity; the recommended sentence includes a preset number of N attributes and corresponding attribute values, where N is greater than or equal to 1.
为了更清楚地说明本申请的实施方式,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present application more clearly, the accompanying drawings required in the embodiments will be briefly introduced below. Obviously, for those of ordinary skill in the art, without creative efforts Additional drawings can be obtained from these drawings.
图1中示例性示出了根据一些实施例的显示设备与控制装置之间操作场景的示意图;FIG. 1 exemplarily shows a schematic diagram of an operation scene between a display device and a control apparatus according to some embodiments;
图2中示例性示出了根据一些实施例的显示设备200的硬件配置框图;FIG. 2 exemplarily shows a hardware configuration block diagram of a display device 200 according to some embodiments;
图3中示例性示出了根据一些实施例的控制设备100的硬件配置框图;FIG. 3 exemplarily shows a hardware configuration block diagram of the control device 100 according to some embodiments;
图4中示例性示出了本申请实施例提供的一种网络架构示意图;FIG. 4 exemplarily shows a schematic diagram of a network architecture provided by an embodiment of the present application;
图5中示例性示出了本申请实施例提供的关联推荐方法流程图;FIG. 5 exemplarily shows a flowchart of the association recommendation method provided by the embodiment of the present application;
图6A-6G中示例性示出了输出关联实体时显示器显示画面的示意图;6A-6G exemplarily show the schematic diagrams of the display screen when the associated entity is output;
图7中示例性示出了应用于服务设备的关联推荐方法流程图;FIG. 7 exemplarily shows a flowchart of an association recommendation method applied to a service device;
图8示例性示出了根据一些实施例的知识图谱的示意图;FIG. 8 illustrates a schematic diagram of a knowledge graph according to some embodiments;
图9示例性示出了根据一些实施例的信息推荐方法的流程图;FIG. 9 exemplarily shows a flowchart of an information recommendation method according to some embodiments;
图10示例性示出了根据一些实施例的服务设备在显示推荐语句时提供的GUI的示意图;FIG. 10 exemplarily shows a schematic diagram of a GUI provided by a service device when displaying a recommendation sentence according to some embodiments;
图11示例性示出了根据一些实施例的步骤103的实现流程图;FIG. 11 exemplarily shows a flow chart of the implementation of step 103 according to some embodiments;
图12示例性示出了根据一些实施例的步骤333的实现流程图。FIG. 12 exemplarily shows a flowchart of the implementation of step 333 according to some embodiments.
为使本申请的目的和实施方式更加清楚,下面将结合本申请示例性实施例中的附图,对本申请示例性实施方式进行清楚、完整地描述,显然,描述的示例性实施例仅是本申请一部分实施例,而不是全部的实施例。In order to make the purpose and implementation of the present application clearer, the exemplary embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only the Some embodiments are claimed, but not all embodiments.
需要说明的是,本申请中对于术语的简要说明,仅是为了方便理解接下来描述的实施方式,而不是意图限定本申请的实施方式。除非另有说明,这些术语应当按照其普通和通常的含义理解。It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the embodiments described below, rather than intended to limit the embodiments of the present application. Unless otherwise specified, these terms are to be understood according to their ordinary and ordinary meanings.
本申请中说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”等是用于区别类似或同类的对象或实体,而不必然意味着限定特定的顺序或先后次序,除非另外注明。应该理解这样使用的用语在适当情况下可以互换。The terms "first", "second", "third", etc. in the description and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and are not necessarily meant to limit specific Sequential or sequential, unless otherwise noted. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
术语“包括”和“具有”以及他们的任何变形,意图在于覆盖但不排他的包含,例如,包含了一系列组件的产品或设备不必限于清楚地列出的所有组件,而是可包括没有清楚地列出的或对于这些产品或设备固有的其它组件。The terms "comprising" and "having", and any variations thereof, are intended to cover but not exclusively include, for example, a product or device that incorporates a series of components is not necessarily limited to all components explicitly listed, but may include no explicit other components listed or inherent to these products or devices.
术语“模块”是指任何已知或后来开发的硬件、软件、固件、人工智能、模糊逻辑或硬件或/和软件代码的组合,能够执行与该元件相关的功能。The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware or/and software code capable of performing the functions associated with that element.
图1为根据实施例中显示设备与控制装置之间操作场景的示意图。如图1所示,用户可通过智能终端300或控制装置100操作显示设备200。FIG. 1 is a schematic diagram of an operation scenario between a display device and a control apparatus according to an embodiment. As shown in FIG. 1 , the user can operate the display device 200 through the smart terminal 300 or the control device 100 .
控制装置100可以是遥控器,遥控器和显示设备的通信包括红外协议通信或蓝牙协议通信,及其他短距离通信方式,通过无线或有线方式来控制显示设备200。用户可以通过遥控器上按键、语音输入、控制面板输入等输入用户指令,来控制显示设备200。The control apparatus 100 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-distance communication methods, and the display device 200 is controlled wirelessly or wiredly. The user can control the display device 200 by inputting user instructions through keys on the remote control, voice input, control panel input, and the like.
在一些实施例中,也可以使用智能终端300(如移动终端、平板电脑、计算机、笔记本电脑等)以控制显示设备200。例如,使用在智能设备上运行的应用程序控制显示设备200。In some embodiments, a smart terminal 300 (eg, a mobile terminal, a tablet computer, a computer, a notebook computer, etc.) can also be used to control the display device 200 . For example, the display device 200 is controlled using an application running on the smart device.
在一些实施例中,显示设备200还可以采用除了控制装置100和智能设备300之外的方式进行控制,例如,可以通过显示设备200设备内部配置的获取语音指令的模块直接接收用户的语音指令控制,也可以通过显示设备200设备外部设置的语音控制设备来接收用户的语音指令控制。In some embodiments, the display device 200 may also be controlled in a manner other than the control apparatus 100 and the smart device 300. For example, the module for acquiring voice commands configured inside the display device 200 may directly receive the user's voice command for control. , the user's voice command control can also be received through a voice control device provided outside the display device 200 device.
在一些实施例中,显示设备200还与服务器400进行数据通信。可允许显示设备200通过局域网(LAN)、无线局域网(WLAN)和其他网络进行通信连接。服务器400可以向显示设备200提供各种内容和互动。In some embodiments, the display device 200 is also in data communication with the server 400 . The display device 200 may be allowed to communicate via local area network (LAN), wireless local area network (WLAN), and other networks. The server 400 may provide various contents and interactions to the display device 200 .
图2示例性示出了根据示例性实施例中控制装置100的配置框图。如图2所示,控制装置100包括控制器110、通信接口130、用户输入/输出接口140、存储器、供电电源。控制装置100可接收用户的输入操作指令,且将操作指令转换为显示设备200可识别和响应的指令,起用用户与显示设备200之间交互中介作用。FIG. 2 exemplarily shows a configuration block diagram of the control apparatus 100 according to an exemplary embodiment. As shown in FIG. 2 , the control device 100 includes a controller 110 , a communication interface 130 , a user input/output interface 140 , a memory, and a power supply. The control device 100 can receive the user's input operation instruction, and convert the operation instruction into an instruction that the display device 200 can recognize and respond to, and play an intermediary role between the user and the display device 200 .
图3示出了根据示例性实施例中显示设备200的硬件配置框图。FIG. 3 is a block diagram showing a hardware configuration of the display apparatus 200 according to an exemplary embodiment.
显示设备200包括调谐解调器210、通信器220、检测器230、外部装置接口240、控制器250、显示器275、音频输出接口285、存储器、供电电源、用户接口中的至少一些。 Display apparatus 200 includes at least some of tuner 210, communicator 220, detector 230, external device interface 240, controller 250, display 275, audio output interface 285, memory, power supply, and user interface.
显示器275包括用于呈现画面的显示屏组件,以及驱动图像显示的驱动组件,用于接收源自控制器输出的图像信号,进行显示视频内容、图像内容以及菜单操控界面的组件以及用户操控UI界面。The display 275 includes a display screen component for presenting pictures, and a driving component for driving image display, for receiving image signals output from the controller, components for displaying video content, image content, and menu manipulation interfaces, and user manipulation UI interfaces .
显示器275可为液晶显示器、OLED显示器、以及投影显示器,还可以为一些投影装置和投影屏幕。The display 275 can be a liquid crystal display, an OLED display, and a projection display, as well as some projection devices and projection screens.
通信器220是用于根据各种通信协议类型与外部设备或服务器进行通信的组件。例如:通信器可以包括Wifi模块,蓝牙模块,有线以太网模块等其他网络通信协议芯片或近场通信协议芯片,以及红外接收器中的至少一些。显示设备200可以通过通信器220与外部控制设备100或服务器400建立控制信号和数据信号的发送和接收。The communicator 220 is a component for communicating with external devices or servers according to various communication protocol types. For example, the communicator may include a Wifi module, a Bluetooth module, a wired Ethernet module and other network communication protocol chips or near field communication protocol chips, and at least some of the infrared receivers. The display device 200 may establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220 .
用户接口,可用于接收控制装置100(如:红外遥控器等)的控制信号。The user interface can be used to receive control signals from the control device 100 (eg, an infrared remote control, etc.).
检测器230用于采集外部环境或与外部交互的信号。例如,检测器230包括光接收器,用于采集环境光线强度的传感器;或者,检测器230包括图像采集器,如摄像头,可以用于采集外部环境场景、用户的属性或用户交互手势,再或者,检测器230包括声音采集器,如麦克风等,用于接收外部声音。The detector 230 is used to collect external environment or external interaction signals. For example, the detector 230 includes a light receiver, a sensor for collecting ambient light intensity; alternatively, the detector 230 includes an image collector, such as a camera, which can be used to collect external environmental scenes, user attributes or user interaction gestures, or , the detector 230 includes a sound collector, such as a microphone, for receiving external sound.
外部装置接口240可以包括但不限于如下:高清多媒体接口接口(HDMI)、模拟或数据高清分量输入接口(分量)、复合视频输入接口(CVBS)、USB输入接口(USB)、RGB端口等任一个或多个接口。也可以是上述多个接口形成的复合性的输入/输出接口。The external device interface 240 may include but is not limited to the following: any one of a high-definition multimedia interface interface (HDMI), an analog or data high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. or multiple interfaces. It may also be a composite input/output interface formed by a plurality of the above-mentioned interfaces.
控制器250和调谐解调器210可以位于不同的分体设备中,即调谐解调器210也可在控制器250所在的主体设备的外置设备中,如外置机顶盒等。The controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
控制器250,通过存储在存储器上中各种软件控制程序,来控制显示设备的工作和响应用户的操作。控制器250控制显示设备200的整体操作。例如:响应于接收到用于选择在显示器275上显示UI对象的用户命令,控制器250便可以执行与由用户命令选择的对象有关的操作。The controller 250 controls the operation of the display device and responds to the user's operation through various software control programs stored in the memory. The controller 250 controls the overall operation of the display apparatus 200 . For example, in response to receiving a user command for selecting a UI object to be displayed on the display 275, the controller 250 may perform an operation related to the object selected by the user command.
对象可以是可选对象中的任何一个,例如超链接、图标或其他可操作的控件。与所选择的对象有关操作有:显示连接到超链接页面、文档、图像等操作,或者执行与所述图标相对应程序的操作。Objects can be any of the optional objects, such as hyperlinks, icons, or other actionable controls. The operations related to the selected object include: displaying operations connected to hyperlinked pages, documents, images, etc., or executing operations of programs corresponding to the icons.
在一些实施例中,用户可在显示器275上显示的图形用户界面(GUI)输入用户命令,则用户输入接口通过图形用户界面(GUI)接收用户输入命令。或者,用户可通过输入特定的声音或手势进行输入用户命令,则用户输入接口通过传感器识别出声音或手势,来接收用户输入命令。In some embodiments, the user may input user commands on a graphical user interface (GUI) displayed on the display 275, and the user input interface receives the user input commands through the graphical user interface (GUI). Alternatively, the user may input a user command by inputting a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.
“用户界面”可以指应用程序或操作***与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面常用的表现形式是图形用户界面(Graphic User Interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的一个图标、窗口、控件等界面元素,其中控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。在一些实施例中,***可以包括内核(Kernel)、命令解析器(shell)、文件***和应用程序。内核、shell和文件***一起组成了基本的操作***结构,它们让用户可以管理文件、运行程序并使用***。上电后,内核启动,激活内核空间,抽象硬件、初始化硬件参数等,运行并维护虚拟内存、调度器、信号及进程间通信(IPC)。内核启动后,再加载Shell和用户应用程序。应用程序在启动后被编译成机器码,形成一个进程。"User interface" can refer to the medium interface for interaction and information exchange between application programs or operating systems and users, which realizes the conversion between the internal form of information and the form acceptable to users. The commonly used form of user interface is Graphical User Interface (GUI), which refers to a user interface related to computer operations displayed in a graphical manner. It can be an icon, window, control and other interface elements displayed on the display screen of the electronic device, wherein the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets, etc. visual interface elements. In some embodiments, a system may include a kernel (Kernel), a command parser (shell), a file system, and applications. Together, the kernel, shell, and file system make up the basic operating system structures that allow users to manage files, run programs, and use the system. After power-on, the kernel starts, activates the kernel space, abstracts hardware, initializes hardware parameters, etc., runs and maintains virtual memory, scheduler, signals and inter-process communication (IPC). After the kernel starts, the shell and user applications are loaded. An application is compiled into machine code after startup, forming a process.
为了提供更加全面、丰富的关联推荐,本申请实施例提供一种关联推荐方法,能够在根据用户输入的查询语句(query)确定需要对目标实体进行关联推荐时,依据知识图谱确定该目标实体对应的关联实体,并输出该关联实体。当用户通过询问目标实体的关联对象时,关联实体可以包括答案实体。In order to provide a more comprehensive and rich association recommendation, the embodiment of the present application provides an association recommendation method, which can determine the corresponding target entity according to the knowledge graph when it is determined that the target entity needs to be associated recommendation according to the query entered by the user. , and output the associated entity. When the user asks the associated object of the target entity, the associated entity may include the answer entity.
为清楚说明本申请的实施例,下面给出一些相关名词的解释。In order to clearly illustrate the embodiments of the present application, explanations of some related terms are given below.
知识图谱:又称为科学知识图谱,用可视化技术描述知识资源及其载体,挖掘、分析、构建、绘制和显示知识及它们之间的相互联系。知识图谱本质上是一种语义网络,能够代表实体之间的语义关系。知识图谱中以实体为顶点或节点,以关系为边。知识图谱可通过多种方式构建,本申请实施例的重点并非如何构建知识图谱,所以对此不进行详细描述。Knowledge graph: Also known as scientific knowledge graph, it uses visualization technology to describe knowledge resources and their carriers, and mines, analyzes, constructs, draws and displays knowledge and their interconnections. A knowledge graph is essentially a semantic network that can represent semantic relationships between entities. In the knowledge graph, entities are used as vertices or nodes, and relationships are used as edges. The knowledge graph can be constructed in various ways, and the embodiment of the present application does not focus on how to construct the knowledge graph, so it will not be described in detail.
实体:在知识图谱中,一个节点称为一个实体,实体可以通过客观存在并可互相区别的事物替代,比如可为具体的人、事、物、机构、抽象的概念等。Entity: In the knowledge graph, a node is called an entity, and an entity can be replaced by things that exist objectively and can be distinguished from each other, such as specific people, things, things, institutions, abstract concepts, etc.
为清楚说明本申请的实施例,下面结合图4对本申请实施例提供的一种网络架构进行描述。To clearly illustrate the embodiments of the present application, a network architecture provided by the embodiments of the present application is described below with reference to FIG. 4 .
参见图4,图4为本申请实施例提供的一种网络架构示意图。图4中,智能设备用于接收输入的信息以及输出对该信息的处理结果;语音识别服务设备为部署有语音识别服务的电子设备,语义服务设备为部署有语义服务的电子设备,业务服务设备为部署有业务服务的电子设备。当然,同一个电子设备可以集成一个或者多个服务,如语音识别服务和语义服务可以集成在一个电子设备上,语义服务和业务服务也可以集成在一个电子设备上,更或者语义识别服务、语义服务和业务服务都集成在电子设备上。在这里并不对电子设备的个数进行限定,只要能完成相应的功能即可。Referring to FIG. 4 , FIG. 4 is a schematic diagram of a network architecture provided by an embodiment of the present application. In Figure 4, the smart device is used to receive the input information and output the processing result of the information; the speech recognition service device is an electronic device deployed with a speech recognition service, the semantic service device is an electronic device deployed with a semantic service, and the business service device Electronic devices deployed with business services. Of course, one or more services can be integrated into the same electronic device. For example, speech recognition services and semantic services can be integrated on one electronic device, and semantic services and business services can also be integrated on one electronic device. Services and business services are integrated on electronic devices. The number of electronic devices is not limited here, as long as the corresponding functions can be accomplished.
这里的电子设备可包括服务器、计算机等,这里的语音识别服务、语义服务(也可称为语义引擎)和业务服务为可部署在电子设备上的web服务,其中,语音识别服务用于将音频识别为文本,语义服务用于对文本进行语义解析,业务服务用于提供具体的服务如天气查询服务、音乐查询服务等。在一个实施例中,图4所示架构中可存在部署有不同业务服务的多个业务服务设备。The electronic device here may include a server, a computer, etc. Here, the speech recognition service, the semantic service (also referred to as a semantic engine) and the business service are web services that can be deployed on the electronic device, wherein the speech recognition service is used to convert audio Recognized as text, the semantic service is used to semantically parse the text, and the business service is used to provide specific services such as weather query service, music query service, etc. In one embodiment, there may be multiple business service devices deployed with different business services in the architecture shown in FIG. 4 .
下面对基于图4所示架构处理输入显示设备的信息的过程进行举例描述,以输入显示设备的信息为通过语音输入的查询语句为例,上述过程可包括如下三个阶段:The following describes the process of processing the information input to the display device based on the architecture shown in FIG. 4 as an example. Taking the information input to the display device as a query sentence input by voice as an example, the above process may include the following three stages:
1、语音识别阶段1. Speech recognition stage
智能设备可在接收到通过语音输入的查询语句后,将该查询语句的音频上传至语音识别服务设备,以由语音识别服务设备通过语音识别服务将该音频识别为文本后返回至显示设备。After receiving the query sentence input by voice, the smart device can upload the audio of the query sentence to the voice recognition service device, so that the voice recognition service device can recognize the audio as text through the voice recognition service and return it to the display device.
在一个实施例中,将查询语句的音频上传至语音识别服务设备前,智能设备可对查询语句的音频进行去噪处理,这里的去噪处理可包括去除回声和环境噪声等步骤。In one embodiment, before uploading the audio of the query sentence to the speech recognition service device, the smart device may perform denoising processing on the audio of the query sentence, where the denoising processing may include steps such as removing echoes and ambient noise.
2、语义理解阶段2. Semantic understanding stage
显示设备将语音识别服务识别出的查询语句的文本上传至语义服务设备,以由语义服务设备通过语义服务对该文本进行语义解析,得到文本的业务领域、意图等。The display device uploads the text of the query sentence recognized by the speech recognition service to the semantic service device, so that the semantic service device performs semantic analysis on the text through the semantic service to obtain the business field and intent of the text.
3、响应阶段3. Response stage
语义服务设备根据对查询语句的文本的语义解析结果,向相应的业务服务设备下发查询指令以获取业务服务给出的查询结果。显示设备可从语义服务设备获取该查询结果并输出。作为一个实施例,语义服务设备还可将对查询语句的语义解析结果发送至显示设备,以由显示设备输出该语义解析结果中的反馈语句。According to the semantic analysis result of the text of the query sentence, the semantic service device sends a query instruction to the corresponding business service device to obtain the query result given by the business service. The display device can obtain the query result from the semantic service device and output it. As an embodiment, the semantic service device may also send the semantic parsing result of the query statement to the display device, so that the display device outputs the feedback statement in the semantic parsing result.
至此,完成对基于图4所示架构处理输入显示设备的信息的过程的描述。So far, the description of the process of processing the information input to the display device based on the architecture shown in FIG. 4 is completed.
需要说明的是,图4所示架构只是一种示例,并非对本申请保护范围的限定。本申请 实施例中,也可采用其他架构来实现类似功能,在此不做赘述。It should be noted that the architecture shown in FIG. 4 is only an example, and does not limit the protection scope of the present application. In the embodiments of the present application, other architectures may also be used to implement similar functions, which will not be repeated here.
下面对本申请实施例提供的关联推荐方法进行描述。在一个实施例中,该方法可应用于智能设备如显示设备、智能电视、智能音箱、智能手机等。下文描述各实施例时,主要以关联推荐方法应用于智能设备中的显示设备为例进行描述,该关联推荐方法应用于其他智能设备时的具体实现与显示设备类似,下文不再一一举例描述。The association recommendation method provided by the embodiment of the present application is described below. In one embodiment, the method can be applied to smart devices such as display devices, smart TVs, smart speakers, smart phones, and the like. When describing the various embodiments below, the description is mainly based on the application of the association recommendation method to a display device in a smart device as an example. The specific implementation of the association recommendation method applied to other smart devices is similar to that of the display device, and the following description will not be described one by one. .
下面从显示设备的角度,结合图5对本申请实施例提供的关联推荐方法进行描述:From the perspective of a display device, the association recommendation method provided by the embodiment of the present application is described below with reference to FIG. 5 :
图5中示例性示出了本申请实施例提供的关联推荐方法流程图。结合图2所示的显示设备和图5来说,该流程可包括如下步骤:FIG. 5 exemplarily shows a flowchart of the association recommendation method provided by the embodiment of the present application. With reference to the display device shown in FIG. 2 and FIG. 5 , the process may include the following steps:
步骤S01,将接收到的查询语句发送至服务设备,以使服务设备在已建立的知识图谱中查找目标实体对应的关联实体,该目标实体为依据上述查询语句确定的实体。Step S01, sending the received query statement to the service device, so that the service device searches the established knowledge graph for an associated entity corresponding to a target entity, where the target entity is an entity determined according to the query statement.
在一个例子中,上述查询语句可包括:通过语音输入的查询语句、通过控制装置输入的查询语句等。用户可通过向智能设备输入查询语句来获取所需信息,该查询语句可包括多种内容,比如,可为单个实体名称,如“演员A”、“电影B”等;又如,可为一个句子,如“电影B的主演是谁”;又如,可为不具有实际含义的词,如“那个”、“我想”;等等。在一个实施例中,上述查询语句为通过输入接口输入的查询语句。In one example, the above query statement may include: a query statement input through voice, a query statement input through a control device, and the like. The user can obtain the required information by entering a query statement into the smart device. The query statement can include various contents, for example, it can be a single entity name, such as "actor A", "movie B", etc.; another example, it can be a Sentences, such as "who is the star of movie B"; another example, can be words without actual meaning, such as "that", "I think"; and so on. In one embodiment, the above query statement is a query statement input through an input interface.
在一个例子中,本步骤S01中的服务设备至少部署有语义服务。作为一个实施例,显示设备可调用语音识别服务,将通过语音输入的查询语句识别为文本后发送至该服务设备。In an example, the service device in this step S01 is deployed with at least a semantic service. As an embodiment, the display device may invoke a voice recognition service, and send the query sentence inputted by voice to the service device after recognizing it as text.
本步骤S01中,服务设备具体如何依据查询语句确定目标实体,以及如何查找目标实体对应的关联实体,下文举例描述,在此暂不赘述。In this step S01, how the service device specifically determines the target entity according to the query statement and how to search for the associated entity corresponding to the target entity is described below with an example, and will not be repeated here.
步骤S02,从服务设备获取上述关联实体并输出。Step S02, the above-mentioned associated entity is acquired from the service device and output.
在一些实施例中,从目标实体查找关联实体,是为了拓宽用户语音输入指令相关的推荐资源。如当目标实体是A时,服务设备会将与A相关的推荐资源返回到终端设备上,而这些推荐资源都与A相关。基于上述拓宽推荐资源的目的,在用户输入的目标实体是A的情况下,服务设备还返回另一个与A关联的实体B,这样也可以被用户选择,当用户基于推荐内容还有B的情况下选择B时,服务设备再把B相关的推荐资源也下发到终端设备,当然,当用户在选择实体B后,服务设备还可以下发与实体B相关联的另一个实体C以及D。这样,用户虽然只输入了一次实体A,但是终端设备上可呈现除了实体A以外的实体B、实体C、实体D的推荐资,丰富了推荐资源的多样性。In some embodiments, the search for the associated entity from the target entity is to broaden the recommended resources related to the user's voice input command. For example, when the target entity is A, the service device will return the recommended resources related to A to the terminal device, and these recommended resources are all related to A. Based on the above purpose of expanding the recommended resources, when the target entity input by the user is A, the service device also returns another entity B associated with A, which can also be selected by the user. When the user still has B based on the recommended content When B is selected, the service device will also deliver B-related recommended resources to the terminal device. Of course, after the user selects entity B, the service device can also deliver another entity C and D associated with entity B. In this way, although the user only inputs entity A once, the terminal device can present recommended resources of entity B, entity C, and entity D other than entity A, which enriches the diversity of recommended resources.
在一个例子中,显示设备输出关联实体可包括:通过语音输出关联实体、通过显示器显示关联实体等多种方式。下文结合图6A-6G举例描述,在此暂不赘述。In one example, the display device outputting the associated entity may include: outputting the associated entity through a voice, displaying the associated entity through a display, and the like. The following description is given by way of example with reference to FIGS. 6A-6G , and details are not repeated here.
通过图5所示流程,显示设备可以将接收到的查询语句发送至服务设备,以获取服务设备依据该查询语句查找到的关联实体并输出。由此,可在显示设备与用户的交互过程中,针对输入显示设备的查询语句实现较为全面的关联推荐。Through the process shown in FIG. 5 , the display device can send the received query statement to the service device, so as to obtain and output the associated entity found by the service device according to the query statement. In this way, during the interaction between the display device and the user, a relatively comprehensive association recommendation can be implemented for the query sentence input to the display device.
图6A-6G中示例性示出了输出关联实体时显示器显示画面的示意图,下面结合图6A-6G对上述步骤S02中,显示设备如何输出关联实体进行举例描述:Figures 6A-6G exemplarily show schematic diagrams of the display screen when the associated entity is output. The following describes how the display device outputs the associated entity in the above step S02 with reference to Figures 6A-6G:
在一个例子中,服务设备以实体信息的形式返回关联实体,作为一个实施例,显示设备输出关联实体可包括:通过显示器显示关联实体的实体信息。上述实体信息可包括:实体名称、实体相关图片等等。这里的实体相关图片,例如,当实体为人物时,实体相关图片可以为人物头像、人物近照等;当实体为影视时,实体相关图片可以为影视封面等;当 实体为游戏时,实体相关图片可以为游戏图标;等等。In an example, the service device returns the associated entity in the form of entity information. As an embodiment, the displaying device outputting the associated entity may include: displaying the entity information of the associated entity through a display. The above entity information may include: entity name, entity-related pictures, and the like. The entity-related pictures here, for example, when the entity is a person, the entity-related picture can be a person's avatar, a recent photo of the person, etc.; when the entity is a film and television, the entity-related picture can be a film and television cover, etc.; when the entity is a game, the entity-related pictures The image can be a game icon; etc.
每一个实体对应一个推荐资源入口,实体可以被选择,当接收用户的选择特定实体后,触发进入该资源的入口,将用户的选择发送至服务设备,服务设备根据被选择的实体返回对应的推荐资源。Each entity corresponds to a recommended resource entry, and the entity can be selected. After receiving the user's selection of a specific entity, the entry into the resource is triggered, and the user's selection is sent to the service device, and the service device returns the corresponding recommendation according to the selected entity. resource.
图6A中示例性示出了显示设备在输出关联实体时提供的一个GUI的示意图。FIG. 6A exemplarily shows a schematic diagram of a GUI provided by the display device when outputting the associated entity.
如图6A所示,显示设备可向显示器提供GUI600,该GUI600中包括用于展示关联实体的关联实体展示区61,该展示区中包括项目611-618,分别对应关联实体1-8。项目611-618可具体显示为关联实体的名称和/或相关图片。As shown in FIG. 6A, the display device may provide a GUI 600 to the display, the GUI 600 includes an associated entity display area 61 for displaying associated entities, and the display area includes items 611-618, which correspond to associated entities 1-8, respectively. Items 611-618 may be specifically displayed as names and/or related pictures of associated entities.
作为一个实施例,从服务设备获取的关联实体的实体信息中可包括关联实体所属的业务领域,这里的业务领域也可称为实体类别,比如人物、影视、音乐等。显示设备可根据关联实体所属的业务领域,在不同的区域内显示不同业务领域的关联实体。如图6B所示,关联实体展示区进一步分为两个区域,分别布置有属于人物的关联实体和属于影视的关联实体,其中,实体1-4均属于人物,实体5-8均属于影视。As an embodiment, the entity information of the associated entity obtained from the service device may include a business domain to which the associated entity belongs, and the business domain here may also be referred to as an entity category, such as characters, movies, music, and so on. The display device may display associated entities of different business fields in different areas according to the business fields to which the associated entities belong. As shown in FIG. 6B , the associated entity display area is further divided into two areas, where associated entities belonging to characters and associated entities belonging to movies are arranged respectively, wherein entities 1-4 belong to characters, and entities 5-8 belong to movies.
在一个实施例中,显示设备可将从服务设备获取的关联实体中的至少一个关联实体作为重点显示的关联实体。相比其他关联实体,显示设备可对于重点显示的关联实体显示更多的实体信息、占用更多的显示面积来显示等等。如图6C所示,实体1为重点显示的关联实体。作为一个实施例,可将服务设备返回的关联实体中的首个作为重点显示的关联实体。In one embodiment, the display device may use at least one associated entity among the associated entities acquired from the service device as a focused associated entity to display. Compared with other associated entities, the display device can display more entity information, occupy more display area for display, and so on, for the highlighted associated entities. As shown in FIG. 6C , entity 1 is an associated entity that is highlighted. As an embodiment, the first associated entity among the associated entities returned by the service device may be used as the highlighted associated entity.
在一个例子中,显示设备输出关联实体可包括:通过语音输出关联实体的实体信息。作为一个实施例,显示设备可根据预设的文本模板和关联实体的实体信息,生成待语音输出的文本,并将该文本通过语音输出。以文本模板为“为您推荐[实体名称]”、关联实体的实体名称为“人物A”为例,则根据该文本模板和关联实体的实体名称生成的待语音输出的文本为“为您推荐人物A”。作为另一个实施例,显示设备可从服务设备获取待语音输出的文本并输出。作为一个实施例,显示设备语音输出关联实体时,可在显示器上显示该语音输出对应的文本。In one example, the displaying device outputting the associated entity may include: outputting entity information of the associated entity through voice. As an embodiment, the display device may generate the text to be outputted by voice according to a preset text template and entity information of the associated entity, and output the text by voice. Taking the text template as "recommend [entity name] for you" and the entity name of the associated entity as "person A", the text to be outputted by voice generated according to the text template and the entity name of the associated entity is "recommended for you" Person A". As another embodiment, the display device may acquire and output the text to be outputted by voice from the service device. As an embodiment, when the display device voice outputs the associated entity, the text corresponding to the voice output may be displayed on the display.
在一个例子中,显示设备输出关联实体可包括:通过语音输出关联实体并通过显示器显示关联实体,下面结合图6D-6E进行举例描述。In one example, outputting the associated entity by the display device may include: outputting the associated entity through a voice and displaying the associated entity through a display, which will be described below with reference to FIGS. 6D-6E as examples.
作为一个实施例,通过语音输出的关联实体可为显示器显示的关联实体中的一个。如图6D所示,显示设备向显示器提供的GUI600中还包括语音文本展示区62,用于展示语音输出对应的文本。图6D中,语音文本展示区62所展示的文本为语音输出实体1对应的文本,该实体1为在关联实体展示区61中重点显示的一个关联实体。As an embodiment, the associated entity output through the voice may be one of the associated entities displayed on the display. As shown in FIG. 6D , the GUI 600 provided by the display device to the display further includes a voice text display area 62 for displaying the text corresponding to the voice output. In FIG. 6D , the text displayed in the voice text display area 62 is the text corresponding to the voice output entity 1 , and the entity 1 is an associated entity that is highlighted in the associated entity display area 61 .
作为一个实施例,通过语音输出的关联实体可为显示器显示的关联实体中的至少两个关联实体。如图6E所示,语音文本展示区62所展示的文本为语音输出实体1-4对应的文本,该实体1-4为在关联实体展示区61中显示的多个关联实体。As an embodiment, the related entities output through voice may be at least two related entities among the related entities displayed on the display. As shown in FIG. 6E , the text displayed in the voice text display area 62 is the text corresponding to the voice output entities 1 - 4 , and the entities 1 - 4 are a plurality of related entities displayed in the related entity display area 61 .
在一个例子中,显示设备从服务设备获取关联实体时,还获取该关联实体对应目标实体。作为一个实施例,显示设备可语音输出该目标实体,并通过显示器显示该目标实体和关联实体。In one example, when the display device acquires the associated entity from the service device, it also acquires the target entity corresponding to the associated entity. As an embodiment, the display device may output the target entity by voice, and display the target entity and the associated entity through the display.
如图6F所示,显示设备向显示器提供的GUI600中还包括目标实体展示区63,用于展示目标实体。具体的,该目标实体展示区63可用于展示目标实体的实体信息。图6F中,目标实体展示区63中展示有作为目标实体的实体A,语音文本展示区62所展示的文本为 语音输出实体A对应的文本,关联实体展示区61中展示有实体A对应的关联实体。As shown in FIG. 6F , the GUI 600 provided by the display device to the display further includes a target entity display area 63 for displaying the target entity. Specifically, the target entity display area 63 can be used to display entity information of the target entity. In FIG. 6F , the target entity display area 63 displays the entity A as the target entity, the text displayed in the voice text display area 62 is the text corresponding to the voice output entity A, and the association entity display area 61 displays the association corresponding to the entity A entity.
在一个例子中,在输出关联实体时,显示设备还可通过显示器显示步骤S01中接收到的查询语句的文本。如图6G所示,显示设备向显示器提供的GUI600中还包括查询语句展示区64,用于展示接收到的查询语句的文本。作为一个实施例,查询语句的文本可为显示设备调用语音识别服务对查询语句识别得到的文本。In one example, when outputting the associated entity, the display device may further display the text of the query statement received in step S01 through the display. As shown in FIG. 6G , the GUI 600 provided by the display device to the display further includes a query statement display area 64 for displaying the text of the received query statement. As an embodiment, the text of the query statement may be the text obtained by calling the speech recognition service on the display device to recognize the query statement.
在一个例子中,显示设备从服务设备获取关联实体时,还可获取查询语句的查询结果,这里查询结果的获取可参考上文基于图6所示架构的描述。在一个实施例中,显示设备可将该查询结果与关联实体分别显示在显示器上的不同区域,在此不再详细描述。In an example, when the display device acquires the associated entity from the service device, it can also acquire the query result of the query statement. Here, for the acquisition of the query result, reference may be made to the above description based on the architecture shown in FIG. 6 . In one embodiment, the display device may respectively display the query result and the associated entity in different areas on the display, which will not be described in detail here.
需要说明的是,在通过以上各实施例输出关联实体时,可分别使用各实施例,也可以将各实施例结合使用,本申请对此不具体限制。而且,在实际应用时,显示设备输出关联实体还有多种实现方式,以上实施例只是举例,并非用于限定。It should be noted that, when outputting an associated entity through the above embodiments, each embodiment may be used separately, or each embodiment may be used in combination, which is not specifically limited in the present application. Moreover, in practical application, there are multiple implementation manners for the display device to output the associated entity, and the above embodiments are only examples, and are not intended to be limiting.
图7中示例性示出了应用于服务设备的关联推荐方法流程图。如图7所示,该流程包括如下步骤:FIG. 7 exemplarily shows a flowchart of an association recommendation method applied to a service device. As shown in Figure 7, the process includes the following steps:
步骤S11,服务设备接收来自显示设备的查询语句,并确定该查询语句是否满足预设的关联推荐条件;若满足,则依据该查询语句确定目标实体。Step S11, the service device receives the query statement from the display device, and determines whether the query statement satisfies the preset association recommendation condition; if so, determines the target entity according to the query statement.
作为一个实施例,服务设备接收到来自显示设备的查询语句后,可对该查询语句进行语义解析,以便后续判断该查询语句是否满足关联推荐条件。在一个实施例中,服务设备可通过部署的语义服务对查询语句进行语义解析。本申请对具体的语义解析过程不进行限制。As an embodiment, after receiving the query statement from the display device, the service device may perform semantic analysis on the query statement, so as to subsequently determine whether the query statement satisfies the associated recommendation condition. In one embodiment, the service device may perform semantic parsing on the query statement through the deployed semantic service. This application does not limit the specific semantic parsing process.
在实际应用时,依据查询语句确定目标实体有多种实现方式。在一个例子中,对于满足预设关联推荐条件的查询语句,若该查询语句中包含实体名称,则可将该查询语句中包含的实体名称对应的实体确定为目标实体;若该查询语句中不包含实体名称,则以该查询语句为当前查询语句,依据当前查询语句的前一查询语句确定目标实体。这里的前一查询语句与当前查询语句来自同一显示设备,依据前一查询语句确定目标实体的过程,可参照上述依据当前查询语句确定目标实体的过程。In practical application, there are many ways to determine the target entity according to the query statement. In one example, for a query statement that satisfies the preset association recommendation conditions, if the query statement contains an entity name, the entity corresponding to the entity name contained in the query statement can be determined as the target entity; if the query statement does not contain an entity name If the entity name is included, the query statement is used as the current query statement, and the target entity is determined according to the previous query statement of the current query statement. The previous query statement and the current query statement here come from the same display device, and the process of determining the target entity according to the previous query statement can refer to the above-mentioned process of determining the target entity according to the current query statement.
作为一个实施例,可将在当前查询语句之前预设时间内接收到的,且距离当前查询语句最近接收到的查询语句确定为前一查询语句,若不存在前一查询语句,则可将预先设置的默认实体确定为目标实体。As an example, the query statement received within a preset time before the current query statement and received most recently from the current query statement may be determined as the previous query statement, and if there is no previous query statement, the query statement received in advance may be determined as the previous query statement The default entity set is determined as the target entity.
为便于理解,下面结合如何确定查询语句是否满足预设的关联推荐条件,举例描述如何依据查询语句确定目标实体:For ease of understanding, the following describes how to determine the target entity based on the query statement, in conjunction with how to determine whether the query statement satisfies the preset association recommendation conditions:
在一个例子中,当查询语句为单个实体名称时,确定满足预设的关联推荐条件。这里的实体名称,比如:人物名、影视名、音乐名、游戏名、美食名等。作为一个实施例,在确定查询语句为单个实体名称后,可将该单个实体名称对应的实体确定为目标实体。In one example, when the query statement is a single entity name, it is determined that a preset association recommendation condition is satisfied. The entity name here, such as: character name, movie name, music name, game name, food name, etc. As an embodiment, after the query statement is determined to be a single entity name, the entity corresponding to the single entity name may be determined as the target entity.
在另一个例子中,当无法查找到查询语句所要获取的信息时,确定该查询语句满足预设的关联推荐条件。这里的无法查找到查询语句所要获取的信息,以查询语句为“人物A的女儿是谁?”为例,若服务设备并未查找到人物A的女儿的信息,则可确定无法查找到该查询语句所要获取的信息。作为一个实施例,当无法查找到查询语句所要获取的信息时,服务设备可将该查询语句中包含的实体确定为目标实体。当无法查找到查询语句所要获取的信息时,比起单纯返回这一查询结果,返回查询的相关信息能够实现较好的用户体验。In another example, when the information to be acquired by the query statement cannot be found, it is determined that the query statement satisfies the preset association recommendation condition. Here, the information to be obtained by the query statement cannot be found. Taking the query statement as "who is the daughter of person A?" as an example, if the service device does not find the information of the daughter of person A, it can be determined that the query cannot be found. The information to be obtained by the statement. As an embodiment, when the information to be acquired by the query statement cannot be found, the service device may determine the entity included in the query statement as the target entity. When the information to be obtained by the query statement cannot be found, returning the relevant information of the query can achieve a better user experience than simply returning the query result.
在另一个例子中,当查询语句不具有明确语义时,确定满足预设的关联推荐条件。举 例来说,这里不具有明确语义的查询语句可为“那个”、“我想”等。作为一个实施例,当查询语句不具有明确语义时,服务设备可将已接收的该查询语句的前一查询语句中包含的实体名称对应的实体确定为目标实体。一般来说,用户会在需求不明确、无法准确描述需求等情况下,输入不具有明确语义的查询语句,此时针对用户之前输出的查询语句进行关联推荐,能够帮助用户发现所需的信息,以及引导用户进行下一次查询。In another example, when the query statement does not have clear semantics, it is determined that a preset association recommendation condition is satisfied. For example, query statements that do not have explicit semantics here can be "that", "I think", and so on. As an embodiment, when the query statement does not have explicit semantics, the service device may determine the entity corresponding to the entity name contained in the previous query statement of the received query statement as the target entity. Generally speaking, when the requirements are not clear and the requirements cannot be accurately described, users will input query statements without clear semantics. At this time, relevant recommendations are made for the query statements previously output by the user, which can help users find the required information. As well as guide the user to the next query.
在另一个例子中,当一定时间内接收到的来自同一显示设备的语义相同的查询语句的数量达到阈值时,确定满足预设的关联推荐条件。作为一个实施例,当两个查询语句的语义相似度达到阈值时,可确定两个查询语句的语义相同。作为一个实施例,服务设备可将语义相同的查询语句中包含的实体确定为目标实体。语义相同的查询语句的数量达到阈值,说明用户向显示设备多次输入了语义相同的查询语句,一般来说,出现这种情况是由于用户已进行的查询没有得到想要的查询结果,在这种情况下进行关联推荐,比起单纯返回相同的查询结果,能够实现更好的用户体验。In another example, when the number of query statements with the same semantics received from the same display device within a certain period of time reaches a threshold, it is determined that a preset association recommendation condition is satisfied. As an embodiment, when the semantic similarity of the two query statements reaches a threshold, it may be determined that the semantics of the two query statements are the same. As an embodiment, the service device may determine the entity contained in the query statement with the same semantics as the target entity. The number of query statements with the same semantics reaches the threshold, which means that the user has input query statements with the same semantics to the display device multiple times. Generally speaking, this happens because the query that the user has performed does not get the desired query result. In this case, the association recommendation can achieve a better user experience than simply returning the same query results.
需要说明的是,在通过以上实施例确定查询语句是否满足预设的关联推荐条件时,可以分别单独使用各实施例,也可将至少两个实施例结合使用。在结合使用时,作为一个实施例,当查询语句不满足结合使用的各实施例中的所有关联推荐条件时,可确定其不满足关联推荐条件。上述实施例只是示例,实际应用中易于想到的其他实现方式,在此不再一一详述。It should be noted that, when determining whether the query statement satisfies the preset association recommendation condition through the above embodiments, each embodiment may be used separately, or at least two embodiments may be used in combination. When used in combination, as an embodiment, when the query statement does not satisfy all the association recommendation conditions in the embodiments used in combination, it may be determined that it does not satisfy the association recommendation conditions. The above embodiments are only examples, and other implementation manners that are easy to think of in practical applications will not be described in detail here.
步骤S12,按照预设的关联推荐规则,在已建立的知识图谱中查找目标实体对应的关联实体。Step S12, according to the preset association recommendation rule, search for the associated entity corresponding to the target entity in the established knowledge graph.
本步骤S12在上述步骤S11中确定查询语句满足关联推荐条件,且已依据该查询语句确定出目标实体的情况下执行。This step S12 is executed when it is determined in the above step S11 that the query statement satisfies the association recommendation condition, and the target entity has been determined according to the query statement.
在一个例子中,本步骤S12中的关联推荐规则包括:目标实体所属的业务领域对应的关联推荐规则。作为一个实施例,服务设备中设置有业务领域和关联推荐规则的对应关系。在按照关联推荐规则查找目标实体对应的关联实体前,服务设备可确定目标实体所属的业务领域,并在业务领域和关联推荐规则的对应关系中查找该业务领域对应的关联推荐规则。作为一个实施例,目标实体所属的业务领域可通过多种方式确定,例如,根据目标实体的业务领域属性的属性值确定目标实体的业务领域、根据目标实体的标签确定目标实体的业务领域等等。In an example, the association recommendation rules in this step S12 include: association recommendation rules corresponding to the business domain to which the target entity belongs. As an embodiment, the service device is provided with a corresponding relationship between a business domain and an association recommendation rule. Before searching for the associated entity corresponding to the target entity according to the associated recommendation rule, the service device may determine the business domain to which the target entity belongs, and search for the associated recommendation rule corresponding to the business domain in the correspondence between the business domain and the associated recommendation rule. As an embodiment, the business domain to which the target entity belongs can be determined in various ways, for example, determining the business domain of the target entity according to the attribute value of the business domain attribute of the target entity, determining the business domain of the target entity according to the tag of the target entity, and so on. .
在一个实施例中,业务领域对应的关联推荐规则可根据大量用户输入的查询语句分析确定。例如,可获取大量用户输入的相邻查询语句,以分析用户的查询的实体间存在的关联等。作为一个实施例,可每隔一定时间,根据该一定时间内用户输入的查询语句对关联推荐规则进行适当调整。In one embodiment, the association recommendation rule corresponding to the business domain may be determined according to the analysis of query sentences input by a large number of users. For example, a large number of adjacent query statements input by the user can be obtained to analyze the relationship existing among the entities queried by the user, and the like. As an embodiment, the association recommendation rule may be appropriately adjusted according to the query statement input by the user within a certain period of time.
具体如何按照关联推荐规则在知识图谱中查找目标实体对应的关联实体,下文举例描述,在此暂不赘述。Specifically, how to find the associated entity corresponding to the target entity in the knowledge graph according to the association recommendation rule is described below with an example, and will not be repeated here.
在一个例子中,目标实体所属的业务领域可对应一条关联推荐规则,也可对应至少两条关联推荐规则。In one example, the business domain to which the target entity belongs may correspond to one association recommendation rule, or may correspond to at least two association recommendation rules.
当目标实体所属的业务领域对应一条关联推荐规则时,作为一个实施例,服务设备可按照该关联推荐规则在知识图谱中查找目标实体对应的关联实体。When the business domain to which the target entity belongs corresponds to an association recommendation rule, as an embodiment, the service device may search the knowledge graph for the associated entity corresponding to the target entity according to the association recommendation rule.
当目标实体所属的业务领域对应至少两条关联推荐规则时,作为一个实施例,服务设备可分别按照上述至少两条关联推荐规则在知识图谱中查找目标实体对应的关联实体。作 为一个实施例,服务设备向显示设备返回的各关联实体具有一定的顺序,对于分别按照上述至少两条关联推荐规则查找到的相同的关联实体,在排序时可将其放在各关联实体的前端。When the business domain to which the target entity belongs corresponds to at least two association recommendation rules, as an embodiment, the service device may search the knowledge graph for the associated entity corresponding to the target entity according to the at least two association recommendation rules. As an embodiment, the associated entities returned by the service device to the display device are in a certain order. For the same associated entities found according to the above at least two association recommendation rules, they can be placed in the respective associated entities during sorting. front end.
当目标实体所属的业务领域对应至少两条关联推荐规则时,作为另一个实施例,服务设备可按照上述至少两条关联推荐规则中的一条查找目标实体对应的关联实体,并在查找到的关联实体不符合预设条件时,进一步按照上述至少两条关联推荐规则中的其他关联推荐规则进行查找。这里的预设条件可包括:查找到的关联实体数量小于阈值等。When the business domain to which the target entity belongs corresponds to at least two association recommendation rules, as another embodiment, the service device may search for the associated entity corresponding to the target entity according to one of the above at least two association recommendation rules, and, in the found association, When the entity does not meet the preset conditions, the search is further performed according to other association recommendation rules in the above at least two association recommendation rules. The preset conditions here may include: the number of found associated entities is less than a threshold, and the like.
通过图7所示流程,从服务设备的角度描述了本申请实施例提供的关联推荐方法,通过图7所示流程,能够对不同业务领域的目标实体按照不同的关联推荐规则进行推荐。Through the process shown in FIG. 7 , the association recommendation method provided by the embodiment of the present application is described from the perspective of a service device. Through the process shown in FIG. 7 , target entities in different business fields can be recommended according to different association recommendation rules.
在一个例子中,服务设备可通过多个模块执行图7所示流程。作为一个实施例,服务设备可包括接收模块和关联推荐模块。其中,接收模块,用于接收来自显示设备的查询语句;关联推荐模块,用于确定该查询语句是否满足预设的关联推荐条件;若满足,则依据该查询语句确定目标实体,并按照预设的关联推荐规则,在知识图谱中查找该目标实体对应的关联实体。In one example, the service device may execute the process shown in FIG. 7 through multiple modules. As an embodiment, the service device may include a receiving module and an association recommendation module. Among them, the receiving module is used to receive the query statement from the display device; the association recommendation module is used to determine whether the query statement satisfies the preset association recommendation condition; The association recommendation rule of , finds the associated entity corresponding to the target entity in the knowledge graph.
下面对图7所示流程中,如何按照关联推荐规则在知识图谱中查找目标实体对应的关联实体进行举例描述:In the process shown in Figure 7, how to find the associated entity corresponding to the target entity in the knowledge graph according to the association recommendation rule is described as an example:
在一个例子中,业务领域可包括人物、影视、音乐、游戏和美食中的至少一个。下面对各业务领域对应的关联推荐规则进行举例描述:In one example, the business domain may include at least one of characters, movies, music, games, and food. The following is an example description of the association recommendation rules corresponding to each business field:
作为一个实施例,人物对应的关联推荐规则可包括:推荐与目标实体具有指定人物关系的人物实体,这里的指定人物关系可包括:配偶、子女、父母、队友、师徒等;推荐与目标实体属于相同职业的人物,这里的相同职业可包括:医生、影视演员、歌手、运动员等,对于某些具有多个下级分类的职业,可将不同的下级分类分别确定为不同的职业。比如对于运动员,其具有按照不同运动项目划分的多个下级分类,如:篮球运动员、足球运动员、乒乓球运动员等,可将不同下级分类分别视为不同职业。As an embodiment, the association recommendation rule corresponding to a character may include: recommending a character entity that has a specified character relationship with the target entity, where the specified character relationship may include: spouse, child, parent, teammate, mentor, etc.; recommending a character entity with the target entity Characters belonging to the same occupation, the same occupation here may include: doctors, film and television actors, singers, athletes, etc. For some occupations with multiple subclasses, different subclasses can be determined as different occupations respectively. For example, an athlete has multiple sub-categories according to different sports, such as basketball players, football players, table tennis players, etc., and different sub-categories can be regarded as different occupations respectively.
作为一个实施例,影视对应的关联推荐规则可包括:推荐与目标实体属于相同影视类型的影视;推荐目标实体的主演;推荐目标实体的导演;推荐与目标实体的主演相同的影视;推荐目标实体的导演所导演的其他影视;等等。As an embodiment, the association recommendation rules corresponding to movies may include: recommend movies of the same movie type as the target entity; recommend the star of the target entity; recommend the director of the target entity; recommend the same movie as the star of the target entity; recommend the target entity other films directed by the director;
作为一个实施例,音乐对应的关联推荐规则可包括:推荐与目标实体属于相同音乐风格的音乐,在推荐时,可优先推荐与目标实体名称相似度高的音乐这里,音乐风格可包括:国风、流行、古典、抒情等;推荐与目标实体的原唱歌手相同的音乐;推荐与目标实体的作词人相同的音乐;推荐与目标实体的作曲人相同的音乐;推荐由非原唱歌手所演唱的目标实体;等等。As an embodiment, the associated recommendation rule corresponding to music may include: recommending music belonging to the same music style as the target entity, and recommending music with a high similarity in name to the target entity when recommending. Here, the music style may include: national style , pop, classical, lyrical, etc.; recommends the same music as the original singer of the target entity; recommends the same music as the target entity's lyricist; recommends the same music as the target entity's composer; recommends singing by a non-original singer the target entity; etc.
作为一个实施例,游戏对应的关联推荐规则可包括:推荐与目标实体属于相同游戏类型的游戏;推荐与目标实体属于相同主题的游戏。上述游戏类型可包括:第一人称射击、益智、策略、角色扮演等,上述主题可包括:战争、策略、时尚等。As an embodiment, the association recommendation rule corresponding to the game may include: recommending games that belong to the same game type as the target entity; recommending games that belong to the same theme as the target entity. The above-mentioned game types may include: first-person shooter, puzzle, strategy, role-playing, etc., and the above-mentioned themes may include: war, strategy, fashion, etc.
作为一个实施例,美食对应的关联推荐规则可包括:推荐与目标实体属于相同菜系的美食;推荐与目标实体属于相同口味的美食。上述菜系可包括中国传统的八大菜系,也可包括北京菜、东北菜等其他菜系。上述口味可包括:酸、甜、苦、辣、咸、鲜中的一种或组合。As an embodiment, the associated recommendation rule corresponding to the food may include: recommending the food belonging to the same cuisine as the target entity; recommending the food belonging to the same taste as the target entity. The above-mentioned cuisines may include the eight traditional Chinese cuisines, and may also include other cuisines such as Beijing cuisine and Northeastern cuisine. The above-mentioned tastes may include: one or a combination of sour, sweet, bitter, spicy, salty, and fresh.
上述各实施例中的关联推荐规则中的目标实体为依据查询语句确定出的实体。The target entity in the association recommendation rule in the above embodiments is the entity determined according to the query statement.
在一个例子中,按照关联推荐规则在知识图谱中查找目标实体对应的关联实体可包括:依据目标实体所属的业务领域,以及目标实体与其他实体的关联关系和/或目标实体具有的属性,在知识图谱中确定目标实体对应的关联实体。In one example, searching for the associated entity corresponding to the target entity in the knowledge graph according to the association recommendation rule may include: according to the business domain to which the target entity belongs, the association relationship between the target entity and other entities and/or the attributes possessed by the target entity, in the Determine the associated entity corresponding to the target entity in the knowledge graph.
作为一个实施例,可依据目标实体所属的业务领域,在知识图谱中查找与该目标实体具有指定关联关系的实体,并将查找到的实体确定为目标实体对应的关联实体;也可依据目标实体所属的业务领域,在知识图谱中查找与目标实体具有相同的指定属性值的实体,将查找到的实体确定为目标实体对应的关联实体。As an embodiment, according to the business domain to which the target entity belongs, an entity with a specified association relationship with the target entity can be searched in the knowledge graph, and the found entity can be determined as the associated entity corresponding to the target entity; The business domain to which it belongs, searches the knowledge graph for entities with the same specified attribute value as the target entity, and determines the found entity as the associated entity corresponding to the target entity.
上述指定关系、指定属性值可依据目标实体所属业务领域对应的关联推荐规则确定。例如,若目标实体所属的业务领域为人物,则可按照人物对应的关联推荐规则,确定指定关系为指定人物关系,并在知识图谱中查找与目标实体的关系为指定人物关系的实体,将查找到的实体确定为目标实体的关联实体;也可按照人物对应的关联推荐规则,确定指定属性值为目标实体的“职业属性值”,并在知识图谱中查找具有该指定属性值的实体,将查找到的实体确定为目标实体的关联实体。The above-mentioned specified relationship and specified attribute value may be determined according to the association recommendation rule corresponding to the business domain to which the target entity belongs. For example, if the business field to which the target entity belongs is a person, the specified relationship can be determined to be a specified person relationship according to the association recommendation rules corresponding to the person, and the entity whose relationship with the target entity is a specified person relationship can be searched in the knowledge graph. The received entity is determined to be the associated entity of the target entity; it is also possible to determine the “occupational attribute value” of the target entity with the specified attribute value according to the association recommendation rules corresponding to the character, and find the entity with the specified attribute value in the knowledge graph, The found entity is determined to be the associated entity of the target entity.
在一个实施例中,知识图谱可以为基于Neo4j、TigerGraph、OrientDB等工具构建的知识图谱。下面以基于Neo4j构建的知识图谱为例,对具体如何在知识图谱中查找目标实体对应的关联实体进行举例描述:In one embodiment, the knowledge graph may be a knowledge graph constructed based on tools such as Neo4j, TigerGraph, and OrientDB. The following takes the knowledge graph constructed based on Neo4j as an example to describe how to find the associated entity corresponding to the target entity in the knowledge graph:
在一个例子中,对于基于Neo4j构建的知识图谱,可通过规则表达关系链在该知识图谱中查找指定实体。该规则表达关系链可通过对实体的属性、实体与实体间关系等方面进行限定,查找指定实体。作为一个实施例,服务设备可根据关联推荐规则生成规则表达关系链,以在知识图谱中查找目标实体对应的关联实体。In one example, for a knowledge graph constructed based on Neo4j, a specified entity can be searched in the knowledge graph through a rule expression relationship chain. The rule expresses the relationship chain and can search for the specified entity by defining the attributes of the entity, the relationship between the entity and the entity, etc. As an embodiment, the service device may generate a rule expression relationship chain according to the association recommendation rule, so as to find the associated entity corresponding to the target entity in the knowledge graph.
在根据关联推荐规则生成规则表达关系链时,作为一个实施例,服务设备可依据预设的关联推荐规则和规则表达关系链模板的对应关系,确定目标实体所属业务领域对应的关联推荐规则对应的规则表达关系链模板,该规则表达关系链模板中包括需要输入关键词的部分;服务设备可获取目标实体的指定属性值作为关键词,输入到确定出的规则表达关系链模板中,生成规则表达关系链。When generating a rule expression relationship chain according to an association recommendation rule, as an embodiment, the service device may determine the corresponding relationship between the association recommendation rule corresponding to the business domain to which the target entity belongs, according to the preset association recommendation rule and the corresponding relationship between the rule expression relationship chain template. A rule expression relationship chain template, which includes a part that needs to input keywords; the service device can obtain the specified attribute value of the target entity as a keyword, input it into the determined rule expression relationship chain template, and generate a rule expression relationship chain.
作为一个实施例,通过规则表达关系链模板,还可对查找到的关联实体的数量、顺序进行限定。As an embodiment, by expressing a relationship chain template by a rule, the number and order of the found associated entities may also be limited.
为便于理解上述内容,下面结合具体的例子进行描述:In order to facilitate the understanding of the above content, the following description is combined with specific examples:
例如:目标实体为糖醋里脊,目标实体所属业务领域为美食,美食对应的关联推荐规则为:推荐与目标实体属于相同菜系的美食,则服务设备查找与“推荐与目标实体属于相同菜系的美食”对应的规则表达关系链模板。For example: the target entity is sweet and sour pork loin, the business field of the target entity is gourmet, and the associated recommendation rule corresponding to the gourmet is: recommend the gourmet that belongs to the same cuisine as the target entity, then the service device searches for the gourmet that is the same as the "recommended and the target entity belongs to the same cuisine" "The corresponding rule expression relationship chain template.
假设查找到的规则表达关系链模板如下:Suppose the found rule expression relationship chain template is as follows:
“match(n)-[r:relate]-(m)-[t:relate]-(s:'美食')where id(n)=ENTITY and r.name='菜系'and m.name='[菜系属性值]'and t.name='菜系'and n.name='[名称属性值]'and s.describeNum>50 RETURN s order by s.describeNum LIMIT 10”。"match(n)-[r:relate]-(m)-[t:relate]-(s:'food')where id(n)=ENTITY and r.name='cuisine'and m.name=' [cuisine attribute value]'and t.name='cuisine'and n.name='[name attribute value]'and s.describeNum>50 RETURN s order by s.describeNum LIMIT 10".
该规则表达关系链用于查找所属业务领域为美食、所属菜系为[菜系属性值]的实体。其中,[菜系属性值]、[名称属性值]为需要输入关键词的部分。The rule expression relationship chain is used to find entities whose business domain is cuisine and whose cuisine is [cuisine attribute value]. Among them, [cuisine attribute value], [name attribute value] are the parts that need to input keywords.
首先简单描述该规则表达关系链模板中部分内容的含义:First, briefly describe the meaning of some content in the rule expression relationship chain template:
“(n)-[r:relate]-(m)-[t:relate]-(s:'美食')”表示实体n与实体m存在关系r,实体m与实体s存在关系t;"(n)-[r:relate]-(m)-[t:relate]-(s:'food')" means that entity n has relationship r with entity m, and entity m has relationship t with entity s;
“r.name='菜系'”表示关系r的名称为菜系,“t.name='菜系'”表示关系t的名称为菜系,“n.name='[名称属性值]'”表示实体n的名称为[名称属性值],“m.name='[菜系属性值]'”表示m的名称为[菜系属性值];"r.name='Cuisine'" means that the name of the relation r is a cuisine, "t.name='Cuisine'" means that the name of the relation t is a cuisine, and "n.name='[name attribute value]'" means that the entity n The name of m is [name attribute value], "m.name='[cuisine attribute value]'" means the name of m is [cuisine attribute value];
“RETURN s”表示输出的实体为该规则表达关系链模板中s表示的实体;“order by s.describeNum”表示根据describeNum属性对输出的实体进行排序;“LIMIT 10”表示限定输出的实体数量为10。"RETURN s" indicates that the output entity is the entity represented by s in the rule expression relationship chain template; "order by s.describeNum" indicates that the output entities are sorted according to the describeNum attribute; "LIMIT 10" indicates that the number of output entities is limited to 10.
根据上述规则表达关系链模板,服务设备可获取目标实体糖醋里脊的“菜系”属性的属性值、“名称”属性的属性值作为关键词,将该关键词输入该规则表达关系链模板中生成规则表达关系链。According to the above rule expression relationship chain template, the service device can obtain the attribute value of the "cuisine" attribute and the attribute value of the "name" attribute of the target entity sweet and sour pork loin as a keyword, and input the keyword into the rule expression relationship chain template to generate Rules express chains of relationships.
以糖醋里脊的“菜系”属性的属性值为“浙菜”为例,则生成的规则表达关系链如下:Taking the attribute value of the "cuisine" attribute of sweet and sour pork loin as "Zhejiang cuisine" as an example, the generated rule expression relationship chain is as follows:
“match(n)-[r:relate]-(m)-[t:relate]-(s:'美食')where id(n)=ENTITY and r.name='菜系'and m.name='浙菜'and t.name='菜系'and n.name='糖醋里脊'and s.describeNum>50 RETURN s order by s.describeNum LIMIT 10”。"match(n)-[r:relate]-(m)-[t:relate]-(s:'food')where id(n)=ENTITY and r.name='cuisine'and m.name=' Zhejiang cuisine'and t.name='cuisine'and n.name='sweet and sour pork loin'and s.describeNum>50 RETURN s order by s.describeNum LIMIT 10".
需要注意的是,上述实施例只是一种示例,实际应用时可能存在其他关联推荐规则,以及其他在知识图谱中查找目标实体对应的关联实体的方式,在此不再一一举例描述。It should be noted that the above embodiment is only an example, and other association recommendation rules may exist in practical application, as well as other ways of finding the associated entity corresponding to the target entity in the knowledge graph, which will not be described one by one here.
如上面实施例所述,显示设备可以将接收到的查询语句发送至服务设备,以使服务设备依据该查询语句确定出需要进行关联推荐的目标实体,并在知识图谱中查找该目标实体对应的关联实体,显示设备获取该关联实体并输出,由此在显示设备与用户的交互过程中,能够针对用户输入的查询语句进行较为丰富、全面的关联推荐,提升用户体验。As described in the above embodiment, the display device can send the received query statement to the service device, so that the service device can determine the target entity that needs to be recommended for association according to the query statement, and search the knowledge graph for the corresponding target entity. The associated entity is obtained by the display device and output, so that during the interaction between the display device and the user, a relatively rich and comprehensive association recommendation can be made for the query statement input by the user, thereby improving the user experience.
以人物为例,图8示例性示出了根据一些实施例的知识图谱的示意图。如图8所示,在知识图谱中,一个节点称为一个实体,实体可以通过客观存在并可互相区别的事物替代,比如可为具体的人、事、物、机构、抽象的概念等。Taking a character as an example, FIG. 8 exemplarily shows a schematic diagram of a knowledge graph according to some embodiments. As shown in Figure 8, in the knowledge graph, a node is called an entity, and the entity can be replaced by things that exist objectively and can be distinguished from each other, such as specific people, things, things, institutions, abstract concepts, etc.
对于知识图谱中的实体而言,在具体实现时可根据实际需求配置实体对应的属性-属性值之间的对应关系。以图8中实体“刘某某”为例,该实体预先被配置的属性可以是:职业、身高、性别等,对应地,属性值可以为:具体的职业类型(以司机为例)、具体的身高值(以180cm为例)、具体的性别(以男性为例)。For entities in the knowledge graph, the corresponding relationship between attributes and attribute values can be configured according to actual requirements during specific implementation. Taking the entity "Liu Moumou" in Fig. 8 as an example, the pre-configured attributes of this entity may be: occupation, height, gender, etc. Correspondingly, the attribute values may be: specific occupation type (taking the driver as an example), specific height value (take 180cm as an example), specific gender (take male as an example).
此外,知识图谱中不同实体之间可通过带有方向的连线连接。该连线可用于表示不同实体之间的语义关系。以图8中实体“刘某某”和实体“赵某某”为例,实体“刘某某”和实体“赵某某”之间的连线为实体“刘某某”指向实体“赵某某”,若该连线对应的语义关系为妻子关系,那么该连线可表示实体“刘某某”的妻子是实体“赵某某”。In addition, different entities in the knowledge graph can be connected by directional lines. This wire can be used to represent semantic relationships between different entities. Taking the entity "Liu Moumou" and the entity "Zhao Moumou" in Figure 8 as an example, the connection between the entity "Liu Moumou" and the entity "Zhao Moumou" is that the entity "Liu Moumou" points to the entity "Zhao Moumou". XX", if the semantic relationship corresponding to the link is a wife relationship, then the link can indicate that the wife of the entity "Ryu Moumou" is the entity "Zhao Moumou".
在一些实施例中,服务设备包括:输入接口和处理器。处理器被配置为:当通过输入接口接收到查询语句时,将该查询语句输入至已配置的问答***,以得到该查询语句对应的回复语句;在已建立的知识图谱中查找到与回复语句相关联的答案实体;依据该答案实体已配置的属性-属性值之间的对应关系,生成推荐语句;该推荐语句包括预设数量N个属性、以及对应的属性值,N大于等于1。In some embodiments, the service device includes: an input interface and a processor. The processor is configured to: when a query statement is received through the input interface, input the query statement into the configured question answering system to obtain a reply statement corresponding to the query statement; find the corresponding reply statement in the established knowledge graph The associated answer entity; according to the corresponding relationship between the configured attributes and attribute values of the answer entity, a recommended sentence is generated; the recommended sentence includes a preset number of N attributes and corresponding attribute values, where N is greater than or equal to 1.
对应地,本实施例也提供了一些实现上述处理器对应操作的方法。请参见图9,为本申请实施例提供的一种信息推荐方法的流程示意图。Correspondingly, this embodiment also provides some methods for implementing corresponding operations of the foregoing processor. Please refer to FIG. 9 , which is a schematic flowchart of an information recommendation method provided by an embodiment of the present application.
如图9所示,该流程可包括以下步骤:As shown in Figure 9, the process may include the following steps:
步骤31,当接收到查询语句时,将查询语句输入至已配置的问答***,以得到查询语句对应的回复语句。Step 31: When the query sentence is received, the query sentence is input into the configured question answering system to obtain a reply sentence corresponding to the query sentence.
在一个例子中,查询语句可以由智能设备向本服务设备输入。即本服务设备与智能设备是两台相互独立的设备,在此情况下,本服务设备可以是服务器。在另一个例子中,查询语句可以由用户直接向本服务设备输入,或者,由用户操作本服务设备的控制装置向本服务设备输入。即本服务设备与前述的智能设备能够被理解为是一台设备。In one example, the query statement may be input to the service device by the smart device. That is, the service device and the smart device are two independent devices. In this case, the service device can be a server. In another example, the query statement may be directly input to the service device by the user, or input to the service device by the user operating the control device of the service device. That is, the service device and the aforementioned smart device can be understood as one device.
需要说明的是,本服务设备所接收到的查询语句可以是语音格式的查询语句、也可以是文本格式的查询语句。It should be noted that the query statement received by the service device may be a query statement in a voice format or a query statement in a text format.
还需要说明的是,上述的智能设备可以是智能音箱、智能电视、手机、电脑、或前述的显示设备等设备,本申请并不对智能设备的具体类型进行限定。It should also be noted that the above-mentioned smart devices may be smart speakers, smart TVs, mobile phones, computers, or the aforementioned display devices and other devices, and the application does not limit the specific types of smart devices.
作为一个示例,上述的查询语句可以通过本服务设备上的输入接口输入至本服务设备。As an example, the above query statement may be input to the service device through an input interface on the service device.
作为一个示例,由于查询语句的具体内容由用户意愿决定,所以查询语句的具体内容多种多样。但是,在实际应用中,服务设备并不能实现为任一查询语句均生成相应的推荐语句,因此,需要预先设置推荐条件以判断是否能够为接收到的查询语句生成推荐语句,并在接收到的查询语句满足上述推荐条件的情况下为该查询语句生成推荐语句。As an example, since the specific content of the query statement is determined by the user's will, the specific content of the query statement is varied. However, in practical applications, the service device cannot generate a corresponding recommendation statement for any query statement. Therefore, it is necessary to set recommendation conditions in advance to determine whether a recommendation statement can be generated for the received query statement, and when the received query statement is received If the query statement satisfies the above recommendation conditions, a recommendation statement is generated for the query statement.
可选的,上述预设的推荐条件可以包括:查询语句中至少包括主实体、以及主实体与待查询的答案实体之间的语义关系,且该语义关系与预设的语义关系相同。Optionally, the preset recommendation condition may include: the query statement includes at least a main entity and a semantic relationship between the main entity and the answer entity to be queried, and the semantic relationship is the same as the preset semantic relationship.
下面对查询语句中的主实体,以及主实体与待查询的答案实体之间的语义关系进行举例说明:The following is an example of the main entity in the query statement and the semantic relationship between the main entity and the answer entity to be queried:
举例来说,当查询语句包括人物和人物关系时,该查询语句中的人物可以作为主实体,人物关系可以作为语义关系。比如,假设查询语句为“姚某的妻子是谁?”,则该查询语句中的主实体便是“姚某”,该主实体“姚某”与待查询的答案实体之间的语义关系便是“妻子”。For example, when a query statement includes a person and a person relationship, the person in the query statement can be used as the main entity, and the person relationship can be used as a semantic relationship. For example, if the query sentence is "Who is Yao's wife?", the main entity in the query sentence is "Yao", and the semantic relationship between the main entity "Yao" and the answer entity to be queried is is "wife".
当然,查询语句中的主实体和语义关系除上述举例的人物和人物关系之外,还可以是地区和职位(比如省长、市长等)、影视作品和作品信息(比如演员、导演、编剧、制片人、主持人等)、歌曲和歌曲信息(比如演唱者、作词者、MV导演、制作人、编曲者等)、国家和统治者/国家领袖(比如总统,首相,总理,副总统,天皇等)、书籍和书籍信息(作者、译者、主编等)、学校和学校信息(校长、知名校友等)等,本申请不对查询语句中所具体包含的主实体和语义关系进行限定。Of course, the main entity and semantic relationship in the query statement can be, in addition to the above examples of characters and character relationships, regions and positions (such as governors, mayors, etc.), film and television works and work information (such as actors, directors, screenwriters, etc.) , producer, host, etc.), songs and song information (e.g. singer, lyricist, MV director, producer, arranger, etc.), countries and rulers/national leaders (e.g. president, prime minister, prime minister, deputy President, Emperor, etc.), books and book information (author, translator, editor-in-chief, etc.), school and school information (principal, famous alumni, etc.), etc. This application does not limit the main entity and semantic relationship specifically included in the query statement .
需要说明的是,上述的预设的推荐条件中的语义关系可以根据实际情况设置,本申请并不对推荐条件中的语义关系进行具体限定。It should be noted that, the semantic relationship in the above-mentioned preset recommendation conditions may be set according to the actual situation, and the present application does not specifically limit the semantic relationship in the recommendation conditions.
在本服务设备接收到查询语句,并判断出该查询语句满足上述预设的推荐条件时,本服务设备会将该查询语句输入至已配置的问答***,以使该问答***输出对应于该查询语句的回复语句。在一个例子中,该回复语句中可以包括该查询语句所查询的答案实体。在另一个例子中,该回复语句中可以携带有该查询语句所查询的答案实体的答案实体ID(下文会对实体ID进行描述)。当然,回复语句还可根据实际情况包括有其它信息,比如查询语句中的主实体、以及查询语句中主实体与待查询的答案实体之间的语义关系,本申请对回复语句中所能包括的内容不做具体限定。When the service device receives the query statement and determines that the query statement satisfies the above-mentioned preset recommendation conditions, the service device will input the query statement into the configured question answering system, so that the question answering system output corresponds to the query The statement's reply statement. In one example, the reply statement may include the answer entity queried by the query statement. In another example, the reply statement may carry the answer entity ID of the answer entity queried by the query statement (the entity ID will be described below). Of course, the reply statement can also include other information according to the actual situation, such as the main entity in the query statement, and the semantic relationship between the main entity in the query statement and the answer entity to be queried. The content is not specifically limited.
需要说明的是,上述的问答***可以部署在服务设备中,这样,服务设备可以在 本地实现将查询语句输入问答***,以及在本地获取问答***输出的回复语句。当然,上述的问答***也可以部署在除服务设备之外的其它设备中(记为目标设备),这样,服务设备需要通过与目标设备之间的通信连接将查询语句输入问答***,以及获得问答***输出的回复语句。It should be noted that the above question and answer system can be deployed in a service device, so that the service device can locally input query sentences into the question and answer system, and locally obtain the reply sentences output by the question and answer system. Of course, the above question answering system can also be deployed in other devices (denoted as the target device) other than the service device. In this way, the service device needs to input the query sentence into the question answering system through the communication connection with the target device, and obtain the question answer Reply statement output by the system.
还需要说明的是,上述的问答***可以通过多种实现方式实现。比如,通过搜索引擎实现该问答***,或者,通过知识图谱实现该问答***等,本申请不对问答***的具体实现方式进行限定。It should also be noted that the above question answering system can be implemented in various implementation manners. For example, the question answering system is implemented through a search engine, or the question answering system is implemented through a knowledge graph, etc. This application does not limit the specific implementation of the question answering system.
步骤32,在已建立的知识图谱中查找到与所述回复语句相关联的答案实体。Step 32: Find the answer entity associated with the reply sentence in the established knowledge graph.
在执行本步骤32之前,需要在服务设备中预先建立一个知识图谱,该知识图谱可以参照本领域技术人员所熟知的建立方式建立,这里不再赘述。由于知识图谱中可能存在具有相同实体名称的不同实体,因此为实现对前述具有相同实体名称的不同实体的区分,可以为知识图谱中的每一实体分配唯一的实体ID。Before performing this step 32, a knowledge graph needs to be pre-established in the service device, and the knowledge graph can be established by referring to the establishment methods well known to those skilled in the art, and details are not repeated here. Since there may be different entities with the same entity name in the knowledge graph, in order to realize the distinction between the aforementioned different entities with the same entity name, each entity in the knowledge graph can be assigned a unique entity ID.
在本申请实施例中,在已建立的知识图谱中查找到与回复语句相关联的答案实体有多种实现方式。作为其中一种实现方式,如前述的,在回复语句携带有答案实体的答案实体ID的情况下,可以在已建立的知识图谱中查找与该答案实体ID相匹配的实体,进而将查找到的该实体确定为答案实体。在本实现方式下,由于答案实体ID能够唯一的标识答案实体,因此,即便存在多个与答案实体具有相同实体名称的其它实体,也能够实现对答案实体的准确查找。In the embodiments of the present application, there are multiple implementations for finding the answer entity associated with the reply sentence in the established knowledge graph. As one of the implementation manners, as mentioned above, in the case where the reply sentence carries the answer entity ID of the answer entity, an entity matching the answer entity ID can be searched in the established knowledge graph, and then the found This entity is identified as the answer entity. In this implementation manner, since the answer entity ID can uniquely identify the answer entity, even if there are multiple other entities with the same entity name as the answer entity, the answer entity can be accurately searched.
步骤33,依据答案实体已配置的属性-属性值之间的对应关系,生成推荐语句;推荐语句包括预设数量N个属性、以及对应的属性值,N大于等于1。Step 33 , generating a recommended sentence according to the corresponding relationship between the configured attributes and attribute values of the answer entity; the recommended sentence includes a preset number of N attributes and corresponding attribute values, where N is greater than or equal to 1.
在执行本步骤33之前,预先会为知识图谱中的答案实体配置属性-属性值之间的对应关系,该属性-属性值之间的对应关系可以用于描述该答案实体的相关信息。下面以表格的方式,示例性的列举了一些用于为实体配置的属性,请参见表1:Before performing this step 33, the corresponding relationship between attributes and attribute values is configured for the answer entity in the knowledge graph in advance, and the corresponding relationship between the attributes and attribute values can be used to describe the relevant information of the answer entity. The following table exemplarily lists some attributes used to configure entities, see Table 1:
表1Table 1
第一级属性类别first-level attribute category | 第二级属性类别second-level attribute category | 第三级属性类别third-level attribute category | 属性Attributes |
人物figure | 通用Universal | 人物关系Character Relationships | 朋友friend |
人物figure | 通用Universal | 人物关系Character Relationships | 前任predecessor |
人物figure | 通用Universal | 人物关系Character Relationships | 儿子son |
人物figure | 通用Universal | 人物关系Character Relationships | 母亲Mother |
人物figure | 通用Universal | 人物关系Character Relationships | 好友friend |
人物figure | 通用Universal | 人物关系Character Relationships | 女儿daughter |
人物figure | 通用Universal | 人物关系Character Relationships | 妻子wife |
人物figure | 通用Universal | 人物关系Character Relationships | 丈夫husband |
人物figure | 通用Universal | 人物关系Character Relationships | 父亲Father |
人物figure | 通用Universal | 人物关系Character Relationships | 初恋first love |
人物figure | 通用Universal | 人物属性character attributes | 星座Constellation |
人物figure | 通用Universal | 人物属性character attributes | 籍贯Hometown |
人物figure | 通用Universal | 人物属性character attributes | 身高height |
人物figure | 通用Universal | 人物属性character attributes | 出生地place of birth |
人物figure | 通用Universal | 人物属性Character attributes | 职业Profession |
人物figure | 通用Universal | 人物属性character attributes | 出生日期date of birth |
人物figure | 通用Universal | 人物属性character attributes | 代表作品representative work |
人物figure | 通用Universal | 人物属性character attributes | 主要成就Major achievements |
人物figure | 娱乐人物entertainment figures | 艺名stage name | |
人物figure | 娱乐人物entertainment figures | 演员actor | 饰演play |
人物figure | 娱乐人物entertainment figures | 粉丝名fan name | |
人物figure | 娱乐人物entertainment figures | 昵称Nick name | |
人物figure | 娱乐人物entertainment figures | 经纪公司agency | |
人物figure | 娱乐人物entertainment figures | 三围measurements | |
人物figure | 娱乐人物entertainment figures | 出道时间Debut time | |
人物figure | 体育人物sports figures | 国家nation | |
人物figure | 体育人物sports figures | 运动项目sports | |
人物figure | 体育人物sports figures | 运动员athlete | 教练coach |
人物figure | 体育人物sports figures | 运动员athlete | 所属运动队sports team |
人物figure | 体育人物sports figures | 运动员athlete | 场上位置Field position |
人物figure | 体育人物sports figures | 运动员athlete | 场上号码Field number |
人物figure | 体育人物sports figures | 运动员athlete | 惯用脚dominant foot |
这里以上述表1中的第三行为例进行说明,其中,“前任”是一种属性,“前任”这一属性归属于第三级属性类别“人物关系”之下,而第三级属性类别“人物关系”则归属于第二级属性类别“通用”之下,而第二级属性类别“通用”则归属于第二级属性类别“人物”之下。至于“前任”这一属性对应的属性值具体是什么内容,可根据实际情况设置,本申请对此不做具体限定。Here, the third row in Table 1 above is used as an example for illustration, where "predecessor" is an attribute, and the attribute "predecessor" belongs to the third-level attribute category "person relationship", and the third-level attribute category "Character relationship" is under the second-level attribute category "General", and the second-level attribute category "General" is under the second-level attribute category "Person". As for the specific content of the attribute value corresponding to the attribute "predecessor", it can be set according to the actual situation, which is not specifically limited in this application.
需要说明的是,上述表1中的一级、二级和三级属性类别用于对不同属性进行分类,进而便于对不同属性进行管理和规划,并非是为实体配置属性的过程中所必须的。It should be noted that the first-level, second-level and third-level attribute categories in the above Table 1 are used to classify different attributes, so as to facilitate the management and planning of different attributes, and are not necessary in the process of configuring attributes for entities. .
还需要说明的是,上述表1所列举的属性仅作为示例,在实际应用中还可根据实际情况为实体配置其它属性,本申请对此不做具体限定。It should also be noted that the attributes listed in Table 1 above are only examples, and other attributes may also be configured for entities according to actual situations in practical applications, which are not specifically limited in this application.
在本申请实施例中,推荐语句中所包含的N个属性、以及对应的属性值,是答案实体预先配置的属性-属性值之间的对应关系中所包含的属性、以及属性值。至于如何生成包含N个属性、以及对应的属性值的推荐语句,下文会结合图11所示流程详细描述,这里暂不赘述。In the embodiment of the present application, the N attributes and corresponding attribute values included in the recommendation sentence are attributes and attribute values included in the corresponding relationship between attributes and attribute values preconfigured by the answer entity. As for how to generate a recommendation sentence including N attributes and corresponding attribute values, the following will be described in detail with reference to the process shown in FIG. 11 , and details will not be described here for the time being.
由上述步骤33可以看出,由于属性、以及对应的属性值记录的是答案实体的相关信息,所生成的推荐语句中又包括有预设数量N个属性、以及对应的属性值,因此通过推荐语句便可了解到对应于查询语句的答案实体的相关信息,进而能够扩展用户的视野,帮助用户了解更多的与答案实体相关的知识,让用户对答案实体有具体的认识,同时激发用户的认知兴趣,触发对答案实体的进一步搜索。It can be seen from the above step 33 that since the attributes and the corresponding attribute values record the relevant information of the answer entity, the generated recommendation sentence also includes a preset number of N attributes and corresponding attribute values, so through the recommendation The statement can learn the relevant information of the answer entity corresponding to the query statement, which can expand the user's vision, help the user to understand more knowledge related to the answer entity, let the user have a specific understanding of the answer entity, and stimulate the user's Cognitive interest, triggering further searches for answer entities.
在本申请实施例中,服务设备输出推荐语句有多种实现方式。In the embodiment of the present application, there are multiple implementations for the service device to output the recommended sentence.
作为其中一种实现方式,如前述的,当服务设备与智能设备不为同一个设备时,服务设备可将推荐语句与回复语句发送至智能设备,由智能设备将接收到的推荐语句与回复语句进行输出,例如,通过语音播放的方式进行输出,或者,在具备显示器的 情况下,通过显示器显示的方式进行输出。As one of the implementation manners, as mentioned above, when the service device and the smart device are not the same device, the service device can send the recommended sentence and the reply sentence to the smart device, and the smart device sends the received recommended sentence and reply sentence For output, for example, output is performed by means of voice playback, or, if a display is provided, output is performed by means of display display.
作为另一种实现方式,如前述的,当服务设备与智能设备为同一个设备时,服务设备可以通过语音播放的方式进行输出,或者,在具备显示器的情况下,通过显示器显示的方式进行输出。As another implementation manner, as mentioned above, when the service device and the smart device are the same device, the service device can output through voice playback, or, in the case of a display, output through display display .
下文会结合图10所示的显示设备上的GUI,服务设备将一些相关的信息发送给显示设备,由显示器呈现相关的界面。对显示器如何显示上述的推荐语句进行详细描述,这里暂不赘述。In the following, in conjunction with the GUI on the display device shown in FIG. 10 , the service device sends some related information to the display device, and the display device presents the related interface. How to display the above recommended sentence on the display will be described in detail, which will not be repeated here.
由以上技术方案可以看出,本申请中,由于推荐语句中包括的N个属性、以及对应的属性值用于描述答案实体的相关信息,因此通过推荐语句便可使用户了解到答案实体的相关信息,进而能够扩展用户的视野,帮助用户了解更多的与答案实体相关的知识,让用户对答案实体有具体的认识,同时激发用户的认知兴趣,触发对答案实体的进一步搜索。It can be seen from the above technical solutions that in this application, since the N attributes included in the recommendation sentence and the corresponding attribute values are used to describe the relevant information of the answer entity, the user can learn the relevant information of the answer entity through the recommendation sentence. information, which can expand the user's vision, help the user to understand more knowledge related to the answer entity, let the user have a specific understanding of the answer entity, and at the same time stimulate the user's cognitive interest and trigger further search for the answer entity.
由以上技术方案可以看出,本申请中,由于推荐语句中包括的N个属性、以及对应的属性值用于描述答案实体的相关信息,因此通过推荐语句便可使用户了解到答案实体的相关信息,进而能够扩展用户的视野,帮助用户了解更多的与答案实体相关的知识,让用户对答案实体有具体的认识,同时激发用户的认知兴趣,触发对答案实体的进一步搜索。It can be seen from the above technical solutions that in this application, since the N attributes included in the recommendation sentence and the corresponding attribute values are used to describe the relevant information of the answer entity, the user can learn the relevant information of the answer entity through the recommendation sentence. information, which can expand the user's vision, help the user to understand more knowledge related to the answer entity, let the user have a specific understanding of the answer entity, and at the same time stimulate the user's cognitive interest and trigger further search for the answer entity.
下面结合图10所示GUI,示例性的对显示设备如何显示推荐语句进行描述:Hereinafter, in conjunction with the GUI shown in FIG. 10 , how the display device displays the recommended sentence is exemplarily described:
图10中示例性示出了显示设备在显示推荐语句时提供的GUI的示意图。如图10所示,显示器提供根据查询语句以及服务设备返回的回复语句以及推荐语句呈现GUI800,该GUI800中包括用于显示查询语句的第一显示区域81,第一显示区域81中包括项目81a,项目81a中用于显示查询语句。GUI800中还包括用于显示回复语句的第二显示区域82和用于显示推荐语句的第三显示区域83,其中,第二显示区域82中包括项目82a,项目82a用于显示回复语句;第三显示区域83中包括项目83a,项目83a用于显示推荐语句。FIG. 10 exemplarily shows a schematic diagram of the GUI provided by the display device when displaying the recommended sentence. As shown in FIG. 10 , the display provides a GUI 800 for presenting a query sentence and a reply sentence and a recommended sentence returned by the service device. The GUI 800 includes a first display area 81 for displaying the query sentence, and the first display area 81 includes an item 81a. Item 81a is used to display a query statement. The GUI 800 also includes a second display area 82 for displaying reply sentences and a third display area 83 for displaying recommended sentences, wherein the second display area 82 includes an item 82a, and the item 82a is used for displaying reply sentences; The display area 83 includes an item 83a, and the item 83a is used to display a recommended sentence.
需要说明的是,上述图10仅是列举了一种用于显示推荐语句的GUI的示意图。在实际应用中,还可以根据实际情况显示除上述查询语句、回复语句和推荐语句之外的其它内容,本申请对此不做具体限定。It should be noted that the above-mentioned FIG. 10 is only a schematic diagram illustrating a GUI for displaying recommended sentences. In practical applications, other contents other than the above query sentence, reply sentence and recommendation sentence may also be displayed according to the actual situation, which is not specifically limited in this application.
下面对上述步骤33中如何依据答案实体已配置的属性-属性值之间的对应关系,生成推荐语句进行详细描述:The following is a detailed description of how to generate a recommendation sentence according to the corresponding relationship between the configured attributes and attribute values of the answer entity in the above step 33:
请参见图11,为本申请实施例提供的步骤103的实现流程图。Referring to FIG. 11 , it is a flowchart of the implementation of step 103 provided in this embodiment of the present application.
如图11所示,该流程可包括以下步骤:As shown in Figure 11, the process may include the following steps:
步骤331,在答案实体已配置的属性-属性值之间的对应关系中,选择出N个属性、以及对应的属性值。Step 331: Select N attributes and corresponding attribute values in the corresponding relationship between attributes and attribute values that have been configured in the answer entity.
作为一个示例,本步骤331中,在知识图谱中答案实体已配置的所有属性-属性值之间的对应关系中,选取出N个属性、以及对应的属性值有多种实现方式。As an example, in this step 331, among all the attributes-attribute value correspondences that have been configured in the answer entity in the knowledge graph, there are multiple implementations for selecting N attributes and corresponding attribute values.
作为其中一种实现方式,可以预先设置一个选择比例,比如10%,20%等,本申请不对该预设选择比例进行具体限定。基于此,在选择N个属性、以及对应的属性值时,可以按照预先设置的选择比例在答案实体已配置的属性-属性值之间的对应关系中选择,以选择出预设选择比例的属性、以及对应的属性值。As one of the implementation manners, a selection ratio may be preset, such as 10%, 20%, etc. This application does not specifically limit the preset selection ratio. Based on this, when selecting N attributes and corresponding attribute values, the corresponding relationship between the configured attributes and attribute values of the answer entity can be selected according to the preset selection ratio, so as to select the attributes with the preset selection ratio. , and the corresponding attribute value.
作为另一种实现方式,可以预先设置一个选择数量,比如2个,4个等,本申请不对该预设选择数量进行具体限定。基于此,在选择N个属性、以及对应的属性值时,可以按照预先设置的选择数量在答案实体已配置的属性-属性值之间的对应关系中选择,以选择出预设选择数量的属性、以及对应的属性值。As another implementation manner, a selection quantity may be preset, such as 2, 4, etc., and this application does not specifically limit the preset selection quantity. Based on this, when selecting N attributes and corresponding attribute values, the corresponding relationship between the configured attributes and attribute values of the answer entity can be selected according to the preset selection number, so as to select the preset selection number of attributes. , and the corresponding attribute value.
步骤332,判断选择出的各属性值中,是否存在与查询语句或回复语句中主实体相同的属性值;若存在,则返回步骤331;若不存在,则转到步骤333。Step 332 , determine whether the selected attribute values have the same attribute value as the main entity in the query statement or the reply statement; if so, go back to step 331 ; if not, go to step 333 .
在本申请实施例中,之所以要对选择出的每一属性值进行判断,以判断该属性值与查询语句或回复语句中的主实体是否一致,其原因在于:预先为答案实体配置的属性值中,可能存在有某一属性值与查询语句或回复语句中的主实体相同。比如,查询语句为“歌曲A的演唱者是谁?”,对应该查询语句的回复语句为“歌曲A的演唱者是赵某”,而知识图谱中对应于赵某的答案实体所配置的属性“代表作”对应的属性值为“歌曲A”。这样,若选择“歌曲A”这一属性值及其对应的属性“代表作”来生成推荐语句,则该推荐语句中可以包括“赵某的代表作是歌曲A”,而该推荐语句与回复语句的含义是相近似的,这样就无法起到推荐语句本应起到的推荐效果。因此,通过对选择出的每一属性值进行判断,可以避免后续生成的推荐语句为用户推荐无用信息。In the embodiment of the present application, the reason why each selected attribute value is judged to determine whether the attribute value is consistent with the main entity in the query sentence or the reply sentence is because: the attribute configured for the answer entity in advance Among the values, there may be an attribute with the same value as the main entity in the query or reply statement. For example, the query sentence is "who is the singer of song A?", the reply sentence corresponding to the query sentence is "the singer of song A is Zhao", and the attribute in the knowledge graph corresponding to Zhao's answer entity is configured The attribute value corresponding to "Masterpiece" is "Song A". In this way, if the attribute value of "song A" and its corresponding attribute "representative work" are selected to generate a recommended sentence, the recommended sentence can include "Zhao's representative work is song A", and the relationship between the recommended sentence and the reply sentence The meanings are similar, so the recommendation effect that the recommendation sentence should have cannot be achieved. Therefore, by judging each of the selected attribute values, it is possible to avoid recommending useless information for the user by the subsequently generated recommendation sentences.
步骤333,将各属性、以及对应的属性值输入至已设置的推荐语句生成模型,得到推荐语句。Step 333: Input each attribute and the corresponding attribute value into the set recommended sentence generation model to obtain a recommended sentence.
本步骤333是在选取出的每个属性值均不同于回复语句或查询语句中主实体的前提下执行的。This step 333 is executed on the premise that each of the selected attribute values is different from the main entity in the reply sentence or the query sentence.
在选择出的每一属性值均不同于回复语句或查询语句中主实体的情况下,则表示后续所生成的推荐语句中的各属性值与该主实体均不同,也就不会生成与回复语句的含义相类似的推荐语句。基于此,则可将选取出的每一属性、以及对应的属性值输入预设的推荐语句生成模型,得到推荐语句。下文会结合图12所示流程,对本步骤333中的推荐语句生成模型如何得到推荐语句进行详细描述,这里暂不赘述。下面对上述步骤333中的推荐语句生成模型如何得到推荐语句进行详细描述:In the case where each selected attribute value is different from the main entity in the reply sentence or query sentence, it means that each attribute value in the subsequently generated recommendation sentence is different from the main entity, and neither the generation nor the reply will be generated. Statements with similar meanings are recommended statements. Based on this, each selected attribute and the corresponding attribute value can be input into the preset recommended sentence generation model to obtain the recommended sentence. The following will describe in detail how the recommended sentence generation model in this step 333 obtains the recommended sentence with reference to the process shown in FIG. 12 , which will not be repeated here. The following describes in detail how the recommended sentence generation model in the above step 333 obtains the recommended sentence:
参见图12,图12为本申请实施例提供的步骤333的实现流程图。Referring to FIG. 12 , FIG. 12 is a flowchart of implementing step 333 provided in this embodiment of the present application.
如图12所示,该流程可以包括:As shown in Figure 12, the process may include:
步骤3331,为输入的每一属性、以及对应的属性值,在已设置的语句模板中查找到对应的目标语句模板,将该属性和属性值对应填充至目标语句模板的填充位置,依据目标语句模板内已填充的属性和属性值生成对应的推荐子语句。Step 3331, for each attribute of the input and the corresponding attribute value, find the corresponding target sentence template in the set sentence template, fill the attribute and the attribute value correspondingly to the filling position of the target sentence template, according to the target sentence The populated attributes and attribute values in the template generate corresponding recommended sub-statements.
作为一个示例,本步骤3331中,语句生成模型中可以预先设置有至少一个语句模板,这些语句模板可以是同一类别的语句模板,也可以分别是不同类别的语句模板。As an example, in this step 3331, at least one statement template may be preset in the statement generation model, and these statement templates may be statement templates of the same category, or may be statement templates of different categories respectively.
当语句生成模型只包括一类语句模板(记为第一类语句模板)的情况下,该第一类语句模板至少包括:用于填充属性的填充位置(记为第一填充位置),用于填充属性值的填充位置(记为第二填充位置),以及连接第一填充位置和第二填充位置的连接词。举例来说,语句模板可以是“[属性]是[属性值]”,其中,“[属性]”是用于填充属性的第一填充位置,“[属性值]”是用于填充属性值的第二填充位置,“是”是连接第一填充位置和第二填充位置的连接词。When the statement generation model includes only one type of statement template (referred to as the first type of statement template), the first type of statement template includes at least: a filling position (referred to as the first filling position) for filling attributes, for The filling position of the filling attribute value (referred to as the second filling position), and the connective connecting the first filling position and the second filling position. For example, the statement template can be "[attribute] is [attribute value]", where "[attribute]" is the first fill position for filling the attribute and "[attribute value]" is the first fill position for filling the attribute value The second stuffing position, "is" is a connective that connects the first stuffing position and the second stuffing position.
可选的,当语句生成模型只包括一类语句模板的情况下,语句生成模型为输入的每一属性、以及对应的属性值生成推荐子语句时,可以包括:Optionally, when the statement generation model includes only one type of statement template, when the statement generation model generates a recommended sub-statement for each input attribute and the corresponding attribute value, it may include:
针对每一属性、以及对应的属性值,在已设置的第一类语句模板中选择出一个目标语句模板。之后,将该属性对应的填充至上述目标语句模板中的第一填充位置,以及将该属性值对应的填充至目标语句模板中的第二填充位置。最后,为上述已填充有属性和属性值的目标语句模板设置相应的标点符号,以生成对应的推荐子语句。比如,假设属性为身高,对应的属性值为180cm。这里以目标语句模板为“[属性]是[属性值]”为例,将前述假设的身高,以及对应于身高的180cm填充至该目标语句模板后,则可得到“身高是180cm”这样一个填充有属性及对应的属性值的目标语句模板。之后,为该填充有属性及对应的属性值的目标语句模板添加相应的标点符号如“;”,即可得到“身高是180cm;”这样一个推荐子语句。For each attribute and the corresponding attribute value, a target sentence template is selected from the set first type of sentence templates. Then, the attribute is correspondingly filled into the first filling position in the target sentence template, and the attribute value is correspondingly filled into the second filling position in the target sentence template. Finally, set corresponding punctuation marks for the above target sentence template filled with attributes and attribute values to generate corresponding recommended sub-sentences. For example, if the attribute is height, the corresponding attribute value is 180cm. Here, taking the target sentence template as "[attribute] is [attribute value]" as an example, after filling the aforementioned assumed height and 180cm corresponding to the height into the target sentence template, a filling such as "height is 180cm" can be obtained. A target statement template with attributes and corresponding attribute values. After that, add corresponding punctuation marks such as ";" to the target sentence template filled with attributes and corresponding attribute values, and then a recommended sub-sentence such as "height is 180 cm;" can be obtained.
当语句生成模型中至少包括两类语句模板,第一类语句模板和第二类语句模板的情况下,其中,第一类语句模板与前述实现方式中的第一类语句模板相同,这里不再赘述。第二类语句模板则与第一类语句模板不同,第二类语句模板至少包括:用于填充答案实体的填充位置(记为第五填充位置),用于填充属性的填充位置(记为第三填充位),用于填充属性值的填充位置(记为第四填充位置),连接第三填充位置和第四填充位置的第一连接词,以及连接第五填充位置和第三填充位置的第二连接词。举例来说,第二类语句模板可以是“[答案实体]的[属性]是[属性值]”,其中,“[答案实体]”是用于填充答案实体名称的第五填充位置,“[属性]”是用于填充属性的第三填充位置,“[属性值]”是用于填充属性值的第四填充位置,“是”是连接第三填充位置和第四填充位置的第一连接词,“的”是连接第五填充位置和第三填充位置的第二连接词。When the statement generation model includes at least two types of statement templates, the first type of statement template and the second type of statement template, the first type of statement template is the same as the first type of statement template in the foregoing implementation manner, which is not repeated here. Repeat. The second type of statement template is different from the first type of statement template. The second type of statement template includes at least: a filling position for filling the answer entity (referred to as the fifth filling position), a filling position for filling the attribute (referred to as the first filling position) Three padding bits), the padding position (referred to as the fourth padding position) for padding the attribute value, the first connective connecting the third padding position and the fourth padding position, and the fifth padding position and the third padding position. second conjunction. For example, the second type of statement template can be "[attribute] of [answer entity] is [attribute value]", where "[answer entity]" is the fifth padding position used to populate the answer entity name, "[ attribute]" is the third fill position for filling the attribute, "[attribute value]" is the fourth fill position for filling the attribute value, "yes" is the first connection connecting the third fill position and the fourth fill position word, "of" is the second connective that connects the fifth stuffing position and the third stuffing position.
可选的,当语句生成模型包括两类语句模板的情况下,语句生成模型为输入的每一属性、以及对应的属性值生成推荐子语句时,可以包括:在输入的各属性、以及对应的属性值中选择出一个属性、以及对应的属性值,作为首个属性和属性值。从第二类语句模板中选择出一个目标语句模板(记为第一目标语句模板),将该首个属性和属性值填充至上述的第一目标语句模板并添加标点符号,得到对应于该首个属性和属性值的推荐子语句。针对其余的每一属性、以及对应的属性值,在第一类语句模板中选择出一个目标语句模板(记为第二目标语句模板),将该属性、以及对应的属性值填充至上述第二目标语句模板并添加标点符号,得到对应于该属性、以及对应的属性值的推荐子语句。Optionally, when the statement generation model includes two types of statement templates, when the statement generation model generates a recommended sub-statement for each attribute of the input and the corresponding attribute value, it may include: each attribute of the input and the corresponding An attribute and a corresponding attribute value are selected from the attribute values as the first attribute and attribute value. Select a target sentence template (marked as the first target sentence template) from the second type of sentence templates, fill the first attribute and attribute value into the above-mentioned first target sentence template and add punctuation to obtain the corresponding first target sentence template. Recommended sub-statements for attributes and attribute values. For each of the remaining attributes and corresponding attribute values, select a target sentence template (referred to as the second target sentence template) in the first type of sentence template, and fill the attribute and corresponding attribute value into the above-mentioned second sentence template. The target sentence template is added and punctuation marks are added to obtain the recommended sub-sentence corresponding to the attribute and the corresponding attribute value.
需要说明的是,上述的语句模板还可以根据实际情况包含其它信息,上述语句模板中的连接词以及为语句模板设置的标点符号也可根据实际情况选择,本申请对此均不做限定。It should be noted that the above statement template may also include other information according to the actual situation, and the connectives in the above statement template and the punctuation marks set for the statement template can also be selected according to the actual situation, which are not limited in this application.
步骤3332,将各属性、以及对应的属性值对应的推荐子语句进行拼接得到推荐语句。Step 3332, splicing each attribute and the recommended sub-sentences corresponding to the corresponding attribute values to obtain a recommended sentence.
在本步骤3332中,将各推荐子语句拼接为推荐语句有多种实现方式。In this step 3332, there are multiple implementations for splicing each recommended sub-sentence into a recommended sentence.
作为其中一种实现方式,若对应于输入的各属性、以及对应的属性值的推荐子语句均是依据前述的第一类语句模板生成的,那么,则可以直接的对各推荐子语句进行拼接。例如,可采用随机的方式、按各属性、对应的属性值输入推荐语句生成模型的顺序进行拼接等方式进行拼接,本申请并不对各推荐子语句的拼接方式进行具体限定。As one of the implementations, if the recommended sub-sentences corresponding to the input attributes and corresponding attribute values are all generated according to the aforementioned first-type sentence template, then the recommended sub-sentences can be directly spliced . For example, splicing can be performed in a random manner, in the order in which each attribute and corresponding attribute value are input into the recommended sentence generation model, and the like. The present application does not specifically limit the splicing method of each recommended sub-sentence.
作为另一种实现方式,若对应于输入的各属性、以及对应的属性值的推荐子语句中,存在依据前述第二类语句模板生成的推荐子语句(记为首个推荐子语句),则需 要将该首个推荐子语句作为推荐语句中的首个推荐子语句。之后,将除首个推荐子语句之外的其余各推荐子语句拼接在该首个推荐子语句之后,以生成推荐语句。在将其余各推荐子语句拼接在该首个推荐子语句之后的过程中,可采用随机的方式、按各属性、对应的属性值输入推荐语句生成模型的顺序进行拼接等方式进行拼接,本申请并不对其余推荐子语句的拼接方式进行具体限定。As another implementation manner, if there is a recommended sub-sentence (referred to as the first recommended sub-sentence) generated according to the foregoing second type of sentence template in the recommended sub-sentences corresponding to the input attributes and corresponding attribute values, it is necessary to The first recommended sub-sentence is used as the first recommended sub-sentence in the recommended sentence. Afterwards, the other recommended sub-sentences except the first recommended sub-sentence are spliced after the first recommended sub-sentence to generate a recommended sentence. In the process of splicing the remaining recommended sub-sentences after the first recommended sub-sentence, the splicing can be performed in a random manner, in the order in which each attribute and the corresponding attribute value are input into the recommended sentence generation model, etc. It does not specifically limit the splicing method of the remaining recommended sub-sentences.
以上对上述步骤333中推荐语句生成模型如何得到推荐语句进行了详细描述。需要说明的是,上述仅是示例性描述,并不作为对本申请的限定。The above describes in detail how the recommended sentence generation model in the above step 333 obtains the recommended sentence. It should be noted that the above is only an exemplary description, and is not intended to limit the present application.
具体实现中,本发明还提供一些非易失性计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可包括本发明提供的屏保展示方法和屏保跳转方法的各实施例中的部分或全部步骤。所述的存储介质可为磁碟、光盘、只读存储记忆体(英文:read-only memory,简称:ROM)或随机存储记忆体(英文:random access memory,简称:RAM)等。In a specific implementation, the present invention also provides some non-volatile computer storage media, wherein the computer storage medium can store a program, and when the program is executed, it can include various embodiments of the screen saver display method and the screen saver jump method provided by the present invention some or all of the steps in . The storage medium may be a magnetic disk, an optical disk, a read-only memory (English: read-only memory, abbreviated as: ROM) or a random access memory (English: random access memory, abbreviated as: RAM) and the like.
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products may be stored in a storage medium, such as ROM/RAM , magnetic disk, optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present application. Scope.
为了方便解释,已经结合具体的实施方式进行了上述说明。但是,上述示例性的讨论不是意图穷尽或者将实施方式限定到上述公开的具体形式。根据上述的教导,可以得到多种修改和变形。上述实施方式的选择和描述是为了更好的解释原理以及实际的应用,从而使得本领域技术人员更好的使用所述实施方式以及适于具体使用考虑的各种不同的变形的实施方式。For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussions are not intended to be exhaustive or to limit implementations to the specific forms disclosed above. Numerous modifications and variations are possible in light of the above teachings. The above embodiments are chosen and described to better explain the principles and practical applications, so as to enable those skilled in the art to better utilize the described embodiments and various modified embodiments suitable for specific use considerations.
Claims (24)
- 一种智能设备,包括:输入接口和控制器;An intelligent device, comprising: an input interface and a controller;所述控制器被配置用于:The controller is configured to:将通过所述输入接口输入的查询语句发送至服务设备,以使服务设备在已建立的知识图谱中查找目标实体对应的关联实体,所述知识图谱用于表示实体之间的语义关系,所述目标实体为依据所述查询语句确定的实体;Send the query statement input through the input interface to the service device, so that the service device searches for the associated entity corresponding to the target entity in the established knowledge graph, where the knowledge graph is used to represent the semantic relationship between entities, and the The target entity is the entity determined according to the query statement;从所述服务设备获取所述关联实体并输出。Acquire the associated entity from the service device and output.
- 根据权利要求1所述的智能设备,所述智能设备为显示设备;The smart device according to claim 1, which is a display device;所述控制器被配置为通过语音输出所述关联实体,和/或,将所述关联实体输出至显示器以通过显示器显示所述关联实体。The controller is configured to output the associated entity by voice, and/or output the associated entity to a display to display the associated entity through the display.
- 一种服务设备,包括:A service device comprising:接收模块,用于接收来自智能设备的当前查询语句;The receiving module is used to receive the current query statement from the smart device;关联推荐模块,用于在已建立的知识图谱中查找目标实体对应的关联实体,所述知识图谱用于表示实体之间的语义关系,所述目标实体为依据所述当前查询语句确定的实体。The association recommendation module is used to find the associated entity corresponding to the target entity in the established knowledge graph, the knowledge graph is used to represent the semantic relationship between the entities, and the target entity is the entity determined according to the current query sentence.
- 根据权利要求3所述的服务设备,所述关联推荐模块具体用于:The service device according to claim 3, wherein the association recommendation module is specifically used for:依据所述目标实体所属的业务领域,在所述知识图谱中查找与所述目标实体具有指定关联关系的实体,将查找到的实体确定为所述目标实体对应的关联实体。According to the business domain to which the target entity belongs, the knowledge graph is searched for an entity having a specified relationship with the target entity, and the found entity is determined as the associated entity corresponding to the target entity.
- 根据权利要求3所述的服务设备,所述关联推荐模块具体用于:The service device according to claim 3, wherein the association recommendation module is specifically used for:依据所述目标实体所属的业务领域,在所述知识图谱中查找与所述目标实体具有相同的指定属性值的实体,将查找到的实体确定为所述目标实体对应的关联实体。According to the business domain to which the target entity belongs, an entity having the same specified attribute value as the target entity is searched in the knowledge graph, and the found entity is determined as an associated entity corresponding to the target entity.
- 根据权利要求4或5任一项所述的服务设备,所述业务领域包括:人物、影视、音乐、游戏和美食中的至少一种。The service device according to any one of claims 4 or 5, wherein the business field includes: at least one of characters, movies, music, games and food.
- 根据权利要求3所述的服务设备,所述关联推荐模块具体用于:The service device according to claim 3, wherein the association recommendation module is specifically used for:当所述当前查询语句满足预设的关联推荐条件时,若所述当前查询语句包含实体名称,则将该实体名称对应的实体确定为目标实体;When the current query statement satisfies the preset association recommendation condition, if the current query statement contains an entity name, the entity corresponding to the entity name is determined as the target entity;若所述当前查询语句不包含实体名称,则将已接收的前一查询语句中的实体名称对应的实体确定为目标实体。If the current query statement does not contain an entity name, the entity corresponding to the entity name in the received previous query statement is determined as the target entity.
- 一种关联推荐方法,应用于智能设备,包括:An association recommendation method applied to smart devices, including:将通过输入接口输入的查询语句发送至服务设备,以使服务设备在已建立的知识图谱中查找目标实体对应的关联实体,所述知识图谱用于表示实体之间的语义关系,所述目标实体为依据所述查询语句确定的实体;Send the query statement input through the input interface to the service device, so that the service device searches for the associated entity corresponding to the target entity in the established knowledge graph, the knowledge graph is used to represent the semantic relationship between entities, and the target entity is the entity determined according to the query statement;从所述服务设备获取所述关联实体并输出。Acquire the associated entity from the service device and output.
- 一种关联推荐方法,应用于服务设备,包括:An association recommendation method, applied to service equipment, includes:接收来自智能设备的当前查询语句;Receive the current query statement from the smart device;在已建立的知识图谱中查找目标实体对应的关联实体,所述知识图谱用于表示实体之间的语义关系,所述目标实体为依据所述当前查询语句确定的实体。The associated entity corresponding to the target entity is searched in the established knowledge graph, where the knowledge graph is used to represent the semantic relationship between entities, and the target entity is an entity determined according to the current query sentence.
- 根据权利要求9所述的方法,所述在已建立的知识图谱中查找目标实体对应的关联实体,包括:The method according to claim 9, wherein searching the associated entity corresponding to the target entity in the established knowledge graph, comprising:依据所述目标实体所属的业务领域,在所述知识图谱中查找与所述目标实体具有指定 关联关系的实体,将查找到的实体确定为所述目标实体对应的关联实体;和/或,According to the business domain to which the target entity belongs, search for an entity with a specified association relationship with the target entity in the knowledge graph, and determine the found entity as an associated entity corresponding to the target entity; and/or,依据所述目标实体所属的业务领域,确定所述目标实体的指定属性值,并在所述知识图谱中查找具有所述指定属性值的实体,将查找到的实体确定为所述目标实体对应的关联实体。According to the business domain to which the target entity belongs, determine the specified attribute value of the target entity, search for the entity with the specified attribute value in the knowledge graph, and determine the found entity as the corresponding entity of the target entity. Associated entity.
- 一种服务设备,包括:输入接口和处理器;A service device, comprising: an input interface and a processor;所述处理器被配置为:The processor is configured to:当通过所述输入接口接收到查询语句时,将所述查询语句输入至已配置的问答***,以得到所述查询语句对应的回复语句;When a query statement is received through the input interface, the query statement is input into the configured question answering system to obtain a reply statement corresponding to the query statement;在已建立的知识图谱中查找到与所述回复语句相关联的答案实体;Find the answer entity associated with the reply sentence in the established knowledge graph;依据所述答案实体已配置的属性-属性值之间的对应关系,生成推荐语句;所述推荐语句包括预设数量N个属性、以及对应的属性值,N大于等于1。A recommended sentence is generated according to the corresponding relationship between attributes and attribute values configured by the answer entity; the recommended sentence includes a preset number of N attributes and corresponding attribute values, where N is greater than or equal to 1.
- 根据权利要求11所述的服务设备,所述答案实体已配置的属性-属性值之间的对应关系包括:所述N个属性、以及对应的属性值之间的对应关系。The service device according to claim 11, wherein the corresponding relationship between attributes and attribute values configured by the answer entity comprises: the N attributes and the corresponding relationship between corresponding attribute values.
- 根据权利要求11所述的服务设备,The service device of claim 11,所述处理器被配置为通过语音输出所述推荐语句;或者,The processor is configured to output the recommended sentence by voice; or,所述处理器被配置为通过显示器显示所述推荐语句。The processor is configured to display the recommended sentence through a display.
- 根据权利要求11所述的服务设备,所述回复语句携带答案实体ID;The service device according to claim 11, wherein the reply sentence carries an answer entity ID;所述与回复语句相关联的答案实体包括:已建立的知识图谱中与所述答案实体ID对应的答案实体。The answer entity associated with the reply sentence includes: an answer entity corresponding to the answer entity ID in the established knowledge graph.
- 根据权利要求11所述的服务设备,所述生成推荐语句包括:The service device according to claim 11, wherein the generating a recommended sentence comprises:将所述N个属性、以及对应的属性值输入至已设置的推荐语句生成模型,得到所述推荐语句。The N attributes and corresponding attribute values are input into the set recommended sentence generation model to obtain the recommended sentence.
- 根据权利要求15所述的服务设备,所述推荐语句生成模型通过以下方式得到所述推荐语句:The service device according to claim 15, wherein the recommended sentence generation model obtains the recommended sentence in the following manner:为输入的每一属性、以及对应的属性值,在已设置的语句模板中查找到对应的目标语句模板,将该属性和属性值对应填充至所述目标语句模板的填充位置,依据所述目标语句模板内已填充的属性和属性值生成对应的推荐子语句;For each attribute of the input and the corresponding attribute value, find the corresponding target sentence template in the set sentence template, fill the attribute and attribute value into the filling position of the target sentence template, according to the target sentence template The filled attributes and attribute values in the statement template generate corresponding recommended sub-statements;将各属性、以及对应的属性值对应的推荐子语句进行拼接得到所述推荐语句。The recommended sentences are obtained by splicing each attribute and the recommended sub-sentences corresponding to the corresponding attribute values.
- 根据权利要求11、15或16所述的服务设备,所述回复语句至少包括:主实体、所述主实体与所述答案实体之间的语义关系和所述答案实体;The service device according to claim 11, 15 or 16, wherein the reply statement at least comprises: a main entity, a semantic relationship between the main entity and the answer entity, and the answer entity;所述推荐语句中的N个属性对应的属性值与所述主实体不同。The attribute values corresponding to the N attributes in the recommendation sentence are different from the main entity.
- 一种信息推荐方法,包括:An information recommendation method including:当接收到查询语句时,将所述查询语句输入至已配置的问答***,以得到所述查询语句对应的回复语句;When receiving a query statement, inputting the query statement into the configured question answering system to obtain a reply statement corresponding to the query statement;在已建立的知识图谱中查找到与所述回复语句相关联的答案实体;Find the answer entity associated with the reply sentence in the established knowledge graph;依据所述答案实体已配置的属性-属性值之间的对应关系,生成推荐语句;所述推荐语句包括预设数量N个属性、以及对应的属性值,N大于等于1。A recommended sentence is generated according to the corresponding relationship between attributes and attribute values configured by the answer entity; the recommended sentence includes a preset number of N attributes and corresponding attribute values, where N is greater than or equal to 1.
- 根据权利要求18所述的方法,所述答案实体已配置的属性-属性值之间的对应关系包括:所述N个属性、以及对应的属性值之间的对应关系。The method according to claim 18, wherein the corresponding relationship between attributes and attribute values configured by the answer entity comprises: the N attributes and the corresponding relationship between corresponding attribute values.
- 根据权利要求18所述的方法,The method of claim 18,通过语音输出所述推荐语句;或者,Output the recommended sentence by voice; or,通过显示器显示所述推荐语句。The recommended sentence is displayed on the display.
- 根据权利要求18所述的方法,所述回复语句携带答案实体ID;The method of claim 18, wherein the reply statement carries an answer entity ID;所述与回复语句相关联的答案实体包括:已建立的知识图谱中与所述答案实体ID对应的答案实体。The answer entity associated with the reply sentence includes: an answer entity corresponding to the answer entity ID in the established knowledge graph.
- 根据权利要求18所述的方法,所述生成推荐语句包括:The method according to claim 18, wherein the generating a recommendation statement comprises:将所述N个属性、以及对应的属性值输入至已设置的推荐语句生成模型,得到所述推荐语句。The N attributes and corresponding attribute values are input into the set recommended sentence generation model to obtain the recommended sentence.
- 根据权利要求22所述的方法,所述推荐语句生成模型通过以下方式得到所述推荐语句:The method according to claim 22, wherein the recommended sentence generation model obtains the recommended sentence in the following manner:为输入的每一属性、以及对应的属性值,在已设置的语句模板中查找到对应的目标语句模板,将该属性和属性值对应填充至所述目标语句模板的填充位置,依据所述目标语句模板内已填充的属性和属性值生成对应的推荐子语句;For each attribute of the input and the corresponding attribute value, find the corresponding target sentence template in the set sentence template, fill the attribute and attribute value into the filling position of the target sentence template, according to the target sentence template The filled attributes and attribute values in the statement template generate corresponding recommended sub-statements;将各属性、以及对应的属性值对应的推荐子语句进行拼接得到所述推荐语句。The recommended sentences are obtained by splicing each attribute and the recommended sub-sentences corresponding to the corresponding attribute values.
- 根据权利要求18、22或23所述的方法,所述查询语句至少包括:主实体、所述主实体与所述答案实体之间的语义关系;The method according to claim 18, 22 or 23, wherein the query statement at least comprises: a main entity, a semantic relationship between the main entity and the answer entity;所述推荐语句中的N个属性对应的属性值与所述主实体不同。The attribute values corresponding to the N attributes in the recommendation sentence are different from the main entity.
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010692647.0A CN111914134A (en) | 2020-07-17 | 2020-07-17 | Association recommendation method, intelligent device and service device |
CN202010692647.0 | 2020-07-17 | ||
CN202010790355.0 | 2020-08-07 | ||
CN202010790355.0A CN111949782A (en) | 2020-08-07 | 2020-08-07 | Information recommendation method and service equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022012234A1 true WO2022012234A1 (en) | 2022-01-20 |
Family
ID=79556121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/099448 WO2022012234A1 (en) | 2020-07-17 | 2021-06-10 | Associated recommendation method, smart device and service device |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2022012234A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118093638A (en) * | 2024-04-28 | 2024-05-28 | 青岛国创智能家电研究院有限公司 | Knowledge graph-based diet question-answering system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105912527A (en) * | 2016-04-19 | 2016-08-31 | 北京高地信息技术有限公司 | Method, device and system outputting answer according to natural language |
CN106919655A (en) * | 2017-01-24 | 2017-07-04 | 网易(杭州)网络有限公司 | A kind of answer provides method and apparatus |
CN107943998A (en) * | 2017-12-05 | 2018-04-20 | 竹间智能科技(上海)有限公司 | A kind of human-machine conversation control system and method for knowledge based collection of illustrative plates |
CN111914134A (en) * | 2020-07-17 | 2020-11-10 | 海信视像科技股份有限公司 | Association recommendation method, intelligent device and service device |
CN111949782A (en) * | 2020-08-07 | 2020-11-17 | 海信视像科技股份有限公司 | Information recommendation method and service equipment |
-
2021
- 2021-06-10 WO PCT/CN2021/099448 patent/WO2022012234A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105912527A (en) * | 2016-04-19 | 2016-08-31 | 北京高地信息技术有限公司 | Method, device and system outputting answer according to natural language |
CN106919655A (en) * | 2017-01-24 | 2017-07-04 | 网易(杭州)网络有限公司 | A kind of answer provides method and apparatus |
CN107943998A (en) * | 2017-12-05 | 2018-04-20 | 竹间智能科技(上海)有限公司 | A kind of human-machine conversation control system and method for knowledge based collection of illustrative plates |
CN111914134A (en) * | 2020-07-17 | 2020-11-10 | 海信视像科技股份有限公司 | Association recommendation method, intelligent device and service device |
CN111949782A (en) * | 2020-08-07 | 2020-11-17 | 海信视像科技股份有限公司 | Information recommendation method and service equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118093638A (en) * | 2024-04-28 | 2024-05-28 | 青岛国创智能家电研究院有限公司 | Knowledge graph-based diet question-answering system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20090077056A1 (en) | Customization of search results | |
US10242586B2 (en) | Server, information providing method of server, display apparatus, controlling method of display apparatus and information providing system | |
JP2019507417A (en) | User interface for multivariable search | |
US20220277053A1 (en) | Generating app or web pages via extracting interest from images | |
WO2021103398A1 (en) | Smart television and server | |
US8935305B2 (en) | Sequential semantic representations for media curation | |
RU2632140C2 (en) | Method and server for clustering sentences for search queries | |
KR102684502B1 (en) | Voice packet recommendation methods, devices, facilities and storage media | |
WO2021238081A1 (en) | Voice packet recommendation method, apparatus and device, and storage medium | |
RU2609079C2 (en) | Search offer method and processing server | |
US10725620B2 (en) | Generating interactive menu for contents search based on user inputs | |
US11061651B2 (en) | Systems and methods for organizing, classifying, and discovering automatically generated computer software | |
US20170161278A1 (en) | Degrees of Separation Network Builder | |
KR102580017B1 (en) | Voice packet recommendation methods, devices, facilities and storage media | |
CN111914134A (en) | Association recommendation method, intelligent device and service device | |
WO2022012234A1 (en) | Associated recommendation method, smart device and service device | |
US20160247522A1 (en) | Method and system for providing access to auxiliary information | |
RU2605001C2 (en) | Method for processing user's search request and server used therein | |
US20190138575A1 (en) | Counterpointing system | |
US20140351242A1 (en) | System and method for searching elements in a user interface | |
US20140282200A1 (en) | Method and system for automatically displaying information based on task context | |
US20160283557A1 (en) | Method and device for accessing a plurality of contents, corresponding terminal and computer program | |
TWI780333B (en) | Method for dynamically processing and playing multimedia files and multimedia play apparatus | |
US20230252036A1 (en) | Methods and systems for providing an enhanced response to a query in an iot environment | |
KR101654766B1 (en) | Method for curating using external search engine and repository management system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21842854 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21842854 Country of ref document: EP Kind code of ref document: A1 |