Search

US-20260126890-A1 - CLIPBOARD CONTENT PASTING METHOD AND RELATED APPARATUS

US20260126890A1US 20260126890 A1US20260126890 A1US 20260126890A1US-20260126890-A1

Abstract

This application provides a clipboard content pasting method and a related apparatus. An electronic device may identify, based on a copy page and a paste page, a paste scenario and a user intent of performing copying and pasting by a user. Based on the paste scenario and the user intent, the electronic device may extract, from copied content, to-be-pasted content that meets the user intent and that matches an input box on the paste page. The electronic device may provide the to-be-pasted content on the paste page for the user to select and input the to-be-pasted content into the input box on the paste page. The foregoing method can effectively improve copying and pasting efficiency of the user, and improve copying and pasting experience of the user.

Inventors

  • Jie Ren
  • Yiliang ZENG
  • Feng Mao
  • Yanming ZHU
  • Tianyi Wu
  • Sucheng Bian
  • Ning Ding

Assignees

  • HUAWEI TECHNOLOGIES CO., LTD.

Dates

Publication Date
20260507
Application Date
20251229
Priority Date
20230704

Claims (20)

  1. 1 . A clipboard content pasting method, wherein the method comprises: receiving, by an electronic device, a first operation for first content on a first page, and storing the first content in a clipboard; receiving, by the electronic device, a second operation of accessing a second page, and displaying the second page; providing, by the electronic device, a first paste option on the second page, wherein the first paste option is used to paste second content related to the second page and obtained by processing the first content; receiving, by the electronic device, a third operation of accessing a third page, and displaying the third page; and providing, by the electronic device, a second paste option on the third page, wherein the second paste option is used to paste third content related to the third page and obtained by processing the first content.
  2. 2 . The method according to claim 1 , wherein before providing the first paste option on the second page, the method further comprises: extracting, by the electronic device, fourth content from the first content based on the first page and the second page, wherein the second content is the fourth content, or is content obtained by processing the fourth content.
  3. 3 . The method according to claim 2 , wherein the method further comprises: determining, by the electronic device based on a public knowledge base, that one or more errors exist in the fourth content, wherein the public knowledge base comprises public knowledge of one or more fields; and performing error correction processing on the fourth content.
  4. 4 . The method according to claim 3 , wherein the method further comprises: supplementing, by the electronic device, fifth content with sixth content based on at least one of a user personal knowledge base or the public knowledge base, to obtain the second content, wherein the fifth content is content obtained by performing error correction processing on the fourth content, and the user personal knowledge base comprises one or more of the following user information: an age group of a user; a family address and a company address of the user; a user preference; or a user habit.
  5. 5 . The method according to claim 2 , wherein the method further comprises: supplementing, by the electronic device, the fourth content with seventh content based on at least one of a user personal knowledge base or a public knowledge base, to obtain the second content, wherein the public knowledge base comprises public knowledge of one or more fields, and the user personal knowledge base comprises one or more of the following user information: an age group of a user, a family address and a company address of the user, a user preference, or a user habit.
  6. 6 . The method according to claim 5 , wherein the method further comprises: determining, by the electronic device based on the user personal knowledge base, that a preference degree of the user for eighth content is higher than a preference degree for the second content, wherein the eighth content is related to the second page and is obtained by processing the first content, the user personal knowledge base comprises one or more of the following user information: the age group of the user, the family address and the company address of the user, the user preference, or the user habit, providing, by the electronic device, the first paste option on the second page comprises: providing, by the electronic device, the first paste option and a third paste option on the second page, wherein the third paste option is used to paste the eighth content, and a display position of the third paste option is preferred over a display position of the first paste option.
  7. 7 . The method according to claim 1 , wherein providing, by the electronic device, the first paste option on the second page comprises: providing, by the electronic device, the first paste option and a fourth paste option on the second page, wherein the fourth paste option is used to paste ninth content obtained by processing the first content, and the ninth content is related to the second page; and after providing, by the electronic device, the first paste option on the second page, the method further comprises: receiving, by the electronic device, an operation for the first paste option, and pasting the second content in an input box on the second page; after exiting the second page, receiving, by the electronic device, an operation of accessing the second page, and displaying the second page; and providing, by the electronic device, the fourth paste option on the second page, wherein a paste option on the second page does not comprise the first paste option.
  8. 8 . The method according to claim 7 , wherein the method further comprises: providing, by the electronic device, the first paste option on the second page further comprises: providing, by the electronic device, the first paste option and a fifth paste option on the second page, wherein the fifth paste option is used to paste tenth content obtained by processing the first content, and the tenth content is related to the second page; and after providing, by the electronic device, the first paste option on the second page, the method further comprises: receiving, by the electronic device, the operation for the first paste option; pasting the second content in the input box on the second page, and jumping to a fourth page; and providing, by the electronic device, the fifth paste option on the fourth page, wherein a paste option on the fourth page does not comprise the first paste option.
  9. 9 . The method according to claim 2 , wherein extracting, by the electronic device, the fourth content from the first content based on the first page and the second page further comprises: determining, by the electronic device, first page information based on the first page, and determining second page information based on the second page; identifying, by the electronic device, a first paste scenario and a first user intent based on the first page information and the second page information; determining, by the electronic device, first extraction prompt information based on the first paste scenario and the first user intent; and extracting, by the electronic device, the fourth content from the first content using a language model based on the first extraction prompt information.
  10. 10 . The method according to claim 9 , wherein the first page information comprises at least one of the first content or context information of the first content, and the second page information comprises one or more of the following: a category of an APP to which the second page belongs; a type of to-be-input content in an input box on the second page; or operation information related to the second page.
  11. 11 . The method according to claim 1 , wherein before providing, by the electronic device, the first paste option on the second page, the method further comprises: receiving, by the electronic device, an operation for a first input box on the second page; and after providing, by the electronic device, the first paste option on the second page, the method further comprises: receiving, by the electronic device, the operation for the first paste option, and pasting the second content in the first input box.
  12. 12 . The method according to claim 11 , wherein the second page further comprises a second input box, and the method further comprises: receiving, by the electronic device, an operation for the second input box, and providing a sixth paste option on the second page, wherein the sixth paste option is used to paste eleventh content obtained by processing the first content, and the eleventh content is related to the second page; and receiving, by the electronic device, an operation for the sixth paste option, and pasting the eleventh content in the second input box.
  13. 13 . The method according to claim 1 , wherein the second page comprises n1 input boxes, n1 is a positive integer greater than 1, and the second content comprises n1 pieces of information; and after providing, by the electronic device, the first paste option on the second page, the method further comprises: receiving, by the electronic device, an operation for the first paste option; and pasting the n1 pieces of information respectively in the n1 input boxes.
  14. 14 . The method according to claim 1 , wherein the first content belongs to content copied or cut in the latest ml times before the electronic device displays the second page, and ml is a positive integer; or the second page is a page displayed by the electronic device in a first time period after the first operation is received.
  15. 15 . The method according to claim 1 , wherein the method further comprises: receiving, by the electronic device, an operation for twelfth content on a fifth page, and storing the twelfth content in the clipboard, wherein the fifth page is the same as or different from the first page, and the twelfth content is different from the first content; receiving, by the electronic device, an operation of accessing a sixth page, and displaying the sixth page; and providing, by the electronic device, a seventh paste option and an eighth paste option on the sixth page, wherein the seventh paste option is used to paste thirteenth content, the eighth paste option is used to paste fourteenth content, the thirteenth content is obtained by processing the first content, the thirteenth content is related to the sixth page, the fourteenth content is obtained by processing the twelfth content, and the fourteenth content is related to the sixth page.
  16. 16 . An electronic device, wherein the electronic device comprises: a display, configured to display a page of an application; a memory, configured to store a computer program; and a processor, configured to invoke the computer program, to enable the electronic device to: receive a first operation for first content on a first page, and storing the first content in a clipboard; receive a second operation of accessing a second page, and displaying the second page; provide a first paste option on the second page, wherein the first paste option is used to paste second content, the second content is obtained by processing the first content, and the second content is related to the second page; receive a third operation of accessing a third page, and displaying the third page; and provide a second paste option on the third page, wherein the second paste option is used to paste third content, the third content is obtained by processing the first content, and the third content is related to the third page.
  17. 17 . The electronic device according to claim 16 , wherein before providing the first paste option on the second page, the electronic device is further enabled to: extract fourth content from the first content based on the first page and the second page, wherein the second content is the fourth content, or is content obtained by processing the fourth content.
  18. 18 . The electronic device according to claim 17 , wherein the electronic device is further enabled to: determine, based on a public knowledge base, that one or more errors exist in the fourth content, and perform error correction processing on the fourth content, wherein the public knowledge base comprises public knowledge of one or more fields.
  19. 19 . The electronic device according to claim 18 , wherein the electronic device is further enabled to: supplement fifth content with sixth content based on at least one of a user personal knowledge base or the public knowledge base, to obtain the second content, wherein the fifth content is content obtained by performing error correction processing on the fourth content, and the user personal knowledge base comprises one or more of the following user information: an age group of a user, a family address and a company address of the user, a user preference, or a user habit.
  20. 20 . The electronic device according to claim 17 , wherein the electronic device is further enabled to: supplement the fourth content with seventh content based on at least one of a user personal knowledge base or a public knowledge base, to obtain the second content, wherein the public knowledge base comprises public knowledge of one or more fields, and the user personal knowledge base comprises one or more of the following user information: an age group of a user, a family address and a company address of the user, a user preference, or a user habit.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of International Application No PCT/CN2024/101727, filed on Jun. 26, 2024, which claims priority to Chinese Patent Application No. 202310810949.7, filed on Jul. 4, 2023. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD This application relates to the field of terminal technologies, and in particular, to a clipboard content pasting method and a related apparatus. BACKGROUND In a process of using an electronic device such as a mobile phone or a computer, a user often needs to perform copying and pasting between different applications (APPs) or pages. This need exists in scenarios such as social networking, office, entertainment, and shopping. However, in current actual application, it is inconvenient for the user to accurately copy needed content from a piece of content. For example, because a cursor displayed on a screen of a mobile phone is small, the user needs to repeatedly adjust a position of the cursor to select content that needs to be copied. For another example, some applications support copying of entire content only. The user needs to copy and paste the entire content, and then delete unwanted parts one by one. In addition, the user may need to copy a plurality of pieces of information in one piece of content, and the plurality of pieces of information may be spaced. If the user needs to paste the plurality of pieces of copied information to another APP, the user needs to repeatedly switch between APPs to perform a plurality of copy and paste operations. It can be learned that the foregoing copy and paste operations are cumbersome, causing poor user experience. SUMMARY This application provides a clipboard content pasting method and a related apparatus. An electronic device may extract, from clipboard content based on a copy page and a paste page, to-be-pasted content that meets a user intent and that matches a paste scenario. The electronic device may provide the to-be-pasted content on the paste page for a user to select and input the to-be-pasted content into an input box on the paste page. The electronic device may provide the to-be-pasted content on the paste page for the user to select and input the to-be-pasted content into the input box on the paste page. According to a first aspect, this application provides a clipboard content pasting method. An electronic device receives a first operation for first content on a first page, and stores the first content in a clipboard. The electronic device receives a second operation of accessing a second page, and displays the second page. The electronic device provides a first paste option on the second page. The first paste option is used to paste second content. The second content is obtained by processing the first content. The second content is related to the second page. The electronic device receives a third operation of accessing a third page, and displays the third page. The electronic device provides a second paste option on the third page. The second paste option is used to paste third content. The third content is obtained by processing the first content. The third content is related to the third page. The first operation may be an operation of copying the first content, or an operation of cutting the first content. The first content may be copied content or cut content (that is, clipboard content). The first page may be a copy page in this application. Both the second page and the third page may be paste pages in this application. The second page and the third page may be different pages of a same application, or may be pages of different applications. The second content and the third content may be to-be-pasted content obtained by processing the first content by the electronic device. The second content may be different from or the same as the third content. In some embodiments, the second content being related to the second page may indicate that the second content matches a type of to-be-input content in an input box on the second page. The third content being related to the third page may indicate that the third content matches a type of to-be-input content in an input box on the third page. It can be learned from the foregoing method that, for same copied content, the electronic device may provide, based on different paste pages, a paste option corresponding to to-be-pasted content that is related to each paste page and that is obtained from the copied content. To-be-pasted content related to one paste page may be content that is obtained by the electronic device through analysis and that a user wants to paste from the copied content onto the paste page. In this way, when the copied content includes many pieces of redundant information, the user may not need to move a cursor during copying to perform a cumbersome operation of selecting the copied content, and does not need to paste the c