A method and device for determining a query term classification model

Through the image classification model, the image type in the historical query results is recognized and the query word classification model is trained, which solves the problem of low query word type recognition efficiency in the prior art, and achieves more efficient and accurate query word type recognition.

CN111177521BActive Publication Date: 2025-05-06BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201811243106.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-10-24
Publication Date
2025-05-06
Estimated Expiration
2039-12-31

AI Technical Summary

Technical Problem

In the prior art, the recognition of query word types mainly relies on manual annotation, which is inefficient and difficult to adapt to fast updated query words, and cannot effectively improve search efficiency and accuracy.

Method used

The image classification model is used to identify whether the image of the target type is included in the historical query results, determine the type of historical query words, and train the query word classification model based on these historical query words to realize automatic recognition of query word types.

Benefits of technology

It improves the recognition efficiency of query word types, reduces the dependence of manual annotations, can adapt to query word updates more quickly, and improves search efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111177521B_ABST
    Figure CN111177521B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method and device for determining a query term classification model, which recognizes images in historical query results through an image classification model. If a historical query result includes an image of a target type, then the type of the historical query term corresponding to the historical query result is determined to be the target type. The query term classification model can be trained with the identified historical query terms of the target type, so that the query term classification model can realize the function of recognizing whether the type of the query term is the target type. When it is necessary to determine whether the type of the query term is the target type, manual labeling is no longer required, and it can be directly realized through the query term classification model, thereby improving the recognition efficiency of the query term type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method and device for determining a query term classification model. Background Art

[0002] Users can enter query words through the search engine and obtain query results related to the query words.

[0003] If the search engine can determine the type of query word or the query intent corresponding to the query word, it can conduct targeted searches based on the query word type, thereby improving search efficiency and accuracy. Currently, the identification of query word types is mainly through manual identification and labeling, and the query words are manually labeled with manually identified type labels.

[0004] This method is very inefficient and cannot keep up with the update speed of the query terms used by users, making it difficult to adapt to current network search needs. Summary of the invention

[0005] In order to solve the above technical problems, the present application provides a method and device for determining a query term classification model, which can be implemented directly through the query term classification model, thereby improving the recognition efficiency of query term types.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a method for determining a query term classification model, the method comprising:

[0008] Identify whether the historical query results corresponding to the historical query terms include images of the target type according to the image classification model;

[0009] Determining the historical query words corresponding to the historical query results including the images of the target type as the historical query words of the target type;

[0010] A query term classification model is trained according to historical query terms of the target type, and the query term classification model is used to identify whether the type of the query term is the target type.

[0011] Optionally, the method further includes:

[0012] Acquire an image set of the target type;

[0013] The image classification model is trained according to the image set, and the image classification model is used to identify whether the type of the image is the target type.

[0014] Optionally, the method further includes:

[0015] Identify whether the type of the query word to be identified is the target type according to the query word classification model;

[0016] If so, the type of the image in the target query result corresponding to the query term to be identified is identified according to the image classification model.

[0017] Optionally, if the target type is a sensitive type, identifying the type of the image in the target query result corresponding to the query term to be identified according to the image classification model includes:

[0018] If it is identified that the target query result includes the sensitive type of image, the display of the sensitive type of image in the target query result is cancelled.

[0019] Optionally, the method further includes:

[0020] According to the sensitivity level corresponding to the sensitive type of the query word to be identified, the determination condition adopted by the image classification model when identifying the sensitive type is determined.

[0021] Optionally, determining the historical query words corresponding to the historical query results including the images of the target type as the historical query words of the target type includes:

[0022] The historical query words corresponding to the historical query results including the images of the target type and the proportion of the images of the target type meeting a predetermined condition are determined as the historical query words of the target type.

[0023] In a second aspect, an embodiment of the present application provides a device for determining a query term classification model, the device comprising a first recognition unit, a type determination unit, and a first training unit:

[0024] The first recognition unit is used to recognize whether the historical query results corresponding to the historical query terms include images of the target type according to the image classification model;

[0025] The type determination unit is used to determine the historical query words corresponding to the historical query results including the images of the target type as the historical query words of the target type;

[0026] The first training unit is used to train a query term classification model according to historical query terms of the target type, and the query term classification model is used to identify whether the type of the query term is the target type.

[0027] Optionally, the device further includes an acquisition unit and a second training unit:

[0028] The acquisition unit is used to acquire an image set of the target type;

[0029] The second training unit is used to train the image classification model according to the image set, and the image classification model is used to identify whether the type of the image is the target type.

[0030] Optionally, the device further includes a second identification unit and a third identification unit:

[0031] The second recognition unit is used to recognize whether the type of the query word to be recognized is the target type according to the query word classification model; if the recognition result is yes, trigger the third recognition unit;

[0032] The third recognition unit is used to recognize the type of the image in the target query result corresponding to the query word to be recognized according to the image classification model.

[0033] Optionally, if the target type is a sensitive type, the third identification unit is further used to cancel the display of the image of the sensitive type in the target query result if it is identified that the target query result includes the image of the sensitive type.

[0034] Optionally, the device further includes a condition determination unit:

[0035] The condition determination unit is used to determine the determination condition adopted by the image classification model when identifying the sensitive type according to the sensitivity level corresponding to the sensitive type of the query word to be identified.

[0036] Optionally, the type determination unit is further configured to determine, as the historical query word of the target type, a historical query word corresponding to a historical query result that includes images of the target type and whose proportion of images of the target type meets a predetermined condition.

[0037] In a third aspect, an embodiment of the present application provides a device for determining a query term classification model, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations:

[0038] Identify whether the historical query results corresponding to the historical query terms include images of the target type according to the image classification model;

[0039] Determining the historical query words corresponding to the historical query results including the images of the target type as the historical query words of the target type;

[0040] A query term classification model is trained according to historical query terms of the target type, and the query term classification model is used to identify whether the type of the query term is the target type.

[0041] In a fourth aspect, an embodiment of the present application provides a machine-readable medium having instructions stored thereon, which, when executed by one or more processors, enables the device to execute a method for determining a query term classification model as described in any one or more of the first aspect.

[0042] It can be seen from the above technical solution that the images in the historical query results are identified through the image classification model. If a historical query result includes an image of the target type, then the type of the historical query term corresponding to this historical query result is determined to be the target type. The query term classification model can be trained with the identified historical query term of the target type, so that the query term classification model can realize the function of identifying whether the type of the query term is the target type. When it is necessary to determine whether the type of the query term is the target type, manual labeling is no longer required, and it can be directly realized through the query term classification model, which improves the recognition efficiency of the query term type. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1 A method flow chart of a method for determining a query term classification model provided in an embodiment of the present application;

[0045] Figure 2 A device structure diagram of a query term classification model determination device provided in an embodiment of the present application;

[0046] Figure 3 A structural diagram of a query term classification model determination device provided in an embodiment of the present application;

[0047] Figure 4 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The embodiments of the present application are described below in conjunction with the accompanying drawings.

[0049] Since the method of manually identifying and labeling query word types is very inefficient and far behind the update speed of query words used by users, it is difficult to adapt to current network search needs.

[0050] To this end, an embodiment of the present application provides a method for determining a query term classification model, which can be applied to electronic devices with image and data processing capabilities, such as a personal computer, a server, etc.

[0051] In an embodiment of the present application, an image in a historical query result is identified by an image classification model, and the image classification model is mainly used to identify whether the type of the image is a target type. If a historical query result includes an image of the target type, then the type of the historical query term corresponding to the historical query result is determined to be the target type. The image classification model can be stored locally in the aforementioned electronic device, or the image classification model can also be stored in a network location or other device that can be called by the electronic device.

[0052] After identifying the historical query words of the target type through the type of the image, the query word classification model can be trained based on the historical query words, so that the query word classification model can realize the function of identifying whether the type of the query word is the target type. When it is necessary to determine whether the type of the query word is the target type, manual annotation is no longer required, and it can be directly realized through the query word classification model, which improves the recognition efficiency of the query word type.

[0053] Next, the solution provided by the embodiments of the present application will be described in conjunction with the accompanying drawings. Figure 1 A method flow chart of a method for determining a query term classification model provided in an embodiment of the present application, the method comprising:

[0054] S101: Identify, based on an image classification model, whether the historical query results corresponding to the historical query terms include images of the target type.

[0055] The historical query words here may be query words used by a certain user or multiple users when searching through a search engine. The number of historical query words is generally multiple. A historical query word may include one word, such as "car", or may include multiple words, such as "car black sedan". The historical query result may be the query result obtained by the user through the historical query word query, and one historical query word corresponds to one historical query result. In addition to images, the historical query results may also include other data content.

[0056] Any historical query result may include at least one image, and the image classification model may be used to identify whether the image included in the historical query result is of the target type.

[0057] In an embodiment of the present application, the type of an image may reflect the type of content displayed by the image. For example, the type of an image displaying a car may be a car type, and the type of an image displaying sensitive content may be a sensitive type.

[0058] The types can be pre-classified, and the granularity of the classification can be adjusted according to actual needs. In the embodiment of the present application, the target type can be a type that needs to be identified.

[0059] When the image passes through the image classification model, the possibility of whether the image is of the target type can be obtained, which can be expressed in different forms such as probability or percentage. Next, it can be determined whether the image is of the target type through preset conditions, which can be a higher probability, which can be determined according to different scene requirements.

[0060] For example, when the preset condition is greater than 50%, if the probability that an image is recognized as a target type by the image classification model is 30%, then it can be determined that the type of the image is not the target type; if the probability that an image is recognized as a target type by the image classification model is 60%, then it can be determined that the type of the image is the target type.

[0061] It should be noted that the image classification model can be trained using a set of images of the target type.

[0062] The target type image set includes multiple target type images. The images in the image set can be obtained by pre-classification or by crawling specific type websites. For example, when the target type is automobile type, images can be obtained by crawling automobile forums, vehicle websites, etc. Since the images provided in specific type websites such as automobile forums and vehicle websites are mostly automobile type images, a large proportion of the images obtained by crawling will belong to the automobile type.

[0063] After obtaining a set of images of the target type, an image classification model can be trained based on the set of images. Therefore, the image classification model obtained through training can identify whether the type of the image is the target type. During the training process, images of the target type and images of non-target types can be used for training to improve the recognition accuracy of the image classification model.

[0064] S102: Determine the historical query words corresponding to the historical query results including the images of the target type as the historical query words of the target type.

[0065] When a historical query result includes an image of a target type, it can be considered that the type of the historical query term corresponding to the historical query result can be the target type.

[0066] The type of query word can reflect the user's query intent, which is directly related to what types of images may appear in the query results. For example, when the type of a query word is car type, there is a high probability that car type images will appear in the query results obtained through the query word, or the proportion of car type images in the images is high.

[0067] Therefore, when an image of a target type is identified in a historical query result, it can be considered that the type of the historical query term corresponding to the historical query result can be the target type.

[0068] When the search engine performs a query based on the query term, some of the images obtained may not meet the actual query requirements of the query term. Therefore, in order to improve accuracy, the historical query results may also include images of the target type, and when the proportion of the target type images meets the predetermined conditions, the historical query term corresponding to the historical query result is determined to be the target type. The predetermined condition may be a preset ratio value or quantity value, such as 40% or 50. Therefore, when a historical query term of the target type is determined, the actual query requirements of the historical query term are more likely to meet the target type.

[0069] S103: Training a query term classification model according to historical query terms of the target type.

[0070] Since the query classification model is trained based on the historical query words determined in S102, these historical query words are all target types, so the query classification model obtained by training these historical query words can identify whether the type of the query word is the target type. During the training process, historical query words of the target type and historical query words of non-target types can be used for training to improve the recognition accuracy of the query classification model.

[0071] It can be seen that the image classification model is used to identify the images in the historical query results. If a historical query result includes an image of the target type, then the type of the historical query term corresponding to the historical query result is determined to be the target type. The query term classification model can be trained with the identified historical query term of the target type, so that the query term classification model can realize the function of identifying whether the type of the query term is the target type. When it is necessary to determine whether the type of the query term is the target type, manual labeling is no longer required, and it can be directly realized through the query term classification model, which improves the recognition efficiency of the query term type.

[0072] The above embodiment mainly introduces the method of determining the query word classification model, including how to obtain training data and the process of training the model. Figure 1 On the basis of the corresponding embodiment, the specific application of the query classification model is introduced.

[0073] When the search engine obtains the query word currently input by the user, the search engine can identify the current query word through the query word classification model obtained in S103 to determine whether the current query word is a target type. The search engine described here can be configured in the terminal used by the user, or in a server with a data connection to which the terminal used by the user has.

[0074] Next, the specific application of the query classification model is introduced by taking the query word to be identified as the current query word as an example.

[0075] It should be noted that the query word to be recognized may include one word or multiple words. For example, when the user currently enters the query word "airplane" for query, "airplane" can be used as the query word to be recognized; when the user currently enters the query word "aircraft propeller" for query, "aircraft propeller" can be used as the query word to be recognized.

[0076] When the query word to be recognized currently input by the user is obtained, the type of the query word to be recognized can be recognized by the query word classification model to determine whether the query word to be recognized is a target type.

[0077] When the query to be identified passes through the query classification model, the possibility of whether the query to be identified is the target type can be obtained, which can be expressed in different forms such as probability or percentage. Next, it can be determined whether the query to be identified is the target type through preset conditions, which can be a higher probability, which can be determined according to different scenario requirements.

[0078] For example, when the preset condition is greater than 50%, if the probability that the query word to be identified is the target type through the query word classification model is 30%, then it can be determined that the type of the query word to be identified is not the target type; if the probability that the query word to be identified is the target type through the query word classification model is 60%, then it can be determined that the type of the query word to be identified is the target type.

[0079] If the query word to be identified is identified as the target type, it is equivalent to determining the query requirements and purpose of the user inputting the query word to be identified. The search engine can further optimize the target query results corresponding to the query word to be identified based on the user's query requirements and purpose. Specifically, the type of image in the target query result corresponding to the query word to be identified can be identified according to the image classification model. Among them, the image classification model can be the one used in S101.

[0080] Since the target query results include images, before displaying the target query results to the user, the types of images in the target query results can be identified through an image classification model to determine the images that are specifically of the target type. Therefore, when displaying the target query results to the user, images that are not of the target type can be canceled, or images of the target type can be canceled.

[0081] For example, when the target type is a car, the image classification model can be used to identify car-type images from the target query results. When the target query results are displayed to the user, non-car-type images can be cancelled in the hope that the displayed images can better meet the user's query needs and purposes.

[0082] The target type can also be a sensitive type. Query requirements that meet this type need to be controlled to avoid the spread of bad information. Therefore, when the target type is a sensitive type, the search engine can identify sensitive images in the target query results through the image classification model. When displaying the target query results to the user, the sensitive images can be cancelled and only non-sensitive images can be displayed, in the hope that the displayed images can prevent users from being affected by bad information.

[0083] In some application scenarios, in addition to determining whether the type of the query to be identified is a sensitive type, the sensitivity level corresponding to the sensitive type of the query to be identified can also be determined. The sensitivity level can indicate the degree of sensitivity that the query to be identified can reflect. The sensitivity level of the query to be identified can be determined based on the probability of the sensitive type obtained by the query to be identified through the query classification model, or it can be determined by other methods.

[0084] When the query term to be identified is of a sensitive type but has a low sensitivity level, when filtering images in the target query results, the filtering criteria can be relaxed to display some images in the target query results that are not so sensitive but also meet the user's query requirements to the user, so as to meet the user's query requirements.

[0085] Therefore, in the embodiment of the present application, the determination conditions adopted by the image classification model when identifying the sensitive type can be determined according to the sensitivity level corresponding to the sensitive type of the query word to be identified. For example, for a lower sensitivity level, the determination conditions adopted by the image classification model when identifying the sensitive type can be looser, and for a higher sensitivity level, the determination conditions adopted by the image classification model when identifying the sensitive type can be stricter. Thus, at different sensitivity levels, the results of the same image being identified as a sensitive type by the image classification model can be different. For example, for query words to be identified at a lower sensitivity level, the image classification model identifies images with a higher probability of the sensitive type as sensitive types, while images with a lower probability of the sensitive type will not be identified as sensitive types. For query words to be identified at a higher sensitivity level, the image classification model will not only identify images with a higher probability of the sensitive type as sensitive types, but also images with a lower probability of the sensitive type will be identified as sensitive types.

[0086] Figure 2 20 is a device structure diagram of a device for determining a query term classification model provided in an embodiment of the present application, wherein the device includes a first recognition unit 201, a type determination unit 202, and a first training unit 203:

[0087] The first recognition unit 201 is used to recognize whether the historical query results corresponding to the historical query terms include images of the target type according to the image classification model;

[0088] The type determination unit 202 is used to determine the historical query words corresponding to the historical query results including the images of the target type as the historical query words of the target type;

[0089] The first training unit 203 is used to train a query term classification model according to historical query terms of the target type, and the query term classification model is used to identify whether the type of the query term is the target type.

[0090] Optionally, the device further includes an acquisition unit and a second training unit:

[0091] The acquisition unit is used to acquire an image set of the target type;

[0092] The second training unit is used to train the image classification model according to the image set, and the image classification model is used to identify whether the type of the image is the target type.

[0093] Optionally, the device further includes a second identification unit and a third identification unit:

[0094] The second recognition unit is used to recognize whether the type of the query word to be recognized is the target type according to the query word classification model; if the recognition result is yes, trigger the third recognition unit;

[0095] The third recognition unit is used to recognize the type of the image in the target query result corresponding to the query word to be recognized according to the image classification model.

[0096] Optionally, if the target type is a sensitive type, the third identification unit is further used to cancel the display of the image of the sensitive type in the target query result if it is identified that the target query result includes the image of the sensitive type.

[0097] Optionally, the device further includes a condition determination unit:

[0098] The condition determination unit is used to determine the determination condition adopted by the image classification model when identifying the sensitive type according to the sensitivity level corresponding to the sensitive type of the query word to be identified.

[0099] Optionally, the type determination unit is further configured to determine, as the historical query word of the target type, a historical query word corresponding to a historical query result that includes images of the target type and whose proportion of images of the target type meets a predetermined condition.

[0100] Therefore, in the embodiment of the present application, the determination conditions adopted by the image classification model when identifying the sensitive type can be determined according to the sensitivity level corresponding to the sensitive type of the query word to be identified. For example, for a lower sensitivity level, the determination conditions adopted by the image classification model when identifying the sensitive type can be looser, and for a higher sensitivity level, the determination conditions adopted by the image classification model when identifying the sensitive type can be stricter. Thus, at different sensitivity levels, the results of the same image being identified as a sensitive type by the image classification model can be different. For example, for query words to be identified at a lower sensitivity level, the image classification model identifies images with a higher probability of the sensitive type as sensitive types, while images with a lower probability of the sensitive type will not be identified as sensitive types. For query words to be identified at a higher sensitivity level, the image classification model will not only identify images with a higher probability of the sensitive type as sensitive types, but also images with a lower probability of the sensitive type will be identified as sensitive types.

[0101] Figure 3 1 is a block diagram of a query term classification model determination device 300 according to an exemplary embodiment. For example, the device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0102] Reference Figure 3 , the device 300 may include one or more of the following components: a processing component 302 , a memory 304 , a power component 306 , a multimedia component 308 , an audio component 310 , an input / output (I / O) interface 312 , a sensor component 314 , and a communication component 316 .

[0103] The processing component 302 generally controls the overall operation of the device 300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 302 may include one or more modules to facilitate the interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.

[0104] The memory 304 is configured to store various types of data to support operations on the device 300. Examples of such data include instructions for any application or method operating on the device 300, contact data, phone book data, messages, pictures, videos, etc. The memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0105] The power supply component 306 provides power to the various components of the device 300. The power supply component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 300.

[0106] The multimedia component 308 includes a screen that provides an output interface between the device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the device 300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0107] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC), and when the device 300 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 304 or sent via the communication component 316. In some embodiments, the audio component 310 also includes a speaker for outputting audio signals.

[0108] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0109] The sensor assembly 314 includes one or more sensors for providing various aspects of status assessment for the device 300. For example, the sensor assembly 314 can detect the open / closed state of the device 300, the relative positioning of components, such as the display and keypad of the device 300, the sensor assembly 314 can also detect the position change of the device 300 or a component of the device 300, the presence or absence of user contact with the device 300, the orientation or acceleration / deceleration of the device 300, and the temperature change of the device 300. The sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 314 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0110] The communication component 316 is configured to facilitate wired or wireless communication between the device 300 and other devices. The device 300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0111] In an exemplary embodiment, the apparatus 300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0112] Figure 44 is a schematic diagram of the structure of the server in the embodiment of the present invention. The server 400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 422 (for example, one or more processors) and memory 432, and one or more storage media 430 (for example, one or more mass storage devices) storing application programs 442 or data 444. Among them, the memory 432 and the storage medium 430 can be short-term storage or permanent storage. The program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 422 can be configured to communicate with the storage medium 430 to execute a series of instruction operations in the storage medium 430 on the server 400.

[0113] The server 400 may also include one or more power supplies 426, one or more wired or wireless network interfaces 450, one or more input and output interfaces 458, one or more keyboards 456, and / or, one or more operating systems 441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0114] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the instructions can be executed by the processor 320 of the device 300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0115] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a method for determining a query term classification model, the method comprising:

[0116] Identify whether the historical query results corresponding to the historical query terms include images of the target type according to the image classification model;

[0117] Determining the historical query words corresponding to the historical query results including the images of the target type as the historical query words of the target type;

[0118] A query term classification model is trained according to historical query terms of the target type, and the query term classification model is used to identify whether the type of the query term is the target type.

[0119] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: read-only memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc. Various media that can store program codes.

[0120] It should be noted that each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0121] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for determining a query term classification model, characterized in that: The method comprises: For any historical query result, identifying whether the historical query result includes an image of a target type according to an image classification model, wherein the historical query result includes at least one image, the type of the image reflects the type of content displayed by the image, the historical query result is a query result obtained by a user through a historical query term, and the image classification model is used to identify whether the type of the image is a target type, and the target type is the type that needs to be identified; If the historical query results include images of the target type, determining whether the proportion of images of the target type in the historical query results meets a preset condition; If the proportion of images of the target type in the historical query results meets a predetermined condition, determining the historical query words corresponding to the historical query results including the images of the target type as the historical query words of the target type; A query term classification model is trained based on historical query terms of the target type, and the query term classification model is used to identify whether the type of the query term is the target type, wherein the query term is identified as the target type, and before the target query result corresponding to the query term is displayed to the user, the type of image in the target query result is identified by an image classification model, so as to determine the image of the target type therein, and when the target query result is displayed to the user, the images that are not of the target type are canceled from display, or the images of the target type are canceled from display.

2. The method according to claim 1, characterized in that The method further comprises: Acquire an image set of the target type; The image classification model is trained according to the image set, and the image classification model is used to identify whether the type of the image is the target type.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Identify whether the type of the query word to be identified is the target type according to the query word classification model; If so, the type of the image in the target query result corresponding to the query term to be identified is identified according to the image classification model.

4. The method according to claim 3, characterized in that If the target type is a sensitive type, identifying the type of the image in the target query result corresponding to the query term to be identified according to the image classification model includes: If it is identified that the target query result includes the sensitive type of image, the display of the sensitive type of image in the target query result is cancelled.

5. The method according to claim 4, characterized in that The method further comprises: According to the sensitivity level corresponding to the sensitive type of the query word to be identified, the determination condition adopted by the image classification model when identifying the sensitive type is determined.

6. A device for determining a query term classification model, characterized in that: The device comprises a first recognition unit, a type determination unit and a first training unit: The first recognition unit is used to identify, for any historical query result, whether the historical query result includes an image of a target type according to an image classification model, wherein the historical query result includes at least one image, the type of the image reflects the type of content displayed by the image, the historical query result is a query result obtained by a user through a historical query word query, and the image classification model is used to identify whether the type of the image is a target type, and the target type is a type that needs to be identified; The type determination unit is used to determine whether the proportion of images of the target type in the historical query results meets a preset condition if the historical query results include images of the target type; if the proportion of images of the target type in the historical query results meets the preset condition, determine the historical query words corresponding to the historical query results including the images of the target type as the historical query words of the target type; The first training unit is used to train a query term classification model based on historical query terms of the target type, and the query term classification model is used to identify whether the type of the query term is the target type, wherein the query term is identified as the target type, and before the target query result corresponding to the query term is displayed to the user, the type of image in the target query result is identified by an image classification model to determine the image of the target type, and when the target query result is displayed to the user, the image that is not the target type is canceled, or the image of the target type is canceled.

7. The device according to claim 6, characterized in that The device also includes an acquisition unit and a second training unit: The acquisition unit is used to acquire a set of images of the target type; The second training unit is used to train the image classification model according to the image set, and the image classification model is used to identify whether the type of the image is the target type.

8. The device according to claim 6 or 7, characterized in that The device also includes a second recognition unit and a third recognition unit: The second recognition unit is used to recognize whether the type of the query word to be recognized is the target type according to the query word classification model; if the recognition result is yes, trigger the third recognition unit; The third recognition unit is used to recognize the type of the image in the target query result corresponding to the query word to be recognized according to the image classification model.

9. The device according to claim 8, characterized in that If the target type is a sensitive type, the third identification unit is further configured to cancel display of the image of the sensitive type in the target query result if it is identified that the target query result includes the image of the sensitive type.

10. The device according to claim 9, characterized in that The device also includes a condition determination unit: The condition determination unit is used to determine the determination condition adopted by the image classification model when identifying the sensitive type according to the sensitivity level corresponding to the sensitive type of the query word to be identified.

11. A device for determining a query term classification model, characterized in that: The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: For any historical query result, identifying whether the historical query result includes an image of a target type according to an image classification model, wherein the historical query result includes at least one image, the type of the image reflects the type of content displayed by the image, the historical query result is a query result obtained by a user through a historical query term, and the image classification model is used to identify whether the type of the image is a target type, and the target type is the type that needs to be identified; If the historical query results include images of the target type, determining whether the proportion of images of the target type in the historical query results meets a preset condition; If the proportion of images of the target type in the historical query results meets a predetermined condition, determining the historical query words corresponding to the historical query results including the images of the target type as the historical query words of the target type; A query term classification model is trained based on historical query terms of the target type, and the query term classification model is used to identify whether the type of the query term is the target type, wherein the query term is identified as the target type, and before the target query result corresponding to the query term is displayed to the user, the type of image in the target query result is identified by an image classification model, so as to determine the image of the target type therein, and when the target query result is displayed to the user, the images that are not of the target type are canceled from display, or the images of the target type are canceled from display.

12. A machine-readable medium having instructions stored thereon, which, when executed by one or more processors, causes the device to execute the method for determining a query term classification model as described in one or more of claims 1 to 5.

Citation Information

Patent Citations

  • Search intention identification method and device

    CN105095187A

  • Method for protecting self-adaptive differential privacies in associated medical data

    CN108363928A