Content insertion method and related apparatus
By using associated applications within office software to transfer content between different devices, the cumbersome problem of inserting non-local content is solved, improving file processing efficiency and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2025-01-21
- Publication Date
- 2026-07-21
AI Technical Summary
The process of inserting non-local content in existing office software is cumbersome, requiring the target object to transfer the content, which seriously affects the efficiency of file processing.
By presenting prompts in the target application on the first device, the target object is allowed to select the target content to insert on the second device, and the content is transferred to the target application via an associated reference application, simplifying the content insertion process.
It simplifies the content insertion process, improving file processing efficiency and user experience.
Smart Images

Figure CN122433693A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and provides a content insertion method and related apparatus. Background Technology
[0002] Office software such as documents, spreadsheets, and presentations supports inserting various types of content, including images, videos, and audio, into files.
[0003] In related technologies, content insertion in office software only supports local content insertion. If the target content to be inserted and the office software are located on different devices, the target object needs to store the target content stored on one device to the other device where the office software is located, and then insert the target content stored locally into the file.
[0004] Clearly, inserting non-local content is a cumbersome process, requiring the target object to transfer the content, which severely impacts file processing efficiency. Summary of the Invention
[0005] This application provides a content insertion method and related apparatus to improve file processing efficiency.
[0006] On one hand, embodiments of this application provide a content insertion method applied to a target application running on a first device, including:
[0007] In response to a file editing operation triggered by a target object on a target file in the target application, the content editing interface of the target file is presented.
[0008] In response to a content insertion operation triggered by the target object in the content editing interface, a prompt message is displayed, which prompts the target object to select at least one target to insert content on the second device.
[0009] In the content editing interface, at least one target inserted content is presented. Each target inserted content is transmitted to the target application through the reference application running on the second device. The reference application and the target application are associated applications.
[0010] On one hand, embodiments of this application provide a content insertion method applied to a backend server, including:
[0011] When a content insertion request is received from a target application running on the first device, the reference application running on the second device associated with the object identifier of the target object carried in the content insertion request is determined; wherein, the content insertion request is sent by the target object when triggering a content insertion operation for a target file in the target application, and when the content insertion operation is triggered, the target application displays a prompt message, which is used to prompt the target object to select at least one target content to be inserted on the second device;
[0012] A content selection request is sent to the reference application running on the second device, so that the reference application running on the second device transmits at least one target insertion content to the target application, the at least one target insertion content being used to insert into the target file.
[0013] On one hand, embodiments of this application provide a content insertion method, applied to a reference application running on a second device, including:
[0014] When a content selection request is received, candidate content to be inserted is presented. The content selection request is sent by the target object after triggering a content insertion operation on a target file running on the first device. When the content insertion operation is triggered, a prompt message is presented in the target application. The prompt message is used to prompt the target object to select at least one target content to be inserted on the second device.
[0015] When a selection operation is triggered for each candidate insertion content, at least one selected target insertion content is sent to the target application, and the reference application and the target application are associated applications.
[0016] On one hand, embodiments of this application provide a first device in which a target application runs. The first device includes:
[0017] The file editing unit is used to respond to a file editing operation triggered by a target object on a target file in the target application and to present the content editing interface of the target file.
[0018] An information prompting unit is used to present a prompting message in response to a content insertion operation triggered by the target object in the content editing interface. The prompting message is used to prompt the target object to select at least one target to insert content on the second device.
[0019] A content insertion unit is used to present at least one target insertion content in the content editing interface, wherein each target insertion content is transmitted to the target application through the reference application running on the second device, and the reference application and the target application are associated applications.
[0020] In one possible implementation, the information prompting unit is also used for:
[0021] Presenting reception progress information for the at least one target inserted content, the reception progress information being used to characterize: the number of target inserted content that the target application has received among the at least one target inserted content.
[0022] In one possible implementation, when the at least one target inserted content is presented in the content editing interface, the content insertion unit is specifically used for:
[0023] In the content editing interface, the at least one target inserted content is presented sequentially according to the content selection order of the at least one target inserted content.
[0024] In one possible implementation, the reference application and the target application share a backend server, and the information prompting unit is further used for:
[0025] When the content insertion operation is triggered, the background server sends a content selection request to the reference application running on the second device, so that the reference application running on the second device presents each candidate insertion content and returns at least one target insertion content selected from each candidate insertion content.
[0026] Obtain the at least one target insert content returned by the reference application running on the second device.
[0027] In one possible implementation, when obtaining the at least one target insertion content returned by the reference application running on the second device, the information prompting unit is specifically used for:
[0028] The at least one target insertion content is downloaded from the backend server through a reference application running on the first device; or,
[0029] The backend server obtains the storage address of each of the at least one target insertion content in a designated storage server, and downloads the at least one target insertion content from the storage server based on the obtained at least one storage address.
[0030] In one possible implementation, when obtaining the at least one target insertion content returned by the reference application running on the second device, the information prompting unit is specifically used for:
[0031] For each target inserted content acquired, the download result of the target inserted content is sent to the backend server, so that the backend server updates the task status of the content transmission task of the target application based on the received download result.
[0032] In one possible implementation, the reference application and the target application share a backend server, and the information prompting unit is further used for:
[0033] Receive the task status of the content transmission task of the target application from the backend server;
[0034] Based on the received task status, update the locally stored task status and present the status prompt information associated with the received task status to the target object.
[0035] In one possible implementation, when a prompt message is displayed in response to a content insertion operation triggered by the target object in the content editing interface, the information prompt unit is specifically used for:
[0036] In response to the triggered content insertion operation, obtain the remaining capacity information of the cloud service provided by the target application purchased by the target object;
[0037] When the remaining capacity information indicates that the cloud service has sufficient capacity, the prompt message is displayed. In one possible implementation, the content type of the at least one target inserted content is an image.
[0038] On one hand, embodiments of this application provide a backend server, including:
[0039] The processing unit is configured to, when receiving a content insertion request from a target application running on a first device, determine, based on the object identifier of the target object carried in the content insertion request, a reference application running on a second device associated with the object identifier; wherein, the content insertion request is sent by the target object when triggering a content insertion operation for a target file in the target application, and when the content insertion operation is triggered, the target application displays a prompt message, which prompts the target object to select at least one target content to be inserted on the second device;
[0040] A transmission unit is configured to send a content selection request to the reference application running on the second device, so that the reference application running on the second device transmits at least one target insertion content to the target application, the at least one target insertion content being used to insert into the target file.
[0041] In one possible implementation, when obtaining the reference application associated with the object identifier running on the second device based on the object identifier of the target object carried in the content insertion request, the processing unit is specifically used for:
[0042] Based on the object identifier of the target object carried in the content insertion request, obtain each candidate application associated with the object identifier;
[0043] Based on the running status of each candidate application, candidate applications that are online and running on devices other than the first device are selected from among the candidate applications and used as reference applications associated with the object identifier running on the second device.
[0044] In one possible implementation, if the content selection request carries a task identifier for the content transmission task of the target application, the content transmission task is created after receiving the content insertion request;
[0045] After sending a content selection request to the reference application running on the second device, the processing unit is further configured to:
[0046] When a task query request is received from the reference application running on the second device, the task information of the content transmission task is obtained according to the task identifier carried in the task query request.
[0047] The task information is sent to the reference application running on the second device, so that the reference application running on the second device can present each candidate insertion content according to the task information.
[0048] In one possible implementation, the processing unit is further used for:
[0049] When the content insertion request is received, a content delivery task for the target application is created, and the task status of the content delivery task is set to a waiting state.
[0050] Upon receiving an operation instruction, and based on the current task status of the content transmission task, and in conjunction with the operation instruction, determine when to update the task status, and send the new task status to the target application.
[0051] In one possible implementation, when determining to update the task status based on the current task status of the content transmission task and in conjunction with the operation instruction, the processing unit is specifically used for:
[0052] Obtain the preset state transition logic, which includes: the transition conditions between two task states in each task state;
[0053] Based on the state transition logic, the transition conditions from the current task state to each of the task states are obtained;
[0054] If, based on the current task status and the operation instruction, one of the obtained transition conditions is determined to be met, then the task status is determined to be updated.
[0055] In one possible implementation, the processing unit is further used for:
[0056] When the at least one target insert content is received from the reference application running on the second device, the at least one target insert content is sent to the reference application running on the first device, so that the reference application running on the first device passes the at least one target insert content to the target application.
[0057] On one hand, embodiments of this application provide a second device, in which a reference application runs, and the second device includes:
[0058] The content presentation unit is used to present each candidate content to be inserted when a content selection request is received from the backend server. The content selection request is sent by the target object after triggering a content insertion operation on a target file running on the first device. When the content insertion operation is triggered, the target application displays a prompt message, which is used to prompt the target object to select at least one target content to be inserted on the second device.
[0059] The content transmission unit is used to send at least one selected target insertion content to a target application running on a first device when a selection operation is triggered for each candidate insertion content, wherein the reference application and the target application are associated applications.
[0060] On one hand, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the above-described method.
[0061] On one hand, embodiments of this application provide a computer-readable storage medium including a computer program, which, when run on an electronic device, causes the electronic device to perform the steps of any of the methods described above.
[0062] On one hand, embodiments of this application provide a computer program product, the program product including a computer program stored in a computer-readable storage medium, wherein a processor of an electronic device reads from the computer-readable storage medium and executes the computer program, causing the electronic device to perform the steps of any of the methods described above.
[0063] In this embodiment, the target application running on the first device responds to a file editing operation triggered by a target object for a target file in the target application by presenting a content editing interface for the target file; then, in response to a content insertion operation triggered by the target object in the content editing interface, a prompt message is presented, which prompts the target object to select at least one target insertion content on the second device; and at least one target insertion content is presented in the content editing interface, wherein each target insertion content is transmitted to the target application through a reference application running on the second device, and the reference application and the target application are associated applications.
[0064] When the target object triggers content insertion for the target file in the target application, if the target content to be inserted is stored in the second device, the target object can select the target content to be inserted in the second device and pass the target content to the target application by running the reference application in the second device, thereby realizing the insertion of the target content into the target file.
[0065] Since the transmission of the inserted content is imperceptible to the target object, the target object only needs to select the content to be inserted without any additional operations. Therefore, the operation steps of the target object in the content insertion scenario can be simplified, thereby improving the content insertion efficiency, which in turn improves the file processing efficiency of the target object, and enhances the user experience of the target object.
[0066] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0067] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0068] Figure 1 This is a schematic diagram of an application scenario provided in the embodiments of this application;
[0069] Figure 2 This is a schematic diagram illustrating a scenario of inserting an image into a table, as provided in an embodiment of this application.
[0070] Figure 3 This is a schematic diagram of a content insertion process provided in an embodiment of this application;
[0071] Figure 4 This is a schematic diagram of a content editing interface provided in an embodiment of this application;
[0072] Figure 5 This is a schematic diagram of another content editing interface provided in the embodiments of this application;
[0073] Figure 6 This is a schematic diagram of an interface for providing a prompt message in an embodiment of this application;
[0074] Figure 7 This is a schematic diagram of a content editing interface after inserting an image, provided in an embodiment of this application.
[0075] Figure 8 This is a schematic diagram of another content editing interface after inserting an image, provided in an embodiment of this application.
[0076] Figure 9A This is a schematic diagram of the first type of receiving progress information provided in the embodiments of this application;
[0077] Figure 9B This is a schematic diagram of the second type of receiving progress information provided in the embodiments of this application;
[0078] Figure 9C This is a schematic diagram of the third type of receiving progress information provided in the embodiments of this application;
[0079] Figure 10 This is a flowchart illustrating another content selection and insertion method provided in the embodiments of this application;
[0080] Figure 11 This is a schematic diagram of a content selection interface provided in an embodiment of this application;
[0081] Figure 12 This is an interactive schematic diagram provided in an embodiment of this application;
[0082] Figure 13 This is a logical diagram illustrating a capacity query process provided in an embodiment of this application;
[0083] Figure 14A This is a logical diagram illustrating the first request sending method provided in the embodiments of this application;
[0084] Figure 14B This is a logical diagram illustrating the second request sending method provided in the embodiments of this application;
[0085] Figure 15 This is a logical diagram illustrating a reference application determination process provided in an embodiment of this application;
[0086] Figure 16A This is a logical schematic diagram of transmission method 1 provided in the embodiments of this application;
[0087] Figure 16B This is a logical schematic diagram of transmission method 2 provided in the embodiments of this application;
[0088] Figure 17 This is a schematic diagram of a state transition logic provided in an embodiment of this application;
[0089] Figure 18 This is a schematic diagram of a task state transition process on the target application side provided in an embodiment of this application;
[0090] Figure 19A This application provides a flowchart illustrating the transition process of a waiting state in its embodiments;
[0091] Figure 19B This application provides a flowchart illustrating the transition process of a selected state in an embodiment;
[0092] Figure 19C This application provides a flowchart illustrating the process of the upload status transition in an embodiment;
[0093] Figure 19D This application provides a flowchart illustrating the process of transitioning to an upload completion status in an embodiment of the application.
[0094] Figure 20 This is a schematic diagram of the structure of a first device provided in an embodiment of this application;
[0095] Figure 21 This is a schematic diagram of the structure of a backend server provided in an embodiment of this application;
[0096] Figure 22 This is a schematic diagram of the structure of a second device provided in an embodiment of this application;
[0097] Figure 23 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0098] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.
[0099] In related technologies, content insertion in office software only supports local content insertion. If the target content to be inserted and the office software are located on different devices, the target object needs to use a memory card, cloud service, or other means to store the target content stored on one device to the other device where the office software is located, and then insert the target content stored locally into the file.
[0100] Clearly, inserting non-local content is a cumbersome process, requiring the target object to transfer the content, which severely impacts file processing efficiency.
[0101] In this embodiment, the target application running on the first device responds to a file editing operation triggered by a target object for a target file in the target application by presenting a content editing interface for the target file; then, in response to a content insertion operation triggered by the target object in the content editing interface, a prompt message is presented, which prompts the target object to select at least one target insertion content on the second device; and at least one target insertion content is presented in the content editing interface, wherein each target insertion content is transmitted to the target application through a reference application running on the second device, and the reference application and the target application are associated applications.
[0102] When the target object triggers content insertion for the target file in the target application, if the target content to be inserted is stored in the second device, the target object can select the target content to be inserted in the second device and pass the target content to the target application by running the reference application in the second device, thereby realizing the insertion of the target content into the target file.
[0103] Since the transmission of the inserted content is imperceptible to the target object, the target object only needs to select the content to be inserted without any additional operations. Therefore, the operation steps of the target object in the content insertion scenario can be simplified, thereby improving the content insertion efficiency, which in turn improves the file processing efficiency of the target object, and enhances the user experience of the target object.
[0104] See Figure 1 The diagram shown illustrates an application scenario provided in this embodiment. This application scenario includes a first device 101 and a second device 102, and may also include a server 103. The first device 101 and the second device 102 are different physical devices.
[0105] The first device 101 runs a target application, which is an application used to edit files and insert content. The target application includes, but is not limited to, document applications, spreadsheet applications, PowerPoint applications, etc. The first device 101 can be a smartphone, tablet computer, laptop computer, desktop computer, smartwatch, smart home appliance, vehicle terminal, aircraft, etc., but is not limited to these.
[0106] The second device 102 runs a reference application and stores target insertion content. The reference application provides the target object with the function of selecting the target insertion content and transmits the target insertion content stored in the second device 102 to the target application. The second device 102 may be a smartphone, tablet computer, laptop computer, desktop computer, smartwatch, smart home appliance, vehicle terminal, aircraft, etc., but is not limited to these.
[0107] In some implementations, a reference application also runs on the first device 101. The reference application running on the second device 102 can upload the target insertion content to the server 103, and the reference application running on the first device 101 can download the target insertion content from the server 103 so that the target application can obtain the target insertion content.
[0108] The target application and the reference application are related applications. In some implementations, the related application can mean that the target application and the reference application are the same application, or that the target application is a sub-application or mini-program of the reference application, or that the reference application is a sub-application or mini-program of the target application, and the server 103 is the backend server of the target application. Of course, the server 103 can also be understood as the backend server of the reference application.
[0109] In some implementations, the associated application can also refer to the connection between the target application and the reference application through login accounts. That is, the target application is logged into using the reference application's account for file editing. For example, an enterprise instant messaging application account can be used as the login account for the document application. In this way, when a corresponding operation (such as content insertion) is triggered in the target application, it can be sent to the reference application's backend server through the target application's corresponding backend server. The reference application's backend server then sends the corresponding instruction (such as a content insertion request) to the reference application. Clearly, server 103 includes both the reference application's backend server and the target application's backend server.
[0110] In some implementations, the associated application may also refer to the target application and the reference application sharing a backend server, that is, server 103 is a backend server shared by the reference application and the target application.
[0111] Server 103 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0112] The first device 101 and the server 103 can be connected directly or indirectly through wired or wireless communication, and this application does not impose any restrictions on this.
[0113] The second device 102 and the server 103 can be connected directly or indirectly via wired or wireless communication, and this application does not impose any restrictions on this.
[0114] The content insertion method in this application embodiment can be applied to file content insertion scenarios in applications such as tables, documents, presentations (PowerPoint, PPT), etc. The types of inserted content include, but are not limited to, images, videos, audio, etc.
[0115] For example, to insert an image into a table, please refer to [link / reference]. Figure 2 As shown, the target application is a spreadsheet application, but the reference application can be, but is not limited to, an enterprise instant messaging application. Assuming the spreadsheet application runs on a personal computer (PC) and the enterprise instant messaging application runs on a mobile phone, and assuming the target needs to insert several images stored locally on the mobile phone into the spreadsheet application, then on the PC, the spreadsheet application responds to the target's file editing operation on the target spreadsheet by displaying the content editing interface of the target spreadsheet. In response to the target's content insertion operation in the content editing interface, it displays a prompt message, prompting the target to select the target images to insert on the mobile phone. Thus, after the target selects the target images in the enterprise instant messaging application on the mobile phone, the target images are transmitted to the spreadsheet application via the enterprise instant messaging application on the mobile phone. The spreadsheet application then displays the target images in the content editing interface, completing the image insertion.
[0116] The following explanation uses inserting an image into a table as an example. In some implementations, an enterprise instant messaging application also runs on the PC. For ease of distinction, an enterprise instant messaging application running on a mobile phone can also be called a mobile communication application, and an enterprise instant messaging application running on a PC can also be called a PC communication application.
[0117] See Figure 3 The diagram shown is a flowchart of a content insertion method provided in an embodiment of this application. This process is applied to a target application running on a first device, and the specific process is as follows:
[0118] S301. In response to a file editing operation triggered by the target object on a target file in the target application, present the content editing interface of the target file.
[0119] The target application refers to the application where content needs to be inserted. The target application can be, but is not limited to, document applications, spreadsheet applications, presentation text applications, etc.
[0120] In a target application, a target file refers to a file created by the target application into which content needs to be inserted. For example, a document application creates a document file. The target file can be a file, an existing file, or a newly created file; there are no restrictions.
[0121] The file editing operation is triggered by the target object for the target file. In one possible implementation, when the target object clicks on the target file on the first device, the target application determines that the target object triggers the file editing operation for the target file. In another possible implementation, when the target object creates a new file in the target application, the new file is used as the target file, and the target application determines that the target object triggers the file editing operation for the target file. However, this is not the only possible implementation.
[0122] It should be noted that the embodiments in this application are only illustrated by click triggering. In actual application, other methods can also be used, such as double-click, touch, keyboard, etc., to trigger various operations (such as file editing operations, content insertion operations, etc.).
[0123] The content editing interface is used to edit the content of the target file. Editing includes content insertion, as well as writing, modifying, and deleting content, but is not limited to these.
[0124] For example, to insert an image into a table, please refer to [link / reference]. Figure 4 As shown, this is a schematic diagram of a content editing interface provided in an embodiment of this application. When the target object clicks on a table file, it presents... Figure 4 The content editing interface shown is the content editing interface corresponding to data table 1, and the content editing interface contains the content of data table 1.
[0125] It should be noted that, for a table file, a table file can contain one or more data tables, and each data table corresponds to a content editing interface. For example, when the target object opens the table file, the content editing interface of the first data table is displayed by default. When the target object clicks on other data tables, the content editing interface of the corresponding data table is displayed.
[0126] S302. In response to the content insertion operation triggered by the target object in the content editing interface, a prompt message is displayed. The prompt message is used to prompt the target object to select at least one target to insert content on the second device.
[0127] In one possible implementation, the content editing interface includes a content insertion component. When the target object selects a content insertion location and clicks the content insertion component, the target application determines that the content insertion operation has been triggered. The content insertion component can be presented directly or indirectly in the content editing interface. For example, when the target object selects a cell in a data table and clicks the content insertion component, the content insertion operation is triggered.
[0128] Another possible implementation involves pre-setting a target shortcut key for content insertion. When the target object enters the target shortcut key, the target application determines that the target object is triggering the content insertion operation. Of course, the shortcut key is just an example; other shortcut invocation methods can also be used to trigger the content insertion operation.
[0129] The prompt message can be presented in the content editing interface, or in a separate interface, or in interactive components such as pop-ups, dialog boxes, and prompt boxes, but is not limited to these.
[0130] Taking inserting an image into a table as an example, please refer to... Figure 5 As shown, this is a schematic diagram of a content editing interface provided in an embodiment of this application. When the target object selects the cell corresponding to the image column in the fourth row, a "+" button appears in that cell. After the target object clicks the "+" button, a floating box appears, which includes: an image drag area (marked with a dashed box), an "Add Local Image" button, and a "Upload from Mobile Album" button. When the target object drags an image to the image drag area, the image can be inserted into that cell. When the target object clicks the "Add Local Image" button, a local image selector is presented to the target object, and when the target object selects the target image from the image selector, the target image is inserted into that cell. The "Upload from Mobile Album" button is equivalent to a content insertion component. When the target object clicks the "Upload from Mobile Album" button, a local image selector is presented to the target object. Figure 5 The message shown is as follows.
[0131] See Figure 6 As shown, this is a schematic diagram of a prompt message provided in an embodiment of this application. The prompt message reads, "Please open the enterprise instant messaging application on your mobile phone and select image upload," prompting the target object to upload an image via their mobile phone. The prompt message is displayed in a pop-up window, and the area outside the pop-up window is covered by a background mask. The background mask is usually gray. By darkening the background, the pop-up content can be highlighted more clearly, allowing the target object's attention to focus on the pop-up content and preventing the target object from interacting with the background content.
[0132] S303. In the content editing interface, at least one target inserted content is presented. Each target inserted content is transmitted to the target application through a reference application running on the second device. The reference application and the target application are associated applications.
[0133] The specific process of transmitting the target inserted content is detailed below.
[0134] In one possible implementation, the content editing interface presents at least one target inserted content, including:
[0135] In the content editing interface, at least one target content is presented sequentially according to the content selection order of the content to be inserted at least one target.
[0136] The content selection order refers to the selection order of at least one target insertion content when the target object selects target insertion content in the second device.
[0137] For example, see Figure 7 As shown, it is a schematic diagram of a content editing interface after inserting an image provided in an embodiment of this application. The target inserted image includes image 1. After the target application obtains the target inserted image, it will display the target inserted image in a cell in the content editing interface.
[0138] For example, see Figure 8 As shown, this is a schematic diagram of another content editing interface after inserting an image provided in an embodiment of this application. It is assumed that the target inserted images include image 1, image 2 and image 3. The content selection order represents that the target object selects image 2 first, then image 1, and finally image 3. Therefore, after the target application obtains image 1, image 2 and image 3, it will present each target inserted image in the cell of the content editing interface in the order of content selection of image 2, image 1 and image 3.
[0139] In the above implementation method, by inserting the target content according to the content selection order, the orderly insertion of the content can not only better meet the insertion needs of the target object, but also facilitate the target object to modify the target file later, simplify the subsequent editing process, and thus help improve the usage effect.
[0140] In one possible implementation, the target application may also present reception progress information for at least one target insert, the reception progress information being used to characterize the number of target inserts that the target application has received.
[0141] Progress information can be displayed in the content editing interface, in a separate interface, or in interactive components such as pop-ups, dialog boxes, and prompts, but is not limited to these.
[0142] The receiving progress information includes the number of target insertion contents that have been received and the total number of target insertion contents. It may also include status prompts, including but not limited to image receiving, image transmission cancelled, and image receiving failure.
[0143] See Figure 9A As shown, this is a schematic diagram of the first type of receiving progress information provided in this application embodiment. The receiving progress information indicates that the target insertion content includes three images, and two of the three images have been received so far, with the status message "Image receiving in progress." Furthermore, the interface used to display the receiving progress information may also include a "Stop Receiving" button. When the target object clicks the "Stop Receiving" button, the image transmission is canceled, and the current content insertion process is stopped.
[0144] See Figure 9B As shown, this is a schematic diagram of the second type of receiving progress information provided in the embodiments of this application. In the receiving progress information, the target insertion content includes 3 images. Currently, two of the 3 images have been received, and the status prompt information is that the image transmission has been canceled.
[0145] See Figure 9C As shown, this is a schematic diagram of the third type of receiving progress information provided in the embodiments of this application. In the receiving progress information, the target insertion content includes 3 images. Currently, two of the 3 images have been received, and the status prompt message is that the image receiving failed.
[0146] In the above implementation method, by displaying the receiving progress information, the progress of the content insertion process can be displayed intuitively, making it easier for the target object to better understand the current operation status, thereby improving the user experience of the target object.
[0147] See Figure 10 The diagram shown is a flowchart of a content selection and insertion method provided in an embodiment of this application. This process is applied to a reference application running on a second device, and the specific process is as follows:
[0148] S1001. When a content selection request is received, present each candidate content to be inserted.
[0149] The candidate insertion content is content stored on the second device. The content types of the candidate insertion content can be the same or different. Each candidate insertion content is content that the target object is authorized to access. The content selection request can be sent by the backend server.
[0150] For example, when a content selection request is received from the backend server, a reference application running on the second device presents a content selection interface, which includes various candidate insertion contents. In this embodiment, in the image insertion scenario, the content selection interface can also be called an image selection interface.
[0151] The content selection interface may also include an upload button. When the target object selects at least one candidate insertion content and clicks the upload button, a selection operation is triggered for each candidate insertion content, and the at least one candidate insertion content selected by the target object is used as at least one target insertion content.
[0152] For example, see Figure 11 As shown, this is a schematic diagram of a content selection interface provided in an embodiment of this application. The content selection interface includes candidate images to be inserted on the mobile phone. Each candidate image has been authorized for access by the target object. When the target object selects a target image from the candidate images and clicks the "Upload to Computer" button, a selection operation is triggered for each candidate image, and the selected candidate image is used as the target image. Furthermore, if the target object selects multiple target images, the content selection interface can use numbers to indicate the selection order. The content selection interface can also include a preview component. When the target object clicks the preview component, the selected target images are presented in the order they were selected. The content selection interface can also include an annotation component. When the target object selects an image and clicks the annotation component, editing functions for that image are enabled.
[0153] S1002. When a selection operation is triggered for each candidate insertion content, at least one selected target insertion content is sent to the target application running on the first device, wherein the reference application and the target application are associated applications.
[0154] See Figure 12 As shown, this is a schematic diagram illustrating the interaction between a target application running on a first device, a reference application running on a second device, and a backend server, as provided in an embodiment of this application. The specific process is as follows:
[0155] S1201. When the target application triggers a content insertion operation on the target file, it sends a content insertion request to the backend server. The content insertion request carries the object identifier of the target object.
[0156] The object identifier of the target object is used to uniquely identify the target object.
[0157] Specifically, when a content insertion operation is triggered, the target application sends a content selection request to the reference application running on the second device via a backend server. This causes the reference application on the second device to present each candidate content to be inserted and return at least one target content selected from the candidate content. The backend server enables data transfer between the reference application and the target application running on different devices, thus achieving efficient, remote content transfer.
[0158] In one possible implementation, when the target object triggers a content insertion operation on the target file, the target application sends a content insertion request to the backend server.
[0159] In another possible implementation, considering that the target application may provide cloud services, in this embodiment of the application, after the target object triggers the content insertion operation on the target file, the target application can also determine whether the product capacity of the cloud service purchased by the target object is sufficient. If the capacity is sufficient, the subsequent content insertion process can be carried out. If the capacity is insufficient, the subsequent content insertion process can be carried out first, and the target object can be prompted that the capacity is insufficient, so as to avoid affecting the normal use of the product. When the capacity is still insufficient when the next content insertion is carried out, the subsequent content insertion process will not be carried out. Of course, the capacity can also be prompted that the capacity is insufficient and the current content insertion process can be terminated.
[0160] Specifically, in response to the triggered content insertion operation, the remaining capacity information of the cloud services provided by the target application purchased by the target object is obtained; when the remaining capacity information indicates that the capacity is sufficient, a prompt message is displayed.
[0161] For example, see Figure 13 As shown, when a target object triggers a content insertion operation on a target file, the target application sends a document remaining capacity query request to the backend server. This request carries the target object's identifier. Upon receiving the request, the backend server returns remaining capacity information based on the object identifier. This remaining capacity information represents the remaining capacity of the cloud service purchased by the target object. Based on this information, the target application determines whether the capacity is sufficient and sends a content insertion request to the backend server. If the capacity is insufficient, a modal or dialog box is used to display a "Insufficient Capacity" message, and the application sends another content insertion request. This ensures that if the capacity is still insufficient when the target object triggers a content insertion operation next time, the next upload process is terminated, preventing the actual capacity used by the cloud application from exceeding the purchased capacity. For example, sufficient capacity can mean that the remaining capacity information reaches a set remaining capacity threshold, while insufficient capacity can mean that the remaining capacity information does not reach the set remaining capacity threshold, but this is not the only explanation.
[0162] The target application can communicate directly with the backend server by calling the Common Gateway Interface (CGI), but is not limited to this. CGI is a standard protocol used to define how a web server interacts with external applications to generate dynamic web page content. CGI allows the web server to call scripts or other programs to process user requests and return results.
[0163] When sending a content insertion request, in one implementation, see [link to relevant documentation]. Figure 14A As shown, the target application can send content insertion requests directly to the backend server via CGI. Figure 14A In the diagram, a dashed line represents a reference application, indicating that the first device may or may not be running a reference application.
[0164] For example, a spreadsheet application can send a content insertion request directly to the backend server via CGI. After receiving the content insertion request, the backend server can instruct the PC-side communication application to present various candidate insertion contents for the target object to select.
[0165] In another implementation, see Figure 14B As shown, a reference application also runs in the first device. The target application calls the communication interface between the target application and the reference application running on the first device, and sends a content insertion request to the backend server through the reference application running on the first device.
[0166] For example, a communication interface is set up between the spreadsheet application and the PC-based communication application. The spreadsheet application sends a content insertion request to the PC-based communication application through the set communication interface, and then the PC-based communication application sends the content insertion request to the backend server.
[0167] After the content insertion request is sent, the target application will wait for the upload process of the target content to finish.
[0168] In some possible implementations, after the content insertion request is sent, the target application can also obtain upload progress information to monitor the upload progress. Specifically, if the target application sends the content insertion request directly to the backend server via CGI, then the target application can obtain the upload progress information from the backend server. The upload progress information can be actively retrieved by the target application from the backend server or pushed by the backend server; there are no restrictions on this. The upload progress information can be retrieved or pushed periodically, or it can be obtained by the backend server when the upload progress changes. Generally speaking, an upload update occurs every time the target content is successfully or unsuccessfully uploaded.
[0169] If the target application sends a content insertion request to the backend server through a reference application running on the first device, the reference application, upon receiving the request, creates and starts a content transfer task and sends the task identifier or upload progress information of the content transfer task to the target application. The task identifier is used to query the upload progress information of the content transfer task. Based on the task identifier or upload progress information, the target application can continuously monitor the upload progress until the upload is completed or fails.
[0170] S1202. The backend server determines the reference application running on the second device associated with the received object identifier.
[0171] Specifically, the reference application associated with the object identifier running on the second device is determined in, but not limited to, the following ways:
[0172] The backend server retrieves the candidate applications associated with the target object based on the object identifier carried in the content insertion request.
[0173] The backend server selects candidate applications that meet the set conditions based on the running status of each candidate application, and uses them as reference applications running on the second device associated with the object identifier.
[0174] Among them, candidate applications are applications that support content selection functionality. There can be one or more candidate applications. Candidate applications associated with an object identifier refer to candidate applications that use the object identifier for login.
[0175] The setting conditions include, but are not limited to, one or more of the following conditions: the running status is online, which means that the candidate application is running; it is running on a device other than the first device; and the application version number is within the set version number range.
[0176] The running status can be detected in the following ways, but not limited to: Method 1: The candidate application sends a heartbeat request to the backend server every certain period of time (e.g., 30 seconds or 1 minute). The server records the time when each candidate application last received a heartbeat. If a candidate application does not send a heartbeat for more than a set time threshold (e.g., 2 minutes), it is considered offline; otherwise, it is considered online. Method 2: When the target object logs into the candidate application using the object identifier, the backend server generates a unique session number (ID) and stores it on the server side. The backend server returns the session ID to the candidate application and saves it on the candidate application side via a small text file (cookie) or other means. Every time the candidate application makes a request, it will include the session ID. The server determines whether the candidate application is online based on the session ID.
[0177] For example, see Figure 15 As shown, assuming the target application runs on a PC, the candidate applications associated with the object identifier include: enterprise instant messaging application, instant messaging application, and video application. Among these, the enterprise instant messaging application is online and runs on a mobile phone. If the set condition is that it is online and running on a device other than the first device, then obviously, the enterprise instant messaging application meets the set condition. Therefore, the backend server filters out the enterprise instant messaging application running on the mobile phone from the enterprise instant messaging application, instant messaging application, and video application as a reference application.
[0178] In the above implementation, the reference application is determined by using the object identifier and the running status of the application. This can avoid situations where the reference application is offline or does not support content transmission, thereby ensuring the smooth insertion of content and improving the efficiency of content insertion.
[0179] In some implementations, if no candidate application meets the set conditions, the backend server can also push an error message to the target object to indicate that the target object does not support cross-device content insertion.
[0180] S1203, The backend server sends a content selection request to the reference application running on the second device.
[0181] In one possible implementation, the content selection request carries a content presentation instruction, which instructs a reference application running on the second device to present each candidate insertion content. Thus, when the reference application running on the second device receives the content presentation instruction, it presents each candidate insertion content for the target object to select.
[0182] In another possible implementation, see [link / reference] Figure 15 As shown, if the content selection request carries a task identifier for the content transfer task of the target application, and the content transfer task is created after receiving the content insertion request, the backend server can also, upon receiving a task query request from a reference application running on the second device, obtain the task information of the content transfer task based on the task identifier carried in the task query request; and send the task information to the reference application running on the second device. The task information characterizes the task content of the content transfer task. For the target application, the task information of its content transfer task indicates that the content transfer task is used for content transfer within the target application. Correspondingly, when the reference application running on the second device receives the task information, it determines, based on the task information, that when performing content transfer, and presents various candidate insertion contents for the target object to select.
[0183] For example, suppose the task identifier of the content transfer task of the target application is task ID1. When the backend server receives a task query request from the mobile communication application, it obtains the task information of the content transfer task based on the task ID1 carried in the task query request. The task information indicates that the content transfer task is used for image transfer in the table application. The task information is then sent to the mobile communication application. When the mobile communication application receives the task information, it determines the image transfer and presents each candidate insertion content based on the task information.
[0184] With the above implementation, the content selection request only carries a task identifier, and the reference application queries the task content based on the task identifier. This not only simplifies the request structure of the content selection request, thereby reducing the amount of data to be processed and the logical complexity, but also reduces the consumption of network bandwidth. In particular, for mobile devices, it can effectively improve the performance of mobile devices.
[0185] S1204. The reference application running on the second device, in response to a content selection operation triggered by a target object, acquires at least one target insertion content. See details... Figure 10 The process shown will not be repeated here.
[0186] S1204. A reference application running on the second device transmits at least one target inserted content to the target application.
[0187] Specifically, S1204 can be implemented using, but is not limited to, the following two transmission methods:
[0188] Transmission Method 1: See Figure 16A As shown, the reference application running on the second device sends at least one selected target insertion content to the target application running on the first device through the backend server. That is, the reference application running on the second device uploads at least one selected target insertion content to the backend server, and the backend server sends at least one target insertion content to the target application.
[0189] Accordingly, when the backend server receives at least one target insert content from the reference application running on the second device, it sends at least one target insert content to the reference application running on the first device, so that the reference application running on the first device passes at least one target insert content to the target application.
[0190] The target application downloads at least one target insertion content from the backend server. In other words, the target application can download at least one target insertion content from the backend server through a reference application running on the first device.
[0191] For example, the backend server returns at least one target insert content to a reference application running on the first device, which then downloads the at least one target insert content to its local machine. The target application reads the at least one target insert content locally to obtain the at least one target insert content.
[0192] It should be noted that when the backend server sends at least one target insert content, it can also send the resource address corresponding to each of the at least one target insert content, thereby enabling the download of at least one target insert content through the resource address.
[0193] For example, suppose the target content to be inserted includes image 1, image 2, and image 3. The mobile communication application uploads images 1, 2, and 3 to the backend server. The backend server then sends the resource addresses of each of the three images to the PC communication application. The PC communication application downloads images 1, 2, and 3 to its local machine based on their respective resource addresses. The target application then reads images 1, 2, and 3 locally, thereby inserting them.
[0194] Of course, the reference application running on the second device will upload at least one target insertion content to the backend server, and the backend server can also send at least one target insertion content directly to the target application.
[0195] In transmission method 1, using a backend server for content download can ensure the stability of content download and reduce the probability of abnormal situations occurring during content insertion.
[0196] Transmission Method 2: See Figure 16B As shown, the reference application running on the second device can also send at least one selected target insertion content to the target application running on the first device via a designated storage server. Specifically, the reference application running on the second device uploads at least one selected target insertion content to the storage server, and after the content is uploaded, it notifies the target application that the content has been uploaded via a backend server. The content upload notification may carry the storage address of each of the at least one target insertion content in the designated storage server. Correspondingly, when the target application receives the content upload notification, it downloads at least one target insertion content from the storage server based on the obtained storage address of each of the at least one target insertion content. In addition, the content upload notification may also carry the content selection order of the at least one target insertion content to assist the target application in inserting the target insertion content in sequence.
[0197] The specified storage server may be, but is not limited to, the CDN of the target application.
[0198] For example, suppose the target content to be inserted includes Image 1, Image 2, and Image 3. The mobile communication application uploads Image 1, Image 2, and Image 3 to the storage server. After the content is uploaded, the backend server notifies the spreadsheet application that the content has been uploaded. The content upload notification may include the storage addresses of Image 1, Image 2, and Image 3 on the storage server, as well as the content selection order of Image 1, Image 2, and Image 3. Accordingly, when the spreadsheet application receives the content upload notification, it downloads Image 1, Image 2, and Image 3 from the storage server based on the obtained storage addresses of Image 1, Image 2, and Image 3, and inserts Image 1, Image 2, and Image 3 into the data table according to the content selection order.
[0199] In transmission method 2, the target application's CDN is used for content download. The target application can directly insert the CDN link into the file, shortening the content transfer process and thus improving the content insertion efficiency.
[0200] In one possible implementation, the reference application running on the second device can also send an upload result for each target inserted content to the backend server, so that the backend server updates the task status of at least one content transmission task associated with the target inserted content based on the received upload result. The upload result can be either successful or failed.
[0201] S1205. The target application inserts at least one target content into the target file.
[0202] In one possible implementation, the target application receives the resource addresses of at least one target insert content and obtains at least one target insert content based on the resource addresses of the at least one target insert content.
[0203] The resource addresses of at least one target inserted content can be transmitted in the form of a resource address array. The target application receives the resource address array and loops through the resource address array to obtain at least one target inserted content in turn.
[0204] Continuing with the example of inserting an image as the target content, the table application sequentially retrieves the target image. During this process, it can also read related image information, which may include one or more of the image name and size. The retrieved target image can be, but is not limited to, a base64 encoded resource.
[0205] If the image information does not include the image name, the target application can extract the image name from the resource address. The extracted image name will be used as the image name when inserting the target image into the target file later.
[0206] In addition, the table application can also check the size of the target inserted image. The method of checking the image size includes, but is not limited to, comparing the size of the target inserted image with a preset image size range. When the size of the target inserted image exceeds the preset image size range, it is also necessary to compress the target inserted image according to the preset image size range.
[0207] For example, the image size includes the image's width and height. Preset image size ranges include a width threshold and a height threshold. After obtaining the target inserted image size, the table application compares the target inserted image's width with the width threshold. If the width exceeds the width threshold, the target inserted image is compressed in the width direction to adjust its width to within the width threshold. Similarly, the target inserted image's height is compared with a height threshold. If the height exceeds the height threshold, the target inserted image is compressed in the height direction to adjust its height to within the height threshold. To avoid image content distortion, the aspect ratio of the target inserted image can also be maintained during compression.
[0208] If the image information does not include the image size (i.e., retrieving the image size fails), then the target image is rendered, and its size is obtained from the rendered target image. As an example, the `img` tag can be used to render the target image; the `img` tag is used to statically embed images in a HyperText Markup Language (HTML) page. Another example is using a JavaScript `Image` object to read the width and height of the target image. For instance, a new `Image` object is created, and its `src` attribute is set to the base64 encoding of the target image. The `src` attribute is an attribute in HyperText Markup Language (HTML) used to specify the resource location (e.g., resource address or storage address). Then, the `load` event of the `Image` object is monitored. The `load` event is used to obtain the width and height of the `Image` object. The `load` event is triggered after the image has finished loading; therefore, the image size can be obtained after the image has finished loading.
[0209] If an error occurs when reading the image size, such as an unsupported image format, the target application can also use the `img` tag to dynamically create an image element, set the `src` attribute of the created image element to base64, add the created `img` element to the Document Object Model (DOM), and obtain the image size by monitoring the `load` event of the `img` element.
[0210] In one possible implementation, while looping through the resource address array, the target application can also use, but is not limited to, Promise objects to encapsulate the task of inserting images into the file as an asynchronous task. The Promise object is used to represent the final completion (or failure) of an asynchronous operation and its result value. Using Promises can handle asynchronous tasks more clearly and structurally, avoid callback hell, and improve code readability and maintainability. Through the design of asynchronous tasks, the next image must wait for the previous image to be inserted before it can be inserted into the file, thus ensuring that the order of images in the file is consistent with the order in which the target object selects images.
[0211] In one possible implementation, the target application can also upload the target content to the CDN and obtain the CDN link.
[0212] In one possible implementation, each time the target application acquires one of the at least one target inserted content, it sends a download result of that target inserted content to the backend server. This allows the backend server to update the task status of the content delivery task associated with at least one target inserted content based on the received download result. The download result can be either successful or failed.
[0213] For example, the spreadsheet application retrieves Image 1, Image 2, and Image 3 sequentially. After retrieving Image 1, the spreadsheet application sends the download result of Image 1 to the backend server, indicating that the download was successful. After retrieving Image 2, the spreadsheet application sends the download result of Image 2 to the backend server, indicating that the download was successful. After retrieving Image 3, the spreadsheet application sends the download result of Image 3 to the backend server, indicating that the download of Image 1 was successful.
[0214] In the above implementation method, the reporting of download results facilitates the management of the content insertion process by the backend server, which helps to improve the efficiency of content insertion.
[0215] In one possible implementation, the reference application running on the first terminal, upon acquiring one of the at least one target inserted content, sends a download result of that target inserted content to the backend server. This allows the backend server to update the task status of the content transmission task associated with at least one target inserted content based on the received download result. The download result can be either successful or failed.
[0216] For example, a PC-based communication application sequentially obtains images 1, 2, and 3. After obtaining image 1, the PC-based communication application sends the download result of image 1 to the backend server, indicating that the download of image 1 was successful. After obtaining image 2, the PC-based communication application sends the download result of image 2 to the backend server, indicating that the download of image 2 was successful. After obtaining image 3, the PC-based communication application sends the download result of image 3 to the backend server, indicating that the download of image 1 was successful.
[0217] In some implementations, when the backend server receives a content insertion request, it can also create a content transfer task for the target application. During the content insertion process, the task status of the content transfer task is managed, thereby improving content insertion efficiency. The task status of the content transfer task includes, but is not limited to: Waiting, Selecting, Uploading, Uploaded, Downloaded, Cancelled, and Expired.
[0218] The Waiting state indicates that the reference device running on the second device is waiting to present the candidate content to be inserted. When the background server receives the content insertion request, it sets the task status to the Waiting state.
[0219] The Selecting state indicates that the reference device running on the second device has presented each candidate insertion content and is waiting for the target object to be selected. When the reference device running on the second device presents each candidate insertion content, it reports a presentation notification. When the background server receives the presentation notification, it performs a state transition and transitions to the Selecting state.
[0220] The Uploading state indicates that the target object has selected the target content to be inserted and the target content is being uploaded. When the target object triggers the content selection operation, the reference device running on the second device reports a selection notification. When the background server receives the selection notification, it performs a state transition and transitions to the Uploading state.
[0221] The Uploaded state indicates that all target content has been uploaded. After the target content is uploaded, the reference device running on the second device reports the upload result. When all target content has been uploaded, the backend server will handle the state transition and transfer to the Uploaded state.
[0222] The Downloaded state indicates that all target content has been downloaded. In the Uploading or / Uploaded state, the target application or the reference application running on the first device reports the download results to the backend server. When the backend server determines that all target content has been downloaded, it initiates the state transition to the Downloaded state.
[0223] The Cancelled state indicates that the content delivery task has been cancelled. The target object can trigger the task cancellation operation in the target application or the reference application running on the second device. The corresponding application sends a task cancellation request to the background server. When the background server receives the task cancellation request, it performs a state transition and transitions to the Cancelled state.
[0224] An expired status indicates that the content transmission task has exceeded its processing period. The backend server determines whether the content transmission task has expired based on its creation time and preset processing time.
[0225] Specifically, the state transition process is as follows:
[0226] First, when the backend server receives the content insertion request, it creates a content transfer task for the target application and sets the task status of the content transfer task to the Waiting state.
[0227] Next, an operation instruction is received. For each operation instruction received, based on the current task status of the content delivery task and in conjunction with the operation instruction, it is determined whether to update the task status, and the new task status is sent to the target application.
[0228] The operation instructions include, but are not limited to, presented notifications, selected notifications, upload results, download results, and task cancellation requests.
[0229] One possible implementation method is to determine whether to update the task state using the following approach:
[0230] Obtain the preset state transition logic, which includes the transition conditions between two task states in each task state.
[0231] Based on the state transition logic, obtain the transition conditions from the current task state to each task state;
[0232] If, based on the current task status and an operation instruction, one of the obtained transition conditions is determined to be met, then the task status is updated.
[0233] See Figure 17 As shown, this is a schematic diagram of a state transition logic provided in an embodiment of this application. The task states include: waiting, selecting, uploading, uploading completed, receiving completed, and canceled. Since the expired state can be controlled by the backend server, the expired state is not shown in the figure. When a content insertion request is received, the backend server sets the task status of the content transfer task to the Waiting state. If the current task status is Waiting, and the backend server receives a presentation notification indicating that all candidate insertion contents have been presented, the task status transitions from Waiting to Selecting. If the current task status is Selecting, and the target object triggers a content selection operation, and the backend server receives a selection notification, it determines that content uploading has begun, and the task status transitions from Selecting to Uploading. If the current task status is Uploading, and the backend server determines that all target insertion contents have been uploaded based on the received upload results, the task status transitions from Uploading to Uploaded. If the current task status is Uploaded, and the backend server determines that all target insertion contents have been downloaded based on the received download results, the task status transitions from Uploaded to Downloaded. If the current task status is Waiting, Selecting, Uploading, or Uploaded, and the backend server receives a task cancellation request, the task status transitions from the current task status to Cancelled.
[0234] When a new task status is sent to the target application, it can be done by the backend server actively sending the new task status to the target application after the task status has been updated, or it can be returned to the target application when the backend server receives a status query request from the target application, but it is not limited to these two methods.
[0235] Correspondingly, the target application can also receive the task status of the content transmission task from the backend server, and then update the locally stored task status according to the received task status, as well as present the status prompt information associated with the received task status to the target object.
[0236] The status information is used to represent the associated task status. For example, the status information associated with the "Waiting" status indicates waiting to be selected; the status information associated with the "Selecting" status indicates that the image is being received; the status information associated with the "Uploading" and "Upload Completed" status indicates that the image is being received; the status information associated with the "Received Completed" status indicates that the image was received successfully or failed; and the status information associated with the "Cancelled" status indicates that the image transmission has been cancelled.
[0237] See Figure 18 As shown, this is a schematic diagram of the task state transition process on the target application side provided in an embodiment of this application. If the locally stored task state is Waiting, it may transition to Waiting, Selecting, Uploading, Uploaded, expired, or canceled states depending on the received task state. It should be noted that transitioning from Waiting to Waiting can also be understood as keeping the current task state unchanged. If the locally stored task state is Selecting, it may transition to Selecting, Uploading, Uploaded, expired, or canceled states depending on the received task state. If the locally stored task state is Uploading, it may transition to Uploading, Uploaded, expired, or canceled states depending on the received task state. If the locally stored task state is Uploaded, it may transition to Uploaded or Downloaded states depending on the received task state. If the locally stored task state is Downloaded, it may transition to Downloaded states depending on the received task state.
[0238] In the above implementation method, by displaying status prompts for different task states to the target object, the target object can understand the current task progress, reduce anxiety while waiting, and thus improve the user experience.
[0239] See below Figure 19A , Figure 19B , Figure 19C and Figure 19D The task state transition process of the content delivery task in the target application is described below:
[0240] S1901, The target object triggers a content insertion operation.
[0241] S1902, Awaiting upload.
[0242] See Figure 19AAs shown, when the target object triggers a content insertion operation, and the target application receives the polling interval returned by the backend server, the target application sets the task status in local storage to the Waiting state. See the left-hand side for the status message associated with the Waiting state.
[0243] During the waiting process, the target application can periodically check the waiting time locally, and if the waiting time exceeds a certain period, it will prompt the user to select an image to upload on the mobile phone. The detection cycle can be set according to actual needs.
[0244] S1903, Obtain the new task status.
[0245] The target application continuously queries the CGI for new task statuses at polling intervals. Alternatively, the background server can proactively push new task statuses to the target application when they are updated.
[0246] S1904. Determine if the task status has changed. If the task status changes to "selected", execute S1905. If the task status changes to "cancelled", close the window. If the task status remains unchanged, continue waiting for the upload.
[0247] The cancelled status can be due to cancellation on the mobile device or other abnormal statuses. Since no content transmission has occurred at this time, the target application can directly close the notification window without displaying the status notification associated with the cancelled status.
[0248] S1905, awaiting upload.
[0249] See Figure 19B As shown, the task status has changed to "Selecting," indicating that the target object has begun selecting content to insert. See the left-hand side for the associated status message for the "Selecting" state.
[0250] During the waiting process, the target application can periodically check the waiting time locally, and if the waiting time exceeds a certain period, it will prompt the user to select an image to upload on the mobile phone. The detection cycle can be set according to actual needs.
[0251] S1906, Obtain the new task status.
[0252] The target application continuously queries the CGI for new task statuses at polling intervals. Alternatively, the background server can proactively push new task statuses to the target application when they are updated.
[0253] S1907. Determine if the task status has changed. If the task status changes to "Uploading", then execute S1908. If the task status changes to "Cancelled", then close the window. If the task status remains unchanged, then continue waiting for the upload to complete.
[0254] The cancelled status can be due to cancellation on the mobile device or other abnormal statuses. Since no content transmission has occurred at this time, the target application can directly close the notification window without displaying the status notification associated with the cancelled status.
[0255] S1908, Transmitting.
[0256] See Figure 19C As shown, during the transmission process, the target object can trigger a cancellation operation in the target application to end the content transmission process. See the left side for the status prompts associated with the upload status.
[0257] S1909, Obtain the new task status.
[0258] The target application continuously queries the CGI for new task statuses at polling intervals. Alternatively, the background server can proactively push new task statuses to the target application when they are updated.
[0259] S1910. Determine if the task status has changed. If the task status has not changed, i.e., it is still in the uploading state, then execute S1911 if there is new content to upload, and execute S1908 if there is no new content to upload. If the task status changes to the cancelled state, then cancel the transmission.
[0260] The existence of new content upload means that if there are multiple target inserted content that need to be uploaded, then when the first target inserted content is uploaded, the upload of the second target inserted content can be regarded as a new content upload. Similarly, when the target inserted content that has not been uploaded is uploaded, it can be regarded as a new content upload.
[0261] The "cancelled" status can be due to cancellation on the mobile app or other abnormal statuses. See the right side for associated status messages for the "cancelled" status.
[0262] S1911. Determine whether all the target content has been uploaded. If not, execute S1912; otherwise, execute S1908.
[0263] S1912, Waiting for the download to complete.
[0264] See Figure 19D As shown, after all the target content has been uploaded, the task status changes to "upload complete". See the left side for the associated status message.
[0265] S1913. Determine if all the target content to be inserted has been downloaded. If yes, execute S1904; otherwise, execute S1912.
[0266] S1914. Determine whether all the target content has been successfully downloaded. If yes, execute S1915. Otherwise, confirm that the reception failed and enter the downloaded state. See the right side for the status prompt information associated with the downloaded state.
[0267] S1915. Insert the target content into the target file.
[0268] In some implementations, if the target application sends a content insertion request to the backend server through a reference application running on the first device, the task state transition process on the target application side can also be executed by the reference application running on the first device. The specific process is the same and will not be described in detail here.
[0269] The following section uses the scenario of inserting an image into a table to illustrate the processing procedure on the backend server side.
[0270] Initiating the remote image transfer process: The target object triggers a content insertion operation on the target file in the target application. The spreadsheet application calls CGI through the PC-side communication application to request the backend server to create a content transfer task. The content transfer task contains the object identifier of the target object. The backend server checks whether the mobile communication application associated with the identifier is online. If it is, it sends a content selection request to the mobile communication application; otherwise, it displays an error message.
[0271] The process of opening the image selection interface is as follows: When the mobile communication application receives a content selection request, it calls the CGI according to the task identifier of the content transmission task carried in the content selection request to check whether the content selection interface can be displayed. If it can, it calls the background CGI to set the task status to the selection state and then displays the content selection interface. The content selection interface contains various candidate images to be inserted for the target object to select.
[0272] Upload process: The backend server obtains the current task status associated with the task identifier, and determines whether the current task status should transition to the uploading state based on the status transition logic and the current task status. If the transition is possible, the total number of images, thumbnails, and total size of the target images to be inserted are saved. The transition to the uploading state is only possible when the current task status is in the waiting state. In addition, during the status transition, the device identifier of the mobile communication application can be verified to ensure that it is the same as the stored device identifier of the mobile communication application to avoid status transition errors.
[0273] Status and data query process: Whenever the status or data changes, the backend server pushes a notification to the PC communication application that there is an update, and the PC communication application pulls the data via CGI.
[0274] Download process: The PC-based communication application inserts the target image and downloads it to the local machine. Subsequent operations such as sending messages require re-uploading the image.
[0275] Cancellation process: The backend sets the task status to canceled and records information such as the device identifier and cancellation time.
[0276] Based on the same inventive concept, embodiments of this application provide a first device. For example... Figure 20 As shown, this is a structural schematic diagram of the first device 2000, in which a target application runs. The first device includes:
[0277] The file editing unit 2001 is used to present the content editing interface of the target file in response to a file editing operation triggered by a target object on a target file in the target application.
[0278] The information prompting unit 2002 is used to present a prompting message in response to the content insertion operation triggered by the target object in the content editing interface. The prompting message is used to prompt the target object to select at least one target to insert content on the second device.
[0279] The content insertion unit 2003 is used to present at least one target insertion content in the content editing interface, each target insertion content being transmitted to the target application through the reference application running on the second device, wherein the reference application and the target application are associated applications.
[0280] In one possible implementation, the information prompting unit 2002 is also used for:
[0281] Presenting reception progress information for the at least one target inserted content, the reception progress information being used to characterize: the number of target inserted content that the target application has received among the at least one target inserted content.
[0282] In one possible implementation, when the at least one target inserted content is presented in the content editing interface, the content insertion unit 2003 is specifically used for:
[0283] In the content editing interface, the at least one target inserted content is presented sequentially according to the content selection order of the at least one target inserted content.
[0284] In one possible implementation, the reference application and the target application share a backend server, and the information prompting unit 2002 is further used for:
[0285] When the content insertion operation is triggered, the background server sends a content selection request to the reference application running on the second device, so that the reference application running on the second device presents each candidate insertion content and returns at least one target insertion content selected from each candidate insertion content.
[0286] Obtain the at least one target insert content returned by the reference application running on the second device.
[0287] In one possible implementation, when obtaining the at least one target insertion content returned by the reference application running on the second device, the information prompting unit 2002 is specifically used for:
[0288] The at least one target insertion content is downloaded from the backend server through a reference application running on the first device; or,
[0289] The backend server obtains the storage address of each of the at least one target insertion content in a designated storage server, and downloads the at least one target insertion content from the storage server based on the obtained at least one storage address.
[0290] In one possible implementation, when obtaining the at least one target insertion content returned by the reference application running on the second device, the information prompting unit 2002 is specifically used for:
[0291] For each target inserted content acquired, the download result of the target inserted content is sent to the backend server, so that the backend server updates the task status of the content transmission task of the target application based on the received download result.
[0292] In one possible implementation, the reference application and the target application share a backend server, and the information prompting unit 2002 is further used for:
[0293] Receive the task status of the content transmission task of the target application from the backend server;
[0294] Based on the received task status, update the locally stored task status and present the status prompt information associated with the received task status to the target object.
[0295] In one possible implementation, when a prompt message is displayed in response to a content insertion operation triggered by the target object in the content editing interface, the information prompt unit 2002 is specifically used for:
[0296] In response to the triggered content insertion operation, obtain the remaining capacity information of the cloud service provided by the target application purchased by the target object;
[0297] When the remaining capacity information indicates that the cloud service has sufficient capacity, the prompt message is displayed. In one possible implementation, the content type of the at least one target inserted content is an image.
[0298] Based on the same inventive concept, embodiments of this application provide a backend server. For example... Figure 21 As shown, this is a structural diagram of the backend server 2100, which may include:
[0299] The processing unit 2101 is configured to, when receiving a content insertion request from a target application running on a first device, determine a reference application running on a second device associated with the object identifier carried in the content insertion request; wherein the content insertion request is sent by the target object when triggering a content insertion operation for a target file in the target application, and when the content insertion operation is triggered, the target application displays a prompt message, which prompts the target object to select at least one target content to be inserted on the second device;
[0300] The transmission unit 2102 is configured to send a content selection request to the reference application running on the second device, so that the reference application running on the second device transmits at least one target insertion content to the target application, the at least one target insertion content being used to insert into the target file.
[0301] In one possible implementation, when obtaining the reference application associated with the object identifier running on the second device based on the object identifier of the target object carried in the content insertion request, the processing unit 2101 is specifically used for:
[0302] Based on the object identifier of the target object carried in the content insertion request, obtain each candidate application associated with the object identifier;
[0303] Based on the running status of each candidate application, candidate applications that are online and running on devices other than the first device are selected from among the candidate applications and used as reference applications associated with the object identifier running on the second device.
[0304] In one possible implementation, if the content selection request carries a task identifier for the content transmission task of the target application, the content transmission task is created after receiving the content insertion request;
[0305] After sending a content selection request to the reference application running on the second device, the processing unit 2101 is further configured to:
[0306] When a task query request is received from the reference application running on the second device, the task information of the content transmission task is obtained according to the task identifier carried in the task query request.
[0307] The task information is sent to the reference application running on the second device, so that the reference application running on the second device can present each candidate insertion content according to the task information.
[0308] In one possible implementation, the processing unit 2101 is further configured to:
[0309] When the content insertion request is received, a content delivery task for the target application is created, and the task status of the content delivery task is set to a waiting state.
[0310] Upon receiving an operation instruction, and based on the current task status of the content transmission task, and in conjunction with the operation instruction, determine when to update the task status, and send the new task status to the target application.
[0311] In one possible implementation, when determining to update the task status based on the current task status of the content transmission task and in conjunction with the operation instruction, the processing unit 2101 is specifically used for:
[0312] Obtain the preset state transition logic, which includes: the transition conditions between two task states in each task state;
[0313] Based on the state transition logic, the transition conditions from the current task state to each of the task states are obtained;
[0314] If, based on the current task status and the operation instruction, one of the obtained transition conditions is determined to be met, then the task status is determined to be updated.
[0315] In one possible implementation, the processing unit 2101 is further configured to:
[0316] When the at least one target insert content is received from the reference application running on the second device, the at least one target insert content is sent to the reference application running on the first device, so that the reference application running on the first device passes the at least one target insert content to the target application.
[0317] Based on the same inventive concept, embodiments of this application provide a second device. For example... Figure 22 As shown, this is a structural schematic diagram of the second device 2200. A reference application operates within the second device. The second device includes:
[0318] The content presentation unit 2201 is used to present each candidate insertion content when a content selection request is received; the content selection request is sent by the target object after triggering a content insertion operation on a target file running on the first device; when the content insertion operation is triggered, the target application presents a prompt message, which is used to prompt the target object to select at least one target insertion content on the second device.
[0319] The content transmission unit 2202 is used to send at least one selected target insertion content to a target application running on the first device when a selection operation is triggered for each candidate insertion content, wherein the reference application and the target application are associated applications.
[0320] For ease of description, the above sections are divided into modules (or units) according to their functions and described separately. Of course, in implementing this application, the functions of each module (or unit) can be implemented in one or more software or hardware components.
[0321] Regarding the apparatus in the above embodiments, the specific manner in which each unit executes the request has been described in detail in the embodiments related to the method, and will not be elaborated here.
[0322] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."
[0323] Based on the same inventive concept, embodiments of this application also provide an electronic device. In one embodiment, the electronic device can be a server or a terminal device. See also... Figure 23 As shown, it is a schematic diagram of the structure of a possible electronic device provided in an embodiment of this application. Figure 23 In the electronic device 2300, there are: processor 2310 and memory 2320.
[0324] The memory 2320 stores a computer program that can be executed by the processor 2310. The processor 2310 can execute the steps of the above-mentioned content insertion method by executing the instructions stored in the memory 2320.
[0325] Memory 2320 may be volatile memory, such as random-access memory (RAM); memory 2320 may also be non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 2320 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 2320 may also be a combination of the above-mentioned memories.
[0326] The processor 2310 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 2310 implements the above-described insertion method when executing a computer program stored in the memory 2320.
[0327] In some embodiments, the processor 2310 and the memory 2320 may be implemented on the same chip, while in other embodiments they may be implemented on separate chips.
[0328] This application embodiment does not limit the specific connection medium between the processor 2310 and the memory 2320. This application embodiment takes the connection between the processor 2310 and the memory 2320 via a bus as an example. Figure 23 The diagram uses thick lines to describe the connections between other components; these are merely illustrative and not intended to be limiting. Buses can be categorized as address buses, data buses, control buses, etc. For ease of description, Figure 23 It is described using only a thick line, but does not indicate that there is only one bus or one type of bus.
[0329] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium including a computer program. When the computer program is run on an electronic device, it causes the electronic device to perform the steps of the aforementioned content insertion method. In some possible implementations, various aspects of the content insertion method provided in this application can also be implemented as a program product including a computer program. When the program product is run on an electronic device, the computer program causes the electronic device to perform the steps of the aforementioned content insertion method. For example, the electronic device can perform actions such as... Figure 3 , Figure 10 or Figure 12 The steps are shown in the figure.
[0330] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0331] The program product of the embodiments of this application may be a CD-ROM and include a computer program, and may run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a computer program that may be used by or in conjunction with a command execution system, apparatus, or device.
[0332] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a readable computer program. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a computer program for use by or in conjunction with a command execution system, apparatus, or device.
[0333] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0334] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A content insertion method, characterized in that, Applied to target applications running on the first device, including: In response to a file editing operation triggered by a target object on a target file in the target application, the content editing interface of the target file is presented. In response to a content insertion operation triggered by the target object in the content editing interface, a prompt message is displayed, which prompts the target object to select at least one target to insert content on the second device. In the content editing interface, at least one target inserted content is presented. Each target inserted content is transmitted to the target application through the reference application running on the second device. The reference application and the target application are associated applications.
2. The method as described in claim 1, characterized in that, After the target object responds to the content insertion operation triggered in the content editing interface and presents a prompt message, the process before presenting the target inserted content in the content editing interface further includes: Presenting reception progress information for the at least one target inserted content, the reception progress information being used to characterize: the number of target inserted content that the target application has received among the at least one target inserted content.
3. The method as described in claim 1, characterized in that, The presentation of the at least one target inserted content in the content editing interface includes: In the content editing interface, the at least one target inserted content is presented sequentially according to the content selection order of the at least one target inserted content.
4. The method as described in claim 1, 2, or 3, characterized in that, The reference application and the target application share a backend server, and the method further includes: When the content insertion operation is triggered, the background server sends a content selection request to the reference application running on the second device, so that the reference application running on the second device presents each candidate insertion content and returns at least one target insertion content selected from each candidate insertion content. Obtain the at least one target insertion content returned by the reference application running on the second device.
5. The method as described in claim 4, characterized in that, The step of obtaining the at least one target insertion content returned by the reference application running on the second device includes: The at least one target insertion content is downloaded from the backend server via a reference application running on the first device; or, The backend server obtains the storage address of each of the at least one target insertion content in a designated storage server, and downloads the at least one target insertion content from the storage server based on the obtained at least one storage address.
6. The method as described in claim 4, characterized in that, Obtaining the at least one target insert content returned by the reference application running on the second device includes: For each target inserted content acquired, the download result of the target inserted content is sent to the backend server, so that the backend server updates the task status of the content transmission task of the target application based on the received download result.
7. The method as described in claim 1, 2, or 3, characterized in that, The reference application and the target application share a backend server. Before presenting the at least one target inserted content in the content editing interface, the interface further includes: Receive the task status of the content transmission task of the target application from the backend server; Based on the received task status, update the locally stored task status and present the status prompt information associated with the received task status to the target object.
8. The method as described in claim 1, 2, or 3, characterized in that, In response to a content insertion operation triggered by the target object in the content editing interface, a prompt message is displayed, including: In response to the triggered content insertion operation, obtain the remaining capacity information of the cloud service provided by the target application purchased by the target object; When the remaining capacity information indicates that the cloud service has sufficient capacity, the prompt message is displayed.
9. The method as described in claim 1, 2, or 3, characterized in that, The content type of the at least one target inserted content is an image.
10. A file processing method, characterized in that, Applied to backend servers, including: When a content insertion request is received from a target application running on the first device, the reference application running on the second device associated with the object identifier of the target object carried in the content insertion request is determined; wherein, the content insertion request is sent by the target object when triggering a content insertion operation for a target file in the target application, and when the content insertion operation is triggered, the target application displays a prompt message, which is used to prompt the target object to select at least one target content to be inserted on the second device; A content selection request is sent to the reference application running on the second device, so that the reference application running on the second device transmits at least one target insertion content to the target application, the at least one target insertion content being used to insert into the target file.
11. The method as described in claim 10, characterized in that, The step of obtaining the reference application associated with the object identifier running on the second device based on the object identifier of the target object carried in the content insertion request includes: Based on the object identifier of the target object carried in the content insertion request, obtain each candidate application associated with the object identifier; Based on the running status of each candidate application, candidate applications that are online and running on devices other than the first device are selected from among the candidate applications and used as reference applications associated with the object identifier running on the second device.
12. The method as described in claim 10 or 11, characterized in that, If the content selection request carries a task identifier for the content delivery task of the target application, the content delivery task is created after receiving the content insertion request; After sending the content selection request to the reference application running on the second device, the method further includes: When a task query request is received from the reference application running on the second device, the task information of the content transmission task is obtained according to the task identifier carried in the task query request. The task information is sent to the reference application running on the second device, so that the reference application running on the second device can present each candidate insertion content according to the task information.
13. The method as described in claim 10 or 11, characterized in that, Also includes: When the content insertion request is received, a content delivery task for the target application is created, and the task status of the content delivery task is set to a waiting state. Upon receiving an operation instruction, and based on the current task status of the content transmission task, and in conjunction with the operation instruction, determine when to update the task status, and send the new task status to the target application.
14. The method as described in claim 13, characterized in that, The step of determining to update the task status based on the current task status of the content transmission task and in conjunction with the operation instruction includes: Obtain the preset state transition logic, which includes: the transition conditions between two task states in each task state; Based on the state transition logic, the transition conditions from the current task state to each of the task states are obtained; If, based on the current task status and the operation instruction, one of the obtained transition conditions is determined to be met, then the task status is determined to be updated.
15. The method as described in claim 10 or 11, characterized in that, After sending the content selection request to the reference application running on the second device, the method further includes: When the at least one target insert content is received from the reference application running on the second device, the at least one target insert content is sent to the reference application running on the first device, so that the reference application running on the first device passes the at least one target insert content to the target application.
16. A content insertion method, characterized in that, Reference applications used in the second device include: When a content selection request is received, candidate content to be inserted is presented. The content selection request is sent by the target object after triggering a content insertion operation on a target file running on the first device. When the content insertion operation is triggered, a prompt message is presented in the target application. The prompt message is used to prompt the target object to select at least one target content to be inserted on the second device. When a selection operation is triggered for each candidate insertion content, at least one selected target insertion content is sent to the target application, and the reference application and the target application are associated applications.
17. A first device, characterized in that, The first device runs a target application, and the first device includes: The file editing unit is used to respond to a file editing operation triggered by a target object on a target file in the target application and to present the content editing interface of the target file. An information prompting unit is used to present a prompting message in response to a content insertion operation triggered by the target object in the content editing interface. The prompting message is used to prompt the target object to select at least one target to insert content on the second device. A content insertion unit is used to present at least one target insertion content in the content editing interface, wherein each target insertion content is transmitted to the target application through the reference application running on the second device, and the reference application and the target application are associated applications.
18. A backend server, characterized in that, include: The processing unit is configured to, when receiving a content insertion request from a target application running on a first device, determine, based on the object identifier of the target object carried in the content insertion request, a reference application running on a second device associated with the object identifier; wherein, the content insertion request is sent by the target object when triggering a content insertion operation for a target file in the target application, and when the content insertion operation is triggered, the target application displays a prompt message, which prompts the target object to select at least one target content to be inserted on the second device; A transmission unit is configured to send a content selection request to the reference application running on the second device, so that the reference application running on the second device transmits at least one target insertion content to the target application, the at least one target insertion content being used to insert into the target file.
19. A second device, characterized in that, The second device runs a reference application, and the second device includes: The content presentation unit is used to present each candidate content to be inserted when a content selection request is received; the content selection request is sent by the target object after triggering a content insertion operation on a target file running on the first device; when the content insertion operation is triggered, the target application presents a prompt message, which is used to prompt the target object to select at least one target content to be inserted on the second device. The content transmission unit is used to send at least one selected target insertion content to a target application running on a first device when a selection operation is triggered for each candidate insertion content, wherein the reference application and the target application are associated applications.
20. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of any of the methods of claims 1 to 9, the steps of any of the methods of claims 10 to 15, or the steps of the method of claim 16.
21. A computer-readable storage medium, characterized in that, It includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps of any of the methods of claims 1 to 9, any of the steps of the methods of claims 10 to 15, or the steps of the method of claim 16.
22. A computer program product, characterized in that, It includes a computer program stored in a computer-readable storage medium, wherein a processor of an electronic device reads from and executes the computer program, causing the electronic device to perform the steps of any of the methods of claims 1 to 9, any of the steps of the methods of claims 10 to 15, or the steps of the method of claim 16.