File transmission method and device, electronic equipment and readable storage medium
By processing files according to the device attributes of the receiving object and using an adapted transmission protocol, the problems of low file transfer efficiency and poor compatibility are solved, achieving efficient and secure cross-device file transfer.
Patent Information
- Application Number
- CN202511901508.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-01-30
AI Technical Summary
Existing file transfer methods are inefficient, have limited formats and poor compatibility, resulting in complex user operations and inefficient data interaction.
By receiving the device attributes of the target file, the first file is processed to generate a compatible second file, which is then transmitted using a matching transmission protocol, including format conversion, content extraction, and encryption, to ensure efficient, secure, and compatible transmission of the file between different terminals.
It improves file transfer efficiency, reduces user operations, ensures consistency between content format and security policies, and enhances user experience and data interaction efficiency.
Smart Images

Figure CN121441901A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of document processing, and particularly relates to a file transmission method and device, electronic equipment and readable storage medium. BACKGROUND
[0002] File transmission refers to that one device sends a file to other devices. The file here can be a document or a compressed package. At present, file transmission has the problem of low efficiency. SUMMARY
[0003] The embodiments of the present application provide a file transmission method, device, electronic equipment and readable storage medium, and the efficiency of file transmission can be improved.
[0004] In a first aspect, the embodiments of the present application provide a file transmission method, which comprises: receiving a first input for a first file and a receiving object; processing the first file according to a device attribute corresponding to the receiving object to obtain a second file; and transmitting the second file to the receiving object.
[0005] In a second aspect, the embodiments of the present application provide a file transmission device, which comprises: a receiving unit configured to receive a first input for a first file and a receiving object; a processing unit configured to process the first file according to a device attribute corresponding to the receiving object to obtain a second file; and a transmitting unit configured to transmit the second file to the receiving object.
[0006] In a third aspect, the embodiments of the present application provide electronic equipment, which comprises a processor and a memory. The memory stores programs or instructions executable on the processor. When the programs or instructions are executed by the processor, the steps of the file transmission method according to the first aspect are implemented.
[0007] In a fourth aspect, the embodiments of the present application provide a readable storage medium, which stores programs or instructions. When the programs or instructions are executed by the processor, the steps of the file transmission method according to the first aspect are implemented.
[0008] In the embodiments, the first input for the first file and the receiving object is received, the first file is processed according to the device attribute corresponding to the receiving object to obtain the second file, and the second file is sent to the receiving object. Since the second file is adapted according to the device attribute of the receiving object, the user operation is saved, and the efficiency of file transmission is improved. BRIEF DESCRIPTION OF DRAWINGS
[0009] Figure 1a An application architecture block diagram of file transmission provided for an embodiment of the present application is shown in FIG. 1. Figure 1b An application architecture block diagram of file transmission provided for another embodiment of the present application is shown in FIG. 2. Figure 2 A flowchart of a file transmission method provided by an embodiment of the present application is shown in the figure; Figure 3 An interface diagram of a file transmission method provided by an embodiment of the present application is shown in the figure; Figure 4 An interface diagram of a file transmission method provided by an embodiment of the present application is shown in the figure; Figure 5 An interface diagram of a file transmission method provided by an embodiment of the present application is shown in the figure; Figure 6 An interface diagram of a file transmission method provided by an embodiment of the present application is shown in the figure; Figure 7 An interface diagram of a file transmission method provided by an embodiment of the present application is shown in the figure; Figure 8 A structural block diagram of a file transmission device provided by an embodiment of the present application is shown in the figure; Figure 9 A structural block diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0010] The technical solutions in the embodiments of the present application will be described clearly below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0011] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of a kind and are not limited to the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / ", generally indicates that the front and rear associated objects are in an "or" relationship.
[0012] Figure 1aThis diagram illustrates an application architecture block diagram for file transfer according to an embodiment of this application. The file transfer system includes a first device and a receiving object, which can be an electronic device or a contact. Specifically, the electronic device can be a smartphone, tablet, laptop, or smartwatch, etc. The first device refers to the initiator of the file transfer, and the receiving object refers to the receiver of the file transfer. A first file is transferred between the first device and the receiving object. The first file refers to a combination containing different types of content (e.g., text, images), which can be a single document or a compressed file containing multiple documents.
[0013] Figure 1b This illustration shows an application architecture block diagram for file transfer according to another embodiment of this application. The file transfer system includes a first device and multiple receiving objects. Figure 1b The diagram shows the first and second recipients. It should be noted that more recipients may be included. The first and second recipients can be electronic devices or other devices associated with the contact.
[0014] Between the first device and the receiving object, the first device initiates the connection. If the receiving object is an electronic device, it can respond to the first device's connection command. The first device and the receiving object can connect via Bluetooth, a local area network (LAN), or other methods. For example, in a Bluetooth connection, the first device searches for nearby electronic devices, lists connectable Bluetooth devices as receiving objects, and the receiving object responds to the first device's connection request, becoming a receiving object. Similarly, in a LAN connection, the first device and the receiving object are connected to the same LAN, list connectable devices within the same LAN as receiving objects, and the receiving object responds to the first device's connection request, becoming a receiving object. File transfer refers to a device sending a file to a connected receiving object. For example, the first device can transfer a file via a dedicated program (e.g.,...). Figure 3 For example, a first device might send files to other devices on its network using a dedicated transfer program. Another example is a first device sending files to other devices on its network using a transfer program as an auxiliary function (e.g., a workgroup in a session application, where transfer is an auxiliary function of the workgroup). Figure 1a and Figure 1b The system architecture diagrams for file transfer shown can all be applied to the above scenarios.
[0015] The file transfer method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0016] like Figure 2 As shown, this application provides a file transfer method, which may include the following steps S200 to S220: S200: receiving a first input for a first file and a receiving object; Specifically, the first file refers to a single document or a compressed package file containing various types of content such as text, pictures, etc. The receiving object is one or more target devices, which can be electronic devices or devices associated with contacts. The first input is triggered by the user on the first device to specify the first file to be transmitted and the corresponding receiving object. The user completes the first input by clicking, dragging, or menu selection, which is described in detail in subsequent embodiments and will not be repeated here.
[0017] S210: processing the first file according to the device attribute corresponding to the receiving object to obtain a second file; Specifically, the device attribute corresponding to the receiving object can be the hardware configuration, operating system type, screen size, supported file format, and network communication capability of the device. The first device can process the first file by analyzing these attributes to generate a second file that meets the content presentation and processing needs of the target device.
[0018] Among them, the second file refers to a file form that is adapted to the device attribute of the receiving object after format conversion, compression or encryption processing. The first device processes the first file according to the device attribute of the receiving object to generate a second file that matches it. For example, when the receiving object is a mobile device with text processing capability, the first device converts the first file of the image type to a second file in an editable text format; when the receiving object is a desktop terminal in an office scenario, the first file is compressed and encrypted to obtain a second file in an encrypted format.
[0019] S220: transmitting the second file to the receiving object.
[0020] Specifically, the first device sends the second file to the receiving object, which can be transmitted through an adaptive transmission protocol such as Bluetooth, Wi-Fi, cloud synchronization, which can be selected by those skilled in the art according to actual needs. Specifically, on the interface of the first device, the first confirmation control can be triggered by touch or mouse selection, such as the "Confirm Send" button in Figure 5 .
[0021] In the embodiments of the present application, by receiving a first input for a first file and a receiving object, specifying a first file to be transmitted and a corresponding receiving object, processing the first file according to the device attribute of the receiving object, generating a second file that adapts to the device attribute, and then sending the second file to the receiving object through a matching transmission protocol, efficient, secure and compatible transmission of files between different terminals is achieved. This method breaks through the limitations of single format and poor compatibility in traditional file transmission, and improves user experience and data interaction efficiency.
[0022] In any of the above embodiments, optionally, the first file is processed according to the device attribute corresponding to the receiving object to obtain a second file, and the processing includes: S302: The file format of the first file is converted according to the device attribute corresponding to the receiving object to obtain a second file, and the file format of the second file matches the device attribute.
[0023] Specifically, the first device automatically identifies the supported file format type according to the device attribute of the receiving object, and converts the first file into a format compatible with the receiving object. For example, if the original format is a complex layout table document, and the target device is a smart watch, the device attribute only supports processing lightweight text content, so the table needs to be stripped off during conversion, and only the text content is retained to obtain a second file with only text content.
[0024] In this embodiment, the problem that the second file after transmission cannot be processed due to the incompatibility between the original format of the first file and the device attribute is avoided. After converting the file format of the first file, the time-consuming of format analysis of the target device can be reduced, and the processing speed is improved. At the same time, through the file format conversion, the target content volume can be reduced, the transmission bandwidth occupation is reduced, and the content format meets the processing requirements of the target device.
[0025] In any of the above embodiments, optionally, the first file is processed according to the device attribute corresponding to the receiving object to obtain a second file, and the processing includes: S402: The target content is extracted from the first file according to the device attribute corresponding to the receiving object to obtain a second file, and the target content matches the device attribute.
[0026] As shown in Figure 7 , the target content refers to the part of information selected from the first file and matched with the device attribute of the receiving object. It should be noted that the first file can be a multi-content folder, a multi-page document, a compressed package, etc. If the first file is a multi-page document containing tables, pictures, and text, the target content can be pure text or a combination of pictures and text. If the receiving object is an e-book reader, the target content can be extracted as a pure text paragraph without format markers, and if the receiving object is a smart phone, the target content can be extracted as a web format content containing pictures and text.
[0027] In this embodiment, the content in the first file corresponding to the device attribute is determined as the target content according to the device attribute corresponding to the receiving object, the invalid content in the target file transmission process is excluded, only the content supported by the device attribute is selected, the transmission of full content is avoided, the transmission redundancy is reduced, and the transmission efficiency is improved.
[0028] In any of the above embodiments, optionally, the receiving object corresponds to N devices, the N devices have different device attributes, and the target content is extracted from the first file according to the device attributes corresponding to the receiving object to obtain the second file, including: S402: Extract M different target contents from the first file according to the N different device attributes corresponding to the receiving object to obtain M second files, where M is greater than or equal to N, and M and N are positive integers; Transmitting the second file to the receiving object, including: S404: Transmitting the corresponding second file to the N devices corresponding to the receiving object.
[0029] It should be noted that the first device extracts different target contents from the first file according to the device attributes corresponding to the receiving object, and multiple second files adapted to different device attributes can be generated for one file to realize one-to-many accurate distribution. For example, when the receiving objects include a smartphone, a tablet computer, and an e-book reader, the system will automatically identify the device attributes of each receiving object, extract the graphic-text layout content, high-definition image, or pure text paragraph, transmit the graphic-text webpage format content to the smartphone, transmit the high-definition image and interactive chart to the tablet computer, and transmit the deformatted pure text paragraph to the e-book reader.
[0030] Specifically, the correspondence between the multiple second files and the multiple receiving objects is displayed in an intuitive visual form on the interface of the first device. The specific display method can be icon connection type or list correspondence type, which is not limited herein. For example, Figure 5 If photo 1 and photo 2 are displayed on the interface as corresponding to the smartphone A, and the excel table is displayed as corresponding to the PC, then photo 1 and photo 2 are sent to the smartphone A, and the excel table is sent to the PC.
[0031] In this embodiment, the first device extracts target content matching each device attribute from the first file according to the device attributes of the receiving object, generates multiple adapted second files, and transmits them to the corresponding receiving devices. This ensures that each device obtains the most suitable content form, while avoiding irrelevant data redundancy transmission, thereby improving overall efficiency.
[0032] In any of the above embodiments, optionally, the device attributes include at least one of the hardware type and the privacy attribute of the device.
[0033] In this embodiment, the hardware type of the device covers mobile terminals, desktop terminals, wearable devices, etc., and the privacy attribute includes public, internal, confidential, and other levels. The system adapts the content presentation format according to the hardware type, and controls the file access permission in combination with the privacy attribute, to ensure that the content is displayed safely on the appropriate device. For example, classified documents are only allowed to be viewed on a desktop terminal with decryption permission, while ordinary text and images are automatically adapted for mobile browsing. When the device attribute contains both the hardware type and the privacy, the system will perform double matching to ensure that the content format and security policy are consistent.
[0034] In any of the above embodiments, optionally, after converting the file format of the first file according to the device attribute corresponding to the receiving object, obtaining the second file, the file transmission method further comprises: S502: display the correspondence between the file format and the receiving object, and a confirmation control of the correspondence; S504: receiving the trigger of the confirmation control.
[0035] The confirmation control refers to an interactive interface element for triggering the target file conversion operation. Its form is usually a button, icon or menu option, with an explicit function prompt, which is not limited here. After the user triggers it, the process of converting the target file into multiple target contents is started.
[0036] Specifically, triggering the confirmation control on the first device interface can pass the instruction to confirm the first file through clicking, touch, etc. The target file is confirmed according to the device attribute.
[0037] It should be noted that the first device processes each device corresponding to the receiving object one by one. For a single device, the single device may have both the hardware type and the privacy attribute of the device. Taking the receiving object as a mobile phone as an example, since the mobile phone can edit text content and view pictures, its hardware type can be text processing type and picture viewing type. At the same time, since it is long-term in the office area, its privacy attribute can be office type. Since the mobile phone meets the text processing type, picture viewing type and office type, it can receive the text and pictures in the office file.
[0038] In this embodiment, by triggering the confirmation control, the target content of the device attribute is accurately converted and adapted, reducing transmission redundancy and avoiding the presentation of no matching relationship. Such intuitive display provides an interactive basis for subsequent user adjustment of the correspondence, allowing users to directly operate based on the visualized correspondence.
[0039] In any of the above embodiments, optionally, according to the device attribute corresponding to the receiving object, the target content is extracted from the first file to obtain the second file, comprising: S602: Extract the target content from the first file according to the device attribute corresponding to the receiving object; S604: Obtain the first identifier of the first file and the first position of the target content in the first file; S606: Generate a second file based on the target content, the first identifier, and the first position; S608: Receive a third file from the receiving object, the third file containing the first identifier, the first position, and the processed target content obtained by processing the target content; S610: Find the first file according to the first identifier and insert the processed target content into the first file according to the first position.
[0040] The first identifier refers to identification information that uniquely distinguishes the first file. For example, if the first file is a document, the first identifier can be the document name or the storage address of the document in the first device. Since the document name and storage address are unique, they can be used to distinguish the document from other documents.
[0041] The first position refers to information about the position of the target content in the original first file, ensuring that the target content can be returned to the original document after subsequent processing. For example, Figure 6 For example, a table is extracted from the second page and third row of document A, and the second page and third row are the first position. When the target file is transmitted to the target device, it is often necessary to process it and send it back, such as filling in the excel table and sending it back. Through the first position, the position of the returned target content when it is restored to the target file can be clearly understood.
[0042] The first position can be a combination of page numbers and paragraph numbers, or a range of table rows and columns, or the insertion order of pictures in the document.
[0043] It should be noted that since the first identifier is the identification information provided by the first file, and the first position is also the position information provided by the original target file, the acquisition of the first identifier and the first position can be completed by reading directly, which ensures the correctness of the acquired information.
[0044] Specifically, the first identifier and the first position are written as additional data into the internal data structure of the target content, making them part of the target content. The writing operation can be specifically represented as, for example, if the target content is a text segment, the first identifier, such as Doc-001, and the first position, such as page 3, paragraph 2, can be added to the metadata of the text data (such as hidden fields, attribute tags). For another example, if the target content is a picture or video segment, the two information can be written in the file attributes (such as EXIF information, media metadata), ensuring that the target content has an identity tag and position information during transmission.
[0045] Specifically, the target content having been written with the first identity and the first position is sent to the corresponding device of the corresponding receiving object according to the correspondence between the target content and the target device determined in the foregoing.
[0046] It should be noted that each target content is only transmitted to the target device corresponding to the receiving object. If a target content corresponds to multiple devices corresponding to receiving objects, the target content containing the same identity and position information will be transmitted to the multiple devices corresponding to the receiving objects respectively.
[0047] The meaning of processing the target content by the target device and returning is as described above, because in many cases, it is expected that the receiving object corresponding device can perfect the first file and return. For example, if the target file contains an excel table, it is transmitted to the receiving object corresponding device to let the receiving object corresponding device fill in and return. At this time, the third file obtained by processing the target content needs to be received from the receiving object corresponding device.
[0048] Specifically, the return initiated by the receiving object corresponding device needs to be noted that it can be initiated by the receiving object corresponding device, such as the user clicking on the target device to complete and synchronize, or it can be actively requested by the first device at regular intervals, such as querying the receiving object corresponding device whether it has completed processing every pre-set period.
[0049] Optionally, during the receiving process, the first device will check the integrity of the processed target content to avoid data loss during transmission and confirm whether the first identity and the first position are complete.
[0050] It should be noted that if multiple receiving object corresponding devices have received the same target content, the first device will receive the processed target content returned by each receiving object corresponding device respectively.
[0051] Specifically, the first device reads and parses the first identity and the first position written before from the received processed target content.
[0052] It should be noted that the first identity and the first position information are not deleted in the process of processing the target content by the target device, and the specific extraction method depends on the storage form of the information.
[0053] Specifically, the first file originally extracted is located through the unique first identity, ensuring that the processed target content can return to the original first file and avoiding confusion.
[0054] Specifically, the processed target content is accurately placed back to the original position in the original first file, ensuring the structural integrity of the original first file.
[0055] In the embodiment, the first device extracts the unique first identifier after receiving the processed target content, so that the processed target content in the third file is not mistakenly added to other files, and extracts the first position information, so that the processed content does not affect other content in the original first file, and accurate insertion is realized. In this way, the accuracy of obtaining information is ensured, the risk of misoperation is reduced, and the reliability of cross-device transmission is improved.
[0056] In any of the above embodiments, optionally, the first file is searched according to the first identifier, and the processed target content is inserted into the first file according to the first position, comprising: S702: If the same first identifier and the same first position are extracted from the received multiple third files, the processed target content in the multiple third files is integrated to obtain integrated content; S704: The first file is searched according to the first identifier, and the integrated content is inserted into the first file according to the first position.
[0057] It should be noted that the same first identifier is extracted from the multiple processed target contents in the third file, and the same first position is extracted, which is basically due to the fact that the same target content is transmitted to the devices corresponding to multiple receiving objects, and different processing is performed by the devices corresponding to multiple receiving objects. At this time, it is necessary to integrate the multiple processed target contents. This often occurs in practice. For example, an excel table contains multiple items filled by users, which is intentionally transmitted to multiple target devices corresponding to multiple users, so as to be filled by multiple users. Each user fills in his own item and returns. Thus, at the first device end, it is necessary to integrate the excel tables returned by the multiple target devices.
[0058] Specifically, the specific way of searching the target file according to the first identifier and inserting the integrated target content into the first file according to the first position is the same as the way of searching the first file according to the first identifier and inserting the ordinary processed target content into the first file according to the first position, which will not be repeated here.
[0059] In the embodiment, since the first device receives the processed target content in at least two and more third files, the first identifier extracted from these processed target contents is completely consistent, and the first position extracted is also completely consistent, so multiple processing results may exist in the same position. The processing results of the devices corresponding to the multiple receiving objects are integrated and accurately returned to the original first file in the present application, misoperation is avoided, the structure of the integrated content is ensured not to damage the original file through positioning of the first position, and the efficiency and accuracy of cross-device transmission are improved.
[0060] In any of the above embodiments, optionally, receiving the first input for the first file and receiving the object comprises: S802: Displaying an object selection control; S804: In response to triggering the object selection control, displaying a candidate object list; S806: In response to selecting the candidate object list, determining the selected candidate object as the receiving object.
[0061] The object selection control refers to an interactive element for triggering an object selection interface or directly selecting an object. Common forms can be buttons, options, drop-down selection boxes, etc., which are not specifically limited here. The control is usually located in a prominent position of the interface to ensure that the user can quickly identify and trigger it. For example, Figure 3 An "object selection" button can be added in the interface to receive the selection of the object. Figure 3 In the above embodiment, the process is not shown, but the interface after selecting the receiving object is directly shown.
[0062] The candidate receiving object list refers to a set of devices that can receive the target content. It can help users quickly judge and select the device to which the content is to be transmitted. The candidate receiving object list is not shown in the figure. It can be considered that the candidate receiving object list is displayed before the interface shown in Figure 3 For example, the candidate receiving object list includes devices A-D, and the user selects devices A-C in it, so that the selection result page in Figure 3 Only devices A-C are displayed. The candidate receiving object list can list the device identifiers, device states, device types, connection methods, etc. of the candidate devices, which are not specifically limited here. It can be an icon set composed of multiple candidate receiving object icons, a detailed information list containing detailed information of multiple candidate receiving objects, etc.
[0063] Specifically, selecting the receiving object corresponding device in the displayed candidate receiving object list can be selected by checking, clicking, etc. After selection, the selection result is recorded, such as displaying a check mark next to the selected device. Then, the interface is updated to visually present all the devices that the user has just selected, such as Figure 3 The receiving object is devices A-C in
[0064] The updated interface still has a confirmation control. After the user confirms that the receiving object is correct, the user can trigger the confirmation control to start the process of extracting the first file into multiple target contents.
[0065] In the embodiment, the display of the candidate receiving object list is triggered by setting the object selection control, and the candidate receiving object list is used to display a plurality of connected candidate receiving objects, so as to facilitate the user to select the receiving object of the transmitted file. By selecting the receiving object in the candidate receiving object list, the user can freely select the device for transmission, eliminate the interference of other devices, and avoid information leakage. The interface of the first device is synchronously updated and displayed, only the selected device and the confirmation control are displayed, the user is facilitated to perform the next extraction trigger, and the interference of other controls on the interface operation is avoided.
[0066] In any of the above embodiments, optionally, the first input for the first file and the receiving object includes: S902: Display a file selection control; S904: In response to the trigger of the file selection control, display a candidate file list; S906: In response to the selection of the candidate file list, determine the selected candidate file as the first file.
[0067] The file selection control refers to an interactive element used to trigger a target file selection interface, and its core function is to allow the user to select the file to be processed from the local storage of the first device, the cloud or the associated location. The common forms can be buttons, options, icons, etc., which are not specifically limited here. Figure 3 And The "document" icon of Figure 4 is an example of the file selection control.
[0068] Specifically, the user expresses the intention to select the target file by triggering the file selection control on the interface of the first device (the specific way of triggering can be clicking, touching, etc.).
[0069] The candidate file list refers to a set of files that can be used for cross-device transmission, such as a set of documents or a set of compressed packages. When the candidate file list is a set of documents, the selected target file is a document. When the candidate file list is a set of compressed packages, the selected target file is a compressed package. The candidate file list can be presented as an icon set composed of a plurality of candidate file icons, a candidate file detailed information list, etc., to adapt to the browsing needs of different content types.
[0070] Specifically, in the displayed candidate file list, one or more files can be selected by checking, clicking, etc. Record the selection result, such as displaying a check mark for the selected item. Then, the interface is updated to only display the selected target file. For example, when the user selects only document 2 in the candidate document set (including documents 1-4), the icon of document 2 is displayed in the position of the general "document" icon on the interface of Figure 3 .
[0071] In this embodiment, a file selection control is set to trigger the display of a candidate file list. The candidate file list is displayed on the first device interface, allowing the user to select a file from the candidate file list and determine the candidate file as the target file. This enables different files to be selected and transmitted to other devices, improving transmission flexibility and meeting the needs of various complex scenarios.
[0072] In any of the above embodiments, optionally, the corresponding second file is transmitted to N devices corresponding to the receiving object, including: S1002: Display the correspondence between N devices and M second files; S1004: In response to the first confirmation operation on the correspondence, each second file is sent to the device corresponding to the second file.
[0073] In this embodiment, the correspondence between N devices and M second files is displayed. In response to the first confirmation operation of the correspondence, each second file is sent to the device corresponding to the second file. The complex multi-path distribution decision results are presented in an intuitive way, and the sending is completed through a simple confirmation operation, which simplifies the user operation and provides a confirmation opportunity before final sending, effectively preventing the mis-sending of files due to the system's automatic matching deviation.
[0074] In any of the above embodiments, optionally, the N devices include a first target device and a second target device, and the M second files include target second files; after displaying the correspondence between the N devices and the M second files, the file transfer method further includes: S1102: In response to dragging the target second file corresponding to the first target device from the first position to the second position, modify the target second file to match the second target device, wherein the first position is located near the first icon of the first target device and the second position is located near the second icon of the second target device.
[0075] Before dragging, the first target device has established a correspondence with the second target file, and this correspondence is visually displayed on the interface of the first device (e.g., ...). Figure 5 (Establish a correspondence between "Photo 1" and "Phone A"). Select and drag the target second file (e.g., drag "Photo 1"). The target second file can be identified by a identifiable target second file icon on the interface. Move the dragged target second file from near the first icon to near the second icon of the device corresponding to the second receiving object (e.g., ...). Figure 5 (See "PC version" below). This allows for manual adjustments to the automatically generated mapping between target content and devices, correcting erroneous mappings or adapting to personalized user needs, thus improving the accuracy of cross-device data transfer.
[0076] When the target second file is dragged from the first position to the second position, cancel the display of the original correspondence between the target second file and the first target device (for example, cancel the correspondence between photo 1 and mobile phone A in Figure 5 Correspondence between photo 1 and PC is established).
[0077] In this embodiment, by dragging the target second file, the adjustment program for adjusting the transmission object of the target second file is triggered, and there is no need to return to the interface for selecting the device and the type, the interface can provide real-time feedback on the adjustment result, and the efficiency of cross-device content transmission is improved.
[0078] In any of the above embodiments, optionally, the N devices include the first target device, and the M second files include the target second file; after displaying the correspondence between the N devices and the M second files, the file transmission method further includes: S1202: display a recycle control; S1204: in response to dragging the target second file corresponding to the first target device from the first position to the recycle control, cancel the matching relationship between the first target device and the target second content, wherein the first position is near the first icon of the first target device.
[0079] The recycle control refers to a display element on the interface for recycling the correspondence between the target content and the device (for example, a recycle bin icon can be added on the interface in Figure 5 The display element can be a button, an option, etc. in addition to an icon, which is not limited here.
[0080] In addition, in some embodiments, the "document" icon in Figure 5 Also can play a recycling role.
[0081] Specifically, on the interface of the first device, the target second file can be dragged from the original position to the recycle control by touch or mouse selection.
[0082] Specifically, when the target second file is dragged to the recycle control on the interface of the first device, the correspondence of the target content on the interface is canceled. On the interface of the first device, the original correspondence between the target content and the corresponding device is no longer displayed.
[0083] For example, the recycle control is Figure 5Taking the "Documents" icon as an example, initially, photo 1 is associated with phone A, with a corresponding connection. If a user discovers that photo 1 shouldn't be sent to any target device, they won't drag photo 1 near other target devices; instead, they will drag it directly to the "Documents" icon. In this way, photo 1 will no longer be associated with any target device and will therefore not be sent to any target device.
[0084] In this embodiment, a convenient way to quickly cancel the correspondence between target content and device is provided. There is no need to return to the interface for selecting device and matching type. The transmission association between the first target content and the first target device can be terminated in real time. At the same time, the interface provides real-time feedback on the operation result, which improves the flexibility and versatility of content transmission processing.
[0085] In any of the above embodiments, optionally, the N devices include a first target device and a second target device, and the M second files include target second files; after displaying the correspondence between the N devices and the M second files, the file transfer method further includes: S1302: In response to the copy operation on the target second file, display the copied target second file; S1304: In response to dragging the copied target second file to the second position, modify the target second file to match the first target device and the second target device, wherein the second position is located near the second icon of the second target device.
[0086] The copy operation refers to the interactive action initiated on the first device that triggers the system to generate a copy. It should be noted that its specific form must conform to the common interactive logic of the device, such as touching and long-pressing the target content, or right-clicking the mouse, etc. No specific restrictions are imposed here.
[0087] Specifically, on the visual interface of the first device, the existing target content is copied. For example, it should be noted that... Figure 5 Before the confirmation operation, Figure 5 Not shown in the image, you can touch and long-press the icon in image 1, then... Figure 5 An icon identical to that of photo 1 appears on the interface; that is, the icon for copied photo 1.
[0088] In other words, by copying and generating a copy and displaying it, users can retain the correspondence between the original target content and the first target device, while dragging the copy of the target content to the second target device, so that the first target content corresponds to both devices corresponding to the first and second receiving objects.
[0089] It should be noted that, in Figure 5 Before the confirmation operation, Figure 8Not shown in the image, you can long-press on the icon of Photo 1 to create a copy of the Photo 1 icon. Drag the copy of the Photo 1 icon below the icon on the PC. At this point, the original Photo 1 icon is connected to the icon on Phone A, and the copy of the Photo 1 icon is connected to the icon on the PC. Photo 1 now corresponds to both Phone A and the PC and will be sent to both for transfer.
[0090] In this embodiment, the same target content is transmitted to multiple devices by copying and dragging the second target file. Without repeatedly extracting the target file, one target content can be associated with multiple target devices simultaneously. After confirming the trigger operation, the first target content corresponds to both the first and second target devices, satisfying the requirement for synchronous transmission of the same target content across devices.
[0091] like Figure 9 As shown, this application embodiment provides a file transfer device 100, including: The receiving unit 102 is configured to receive a first input for the first file and the receiving object; Processing unit 104 is used to process the first file according to the device attributes corresponding to the receiving object to obtain the second file; The transmission unit 106 is used to transmit a second file to the receiving object.
[0092] The file transfer device 100 provided in this application embodiment allows the first device to obtain the first type of the target device to which the target file is to be transferred, thereby understanding the content types that the target device supports receiving. Then, it only transmits the part of the content that is suitable for receiving, without requiring the user to manually process the first file, thereby improving the efficiency of file transfer.
[0093] Optionally, embodiments of this application provide a file transfer device 100, wherein the processing unit 104 is specifically used for: Based on the device attributes corresponding to the receiving object, the file format of the first file is converted to obtain the second file, and the file format of the second file matches the device attributes.
[0094] Optionally, embodiments of this application provide a file transfer device 100, wherein the processing unit 104 is specifically used for: Based on the device attributes corresponding to the receiving object, the target content is extracted from the first file to obtain the second file, and the target content matches the device attributes.
[0095] Optionally, this application embodiment provides a file transfer device 100, where the receiving object corresponds to N devices, and the N devices have different device attributes. The processing unit 104 is specifically used for: The processing unit 104 is specifically configured to: extract M target contents from the first file according to N different device attributes corresponding to the receiving object, to obtain M second files, where M is greater than or equal to N, and M and N are positive integers. The transmission unit 106 is specifically configured to: transmit the corresponding second file to the N devices corresponding to the receiving object respectively.
[0096] Optionally, an embodiment of the present application provides a file transmission device 100, and the device attribute includes at least one of a hardware type and a privacy attribute of the device.
[0097] Optionally, an embodiment of the present application provides a file transmission device 100, and the processing unit 104 is specifically configured to: display a corresponding relationship between the file format and the receiving object, and a confirmation control of the corresponding relationship; receive a trigger of the confirmation control.
[0098] Optionally, an embodiment of the present application provides a file transmission device 100, and the processing unit 104 is specifically configured to: extract a target content from the first file according to a device attribute corresponding to the receiving object; obtain a first identifier of the first file and a first position of the target content in the first file; generate a second file based on the target content, the first identifier and the first position.
[0099] Optionally, an embodiment of the present application provides a file transmission device 100, and the processing unit 104 is further specifically configured to: receive a third file obtained by processing the second file from the receiving object, the third file including the first identifier, the first position and a processed target content obtained by processing the target content; find the first file according to the first identifier, and insert the processed target content into the first file according to the first position.
[0100] Optionally, an embodiment of the present application provides a file transmission device 100, and the processing unit 104 is further specifically configured to: if the same first identifier and the same first position are extracted from the received multiple third files, integrate the processed target contents in the multiple third files to obtain integrated content; find the first file according to the first identifier, and insert the integrated content into the first file according to the first position.
[0101] Optionally, an embodiment of the present application provides a file transmission device 100, and the receiving unit 102 is specifically configured to: display an object selection control; in response to a trigger of the object selection control, display a candidate object list; In response to the selection of the candidate object list, the selected candidate object is determined as the receiving object.
[0102] Optionally, the embodiment of the present application provides a file transmission device 100, and the receiving unit 102 is specifically used for: displaying a file selection control; In response to the triggering of the file selection control, a candidate file list is displayed. In response to the selection of the candidate file list, the selected candidate file is determined as the first file.
[0103] Optionally, the embodiment of the present application provides a file transmission device 100, and the processing unit 104 is specifically used for: displaying a correspondence relationship between N devices and M second files; In response to a first confirmation operation on the correspondence relationship, each second file is sent to the device corresponding to the second file.
[0104] Optionally, the embodiment of the present application provides a file transmission device 100, and the N devices include a first target device and a second target device, and the M second files include a target second file; the processing unit 104 is further specifically used for: In response to the dragging of the target second file corresponding to the first target device from a first position to a second position, the target second file is modified to match the second target device, wherein the first position is near a first icon of the first target device, and the second position is near a second icon of the second target device.
[0105] Optionally, the embodiment of the present application provides a file transmission device 100, and the N devices include a first target device, and the M second files include a target second file; after the display of the correspondence relationship between the N devices and the M second files, the processing unit 104 is further used for: displaying a recycle control; In response to the dragging of the target second file corresponding to the first target device from a first position to the recycle control, the matching relationship between the first target device and the target second content is cancelled, wherein the first position is near a first icon of the first target device.
[0106] Optionally, the embodiment of the present application provides a file transmission device 100, and the N devices include a first target device and a second target device, and the M second files include a target second file; after the display of the correspondence relationship between the N devices and the M second files, the processing unit 104 is further specifically used for: In response to a copy operation on the target second file, the copied target second file is displayed; in response to dragging the copied target second file to a second position, the target second file is modified to match the first target device and the second target device, wherein the second position is located near the second icon of the second target device.
[0107] The file transfer device 100 in this embodiment can be an electronic device 300, or a component within the electronic device 300, such as an integrated circuit or a chip. The electronic device 300 can be a terminal, or other devices besides a terminal. For example, the electronic device 300 can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This embodiment does not specifically limit the device.
[0108] The file transfer device 100 in this embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment does not impose specific limitations.
[0109] Optionally, such as As shown, this application embodiment also provides an electronic device 300, which can be a first device or other target devices. It includes a processor 302 and a memory 304. The memory 304 stores a program or instructions that can run on the processor 302. When the program or instructions are executed by the processor 302, they implement the various steps of the above-described file transfer method embodiment and achieve the same technical effect. To avoid repetition, further details are omitted here.
[0110] It should be noted that the electronic device 300 in this application embodiment includes the aforementioned mobile electronic device and non-mobile electronic device.
[0111] The embodiment of the present application further provides a readable storage medium, and the readable storage medium stores programs or instructions, the programs or instructions are executed by the processor 302 to realize the processes of the file transmission method embodiments, and the same technical effects can be achieved, and details are not described herein again to avoid repetition.
[0112] The processor 302 is the processor 302 in the electronic device 300 in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.
[0113] The embodiment of the present application provides a computer program product, the program product is stored in a storage medium, the program product is executed by at least one processor to realize the processes of the file transmission method embodiments, and the same technical effects can be achieved, and details are not described herein again to avoid repetition.
[0114] It should be noted that in this paper, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the present application is not limited to the order of the functions shown or discussed, but also includes the functions performed in a substantially simultaneous manner or in the opposite order, for example, the described method can be performed in a different order from the described order, and various steps can also be added, omitted or combined. In addition, the features described with reference to some examples can be combined in other examples.
[0115] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions for making a terminal (which can be a mobile phone, computer, server or network equipment, etc.) execute the method of each embodiment of the present application.
[0116] The embodiments of the present application are described above with reference to the accompanying drawings, but the present application is not limited to the specific embodiments described above, and the specific embodiments described above are merely illustrative, but not restrictive, and a person of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims.
Claims
1. A file transfer method characterized by, The method comprises: receiving a first input for a first file and a receiving object; processing the first file according to a device attribute corresponding to the receiving object to obtain a second file; transmitting the second file to the receiving object.
2. The file transfer method of claim 1, wherein, The processing the first file according to the device attribute corresponding to the receiving object to obtain the second file comprises: converting a file format of the first file according to the device attribute corresponding to the receiving object to obtain the second file, wherein the file format of the second file matches the device attribute.
3. The file transfer method of claim 1, wherein, The processing the first file according to the device attribute corresponding to the receiving object to obtain the second file comprises: extracting target content from the first file according to the device attribute corresponding to the receiving object to obtain the second file, wherein the target content matches the device attribute.
4. The file transfer method of claim 3, wherein, The receiving object corresponds to N devices, the device attributes of the N devices are different, and the extracting the target content from the first file according to the device attribute corresponding to the receiving object to obtain the second file comprises: extracting M different target contents from the first file according to N different device attributes corresponding to the receiving object to obtain M second files, wherein M is greater than or equal to N, and M and N are positive integers. The transmitting the second file to the receiving object comprises: transmitting the corresponding second files to the N devices corresponding to the receiving object respectively.
5. The file transfer method of claim 1, wherein, The device attribute comprises at least one of a hardware type and a privacy attribute of the device.
6. A file transfer apparatus characterized by comprising: The method comprises: receiving a first input for a first file and a receiving object; processing the first file according to a device attribute corresponding to the receiving object to obtain a second file; transmitting the second file to the receiving object.
7. The file transfer apparatus according to claim 6, characterized by The processing unit is specifically configured to convert a file format of the first file according to the device attribute corresponding to the receiving object to obtain the second file, wherein the file format of the second file matches the device attribute.
8. The file transfer apparatus according to claim 6, characterized by The processing unit is specifically configured to extract target content from the first file according to the device attribute corresponding to the receiving object to obtain the second file, wherein the target content matches the device attribute.
9. The file transfer apparatus according to claim 8, characterized by The receiving object corresponds to N devices, the device attributes of the N devices are different, and the processing unit is specifically configured to: extract M different target contents from the first file according to N different device attributes corresponding to the receiving object to obtain M second files, wherein M is greater than or equal to N, and M and N are positive integers. The transmitting unit is specifically configured to: transmit the corresponding second files to the N devices corresponding to the receiving object respectively.
10. The file transfer apparatus according to claim 6, characterized by The device attribute comprises at least one of a hardware type and a privacy attribute of the device.
11. An electronic device, comprising: The device attribute comprises at least one of a hardware type and a privacy attribute of the device. The device attribute comprises at least one of a hardware type and a privacy attribute of the device. The device attribute comprises at least one of a hardware type and a privacy attribute of the device.
12. A readable storage medium characterized in that, The readable storage medium stores programs or instructions, which, when executed by the processor, implement the steps of the file transmission method according to any one of claims 1 to 5.