Model training method and terminal equipment
By obtaining the text information entered by the user in the preset application as training samples in the terminal device, and training the recognition model to identify text types, the problem of poor matching between the training samples and the user's copy text content in the prior art is solved, and higher model recognition accuracy and user service accuracy are achieved.
Patent Information
- Application Number
- CN202210978950.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-16
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2042-08-16
AI Technical Summary
When training a model for identifying text types, the prior art requires obtaining a large amount of text content marked with text types from the Internet, but this results in poor matching of the training samples with the text content copied by the user in the terminal device, thereby reducing the accuracy of the model recognition.
By detecting the user's input operation on the preset input box in the preset application, obtaining the input information as a training sample, training the recognition model to identify the text type of text information, and providing corresponding services according to the text type.
Improve the accuracy of model recognition, ensure the availability of training samples and adaptability to users, and thus provide users with accurate services.
Smart Images

Figure CN116092098B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a model training method and a terminal device. Background Art
[0002] With the development of terminal technology, terminal devices have gradually transformed from the "people looking for services" mode to the "services looking for people" mode. For example, when the terminal device detects the user's operation, it can perceive the user's operation intention and actively push service options in the form of service cards or capsules to facilitate the user to perform the next operation without the user having to search for services themselves.
[0003] After detecting the user's operation of copying text, the terminal device can respond to the operation, perceive the user's operation intention, and push service options to the user in the form of service cards or capsules. The user does not need to open other applications to search for services, and can provide services to users conveniently and efficiently. In order to accurately perceive the user's intention to copy text, the terminal device can identify the user's copied text through a model, determine the text type, and then provide services to the user. For example, the user copied the text "Nanshan District Binhai Avenue", and the terminal device detected the user's operation of copying text. In response to the operation, the text "Nanshan District Binhai Avenue" was identified through a model, and the text type was determined to be an address. The user can be provided with services such as opening, copying, and sharing on a map in the form of a service card.
[0004] Currently, a method for obtaining a model for identifying text types is as follows: a text annotated with a text type is obtained from the Internet, and a neural network model is trained using the text and the annotated type of the text, thereby obtaining a text type recognition model.
[0005] This implementation method generally requires obtaining a large amount of text content marked with text types to meet the needs of different users. However, the text content obtained from the Internet and the text content copied by the user when using the target service in the terminal device are poorly matched. In other words, the text content obtained from the Internet is quite different from the content copied by the user. This will cause inaccurate recognition results when the text type copied by the user on the terminal device is recognized using the model trained based on the aforementioned method, thereby reducing the accuracy of the service provided to the user by the terminal device based on the text type recognized by the model. Summary of the invention
[0006] The present application provides a model training method and a terminal device, which can improve the accuracy of model recognition and thus provide accurate services to users.
[0007] In a first aspect, a model training method is provided, comprising: detecting a user's input operation on a preset input box in a preset application of a terminal device; obtaining input information in response to the input operation; using the input information as a training sample to train a recognition model, the recognition model being used to identify the text type of the text information, the service corresponding to the text type being the target service provided by the terminal device to the user based on the input information.
[0008] The preset application may also be referred to as a preset application, a specific application or a specific application, which is not limited in this application. The preset application includes multiple input boxes, and the multiple input boxes include a preset input box. The terminal device may only detect the input operation of the preset input box. This application does not limit the specific number of preset applications and preset input boxes. The input information may be information pasted by the user or information manually entered by the user, which is not limited in this application. The preset input box may allow the input of one or more types of text, which is not limited in this application.
[0009] The preset applications may include taxi applications, map applications, shopping applications, telephone applications, conference applications, information applications, search applications, news applications, video applications, express delivery applications, ticket purchasing applications, ticket checking applications, and the like.
[0010] The terminal device can collect address data as training samples through taxi applications, map applications, and shopping applications. The terminal device can collect number data as training samples through telephone applications, conference applications, and information applications. The terminal device can collect link data as training samples through search applications, news applications, and video applications. The terminal device can collect express delivery numbers as training samples through express delivery applications. The terminal device can collect ticket schedule data as training samples through ticket purchase applications and ticket checking applications.
[0011] Optionally, if the preset input box only allows input of one type of text, the terminal device can use the input information and the text type corresponding to the preset input box as training samples, without the need for additional annotations on the input information, which is conducive to improving the speed of model training.
[0012] The model training method provided in the present application utilizes the information pasted or entered by the user in the preset input box in the preset application as a training sample, collects the user's information in a targeted manner, and uses the user's information as a training sample to train the model, which is conducive to ensuring the availability of the training samples, can improve the recognition accuracy of the model, and the model is more adaptable to the user, thereby accurately providing services to the user.
[0013] In combination with the first aspect, in certain implementations of the first aspect, the above-mentioned use of input information as a training sample to train a recognition model includes: sending the input information to a server, and the server training the recognition model based on the input information marked with text type to obtain a trained recognition model.
[0014] The terminal device can send input information to the server, and the server performs model training based on the input information. The text type of the input information can be manually annotated by the user or automatically annotated based on an existing annotation method, which is not limited in this application.
[0015] The server can use the input information as the input of the recognition model, use the text type annotated by the input information as the output of the recognition model, and train the parameters of the recognition model to obtain a trained recognition model.
[0016] Optionally, if the terminal device sends input information and the text type of the input information (that is, the text type allowed by the preset input box) to the server, the server can train the recognition model based on the input information and the text type of the input information to obtain a trained recognition model.
[0017] In the model training method provided in the present application, the terminal device sends input information to the server, and the server performs model training based on the input information. The training of the entity recognition model can be completed by the server, and there is no need for the terminal device to train the model, which can save the computing power of the terminal device and reduce the power consumption of the terminal device.
[0018] In combination with the first aspect, in some implementations of the first aspect, the sending of the input information to the server includes: encrypting the input information to obtain the encrypted input information; and sending the encrypted input information to the server.
[0019] Before sending input information to the server, the terminal device can encrypt the input information using differential privacy and noise, obtain the encrypted input information, and send the encrypted input information to the server.
[0020] The model training method provided in this application sends encrypted input information to the server, which can prevent the leakage of input information and thus avoid the leakage of user privacy, thereby achieving the purpose of secure transmission.
[0021] In combination with the first aspect, in some implementations of the first aspect, the method further includes: sending a first request message to a server, the first request message being used to request a trained recognition model; and receiving the trained recognition model from the server.
[0022] The terminal device may request the trained recognition model from the server to update the pre-trained recognition model. After transmitting input information to the server, the terminal device may send a first request message to the server when there is an application demand, or may periodically obtain the recognition model, which is not limited in this application.
[0023] Optionally, the terminal device can receive the trained recognition model actively sent by the server, that is, the terminal device does not need to send the first request message, which can save signaling overhead.
[0024] The model training method provided in the present application sends a first request message to the server when there is an application demand to obtain a trained recognition model for text type recognition, which is more proactive.
[0025] In combination with the first aspect, in certain implementations of the first aspect, the above method also includes: detecting a user's copy operation on the first text; in response to the user's copy operation on the first text, inputting the first text into a trained recognition model; determining a text type of the first text based on output information of the trained recognition model; and determining a target service of the first text based on the text type of the first text.
[0026] The terminal device can perform text type recognition based on the trained recognition model. The trigger condition of the recognition model is that the terminal device detects the user's copy operation on the text.
[0027] If the terminal device detects a user's copy operation on the first text, in response to the operation, the terminal device may input the first text into a trained recognition model, and the output information of the trained recognition model is the text type of the first text. According to the text type of the first text, a target service may be provided to the user. The target service may be displayed in the form of a capsule or a service card, which is not limited in this application. The target service may be understood as a service in the service recommendation list.
[0028] It is understandable that there is a corresponding relationship between text type and service, and the terminal device can determine the service based on the text type.
[0029] The model training method provided in the present application can recognize the first text based on the trained recognition model in response to the user's operation of copying the first text. The recognition accuracy of the recognition model is improved, which is conducive to providing accurate services to users.
[0030] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: obtaining a second text in the first image, the second text being obtained in response to a user triggering an operation on a text recognition icon; inputting the second text into a trained recognition model; determining a text type of the second text based on output information of the trained recognition model; and determining a target service of the second text based on the text type of the second text.
[0031] In response to the user's triggering operation on the text recognition icon, the terminal device can obtain the second text in the first picture. At this time, the recognition model can be triggered to recognize the second text. If the recognition is successful, it can be indicated that there are one or more text types in the second text. The terminal device can provide the user with target services based on the recognized text type.
[0032] It should be noted that the first text and the second text may be the same or different, and this application does not limit this.
[0033] The model training method provided in the present application can recognize text in an image, and recognize the text through a trained recognition model, and provide services to users based on the recognized text type. The recognition accuracy of the recognition model is improved, which is conducive to providing accurate services to users.
[0034] In combination with the first aspect, in certain implementations of the first aspect, the trained recognition model includes a standard address rule parsing model and a non-standard address parsing model; inputting input information into the trained recognition model includes: inputting the input information into the standard address rule parsing model; if the input information does not conform to the rules of the standard address rule parsing model, inputting the input information into the non-standard address parsing model; determining the text type of the input information based on the output information of the trained recognition model, includes: determining the text type of the input information based on the output information of the non-standard address parsing model.
[0035] The standard address rule parsing model is used to identify text of standard address types, for example, Binhai Avenue, Nanshan District. The non-standard address parsing model is used to identify text of non-standard address types. The terminal device can first input the collected sample data set input information into the standard address rule parsing model to determine whether it meets the rules of the standard address rule parsing model.
[0036] If the input information does not conform to the rules of the standard address rule parsing model, the input information is input into the non-standard address parsing model, and the text type of the input information is determined by the output of the non-standard address parsing model.
[0037] The model training method provided in the present application identifies addresses based on a standard address rule parsing model and a non-standard address parsing model, and can comprehensively determine whether input information is an address based on the output information of both, thereby reducing the probability of misjudgment.
[0038] In combination with the first aspect, in certain implementations of the first aspect, the above method also includes: if the input information conforms to the rules of the standard address rule parsing model; according to the output information of the trained recognition model, determining the text type of the input information, including: according to the output information of the standard address rule parsing model, determining the text type of the input information.
[0039] The model training method provided in the present application, when the input information conforms to the rules of the standard address rule parsing model, there is no need to judge through the non-standard address parsing model, which can improve the recognition efficiency.
[0040] In combination with the first aspect, in certain implementations of the first aspect, the above-mentioned inputting the input information into the trained recognition model includes: if the text type of the input information is at least one of an address, a URL or an email address, determining whether the input information contains error information; if error information exists, correcting the input information to obtain corrected input information; and outputting the output information of the trained recognition model, the output information including the text type of the input information and the corrected input information.
[0041] For example, if the user's input information is www.baidui.com, the terminal device determines that the input information contains error information, and can correct the input information to obtain the corrected input information www.baidu.com.
[0042] The model training method provided in this application can correct texts of address, URL or email type and output the corrected information, which is helpful to remind users that their input is incorrect and can improve the user experience.
[0043] In combination with the first aspect, in some implementations of the first aspect, the method further includes: using the input information as a training sample, updating the dictionary, and obtaining an updated dictionary, wherein the dictionary includes information historically input by the user.
[0044] The dictionary may also be called a dictionary, which is not limited in this application. The dictionary includes information inputted by the user in history. After the terminal device obtains the input information, it may add it to the dictionary, that is, update the dictionary, and obtain an updated dictionary.
[0045] The model training method provided in this application can store the information input by the user in the form of a dictionary for subsequent use.
[0046] In combination with the first aspect, in some implementations of the first aspect, the method further includes: sending the updated dictionary to the server under a preset condition, where the preset condition is used to indicate that the terminal device is idle.
[0047] The terminal device can send the updated dictionary to the server when it is idle (preset conditions).
[0048] The model training method provided in the present application can send the updated dictionary to the server for storage when idle, which can save the storage space of the terminal device and does not increase the burden on the terminal device.
[0049] In combination with the first aspect, in some implementations of the first aspect, the updated dictionary is a first dictionary; sending the updated dictionary to the server includes: encrypting the first dictionary to obtain an encrypted first dictionary; and sending the encrypted first dictionary to the server.
[0050] The model training method provided in the present application sends the encrypted first dictionary to the server, which can prevent the leakage of the first dictionary and further avoid the leakage of user privacy, thereby achieving the purpose of secure transmission.
[0051] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: sending a second request message to the server, the second request message being used to request an updated dictionary; and receiving an updated dictionary from the server, the updated dictionary being determined based on dictionaries of multiple terminal devices.
[0052] The server may integrate dictionaries sent by multiple terminal devices, and send the dictionary to the terminal device based on the second request message.
[0053] The model training method provided in the present application enables a terminal device to obtain historical input information of multiple users, which is more conducive to matching the information input by the users and can provide services to the users more conveniently.
[0054] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: detecting a user's copy operation on a third text; in response to the user's copy operation on the third text, determining whether an updated dictionary includes the third text, and if the updated dictionary includes the third text, determining a target service for the third text.
[0055] The third text may be the same as or different from the first text, and this application does not limit this.
[0056] If the updated dictionary includes the third text, and the text type of the information in the updated dictionary is known, the terminal device can determine the target service of the third text. The text type of the information in the updated dictionary can be annotated by the server, manually annotated, or recognized by a recognition model, which is not limited in this application.
[0057] The model training method provided in the present application can determine the historically recommended service as the target service if the text copied by the user is the text entered by the user before.
[0058] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: obtaining a fourth text in the second image, the fourth text being obtained in response to a user triggering an operation on a text recognition icon; determining whether the updated dictionary includes the fourth text, and if the updated dictionary includes the fourth text, determining a target service for the fourth text.
[0059] The fourth text may be the same as or different from the third text, and this application does not limit this.
[0060] In response to the user's triggering operation on the text recognition icon, the terminal device can obtain the fourth text in the second picture. At this time, the recognition model can be triggered to recognize the fourth text. If the recognition is successful, it can be indicated that there are one or more text types in the fourth text. The terminal device can provide the user with target services based on the recognized text type.
[0061] It is understandable that the updated dictionary does not necessarily include all fourth texts.
[0062] The model training method provided in the present application can recognize text in a picture and provide services to users when the text is included in an updated dictionary. The recognition accuracy of the recognition model is improved, which is conducive to providing accurate services to users.
[0063] In combination with the first aspect, in some implementations of the first aspect, the preset applications include at least one of the following types of applications: taxi applications, map applications, shopping applications, telephone applications, conference applications, information applications, search applications, news applications, video applications, express delivery applications, ticket purchasing applications, or ticket checking applications.
[0064] In combination with the first aspect, in certain implementations of the first aspect, the text type includes at least one of the following: a website, a flight number, a mobile phone number, a landline number, a courier number, an email address, a tourist attraction, a restaurant, a hospital, an office building, a shop, or a bus stop.
[0065] In a second aspect, a terminal device is provided, including: a processing module and an acquisition module. The processing module is used to: detect the user's input operation on a preset input box in a preset application of the terminal device; the acquisition module is used to: respond to the input operation and acquire input information; the processing module is also used to: use the input information as a training sample to train a recognition model, the recognition model is used to identify the text type of the text information, and the service corresponding to the text type is the target service provided by the terminal device to the user based on the input information.
[0066] In conjunction with the second aspect, in some implementations of the second aspect, the terminal device further includes a transceiver module. The transceiver module is used to: send input information to the server, and the server trains the recognition model based on the input information marked with the text type to obtain a trained recognition model.
[0067] In conjunction with the second aspect, in some implementations of the second aspect, the terminal device further includes a transceiver module. The processing module is further configured to: encrypt the input information to obtain the encrypted input information; and the transceiver module is configured to: send the encrypted input information to the server.
[0068] In conjunction with the second aspect, in some implementations of the second aspect, the terminal device further includes a transceiver module. The processing module is further used to: send a first request message to a server, the first request message being used to request a trained recognition model; and receive the trained recognition model from the server.
[0069] In combination with the second aspect, in certain implementations of the second aspect, the above-mentioned processing module is also used to: detect a user's copy operation on the first text; in response to the user's copy operation on the first text, input the first text into a trained recognition model; determine the text type of the first text based on the output information of the trained recognition model; and determine the target service of the first text based on the text type of the first text.
[0070] In combination with the second aspect, in certain implementations of the second aspect, the above-mentioned acquisition module is also used to: acquire the second text in the first picture, the second text is acquired in response to the user's triggering operation on the text recognition icon; the processing module is also used to: input the second text into the trained recognition model; determine the text type of the second text based on the output information of the trained recognition model; and determine the target service of the second text based on the text type of the second text.
[0071] In combination with the second aspect, in certain implementations of the second aspect, the trained recognition model includes a standard address rule parsing model and a non-standard address parsing model; the above-mentioned processing module is also used to: input input information into the standard address rule parsing model; if the input information does not comply with the rules of the standard address rule parsing model, input the input information into the non-standard address parsing model; and determine the text type of the input information based on the output information of the non-standard address parsing model.
[0072] In combination with the second aspect, in some implementations of the second aspect, the above-mentioned processing module is also used to: if the input information meets the rules of the standard address rule parsing model; determine the text type of the input information according to the output information of the standard address rule parsing model.
[0073] In combination with the second aspect, in certain implementations of the second aspect, the above-mentioned processing module is also used to: if the text type of the input information is at least one of an address, a website or an email address, determine whether the input information contains error information; if there is error information, correct the input information to obtain the corrected input information; and output the output information of the trained recognition model, the output information including the text type of the input information and the corrected input information.
[0074] In combination with the second aspect, in some implementations of the second aspect, the processing module is further used to: use the input information as a training sample, update the dictionary, and obtain an updated dictionary, where the dictionary includes information historically input by the user.
[0075] In conjunction with the second aspect, in some implementations of the second aspect, the method further includes:
[0076] Under a preset condition, the updated dictionary is sent to the server, and the preset condition is used to indicate that the terminal device is idle.
[0077] In conjunction with the second aspect, in some implementations of the second aspect, the updated dictionary is a first dictionary; the terminal device further includes a transceiver module. The processing module is further used to: encrypt the first dictionary to obtain an encrypted first dictionary; the transceiver module is used to: send the encrypted first dictionary to the server.
[0078] In conjunction with the second aspect, in some implementations of the second aspect, the terminal device further includes a transceiver module. The transceiver module is used to: send a second request message to the server, the second request message is used to request an updated dictionary; receive an updated dictionary from the server, the updated dictionary is determined based on dictionaries of multiple terminal devices.
[0079] In combination with the second aspect, in certain implementations of the second aspect, the above-mentioned processing module is also used to: detect a user's copy operation on a third text; in response to the user's copy operation on the third text, determine whether the updated dictionary includes the third text; if the updated dictionary includes the third text, determine a target service for the third text.
[0080] In combination with the second aspect, in certain implementations of the second aspect, the above-mentioned acquisition module is also used to: acquire a fourth text in the second picture, the fourth text being acquired in response to a user triggering an operation on a text recognition icon; the processing module is also used to: determine whether the updated dictionary includes the fourth text; if the updated dictionary includes the fourth text, determine a target service for the fourth text.
[0081] In combination with the second aspect, in some implementations of the second aspect, the preset applications include at least one of the following types of applications: car applications, map applications, shopping applications, telephone applications, conference applications, information applications, search applications, news applications, video applications, express delivery applications, ticket purchasing applications, or ticket checking applications.
[0082] In combination with the second aspect, in certain implementations of the second aspect, the text type includes at least one of the following: a website, a flight number, a mobile phone number, a landline number, a courier number, an email address, a tourist attraction, a restaurant, a hospital, an office building, a shop, or a bus stop.
[0083] In a third aspect, the present application provides a terminal device, including a processor, the processor is coupled to a memory, and can be used to execute instructions in the memory to implement the method in any possible implementation of the first aspect. Optionally, the terminal device also includes a memory. Optionally, the terminal device also includes a transceiver, and the processor is coupled to the transceiver.
[0084] In a fourth aspect, the present application provides a processor, comprising: an input circuit, an output circuit and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of the first aspect above.
[0085] In the specific implementation process, the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.
[0086] In a fifth aspect, the present application provides a processing device, including a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation of the first aspect.
[0087] Optionally, there are one or more processors and one or more memories.
[0088] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0089] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.
[0090] It should be understood that the relevant data interaction process, such as sending indication information, can be a process of outputting indication information from a processor, and receiving capability information can be a process of receiving input capability information from a processor. Specifically, the processed output data can be output to a transmitter, and the input data received by the processor can come from a receiver. Among them, the transmitter and the receiver can be collectively referred to as a transceiver.
[0091] The processing device in the fifth aspect mentioned above can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.
[0092] In a sixth aspect, the present application provides a computer-readable storage medium, which stores a computer program (also referred to as code, or instructions) which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first aspect described above.
[0093] In a seventh aspect, the present application provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1 It is a schematic diagram of the interface of the "service to find people" mode;
[0095] Figure 2 This is another interface diagram of the "Service Find People" mode;
[0096] Figure 3 It is a system framework diagram of a terminal device provided in an embodiment of the present application;
[0097] Figure 4 is a schematic flow chart of a method for providing services provided in an embodiment of the present application;
[0098] Figure 5 is a schematic flow chart of another method for providing services provided by an embodiment of the present application;
[0099] Figure 6 This is a schematic diagram of an interface for copying text provided in an embodiment of the present application;
[0100] Figure 7 is a schematic diagram of an interface for collecting training samples provided in an embodiment of the present application;
[0101] Figure 8 This is a comparison diagram of a training sample before and after encryption provided in an embodiment of the present application;
[0102] Fig. 9 It is a structural diagram of a terminal device provided in an embodiment of the present application;
[0103] Fig.10 is a schematic flow chart of a model training method provided in an embodiment of the present application;
[0104] Fig.11 is a structural diagram of an entity recognition model provided in an embodiment of the present application;
[0105] Fig.12 is a schematic block diagram of a terminal device provided in an embodiment of the present application;
[0106] Fig.13 It is a schematic block diagram of another terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0107] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0108] With the development of terminal technology, terminal devices have gradually transformed from the "people looking for services" mode to the "services looking for people" mode. For example, when the terminal device detects the user's operation, it can perceive the user's operation intention and actively push service options in the form of service cards or capsules to facilitate the user to perform the next operation without the user having to search for services themselves.
[0109] Currently, after detecting the user's operation of copying text, the terminal device can respond to the operation, perceive the user's operation intention, and push service options to the user in the form of service cards or capsules. The user does not need to open other applications to search for services, and services can be provided to the user conveniently and efficiently.
[0110] Exemplarily, the terminal device may be a mobile phone, the text may be an address, the user may copy the address in the chat interface, the mobile phone detects the user's operation of copying the address, and provides services to the user in the form of a push capsule. Figure 1 A schematic diagram of the interface of the "service search" mode is shown. Figure 1 As shown in interface a of the figure, the user copies the address "Binhai Avenue, Nanshan District" in the chat interface with the fitness trainer. The mobile phone detects the user's operation of copying "Binhai Avenue, Nanshan District" and responds to the operation by displaying Figure 1 It should be noted that the chat content between the user and the fitness trainer, the user's operation of selecting an address, and the user's triggering operation of the copy control and the select all control are not the focus of the embodiment of the present application, and the embodiment of the present application does not make any limitation on this.
[0111] like Figure 1 As shown in interface b, in response to the user's operation of copying "Nanshan District Binhai Avenue", the mobile phone can display a service in the form of a floating capsule in response to the operation. The displayed service can be the first item in the service recommendation list, that is, the navigation option. It can be understood that the service recommendation list includes other service options in addition to the navigation option. The floating capsule includes an expansion control 101 to facilitate users to view other service options. The "Service Find People" mode provided by the mobile phone in the embodiment of the present application may be a function suggested by YOYO, so the YOYO icon 102 can be displayed on the floating capsule.
[0112] The display of the YOYO icon 102 may include an animation effect. When the mobile phone detects that the animation effect of the YOYO icon 102 is displayed, Figure 1 In the c interface. Figure 1 As shown in the c interface in FIG. 1 , the mobile phone displays an icon 103 for navigating to the option at the position of the YOYO icon. When the mobile phone detects that the user triggers the expansion control 101, it can display Figure 1 In the d interface. Figure 1As shown in the interface d in the figure, the mobile phone displays a preview area, address information, a service recommendation list and a folding control 104. Among them, the preview area is a route map, including the route from the user's current location to "Nanshan District Binhai Avenue". The address information includes the address, address picture, driving time to this address 20 minutes (minute, min) and distance 14 kilometers (kilometer, km). The service recommendation list includes a navigation go option and its corresponding icon, an open option on the map and its corresponding icon, and a share and its corresponding icon. When the mobile phone detects that the user clicks on the folding control 104, the mobile phone displays Figure 1 In the c interface.
[0113] exist Figure 1 In the c interface, if the mobile phone does not detect the user's operation on the floating capsule within 5 seconds, the floating capsule will not be displayed, that is, the floating capsule disappears.
[0114] The terminal device can also recognize text information in the image and recommend services to the user based on the text information.
[0115] For example, the terminal device may be a mobile phone, the text may be an address, and the mobile phone may recognize the address information in the photo and add an underline under the address information. When the mobile phone detects the user's trigger operation on the underline, the user is provided with a service in the form of a service card. Figure 2 A schematic diagram of the interface of the "service search" mode is shown. Figure 2 As shown in interface a in the figure, the mobile phone displays a map picture in the gallery application. The photo was taken on June 30, 2021. The mobile phone can display sharing options, collection options, editing options, deletion options and more options for the user to operate on the photo. The mobile phone can also display a text recognition icon 201. When the mobile phone detects that the user triggers the text recognition icon 201, it can display Figure 2 In the b interface. Figure 2 As shown in the interface b in the figure, the phone can circle the text in the picture, which may include: Line 8, Beijing-Hong Kong-Macao Expressway, North Ring Road, Nanshan District, Park A, 4.6 kilometers from the mountain area, Nanshan District Binhai Avenue, Parking Lot 7, Parking Lot 6, and Parking Lot 3. The phone can automatically recognize the address information in the text and add an underline under the address information. When the phone detects the user's trigger operation on the underline, it can display Figure 2 In the c interface.
[0116] like Figure 2As shown in the c interface in the figure, the mobile phone displays a preview area, address information, and a service recommendation list. The preview area is a route map, including the route from the user's current location to "Nanshan District Binhai Avenue". The address information includes the address, the time to drive to this address (20 minutes) and the distance (14 kilometers). The service recommendation list includes the navigation go option and its corresponding icon, the open option on the map and its corresponding icon, the copy option and its corresponding icon, and the share option and its corresponding icon.
[0117] The "service search" mode provided by the mobile phone in the embodiment of the present application may be a function suggested by YOYO, so the icon corresponding to the address information may display the YOYO icon 202. The display time of the YOYO icon 202 may be 1 second, and when the mobile phone detects that the display time of the YOYO icon 202 has expired, the address picture 203 may be displayed.
[0118] like Figure 2 As shown in the interface d in the figure, when the mobile phone detects the user's trigger operation on the blank area, it can display Figure 2 In the b interface.
[0119] It should be noted that the above Figure 1 and Figure 2 In the examples shown, the texts are all addresses, but the texts involved in the embodiments of the present application are not limited to this. The texts can also be information such as mobile phone numbers, express delivery numbers, flights, store names, and attractions.
[0120] In order to achieve the above Figure 1 and Figure 2 The functions shown in the present application embodiment provide a specific implementation method. Before introducing the method provided by the present application embodiment, the system framework diagram provided by the present application embodiment is first introduced.
[0121] Figure 3 A system framework diagram of a terminal device is shown. Figure 3 As shown in FIG. 1 , the terminal device includes applications such as maps, address book, schedule, gallery, and camera. The terminal device also includes YOYO suggestions, a computing engine, a perception module, and an artificial intelligence module. The terminal device can achieve the above through these modules Figure 1 and Figure 2 Functions shown.
[0122] The perception module includes an application fence and a clipboard fence. The application fence can be used to detect the user's operation on the application, such as the user's triggering operation on the gallery or camera. The clipboard fence is used to detect the user's copy text operation, such as the above Figure 1 In interface a, the clipboard fence is used to detect the user's operation of copying the address "Binhai Avenue, Nanshan District".
[0123] The artificial intelligence module includes an entity recognition model, which is used to identify the type of entity. Among them, the entity can be the text involved above, and the type of entity is also the type of text. The type of text can include a mobile phone number, an ID number, an address, a courier number, a website, and a flight number, etc., and the embodiment of the present application does not limit the type of text. Among them, the entity recognition model can also be called a recognition model or a model for identifying the type of text, and the embodiment of the present application does not limit this.
[0124] The computing engine includes a processing module and an intent sorting module. The processing module can receive an operation of copying text in the clipboard fence in the perception module, and in response to the operation, call the entity recognition model in the artificial intelligence module to recognize the copied text, determine the type of the text, and provide a service recommendation list based on the type of the text. Figure 1 In the a interface in the image, the clipboard fence detects the user's operation of copying the address "Nanshan District Binhai Avenue" and sends the operation to the processing module. In response to the operation, the processing module calls the entity recognition model in the artificial intelligence module to recognize the copied text, determine that the type of the text is an address, and provide the user with corresponding services based on the address. The intent sorting module can sort the services in the service list. For example, the above Figure 2 In the c interface, the order of options in the service recommendation list is determined by the intent sorting module.
[0125] YOYO Suggest can be used to include interface display module and third-party query jump module. The interface display module can display the services provided by the computing engine in the form of suspended capsules or cards. For example, Figure 1 The suspended capsule of interface b in Figure 2 The card of the c interface can also provide interface display services for map, schedule and address book applications. The third-party query jump module is used to jump to the interface of the corresponding application when the user triggers the service in the service recommendation list. For example, in the above Figure 2 In the c interface, the third-party query jump module detects the user's trigger operation on the navigation option and jumps to the map application interface.
[0126] based on Figure 3 The system architecture diagram shown in the present application will be described in detail to implement the above Figure 1 and Figure 2 The specific implementation method of the functions shown.
[0127] For example, Figure 4 A schematic flow chart of a method 400 for providing a service is shown. The method 400 may be executed by a terminal device, such as a mobile phone. The system architecture diagram of the terminal device may be as described above. Figure 3As shown, but the embodiment of the present application is not limited thereto. The method 400 can be used to implement the above Figure 1 Functions shown.
[0128] like Figure 4 As shown, the method 400 may include the following steps:
[0129] S401. The perception module detects the user's operation of copying text through the clipboard fence.
[0130] In the above Figure 1 In the interface a shown, the perception module detects the user's operation of copying text through the clipboard fence, and the text is "Binhai Avenue, Nanshan District".
[0131] S402. The perception module sends the user's text copying operation to the computing engine, and correspondingly, the computing engine receives the operation.
[0132] The perception module may also send an instruction to the computing engine, where the instruction is used to instruct the perception module to detect the user's operation of copying text, and correspondingly, the computing engine receives the instruction.
[0133] S403. In response to the operation, the computing engine sends instruction information to the artificial intelligence module, where the instruction information is used to instruct the artificial intelligence module to recognize the text copied by the user. Correspondingly, the artificial intelligence module receives the instruction information.
[0134] Based on this operation, the computing engine can send instruction information to the artificial intelligence module through the processing module.
[0135] S404: Based on the indication information, the artificial intelligence module may recognize the text copied by the user through an entity recognition model.
[0136] Entity recognition models can be used to identify the type of text copied by the user.
[0137] S405: The artificial intelligence module sends the recognition result to the computing engine, and correspondingly, the computing engine receives the recognition result.
[0138] The recognition result may be used to indicate the type of the text "Nanshan District Binhai Avenue" copied by the user, and the recognition result may be an address.
[0139] S406: The computing engine determines the corresponding service according to the identification result.
[0140] The computing engine can determine the corresponding service through the processing module according to the recognition result, that is, determine the service corresponding to the address. The services corresponding to the address may include navigation to, sharing, and opening in a map.
[0141] Different types of text may correspond to different services, and there may be a one-to-one or one-to-many correspondence between the types of text and the services. The correspondence may be preset, but the embodiments of the present application are not limited thereto.
[0142] S407: The computing engine sorts the services to obtain sorted services.
[0143] The computing engine can sort the services through the intent sorting module to obtain sorted services. For example, the computing engine sorts services such as Navigate to, Share, and Open in Map through the intent sorting module, and the sorted services are Navigate to, Open in Map, and Share.
[0144] S408: The computing engine suggests sending the sorted services to YOYO, and correspondingly, YOYO suggests receiving the sorted services.
[0145] S409. YOYO suggests displaying the sorted services in the form of suspended capsules.
[0146] The terminal device can display the above through YOYO suggestions Figure 1 In interface b, the sorted services are displayed in the form of floating capsules. It is understandable that, due to the limited area of the floating capsule, when there are many sorted services, the terminal device can only display the service options with the highest sorting on the floating capsule, and display an expansion control to facilitate the user to view other services.
[0147] For example, Figure 5 A schematic flow chart of another method 500 for providing a service is shown. The method 500 may be executed by a terminal device, such as a mobile phone. The system architecture diagram of the terminal device may be as described above. Figure 3 As shown, but the embodiment of the present application is not limited thereto. The method 500 can be used to implement the above Figure 2 Functions shown.
[0148] like Figure 5 As shown, the method 500 may include the following steps:
[0149] S501: The artificial intelligence module detects a user triggering operation on a text recognition option.
[0150] Users in the above Figure 2 In the interface a of the figure, the computing engine can detect the user's triggering operation on the text recognition option by clicking the text recognition control icon 201. S502, the artificial intelligence module can recognize the text of the picture through the entity recognition model.
[0151] Entity recognition models can be used to identify the type of text in an image. Figure 2The text in interface b includes Line 8, Beijing-Hong Kong-Macao Expressway, North Ring Road, Nanshan District, Park A, 4.6 kilometers from the mountain area, Nanshan District Binhai Avenue, Parking Lot 7, Parking Lot 6, and Parking Lot 3. The artificial intelligence recognition module can recognize "Nanshan District Binhai Avenue" as an address through the entity recognition model.
[0152] S503: The artificial intelligence module sends the recognition result to the gallery application, and correspondingly, the gallery application receives the recognition result.
[0153] The recognition result may be "Binhai Avenue, Nanshan District" as the address.
[0154] S504: The gallery application underlines the entity in the image based on the recognition result.
[0155] As mentioned above Figure 2 As shown in interface b, the gallery application can underline "Nanshan District Binhai Avenue".
[0156] S505: The computing engine detects a user triggering operation on an underline.
[0157] S506: The computing engine determines the corresponding service according to the type of the entity corresponding to the underline.
[0158] The entity corresponding to the underline is "Nanshan District Binhai Avenue", whose type is address, and the calculation engine can determine the service corresponding to the address. The services corresponding to the address may include navigation to, sharing, copying, and opening in a map.
[0159] Different types of text may correspond to different services, and there may be a one-to-one or one-to-many correspondence between the types of text and the services. The correspondence may be preset, but the embodiments of the present application are not limited thereto.
[0160] S507: The computing engine sorts the services to obtain sorted services.
[0161] The computing engine can sort the services through the intent sorting module to obtain sorted services. For example, the computing engine sorts services such as Navigate to, Share, Open in Map, and Copy through the intent sorting module, and the sorted services are Navigate to, Open in Map, Copy, and Share.
[0162] S508: The computing engine sends the sorted services to the gallery application.
[0163] S509: The gallery application assembles the sorted services to obtain service cards.
[0164] S510: The gallery application suggests sending a service card to YOYO, and correspondingly, YOYO suggests receiving the service card.
[0165] S511. YOYO suggests displaying a service card.
[0166] The terminal device can display the above through YOYO suggestions Figure 2 The c interface in the diagram displays the sorted services in the form of service cards.
[0167] The embodiments of the present application have studied the above method 400 and the above method 500 and found that in order to accurately perceive the user's intention, it is necessary to improve the recognition accuracy of the above entity recognition model, and then provide accurate services to the user based on the recognition results.
[0168] Currently, a method for obtaining an entity recognition model is as follows: a text annotated with a text type is obtained from the Internet, and a neural network model is trained using the text and the annotated type of the text, thereby obtaining an entity recognition model.
[0169] However, the similarity between the text content obtained from the Internet and the text content copied by the user in the terminal device to use the target service is insufficient. For example, the text copied by the user may be Binhai Avenue, Nanshan District, while the text related to the address obtained on the Internet may be Binhai Avenue, Nanshan Community, Nanshan Street, Nanshan District, Shenzhen City, Guangdong Province, China. This will result in inaccurate recognition results when the text copied by the user on the terminal device is identified as the text type using the model trained based on the aforementioned method, thereby reducing the accuracy of the service provided to the user by the terminal device based on the text type identified by the model. In view of this, an embodiment of the present application provides a model training method and a terminal device to improve the accuracy of model recognition by improving the accuracy of training samples. An embodiment of the present application can use the content pasted or input by the user in a specific application as a training sample, and improve the accuracy of model recognition in combination with training rules.
[0170] The triggering condition of the entity recognition model is that the terminal device detects the user's operation of copying text or the terminal device detects the user's triggering operation on the text recognition icon.
[0171] In a possible implementation, the triggering condition of the entity recognition model is that the terminal device detects the user's operation of copying text.
[0172] For example, as mentioned above Figure 1 As shown in interface a, the mobile phone detects that the user copied the address "Binhai Avenue, Nanshan District" and calls the entity recognition model.
[0173] As another example, the terminal device may be a mobile phone. Figure 6 A schematic diagram of an interface for copying text is shown. Figure 6As shown, the memo interface displays multiple information, including: www.sousuo.com, 320*********005X, YT1234567890123, Xinjiekou and Starbucks. The user chooses to copy "YT1234567890123", and the mobile phone detects the user's operation of copying "YT1234567890123", and can call the entity recognition model.
[0174] In another possible implementation, the triggering condition of the entity recognition model is that the terminal device detects a user's triggering operation on the text recognition icon.
[0175] For example, the above Figure 2 As shown in interface a in the figure, the mobile phone detects the user's trigger operation on the text recognition icon and calls the entity recognition model.
[0176] The embodiment of the present application detects the text copied by the user or detects the text recognized by the user, and infers that the user needs to find the service corresponding to the text. If the terminal device does not provide services for the user, the user needs to search for the copied text in other applications to find the service, or the user needs to directly enter the text in other applications to find the service. Therefore, the terminal device can use the text pasted or entered by the user in the application as a training sample to train the entity recognition model. When the terminal device detects that the text copied by the user is the text pasted or entered by the user in the application, the corresponding service is provided to the user.
[0177] The terminal device provided in the embodiment of the present application can, with the user's authorization, collect the content pasted or entered by the user in a preset application, use it as a training sample for the entity recognition model, and train the entity recognition model to improve the recognition accuracy of the entity recognition model.
[0178] The preset applications may include taxi applications, map applications, shopping applications, telephone applications, conference applications, information applications, search applications, news applications, video applications, express delivery applications, ticket purchasing applications, ticket checking applications, and the like.
[0179] The terminal device can collect address data as training samples through taxi applications, map applications, and shopping applications. The terminal device can collect number data as training samples through telephone applications, conference applications, and information applications. The terminal device can collect link data as training samples through search applications, news applications, and video applications. The terminal device can collect express delivery numbers as training samples through express delivery applications. The terminal device can collect ticket schedule data as training samples through ticket purchase applications and ticket checking applications.
[0180] Exemplarily, the terminal device may be a mobile phone. Figure 7 FIG. 1 shows a schematic diagram of an interface for collecting training samples. Figure 7 As shown in interface a in FIG, the user enters or pastes the URL www.sousuo.com in the interface of the search application. The mobile phone detects the user's input or paste operation on the input box in the interface of the search application and can collect the content of the input box, that is, the mobile phone can collect the URL www.sousuo.com as a training sample.
[0181] like Figure 7 As shown in interface b in the figure, the user enters or pastes the address "Bianhe Street, Yueyang Tower, Hunan Province" in the interface of the map application and performs a search. The mobile phone detects the user's input or paste operation on the input box in the interface of the map application and can collect the content of the input box, that is, the mobile phone can collect the URL address "Bianhe Street, Yueyang Tower, Hunan Province" as a training sample. It should be noted that the search results displayed by the mobile phone in the interface are not the focus of the embodiment of this application, and no limitation is made on the search results.
[0182] like Figure 7 As shown in the c interface in , the user enters or pastes the flight number MU3125 in the interface of the ticket checking application and fills in the departure date Wednesday, June 22, 2022. The user can query the flight number MU3125 through the flight query control. The mobile phone detects the user's input or paste operation in the flight number input box in the interface of the ticket checking application and can collect the content of the flight number input box, that is, the mobile phone can collect the flight number MU3125 as a training sample.
[0183] like Figure 7As shown in the interface d in the figure, the user enters or pastes the recipient's mobile phone number 177****1269 in the interface of the information application, and enters the message "Hello, I am XX" in the message input box. The mobile phone detects the input or paste operation of the recipient's input box in the interface of the information application, and can collect the content of the recipient's input box, that is, the mobile phone can collect the recipient's mobile phone number 177****1269 as a training sample.
[0184] After the terminal device collects the training samples, it can transmit the training samples to the server. The server can train the entity recognition model based on the training samples. In this way, the terminal device only needs to collect data and does not need to train the entity recognition model, which saves the computing power of the terminal device and the power consumption of the terminal device. In addition, the information entered or pasted by the user belongs to the user's privacy. After collecting the training samples, the terminal device can encrypt the training samples and transmit the encrypted training samples to the server, which is conducive to protecting the user's privacy.
[0185] For example, Figure 8 Figure 2 shows a comparison of a training sample before and after encryption. Figure 8 As shown, the terminal device can perform operations such as data acquisition, data collection and data reporting on the data. The server can perform operations such as data integration, data access, data storage, calculation and data application on the data.
[0186] If the terminal device does not encrypt the training samples, after the terminal device obtains the training samples, it can encapsulate, count and report the training samples to the server. After receiving the training samples, the server integrates the training samples, collects the training samples through Flume, and transmits them to the data warehouse (DW) through the operational data store (ODS), and then transmits them to the data application layer (application data service, ADS) to provide data for artificial intelligence (AI) learning in data applications. In other words, training samples are provided for entity recognition models. Among them, Flume is a highly available, highly reliable, distributed system for massive log collection, aggregation and transmission. ODS can be called a data preparation area, which can extract, clean and transmit data. ODS can transmit data to a data warehouse (DW). ADS can be used to save data to provide data for data analysis and data mining.
[0187] If the terminal device encrypts the training sample, after the terminal device obtains the training sample, it can encapsulate the training sample, encrypt it by using differential privacy plus noise, and report the encrypted training sample to the server. After receiving the encrypted training sample, the server integrates the encrypted training sample by using differential extraction, collects the training sample through Flume, pre-processes the encrypted training sample through ODS, and then decrypts it by using noise reduction and regression to obtain the training sample, stores the training sample through ADS, and provides the training sample to the entity recognition model to train the entity recognition model.
[0188] It is understandable that the server can receive data reported by multiple terminal devices, and further integrate the data of multiple terminal devices as training samples for the entity recognition model.
[0189] The embodiment of the present application provides a model training method based on the above training samples. The method provided in the embodiment of the present application can be applied to any terminal device, which can be a mobile phone, a tablet computer, a personal computer (personal computer, PC), a smart screen, an artificial intelligence (artificial intelligence, AI) speaker, a headset, a car machine device, and a wearable terminal device such as a smart watch. It can also be various teaching aids (such as learning machines, early education machines), smart toys, portable robots, personal digital assistants (personal digital assistant, PDA), augmented reality technology (augmented reality, AR) equipment, virtual reality (virtual reality, VR) equipment, etc. It can also be a device with mobile office function, a device with smart home function, a device with audio and video entertainment function, a device that supports smart travel, etc. It should be understood that the embodiment of the present application does not limit the specific technology and specific device form adopted by the terminal device.
[0190] In order to better understand the embodiment of the present application, the hardware structure of the terminal device of the embodiment of the present application is introduced below. Fig. 9 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application.
[0191] The terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a sensor module 180, a button 190, an indicator 192, a camera 193, and a display screen 194, etc.
[0192] Optionally, the above-mentioned sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0193] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0194] The processor 110 may include one or more processing units. The different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data. The processor 110 may implement the above Figure 8 The operations shown include data acquisition, data collection, and data reporting.
[0195] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device, and can also be used to transfer data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices, such as AR devices, etc.
[0196] The charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110 .
[0197] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0198] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.
[0199] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to terminal devices. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
[0200] The wireless communication module 160 can provide wireless communication solutions applied to terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.
[0201] The terminal device realizes the display function through the GPU, the display screen 194 and the application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.
[0202] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0203] The terminal device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0204] The camera 193 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0205] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
[0206] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area.
[0207] The terminal device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, and the application processor.
[0208] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The terminal device can listen to music or listen to hands-free calls through the speaker 170A. The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be answered by placing the receiver 170B close to the human ear. The microphone 170C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0209] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. The gyroscope sensor 180B can be used to determine the motion posture of the terminal device. The air pressure sensor 180C is used to measure the air pressure. The magnetic sensor 180D includes a Hall sensor. The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device in all directions (generally three axes). The distance sensor 180F is used to measure the distance. The proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The ambient light sensor 180L is used to sense the brightness of the ambient light. The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect the temperature. The touch sensor 180K is also called a "touch device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The bone conduction sensor 180M can obtain a vibration signal.
[0210] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The terminal device may receive the button input and generate a key signal input related to the user settings and function control of the terminal device. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc.
[0211] The software system of the terminal device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a microservice architecture, or a cloud architecture. The layered architecture can adopt an Android system, an Apple (IOS) system, or other operating systems, which are not limited in the embodiments of the present application. The following takes the Android system of the layered architecture as an example to illustrate the software structure of the terminal device.
[0212] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
[0213] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0214] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
[0215] Fig.10 A schematic flow chart of a model training method 1000 is shown. The method 1000 can be applied to a communication system of a terminal device and a server. The hardware structure diagram of the terminal device can be as described above. Fig. 9 As shown, the embodiments of the present application are not limited thereto.
[0216] like Fig.10 As shown, the method 1000 may include the following steps:
[0217] S1001: The terminal device detects a user triggering operation on an interface of a preset application.
[0218] The preset application may also be referred to as a preset application program, which is not limited in the embodiments of the present application.
[0219] The preset applications may include taxi applications, map applications, shopping applications, telephone applications, conference applications, information applications, search applications, news applications, video applications, express delivery applications, ticket purchasing applications, ticket checking applications, and the like.
[0220] The user clicks on the icon of the preset application to open the preset application, or triggers another interface on a certain interface of the preset application, which are both triggering operations of the user on the interface of the preset application.
[0221] S1002: The terminal device determines whether the interface of the preset application is a preset interface in response to a user triggering operation on the interface of the preset application.
[0222] The terminal device may only collect information from a preset input box in a preset interface in a preset application. This information is content input or pasted by the user and may be used as training samples.
[0223] In response to the user's triggering operation on the interface of the preset application, the terminal device can first determine whether the interface of the preset application is a preset interface. If the interface of the preset application is not a preset interface, the terminal device can determine that no information needs to be collected, and can filter out the interfaces that do not need to be collected, thereby improving the efficiency of collecting data. If the interface of the preset application is not a preset interface, the terminal device can continue to detect the user's operation, and when the user's triggering operation on the interface of the preset application is detected, the above S1001 can continue to be executed. If the interface of the preset application is a preset interface, the terminal device can detect whether the user enters information in the preset input box, that is, S1003 can be executed.
[0224] S1003: When the interface of the preset application is the preset interface, the terminal device detects an input operation of the user on a preset input box in the preset interface.
[0225] The preset interface may include one or more input boxes, and not all input operations in the input boxes need to be collected. R&D personnel can set the input box that needs to collect information as a preset input box, and the terminal device determines whether information is entered in the preset input box.
[0226] For example, in the above Figure 7 In the a interface in the example, the preset application is a search application, the preset interface is a search interface, and the input box for the user to input a URL is the preset input box. When the user inputs information in the preset input box, the terminal device can detect the user's input operation on the preset input box. Figure 7 In the b interface, the preset application is a map application, the preset interface is a search interface, and the input box for the user to input the address is the preset input box. When the user enters information in the preset input box, the terminal device can detect the user's input operation on the preset input box. Figure 7 In the c interface, the preset interface is the flight dynamic interface, and the preset input box is the input box corresponding to the flight number. When the user enters information in the input box corresponding to the flight number, the terminal device can detect the user's input operation on the preset input box. Figure 7 In the interface d in the example, the preset interface is the new message interface, and the preset input box is the input box corresponding to the recipient. When the user enters information in the input box corresponding to the recipient, the terminal device can detect the user's input operation on the preset input box.
[0227] S1004: The terminal device obtains input information in response to the user's input operation on a preset input box in a preset interface.
[0228] For example, in the above Figure 7 In the a interface, the input information obtained by the terminal device is www.sousuo.com. Figure 7 In the b interface, the input information obtained by the terminal device is Bianhe Street, Yueyang Tower, Hunan Province. Figure 7 In the c interface, the input information obtained by the terminal device is MU3125. Figure 7 In the d interface, the input information obtained by the terminal device is 177****1269.
[0229] After the terminal device obtains the input information, it can input the input information into the entity recognition model, or match the input information with the dictionary, that is, execute S1005 and S1014. The dictionary includes the information input by the user in history.
[0230] S1005. The terminal device inputs the input information into the entity recognition model.
[0231] The entity recognition model may be an initial entity recognition model, that is, the parameters are initial parameters and have not been trained. The entity recognition model may be preset in the terminal device or requested by the terminal device to the server, which is not limited in the embodiment of the present application.
[0232] If the entity recognition model is preset in the terminal device, it can be trained directly after obtaining the input information without requesting it from the server, which can improve the training speed. If the entity recognition model is requested by the terminal device from the server, the terminal device does not need to store the entity recognition model, which can save memory space.
[0233] S1006: The terminal device determines whether the entity recognition model is successful.
[0234] If the entity recognition model is an initial entity recognition model, it does not have recognition capability at this point and cannot successfully identify the type of input information. If the recognition is unsuccessful, it can be used as a training sample to train the initial entity recognition model.
[0235] For example, in the above Figure 7 In the c interface, the user inputs MU3125. If the entity recognition model can recognize MU3125 as the flight number, the recognition is successful. If the entity recognition model cannot recognize MU3125 as the flight number, the recognition is unsuccessful.
[0236] If the entity recognition model has recognition capability and can successfully recognize the text type of the input information, the service corresponding to the input information can be obtained, and S1007 is executed.
[0237] S1007: If the entity recognition model is successfully recognized, the terminal device can obtain the service corresponding to the input information.
[0238] If the entity recognition model is successfully identified, the terminal device can determine the corresponding service based on the input information and display it in the form of a floating capsule or service card.
[0239] S1008: If the entity recognition model fails to recognize the entity, the terminal device encrypts the input information to obtain the encrypted input information.
[0240] The terminal device can encrypt the input information by using differential privacy plus noise to obtain encrypted input information.
[0241] S1009. The terminal device transmits the encrypted input information to the server, and correspondingly, the server receives the encrypted input information.
[0242] After the terminal device obtains the encrypted input information, it can immediately transmit the encrypted input information to the server, or it can periodically transmit the encrypted input information to the server, which is not limited in the embodiments of the present application.
[0243] If the terminal device immediately transmits the encrypted input information to the server, the server can update the entity recognition model in real time, which is conducive to improving the training speed of the entity recognition model. If the terminal device periodically transmits the encrypted input information to the server, a lot of information can be transmitted at a time, which can save signaling overhead.
[0244] S1010. The server decrypts the encrypted input information to obtain the input information.
[0245] After receiving the encrypted input information, the server can decrypt the encrypted input information by means of noise reduction and regression to obtain the input information.
[0246] S1011. The server trains an entity recognition model based on the input information and its corresponding type.
[0247] The type corresponding to the input information may be manually annotated or automatically annotated using existing annotation technology, and this embodiment of the present application does not limit this.
[0248] The input information and its corresponding type are used as training samples to train the entity recognition model, or to update the entity recognition model. Specifically, the server can use the input information as the input of the entity recognition model and the type corresponding to the input information as the output of the entity recognition model to update the parameters in the entity recognition model.
[0249] The above S1001 to S1011 are the process of training the entity recognition model. The embodiment of the present application does not limit the number of training processes. It is understandable that the more training times and the larger the training samples, the higher the recognition accuracy of the entity recognition model.
[0250] The above S1001 to S1011 may also be a process of applying an entity recognition model. The terminal device may use the unrecognizable information as a training sample to update the entity recognition model and continuously improve the recognition accuracy of the entity recognition model.
[0251] It should be noted that the server can receive information sent by different terminal devices, and the server can train the entity recognition model based on the information sent by different terminal devices, which can improve the entity recognition model training process.
[0252] S1012. The terminal device may send a request message to the server, where the request message is used to request a trained entity recognition model. Correspondingly, the server may receive the request message.
[0253] The terminal device can periodically send a request message to the server to obtain the latest entity recognition model, that is, the trained entity recognition model.
[0254] S1013. The server sends the trained entity recognition model to the terminal device based on the request message.
[0255] Based on the request message, the server sends the trained entity recognition model to the terminal device, so that the terminal device obtains the latest entity recognition model.
[0256] S1014. The terminal device matches the input information with the dictionary.
[0257] The dictionary includes information that the user has input in the past. The terminal device matches the input information with the dictionary, that is, determines whether the information input by the user has been input before. The services corresponding to the information in the dictionary are known.
[0258] The dictionary may also be called a dictionary or a hot fix channel, which is not limited in the present embodiment. The dictionary may be preset in the terminal device, requested by the terminal device to the server, or actively sent by the server to the terminal device, which is not limited in the present embodiment.
[0259] If the dictionary is preset in the terminal device, it can be matched directly after obtaining the input information without requesting the server, which can improve the matching speed. If the dictionary is requested by the terminal device from the server, the terminal device does not need to store the dictionary, which can save memory space. If the server actively sends the dictionary to the terminal device, the terminal device does not need to actively request the dictionary, which can save signaling overhead.
[0260] S1015. The terminal device determines whether the input information matches the dictionary successfully.
[0261] If the input information is not input by the user before, the input information cannot be matched with the dictionary successfully, and the dictionary can be updated, that is, S1016 is executed. If the input information is input by the user before, the input information can be matched with the dictionary successfully, and since the service corresponding to the information in the dictionary is known, the service corresponding to the input information can be obtained, that is, S1007 is executed.
[0262] For example, in the above Figure 7 In the c interface, the user inputs MU3125. If the dictionary contains MU3125, the match is successful. If the dictionary does not contain MU3125, the match is unsuccessful.
[0263] S1016: If the input information fails to match the dictionary, the terminal device may update the dictionary according to the input information to obtain an updated dictionary.
[0264] The terminal device may update the dictionary by adding the input information to the dictionary.
[0265] S1017. The terminal device may encrypt the updated dictionary to obtain an encrypted dictionary.
[0266] The terminal device may encrypt the updated dictionary by using differential privacy plus noise to obtain an encrypted dictionary. It is understandable that the encrypted dictionary refers to an encrypted and updated dictionary.
[0267] S1018. The terminal device transmits the encrypted dictionary to the server, and correspondingly, the server receives the encrypted dictionary.
[0268] After the terminal device obtains the encrypted dictionary, it may immediately transmit the encrypted dictionary to the server, or it may periodically transmit the encrypted dictionary to the server, which is not limited in the embodiments of the present application.
[0269] If the terminal device immediately transmits the encrypted dictionary to the server, the server can obtain the updated dictionary in real time, which is conducive to improving the update speed of the dictionary. If the terminal device periodically transmits the encrypted dictionary to the server, a large amount of dictionary data can be transmitted at a time, which can save signaling overhead. The terminal device can also send the updated dictionary to the server when it is idle (i.e., under preset conditions).
[0270] S1019. The server decrypts the encrypted dictionary to obtain an updated dictionary.
[0271] After receiving the encrypted dictionary, the server can decrypt the encrypted dictionary by noise reduction and regression to obtain an updated dictionary. The server can annotate the text type of the newly added information in the dictionary or identify the newly added information through an entity recognition model to obtain its text type.
[0272] It can be understood that the services corresponding to the information in the dictionary are all known.
[0273] S1020. The server saves the updated dictionary.
[0274] The server can receive dictionaries sent by multiple terminal devices, that is, the dictionary stored in the server can include information of historical input by multiple users. When a terminal device sends a request message to the server to request to obtain the dictionary, the server can send the dictionary including the information of historical input by multiple users to this terminal device.
[0275] The above S1014 to S1020 are the process of updating the dictionary. The embodiment of the present application does not limit the number of times the dictionary is updated. It is understandable that the more times the dictionary is updated, the more information the dictionary includes, and the greater the probability of successful matching between the user input information and the dictionary.
[0276] The above S1014 to S1020 may also be a process of applying the dictionary. The terminal device may add information not included in the dictionary to the dictionary to update the dictionary, and continuously increase the information in the dictionary to increase the probability of successful matching, thereby providing corresponding services to the user.
[0277] It should be noted that the terminal device may execute S1005 to S1009 and S1014 to 1018 simultaneously, or may only execute S1005 to S1009 or S1014 to 1018, and this embodiment of the present application is not limited to this.
[0278] It should also be noted that, when S1005 to S1009 and S1014 to S1018 are executed simultaneously, if the entity recognition model can recognize the text type of the input information, but the input information fails to match the dictionary, the terminal device can add the input information to the dictionary and save the corresponding relationship between the input information and the text type output by the entity recognition model. The terminal device can also transmit the corresponding relationship between the input information and the text type output by the entity recognition model to the server.
[0279] The model training method provided in the embodiment of the present application collects information of the preset input box in the preset interface of the preset application, and uses it as a training sample to train the entity recognition model, that is, the real needs of the user are used as training samples, and the trained entity recognition model is more adaptable to the user and has higher recognition accuracy. The embodiment of the present application collects training samples through the terminal device and the server performs training, which can save the computing power and power consumption of the terminal device. The embodiment of the present application can also save the information historically input by the user as a dictionary, which is conducive to memorizing the user's usage habits, determining the intention of the user's input information more quickly, and providing services to the user conveniently. In addition, when transmitting information between the server and the embodiment of the present application, encryption is used to protect the user's privacy, which is conducive to preventing the user's privacy from being leaked.
[0280] Optionally, in the above method 1000, the terminal device requests the trained entity recognition model from the server so as to identify the text type of the text through the entity recognition model. This is only one possible implementation. In another possible implementation, the terminal device may not request the trained entity recognition model from the server. After executing S1011, the terminal device sends the encrypted input information to the server. The server decrypts the encrypted input information to obtain the input information, identifies the text type of the text through the trained entity recognition model, and sends the text type of the text to the terminal device.
[0281] In this implementation, the terminal device does not need to save the trained entity recognition model, which can save memory space.
[0282] As an optional embodiment, the above-mentioned preset input box may only allow the input of information of a specific text type, and the terminal device may use the input information and the text type corresponding to the preset input box as training samples.
[0283] This implementation method does not require labeling of input information and can improve the training efficiency of the model.
[0284] The above-mentioned entity recognition model can recognize input information (or input text) as types such as website, address, mobile phone number, flight number, ID card number or express delivery number. In a possible implementation, the entity recognition model may include a website recognition model, an address recognition model, a mobile phone number recognition model, a flight number recognition model, an ID card number recognition model and an express delivery number recognition model. The terminal device can collect address data from taxi applications, map applications and shopping applications as training samples to train the address recognition model in the entity recognition model. The terminal device can collect number data from telephone applications, conference applications and information applications as training samples to train the mobile phone number recognition model in the entity recognition model. The terminal device can collect link data from search applications, news applications and video applications as training samples to train the website recognition model in the entity recognition model. The terminal device can collect express delivery numbers from express delivery applications as training samples to train the express delivery number recognition model in the entity recognition model. The terminal device can collect ticket schedule data from ticket purchase applications and ticket checking applications as training samples to train the flight number recognition model in the entity recognition model.
[0285] For example, Fig.11 Figure 2 shows a structural diagram of an entity recognition model. Fig.11 As shown, the entity recognition model may include a regular entity recognition model, a point of interest (POI) parsing model, a standard address rule parsing model, a non-standard address parsing model, and an entity error correction model. The regular entity recognition model is used to identify texts of types such as URLs, landline numbers, mobile phone numbers, flight numbers, ID numbers, express numbers, and email addresses. The POI parsing model is used to identify texts of types such as scenic spot names, restaurants, hospitals, office buildings, shops, and bus stops. The standard address rule parsing model is used to identify texts of standard address types, such as Binhai Avenue in Nanshan District. The non-standard address parsing model is used to identify texts of non-standard address types. The entity error correction model is used to correct relatively regular texts such as recognized addresses, URLs, and email addresses. For example, when the province and region in the address do not match, the text is corrected.
[0286] The terminal device can use the address data collected by taxi-hailing applications, map applications, and shopping applications as training samples for the address resolution model, and the location data collected by taxi-hailing applications, map applications, and shopping applications as training samples for the POI resolution model. The terminal device can use the number data collected by telephone applications, conference applications, and information applications, the link data collected by search applications, news applications, and video applications, the express delivery numbers collected by express applications, and the ticket schedules collected by ticket purchase applications and ticket checking applications as training samples for the regular entity recognition model.
[0287] During the application process, the terminal device can identify the input information through the entity recognition model, that is, use the regular entity recognition model, POI parsing model, standard address rule parsing model, and non-standard address parsing model to identify the input information. If the input information is identified as an address, website or email address, the terminal device can determine whether it is correct through the entity error correction model. If it is not correct, it will be corrected, and the corrected input information and the recognition result will be merged to obtain the output result. If the input information is not an address, website or email address, the terminal device may not correct the input information, and directly merge the results of each model to obtain the output result. Among them, the terminal device identifies the input information through the standard address rule parsing model. If the input information hits the marked address rule, the input information is identified as an address. If the input information does not hit the marked address rule, the terminal device can identify the input information through the non-standard address parsing model. If it is identified as an address, the input information is identified as an address; if it is not an address, it can be determined that the input information is not an address. That is, in the following cases, the terminal device can determine that the input information is an address: the input information hits the standard address rule; or the input information does not hit the standard address rule, but the output information of the non-standard address resolution model is that the input information is an address. In the following cases, the terminal device can determine that the input information is not an address: the input information does not hit the standard address rule, and the output information of the non-standard address resolution model is that the input information is not an address.
[0288] The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0289] Combined with the above Figures 1 to 11 , describes in detail the method provided by the embodiment of the present application, and will be combined with Fig.12 and Fig.13 , describe in detail the terminal device provided in the embodiment of the present application.
[0290] Fig.12 The schematic flow chart of a terminal device 1200 provided in an embodiment of the present application is shown. The terminal device 1200 includes: a processing module 1210 and an acquisition module 1220. The terminal device 1200 can be used to execute the above methods. For example, the terminal device 1200 can execute the above method 1000.
[0291] It should be understood that the terminal device 1200 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art may understand that the terminal device 1200 may be specifically a terminal device in the above-mentioned method embodiment, or the functions of the terminal device in the above-mentioned method embodiment may be integrated in the terminal device 1200, and the terminal device 1200 may be used to execute the various processes and / or steps corresponding to the terminal device in the above-mentioned method embodiment, and to avoid repetition, it will not be repeated here.
[0292] The terminal device 1200 has the function of implementing the corresponding steps performed by the terminal device in the above method embodiment; the above functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0293] In the embodiments of the present application, Fig.12 The terminal device 1200 may also be a chip or a chip system, for example, a system on chip (SoC).
[0294] Fig.13 1 is a schematic block diagram of another terminal device 1300 provided in an embodiment of the present application. The terminal device 1300 includes a processor 1310, a transceiver 1320, and a memory 1330. The processor 1310, the transceiver 1320, and the memory 1330 communicate with each other through an internal connection path, the memory 1330 is used to store instructions, and the processor 1320 is used to execute the instructions stored in the memory 1330 to control the transceiver 1320 to send signals and / or receive signals.
[0295] It should be understood that the terminal device 1300 can be specifically the terminal device in the above method embodiment, or the function of the terminal device in the above method embodiment can be integrated in the terminal device 1300, and the terminal device 1300 can be used to execute the various steps and / or processes corresponding to the terminal device in the above method embodiment. Optionally, the memory 1330 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A part of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type. The processor 1310 may be used to execute instructions stored in the memory, and when the processor executes the instruction, the processor may execute the various steps and / or processes corresponding to the terminal device in the above method embodiment.
[0296] It should be understood that in the embodiment of the present application, the processor 1310 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0297] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0298] The present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to implement the method corresponding to the terminal device in the above method embodiment.
[0299] The present application also provides a chip system, which is used to support the terminal device in the above method embodiment to implement the functions shown in the embodiment of the present application.
[0300] The present application also provides a computer program product, which includes a computer program (also referred to as code or instruction). When the computer program runs on a computer, the computer can execute the method corresponding to the terminal device shown in the above method embodiment.
[0301] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0302] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0303] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0304] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0305] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0306] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0307] The above is only a specific implementation of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the embodiments of the present application, which should be included in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be based on the protection scope of the claims.
Claims
1. A model training method, characterized in that: include: Detecting a user triggering operation on an interface of a preset application; In response to a triggering operation of the user on the interface of the preset application, determining whether the interface of the preset application is a preset interface; If the interface of the preset application is not the preset interface, determining not to collect information; If the interface of the preset application is the preset interface, an input operation of the user on a preset input box in the preset application of the terminal device is detected; In response to the input operation, acquiring input information; Encrypting the input information by using a differential privacy plus noise method to obtain the encrypted input information; Sending the encrypted input information to a server, wherein the server trains an entity recognition model based on the input information marked with a text type to obtain the trained entity recognition model, wherein the entity recognition model is used to identify the text type of text information, wherein the text information is text obtained in response to a user's operation of copying text or a triggering operation of a text recognition icon, wherein the service corresponding to the text type is a target service provided by the terminal device for the user based on the text information, and the target service is displayed in the form of a capsule or a service card; The preset applications include at least one of the following types of applications: Taxi-hailing apps, map apps, shopping apps, phone apps, conference apps, messaging apps, search apps, news apps, video apps, express delivery apps, ticket purchasing apps, or ticket checking apps; The text type includes at least one of the following: Website, flight number, mobile phone number, landline number, express delivery number, mailbox, tourist attraction, restaurant, hospital, office building, store or bus station; The method further comprises: Sending a first request message to the server, where the first request message is used to request a trained recognition model; Receiving the trained recognition model from the server; Detecting a user's copy operation on the first text; In response to the user copying the first text, inputting the first text into the trained recognition model; Determining the text type of the first text according to the output information of the trained recognition model; If the text type of the first text is an address, determining whether there is error information in the first text; If error information exists, correcting the first text to obtain the first text after error correction; Outputting output information of the trained recognition model, the output information including the text type of the first text and the first text after error correction; The trained recognition model includes a standard address rule parsing model and a non-standard address parsing model, and the inputting the first text into the trained recognition model includes: Inputting the first text into the standard address rule parsing model; If the first text does not conform to the rule of the standard address rule parsing model, inputting the first text into the non-standard address parsing model; The determining the text type of the first text according to the output information of the trained recognition model includes: Determining the text type of the first text according to the output information of the non-standard address resolution model; If the first text meets the rule of the standard address rule parsing model, determining the text type of the first text according to the output information of the trained recognition model includes: The text type of the first text is determined according to the output information of the standard address rule parsing model.
2. The method according to claim 1, characterized in that The method further comprises: A target service of the first text is determined according to a text type of the first text.
3. The method according to claim 1, characterized in that The method further comprises: Acquire a second text in the first image, where the second text is acquired in response to a trigger operation of a text recognition icon by a user; inputting the second text into the trained recognition model; Determining the text type of the second text according to the output information of the trained recognition model; A target service of the second text is determined according to the text type of the second text.
4. The method according to any one of claims 1 to 3, characterized in that The step of inputting the first text into the trained recognition model comprises: If the text type of the first text is a website or an email address, determining whether there is error information in the first text; If error information exists, correct the first text to obtain the first text after error correction; Output information of the trained recognition model is output, wherein the output information includes the text type of the first text and the first text after error correction.
5. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The input information is used as a training sample to update the dictionary to obtain an updated dictionary, where the dictionary includes the information historically input by the user.
6. The method according to claim 5, characterized in that The method further comprises: Under a preset condition, the updated dictionary is sent to a server, wherein the preset condition is used to indicate that the terminal device is idle.
7. The method according to claim 6, characterized in that The updated dictionary is the first dictionary; The sending the updated dictionary to the server comprises: encrypting the first dictionary to obtain the encrypted first dictionary; The encrypted first dictionary is sent to the server.
8. The method according to claim 6 or 7, characterized in that: The method further comprises: Sending a second request message to the server, where the second request message is used to request an updated dictionary; The updated dictionary is received from a server, wherein the updated dictionary is determined based on dictionaries of a plurality of terminal devices.
9. The method according to claim 8, characterized in that The method further comprises: Detecting a user's copying operation on the third text; In response to the user's copying operation on the third text, determining whether the updated dictionary includes the third text; If the updated dictionary includes the third text, a target service of the third text is determined.
10. The method according to claim 8, characterized in that The method further comprises: Acquire a fourth text in the second image, where the fourth text is acquired in response to a trigger operation of a text recognition icon by a user; determining whether the updated dictionary includes the fourth text; If the updated dictionary includes the fourth text, a target service of the fourth text is determined.
11. A terminal device, characterized in that: include: A processor, wherein the processor is coupled to a memory, wherein the memory is used to store a computer program, and when the processor calls the computer program, the terminal device executes the method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for implementing the method according to any one of claims 1 to 10.
13. A computer program product, characterized in that The computer program product includes a computer program code, and when the computer program code is executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Training method and device for multi-task model
CN110909145A
Search method and device, storage medium and terminal
CN112115342A
Method and device for identifying user intention based on text classification and storage medium
CN112989035A
Data processing method and device, model training method and device, equipment and storage medium
CN114330483A