Data transmission method, electronic device and readable medium
By mounting a target listener in the electronic device and using named pipes, the problem of redundant message filtering in NAS client applications is solved, achieving efficient data transmission and improving the processing efficiency and user operation response speed of NAS client applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2023-10-26
- Publication Date
- 2026-06-16
AI Technical Summary
In existing technologies, data transmission efficiency between electronic devices and NAS is low, mainly because NAS client applications need to listen to and filter a large number of redundant data transmission messages, resulting in reduced processing efficiency and lag.
By mounting target listeners (such as copy hook applications) in the file explorer applications of electronic devices, NAS-related data transmission messages can be precisely filtered and transmitted, and named pipes can be used to achieve efficient data transmission.
It improves the data transmission efficiency of NAS client applications, reduces redundant message filtering time, and enhances the response speed and processing efficiency of user operations.
Smart Images

Figure CN119902691B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology. In particular, it relates to a data transmission method, an electronic device, and a readable medium. Background Technology
[0002] With the rapid development of technology, electronic devices need to process and store increasingly larger amounts of data. In the context of this data explosion, the storage space of electronic devices themselves faces the risk of exceeding its capacity and cannot guarantee meeting user needs. Therefore, network attached storage (NAS) has emerged. NAS, as an auxiliary storage to the local storage of electronic devices, also known as a private cloud, can store various types of data such as photos, videos, and documents, providing expanded storage space for electronic devices. Electronic devices can transfer data with the NAS, such as uploading data from the electronic device to the NAS or downloading data from the NAS to the electronic device. The existence of NAS frees up storage space on electronic devices, and users can download data from the NAS at any time.
[0003] In related technologies, data transmission between electronic devices and a NAS can be achieved through a NAS client application on the electronic device side. When a user performs a transmission operation on the NAS client application, attempting to transfer data from the NAS, the NAS client application needs to monitor all data transmission messages in the electronic device system, such as the data transmission source path and destination path corresponding to the user's transmission operation. This means the NAS client application also needs to monitor data transmission messages from other applications besides itself. Therefore, the NAS client application needs to filter irrelevant messages to obtain data operation messages relevant to the NAS client application before it can perform data transmission operations based on the filtered messages. This filtering step can be time-consuming, thus reducing the data transmission efficiency of the NAS client application. Summary of the Invention
[0004] The purpose of this application is to provide a data transmission method, an electronic device, and a readable medium.
[0005] In a first aspect, embodiments of this application provide a data transmission method applied to an electronic device, on which a first application (e.g., a file explorer application) and a second application (e.g., a NAS client application) are installed. The method includes: the first application detecting that among a plurality of data transmission messages there is a first data transmission message belonging to the second application, wherein the first data transmission message indicates that: first data managed by the second application is transmitted from a first memory to a second memory managed by the first application; the first application sending first transmission information to the second application, wherein the first transmission information includes the transmission path of the first data in the first data transmission message.
[0006] In the embodiments of this application, the data transmission message is a message related to the first application within the first application, specifically a copy message, such as a FO_COPY message. The electronic device can be a device with both the first and second applications installed, including but not limited to mobile phones, personal computers, tablets, wearable devices (such as smartwatches, smart bracelets, etc.), in-vehicle devices (such as car infotainment systems), IoT devices, and smart home devices (such as smart TVs). The first application manages data in the second memory, and the second application manages data in the first memory.
[0007] According to the data transmission method of this application, a first application can filter data transmission messages to obtain a first data transmission message belonging to a second application, and then send the first data transmission message to the second application for processing. In this way, the second application no longer needs to filter redundant messages, such as data transmission messages from other applications, and can directly perform data transmission based on the received first data transmission message, that is, transfer the first data from the first storage to the second storage, thereby improving the data transmission efficiency of the second application and preventing the second application from lag.
[0008] In one possible implementation of the first aspect described above, a target monitoring program is mounted in the first application; the first application detects that a first data transmission message belonging to the second application exists among multiple data transmission messages, including: the target monitoring program in the first application detects that a first data transmission message belonging to the second application exists among multiple data transmission messages.
[0009] In the embodiments of this application, the target monitoring program (also known as the target listening program) can be a hook program, such as a copy hook application. The target monitoring program can be developed by a second application and injected into the first application by the second application, thus mounting the target monitoring program in the first application. It can be understood that when the second application starts, it mounts the target monitoring program to the first application. The second application can flexibly set the filtering conditions of the target monitoring program to achieve precise filtering of messages sent from the first application to the second application.
[0010] In one possible implementation of the first aspect described above, the first data transmission message is generated based on a first user operation, the first operation including: dragging first data from the interface of the second application to the interface of the first application.
[0011] In the embodiments of this application, the first operation may include a drag-and-drop operation.
[0012] In one possible implementation of the first aspect described above, the method further includes: the second application establishing a data transmission channel between the first application and the second application, wherein the first application has permission to use the data transmission channel; the first application sending first transmission information to the second application, including: the first application sending the first transmission information to the second application through the data transmission channel.
[0013] In the embodiments of this application, the data transmission pipe can be a named pipe, whereby the second application can grant the first application opening permissions for the named pipe when creating it, thus ensuring that the first application has usage permissions for the named pipe. Using named pipes for business message transmission prevents business messages from being received and processed by other clients.
[0014] In one possible implementation of the first aspect described above, the data transmission message includes a data transmission path, which includes a source path and a destination path; at least one of the source path and the destination path of the data in the data transmission message belongs to the second memory; the first application detects that among the multiple data transmission messages there is a first data transmission message belonging to the second application, including: the first application detects that among the multiple data transmission messages there is a data transmission message whose source path belongs to the first memory and whose destination path belongs to the second memory.
[0015] In the embodiments of this application, the source path of the first data transmission message belongs to the first memory and the destination path belongs to the second memory. It can be understood that at least one of the source and destination paths of the data transmission message belongs to the second memory; therefore, if the source path of the data transmission message belongs to the first memory, the destination path must belong to the second memory. Optionally, the first application can filter the source path of the data transmission message to obtain first data transmission messages whose source path belongs to the first memory.
[0016] In one possible implementation of the first aspect described above, the method further includes: a second application transmitting the first data from the source path of the first data to the target path of the first data.
[0017] In the embodiments of this application, the second application can transmit the first data from the source path of the first data to the target path of the first data based on the received first data transmission message.
[0018] In one possible implementation of the first aspect described above, the first memory includes at least one of cloud memory and local memory, and the second memory is the local memory of the electronic device.
[0019] In the embodiments of this application, the first memory includes cloud memory and / or local memory, such as cloud memory and local memory of network-attached memory; the second memory is the local memory of the electronic device, such as a local disk.
[0020] In one possible implementation of the first aspect described above, the first application is a file explorer application, and the second application is a network attached storage client application.
[0021] In the embodiments of this application, the first application is a file explorer application used to manage data in the local storage of an electronic device; the second application is a network attached storage client application, which allows users to log in to their accounts to manage data or files in the network attached storage, such as downloading data from the network attached storage to their local device.
[0022] In a second aspect, embodiments of this application provide an electronic device, including: a memory for storing instructions executed by one or more processors of the electronic device, and a processor for executing instructions of the data transmission method of the first aspect.
[0023] Thirdly, embodiments of this application provide a readable medium storing instructions, which, when executed on an electronic device, cause the electronic device to perform the data transmission method of the first aspect.
[0024] Fourthly, embodiments of this application provide a computer program product, including: a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium containing computer program code for performing the data transmission method of the first aspect. Attached Figure Description
[0025] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1A This application illustrates a first file transfer scenario.
[0027] Figure 1B This application illustrates a second file transfer scenario.
[0028] Figure 2This application illustrates a schematic diagram of a file transfer interaction process;
[0029] Figure 3 A flowchart illustrating a data transmission method is shown according to an embodiment of this application;
[0030] Figure 4 An interactive flow diagram of a data transmission method is shown according to an embodiment of this application;
[0031] Figure 5 A schematic diagram of the hardware structure of an electronic device 100 is shown according to an embodiment of this application. Detailed Implementation
[0032] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings.
[0033] According to some embodiments, file transfer between electronic devices and NAS can be achieved through a NAS client application on the electronic device side. In response to the user dragging and dropping a file or folder from the NAS client application interface to the target folder interface, the NAS client application can obtain the address of the target folder and download the file or folder to the target folder.
[0034] refer to Figure 1A When the file explorer application interface 11 and the NAS client application interface 12 are both displayed on the screen of the electronic device 100, the user can use the mouse pointer 10 to drag the icon 13 corresponding to the target image in the NAS client application interface 12 to the file explorer application interface 11. The target image is a picture stored on the NAS, and the target folder is opened in the file explorer application interface 11. After the drag-and-drop operation is completed, as shown... Figure 1B As shown in the diagram, a new icon 14 corresponding to the target image will be added to the File Explorer application interface 11, indicating that the target image has been successfully downloaded from the NAS to the target folder.
[0035] In some embodiments, the NAS client application initiates file transfers in response to a user's file download operation on the NAS. Currently, the NAS client application subscribes to operation messages for all files and folders within the electronic device system, such as those from the Microsoft Windows operating system. TMThe SHChangeNotify service, a real-time file directory operation monitoring service, subscribes to file transfer-related messages, enabling the NAS client application to be notified whenever a file transfer event occurs. In other words, the NAS client application will receive file transfer messages unrelated to its own application, such as messages about other software downloads or file transfers between other folders. These file transfer-related messages can include information about file and folder operations, specifically the source and destination paths of the transferred files.
[0036] Figure 2 A schematic diagram of a file transfer interaction process is shown. (Reference) Figure 2 An exemplary process includes:
[0037] S201: NAS client program 22 registers to listen for messages in SHChangeNotify.
[0038] It is understandable that the NAS client application 22 can pre-register with the SHChangeNotify service to listen for operation messages of files and folders.
[0039] S202: Business drag-and-drop operation.
[0040] It is understandable that the business drag-and-drop operation can be a drag-and-drop operation from the interface of NAS client program 22 to the interface of file resource manager program 21.
[0041] S203: SHChangeNotify forwards file and folder operation messages to the NAS client program 22.
[0042] It is understandable that the SHChangeNotify service can pass operation messages of files and folders in the File Explorer application 21 to the NAS client application 22.
[0043] S204: Monitor file and folder operation messages and perform business filtering.
[0044] The NAS client program 22 can listen to file and folder operation messages, perform business filtering, and obtain messages related to the NAS client application 22, namely, operation messages corresponding to the NAS business files.
[0045] It is understandable that the NAS client application 22 receives all file and folder operation messages from the system's file explorer application 21. These messages contain redundant messages that need filtering. Therefore, when the operation message corresponding to the current drag-and-drop operation is generated, the NAS client application 22 may be processing other messages for filtering. Specifically, it determines whether other messages are file operation messages related to the NAS client application 22, and if it determines that a message is not related to the NAS client application 22, it does not respond, causing the current message to queue and wait. Only after other messages are processed can the current message be processed and its corresponding download operation (i.e., transferring the file to the file explorer application 21) be executed.
[0046] S205: Copy the business file to the drag-and-drop path.
[0047] Understandably, the NAS client application 22 can copy business files to the drag-and-drop path based on the filtered messages. The downloaded files are displayed in the file explorer interface 11, indicating that the file transfer operation is complete.
[0048] In the above embodiment, the NAS client application 22 needs to filter all subscribed file operation messages. Since filtering redundant messages takes time, it reduces the application's business processing efficiency. Furthermore, in extreme cases, such as when other software is downloading a large amount of resources, the SHChangeNotify service will continuously forward redundant messages to the NAS client application 22, causing the NAS client application 22 to spend a lot of time filtering messages, resulting in application lag.
[0049] To address the aforementioned issues, this application proposes a data transmission method. This method involves developing a target monitoring program for the NAS, such as a copy hook application, and pre-mounting this program into a file explorer to achieve precise monitoring of NAS-related services. The target monitoring program will only send a service message to the NAS client application when it detects a NAS-related data operation message, such as a message triggered by a user dragging and dropping a file from the NAS client application interface to the system file explorer interface. This eliminates the need for the NAS client application to filter redundant messages, allowing it to directly process the received service messages. This enables users to download data from the NAS to electronic devices more quickly, improving NAS service processing efficiency.
[0050] In some alternative embodiments, the target monitoring program may include a copy hook program or other implementable applications. It is understood that a copy hook program is an application developed based on a hook function; for example, the functionality of monitoring and precisely filtering copy messages may be developed within the copy hook program. This application does not limit the development language of the copy hook.
[0051] In some optional embodiments, the NAS client application pre-creates a named pipe (PIPE) between the file explorer and the NAS client application, and pre-injects a CopyHook into the file explorer. When a file operation event occurs, the CopyHook can filter out events with the NAS as the source path based on the source path corresponding to the file operation event, i.e., filter out the business messages of the NAS client application. Then, the business message (including the source path and target path of the target file) can be sent to the NAS client application through the named PIPE, enabling the NAS client application to directly download the target file from the source path to the target path without filtering the message, thus completing the file transfer operation from the NAS to the local storage of the electronic device.
[0052] The following is combined Figure 3 This application provides an exemplary flow of a data transmission method according to an embodiment.
[0053] It is understood that the technical solutions provided in this application embodiment can be applied to any electronic device 100 with NAS client application 22 installed, including but not limited to mobile phones, personal computers, tablets, wearable devices (such as smartwatches, smart bracelets, etc.), in-vehicle devices (such as car infotainment systems), IoT devices, smart home devices (such as smart TVs, etc.), etc. Figure 3 As illustrated, the method includes:
[0054] S301: Listen for file operation messages through the target listener program, filter the file operation messages, and obtain the first operation message related to the target client application.
[0055] In this embodiment, the target listening program is an application mounted in the file explorer application 21, which can listen to and filter all file operation messages in the electronic device 100 system.
[0056] In this embodiment, the target client application can be NAS client application 22, used to manage files stored in the NAS. It is understood that files in the NAS can be stored in cloud storage or the local storage of the electronic device 100.
[0057] It is understood that the file explorer application 21 can manage files and folders in the electronic device 100 system. File operation messages are operation messages for files and folders in file operation events, including information about the source path and target path of the operation. The source path information may include information about the storage path of the target file and information about the target file itself.
[0058] The operations can include drag-and-drop operations on files. For example, you can select a file in the target client application with the mouse, drag the file to the target folder directory, and then release the mouse to complete the operation.
[0059] In some embodiments, the target monitoring program can filter the source path in the file operation information. That is, file operation messages whose source path is located in the first memory corresponding to the target client application are identified as first operation messages; while file operation messages whose source path is in other memory outside the first memory are filtered out, i.e., these file operation messages are not processed.
[0060] It is understandable that if the source path of a file operation message is the storage path of an application other than the target client application, or the storage path of the local storage of electronic device 100, then the file operation message is unrelated to the target client application. For example, messages from other applications downloading files, or messages from file transfers between local folders, do not require a response from the target client application, and therefore can be filtered out. The target client application can be the NAS client application 22, and other applications can include other cloud storage client applications, video applications, music applications, etc.
[0061] In this embodiment of the application, file operation information can be generated based on drag-and-drop operations. For example, when a user intends to transfer a file, they can drag the mouse cursor to complete the drag-and-drop operation on the screen of the electronic device 100, and the file resource manager application 21 will generate file operation information corresponding to the drag-and-drop operation.
[0062] It is understandable that for the drag-and-drop operation that generates the first operation message, the object of the drag-and-drop operation is the target file in the first storage, and the drag-and-drop operation starts from the target client corresponding to the first storage and ends at the file explorer corresponding to the second storage.
[0063] S302: The target listening program sends a file transfer instruction to the target client application based on the first operation message.
[0064] It is understandable that file transfer commands are used to instruct the target client application to download files.
[0065] In some embodiments, the file transfer instruction may include information about the source path, target path, and target file of the drag-and-drop operation, so that after the target client application receives the file transfer instruction, it can download the target file from the source path to the target path based on the file transfer instruction.
[0066] Optionally, the target file information can be included in the source path, such as the source path including the target file's filename information.
[0067] S303: Download the target file to the second storage via the target client application.
[0068] It is understandable that the target client application can download the target file from the source path in the cloud to the target path in the second storage.
[0069] In this embodiment of the application, the first storage device can be a NAS, and correspondingly, the target client application corresponding to the first storage device can be a NAS client application 22. That is, all files in the first storage device can be stored in the cloud. The second storage device can be the local storage device of the electronic device 100, such as a local disk. That is, all files in the second storage device can be stored locally.
[0070] In some embodiments, the first storage also includes local storage, meaning that files in the first storage can be stored locally. If the target file is located in the cloud, the target client application can download the target file from the cloud to the second storage; if the target file is located locally, the target client application can transfer the target file from the local storage to the second storage.
[0071] In this embodiment, by developing a target monitoring program and mounting it in the file explorer of the electronic device 100, the program can monitor and accurately filter business messages related to the target client application, while filtering out redundant messages that the target client application does not need to process. Thus, the target monitoring program can directly send the filtered business messages to the target client application, eliminating the need for the application to filter them and allowing it to directly process file transfers based on the business messages. This avoids situations where the target monitoring program is still filtering redundant messages and cannot process business messages in a timely manner when users generate them through file operations, thereby improving the file transfer processing efficiency of the target client application.
[0072] The following is based on Figure 4 This application further describes a data transmission method.
[0073] Figure 4This illustration shows an interactive flow diagram of a data transmission method provided in an embodiment of this application. It can be understood that this method can be implemented by opening the interface of the NAS client application 22 and the interface of the file explorer application 21 on the screen of an electronic device 100 with the NAS client application 22 installed. Figure 4 The interactive flow is illustrated in the diagram.
[0074] S401: NAS client application 22 creates named pipes for process communication and receives pipe messages.
[0075] It is understandable that named pipes can support one-way or two-way data communication between different processes on the same electronic device 100.
[0076] In some embodiments, the NAS client application 22 can assign a name to the named pipe when it is established. Other processes can open the other end of the pipe using that name. If the other processes have the necessary permissions—that is, if the NAS client application 22 granted them permissions when establishing the named pipe—they can communicate with the process of the NAS client application 22 through the named pipe. For example, the NAS client application 22 may pre-grant permissions to the file explorer application 21 in the named pipe. The process of the file explorer application 21 can open the named pipe using its name and communicate with the process of the NAS client application 22 through the named pipe.
[0077] In some embodiments, NAS client application 22 can develop client applications and target listeners.
[0078] The client application enables file management functions on the NAS. Optionally, it responds to user file management operations, such as right-clicking to open the management function menu and clicking the delete or copy button, to manage files saved on the NAS.
[0079] The target listener can be a CopyHook, which is mounted to the file explorer application 21 to respond to file and folder operation messages in the file explorer application 21, that is, to listen for and filter file operation messages.
[0080] S402: NAS client application 22 injects a CopyHook into Windows Explorer File Explorer application 21.
[0081] As can be understood, CopyHook is used to listen for file and folder operation messages, accurately identify messages for the target business, and send them to the client application through a named pipe.
[0082] In this embodiment, the CopyHook is developed by the NAS client application 22. After the NAS client application 22 starts, it can inject the CopyHook into the file explorer application 21 to enable the CopyHook to listen for file operation messages of the file explorer application 21.
[0083] S403: The user performs a drag-and-drop operation.
[0084] It can be understood that the business drag-and-drop operation is the drag-and-drop operation related to the NAS client application 22 and the file resource manager application 21, such as the user's drag-and-drop operation on the interface of the NAS client application 22 and the interface of the file resource manager application 21.
[0085] In some embodiments, the interface of the file explorer 21 and the interface of the NAS client application 22 are displayed together on the screen of the electronic device 100. When the interface of the file explorer 21 opens the target folder interface and the interface of the NAS client application 22 opens the target file folder interface, the user can use the mouse pointer to press and hold the target image icon in the interface of the NAS client application 22 and drag the mouse pointer to the interface of the file explorer 21 to complete the business drag-and-drop operation.
[0086] It is understandable that the user intent behind the above-mentioned drag-and-drop operation is to copy the target file from the NAS to the target folder of the electronic device 100.
[0087] It should be noted that the user operation in this application is not limited to drag and drop operation. In some other optional embodiments, step S403 may also be other operations that include the above-mentioned user intent, that is, the user intent is to copy the target file from the NAS to the target folder of the electronic device 100.
[0088] S404: CopyHook listens for FO_COPY messages to precisely filter target paths.
[0089] In this embodiment of the application, CopyHook can listen for the FO_COPY message in the file operation messages of the file explorer application 21. The FO_COPY message is a copy message, which includes the path of the source folder for copying the file and the path of the target folder for copying the file.
[0090] CopyHook can monitor all FO_COPY messages in an electronic device system in real time and filter them based on the source folder path in the FO_COPY messages to obtain those whose source file paths are located in the NAS file path. For example, for each FO_COPY message being monitored, it determines whether the source file path in each message belongs to the NAS file path; if so, it passes the filter; otherwise, it filters out the message.
[0091] The criteria for CopyHook to filter file operation messages are not limited to the source file path condition mentioned above. According to some embodiments, the NAS client application 22 can further define the filtering criteria for CopyHook. For example, it can update the available and disabled paths in the NAS file path in real time, and define the filtering criteria for CopyHook as only filtering FO_COPY messages whose source path is an available path. When the user member (very important person, VIP) status is not VIP, the disabled path can be the VIP folder path, the overcapacity folder path, etc. in the NAS.
[0092] S405: CopyHook sends drag-and-drop paths to the NAS client application 22 via named pipes.
[0093] In some embodiments, CopyHook can send the drag-and-drop path to the NAS client application 22 through the named pipe created in step S401. The drag-and-drop path includes the source file path and the target file path in the FO_COPY message. The source file path is the storage path of the NAS file, which is the drag-and-drop path in the FO_COPY message related to NAS obtained by CopyHook in step S404 based on filtering all the FO_COPY messages it has listened to.
[0094] In some embodiments, the name information of the dragged business file (i.e., the target file mentioned above) is included in the source file path.
[0095] In this embodiment of the application, business messages are transmitted through named pipes, which can prevent business messages from being received and processed by other clients.
[0096] In some other alternative embodiments, CopyHook can also send messages to the NAS client application 22 via other IPC communication methods, such as shared memory, Socket, RPC, etc.
[0097] S406: NAS client application 22 copies business files to the drag-and-drop path.
[0098] It is understandable that in step S406, the business file can be copied from the NAS file storage path to the target file path in the drag-and-drop path.
[0099] In some embodiments, NAS files are stored in the cloud. In order to copy business files, the NAS client application 22 can download business files from the cloud and then store the downloaded business files in the target file path to complete the copy operation.
[0100] It is understandable that the above explanation of steps S401-S406 is based on a file operation scenario. However, when the dragged object is a folder, FO_COPY contains the folder source path and the folder target path. The NAS client application 22 can download the dragged folder to the target file path and complete the folder transfer.
[0101] In this embodiment, the filtering process for service messages can be transferred from the NAS client application 22 to the process mounting the CopyHook, that is, the service message filtering is transferred to the process of the file explorer application 21. After receiving the filtered service messages, the client application can directly perform the final download service processing. In this way, not only can the service processing load of the client application be reduced, but the response speed of the NAS client application 22 to user operations can also be improved, thereby improving the service processing efficiency of the NAS client application 22.
[0102] like Figure 5 The diagram illustrates the hardware structure of an electronic device 100 according to an embodiment of this application. Figure 5 As shown, the electronic device 100 may include a processor 110 (or host), a power module 140, a memory 180, a mobile communication module 130, a wireless communication module 120, a sensor module 190, an audio module 150, a camera 170, an interface module 160, buttons 101, a display screen 102, and a touch screen 103, etc.
[0103] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a limitation on the only possible implementation of the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0104] Processor 110 may include one or more processing units, such as processing modules or circuits of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Digital Signal Processor, Micro-programmed Control Unit (MCU), Artificial Intelligence (AI) processor, or Field Programmable Gate Array (FPGA). Different processing units may be independent devices or integrated into one or more processors. Processor 110 may also include a storage unit for storing instructions and data. In some embodiments, the storage unit in processor 110 is a cache memory 180, which can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to reuse the instruction or data, it can directly retrieve it from the storage unit, avoiding repeated access, reducing the processor 110's waiting time, and thus improving system efficiency.
[0105] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0106] It is understood that in the embodiments of this application, the processor can be used to execute the method steps executed by the electronic device 100 in the data transmission method of this application. For example, the first application detects that there is a first data transmission message belonging to the second application among multiple data transmission messages. The first data transmission message indicates that the first data managed by the second application is transferred from the first memory to the second memory managed by the first application. The first application sends first transmission information to the second application, wherein the first transmission information includes the transmission path of the first data in the first data transmission message.
[0107] The power module 140 may include a power supply, a power management component, etc. The power supply may be a battery. The power management component manages the charging of the power supply and the power supply to other modules. In some embodiments, the power management component includes a charging management module and a power management module. The charging management module receives charging input from a charger; the power management module connects to the power supply and is connected to the processor 110. The power management module receives input from the power supply and / or the charging management module to supply power to the processor 110, the display 102, the camera 170, and the wireless communication module 120, etc.
[0108] The wireless communication module 120 may include an antenna, which enables the transmission and reception of electromagnetic waves. The wireless communication module 120 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The electronic device 100 can communicate with networks and other devices through wireless communication technologies.
[0109] The display screen 102 is used to display human-computer interaction interfaces, images, videos, etc. The display screen 102 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a quantum dot light-emitting diode (QLED), etc.
[0110] Interface module 160 includes an external memory interface and a universal serial bus (USB) interface. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of electronic device 100. The external memory card communicates with processor 110 through the external memory interface to perform data storage. The universal serial bus interface is used for communication between electronic device 100 and other electronic devices 100.
[0111] The embodiments disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0112] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application-specific integrated circuit, or a microprocessor.
[0113] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0114] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, optical discs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other propagation signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.
Claims
1. A data transmission method, characterized in that, Applied to an electronic device, on which a first application and a second application are installed, the method includes: The first application detects that among multiple data transmission messages there is a first data transmission message belonging to the second application, wherein the first data transmission message indicates that: the first data managed by the second application is transferred from the first memory to the second memory managed by the first application; The first application sends first transmission information to the second application, wherein the first transmission information includes the transmission path of the first data in the first data transmission message; The first application contains a target monitoring program; The first application detected a first data transmission message belonging to the second application among multiple data transmission messages, including: The target monitoring program in the first application detected that among multiple data transmission messages, there was a first data transmission message belonging to the second application.
2. The method according to claim 1, characterized in that, The first data transmission message is generated based on a user's first operation, which includes: Drag the first data from the second application's interface to the first application's interface.
3. The method according to claim 1, characterized in that, The method further includes: The second application establishes a data transmission channel between the first application and the second application, wherein the first application has permission to use the data transmission channel; The first application sends first transmission information to the second application, including: The first application sends the first transmission information to the second application through the data transmission pipeline.
4. The method according to claim 1, characterized in that, The data transmission message includes the data transmission path, which includes a source path and a destination path; At least one of the source path and the destination path of the data in the data transmission message belongs to the second memory; The first application detected a first data transmission message belonging to the second application among multiple data transmission messages, including: The first application detected multiple data transmission messages in which the source path belonged to the first memory and the destination path belonged to the second memory.
5. The method according to claim 4, characterized in that, The method further includes: The second application transmits the first data from the source path of the first data to the target path of the first data.
6. The method according to any one of claims 1-5, characterized in that, The first memory includes at least one of cloud memory and local memory, and the second memory is the local memory of the electronic device.
7. The method according to any one of claims 1-5, characterized in that, The first application is a file explorer application, and the second application is a network attached storage client application.
8. An electronic device, characterized in that, include: Memory, used to store instructions executed by one or more processors of an electronic device, and A processor for executing instructions of the data transmission method according to any one of claims 1-7.
9. A readable medium, characterized in that, The readable medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the data transmission method according to any one of claims 1-7.