Material sharing method, electronic equipment and computer readable storage medium
By providing material sharing methods in the operating system, users can automatically share materials and their order to match applications by selecting materials and performing sharing operations, solving the problem of inconvenient material sharing operation in the existing technology, and achieving convenience and Flexible material sharing.
Patent Information
- Application Number
- CN202311052752.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2025-02-21
AI Technical Summary
In the prior art, material sharing is inconvenient, and users need to transfer files from one application to another through copy and paste, which is cumbersome.
Provides a material sharing method. Through the operating system, the user can select the material to be shared and perform the sharing operation. The system will automatically recommend the matching application and share the material and its order to the specified application.
Improves the portability and flexibility of material sharing, and users can simply and intuitively share materials to the designated application without copying and pasting, making the operation more convenient.
Smart Images

Figure CN119493676A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a material sharing method, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the rapid development of Internet technology, the use scenarios of personal computers are becoming more and more diverse, and people are using personal computers in more and more interactive ways. In daily work and life, there are often scenarios where files need to be copied across applications. For example, when a user wants to copy multiple files stored on a personal computer to other applications for use, a common way is to send multiple documents or pictures stored on the personal computer to others through chat software.
[0003] A common transmission method is that the user can copy the document to be sent, then open the chat interface of the chat software, paste it in the chat interface, and finally click the send button to transfer the material to the selected contact in the chat application.
[0004] However, transferring materials by conventional copy-and-paste method causes inconvenience to users. Summary of the invention
[0005] The present application provides a material sharing method, device, chip, electronic device, computer-readable storage medium and computer program product, which can improve the portability of material sharing.
[0006] In a first aspect, a material sharing method is provided, the method is applied to An operating system, the method includes: displaying a first interface, the first interface including a first thumbnail of a first material and a second thumbnail of a second material; when the first thumbnail and the second thumbnail are selected, receiving a first sharing operation input by a user, the first sharing operation is an operation of sharing the first material and the second material; in response to the first sharing operation, displaying a second interface, the second interface including a first application list, wherein the applications in the first application list all match the material types of the first material and the second material; receiving a first selection operation input by the user, the first selection operation is an operation of selecting a first application to be shared from the first application list; in response to the first selection operation, sharing the first material, the second material and the first association relationship to the first application to be shared, the first association relationship including the order of the first material and the second material.
[0007] The first interface may be a display interface of an application for collecting various materials. If the materials are collected in a note application (APP), the first interface may be the interface of the note APP; if the materials are collected in a global collection service, the first interface may be a panel of the global collection service; if the desktop of the terminal device supports collecting materials, the first interface may also be the desktop.
[0008] Specifically, the terminal device can filter and recommend applications that match the material type according to the material type selected by the user, and the terminal device can display the recommended applications in a list. When the user selects the first material and the second material, that is, when the user clicks the first thumbnail and the second thumbnail to select them, if the user performs a first sharing operation, such as clicking a sharing control, the terminal device can display a list of applications that match the material types of the first material and the second material, which is called a first application list.
[0009] When sharing materials, this method can recommend matching applications for the material type of the material to be shared, thereby improving the matching degree between the recommended applications and the material to be shared, and making the types of applications that can receive the shared materials more abundant and flexible, thereby improving the flexibility of material sharing and expanding the application scenarios. At the same time, by performing simple and intuitive sharing and selection operations, the selected material can be shared to the specified application, without the need to transfer the material through the conventional copy and paste method, and the operation is more portable.
[0010] When the user selects the first thumbnail and the second thumbnail, there will be a selection order, which is the first association relationship between the first material and the second material. For example, if the user clicks the first thumbnail first and then clicks the second thumbnail, the first association relationship is the order that the first material is in front of the second material.
[0011] When the user selects the first material and the second material, the terminal device can know the order of the first material and the second material. When the terminal device displays the second interface, the user can perform a first selection operation on the first application list in the second interface to select an application to share the material, and the application is recorded as the application to be shared. In response to the user's first selection operation of selecting the application to be shared, the terminal device shares the first material, the second material and the first association relationship to the application to be shared.
[0012] Optionally, the order between materials can be sorted by numbering the materials, for example, by generating a serial number corresponding to each material. For example, natural numbers from small to large can be assigned as serial numbers in the order in which users click on the materials, or Roman numerals from small to large can be assigned as serial numbers in the order in which users click on the materials. This application does not limit the expression method of the order between materials.
[0013] This method allows the terminal device to share not only the material itself, but also the order of the materials to the application to be shared, making the shared information more comprehensive. Usually, the order of the materials can represent the user's sharing intention. For example, the order in which the user clicks on the materials can represent the order in which the user wants to display the materials. Based on this, the application to be shared can present the shared materials in order, which meets the user's sharing intention and improves the user experience.
[0014] In some possible implementations, the first interface also includes a third thumbnail of the third material, and the material type of the third material is different from that of the second material. The method also includes: when the first thumbnail and the third thumbnail are selected, receiving a second sharing operation input by the user, and the second sharing operation is an operation of sharing the first material and the third material; in response to the second sharing operation, displaying a third interface, and the third interface includes a second application list, and the applications in the second application list all match the material types of the first material and the third material.
[0015] If the user selects other types of materials, for example, the third material and the first material are selected, which are different from the material type of the second material, that is, when the user clicks the first thumbnail and the third thumbnail to select them and performs the second sharing operation, the applications in the second application list displayed by the terminal device match the material types of the first material and the third material. It can be understood that the applications in the second application list are different from the applications in the first application list. Compared with the first application list, the second application list may increase the applications that match the material type of the third material, and reduce the applications that match the material type of the second material but do not match the material type of the third material.
[0016] When sharing materials, this method can recommend matching applications for materials of different types. Compared with the default, fixed-type application method of the traditional recommendation system, the matching degree between the recommended applications and the materials to be shared is improved, and the types of applications that can receive shared materials are richer and more flexible, thereby improving the flexibility of material sharing and covering a wider range of application scenarios.
[0017] In some possible implementations, the method also includes: when the first thumbnail is selected, receiving a third sharing operation input by the user, the third sharing operation is an operation of sharing the first material; in response to the third sharing operation, displaying a fourth interface, the fourth interface includes a third application list, and the applications in the third application list all match the material type of the first material.
[0018] If the user selects a material, a third sharing operation may be performed, and the terminal device may display a third application list based on the material type of the material, recommending application programs that match the material type of the selected first material.
[0019] In some possible implementations, the applications in the first application list all match the material types of the first material and the second material, including: the applications in the first application list all support the material type of the first material and / or the material type of the second material; the applications in the second application list all match the material types of the first material and the third material, including: the applications in the second application list all support the material type of the first material and / or the material type of the third material; the applications in the third application list all match the material type of the first material, including: the applications in the third application list all support the material type of the first material.
[0020] It should be noted that the terminal device can recommend matching applications based on the material type of the material to be shared. If there is only one material to be shared, the application recommended by the terminal device is an application that supports the material. If there are multiple materials to be shared, the application recommended by the terminal device may include an application that supports only the material type of one of the materials, an application that supports the material type of some of the materials, or an application that supports the material type of all the materials.
[0021] The application supporting a material type mentioned in this application means that the application can parse or normally display the material of the material type. For example, when the material type is a picture, the application supporting the material type is an application that can parse and normally display the picture. When the material type is text, the application supporting the material type is an application that can parse and normally display the text content. Correspondingly, if the application does not support a material type, it means that the application cannot correctly parse or normally display the material of the material type.
[0022] For example, when the first material and the second material are to be shared, the applications in the first application list may include applications that match the material type of the first material but do not match the material type of the second material, applications that match the material type of the second material but do not match the material type of the first material, and applications that match the material types of both the first material and the second material. When the first material and the third material are to be shared, the applications in the second application list may include applications that match the material type of the first material but do not match the material type of the third material, applications that match the material type of the third material but do not match the material type of the first material, and applications that match the material types of both the first material and the third material.
[0023] Taking sharing the first material and the second material as an example, the terminal device can filter out a set of applications that match the material type of the first material from the installed applications, recorded as the first application set; the terminal device can also filter out a set of applications of the material type of the second material from the installed applications, recorded as the second application set. Optionally, the terminal device can use the intersection of the first application set and the second application set as the final selected application, which can ensure that both the first material and the second material can be successfully shared and improve the success rate of complete material sharing. Optionally, the terminal device can also use the union of the first application set and the second application set as the final selected application, which can expand the types and number of applications that can receive materials and improve the flexibility of material sharing.
[0024] In some possible implementations, in response to a first selection operation, sharing the first material, the second material, and the first association relationship to a first application to be shared includes: in response to the first selection operation, determining whether the first application to be shared has been installed; if so, sharing the first material, the second material, and the first association relationship to the first application to be shared according to registry information of the first application to be shared.
[0025] In some possible implementations, the method further includes: if the first application to be shared is not installed, prompting to install or upgrade the first application to be shared.
[0026] Taking sharing the first material and the second material as an example, the terminal device can first query whether the first application to be shared has been successfully installed when the user performs the first selection operation. If so, the first material, the second material and the first association relationship can be shared to the first application to be shared according to the registry information of the first application to be shared. Among them, the registry information can characterize the material types supported by the first application to be shared. If the first application to be shared is not successfully installed on the terminal device, it means that the first application to be shared has not been installed on the terminal device, and the user can be prompted to install the first application to be shared. Optionally, the terminal device can pop up a prompt window on the interface or display a link to the installation of the first application to be shared. If the first application to be shared is not successfully installed on the terminal device, it may also be that the version of the first application to be shared installed on the terminal device does not support the material types of the first material and the second material, then the terminal device can prompt the user to upgrade the first application to be shared on the interface to support the material types of the first material and the second material.
[0027] When the user shares other materials, the method of sharing the first material and the second material can also be referred to for sharing and prompting, which will not be repeated here.
[0028] In some possible implementations, the registry information includes the material type of the material that matches the first application to be shared, and based on the registry information of the first application to be shared, the first material, the second material, and the first association relationship are shared to the first application to be shared, including: determining whether the first application to be shared matches the material type of the first material and / or the second material based on the registry information; if so, sharing the first material, the second material, and the first association relationship to the first application to be shared.
[0029] The application registry information may include the types of materials supported by the application. Based on this, the terminal device can determine whether the application supports the currently shared material based on the registry information. If it does, the subsequent sharing operation can be performed; if it does not, the corresponding prompt information can also be displayed to prompt the user so that the user can perform the correct sharing operation later, and the user can also be prompted to upgrade the application to a version that supports the material to be shared.
[0030] In some possible implementations, sharing the first material, the second material, and the first association relationship to a first application to be shared includes: generating export data according to a preset format for the first material, the second material, and the first association relationship, the export data including: serial numbers of the first material and the second material, material types of the first material and the second material, text content or file paths of the first material and the second material; sharing the exported data to the first application to be shared.
[0031] The above preset format is a predefined data format, which can be a unified format and regularized definition for the transmission content between applications, so as to ensure the consistency of the data format, thereby achieving complete data transmission and avoiding data loss. Based on this, during the material sharing process, the application receiving the material can parse the shared material and the association relationship according to the preset format to ensure the integrity of the data transmission.
[0032] In the exported data, the sequence numbers of the first material and the second material can represent the order of the two materials. The material type represents the type of the material itself, and the material type can be, for example, a picture, text, document, video, audio, etc. If the material type of the material is a picture, document, video, audio, or text with a large amount of data, the content of the material can be represented by a file path, and the file path indicates the location where the material is stored. If the material type of the material is a text with a small amount of data, the content of the material can be directly represented by the text content.
[0033] The terminal device generates export data according to a preset format for the first material, the second material, and the first association, and shares the export data with the first application to be shared, so that the first application to be shared can fully know the first material, the second material, and the first association, and obtain more comprehensive information about the material. The above-mentioned export data can fully characterize the content of the first material and the second material and the order between the two, so that after the first application to be shared receives the export data, it can display the materials in the order of the two, which meets the user's sharing intention and improves the user experience.
[0034] Optionally, the first material, the second material and the third material may be a single material or a composite material. The first material, the second material and the third material may also be partially a single material and partially a composite material. A composite material refers to a combined material formed by multiple single materials. A composite material can usually only display one thumbnail, but may contain multiple single materials of the same or different material types. The single material involved in this application is a concept relative to the composite material.
[0035] In some possible implementations, the first material is a composite material, which is a material formed by combining multiple single materials. The method also includes: obtaining a second association relationship between the multiple single materials; receiving a second selection operation input by the user on the fourth interface; in response to the second selection operation, determining a second application to be shared from the third application list; and sharing the multiple single materials and the second association relationship to the second application to be shared.
[0036] When the first material is a composite material, the first material is usually composed of multiple single materials, and there is a second association relationship between the multiple single materials. The second association relationship may include a dependency relationship between single materials, such as a single material is the annotation content of another single material, or a single material is content captured from another single material, etc. If the user wants to share the first material, the first thumbnail can be selected in the first interface and a third sharing operation can be performed. For example, the user clicks on the sharing control, and at this time the terminal device responds to the third sharing operation input by the user, filters out applications that match the material type of the first material as selected applications, and generates a third application list for one or more selected applications obtained by filtering, and displays it in the fourth interface.
[0037] It should be noted that when the first material is a composite material, the application that matches the first material can be an application that matches the material type of each of the multiple single materials that make up the first material. In this way, the selected applications to be shared can ensure that the first material can be shared in its entirety and ensure the integrity of the shared first material. Optionally, the application that matches the first material can also be an application that matches the material type of some of the multiple single materials. In this way, the types and number of applications to be selected can be expanded, and the flexibility of material sharing can be improved.
[0038] When the user performs a second selection operation on the third application list to select an application to be shared, the terminal device shares the multiple single materials constituting the first material and the second association relationship between the multiple single materials to the second application to be shared.
[0039] In this method, when sharing a composite material, the terminal device will share all the multiple single materials that form the composite material to the application to be shared, and will also share the association relationship between the multiple single materials, so that the information of the material obtained by the second application to be shared is more complete. Based on this, after the second application to be shared obtains the complete material information, it can split, reorganize, modify, etc. the composite material according to the obtained single materials and association relationships, which is more flexible and convenient to use.
[0040] In some possible implementations, sharing the multiple single materials and the second association relationship to a second application to be shared includes: generating export data according to a preset format based on the multiple single materials and the second association relationship; and sharing the export data to the application to be shared.
[0041] The above-mentioned exported data can fully represent the single materials that make up the composite material and the association relationship between the single materials. By transmitting the single materials of the composite material and the association relationship between the single materials through the exported data, the information of the material obtained by the second application to be shared can be more complete. Based on this, after the second application to be shared obtains the complete information of the material, it can split, reorganize, modify, etc. the composite material according to the obtained single materials and the association relationship, which is more flexible and convenient to use.
[0042] In some possible implementations, the composite material is an annotated image formed by inputting annotation content on a background image, the multiple single materials include a background image and annotation content, and the second association relationship includes a relationship in which the annotation content is the content annotated on the background image.
[0043] When the composite material is an annotated image obtained by the user annotating the image while browsing the image, the single materials constituting the composite material may include the background image (the original image that the user has not annotated) and the annotation content entered by the user for annotation. Optionally, the annotation content may be text content entered by the user through the keyboard, or text, handwriting, etc. entered through a stylus. The second association relationship between the two single materials, the background image and the annotation content, is: the annotation content is the content annotated on the background image.
[0044] This method allows the application to be shared to directly obtain the single material of the background image after receiving the shared annotated image, without having to separate the image to achieve the operation of removing the annotations and restoring the original image (that is, restoring the background image); it can also directly obtain the annotation content without having to perform handwriting or text recognition to obtain the annotation content, which facilitates operations such as modification and editing of the annotation content, and is more flexible to use.
[0045] In some possible implementations, the exported data includes: serial numbers of the background image and annotation content, material types of the background image and annotation content, file paths of the background image, text content or file paths of the annotation content, annotation types of the background image and annotation content, and associated serial numbers of the annotation content, wherein the associated serial number of the annotation content is the serial number of the background image.
[0046] When the composite material is an annotated image formed by inputting annotation content on a background image, in the exported data, the background image as a single material is described by the serial number of the background image, the material type of the background image, and the file link of the background image, and the annotation content is described by the serial number of the annotation content, the material type of the annotation content, the file link of the approval content or the text content. Among the single materials that make up the composite material, although each single material has its own serial number, the serial number does not represent the order of each single material when there is no order between the single materials, but is used to mark different single materials. In the exported data, the second association relationship is described by the annotation type of the background image, the annotation type of the annotation content, and the associated serial number of the annotation content.
[0047] For the composite material of the annotated picture, the annotation type may include the background picture type, for example, it may be represented by OriPic in the exported data, indicating that the picture is the background picture of the annotated picture before the annotation; the annotation type may also include the annotation content type, for example, when the annotation content is the content input by handwriting, the annotation type may be represented by handwriting in the exported data. The serial number of the single material associated with the annotation content is recorded as the associated serial number. In the composite material of the annotated picture, if the single material associated with the annotation content is the background picture, the associated serial number of the annotation content is the serial number of the background picture, indicating that the annotation content is the content annotated on the associated background picture. Optionally, there may be multiple annotation contents. For example, when the user inputs multiple contents multiple times with a stylus, the annotation content input each time may be numbered separately.
[0048] In the exported data, the description of a single material can also be described by text content or file link. When the material type of a single material is a picture, video, audio, document or text with a large amount of data, the single material can be treated as a file and the corresponding file link can be used to indicate the single material; when the material type of a single material is text and the data amount is small, the text content can be directly used to describe the single material.
[0049] The above-mentioned exported data can clearly and accurately express the information of the annotated picture. After the sharing application receives the shared exported data, it can obtain the background picture by parsing the exported data, and can remove the annotations and restore the original picture without separating the pictures. It can also directly obtain the annotation content without handwriting or text recognition, which facilitates the modification and editing of the annotation content, making it more flexible to use.
[0050] In some possible implementations, when the composite material is an annotated picture, the plurality of single materials include, in addition to the background picture and the annotation content, a composite picture. The composite picture is a picture generated by combining the background picture and the annotation content, and the second association relationship also includes that the composite picture is a picture generated by combining the background picture and the annotation content.
[0051] Optionally, when sharing the composite material of the annotated image, you can also share the composite image generated by merging the background image and the annotation content to the application to be shared. It should be noted that the composite image is different from the annotated image in that although the display effect of the composite image is similar to that of the annotated image and can display the display effect of the background image superimposed with the annotation content, the composite image is a single material and does not separate the displayed annotation content from the background image.
[0052] When the terminal device shares the annotated image, it also shares the synthesized image to the application to be shared, which can ensure the integrity of the material sharing. The application to be shared can directly obtain the synthesized image with a synthetic display effect. When displaying the annotated image, the synthesized image can be directly displayed without synthesizing it according to the background image and the annotation content, which is more flexible and convenient to use.
[0053] In some possible implementations, the exported data also includes: the serial number of the composite image, the material type of the composite image, the file path of the composite image, the annotation type of the composite image and the associated serial number of the composite image, wherein the associated serial number of the composite image is the serial number of the background image.
[0054] In the exported data, the composite picture is described by the serial number of the composite picture, the material type of the composite picture, and the file link of the composite picture. The second association relationship is also described by the annotation type of the composite picture in the annotated picture and the associated serial number of the composite picture. Among them, the material type of the composite picture is picture. The annotation type of the composite picture is the composite picture type. For example, it can be represented by GrritfPic in the exported data, which means that the picture is a composite of the background picture and the annotation content; the serial number of the single material associated with the composite picture is recorded as the associated serial number. In the annotated picture, the single material associated with the composite picture is the background picture, and the associated serial number of the composite picture is the serial number of the background picture.
[0055] The above-mentioned exported data can clearly and completely express the information of the annotated picture. The application to be shared can directly obtain the synthetic picture with synthetic display effect by parsing the exported data. When displaying the annotated picture, the synthetic picture can be displayed directly without synthesizing according to the background picture and the annotation content. It is more flexible and convenient to apply.
[0056] In some possible implementations, the composite material is an excerpted video obtained by marking the excerpted content for the original video when performing video excerpting, and the multiple single materials include the original video and the excerpted content. The second association relationship includes: the excerpted content is the content marked on the original video, and the corresponding duration of the excerpted content in the original video.
[0057] When a user is browsing a video to make a video excerpt, the user can take a screenshot of the current video or input text, strokes and other annotations. We call these screenshots and the input text, strokes and other information excerpt content, and record the video carrying the excerpt content as an excerpt video. When the composite material is an excerpt video, the single material that constitutes the composite material may include the original video (the video without the user inputting the excerpt content) and the excerpt content input by the user. Optionally, the excerpt content can be the text content entered by the user through the keyboard, or it can be the text, handwriting and other content entered by the stylus, or it can be a screenshot of a certain frame of the original video taken by the user. The second association relationship between the original video and the excerpt content is: the excerpt content is the content marked on the original video, and the corresponding duration of the excerpt content in the original video. The annotation content is the content annotated on the background picture.
[0058] This method allows the application to be shared to directly obtain the original video as a single material after receiving the shared excerpt video, without the need to separate the materials to restore the original video by removing the excerpt content; it can also directly obtain the excerpt content without the need to perform screenshot extraction, handwriting or text recognition to obtain the excerpt content, which facilitates operations such as modification and editing of the excerpt content, and is more flexible to use.
[0059] In some possible implementations, the exported data includes: the serial numbers of the original video and the excerpted content, the material types of the original video and the excerpted content, the file path of the original video, the text content or file path of the excerpted content, the excerpt type of the original video and the excerpted content, the associated serial number of the excerpted content, and the corresponding length of the excerpted content in the original video; wherein the associated serial number of the excerpted content is the serial number of the original video, and the excerpted content includes text entered by the user, and / or screenshots taken from the original video.
[0060] In the exported data, for the composite material of the excerpt video, the excerpt type of a single material may include the original video type, for example, it may be represented by video in the exported data, indicating that the video is a video without marked excerpt content; the excerpt type may also include the text type input by the user, for example, it may be represented by text in the exported data; the excerpt type may also include the screenshot type, for example, it may be represented by shot in the exported data. The serial number of the single material associated with the excerpt content is recorded as the associated serial number of the excerpt content. In the composite material of the excerpt video, the single material associated with the excerpt content is the original video, then the associated serial number of the excerpt content is the serial number of the original video, indicating that the excerpt content is the content marked on the associated original video. Each excerpt content corresponds to a duration in the original video, indicating that the excerpt content is input when the original video is played to that duration. Optionally, there may be multiple excerpt contents, and the excerpt types of multiple excerpt contents may be the same or different.
[0061] The above-mentioned exported data can clearly and accurately express the information of the excerpted video. After receiving the shared exported data, the sharing application can obtain the original video by parsing the exported data, and there is no need to separate the excerpt content to realize the operation of de-extracting and restoring the original video; the excerpt content can also be directly obtained without handwriting or text recognition to obtain the excerpt content, which is convenient for modifying and editing the excerpt content, and is more flexible to use.
[0062] In some possible implementations, the method further includes: obtaining a sharing result, where the sharing result is used to indicate whether the first material and the second material are successfully shared to the application to be shared; and displaying the sharing result.
[0063] After the material is shared, the terminal device can also obtain the sharing result. The sharing result can be generated and displayed by the application to be shared based on the integrity of the received material; or the application to be shared returns the sharing result to the application of the material sharing party for display, for example, the application to be shared feeds back the sharing result to the global collection service, and the global collection service displays the sharing result. It should be noted that if the material is successfully shared to the application to be shared, the sharing result can be success; if the material is not successfully shared to the application to be shared, for example, the application to be shared fails to correctly receive or correctly parse the shared material, then the sharing result is failure.
[0064] In a possible implementation, when the sharing result is a failure, the sharing result also includes a failure parameter, and the failure parameter is used to characterize the cause of the failure.
[0065] Different failure parameters represent different reasons for failure. Failure reasons may include material types that are not supported for some materials, parameter errors, and unknown errors. Failure parameters can accurately express the cause of failure, making it easier for users to trace back.
[0066] In some possible implementations, the material type includes any one or more combinations of text, document, picture, audio, video, web page, and compressed package.
[0067] In a second aspect, a material sharing device is provided, comprising a unit composed of software and / or hardware, wherein the unit is used to execute any one of the methods in the technical solution described in the first aspect.
[0068] In a third aspect, an electronic device is provided, comprising: a processor, a memory and an interface; the processor, the memory and the interface cooperate with each other so that the electronic device executes any one of the methods in the technical solution described in the first aspect.
[0069] In a fourth aspect, an embodiment of the present application provides a chip, comprising a processor; the processor is used to read and execute a computer program stored in a memory to execute any one of the methods in the technical solution described in the first aspect.
[0070] Optionally, the chip also includes a memory, and the memory is connected to the processor via a circuit or wire.
[0071] Further optionally, the chip also includes a communication interface.
[0072] In a fifth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the processor executes any one of the methods in the technical solution described in the first aspect.
[0073] In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program code, when the computer program code is run on an electronic device, the electronic device executes any one of the methods in the technical solution described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 is a schematic diagram of the structure of a terminal device 100 provided in an embodiment of the present application;
[0075] Figure 2 It is an interface diagram of a global collection installed on the terminal device 100 provided in an embodiment of the present application;
[0076] Figure 3 This is a schematic diagram of an interface for displaying file icons in a folder provided in an embodiment of the present application;
[0077] Figure 4 This is a schematic diagram of an interface of a global favorites panel provided in an embodiment of the present application;
[0078] Figure 5 This is a schematic diagram of an interface for selecting a material in a global collection panel provided in an embodiment of the present application;
[0079] Figure 6 This is a schematic diagram of an interface provided by an embodiment of the present application in which a material is selected in a global collection panel and a list of applications to be selected is popped up;
[0080] Figure 7 This is another example provided in an embodiment of the present application of selecting a material in a global collection panel and popping up a list of applications to be selected;
[0081] Figure 8 is a schematic diagram of an example of a fingerprint certificate provided in an embodiment of the present application;
[0082] Fig. 9 This is a flow chart of an example of sharing materials provided in an embodiment of the present application;
[0083] Fig.10 This is a flowchart of an example of sharing materials provided in an embodiment of the present application. DETAILED DESCRIPTION
[0084] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0085] In the following, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features.
[0086] The material sharing method provided in the embodiment of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), personal computers (desktops), netbooks, personal digital assistants (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.
[0087] For example, Figure 1 1 is a schematic diagram of a structure of a terminal device 100 provided in an embodiment of the present application. Taking the terminal device 100 as a PC as an example, the terminal device 100 may include a processor 110, a memory 120, a communication module 130, and the like.
[0088] The processor 110 may include one or more processing units, and the memory 120 is used to store program codes and data. In the embodiment of the present application, the processor 110 may execute computer-executable instructions stored in the memory 120 to control and manage the actions of the terminal device 100.
[0089] The communication module 130 can be used for communication between various internal modules of the terminal device 100, or communication between the terminal device 100 and other external terminal devices. Exemplarily, if the terminal device 100 communicates with other terminal devices via a wired connection, the communication module 130 may include an interface, such as a USB interface. The USB interface may be an interface that complies with USB standard specifications, specifically a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices, such as augmented reality (AR) devices.
[0090] Alternatively, the communication module 130 may include an audio device, a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, a near-field communication (NFC) module, etc., and the interaction between the terminal device 100 and other terminal devices may be achieved in a variety of different ways.
[0091] Optionally, the terminal device 100 may further include a display screen 140 , and the display screen 140 may display images or videos in a human-computer interaction interface.
[0092] Optionally, the terminal device 100 may further include a peripheral device 150 , such as a mouse, a keyboard, a speaker, a microphone, etc.
[0093] It should be understood that, in addition to Figure 1In addition to the various components or modules listed in the figure, the embodiment of the present application does not specifically limit the structure of the terminal device 100. In other embodiments of the present application, the terminal device 100 may also include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware.
[0094] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 1 Taking the terminal device of the shown structure as an example, the material sharing method provided in the embodiment of the present application is specifically explained in combination with the accompanying drawings and application scenarios.
[0095] With the rapid development of Internet technology, the use scenarios of personal computers are becoming more and more diverse, and people are using personal computers in more and more interactive ways. In daily work and life, there are often scenarios where files need to be copied across applications. In an operating system, if a user wants to send multiple files stored on a personal computer to other people, for example, the user can copy the files to be sent, then open a chat interface of a chat software, paste the files in the chat interface, and finally click a send button to transfer the files to the selected contacts in the chat application. However, transferring files by copying and pasting is inconvenient.
[0096] In the embodiment of the present application, when a personal computer shares multiple materials with a third-party application, the materials can be directly shared to the third-party application through the sharing function provided in the present case. The user does not need to first select the material to be shared, then copy it, and then open the interface of the third-party application to be shared to paste it. The material can be transmitted, the operation is simple, and the user experience is high.
[0097] In order to clearly introduce the technical solution and technical effects of the embodiment of the present application, the application scenario of the present application is first introduced here. The technical solution of the present application can be applied to the installation The terminal device of the operating system is used to realize material sharing. It should be noted that the materials mentioned in the embodiments of the present application may include but are not limited to files of various material types, such as documents, videos, audios, pictures, texts, web pages and other types of files. Optionally, the technical solution of the embodiments of the present application can be applied to the global collection service (CollectCenter Kit), can also be applied to the note application, and can also be applied to other applications, which is not limited by the embodiments of the present application. The following is an illustrative description of the application of this case in the global collection service. The global collection service mentioned in this article can be presented as a global collection application. For the sake of simplicity, the global collection application will be referred to as the global collection for description below.
[0098] Exemplarily, a user can collect the content that interests him or her into global collections one by one while using a personal computer. Global collections can support the collection of materials across applications and devices, and can improve the efficiency of users in collecting and using materials through simple and efficient interactive methods. After the global collection is installed on a personal computer, the icon of the global collection can be displayed on the desktop like the icons of other applications. The user can click on the icon of the global collection to open the panel of the global collection, and the panel of the global collection is in an expanded state. Optionally, the global collection can also be displayed in the form of a floating ball on the desktop or the interface of other applications. The user can drag the floating ball to change the floating position of the floating ball, or click on the floating ball to open the panel of the global collection. At the same time, the panel of the global collection can be resized by dragging, and can also be maximized and minimized. When the user clicks on the maximized control, the panel of the global collection can be switched to full-screen display; when the user clicks on the minimized control, the panel of the global collection can be shrunk to the taskbar. In some embodiments, the display method of the icon and the floating ball of the global collection can be referred to. Figure 2 Typically, if the user does not perform a favorite action, the global favorite floating ball can be hidden or semi-hidden and displayed at the edge of the screen. Figure 2 The floating ball of the global favorites is shown as a semi-hidden display at the edge of the screen.
[0099] During the process of using a personal computer, such as surfing the Internet, chatting, or watching videos, users can add the content they are interested in to the global collection by dragging, right-clicking the copy and paste function, right-clicking the send to global collection function, or using shortcut keys. For example, the content can be dragged to the global collection floating ball area on the desktop or other interfaces, or dragged to the expanded panel of the global collection to collect the material. When the user drags a material, the global collection floating ball can also be changed from its original semi-hidden display state to a fully displayed state to facilitate receiving the material that the user wants to collect. For example, when the user selects Document 2 in the photo folder of the personal computer, the display state of the global collection floating ball can be seen in Figure 3 The interface shown. When the user drags Document 2 to the area of the floating ball with the mouse, a confirmation window may pop up on the interface, asking whether Document 2 needs to be added to the global collection. If the user does not need to add Document 2 to the global collection, the user may click the cancel control in the confirmation window. Optionally, in addition to accepting materials that are actively collected by users, global collections can also automatically receive files received by third-party applications such as chat apps (i.e., chat applications, chat software), email apps, and browsers. Optionally, global collections can also automatically save composite materials generated by operations such as global annotations and video excerpts.
[0100] It should be noted that composite material refers to a combination of multiple single materials. A composite material can only display one icon in the global collection panel, but can contain multiple single materials of the same or different material types. The single material involved in the embodiment of the present application is a concept relative to the composite material. For example, the annotated picture obtained by global annotation is a composite material, and the composite material is composed of three single materials: an unannotated background picture, annotated content, and a composite picture. Among them, the composite picture is a picture that displays the annotation content superimposed on the background picture, and the background picture, the annotation content, and the composite picture are all single materials. For another example, the excerpted video obtained by video excerpt is a composite material, and the composite material is composed of three single materials: the original video, the screenshot in the original video, and the annotated text in the original video. The embodiment of the present application does not limit the material type and collection method of the material.
[0101] When the user wants to share the materials collected in the global collection, he can double-click the global collection icon on the desktop or click the floating ball of the global collection to open the global collection panel. Figure 4 This is a diagram of the interface when the global favorites panel is expanded. Figure 4 The types and quantities of the materials collected in the above are only examples and are not intended to limit the technical solutions of the embodiments of the present application. Figure 4 In the global collection panel in , users can drag materials to adjust the position, and can also right-click in the blank space to call up the menu bar for other operations, such as setting the display mode and arrangement mode of the icons of each material; they can also select the material in the panel and right-click to copy, rename, and other operations on the material. Users can also search in the global collection by entering the information of the material to be searched in the search bar in the global collection panel. If there is no collection material in the global collection, a prompt message of no content can be displayed in the global collection panel. If there are many materials in the global collection, users can also drag the slider in the sidebar of the global collection panel to switch to display other undisplayed materials. Users can select multiple materials in the global collection panel for sharing, which can be selected when the global collection panel is maximized or when the global collection panel is not maximized. The following describes the sharing process of multiple materials by taking the global collection panel in the expanded maximized state as an example.
[0102] by Figure 4 For example, the global collection panel shown in the figure can be used to select the materials to be shared on the interface. For example, the user can click or drag the mouse to select one or more icons or thumbnails of the materials to be shared. At this time, the selected materials will be displayed in the selected form. For details, see Figure 5The example of selected document 5 and video 6 is shown. The user can Figure 5 In the interface shown, select the material to be shared and right-click to bring up a menu, and then select the share control in the menu to pop up the sharing interface. The personal computer can also directly pop up the sharing interface on the interface after the user selects the document 5 and the video 6, for example Figure 6 As shown in Figure a. Figure 6 In the interface shown in Figure a, after the user selects a material, a thumbnail of the selected material can also be displayed on one side of the screen. When the user selects the material to be shared, he can click Figure 6 The sharing control shown in Figure a in the figure. At this time, a sharing window may pop up on the interface, and the sharing window may include a list of applications to be selected. For details, see Figure 6 The list formed by application 1, application 2, application 3 and application 4 is shown in Figure b. The user can Figure 6 In the sharing window shown in Figure b, select the icon of the application to be shared, for example, click the icon of one of the third-party applications, so as to share the material to the third-party application. Figure 6 In the list of selected applications in Figure b, the icons of the application programs are arranged vertically as an example. Optionally, the icons in the list of selected applications can also be arranged horizontally, as thumbnails, or in other forms. The user selects the icon of the third-party application to be shared from the list of selected applications. For example, by clicking the icon of application 1, the material can be shared to application 1.
[0103] Optionally, the global favorites panel can also be displayed in the form of a horizontally arranged upper sidebar on the top of the screen of the personal computer, such as Figure 7 As shown in Figure a. The upper sidebar may include multiple functional controls, such as Figure 7 The select all controls, share controls, copy controls, move controls, etc. shown in Figure a may also include other controls or menu controls of other controls, which are not listed here one by one. Figure 7 When the sharing control shown in Figure a is clicked, a sharing window will pop up, which includes a list of selected applications generated by the selected application. The applications in the list of selected applications all match the material type of the selected material. Figure 7 In the figure b in FIG. 1 , the list of applications to be selected includes icons of two applications, namely, Note and Other Note. In fact, other applications of the material type that supports the selected material may also be included. The user may select the selected material in the following manner: Figure 7 In Figure b, select the application you want to share as the application to be shared to achieve cross-application sharing of materials. Figure 7The sharing window shown in Figure b also includes a control for cross-device sharing, which is denoted as "Share". If the user clicks the cross-device sharing control in the sharing window, the following pop-up window may appear on the interface: Figure 7 The device list is shown in Figure b. At this time, the sharing window can also be hidden. Figure 7 The device list shown in Figure b in FIG. 1 includes device 1, device 2 and device 3. That is, if the user clicks the icon of device 1, the selected material can be shared to device 1. It should be noted that the cross-device material sharing can be a form of short-range wireless communication to transmit data.
[0104] In order to share the global collection of materials to third-party applications, it is necessary to ensure the legitimacy of the third-party applications that access the global collection. Then the third-party application needs to apply for registration through the open platform of the global collection (also known as the developer platform) during the development stage. The open platform needs to configure the application information for the third-party application, including: certificate fingerprint, application process name, registry path and other information. After the open platform audit configuration is completed, the third-party application is successfully registered. It should be noted that the developers of the third-party platform manufacturers (non-system manufacturers) will develop applications based on the open source system to obtain applications that can be installed and run in the system. In this application, such applications are referred to as third-party applications. After successful registration, the third-party application can obtain its own unique identification (APP ID) recognized by the open platform of the global collection, and at the same time generate a signed certificate fingerprint and place it on the open platform of the global collection, so as to apply for the activation of the global collection service, thereby obtaining the right to access the global collection, that is, to verify the authenticity of the third-party application.
[0105] After the third-party application is installed on the system, the user can view the certificate fingerprint through the following path: right-click, go to application process properties > digital signature > details > view certificate > details > fingerprint to view the certificate fingerprint.
[0106] Figure 8 The fingerprint in is the certificate fingerprint.
[0107] Specifically, to achieve material sharing, third-party applications need to follow the interface specifications that are unified with global collections. An implementation method for the definition of specific interfaces and parameters can be seen in Table 1.
[0108] As shown in Table 1 above, the parameters that need to be passed to the third-party application for the global collection include: cmdStr, exportData and jsonPath. Specifically, cmdStr represents the command to launch the third-party application for the global collection and the path (also called directory) to launch the third-party application, which is a String type of data; exportData represents the data of the material to be shared by the global collection (also called export data), which is a String type of data; jsonPath is the path of the export data.
[0109] As shown in Table 1, the parameters that the third-party application needs to pass to the global collection include: cmdStr, exportData and jsonPath. Specifically, cmdStr represents the instruction to pull up the global collection and the path to start the global collection when the third-party application returns the sharing result, which is a String type of data; exportData represents the data of the sharing result returned by the third-party application, which is a String type of data; jsonPath is the path of the sharing result returned by the third-party application.
[0110] Table 1
[0111]
[0112] Whether a third-party application passes data to a global collection, or a global collection passes data to a third-party application, the interface used may be exec / execFile.
[0113] Next, based on the interface and parameter descriptions shown in Table 1 above, the material sharing method of this case is fully introduced. Fig. 9 The interaction diagram shown includes:
[0114] S901. User starts global collection.
[0115] Specifically, the user can first start the global collection. For example, the user double-clicks the global collection icon on the desktop to open the global collection, and the following is displayed: Figure 4 The interface shown.
[0116] S902. The global collection obtains application information of third-party applications from the open platform.
[0117] S903: The open platform returns the application information of the third-party application to the global collection.
[0118] Global collections can apply to the open platform, and the open platform will send the application information of successfully registered third-party applications to the global collection. Usually, the open platform can return the application information of multiple third-party applications, which are applications that have successfully applied for registration on the open platform when they were created. The global collection can obtain information such as the package name, certificate fingerprint, and registry path of these third-party applications. The global collection can obtain application information from the open platform when it is initialized during the application startup process.
[0119] S904: The global collection displays a list of applications to be selected according to the returned application information.
[0120] When the user selects the material to be shared and clicks the share control, the following information will be displayed: Figure 6 Specifically, the global collection can display the third-party applications that allow sharing of materials in the list of applications to be selected according to the application information returned by the third-party applications.
[0121] For third-party apps to appear in the list of available apps, they need to be added to the global collection. During the creation process, third-party apps provide the basic information shown in Table 2 below:
[0122] Table 2
[0123]
[0124] To access global collections, third-party applications need to provide the registration form information shown in Table 3 in addition to the basic information in Table 1 during the creation process:
[0125] Table 3
[0126]
[0127] The above regRoot, regKey and imagePath information can be used to identify whether the third-party application is installed in the system, and to obtain the main process path of the third-party application in order to launch the third-party application. In an operating system, to launch an application, it is necessary to obtain the path of the exe file of the application in the registry so as to access the exe file and launch the application by executing the open operation of the exe file.
[0128] The information that the third-party application needs to write into the registry includes: HnCollectCenter, which is the newly added field CollectCenter of regRoot in the registry, used to identify whether the third-party application is connected to the global collection and the material type or format of the material that can be received. For the specific data format, please refer to the example: {"support": 1, "mimeType": "img / *|video / *"}. Among them, when support is 1, it means that the global collection can be accessed, and when support is 0, it means that the global collection cannot be accessed. If the third-party application cannot access the global collection, it may be that the third-party application has not been installed or upgraded to the appropriate version, then the user can be prompted to install or upgrade the third-party application. MimeType is used to identify the material type of the material that the third-party application can receive. For example, img / * represents the type of picture, video / * represents the type of video, and the vertical line is used to distinguish the descriptors of different material types. The mimeType can also include other material types, which are not listed here one by one. If the third-party application can also support materials of other material types, you can continue to add the code description of the material type of mimeType.
[0129] S905: The user selects a third-party application.
[0130] Specifically, the user can select an application icon in the list of applications to be selected by using a mouse, and record it as the application to be shared, thereby triggering the launch of the application to be shared.
[0131] S906: Global collection queries the registration table information of the third-party application.
[0132] In response to the selection operation input by the user, the global collection can query the registration table information of the third-party application. Specifically, the global collection queries the value of the newly added field CollectCenter of regRoot in the registration table.
[0133] S907. The global collection determines whether the third-party application is installed and whether it supports the type of the material to be shared according to the registry information.
[0134] The global collection can determine whether the third-party application is installed based on the queried registry information. If the third-party application has not been installed in the current system, execute S908A; if the third-party application has been installed in the current system, it can continue to determine whether the third-party application supports the type of material to be shared. If it does, continue to execute S908B.
[0135] If support is 1 in CollectCenter, it means that the global collection can be accessed, indicating that the third-party application has been successfully installed; if "support" is 0, it means that the global collection cannot be accessed, indicating that the third-party application may not have been installed or upgraded to the appropriate version.
[0136] In order to clearly describe how global collections filter applications and obtain a list of candidate applications, we first introduce in detail the composition of the material types to be shared:
[0137] In the embodiment of the present application, the material to be shared is the material that the user wants to share, which may include one material or multiple materials. These materials may be composite materials, single materials, or a combination of composite materials and single materials. When it is a single material, the material type may be any one of text, document, picture, audio, video, and web page; when it is a composite material, the material type may be any one or more of text, document, picture, audio, video, and web page. The material types of these multiple materials may be the same or different.
[0138] Optionally, if multiple materials in the material to be shared are all single materials, then the material to be shared is a collection of multiple single materials. Among them, single material is a concept compared to composite material, which is a material formed by a single file, such as a single picture, a single text, a single document, a single audio or a single video. Composite material can be a combination of multiple single materials of the same or different material types and with an associated relationship. For example, a picture with annotations is a composite material, in which the annotated text and the picture are both single materials, and the two constitute a composite material; the excerpted video obtained by video excerpt is a composite material, and the annotated text in the excerpted video and the original video obtained by excerpting are both single materials, and the two constitute a composite material.
[0139] Optionally, the material to be shared may also be a combination of a single material and a composite material, such as an excerpt video obtained by extracting a single picture or video.
[0140] The global collection can determine whether the third-party application supports the type of material to be shared based on the registration information of the third-party application. Specifically, it may include:
[0141] The global collection can obtain the registry information, thereby obtaining the material types supported by the third-party application, and then determine whether it matches the material type of the current material to be shared. Since the material to be shared may include multiple materials, the material types of these multiple materials may also be different.
[0142] For the above-mentioned multiple material types, the global collection can determine that the third-party application supports the material to be shared when the third-party application supports all material types of the material to be shared, or determine that the material type of the third-party application matches the material to be shared; the global collection can also determine that the third-party application supports the material to be shared when the third-party application supports some of the materials to be shared, or determine that the material type of the third-party application matches the material to be shared. Specifically: the composite material in the material to be shared is also disassembled into multiple single materials for judgment, and the global collection determines whether the current third-party application is an application that supports the material to be shared according to the material type of all single materials in the material to be shared, so as to obtain the result of whether it matches. If the third-party application supports all single materials in the material to be shared, it is determined that the third-party application supports the material to be shared, and there will be no sharing failure due to the third-party application not supporting the material type, so the success rate of material sharing is high. If the third-party application supports some of the single materials in the material to be shared, it is determined that the third-party application supports the material to be shared, then the types and number of applications that can accept the material to be shared will be more, and the sharing scenes will be richer. Of course, if the selected application does not support a single material, the sharing of the single material may fail. At this time, the personal computer can prompt the single material that failed to be shared. The specific method of prompting can also be found in the description of sharing results below, which will not be repeated here.
[0143] S908A, prompting to install or upgrade the third-party application.
[0144] Optionally, the global collection may indicate in the interface that the application is not installed or other prompt information; optionally, the global collection may also display a website link for jumping to the installation in the interface, so that the user can directly click to install the third-party application.
[0145] S908B. The global collection sends a startup instruction to the third-party application according to the startup path of the third-party application in the registration table information to start the third-party application and pass the generated parameters to the third-party application.
[0146] The above registry information also includes the startup path of the third-party application, that is, the path of the exe file of the third-party application.
[0147] Specifically, the global collection can generate a string of a preset format, such as a string of json format, from the material to be shared, and store it in a path, which can be a temporary path, and then send parameters representing the temporary path to the third-party application.
[0148] Optionally, the code for the global collection service to start the third-party application and pass the temporary path of the string of the material to be shared can be implemented in two languages, one is Nodejs and the other is C++. The code using Nodejs can be exemplified as follows:
[0149] Const myChildProcess=require('child_process');
[0150] IpcRenderer.on('exportNewData',async(event,arg)=>{
[0151] const jsonData=exportHandler.createDataForApp();
[0152] const jsonStr=JSON.stringify(jsonData);
[0153] myChildProcess.exec('start C:\\Users\\xxx\\source\\xxx.execollectcenterexport jsonPath') / / where start indicates the startup command, the collectcenterexport after the space in the startup path is the data of the exported material, and jsonPath is the path of the exported material;
[0154] Another code example using Nodejs is:
[0155] var path=filePath.replace('\\XXXXnote.exe',”);
[0156] / / 'C:\\Program Files\\XXXXnote';
[0157] myChildProcess.execFile(xxx.exe,['collectcenterexport',jsonData],{cwd:path},function(err:null|Error,data:string){
[0158] logger.info(`startNoteAppByPath data:${data}`)
[0159] / / The process of pulling up third-party applications in the global collection
[0160] });
[0161] })
[0162] / / Wherein, var path indicates the splicing operation based on the registry information, and execFile is the startup instruction.
[0163] / / collectcenterexport is the data of the exported material or the path of the exported material, cwd:path is the installation path of the third-party application in the registry; function represents the return value, which indicates whether the sharing result returned by the third-party application is successful or failed.
[0164] The C++ code can be as follows:
[0165] ShellExecute(hwnd,"open","c:\\MyPrograms\\xxx.exe",param.c_str,NULL,0);
[0166] / / Wherein, hwnd is the handle, open indicates the start instruction; c:\\MyPrograms\\xxx.exe indicates the / / path of the exported material, and param.c_str indicates the data of the exported material.
[0167] A detailed description of how to generate a string in a preset format can be found in the description below and will not be repeated here.
[0168] S909. The third-party application is started under the start instruction of the global collection, and receives a parameter representing a path for storing data of the exported material, thereby obtaining a character string of the material to be shared, that is, the exported data.
[0169] After receiving the start instruction and starting, the third-party application receives the parameter of the path representing the data storing the exported material sent by the global collection, and accesses the path to obtain the character string of the material to be shared.
[0170] Optionally, after receiving the startup instruction of the global collection, the running code of the third-party application can also be implemented in two languages, one is Nodejs and the other is C++. Among them, the code using Nodejs can be exemplified as follows:
[0171]
[0172]
[0173] } / / Indicates that after obtaining the path for storing the exported material, other methods can be used to process the data. Here is an example;
[0174] The C++ code can be as follows:
[0175] int APIENTRY wWinMain(_In_HINSTANCE hInstance,_In_opt_HINSTANCEhPrevInstance,_In_LPWSTR lpCmdLine,
[0176] _In_int nCmdShow)
[0177] / / WinMain is the main method of C++, lpCmdLine is the cmd command, used to pass the path parameter of / / storing the exported material;
[0178] S910. The third-party application parses the character string of the material to be shared, generates a sharing result, and stores it in another path.
[0179] The third-party application parses the string of the material to be shared, generates a sharing result based on the parsed result, and then generates a sharing result string according to a preset format, and stores it in another path different from the exported data, which can also be a temporary path.
[0180] S911. The third-party application passes parameters of another path to the global service.
[0181] Specifically, the third-party application generates a string with the parameters of another path according to a preset format and passes it to the global service. At this time, the third-party application needs to pull up the global service.
[0182] The process of a third-party application launching a global service can also refer to the process of a global service launching a third-party application. The relevant code examples can all be used as reference. You only need to swap the identifiers of the indicated applications and adapt other descriptions. I will not go into details here.
[0183] S912: The global service obtains the sharing result from another path and prompts the user.
[0184] Optionally, for displaying the sharing results, the third-party application may obtain the sharing results based on the results of parsing the JSON string and then display them.
[0185] Optionally, the sharing result can also be returned by the third-party application to the global collection, and the global collection will parse and display the sharing result. The global service can obtain the character string of the sharing result according to the path that represents the storage of the sharing result. Afterwards, the global collection can prompt the user whether the sharing is successful based on the sharing result. Specifically, if the sharing is successful, a message of successful sharing can be displayed; if the sharing fails, a message of failed sharing can be displayed. Optionally, if the sharing fails, a prompt can be given based on the reason for the failure, and the user can know the reason for the failure based on the content of the prompt, so as to correctly perform the sharing operation.
[0186] The foregoing describes the overall process of sharing materials. Next, an embodiment of sharing materials and the association relationship between shared materials will be described in detail.
[0187] Fig.10 A flowchart of a material sharing method provided in an embodiment of the present application, the method is applied to An operating system, the method comprising:
[0188] S1001. Obtain material to be shared.
[0189] Specifically, the material to be shared may be the material selected by the user and needs to be shared to a third-party application, such as Figure 6 In the user interface shown in Figure b, the two materials selected by the user are the materials to be shared, document 5 and video 6. When the user selects the materials to be shared, the global collection can obtain the materials to be shared that the user wants to share.
[0190] S1002: When the material to be shared includes multiple materials, obtain the association relationship between the multiple materials.
[0191] Specifically, multiple materials are associated with each other.
[0192] Optionally, if the multiple materials are all single materials, the association relationship may include the order of the multiple single materials. The order of the multiple single materials can be expressed by numbering each single material, that is, marking each single material with a corresponding serial number in order. The order of the multiple single materials can be the order in which each single material is added to the global collection, or the order in which the user selects the single material, which is not limited in the embodiments of the present application.
[0193] Optionally, if the material to be shared is a composite material, for example, the material to be shared is an excerpt video. At the T1 time of the excerpt video, the user inputs the annotation content 1, and at the T2 time of the excerpt video, the user captures the excerpt content 2. Figure 1 Then for the excerpt video, the single material that constitutes the excerpt video includes the original video before annotation and screenshot, the annotation content 1 and the screenshot. Figure 1The association relationship includes: Annotation content 1 is the annotation content at T1 of the original video, Figure 1 is a screenshot taken at T2 of the original video. That is, when the material to be shared is a composite material, the association relationship is the relationship between the single materials that constitute the composite material.
[0194] Optionally, if the material to be shared is an excerpt video and a picture, the association relationship includes the order of the excerpt video and the picture, and also includes the original video, the annotation content 1 and the screenshot forming the excerpt video. Figure 1 The relationship between these three single materials. That is, when the material to be shared includes both a composite material and other single materials (single materials that are not members of the composite material), the association relationship may include the order between the composite material and the other single materials, as well as the relationship between the single materials that make up the composite material.
[0195] S1003: Receive a sharing operation performed by the user.
[0196] Specifically, the user selects the material to be shared in the global collection panel, calls up the sharing interface, and clicks the sharing control in the sharing interface to perform the sharing operation. For example, the sharing operation can also be an operation in which the user right-clicks to call up a menu and selects the sharing control in the menu. The embodiment of the present application does not limit this, as long as it is an operation that can trigger the sharing process.
[0197] S1004: In response to the sharing operation, the to-be-shared material and the associated relationship are shared to the to-be-shared application.
[0198] Specifically, the global collection can share the material to be shared and the associated relationship to the application to be shared when the user performs a sharing operation. The application to be shared is a third-party application selected by the user. Optionally, the global collection can share multiple materials and the order of the multiple materials to the application to be shared.
[0199] Based on this, the application to be shared can not only obtain multiple materials, but also obtain the association relationship between the multiple materials. For example, the application to be shared can obtain the order between the multiple materials, so that the multiple materials can be displayed in order.
[0200] Fig.10In the embodiment shown, when the global collection shares materials with third-party applications, in addition to the materials themselves, the associations between the materials are also shared, so that the third-party applications can obtain more comprehensive information about the materials. Based on this, after the third-party applications obtain comprehensive information, they can present the materials according to the obtained associations, meet the user's sharing intentions, and improve the user experience. In addition, the third-party applications can also sort, split, reorganize, modify, and other operations on the shared materials according to the obtained associations, making them more flexible and convenient to use.
[0201] Next, the technical solution of the embodiment of the present application is described in detail according to the composition of different materials to be shared.
[0202] When the materials to be shared are independent single materials (single materials that do not belong to the same composite material), for example, separate pictures and texts, the user clicks on picture a, text b, and picture c in the global collection panel according to his or her sharing intention. At this time, the global collection recognizes the user's sharing operation, and can determine that the user needs to share the three single materials of picture a, text b, and picture c, and obtains the association relationship of the order in which the user clicks on the single materials. Then, picture a, text b, and picture c, as well as the order of the three, can be used to generate a character string in a preset format, and the character string in the preset format can be sent as export data to the application to be shared. In this way, after receiving the character string in the preset format, the application to be shared can parse it, for example, parse to obtain picture a, text b, and picture c, as well as the order of the three, and then display it in the order of the single materials, and the display order is in line with the user's intention. For a detailed description of the preset format, please refer to the description below, which will not be repeated here.
[0203] When the material to be shared is a composite material, for example, an annotated picture obtained by global annotation, recorded as picture d, the user clicks on picture d in the global collection panel and clicks on the share control. At this time, the global collection recognizes the user's sharing operation and can determine that the user needs to share the composite material of picture d. Although the picture d can be displayed as a thumbnail in the global collection panel, the global collection can obtain the two single materials of picture d' before the annotation and the annotation content e on picture d', and obtain the association relationship that the annotation content e is the annotation content of picture d'. Optionally, the global collection can also obtain the single material of the composite picture synthesized by the annotation content e on picture d', recorded as picture d", and obtain the association relationship that picture d" is the composite picture of picture d' and annotation content e. The global collection can generate a character string in a preset format based on the association relationship between the obtained single materials and the single materials, and then send the character string in the preset format to the application to be shared. After receiving the character string in the preset format, the application to be shared can parse it and obtain three single materials: picture d', picture d", and annotation content e. It can also know the association relationship between the three single materials. The association relationship specifically includes: picture d' is the unannotated background picture, annotation content e is the content annotated on picture d', and picture d" is a composite picture of the annotation content and picture d'. Based on this, the application to be shared can flexibly operate on the parsed content.
[0204] Optionally, when the material to be shared is a composite material, after the sharing application receives a string in a preset format representing the composite material, although it can parse multiple single materials and their associations, it can still display only one icon to represent the composite material as in the global collection panel. For example, after receiving the picture d, the application to be shared may display the picture d in the form of a thumbnail, or display an icon of a composite picture d". At this time, if the user wants to remove the annotations and restore the original picture, the operation can be performed in the application to be shared. Although the display effect of the picture d at this time is the same or similar to that of the picture d", since the character string in the preset format received by the application to be shared can be parsed to obtain the three single materials of the picture d', the picture d" and the annotation content e, when the user opens and previews the picture d, the user can click on the area where the annotation content e on the picture d is located. The application to be shared may assume that the user's intention at this time is to select the annotation content e, and may display the selected state of the annotation content e; or may enter the editing state of the annotation content e, such as displaying the annotation content e as a highlighted state, or displaying an editing bar around the annotation content e. At this time, if the user clicks the delete control, the selected annotation content e can be deleted, and the picture d' can be retained as the background picture. Then, the user clicks the save control to save a separate picture without the annotation content e. The background image d' of the annotation content e is used to realize the operation of removing the annotation and restoring the original image. Optionally, when the annotation content e enters the editing state, the user can also edit the annotation content. For example, the user can delete, modify or add the text of the annotation content e through the keyboard. Optionally, when the annotation content e is the content input by the stylus, if the application to be shared can support the algorithm of the stylus during input, then when the annotation content e is in the editing state, the application to be shared can recognize the handwriting input by the stylus. The user can move the position of the handwriting by dragging the handwriting of the stylus on the screen of the terminal device; the curve of the handwriting of the stylus can also be stretched to change the shape and size of the curve; the menu control of the stylus can also be clicked in the editing state to call out the menu bar, and then various tool controls can be used in the menu bar to change the color of the handwriting of the stylus, modify the thickness of the handwriting of the stylus, and other related operations, which will not be listed one by one in this embodiment. Therefore, the application to be shared can flexibly use the material to be shared to meet various needs and has a wide range of application scenarios.
[0205] When the material to be shared is a composite material, such as an excerpt video obtained by extracting a video, the excerpt video is recorded as video f. The user clicks on video f in the global collection panel and clicks on the share control. At this time, the global collection recognizes the user's sharing operation and can determine that the user needs to share the composite material video f. The video f has an excerpt content at the duration T1, which is the text content annotated by the user, recorded as annotation content 1; and an excerpt content at the duration T2, which is a screenshot at that duration, recorded as screenshot content 1. Figure 1 Although the video f can be displayed as a thumbnail in the global collection panel, in the global collection, the video f is a single video before annotation, recorded as video f', and the annotation content 1 and the screenshot. Figure 1 The three single materials form a composite material. The global collection can generate a string of preset format from the three single materials and the relationship between the three single materials, and then send the string of preset format to the application to be shared. After receiving the string of preset format, the application to be shared parses it and obtains the video f', the screenshot Figure 1 and annotation content 1, the three single materials can also be learned, and the association relationship between the three single materials includes: video f' is the original video without annotations, annotation content 1 is the excerpt added at the T1 duration of video f', and the clip Figure 1 It is a picture captured at the time T2 of the video f'. Based on this, the application to be shared can flexibly operate on the parsed content.
[0206] Optionally, when the material to be shared is an excerpt video obtained by extracting a video, the excerpt video can be recorded as video f. After the application to be shared receives video f, if the user wants to remove the annotations and restore the original video, the operation can be performed in the application to be shared. Figure 1 And the three single materials of annotation content 1 and the corresponding association relationships. When the user opens and previews the video f in the application to be shared, he can click on the annotation content 1 of the video f at the duration of T1. The application to be shared can think that the user's intention at this time is to select the annotation content 1, and can display the selected state of the annotation content 1; or it can enter the editing state of the annotation content 1, such as displaying the annotation content 1 as a highlighted state, or displaying an editing bar around the annotation content 1, or enlarging or fully displaying the content of the annotation content 1 (previously in a thumbnail display state). At this time, if the user clicks the delete control, the selected annotation content 1 can be deleted. If the user continues to click on the screenshot of the video f at the duration of T2 Figure 1 The application to be shared can assume that the user's intention is to select the screenshot Figure 1 , you can display the cut-off Figure 1 The selected state can also be the state of entering the cut-off Figure 1 Editing status, such as Figure 1 Displayed as highlighted, or in the screenshot Figure 1 Display the edit bar around the Figure 1 At this time, if the user clicks the delete control, the selected screenshot Figure 1 can be deleted, and the original video before annotation can be obtained. If the user clicks the save control, the original video can be saved separately, and the video is video f', which realizes the operation of removing annotations and restoring the original video. Optionally, when the excerpt content enters the editing state, the user can also edit the excerpt content. For example, when the annotation content 1 is in the editing state, the user can delete, modify or add the annotation content 1 through the keyboard. Optionally, when the annotation content 1 is text content input by the user through the keyboard or voice recognition, and the annotation content 1 is in the editing state, the user can move the annotation content 1 by dragging the display bar of the annotation content 1 on the screen of the terminal device; the user can also add, modify and delete the text content of the annotation content 1 through the keyboard; the user can also click the menu control of the annotation content 1 in the editing state to call out the menu bar, and then use various tool controls in the menu bar to change the font, font size, color and other related operations of the annotation content 1, which will not be listed one by one in this embodiment. For example, in the screenshot Figure 1 In the editing state, users can input text or strokes through the keyboard. Figure 1 You can also perform operations such as content annotation and graffiti, and click the screenshot button in the editing state. Figure 1 Use the menu control to bring up the menu bar, and then use the various tool controls in the menu bar to change the screenshot. Figure 1 Therefore, the shared material can be used flexibly through the shared application to meet various needs and has a wide range of application scenarios.
[0207] When there are multiple materials to be shared, some are composite materials and some are single materials, for example, the materials to be shared include picture a and video f. Picture a is a single material, and video f is an excerpt obtained by extracting the video. When the user clicks on picture a and video f to share, the global collection recognizes the user's sharing operation and determines that the user needs to share the single material picture a and the composite material video f. The video f has an excerpt at the duration T1, which is annotation content 1, and a screenshot at the duration T2, which is a screenshot. Figure 1 The global collection can obtain image 1, and can also obtain the original video of video f before it is annotated, that is, video f', as well as the annotation content 1 and screenshots of video f'. Figure 1These single materials. Global collections can also obtain associations, including: Annotation content 1 is the excerpt of video f' at time T1, Figure 1 The screenshot of video f' at time T2 is displayed before the screenshot of picture a, and the obtained single material and the associated relationship are generated into a string in a preset format, and then shared to the application to be shared. At this time, the application to be shared can display picture a and video f in sequence, and can also recognize the annotation content 1 in video f, and can also identify the screenshot of video f. Figure 1 After identification, the user can use the application to be shared to annotate the content 1 and / or the screenshot. Figure 1 You can delete, edit and modify the video, and you can also add new annotations and take new screenshots based on the video f', which is very flexible. Figure 1 The operation can be found in the previous description and will not be repeated here.
[0208] Optionally, the triggering timing for generating data of a preset format from a plurality of materials and the association relationship between the plurality of materials in the global collection may include:
[0209] Global collection can be used when users click on the material to be shared, for example, Figure 6 When the two icons of document 5 and video 6 are clicked in the interface shown in FIG. a, multiple materials included in the materials to be shared and the association relationship between the multiple materials are generated into export data according to a preset format, and then in response to the user's selection operation of selecting the application to be shared, for example, when the user selects the application to be shared, Figure 6 When the operation of selecting application 1 is performed in the interface shown in Figure b, the exported data is sent to the third-party application to realize sharing; the global collection can also respond to the user's selection operation of selecting the application to be shared, for example, when the user selects Figure 6 When the operation of selecting application 1 is performed in the interface shown in Figure b, the multiple materials included in the to-be-shared materials and the association relationship between the multiple materials are generated into export data according to a preset format, and the export data is sent to the third-party application to realize sharing.
[0210] Next, the specific form of the preset format is described in conjunction with specific examples. The above preset format can be a unified format and regularized definition for the content transmitted by the third-party application (that is, the exported data in the previous article), so as to ensure the consistency of the data format, thereby achieving complete data transmission and avoiding data loss. Based on this, in complex composite materials, the association relationship between the single materials that make up the composite material can be fully shared between applications, and the integrity of the composite material transmission can be achieved. Based on the complete material, the third-party application can modify, delete, add and other operations on the shared material, which is more flexible to use.
[0211] Taking the application of the embodiment of the present application in the windows operating system as an example, in some embodiments, the preset format can be a string in json format. The definition of the type of the above-mentioned single material can include: text (text / txt format); picture (img format): document (word / ppt / excel / pdf / html / pdf / excel and other formats), video (video), audio (audio) and other types of files (file). Among them, other types of files can also include Zip, apk, json and other formats, which are not limited by the embodiment of the present application.
[0212] For the material to be shared, the formation of the json string requires splitting the composite material into single materials. The json string may include: the number of all single materials in the material to be shared, the sequence number of each single material in all single materials, the type of each single material, and the content of each single material. The content of a single material may be text content or a file path. Optionally, the sequence number of each single material may represent the order in which the single material is shared, or may identify the identity of the single material.
[0213] In one implementation, an example of defining the export data in the json string is:
[0214] "version":
[0215] "exportStartTime":
[0216] "itemNum":
[0217] "exportItem":
[0218] Among them, version is the version number that defines the exported data this time. The definition of each exported data is versioned to facilitate iterative updates in different versions, avoid definition confusion during version iteration, and help ensure functional stability; exportStartTime is the data export time, that is, the time when the material is shared; itemNum indicates the number of all single materials shared this time; exportItem indicates the specific information of a single material, which can be described by a jsonArray array (which can be recorded as an array array). The array array includes multiple values, each of which is used to describe a single material. A specific value can be exemplified as:
[0219] "index":
[0220] "type":
[0221] "textContent":
[0222] "path":
[0223] "insertType":
[0224] Among them, index is the serial number of the single material in the multiple single materials shared this time, and it can also represent the identity of the single material; type is the type of the single material; textContent is the content of the child single material, and path is the export path; insertType is used to identify whether the single material is inserted directly as content or as an attachment. For example, 0 means inserted as an attachment, and 1 means inserted as content. It can usually be defaulted to 0. In a value in the above array, textContent and path can be selected to represent the content of the corresponding single material. For example, when the single material is text and the amount of data is relatively small, textContent can be selected to directly display the content of the text. At this time, insertType is 1; when the single material is text and the amount of data is relatively large, or the single material is a picture, video, audio or other file, path can be selected to directly indicate the location of the file. At this time, insertType is 0.
[0225] Optionally, the above JSON string may also include an itemRelation parameter, which is used to represent the association relationship between structured data types between items, that is, to represent the association relationship between single materials. The specific data format definition may be exemplified as follows:
[0226]
[0227]
[0228] In the above example, itemRelation is used to declare the association relationship between single materials. Under the definition of itemRelation, type represents the type of the association relationship, for example, it can include an association annotation representing a global annotation. When the association relationship is a global annotation, each array array under formation represents multiple single materials with an association relationship. In each array array, index represents the serial number of the single material among multiple single materials, and annoType represents the annotation type of the single material. If the single material is a background picture, that is, the original picture that has not been annotated, the annotation type can be expressed as OriPic; if the single material is handwritten content input by a stylus, the annotation type can be expressed as handwriting; if the single material is a composite picture obtained by annotation, the annotation type can be expressed as GrritfPic. Optionally, the annotation content can also be text content entered by the user through keyboard or voice.
[0229] In addition, under the definition of itemRelation, the type of the relationship represented by type can also include the relationship videoExtract representing the single material of the extracted video. When the relationship is an extracted video, the array array under formation represents multiple single materials of the relationship of the extracted video. In each value, index represents the sequence number of the single material among multiple single materials, and extractType represents the extraction type of the single material. If the single material is the original video, that is, the video without annotations, it can be represented as video; if the extraction type of the single material is text entered by the user, it can be represented as text; if the extraction type of the single material is a screenshot, it can be represented as shot. The value also includes the parameter duration, which represents the total video length of the extracted video. When the single material is text or a screenshot, the value also includes releItem, which represents the sequence number of the original video associated with the single material; the value can also include the parameter timeOffset, which represents the extraction duration corresponding to the extracted content such as text or screenshots in the extracted video, which can be recorded as the extraction duration. Usually, the extraction duration is less than or equal to the video duration.
[0230] Next, we will use a complete JSON string as an example to describe the definition logic of exporting data. Specifically, the JSON string is as follows:
[0231]
[0232]
[0233]
[0234]
[0235] In the above example, the time representing the shared material is 1678806125, and the number of single materials included in the shared materials to be shared is 13; each single material can be defined as the data under each index under exportItem. Taking index 0 as an example, the material type of the single material with serial number 0 is picture, and the content is expressed in the form of file path, and the specific content is the file 123.jpg indicated by the storage path D:\\HnCollectCenter\\pics\\123.jpg; taking index 1 as an example, the material type of the single material with serial number 1 is text content, and the specific content is test and test. Single materials with other serial numbers are not listed one by one, and the parameter meaning can be understood in combination with the context, and is not limited here.
[0236] In the above json string example, the array array also includes a definition parameter itemRelation for defining the association relationship. Optionally, the type of association relationship is a global annotation relationship, including that single material 0 is a background image, and single material 1 is the handwritten input annotation content of single material 0. Optionally, the type of association relationship is a video excerpt relationship, including: single material 8 is an unannotated original video with a duration of 300000; single material 1 is the text associated with single material 8, and the corresponding duration is 60253, that is, single material 1 is an excerpt of video 8 at a duration of 60253 with an excerpt type of text; single material 11 is a screenshot associated with video 8, and the corresponding duration is 78563, that is, single material 11 is a screenshot at a duration of 78563 in video 8. Looking up, it can be seen that single material 11 is the picture nm.jpg indicated by D:\\HnCollectCenter\\pics\nm.jpg. The type of association relationship is video excerpt, which also includes another group of relationships: single material 10 is the original video of the video excerpt, with a total duration of 180,000, and single material 12 is the text content extracted from video 10 at duration 30,025. The text content can be found in the material information of single material 12, and the specific content is test abc.
[0237] The above string in json format is only an example, and can be determined according to the specific form of different materials to be shared during specific application.
[0238] Specifically, all collections can generate the export data generated by the above-mentioned multiple single materials and associations, such as generating a json string in a preset format, and store it in a temporary path, and then send the temporary path to a third-party application, that is, to the application to be shared selected by the user.
[0239] Specifically, when the user is in Figure 6 After clicking on an icon of a third-party application in the list of selected applications shown in Figure b, the global collection can pull up the third-party application to receive the material to be shared. The specific process can be found in the previous article, which will not be repeated here. After the third-party application parses multiple single materials and their associations, it can perform flexible operations on the parsed content. For details, please refer to the previous article for annotating the received excerpted video and annotated pictures, restoring the original picture, restoring the original video, etc. through the application to be shared, which will not be repeated here.
[0240] After the material sharing is completed, the parameter definition of the sharing result returned by the third-party application to the global collection can be seen as follows:
[0241] "exportResult": indicates the result of exporting the material to a third-party application. The data type is int.
[0242] "exportStartTime": indicates the start time of exporting materials, and the data type is long;
[0243] "exportEndTime": indicates the completion time of exporting materials, and the data type is long type;
[0244] "failedDesc": is a failure parameter, which is a summary description of the local export failure factors. It can be used together with exportFailedItem to describe the failure factors. The data type is String type, specifically in the Json string format.
[0245] The exportResult definition can be found in Table 4:
[0246] Table 4
[0247] Name value meaning SUCCESS 0 Material exported successfully PART_SUPPORT -1 Some materials are not supported PARAM_INVALID -2 Parameter error UNKOWN_ERR -99 Unknown error
[0248] In Table 4, if the value of exportResult is 0, it means that the material sharing is successful; if the value of exportResult is -1, it means that some materials are shared successfully, and some materials fail to share; if the value of exportResult is -2, it means that there is a parameter error; if the value of exportResult is -99, it means that there is an unknown error. The parameter definition shown in Table 4 is only an example. The parameter definition of the result of exporting materials can also be found in Table 5 below, which is not repeated here. Based on the definition in Table 4 above, a code example of exporting failed content is as follows:
[0249]
[0250]
[0251] For the specific form of the returned sharing results (also called returned data), third-party applications can also follow the preset format that is unified with the global collection. Specifically, the definition of returned data can be as follows:
[0252]
[0253] In the above example, version is the version number of the data returned by this definition, which is convenient for subsequent iterative updates; exportStartTime is the start time of exporting the returned data, and the data type can be long type; exportEndTime is the end time of exporting the returned data, and the data type can be long type; exportResult represents the export result, and is of int type; failedSumm is a summary of the reasons for failure, which can be expressed in error codes, and the data type is String type. If there are multiple reasons for failure, they can be separated by commas. The specific meaning of the error code can be seen in the value column shown in Table 3 below, and the corresponding meaning can be seen in the correspondence between the value column and the name column, which will not be repeated here.
[0254] Specifically, exportFailedItem contains a detailed description of a single failure reason. Under the definition of exportFailedItem: index is the item number, that is, the serial number of a single material, and the data type is int. If the transmission of a single material 1 fails, the index is 1. Type indicates the type of item, that is, the type of a single material, and the data type is String; textContent indicates the text content of the item, and the data type is String; path indicates the file path of the item, and the data type is String; desc is a description parameter of the failure reason, and the data type is int, expressed in the form of an error code.
[0255] Next, refer to the parameter description shown in Table 5 to understand the meaning of different error codes and desc, as well as the description methods of different failure reasons.
[0256] Table 5
[0257]
[0258] The specific parameter definition is not limited in the embodiments of the present application, as long as a unified definition method is followed to ensure the correct expression of the sharing results.
[0259] Optionally, the application to be shared may also be an application on a terminal device different from the global collection, so that the material to be shared can be transferred between devices.
[0260] The above describes in detail an example of the method provided by the present application. It is understandable that, in order to implement the above functions, the corresponding device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0261] The present application also provides an electronic device, including the above processor. The electronic device provided by this embodiment can be Figure 1 The terminal device 100 shown is used to execute the above-mentioned material sharing method. In the case of an integrated unit, the terminal device may include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of the terminal device, for example, it can be used to support the terminal device to execute the steps performed by the display unit, the detection unit and the processing unit. The storage module can be used to support the terminal device to execute and store program codes and data, etc. The communication module can be used to support the communication between the terminal device and other devices.
[0262] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processor (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a device that interacts with other terminal devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.
[0263] In one embodiment, when the processing module is a processor and the storage module is a memory, the terminal device involved in this embodiment may be a Figure 1 Device of the structure shown.
[0264] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the material sharing method described in any of the above embodiments.
[0265] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the material sharing method in the above-mentioned embodiment.
[0266] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0267] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, the replaced units may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0268] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0269] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0270] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A material sharing method, characterized in that: Applied to Windows operating system, the method includes: Displaying a first interface, wherein the first interface includes a first thumbnail of the first material and a second thumbnail of the second material; When the first thumbnail and the second thumbnail are selected, receiving a first sharing operation input by a user, where the first sharing operation is an operation of sharing the first material and the second material; In response to the first sharing operation, displaying a second interface, the second interface including a first application list, wherein the application programs in the first application list all match the material types of the first material and the second material; receiving a first selection operation input by a user, where the first selection operation is an operation of selecting a first application to be shared from the first application list; In response to the first selection operation, the first material, the second material, and a first association relationship are shared to the first application to be shared, where the first association relationship includes a sequence of the first material and the second material.
2. The method according to claim 1, characterized in that The first interface further includes a third thumbnail of a third material, and the third material and the second material are of different material types. The method further includes: When the first thumbnail and the third thumbnail are selected, receiving a second sharing operation input by a user, where the second sharing operation is an operation of sharing the first material and the third material; In response to the second sharing operation, a third interface is displayed, wherein the third interface includes a second application list, and the application programs in the second application list all match the material types of the first material and the third material.
3. The method according to claim 2, characterized in that The method further comprises: When the first thumbnail is selected, receiving a third sharing operation input by the user, wherein the third sharing operation is an operation of sharing the first material; In response to the third sharing operation, a fourth interface is displayed, wherein the fourth interface includes a third application list, and the application programs in the third application list all match the material type of the first material.
4. The method according to claim 3, characterized in that The application programs in the first application list all match the material types of the first material and the second material, including: the application programs in the first application list all support the material type of the first material and / or the material type of the second material; The application programs in the second application list all match the material types of the first material and the third material, including: the application programs in the second application list all support the material type of the first material and / or the material type of the third material; The application programs in the third application list all match the material type of the first material, including: the application programs in the third application list all support the material type of the first material.
5. The method according to claim 1, characterized in that In response to the first selection operation, sharing the first material, the second material, and the first association relationship to the first application to be shared includes: In response to the first selection operation, determining whether the first application to be shared has been installed; If so, the first material, the second material and the first association relationship are shared to the first application to be shared according to the registration table information of the first application to be shared.
6. The method according to claim 5, characterized in that The method further comprises: If the first application to be shared is not installed, a prompt is given to install or upgrade the first application to be shared.
7. The method according to claim 5 or 6, characterized in that: The registration information includes a material type of a material matching the first application to be shared, and the sharing of the first material, the second material, and the first association relationship to the first application to be shared according to the registration information of the first application to be shared includes: Determining, according to the registration table information, whether the first application to be shared matches a material type of the first material and / or the second material; If so, the first material, the second material and the first association relationship are shared to the first application to be shared.
8. The method according to any one of claims 1 to 7, characterized in that The step of sharing the first material, the second material, and the first association relationship to a first application to be shared includes: Generate export data according to a preset format for the first material, the second material, and the first association relationship, wherein the export data includes: serial numbers of the first material and the second material, material types of the first material and the second material, and text content or file paths of the first material and the second material; The exported data is shared with the first application to be shared.
9. The method according to claim 3, characterized in that: The first material is a composite material, and the composite material is a material formed by combining multiple single materials. The method further includes: Acquire a second association relationship between the multiple single materials; Receiving a second selection operation input by the user on the fourth interface; In response to the second selection operation, determining a second application to be shared from the third application list; The multiple single materials and the second association relationship are shared to the second application to be shared.
10. The method according to claim 9, characterized in that The step of sharing the plurality of single materials and the second association relationship to the second application to be shared includes: Generate export data based on the plurality of single materials and the second association relationship according to a preset format; The exported data is shared to the application to be shared.
11. The method according to claim 10, characterized in that The composite material is an annotated picture formed by inputting annotation content on a background picture, the multiple single materials include the background picture and the annotation content, and the second association relationship includes the relationship that the annotation content is the content annotated on the background picture.
12. The method according to claim 11, characterized in that The exported data includes: the serial numbers of the background image and the annotation content, the material types of the background image and the annotation content, the file path of the background image, the text content or file path of the annotation content, the annotation types of the background image and the annotation content, and the associated serial number of the annotation content, wherein the associated serial number of the annotation content is the serial number of the background image.
13. The method according to claim 11 or 12, characterized in that: The multiple single materials also include a composite picture, where the composite picture is a picture generated by merging the background picture and the annotation content, and the second association relationship also includes the composite picture being a picture generated by merging the background picture and the annotation content.
14. The method according to claim 13, characterized in that The exported data also includes: the serial number of the composite picture, the material type of the composite picture, the file path of the composite picture, the annotation type of the composite picture and the associated serial number of the composite picture, wherein the associated serial number of the composite picture is the serial number of the background picture.
15. The method according to claim 10, characterized in that The composite material is an excerpted video obtained by marking the excerpted content for the original video when performing video excerpting, the multiple single materials include the original video and the excerpted content, and the second association relationship includes: the excerpted content is the content marked on the original video, and the corresponding duration of the excerpted content in the original video.
16. The method according to claim 15, characterized in that The exported data includes: the serial numbers of the original video and the excerpted content, the material types of the original video and the excerpted content, the file path of the original video, the text content or file path of the excerpted content, the excerpt types of the original video and the excerpted content, the associated serial numbers of the excerpted content, and the corresponding duration of the excerpted content in the original video; The associated serial number of the excerpted content is the serial number of the original video, and the excerpted content includes text entered by the user and / or a screenshot captured from the original video.
17. The method according to any one of claims 1 to 16, characterized in that The method further comprises: Acquire a sharing result, where the sharing result is used to indicate whether the first material and the second material are successfully shared to the application to be shared; The sharing result is displayed.
18. The method according to any one of claims 1 to 17, characterized in that The material types include any one or more combinations of text, document, picture, audio, video, web page and compressed package.
19. An electronic device, characterized in that: include: Processors, memory, and interfaces; The processor, the memory and the interface cooperate with each other so that the electronic device executes the method as claimed in any one of claims 1 to 18.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 18.