A method and device for sending a request and a device for sending a request

By extracting input data features and using the pre-trained request decision model to decide whether to send a request to the server, the problem of inaccurate request sending timing and low efficiency of candidate output in the prior art is solved, and more efficient candidate acquisition and Output.

CN115494965BActive Publication Date: 2024-11-01BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202110680360.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-18
Publication Date
2024-11-01
Estimated Expiration
2041-06-18

AI Technical Summary

Technical Problem

In the prior art, the accuracy of the request sending timing is low, the candidate output efficiency is low, and it is affected by manual experience and rule matching process.

Method used

By extracting feature information from the user's current input data and inputting it to the pre-trained request decision model, it decides whether to send a request to the server, and omits the rule matching process.

Benefits of technology

It improves the accuracy of the request sending time and candidate output efficiency, reduces traffic consumption and candidate output time, and enhances the accuracy of candidates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115494965B_ABST
    Figure CN115494965B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a request sending method, device and device for sending a request. The embodiment of the method includes: extracting feature information from the current input data of the user; inputting the feature information into a pre-trained request decision model to obtain a decision result, and the request decision model is used to decide whether to send a request to the server; in response to the decision result indicating sending a request, sending a candidate item acquisition request to the server based on the current input data. This implementation method improves the accuracy of the request sending timing and the output efficiency of the candidate items.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of computer technology, and in particular to a method and device for sending a request, and a device for sending a request. Background Art

[0002] When users input content using the input method client, candidates can be selected from the client's local word library or obtained by sending a request to the server. Although it is convenient for the client to select candidates locally, it is easy to cause the selected candidates to fail to hit the target word expected by the user due to the limited word library capacity and computing performance. Requesting the server to obtain candidates consumes traffic and increases the output time of the candidates. Therefore, it is extremely important to send a request to the server at the right time.

[0003] In the prior art, it is usually necessary to pre-set a large number of rules based on manual experience, and send a request to the server when the user input data meets the set rules. Since the conditions for sending the request are affected by manual experience, it is difficult to ensure that the request is sent at the optimal time. At the same time, this rule-based request sending method requires a lot of time for rule matching, resulting in low output efficiency of candidate items. Summary of the invention

[0004] The embodiments of the present application propose a request sending method, device and device for sending a request to solve the technical problems of low accuracy of request sending timing and low output efficiency of candidate items in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a request sending method, the method comprising: extracting feature information from current input data of a user; inputting the feature information into a pre-trained request decision model to obtain a decision result, wherein the request decision model is used to decide whether to send a request to a server; in response to the decision result indicating a request to be sent, sending a candidate item acquisition request to the server based on the current input data.

[0006] In a second aspect, an embodiment of the present application provides a request sending device, which includes: an extraction unit, configured to extract feature information from the user's current input data; a decision unit, configured to input the feature information into a pre-trained request decision model to obtain a decision result, and the request decision model is used to decide whether to send a request to a server; a sending unit, configured to send a candidate item acquisition request to the server based on the current input data in response to the decision result indicating a request to be sent.

[0007] In a third aspect, an embodiment of the present application provides a device for sending a request, 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, and the one or more programs include methods for performing the method described in the first aspect above.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.

[0009] The request sending method, device and device for sending requests provided in the embodiments of the present application extract feature information from the user's current input data and input the feature information into a pre-trained request decision model to obtain a decision result, so that when the decision result indicates sending a request, a candidate item acquisition request is sent to the server based on the current input data. Since the decision model can automatically decide whether to send a request to the server based on the current input data and is not affected by human experience, the accuracy of the timing of request sending can be improved. At the same time, the rule matching process in the prior art is omitted before the request is sent, thereby improving the output efficiency of the candidate items. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0011] Figure 1 is a flowchart of an embodiment of a request sending method according to the present application;

[0012] Figure 2 is a flowchart of another embodiment of the request sending method according to the present application;

[0013] Figure 3 is a structural diagram of an embodiment of a request sending device according to the present application;

[0014] Figure 4 is a structural schematic diagram of a device for sending a request according to the present application;

[0015] Figure 5 It is a schematic diagram of the structure of the server in some embodiments of the present application. DETAILED DESCRIPTION

[0016] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0017] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0018] Please refer to Figure 1 , which shows a process 100 of an embodiment of a request sending method according to the present application. The request sending method can be run on various electronic devices, including but not limited to: servers, smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, car computers, desktop computers, set-top boxes, smart TVs, wearable devices, etc.

[0019] The input method application mentioned in the embodiment of the present application can support multiple input methods. Among them, the input method can be a coding method used to input various symbols into electronic devices such as computers and mobile phones. Users can use the input method application to conveniently input the required characters or strings into electronic devices. It should be noted that in the embodiment of the present application, in addition to supporting common Chinese input methods (such as pinyin input method, Wubi input method, Zhuyin input method, voice input method, handwriting input method, etc.), the input method can also support input methods of other languages ​​(such as English input method, Japanese Hiragana input method, Korean input method, etc.), and no limitation is made on the input method and the language type of the input method.

[0020] The request sending method in this embodiment may include the following steps:

[0021] Step 101: extract feature information from the user's current input data.

[0022] In this embodiment, the execution subject of the request sending method (such as the above-mentioned electronic device) may be installed with an input method client. The above-mentioned execution subject may obtain the current input data of the target user in the input method client in real time, and extract feature information from the current input data. The input data is the input-related data generated by the user during the input process. For example, it may include but is not limited to the current input string, local candidate items of the client, etc. The current input data is the input data generated in the current input process (i.e., this input process). The feature information may be information used to characterize the features of the current input data.

[0023] In some examples, the feature information may include but is not limited to at least one of the following: input string length, candidate item length, number of candidate items, word frequency of the first candidate item, type of the first candidate item, etc. The candidate items here may refer to candidate items obtained locally from the client, such as candidate items obtained from a local system word library, a user word library, and other sources.

[0024] Step 102: input the feature information into a pre-trained request decision model to obtain a decision result.

[0025] In this embodiment, a pre-trained request decision model may be stored in the above-mentioned execution entity. The request decision model can be used to decide whether to send a request to the server. The server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. The server can be a physical server or a cloud server. When the server is software, it can be implemented as multiple software or software modules, or it can be implemented as a single software or software module. No specific limitation is made here.

[0026] In this embodiment, the request decision model can be pre-trained using a machine learning method based on historical input data. The above-mentioned execution subject can input the feature information extracted in step 101 into the request decision model to obtain a decision result output by the request decision model. In practice, the decision result can be a numerical value. If the numerical value is greater than a preset value, it can indicate that a request is sent to the server; conversely, if the numerical value is less than the preset value, it can indicate that a request is not sent to the server.

[0027] In this embodiment, the request decision model can be obtained by training the classification model. The classification model can be various models with classification functions, such as convolutional neural networks using existing structures (such as DenseBox, VGGNet, ResNet, SegNet, etc.), support vector machines (SVM), various types of decision trees, etc. It can be trained according to the following steps:

[0028] The first step is to obtain the user's historical input data.

[0029] Here, historical input data refers to input data generated in the historical input process. Each historical input process can generate a piece of historical input data. The historical input data may include but is not limited to historical input strings, local candidates on the client, candidates sent by the server, and user screen candidates. Based on the historical input data, it can be known whether the local candidates on the client and the candidates sent by the server hit the user screen candidates.

[0030] In the second step, based on the hits between the candidates sent by the server and the local candidates on the client and the candidates on the user's screen, the historical input data is divided into positive samples and negative samples.

[0031] Here, each piece of historical input data can be used as a sample. For each piece of historical input data, if the candidate item sent by the server in the historical input data hits the user's screen candidate item and the candidate item on the client's local side does not hit the user's screen candidate item, the historical input data can be used as a positive sample. Otherwise, it can be used as a negative sample.

[0032] The third step is to train the classification model based on positive samples and negative samples to obtain the request decision model.

[0033] Here, the positive samples and negative samples may be first aggregated into a sample set. Then, feature information may be extracted from each sample in the sample set. Similar to the feature information extracted from the current input data, the feature information here may also include but is not limited to at least one of the following: input string length, candidate item length, number of candidate items, word frequency of the first candidate item, type of the first candidate item, etc. After extracting the feature information, the feature information of the sample may be used as the input of the classification model, and the classification model may be supervised trained based on the sample type (positive sample or negative sample) corresponding to the input feature information, and the trained classification model may be determined as the request decision model.

[0034] During the training process, the characteristic information of the samples can be input into the classification model one by one to obtain the classification result (which can be a numerical value) output by the end-to-end model. Then, the loss value of the classification model can be determined based on the sample type (positive sample or negative sample, for example, 1 can be used to represent a positive sample and 0 can be used to represent a negative sample) corresponding to the classification result and the input characteristic information. The above loss value is the value of the loss function, which is a non-negative real-valued function that can be used to characterize the difference between the detection result and the true result. In general, the smaller the loss value, the better the robustness of the model. The loss function can be set according to actual needs. Afterwards, the loss value can be used to update the parameters of the classification model. Thus, each time the characteristic information of the sample is input, a loss value can be obtained. Based on the loss value, the parameters of the classification model can be updated once until the training is completed.

[0035] In practice, whether training is completed can be determined in a variety of ways. As an example, when the accuracy of the classification result output by the classification model reaches a preset value (for example, 99%), the training can be determined to be completed. As another example, if the number of training times of the classification model is equal to the preset number of times, the training can be determined to be completed. Here, if the classification model training is completed, the trained classification model can be used as a request decision model to decide whether to send a request to the server.

[0036] It is understandable that when the local candidate items on the client do not hit the target word expected by the user, but the candidate items sent by the server can hit the target word, it is the most reasonable time to send a request to the server, and a request needs to be sent to the server at this time. Since the request decision model is pre-trained based on historical input data, and the historical input data can reflect the hits of the local candidate items on the client and the candidate items sent by the server to the user's screen candidate items, the request decision model can automatically learn the features when the server needs to be requested, so as to make a decision to send a request when the current input data meets the features. Since the decision-making process is not affected by human experience, the accuracy of the timing of request sending can be improved. At the same time, since the rule matching process in the prior art is omitted before the request is sent, the output efficiency of the candidate items is improved.

[0037] Furthermore, since the timing of request sending is accurate, on the one hand, it avoids the situation where a request is still sent to the server when the local candidate hits the target word expected by the user, reducing traffic consumption and the time consumption of candidate output. On the other hand, it avoids the situation where a request is not sent to the server when the local candidate does not hit the target word expected by the user, improving the accuracy of the candidate.

[0038] Step 103, in response to the decision result indicating a request to send, a candidate item acquisition request is sent to the server based on the current input data.

[0039] In this embodiment, in response to the decision result outputted by the request decision model indicating a request to send, the execution subject may send a candidate acquisition request to the server based on the current input data to request the server to return the candidate. After receiving the candidate acquisition request, the server may return a number of matching candidate items based on the current input data. After receiving the candidate items returned by the server, the execution subject may sort them with the local candidate items, thereby displaying the candidate items according to the sorting result.

[0040] In some optional implementations of this embodiment, the current input data includes the current input string. In response to the decision result indicating a request to send, the execution subject may send a candidate item acquisition request including the current input string to the server, whereby the server may acquire several matching candidate items based on the current input string and return them to the execution subject.

[0041] The method provided by the above-mentioned embodiment of the present application extracts feature information from the user's current input data and inputs the feature information into a pre-trained request decision model to obtain a decision result, so that when the decision result indicates to send a request, a candidate item acquisition request is sent to the server based on the current input data. Since the decision model can automatically decide whether to send a request to the server based on the current input data and is not affected by human experience, the accuracy of the timing of request sending can be improved. At the same time, the rule matching process in the prior art is omitted before the request is sent, thereby improving the output efficiency of the candidate items.

[0042] Further references Figure 2 , which shows a process 200 of another embodiment of a request sending method. The process 200 of the request sending method includes the following steps:

[0043] Step 201: extract feature information from the user's current input data.

[0044] Step 201 in this embodiment can be found in Figure 1 The step 101 of the corresponding embodiment will not be described in detail here.

[0045] Step 202: input the feature information into a pre-trained request decision model to obtain a decision result.

[0046] Step 202 in this embodiment can be found in Figure 1 The step 102 of the corresponding embodiment will not be described in detail here.

[0047] In some optional implementations of the present embodiment, the request decision model is trained through the following steps: obtaining the user's historical input data; dividing the historical input data into positive samples and negative samples based on the hits of the candidate items sent by the server and the candidate items local to the client on the user's screen; based on the positive samples and the negative samples, training the classification model to obtain the request decision model.

[0048] In some optional implementations of the present embodiment, the historical input data is divided into positive samples and negative samples based on the hit of the candidate items sent by the server and the candidate items local to the client on the user's screen, including: for each piece of historical input data, if the candidate items sent by the server in the historical input data hit the candidate items on the user's screen, and the candidate items local to the client do not hit the candidate items on the user's screen, then the historical input data is taken as a positive sample; and the historical input data other than the positive sample is taken as a negative sample.

[0049] In some optional implementations of the present embodiment, the classification model is trained based on the positive samples and the negative samples to obtain a request decision model, including: aggregating the positive samples and the negative samples into a sample set; extracting feature information from the samples in the sample set, and using the feature information of the samples as input of the classification model, performing supervised training on the classification model based on the sample type corresponding to the input feature information, and determining the trained classification model as the request decision model.

[0050] Step 203, in response to the decision result indicating a request to send, a candidate item acquisition request is sent to the server based on the current input data.

[0051] Step 203 in this embodiment can be found in Figure 1 The step 103 of the corresponding embodiment will not be described in detail here.

[0052] In some optional implementations of the present embodiment, the current input data includes a current input string; and in response to the decision result indicating a sending request, a candidate item acquisition request is sent to the server based on the current input data, including: in response to the decision result indicating a sending request, a candidate item acquisition request containing the current input string is sent to the server.

[0053] Step 204: Receive the candidate items returned by the server.

[0054] In this embodiment, after sending a candidate item acquisition request to the server, the execution subject of the request sending method can receive the candidate items returned by the server, and retrain the request decision model based on the type of candidate items selected by the user to update the request decision model.

[0055] Step 205 , in response to the user selecting the candidate item returned by the server, the current input data is used as a positive sample, and the request decision model is retrained based on the positive sample to update the request decision model.

[0056] In this embodiment, in response to the user selecting the candidate returned by the server, the execution subject may use the current input data as a positive sample and retrain the request decision model based on the positive sample to update the request decision model. In this way, the request decision model can be continuously updated to improve the generalization of the request decision model. The method of retraining the request decision model is basically the same as the model training method in the above embodiment, and will not be repeated here.

[0057] Step 206 , in response to the user not selecting the candidate item returned by the server, the current input data is used as a negative sample, and the request decision model is retrained based on the negative sample to update the request decision model.

[0058] In this embodiment, in response to the user not selecting the candidate returned by the server, the execution subject may use the current input data as a negative sample and retrain the request decision model based on the negative sample to update the request decision model. In this way, the request decision model can be continuously updated to improve the generalization of the request decision model. The method of retraining the request decision model is basically the same as the model training method in the above embodiment, and will not be repeated here.

[0059] from Figure 2 It can be seen that Figure 1 Compared with the corresponding embodiment, the process 200 of the request sending method in this embodiment involves the step of retraining the request decision model based on the candidate items returned by the server and the types of the candidate items selected by the user. Thus, the request decision model can be continuously updated to improve the generalization of the request decision model.

[0060] Further references Figure 3 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a request sending device, and the device embodiment is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0061] like Figure 3 As shown, the request sending device 300 in this embodiment includes: an extraction unit 301, configured to extract feature information from the user's current input data; a decision unit 302, configured to input the above feature information into a pre-trained request decision model to obtain a decision result, and the above request decision model is used to decide whether to send a request to the server; a sending unit 303, configured to send a candidate item acquisition request to the above server in response to the above decision result indicating the sending request, based on the above current input data.

[0062] In some optional implementations of the present embodiment, the request decision model is trained through the following steps: obtaining the user's historical input data; dividing the historical input data into positive samples and negative samples based on the hits of the candidate items sent by the server and the candidate items local to the client on the user's screen; based on the positive samples and the negative samples, training the classification model to obtain the request decision model.

[0063] In some optional implementations of the present embodiment, the historical input data is divided into positive samples and negative samples based on the hit of the candidate items sent by the server and the local candidate items on the client to the user's screen candidate items, including: for each piece of historical input data, if the candidate item sent by the server in the historical input data hits the user's screen candidate item and the local candidate item on the client does not hit the user's screen candidate item, then the historical input data is taken as a positive sample; and the historical input data other than the positive sample is taken as a negative sample.

[0064] In some optional implementations of the present embodiment, the classification model is trained based on the positive samples and the negative samples to obtain a request decision model, including: aggregating the positive samples and the negative samples into a sample set; extracting feature information from the samples in the sample set, and using the feature information of the samples as input of the classification model, performing supervised training on the classification model based on the sample type corresponding to the input feature information, and determining the trained classification model as the request decision model.

[0065] In some optional implementations of this embodiment, the current input data includes a current input string; and the sending unit is further configured to: in response to the decision result indicating a sending request, send a candidate item acquisition request containing the current input string to the server.

[0066] In some optional implementations of the present embodiment, the apparatus further includes a retraining unit configured to: receive candidate items returned by the server; in response to a user selecting the candidate items returned by the server, use the current input data as a positive sample, and retrain the request decision model based on the positive sample to update the request decision model; or, in response to a user not selecting the candidate items returned by the server, use the current input data as a negative sample, and retrain the request decision model based on the negative sample to update the request decision model.

[0067] In some optional implementations of this embodiment, the above-mentioned feature information includes at least one of the following: input string length, candidate item length, number of candidate items, word frequency of the first candidate item, and type of the first candidate item.

[0068] The device provided by the above-mentioned embodiment of the present application extracts feature information from the user's current input data and inputs the feature information into a pre-trained request decision model to obtain a decision result, so that when the decision result indicates to send a request, a candidate item acquisition request is sent to the server based on the current input data. Since the decision model can automatically decide whether to send a request to the server based on the current input data and is not affected by human experience, the accuracy of the timing of request sending can be improved. At the same time, the rule matching process in the prior art is omitted before the request is sent, thereby improving the output efficiency of the candidate items.

[0069] Figure 4 4 is a block diagram of an apparatus 400 for sending a request according to an exemplary embodiment, and the apparatus 400 may be an intelligent terminal or a server. For example, the apparatus 400 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.

[0070] Reference Figure 4 , the device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .

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

[0072] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 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.

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

[0074] The multimedia component 408 includes a screen that provides an output interface between the above-mentioned device 400 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 can 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 above-mentioned touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the above-mentioned touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0075] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the device 400 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 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.

[0076] I / O interface 412 provides an interface between processing component 402 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.

[0077] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of the components, such as the display and keypad of the device 400, the sensor assembly 414 can also detect the position change of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400 and the temperature change of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 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 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0078] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 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 416 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 416 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.

[0079] In an exemplary embodiment, the apparatus 400 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.

[0080] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of the device 400 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.

[0081] Figure 55 is a schematic diagram of the structure of the server in some embodiments of the present application. The server 500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 522 (for example, one or more processors) and a memory 532, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 542 or data 544. Among them, the memory 532 and the storage medium 530 can be short-term storage or permanent storage. The program stored in the storage medium 530 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 522 can be configured to communicate with the storage medium 530 and execute a series of instruction operations in the storage medium 530 on the server 500.

[0082] The server 500 may also include one or more power supplies 526, one or more wired or wireless network interfaces 550, one or more input and output interfaces 558, one or more keyboards 556, and / or one or more operating systems 541, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0083] A non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a device (smart terminal or server), the device is able to execute a request sending method. The method includes: extracting feature information from the user's current input data; inputting the feature information into a pre-trained request decision model to obtain a decision result, and the request decision model is used to decide whether to send a request to a server; in response to the decision result indicating a request to be sent, sending a candidate item acquisition request to the server based on the current input data.

[0084] Optionally, the request decision model is trained through the following steps: obtaining the user's historical input data; dividing the historical input data into positive samples and negative samples based on the hits of the candidate items sent by the server and the candidate items local to the client on the user's screen; based on the positive samples and the negative samples, training the classification model to obtain the request decision model.

[0085] Optionally, the historical input data is divided into positive samples and negative samples based on the hit of the candidate items sent by the server and the local candidate items on the client for the user's screen candidate items, including: for each piece of historical input data, if the candidate item sent by the server in the historical input data hits the user's screen candidate item and the local candidate item on the client does not hit the user's screen candidate item, then the historical input data is taken as a positive sample; and the historical input data other than the positive sample is taken as a negative sample.

[0086] Optionally, the classification model is trained based on the positive samples and the negative samples to obtain a request decision model, including: aggregating the positive samples and the negative samples into a sample set; extracting feature information from the samples in the sample set, and using the feature information of the samples as input to the classification model; based on the sample type corresponding to the input feature information, the classification model is supervised trained, and the trained classification model is determined as the request decision model.

[0087] Optionally, the current input data includes a current input string; and the sending of a request in response to the decision result indicating a request to send, sending a candidate item acquisition request to the server based on the current input data, includes: sending a request in response to the decision result indicating a request to send, sending a candidate item acquisition request containing the current input string to the server.

[0088] Optionally, the device is configured to execute the one or more programs including instructions for performing the following operations by one or more processors: receiving candidate items returned by the server; in response to a user selecting the candidate items returned by the server, using the current input data as a positive sample, and retraining the request decision model based on the positive sample to update the request decision model; or, in response to a user not selecting the candidate items returned by the server, using the current input data as a negative sample, and retraining the request decision model based on the negative sample to update the request decision model.

[0089] Optionally, the feature information includes at least one of the following: input string length, candidate item length, number of candidate items, word frequency of the first candidate item, and type of the first candidate item.

[0090] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0091] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

[0092] The above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

[0093] The above is a detailed introduction to a request sending method, device and a device for sending a request provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A request sending method, characterized in that: The method comprises: Extract feature information from the user's current input data; Inputting the feature information into a pre-trained request decision model to obtain a decision result, wherein the request decision model is used to decide whether to send a request to the server; In response to the decision result indicating a sending request, sending a candidate item acquisition request to the server based on the current input data; The request decision model is trained through the following steps: Get the user's historical input data; Based on the hits of the candidate items sent by the server and the candidate items on the client's local screen to the candidate items on the user's screen, the historical input data is divided into positive samples and negative samples; Based on the positive samples and the negative samples, a classification model is trained to obtain a request decision model.

2. The method according to claim 1, characterized in that The historical input data is divided into positive samples and negative samples based on the hit of the candidate items sent by the server and the candidate items on the client's local screen to the candidate items on the user's screen, including: For each piece of historical input data, if the candidate item sent by the server in the historical input data hits the user's screen candidate item and the candidate item on the client's local side does not hit the user's screen candidate item, then the historical input data is taken as a positive sample; The historical input data except the positive samples are taken as negative samples.

3. The method according to claim 1, characterized in that The step of training the classification model based on the positive samples and the negative samples to obtain a request decision model includes: Aggregating the positive samples and the negative samples into a sample set; Feature information is extracted from samples in the sample set, and the feature information of the samples is used as input of a classification model. Based on the sample type corresponding to the input feature information, supervised training is performed on the classification model, and the trained classification model is determined as a request decision model.

4. The method according to claim 1, characterized in that: The current input data includes a current input string; as well as, The sending of a request in response to the decision result indicating the sending of a request, and sending a candidate item acquisition request to the server based on the current input data, comprises: In response to the decision result indicating a sending request, a candidate item acquisition request including the current input string is sent to the server.

5. The method according to claim 1, characterized in that After sending a candidate item acquisition request to the server based on the current input data, the method further includes: Receiving the candidate items returned by the server; In response to the user selecting the candidate item returned by the server, taking the current input data as a positive sample, and retraining the request decision model based on the positive sample to update the request decision model; or, In response to the user not selecting the candidate item returned by the server, the current input data is used as a negative sample, and the request decision model is retrained based on the negative sample to update the request decision model.

6. The method according to claim 1, characterized in that The feature information includes at least one of the following: input string length, candidate item length, number of candidate items, word frequency of the first candidate item, and type of the first candidate item.

7. A request sending device, characterized in that: The device comprises: An extraction unit, configured to extract feature information from current input data of the user; A decision unit is configured to input the feature information into a pre-trained request decision model to obtain a decision result, wherein the request decision model is used to decide whether to send a request to the server; a sending unit, configured to send a candidate item acquisition request to the server based on the current input data in response to the decision result indicating a sending request; The request decision model is trained through the following steps: Get the user's historical input data; Based on the hits of the candidate items sent by the server and the candidate items on the client's local screen to the candidate items on the user's screen, the historical input data is divided into positive samples and negative samples; Based on the positive samples and the negative samples, a classification model is trained to obtain a request decision model.

8. The device according to claim 7, characterized in that The historical input data is divided into positive samples and negative samples based on the hit of the candidate items sent by the server and the candidate items on the client's local screen to the candidate items on the user's screen, including: For each piece of historical input data, if the candidate item sent by the server in the historical input data hits the user's screen candidate item and the candidate item on the client's local side does not hit the user's screen candidate item, then the historical input data is taken as a positive sample; The historical input data except the positive samples are taken as negative samples.

9. The device according to claim 7, characterized in that The step of training the classification model based on the positive samples and the negative samples to obtain a request decision model includes: Aggregating the positive samples and the negative samples into a sample set; Feature information is extracted from samples in the sample set, and the feature information of the samples is used as input of a classification model. Based on the sample type corresponding to the input feature information, supervised training is performed on the classification model, and the trained classification model is determined as a request decision model.

10. The device according to claim 7, characterized in that The current input data includes a current input string; and, The sending unit is further configured to: In response to the decision result indicating a sending request, a candidate item acquisition request including the current input string is sent to the server.

11. The device according to claim 7, characterized in that The apparatus further comprises a retraining unit configured to: Receiving the candidate items returned by the server; In response to the user selecting the candidate item returned by the server, taking the current input data as a positive sample, and retraining the request decision model based on the positive sample to update the request decision model; or, In response to the user not selecting the candidate item returned by the server, the current input data is used as a negative sample, and the request decision model is retrained based on the negative sample to update the request decision model.

12. A device for sending a request, characterized in that The invention comprises a memory and one or more programs, wherein the one or more programs are stored in the memory, and when the programs are executed by one or more processors, the steps of the method described in any one of claims 1 to 6 are implemented.

13. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Adaptive adjustment method and device for input method in client

    CN103927220A

  • Input method and device

    CN108958503A

  • Method and terminal device for presenting candidate item

    CN109074354A

  • Data processing method and device and electronic equipment

    CN111796690A

  • Input method and related device

    CN112732098A