Method, device and terminal for determining a file storage location

By acquiring multiple candidate paths and calculating their matching degree, the accuracy problem of determining file storage location by terminal devices is solved, achieving high success rate and high accuracy in determining file storage location.

CN114064571BActive Publication Date: 2026-11-20HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010769966.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-31
Publication Date
2026-11-20
Estimated Expiration
2040-07-31

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of terminal devices in determining file storage locations is easily affected by application versions and activation status, resulting in low accuracy.

Method used

Multiple candidate paths for the target file are obtained through various methods. Combining file information and processing methods with different precision, the matching degree of each candidate path is calculated, and the path with the highest matching degree is selected as the file storage location.

Benefits of technology

It improves the success rate of determining file storage location, especially when multiple files are opened in a single process or the application is not active, with an accuracy of over 95%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064571B_ABST
    Figure CN114064571B_ABST
Patent Text Reader

Abstract

The embodiment of the present application is suitable for the terminal technical field, and provides a method, device and terminal for determining file storage position, which comprises the following steps: a first terminal determines a plurality of candidate paths corresponding to a target file, each candidate path points to a file storage position; the first terminal acquires file information of the target file; and the first terminal determines the file storage position pointed to by a first candidate path in the plurality of candidate paths as the storage position of the target file according to the file information and the plurality of candidate paths, wherein the matching degree of the first candidate path is the maximum value in the matching degrees of the plurality of candidate paths. The above method improves the accuracy of determining the file storage position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a method, apparatus and terminal for determining the storage location of a file. Background Technology

[0002] Near field communication (NFC) is a short-range, high-frequency wireless communication technology that allows NFC-enabled devices (e.g., a first terminal and a second terminal) to exchange data when they are close to each other.

[0003] In a specific application scenario where a first terminal and a second terminal exchange data, the first terminal can transfer a file selected by the user to the second terminal. The prerequisite for the file transfer is that the first terminal can accurately determine the storage location of the file so as to retrieve the file from that storage location.

[0004] In existing technologies, a first terminal can obtain file path information by parsing command lines or calling the corresponding program's interface, and then determine the file's storage location based on the path information. However, this method is easily affected by application versions and has low accuracy. For example, if the file is compatible with multiple versions of an application, or if the application is not properly activated, the first terminal may not be able to accurately determine the file's storage location after obtaining the path information by parsing command lines or calling program interfaces. Summary of the Invention

[0005] This application provides a method, apparatus, and terminal for determining file storage location, which improves the accuracy of determining file storage location.

[0006] To achieve the above objectives, this application adopts the following technical solution:

[0007] Firstly, a method for determining the storage location of a file is provided, including:

[0008] The first terminal determines multiple candidate paths corresponding to the target file and obtains the file information of the target file. Since each candidate path points to a file storage location, the first terminal can determine the file storage location pointed to by the first candidate path among the multiple candidate paths as the storage location of the target file based on the file information and the multiple candidate paths. The matching degree of the first candidate path is the maximum matching degree among the matching degrees of the multiple candidate paths.

[0009] In one possible implementation of this application embodiment, before the first terminal obtains multiple candidate paths for the target file, the first terminal can determine the target file to be transmitted. The first terminal can determine the target file to be transmitted in several ways. One method is to respond to a user's click operation on any file in the first terminal, and then determine the target file to be transmitted based on the click operation. Another method is that after receiving a file transmission instruction from a second terminal, the first terminal uses the identification information of the file to be transmitted carried in the file transmission instruction to determine the file indicated by the identification information as the target file.

[0010] In one possible implementation of this application embodiment, the target file may be a file stored in the first terminal or a file stored in an external storage device of the first terminal.

[0011] In one possible implementation of this application embodiment, when the first terminal determines multiple candidate paths corresponding to the target file, it can use one or more of the following methods: calling object connection and embedding interface, file search, reading information of recently used files, and parsing command line. By using one or more methods to determine candidate paths, the success rate of path acquisition can be improved.

[0012] In one possible implementation of this application embodiment, the first terminal obtains the file information of the target file. This can begin by obtaining the window information of the target file, which can be information displayed at a preset location within the target file. For example, the window information could be information displayed in the title bar at the top of the target file. Then, the first terminal determines the file information of the target file based on the window information. The file information of the target file may include one or more of the following: the filename, file extension, etc.

[0013] In one possible implementation of this application embodiment, the first terminal determines the matching degree of each candidate path among multiple candidate paths based on file information.

[0014] In one possible implementation of this application embodiment, the first terminal may process the file information of the target file using a preset first processing method and / or a preset second processing method to obtain a corresponding processing result. The first processing method may be an exact matching method, and the second processing method may be a fuzzy matching method, with the first processing method having higher precision than the second processing method. Based on the processing result and the path information contained in each candidate path, the first terminal determines the matching degree of each candidate path among multiple candidate paths.

[0015] In one possible implementation of this application embodiment, the first terminal determines the matching degree of each candidate path among multiple candidate paths based on the processing result and the path information contained in each candidate path. This can be achieved by matching the processing result of the first processing method and / or the processing result of the second processing method with the path information contained in the second candidate path, and determining the matching degree of each candidate path based on the matching result. The second candidate path is any one of the multiple candidate paths. The processing result of the first processing method is a string containing file information of the target file. If the path information of the second candidate path contains the processing result of the first processing method—for example, if the path information of the second candidate path contains the complete string corresponding to the file information of the target file—then the first terminal determines the matching degree of the second candidate path as the first matching degree. If the path information of the second candidate path does not contain the processing result of the first processing method, then the first terminal determines the matching degree of the second candidate path based on the processing result of the second processing method. The processing result of the second processing method contains multiple features of the target file, each feature corresponding one-to-one with each substring in the string corresponding to the file information.

[0016] In one possible implementation of this application embodiment, the first terminal determines the matching degree of the second candidate path based on the processing result of the second processing method. This can be achieved by matching multiple features of the target file with the path information contained in the second candidate path, and determining the matching degree of the second candidate path based on the number of matched features. For example, if the number of target file features contained in the path information of the second candidate path is greater than or equal to a first threshold, the first terminal determines the matching degree of the second candidate path as a second matching degree. If the number of target file features contained in the path information of the second candidate path is greater than or equal to the second threshold and less than the first threshold, the first terminal determines the matching degree of the second candidate path as a third matching degree. If the number of target file features contained in the path information of the second candidate path is less than the second threshold, the first terminal determines the matching degree of the second candidate path as a fourth matching degree. Wherein, the second matching degree is less than the first matching degree, the third matching degree is less than the second matching degree, and the fourth matching degree is less than the third matching degree.

[0017] In one possible implementation of this application embodiment, when the first terminal matches the processing result of the first processing method and / or the processing result of the second processing method with the path information of the second candidate path, it may first match the processing result of the first processing method with the path information of the second candidate path, and then match the processing result of the second processing method with the path information of the second candidate path; or, the first terminal may first match the processing result of the second processing method with the path information of the second candidate path, and then match the processing result of the first processing method with the path information of the second candidate path; or, the first terminal may simultaneously match the processing result of the first processing method and the processing result of the second processing method with the path information of the second candidate path.

[0018] In one possible implementation of this application embodiment, the first terminal first matches the processing result of the first processing method with the path information of the second candidate path. If a match is found, meaning the path information of the second candidate path contains the complete string corresponding to the processing result of the first processing method, the first terminal determines the matching degree of the second candidate path as the first matching degree, and stops the subsequent matching process, no longer matching the processing result of the second processing method with the path information of the second candidate path. If the first terminal fails to match the processing result of the first processing method with the path information of the second candidate path, meaning the path information of the second candidate path does not contain the complete string corresponding to the processing result of the first processing method, then the first terminal continues to match the processing result of the second processing method with the path information of the second candidate path. The processing result of the second processing method contains multiple features of the target file, and the first terminal determines the matching degree of the second candidate path based on the number of features contained in the path information of the second candidate path.

[0019] In one possible implementation of this application, if the candidate path corresponding to the maximum matching degree includes multiple paths, the first terminal determines the priority of each candidate path with the maximum matching degree. The first terminal then determines the file storage location pointed to by the candidate path with the highest priority among the multiple candidate paths corresponding to the maximum matching degree as the storage location of the target file. The priority of the candidate path is obtained according to the priority of the method used to determine the candidate path.

[0020] In one possible implementation of this application embodiment, the priority relationship among the various methods of determining candidate paths is as follows: file search has a higher priority than calling the object connection and embedding interface, calling the object connection and embedding interface has a higher priority than parsing the command line, and parsing the command line has a higher priority than reading information about recently used files.

[0021] In one possible implementation of this application embodiment, after the first terminal determines the storage location of the target file, the first terminal can obtain the target file from the storage location; the first terminal then sends the target file to the second terminal.

[0022] Secondly, a device for determining the storage location of a file is provided, applied to a first terminal, the device comprising:

[0023] The candidate path determination module is used to determine multiple candidate paths corresponding to the target file, and each candidate path points to a file storage location;

[0024] The file information acquisition module is used to acquire file information of the target file.

[0025] A storage location determination module is used to determine the storage location of the target file as the location pointed to by a first candidate path among multiple candidate paths, based on file information and multiple candidate paths, wherein the matching degree of the first candidate path is the maximum matching degree among the matching degrees of multiple candidate paths. In a third aspect, a terminal is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for determining the file storage location as described in any of the first aspects.

[0026] Fourthly, a computer storage medium is provided, which stores computer instructions that, when executed on a first terminal, cause the first terminal to perform the method for determining the file storage location as described in any of the first aspects.

[0027] Fifthly, a computer program product is provided that, when run on a computer, causes the computer to perform the method for determining the file storage location described in any of the first aspects above.

[0028] In a sixth aspect, a chip is provided, the chip including a memory and a processor, the processor executing a computer program stored in the memory to implement the method for determining the file storage location as described in any of the first aspects above.

[0029] In the method, apparatus, and terminal for determining file storage location provided in this application embodiment, the first terminal can obtain multiple candidate paths of the target file through various methods. Then, based on the obtained file information of the target file, the first terminal can process the file information and each candidate path using a first processing method and / or a second processing method with different precision, thereby determining the matching degree of each candidate path based on the processing results. Since the matching degree can be used to represent the probability that the location corresponding to each candidate path belongs to the actual storage location of the target file, the first terminal can determine the location corresponding to the candidate path with the highest matching degree as the file storage location of the target file. This application embodiment improves the success rate of path acquisition by utilizing multiple methods to obtain paths; based on this, and combining the file information of the target file to determine the probability that the location corresponding to each candidate path belongs to the file storage location, it improves the accuracy of determining the file storage location. Even in scenarios such as a single process opening multiple files, the application opening the target file not being activated, or the target file being protected, the above method can accurately determine the file storage location. In practical applications, the above method can increase the success rate of determining the file storage location to over 95%. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of a method for determining file storage location in existing technology;

[0031] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0032] Figure 3 This is a schematic diagram illustrating a scenario to which the method for determining file storage location provided in this application embodiment is applicable;

[0033] Figure 4 This is a flowchart illustrating the steps of a method for determining a file storage location provided in an embodiment of this application;

[0034] Figure 5 This is a schematic diagram illustrating a file in an open state, as provided in an embodiment of this application.

[0035] Figure 6 This is a schematic diagram illustrating how to determine a file storage location according to an embodiment of this application;

[0036] Figure 7 This is a schematic diagram illustrating how to determine the matching degree of a candidate path according to an embodiment of this application;

[0037] Figure 8 This is a schematic diagram of a file transfer process provided in an embodiment of this application;

[0038] Figure 9This is a schematic diagram of a device for determining the storage location of a file, provided in an embodiment of this application;

[0039] Figure 10 This is a schematic diagram of a chip provided in an embodiment of this application. Detailed Implementation

[0040] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. For example, "first matching degree," "second matching degree," "third matching degree," etc., are only used to distinguish different matching degrees and do not limit their quantity or execution order.

[0041] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0042] The business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0043] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0044] The steps involved in the method for determining the file storage location provided in this application embodiment are merely examples. Not all steps are mandatory, nor are all contents in each piece of information or message required. They can be added or removed as needed during use.

[0045] In this application, the same step or a step or message with the same function can be referenced and learned from each other in different embodiments.

[0046] Currently, for a file displayed on an electronic device (such as an image, office document, webpage, short video, etc.), the electronic device can determine the file's storage location by parsing the startup command line carried by the corresponding process. Alternatively, if the application running the file provides an Object Linking and Embedding (OLE) interface, the electronic device can also determine the file's storage location through the application's OLE interface.

[0047] like Figure 1 The diagram illustrates one method of determining file storage location in the prior art. The file represents an electronic document (e.g., Word) or a spreadsheet (e.g., Excel), and the electronic device represents the running device. (Microsoft Operating System (abbreviation: Taking electronic devices with operating systems as an example, in In an operating system, an electronic device can open electronic documents (e.g., Word) using application 1 with an OLE interface, or open spreadsheets (e.g., Excel) using application 2 with an OLE interface. Therefore, the electronic device can determine the storage location of a Word document through the OLE interface of application 1. Similarly, the electronic device can determine the storage location of an Excel file through the OLE interface of application 2.

[0048] like Figure 1 As shown, taking a file opened using an application such as a text editor (NotePad++) as an example, an electronic device can determine the storage location of the file by parsing the startup command line carried by the process corresponding to the file.

[0049] However, in In operating systems, many applications open multiple files using a single process, for example... Figure 1 The text editor shown is an example. For such applications, the process information typically only contains the path information when the file is first opened. If multiple files of the same type are open simultaneously, the electronic device cannot determine the file's storage location based on the process information. On the other hand, for applications with an OLE interface, if the application is not activated, its OLE interface may also malfunction. Furthermore, if a file displayed on the electronic device is in protected or read-only mode, the electronic device can only obtain the filename through the OLE interface and cannot accurately determine the file's storage location.

[0050] To address the aforementioned problems, this application provides a method for determining the storage location of a file. This method can be applied to a first electronic device. In this method, the first electronic device can obtain multiple candidate paths for a target file through various methods. Then, the first electronic device calculates the matching degree of each candidate path. The first electronic device can determine the location corresponding to the candidate path with the highest matching degree as the storage location of the target file. This improves the accuracy of determining the file storage location.

[0051] like Figure 2 The diagram shown is a scenario illustration provided in an embodiment of this application. The scenario illustration includes a first electronic device 10 and a second electronic device 20 that communicates with the first electronic device 10.

[0052] The first electronic device 10 and the second electronic device 20 can be electronic devices capable of establishing a communication connection through short-range wireless communication technology.

[0053] For example, short-range wireless communication technologies can include NFC, Bluetooth, Wi-Fi, and other communication technologies.

[0054] Taking the example that the first electronic device 10 and the second electronic device 20 can establish a communication connection based on NFC technology, when the second electronic device 20 is located within the NFC sensing area of ​​the first electronic device 10, the second electronic device 20 can trigger a file transfer command to instruct the first electronic device 10 to send the target file to the second electronic device 20.

[0055] The target file can be an image, document, webpage, short video, or other file currently opened on the first electronic device 10.

[0056] In this application embodiment, the aforementioned first electronic device 10 or second electronic device 20 can be an electronic device with short-range wireless communication technology, such as a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA). This application embodiment does not limit the specific type of the first electronic device 10 or the second electronic device 20.

[0057] In the embodiments of this application, the first electronic device 10 and the second electronic device 20 can be the same type of electronic device, for example, both the first electronic device 10 and the second electronic device 20 are mobile phones; or, both the first electronic device 10 and the second electronic device 20 are laptops. Alternatively, the first electronic device 10 and the second electronic device 20 in the embodiments of this application can be different types of electronic devices, for example, the first electronic device 10 is a laptop and the second electronic device 20 is a mobile phone.

[0058] For example, Figure 3 A schematic diagram of an electronic device is shown. The structures of the first electronic device 10 and the second electronic device 20 can refer to the architecture of the electronic device 300, wherein the electronic device 300 may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, a headphone jack 370D, a sensor module 380, buttons 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 395, etc. The sensor module 380 may include a pressure sensor 380A, a gyroscope sensor 380B, a barometric pressure sensor 380C, a magnetic sensor 380D, an accelerometer sensor 380E, a distance sensor 380F, a proximity light sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, an ambient light sensor 380L, a bone conduction sensor 380M, etc.

[0059] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 300. In other embodiments of this application, the electronic device 300 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.

[0060] Processor 310 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. The different processing units may be independent devices or integrated into one or more processors.

[0061] The controller can be the nerve center and command center of the electronic device 300. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0062] The processor 310 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. This memory can store instructions or data that the processor 310 has just used or that are used repeatedly. If the processor 310 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.

[0063] In some embodiments, the processor 310 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0064] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 310 may include multiple I2C buses. The processor 310 can couple to the touch sensor 380K, charger, flash, camera 393, etc., through different I2C bus interfaces. For example, the processor 310 can couple to the touch sensor 380K through the I2C interface, enabling the processor 310 and the touch sensor 380K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 300.

[0065] The I2S interface can be used for audio communication. In some embodiments, the processor 310 may include multiple I2S buses. The processor 310 can be coupled to the audio module 370 via the I2S bus to enable communication between the processor 310 and the audio module 370. In some embodiments, the audio module 370 can transmit audio signals to the wireless communication module 360 ​​via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.

[0066] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 370 and the wireless communication module 360 ​​can be coupled via the PCM bus interface.

[0067] In some embodiments, the audio module 370 can also transmit audio signals to the wireless communication module 360 ​​via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0068] The UART interface is a general-purpose serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication.

[0069] In some embodiments, the UART interface is typically used to connect the processor 310 and the wireless communication module 360. For example, the processor 310 communicates with the Bluetooth module in the wireless communication module 360 ​​via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 370 can transmit audio signals to the wireless communication module 360 ​​via the UART interface to enable music playback via Bluetooth headphones.

[0070] The MIPI interface can be used to connect the processor 310 to peripheral devices such as the display screen 394 and the camera 393. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 310 and the camera 393 communicate via the CSI interface to enable the electronic device 300 to capture images. The processor 310 and the display screen 394 communicate via the DSI interface to enable the electronic device 300 to display images.

[0071] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 310 to a camera 393, a display screen 394, a wireless communication module 360, an audio module 370, a sensor module 380, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0072] USB port 330 is a USB standard compliant interface, which can be a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 330 can be used to connect a charger to charge electronic device 300, and can also be used for data transfer between electronic device 300 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.

[0073] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 300. In other embodiments of this application, the electronic device 300 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0074] The charging management module 340 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 receives charging input from the wired charger via a USB interface 330. In some wireless charging embodiments, the charging management module 340 receives wireless charging input via the wireless charging coil of the electronic device 300. While charging the battery 342, the charging management module 340 can also supply power to the electronic device via the power management module 341.

[0075] The power management module 341 connects the battery 342, the charging management module 340, and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340, providing power to the processor 310, internal memory 321, external memory, display screen 394, camera 393, and wireless communication module 360. The power management module 341 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance).

[0076] In some other embodiments, the power management module 341 may also be located within the processor 310. In still other embodiments, the power management module 341 and the charging management module 340 may also be located in the same device.

[0077] The wireless communication function of electronic device 300 can be realized through antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, modem processor and baseband processor, etc.

[0078] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 300 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0079] The mobile communication module 350 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on the electronic device 300. The mobile communication module 350 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 350 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 350 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0080] In some embodiments, at least some functional modules of the mobile communication module 350 may be disposed in the processor 310. In some embodiments, at least some functional modules of the mobile communication module 350 and at least some modules of the processor 310 may be disposed in the same device.

[0081] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 370A, receiver 370B, etc.) or displays images or videos through the display screen 294. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 310 and may be housed in the same device as the mobile communication module 350 or other functional modules.

[0082] The wireless communication module 360 ​​can provide solutions for wireless communication applications on the electronic device 300, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 360 ​​can be one or more devices integrating at least one communication processing module. The wireless communication module 360 ​​receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 310. The wireless communication module 360 ​​can also receive signals to be transmitted from processor 310, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0083] In some embodiments, antenna 1 of electronic device 300 is coupled to mobile communication module 350, and antenna 2 is coupled to wireless communication module 360, enabling electronic device 300 to communicate with networks and other devices via wireless communication technology. Wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. GNSS can include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0084] Electronic device 300 implements display functions through a GPU, a display screen 394, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 310 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0085] Display screen 394 is used to display images, videos, etc. Display screen 394 includes a display panel. The display panel may 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 miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 300 may include one or N displays 394, where N is a positive integer greater than 1.

[0086] Electronic device 300 can achieve shooting function through ISP, camera 393, video codec, GPU, display 394 and application processor.

[0087] The ISP (Image Signal Processor) is used to process data fed back from the camera 393. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's image sensor. The light signal is converted into an electrical signal, and the image sensor transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimizations on image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be integrated into the camera 393.

[0088] Camera 393 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 300 may include one or N cameras 393, where N is a positive integer greater than 1.

[0089] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when the electronic device 300 is selecting a frequency, the DSP is used to perform Fourier transforms on the frequency energy.

[0090] Video codecs are used to compress or decompress digital video. Electronic device 300 may support one or more video codecs. Thus, electronic device 300 can play or record video in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0091] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs can enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0092] In this embodiment, the NPU or other processor can be used to perform operations such as face detection, face tracking, face feature extraction, and image clustering on face images in videos stored in the electronic device 300; to perform operations such as face detection and face feature extraction on face images in pictures stored in the electronic device 300; and to cluster the pictures stored in the electronic device 300 based on the face features of the pictures and the clustering results of face images in the videos.

[0093] The external storage interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 300. The external memory card communicates with the processor 310 through the external storage interface 320 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0094] Internal memory 321 can be used to store executable program code, including instructions. Processor 310 executes various functional applications and data processing of electronic device 300 by running the instructions stored in internal memory 321. Internal memory 321 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 300 (such as audio data, phonebook, etc.).

[0095] In addition, the internal memory 321 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0096] Electronic device 300 can implement audio functions, such as music playback and recording, through audio module 370, speaker 370A, receiver 370B, microphone 370C, headphone jack 370D, and application processor.

[0097] The audio module 370 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. The audio module 370 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 370 may be located in the processor 310, or some functional modules of the audio module 370 may be located in the processor 310.

[0098] The speaker 370A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic device 300 can listen to music or make hands-free calls through the speaker 370A.

[0099] The receiver 370B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 300 answers a telephone call or voice message, the receiver 370B can be brought close to the listener's ear to hear the voice.

[0100] Microphone 370C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 370C, inputting the sound signal into microphone 370C. Electronic device 300 may have at least one microphone 370C. In some embodiments, electronic device 300 may have two microphones 370C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 300 may have three, four, or more microphones 370C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0101] The 370D headphone jack is used to connect wired headphones. The 370D headphone jack can be a USB 330 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0102] Pressure sensor 380A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 380A may be disposed on display screen 394. There are many types of pressure sensors 380A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to pressure sensor 380A, the capacitance between the electrodes changes. Electronic device 300 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 394, electronic device 300 detects the touch operation intensity based on pressure sensor 380A. Electronic device 300 can also calculate the touch position based on the detection signal from pressure sensor 380A.

[0103] In some embodiments, touch operations applied to the same touch location but with different touch intensity can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS message is executed.

[0104] The gyroscope sensor 380B can be used to determine the motion attitude of the electronic device 300. In some embodiments, the gyroscope sensor 380B can determine the angular velocity of the electronic device 300 around three axes (i.e., the x, y, and z axes). The gyroscope sensor 380B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 380B detects the angle of the electronic device 300's shake, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 300 through reverse movement, thus achieving image stabilization. The gyroscope sensor 380B can also be used in navigation and motion-sensing game scenarios.

[0105] The barometric pressure sensor 380C is used to measure air pressure. In some embodiments, the electronic device 300 calculates altitude using the air pressure value measured by the barometric pressure sensor 380C to assist in positioning and navigation.

[0106] The magnetic sensor 380D includes a Hall sensor. The electronic device 300 can use the magnetic sensor 380D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 300 is a flip phone, the electronic device 300 can detect the opening and closing of the flip cover using the magnetic sensor 380D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.

[0107] The accelerometer 380E can detect the magnitude of acceleration of an electronic device 300 in various directions (typically three axes). When the electronic device 300 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of the electronic device, and can be applied to applications such as screen orientation switching and pedometers.

[0108] A distance sensor 380F is used to measure distance. Electronic device 300 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 300 can utilize the distance sensor 380F to measure distance for rapid focusing.

[0109] The proximity sensor 380G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 300 emits infrared light outward through the LED. The electronic device 300 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that an object is near the electronic device 300. When insufficient reflected light is detected, the electronic device 300 can determine that no object is near the electronic device 300. The electronic device 300 can use the proximity sensor 380G to detect when a user holds the electronic device 300 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 380G can also be used in holster mode and pocket mode for automatic unlocking and locking of the screen.

[0110] The ambient light sensor 380L is used to sense the brightness of ambient light. The electronic device 300 can adaptively adjust the brightness of its display screen 394 based on the sensed ambient light level. The ambient light sensor 380L can also be used to automatically adjust the white balance when taking photos. The ambient light sensor 380L can also work in conjunction with the proximity sensor 380G to detect whether the electronic device 300 is in a pocket, preventing accidental touches.

[0111] The fingerprint sensor 380H is used to collect fingerprints. The electronic device 300 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.

[0112] Temperature sensor 380J is used to detect temperature. In some embodiments, electronic device 300 uses the temperature detected by temperature sensor 380J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 380J exceeds a threshold, electronic device 300 performs thermal protection by reducing the performance of a processor located near temperature sensor 380J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 300 heats battery 342 to prevent abnormal shutdown of electronic device 300 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 300 boosts the output voltage of battery 342 to prevent abnormal shutdown due to low temperature.

[0113] Touch sensor 380K, also known as a "touch panel," can be located on display screen 394. The touch sensor 380K and display screen 394 together form a touchscreen, also known as a "touch screen." Touch sensor 380K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 394. In other embodiments, touch sensor 380K may also be located on the surface of electronic device 300, in a different position than display screen 394.

[0114] The bone conduction sensor 380M can acquire vibration signals. In some embodiments, the bone conduction sensor 380M can acquire vibration signals from vibrating bone fragments in the human vocal cords. The bone conduction sensor 380M can also contact the human pulse to receive blood pressure signals.

[0115] In some embodiments, the bone conduction sensor 380M can also be integrated into the headphones to form bone conduction headphones. The audio module 370 can analyze the vibration signal of the sound-vibrating bone block acquired by the bone conduction sensor 380M to extract the voice signal and realize the voice function. The application processor can analyze the heart rate information based on the blood pressure fluctuation signal acquired by the bone conduction sensor 380M to realize the heart rate detection function.

[0116] Buttons 390 include a power button, volume buttons, etc. Buttons 390 can be mechanical buttons or touch-sensitive buttons. Electronic device 300 can receive button input and generate key signal inputs related to user settings and function control of electronic device 300.

[0117] Motor 391 can generate vibration alerts. Motor 391 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can be corresponding to touch operations applied to different applications (such as taking photos, playing audio, etc.). Motor 391 can also correspond to different vibration feedback effects for touch operations applied to different areas of the display screen 394. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0118] Indicator 392 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0119] The SIM card interface 395 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 395 to make contact with and separate from the electronic device 300. The electronic device 300 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 395 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 395 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 395 is also compatible with different types of SIM cards. The SIM card interface 395 is also compatible with external memory cards. The electronic device 300 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 300 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 300 and cannot be separated from the electronic device 300.

[0120] Reference Figure 4 The diagram illustrates a step-by-step flowchart of a method for determining a file storage location according to an embodiment of this application. The method may specifically include the following steps:

[0121] S401, The first terminal obtains multiple candidate paths for the target file.

[0122] For example, the first terminal can be Figure 2 The first electronic device 10 shown.

[0123] In this embodiment, the target file can be a file that the first terminal determines to send to the second terminal. For example, the target file can be one or more of the following: electronic document, spreadsheet, image, webpage, and short video.

[0124] Each candidate path to the target file can point to a file storage location. This file storage location could be the location where the target file is stored, or it could be the location where other files are stored. In other words, the multiple file storage locations indicated by these candidate paths can include not only the actual storage location of the target file, but also the storage locations of other files.

[0125] It should be noted that the storage location pointed to by the candidate path can be either within the internal storage device of the first terminal or within its external storage device. For example, the first terminal can be connected to an external storage device, and the target file can be stored on that external storage device.

[0126] In one possible embodiment, the method provided in this application embodiment may further include, before S401: a first terminal determines the target file to be transmitted.

[0127] As an example of an embodiment of this application, the first terminal determines the target file to be transmitted in the following way: the first terminal responds to a user's click operation on the target file, and the first terminal determines the target file based on the click operation. For example, taking the target file as an electronic document (e.g., Test Doc.docx), the response to a user's click operation on a certain file (e.g., Test Doc.docx) is as follows: Figure 5 As shown, the first terminal opens the file (e.g., TestDoc.docx). The first terminal can then identify this file as the target file to be sent to the second terminal.

[0128] It should be noted that in scenarios where the first terminal determines the target file based on the user's click operation, the first terminal can open the target file if the click operation implies opening the target file. Conversely, if the click operation does not imply opening the target file, the step of opening the target file by the first terminal can be omitted.

[0129] In this embodiment of the application, "the first terminal opening a file" can mean that the file is displayed on the terminal's display interface (e.g., ...). Figure 5 (as shown), or the file is displayed on a device with display functionality connected to the first terminal, or the file is run as a background program.

[0130] As another example of an embodiment of this application, the first terminal determines the target file to be transferred in the following way: the first terminal receives a file transfer instruction from a second terminal, the file transfer instruction carrying an identifier of the file to be transferred. The first terminal determines the file indicated by the identifier of the file to be transferred as the target file.

[0131] It should be noted that in a scenario where the first terminal determines the target file based on the file transfer instructions of the second terminal, although the first terminal can determine which file the target file is, the first terminal may not be sure of the storage location of the target file.

[0132] S402, The first terminal obtains the file information of the target file.

[0133] In this embodiment of the application, the file information of the target file can be used to indicate the characteristics of the target file. For example, the file information of the target file may include the filename and file extension of the target file, etc.

[0134] As an example of an embodiment of this application, the first terminal can obtain the file information of the target file by acquiring the window information of the opened target file. For example, combined with Figure 5 The window information for the target file opened in the first terminal can be the information displayed in the title bar at the top of the file, i.e. Figure 5 The filename is "TestDoc.docx [read-only mode]". This window information includes the filename "TestDoc" and the extension "docx [read-only mode]". Of course, the location of the window information may differ for different files and terminals. For example, the window information may also be displayed in the sidebar or bottom bar of the target file; this embodiment does not limit this.

[0135] S403. The first terminal determines the matching degree of each candidate path among the multiple candidate paths based on the file information of the target file and the aforementioned multiple candidate paths.

[0136] The matching degree of any candidate path is used to reflect the probability that the file storage location corresponding to the candidate path is the storage location of the target file.

[0137] It is understood that the matching degree of different candidate paths may be the same or different, and the embodiments of this application do not limit this.

[0138] Specifically, taking multiple candidate paths, including candidate path 1 and candidate path 2, as an example, the first terminal determines the matching degree of candidate path 1 based on the file information of the target file and the information contained in candidate path 1. The first terminal determines the matching degree of candidate path 2 based on the file information of the target file and the information contained in candidate path 2.

[0139] For example, consider the candidate path "C:\Users\user1\Desktop\TestDoc.docx". This candidate path indicates that the C drive contains a folder named "Users", which in turn contains two folders named "user1" and "Desktop". The "Desktop" folder is a subfolder of the "user1" folder, and it contains the file "TestDoc.docx". Therefore, the location corresponding to the above candidate path is the "Desktop" folder, and the matching degree of the candidate path indicates the probability that the target file is stored in the "Desktop" folder.

[0140] S404. The first terminal determines the storage location of the target file based on the matching degree of each candidate path.

[0141] In this embodiment of the application, the above S404 can be implemented in the following way: the first terminal determines the storage location of the file corresponding to the candidate path with the highest matching degree among each candidate path as the storage location of the target file.

[0142] If two or more candidate paths have the same matching degree and the matching degree of these two or more candidate paths is the highest, the first terminal can find the candidate path with the highest priority from the two or more candidate paths according to the priority of each candidate path, and then determine the storage location of the file corresponding to the candidate path with the highest priority as the storage location of the target file.

[0143] Alternatively, the first terminal may determine the storage location of the target file in the following way: the first terminal determines multiple candidate paths with a matching degree greater than or equal to a preset matching degree threshold, and determines the location corresponding to the candidate path with the highest priority among the multiple candidate paths as the storage location of the target file.

[0144] For example, the matching degree of each candidate path calculated by the first terminal includes a first matching degree, a second matching degree, and a third matching degree. The preset matching degree threshold is the second matching degree. Then, the first terminal can select the location corresponding to the highest priority path from the candidate paths that are greater than or equal to the second matching degree threshold (i.e., the first matching degree and the second matching degree) as the storage location of the target file.

[0145] After determining the storage location of the target file, the first terminal can retrieve the target file from that storage location and transmit it to the second terminal through the established communication connection.

[0146] In this embodiment, the first terminal obtains multiple candidate paths to the target file and, in conjunction with the file information of the target file, calculates the matching degree of each candidate path. Since the matching degree represents the probability that the location corresponding to each candidate path belongs to the actual storage location of the target file, the first terminal can determine the storage location of the target file based on the matching degree. This embodiment improves the success rate of path acquisition by obtaining multiple candidate paths; furthermore, by combining this with the file information of the target file, it determines the probability that the location corresponding to each candidate path belongs to the storage location of the target file, thus improving the accuracy of determining the target file's storage location. Even in scenarios such as a single process opening multiple files, the application opening the target file being inactive, or the target file being protected, the above method can accurately determine the storage location of the target file. In practical applications, the above method can increase the success rate of determining the file storage location to over 95%.

[0147] As one possible implementation, S401 in this application embodiment can be implemented in the following way: the first terminal can use one or more methods to obtain multiple candidate paths of the target file.

[0148] like Figure 6As shown, the first terminal can obtain multiple candidate path information of the target file through one or more methods, such as calling the OLE interface, file search, reading information of recently used files, and parsing command lines.

[0149] It is understandable that, such as Figure 6 Each of the methods shown can obtain at least one candidate path.

[0150] On the one hand, such as Figure 7 As shown, the first terminal can obtain multiple candidate paths for the target file using a certain method. For example, taking the file search method as an example, the multiple candidate paths determined by the first terminal using the file search method include candidate path 3 to candidate path m.

[0151] On the other hand, such as Figure 7 As shown, the first terminal can obtain multiple candidate paths for the target file in various different ways. For example, the candidate paths determined by the first terminal using a file search method include candidate path 3 to candidate path m, and the candidate paths determined by the first terminal using the OLE interface method include candidate path 1. Therefore, the multiple candidate paths ultimately determined by the first terminal include candidate path 1, as well as candidate paths 3 to candidate path m. In other words, the first terminal can determine at least one candidate path obtained in each target method as multiple candidate paths.

[0152] In one possible implementation, the multiple candidate paths in this embodiment are candidate paths determined from n candidate paths. These n candidate paths are candidate paths obtained by the first terminal through one or more methods.

[0153] The relationship between n candidate paths and multiple candidate paths will be explained below, in cases 1 and 2:

[0154] Case 1: The multiple candidate paths can be a subset of the n candidate paths.

[0155] For example, such as Figure 7 As shown, the first terminal obtains a total of n candidate paths (i.e., candidate path 1, candidate path 2, ..., candidate path m, ..., candidate path n) through various methods, where n is an integer greater than or equal to 2, and m is an integer greater than 1 and less than or equal to n. Specifically, the candidate path obtained by the first terminal through the OLE interface is candidate path 1. The candidate path obtained by the first terminal through command-line parsing is candidate path 2. The candidate paths obtained by the first terminal through file search are candidate paths 3 to m. The candidate paths obtained by the first terminal by reading information from recently used files are candidate paths m+1 to n.

[0156] In case 1, the multiple candidate paths can be: candidate path 3 to candidate path m. Or the multiple candidate paths can be: candidate path m+1 to candidate path n. Or the multiple candidate paths can be: some paths from candidate path 3 to candidate path m and some or all paths from candidate path m+1 to candidate path n. This application embodiment does not limit this.

[0157] Understandably, in case 1, that is, after the first terminal obtains n candidate paths, it filters them to obtain multiple candidate paths, which can reduce the amount of computation required for subsequent processing by the first terminal.

[0158] This application does not limit the method by which the first terminal filters n candidate paths to obtain multiple candidate paths. For example, taking file search as an example, if the first terminal obtains candidate paths through file search, the first terminal can delete candidate paths containing garbled characters or other strings to obtain multiple candidate paths.

[0159] For example, for a target file named "TestDoc", after the first terminal performs a file search using the file name as a keyword, it can obtain the following candidate paths 3 to m:

[0160] Candidate path 3: C:\Users\user1\AppData\Roaming\Microsoft\Word\“AutoRecover” Save Normal.as$.

[0161] Candidate path 4

[0162] C:\Users\user1\AppData\Local\Microsoft\Windows\INetCache\Content.Word\~WRS{B0472BFC-E53E-46BF-B286-FF03A4879860}.tmp.

[0163] Candidate path 5: C:\Users\user1\Desktop\TestDoc.docx.

[0164] Candidate path 6: C:\Users\user1\AppData\Local\Microsoft\Office\Word15.customUI.

[0165] Candidate path 7: C:\Users\Local~1\AppData\Local\Temp\~DFF7CC7BB23682027C.TMP.

[0166] ...

[0167] Candidate path m, C:\Users\user1\Desktop\~$TestDoc.docx.

[0168] After filtering candidate paths 3 to m, the first terminal can use the filtered candidate paths 11 and 12 as the multiple candidate paths mentioned above:

[0169] Candidate path 11 (path 3 before filtering), C:\Users\user1\Desktop\TestDoc.docx.

[0170] Candidate path 12 (path 6 before filtering), C:\Users\user1\Desktop\~$TestDoc.docx.

[0171] Case 2: The multiple candidate paths can be all the candidate paths among the n candidate paths.

[0172] Based on the example in Case 1 above, the n candidate paths can be candidate path 3 to candidate path m.

[0173] As one possible implementation, S403 in this embodiment can be implemented as follows: The first terminal processes the file information of the target file using a first processing method and / or a second processing method to obtain a processing result. The first terminal determines the matching degree of each candidate path based on the processing result and each candidate path.

[0174] The first processing method has higher accuracy than the second processing method. The first processing method can be called precise processing, and the second processing method can be called fuzzy processing.

[0175] See Figure 7 and Figure 8 The matching degree of each candidate path can be represented by MPn, where n is the number of candidate paths.

[0176] On the one hand, in the embodiments of this application, when the first terminal uses the first processing method to determine the matching degree of each candidate path, the first terminal can process the file information of the obtained target file into a corresponding complete string (i.e. the above processing result) and compare it with the information included in each candidate path to determine whether each candidate path contains the above string.

[0177] For example, the string corresponding to the file information of the target file can be represented as "TestDoc.docx[read-only mode]". The first terminal can compare this string with each of the multiple candidate paths to determine whether one or more candidate paths contain the string "TestDoc.docx[read-only mode]".

[0178] Taking multiple candidate paths, including candidate path x, where candidate path x is "C:\Users\user1\Desktop\TestDoc.docx", as an example, after comparing the string "TestDoc.docx[read-only mode]" with candidate path x, the first terminal can determine that candidate path x does not contain the string corresponding to the aforementioned file information. Subsequently, the first terminal determines the matching degree of candidate path x as the first matching degree.

[0179] Taking multiple candidate paths, including candidate path x, where candidate path x is "C:\Users\user1\Desktop\TestDoc.docx[read-only mode]", as an example, after comparing the string "TestDoc.docx[read-only mode]" with candidate path x, the first terminal can determine that candidate path x contains the string corresponding to the aforementioned file information. Then, the first terminal determines the matching degree of candidate path x as a second matching degree. The first matching degree is lower than the second matching degree. In other words, in the scenario where the first terminal determines the matching degree of candidate paths using the first processing method, the matching degree of candidate paths that include the string corresponding to the aforementioned file information is higher than the matching degree of candidate paths that do not include the string corresponding to the aforementioned file information.

[0180] On the other hand, when the first terminal uses the second processing method to determine the matching degree of each candidate path, the first terminal can split the string corresponding to the file information of the target file into multiple substrings (i.e., the processing result described above). Each substring can be regarded as a feature Fh of the second processing method. In other words, multiple substrings can also be called multiple features. Then, the first terminal compares each candidate path with at least one of the multiple features to determine whether each candidate path contains at least one of the multiple features mentioned above.

[0181] For example, if the string corresponding to the file information of the target file can be represented as "TestDoc.docx[read-only mode]", when the first terminal uses the second processing method to determine the matching degree of each candidate path, the first terminal can determine that the multiple features corresponding to the target file can include F1: "TestDoc" and F2: "docx[read-only mode]". Here, "TestDoc" represents the filename of the target file, and "docx[read-only mode]" represents the file extension of the target file.

[0182] In one possible implementation of this application embodiment, when the first terminal processes each candidate path using the second processing method, the second processing method may further include F3, which is the fuzzy path obtained by the first terminal through a background process that reads the target file. For example, the fuzzy path of the target file may be represented as F3: "C:\Users\user1\Desktop\TestDoc.docx".

[0183] Then, the first terminal can compare each feature with each candidate path to determine whether the candidate path contains one or more of the above features.

[0184] For example, taking the file information "TestDoc.docx[read-only mode]" as an example, the first terminal can split it into two substrings: "TestDoc" and "docx[read-only mode]". The substring "TestDoc" represents the filename of the target file, which can be used as the first feature F1 of the second processing method; "docx[read-only mode]" represents the file extension of the target file, which can be used as the second feature F2 of the second processing method. The first terminal can obtain the fuzzy path of the target file, "C:\Users\user1\Desktop\TestDoc.docx", by reading the background process, which serves as the third feature F3. Then, the first terminal can compare these features with the path information of each candidate path. If the candidate path is "C:\Users\user1\Desktop\TestDoc.docx", then after comparison, the first terminal can determine that the candidate path contains the first feature F1 and the third feature F3, but does not contain the second feature F2.

[0185] It should be noted that the first and second processing methods described above can be used individually or in combination. For example, the first terminal can first use the first processing method to compare the string corresponding to the file information as a whole with each candidate path. If one or more candidate paths contain the aforementioned string, the process of using the second processing method can be omitted. If the first terminal fails to find any candidate path containing the aforementioned string using the first processing method, the first terminal can continue to use the second processing method to determine multiple features of the target file after using the first processing method. After obtaining multiple features of the target file, the first terminal compares each feature with multiple candidate paths to find a candidate path containing one or more features. Of course, the first terminal can also first use the second processing method to compare each feature and each candidate path, and then use the first processing method. The order of using the first and second processing methods is not limited in this embodiment.

[0186] In this embodiment of the application, after the first terminal processes the file information of the target file using the first processing method and / or the second processing method, it can determine the matching degree of each candidate path based on the relationship between the processing result and each candidate path (e.g., whether the path includes the above processing result). Figure 7 MPn in.

[0187] In a specific implementation, the first terminal may determine the matching degree of each candidate path based on the processing results, including:

[0188] If the first terminal finds one or more candidate paths whose path information contains a string corresponding to the file information of the target file using the first processing method, then the first terminal can determine the matching degree of the candidate path containing the aforementioned string as the first matching degree, i.e. Figure 7 MP1 in the equation. Among them, the first matching degree MP1 is greater than the preset threshold.

[0189] If the path information of a candidate path contains all the features from the multiple features corresponding to the target file, then the first terminal can determine the matching degree of the candidate path containing all the above features as the second matching degree, that is... Figure 7 MP2 in the file.

[0190] If the path information of a candidate path contains some features from multiple features corresponding to the target file, then the first terminal can determine the matching degree of the candidate path containing the aforementioned partial features as the third matching degree, i.e. Figure 7 MP3s in the file.

[0191] If the path information of a candidate path contains only one of the multiple features of the target file, the first terminal can determine the matching degree of the candidate path containing only one of the aforementioned features as the fourth matching degree, i.e. Figure 7 MP4 in the file.

[0192] For example, if a candidate path contains the string "TestDoc.docx[read-only mode]" as in the example above, the first terminal can determine that the matching degree of the candidate path is the first matching degree MP1. If a candidate path contains multiple features of the target file, such as features F1: "TestDoc", F2: "docx[read-only mode]" and F3: "C:\Users\user1\Desktop\TestDoc.docx" as in the example above, the first terminal can determine that the matching degree of the candidate path is the second matching degree MP2. The second matching degree MP2 is less than the first matching degree MP1. If a candidate path contains only a portion of the target file's features, such as features F1: "TestDoc" and F2: "docx[read-only mode]" as in the example above, but not feature F3: "C:\Users\user1\Desktop\TestDoc.docx", the first terminal can determine that the matching degree of the candidate path is the third matching degree MP3. The third matching degree MP3 is less than the second matching degree MP2. If a candidate path contains only one of the above features, for example, if the candidate path contains only one of the features F1: "TestDoc", F2: "docx [read-only mode]", and F3: "C:\Users\user1\Desktop\TestDoc.docx" in the example above, then the first terminal can determine that the matching degree of the candidate path is the fourth matching degree MP4. The fourth matching degree MP4 is less than the third matching degree MP3.

[0193] In one possible implementation of this application embodiment, when determining the matching degree of a candidate path, the first terminal may first use a first processing method to determine whether the matching degree of the candidate path is a first matching degree. If the first terminal determines that the matching degree of a candidate path is a first matching degree, the first terminal may stop matching the candidate path and no longer use a second processing method to match the candidate path. The matching degree of the candidate path is then the first matching degree. If the first terminal uses the first processing method to determine that the matching degree of the candidate path is not a first matching degree, the first terminal continues to use the second processing method to match the candidate path to determine whether the matching degree of the candidate path is a second matching degree, a third matching degree, or a fourth matching degree.

[0194] It should be noted that after the first terminal determines the matching degree of each candidate path using the first processing method and / or the second processing method, if there are multiple candidate paths with the highest matching degree, the first terminal can find the highest priority candidate path from among the multiple candidate paths with the highest matching degree according to the priority of each candidate path, and then determine the location corresponding to the highest priority candidate path as the storage location of the target file. For example, if after calculating the matching degree of all candidate paths, the highest matching degree is the second matching degree, and there are multiple candidate paths with the second matching degree, the first terminal can determine the location corresponding to the higher priority candidate path as the file storage location by judging the priority of each candidate path with the second matching degree.

[0195] like Figure 7 As shown, GPk can be used to represent the priority of each method for obtaining candidate paths, where k represents the k methods for obtaining candidate paths. Correspondingly, the priority of each candidate path is the same as the priority of the method used to obtain that candidate path. For example, considering multiple methods for obtaining candidate paths, such as OLE interface, file search, command line parsing, and recently used files, assuming that the priority of file search GP1 is higher than the priority of OLE interface GP2, the priority of OLE interface GP2 is higher than the priority of command line parsing GP3, and the priority of command line parsing GP3 is higher than the priority of recently used files GP4, then after obtaining multiple candidate paths according to the above four methods, the priority of the candidate path obtained by file search should be higher than the priority of the candidate path obtained by OLE interface, the priority of the candidate path obtained by OLE interface is higher than the priority of the candidate path obtained by command line parsing, and the priority of the candidate path obtained through recently used file information is the lowest.

[0196] In one possible embodiment, the method provided in this application embodiment may further include, after step S404: the first terminal obtains the target file according to its storage location; the first terminal sends the target file to the second terminal.

[0197] In a practical implementation, the first terminal can transfer the target file to the second terminal based on the established communication connection.

[0198] To facilitate understanding, the following will be combined with... Figure 6 , Figure 7 and Figure 8 The method for determining the file storage location in this application will be described through specific examples.

[0199] Example 1:

[0200] For a target file in the first terminal, let's assume that the target file is... Figure 5 The file information of an open office document can be obtained by reading the information displayed in the title bar of the file, which is: work.txt;

[0201] The candidate paths obtained by the first terminal based on various methods may include:

[0202] Candidate paths obtained from file search:

[0203] Candidate path 1: C:\Users\user1\AppData\Roaming\Microsoft\Word\“AutoRecover” saved as Normal.as$

[0204] Candidate path 2: C:\Windows\Fonts\StaticCache.dat

[0205] Candidate path 3: C:\Users\user1\Desktop\TestDoc.docx

[0206] Candidate path 4: C:\Users\user1\AppData\Local\Microsoft\Office\Word15.customUI

[0207] Candidate path 5: C:\Users\user1\Desktop\~$TestDoc.docx

[0208] Candidate path m, (...there are many search results, not all are listed)

[0209] Candidate paths obtained by calling the OLE interface:

[0210] null

[0211] Candidate paths obtained by reading information from recently used files:

[0212] Candidate path m+1, C:\Users\user1\Desktop\work.txt

[0213] Parse the candidate paths obtained from the command line:

[0214] Candidate path n: "C:\windows\system32\NOTEPAD.EXE"C:\Users\user1\Desktop\work.txt

[0215] After filtering out some candidate paths, the remaining candidate paths can include:

[0216] After initial filtering of the candidate paths obtained from the file search:

[0217] null

[0218] After initial filtering of candidate paths obtained from calling the OLE interface:

[0219] null

[0220] After initial filtering of candidate paths obtained from reading information about recently used files:

[0221] Candidate path m+1, C:\Users\user1\Desktop\work.txt

[0222] After initial filtering and parsing of the candidate paths obtained from the command line:

[0223] Candidate path n: "C:\windows\system32\NOTEPAD.EXE"C:\Users\user1\Desktop\work.txt

[0224] When processing the file information and candidate paths using the first processing method, the string "work.txt" in the file information can be compared with each candidate path. The comparison results include:

[0225] File search comparison results:

[0226] null

[0227] Comparison results from calling the OLE interface:

[0228] null

[0229] Compare the results of reading information about recently used files:

[0230] Candidate path m+1, C:\Users\user1\Desktop\work.txt

[0231] Parsing command line comparison results:

[0232] Candidate path n: C:\Users\user1\Desktop\work.txt

[0233] Based on the comparison results, the storage location of the target file is determined, where:

[0234] Candidate paths with the first matching degree MP1: relatively hit.

[0235] Priority of candidate path retrieval methods: file search > calling OLE interface > command line parsing > reading information of recently used files.

[0236] Therefore, the final storage location of the target file is the location corresponding to the path "C:\Users\user1\Desktop\work.txt" obtained by parsing the command line.

[0237] Then, the first terminal can obtain the target file, namely the document named "work", from the location corresponding to the path "C:\Users\user1\Desktop\work.txt" and transfer the document to the second terminal.

[0238] Example 2:

[0239] Assume the target file information is: TestDoc.docx [read-only mode];

[0240] The candidate paths obtained by the first terminal based on various acquisition methods may include:

[0241] Candidate paths obtained from file search:

[0242] Candidate path 1: C:\Users\user1\AppData\Roaming\Microsoft\Word\“AutoRecover” saved as Normal.as$

[0243] Candidate path 2

[0244] C:\Users\user1\AppData\Local\Microsoft\Windows\INetCache\Content.Word\~WRS{B0472BFC-E53E-46BF-B286-FF03A4879860}.tmp

[0245] Candidate path 3: C:\Users\user1\Desktop\TestDoc.docx

[0246] Candidate path 4: C:\Users\user1\AppData\Local\Microsoft\Office\Word15.customUI

[0247] Candidate path 5: C:\Users\Local~1\AppData\Local\Temp\~DFF7CC7BB23682027C.TMP

[0248] Candidate path 6: C:\Users\user1\Desktop\~$TestDoc.docx

[0249] Candidate path m, (...there are many search results, not all are listed)

[0250] Candidate paths obtained by calling the OLE interface:

[0251] Candidate path m+1, C:\Users\user1\Desktop\TestDoc.docx

[0252] Candidate paths obtained by reading information from recently used files:

[0253] Candidate path m+2, C:\Users\user1\Desktop\~$TestDoc.docx

[0254] Candidate path m+3, C:\Users\user1\Desktop\TestDoc.docx

[0255] Parse the candidate paths obtained from the command line:

[0256] Candidate path n, "C:\Program Files\Microsoft Office\Office15\WINWORD.EXE" / n

[0257] C:\Users\user1\Desktop\TestDoc.docx"

[0258] After filtering out some candidate paths, the remaining candidate paths can include:

[0259] After initial filtering of the candidate paths obtained from the file search:

[0260] Candidate path 3: C:\Users\user1\Desktop\TestDoc.docx

[0261] Candidate path 6: C:\Users\user1\Desktop\~$TestDoc.docx

[0262] After initial filtering of candidate paths obtained from calling the OLE interface:

[0263] Candidate path m+1, C:\Users\user1\Desktop\TestDoc.docx

[0264] After initial filtering of candidate paths obtained from recently opened file information:

[0265] Candidate paths m+2, C:\Users\user1\Desktop\~$TestDoc.docx

[0266] Candidate path m+3, C:\Users\user1\Desktop\TestDoc.docx

[0267] After initial filtering and parsing of the candidate paths obtained from the command line:

[0268] Candidate path n, "C:\Program Files\Microsoft Office\Office15\WINWORD.EXE" / n"C:\Users\user1\Desktop\TestDoc.docx"

[0269] When processing the file information and candidate paths using the first processing method, the string "TestDoc.docx[read-only mode]" in the file information can be compared with each candidate path. The comparison results include:

[0270] File search comparison results:

[0271] null

[0272] Comparison results from calling the OLE interface:

[0273] null

[0274] Compare the results of reading information from recently used files:

[0275] null

[0276] Parsing command-line comparison results:

[0277] null

[0278] Since the first processing method failed to find a suitable candidate path, the first terminal can continue to use the second processing method to compare each candidate path. When using the second processing method, the first terminal can split the string "TestDoc.docx[read-only mode]" into two substrings: the filename substring F1: "TestDoc" and the file extension substring F2: "docx[read-only mode]". It then reads the fuzzy path information F3 of the target file as "C:\Users\user1\Desktop\TestDoc.docx" through a background process. Finally, it uses the two substrings and the fuzzy path information to compare with each candidate path. The comparison results include:

[0279] File search comparison results:

[0280] C:\Users\user1\Desktop\TestDoc.docx --- Filename F1 hit successful, file extension F2 failed to hit, fuzzy path F3 hit successful.

[0281] C:\Users\user1\Desktop\~$TestDoc.docx---File name F1 failed to match, file extension F2 failed to match, fuzzy path F3 failed to match.

[0282] Comparison results from calling the OLE interface:

[0283] C:\Users\user1\Desktop\TestDoc.docx --- Filename F1 hit successful, file extension F2 failed to hit, fuzzy path F3 hit successful.

[0284] Compare the results of reading information about recently used files:

[0285] C:\Users\user1\Desktop\~$TestDoc.docx---File name F1 failed to match, file extension F2 failed to match, fuzzy path F3 failed to match.

[0286] C:\Users\user1\Desktop\TestDoc.docx --- Filename F1 hit successful, file extension F2 failed to hit, fuzzy path F3 hit successful.

[0287] Command line parsing comparison results:

[0288] "C:\Program Files\Microsoft Office\Office15\WINWORD.EXE" / n"C:\Users\user1\Desktop\TestDoc.docx"---File name F1 hit successful, file extension F2 failed to hit, fuzzy path F3 hit successful.

[0289] Based on the comparison results, the storage location of the target file is determined, where:

[0290] Candidate path with first matching degree MP1: No match found in the first comparison method of file information.

[0291] Candidate paths with a second-degree match MP2: No match found for filename, file extension, or fuzzy path.

[0292] Candidate paths for MP3 with a third degree of matching: No matching in filename or file extension.

[0293] Candidate paths for MP4 with a fourth degree of matching: the filename and the file extension match at least once.

[0294] Priority of candidate path retrieval methods: file search > calling OLE interface > command line parsing > reading information of recently used files.

[0295] Therefore, the final determined storage location of the target file is the location corresponding to the path "C:\Users\user1\Desktop\TestDoc.docx" obtained through file search --- filename matched successfully, extension matched unsuccessfully, fuzzy path matched successfully.

[0296] Then, the first terminal can obtain the target file, namely the document named "TestDoc", from the location corresponding to the path "C:\Users\user1\Desktop\TestDoc.docx" and transfer the document to the second terminal.

[0297] This application embodiment can divide the first terminal into functional modules according to the above method example. For example, each function can be divided into a separate functional module, or one or more functions can be integrated into a single functional module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation. The following description uses the example of dividing each function into a separate functional module.

[0298] Reference Figure 9 The diagram illustrates a device for determining a file storage location according to an embodiment of this application. This device can be applied to a first terminal and may include a candidate path determination module 901, a file information acquisition module 902, and a storage location determination module 903, wherein:

[0299] The candidate path determination module can be used to support the first terminal in performing the above step S401, and / or other processes used in the techniques described herein.

[0300] The file information acquisition module can be used to support the first terminal in performing the above step S402, and / or other processes used in the technology described herein.

[0301] The storage location determination module can be used to support the first terminal in performing the above steps S403 and S404, and / or other processes used in the technology described herein.

[0302] In one possible implementation of this application, a candidate path determination module is used to determine multiple candidate paths corresponding to the target file, each candidate path pointing to a file storage location; a file information acquisition module is used to acquire file information of the target file; and a storage location determination module is used to determine the file storage location pointed to by the first candidate path among the multiple candidate paths as the storage location of the target file based on the file information and the multiple candidate paths, wherein the matching degree of the first candidate path is the maximum matching degree among the matching degrees of the multiple candidate paths.

[0303] In one possible implementation of this application, the candidate path determination module is used to determine multiple candidate paths for a target file by calling an object connection and embedding interface, file search, reading information of recently used files, and parsing one or more commands in the command line.

[0304] In one possible implementation of this application embodiment, the file information acquisition module is used to acquire window information of the target file, wherein the window information is information displayed at a preset position in the target file; and to determine the file information of the target file based on the window information.

[0305] In one possible implementation of this application embodiment, the apparatus further includes:

[0306] The matching degree determination module is used to determine the matching degree of each candidate path among multiple candidate paths based on file information.

[0307] In one possible implementation of this application embodiment, the matching degree determination module is used to process the file information of the target file using a preset first processing method and / or a preset second processing method to obtain the corresponding processing result, wherein the accuracy of the first processing method is higher than the accuracy of the second processing method; and to determine the matching degree of each candidate path among multiple candidate paths based on the processing result and the path information contained in each candidate path.

[0308] In one possible implementation of this application embodiment, the matching degree determination module is used to determine the matching degree of the second candidate path as the first matching degree if the path information of the second candidate path contains the processing result of the first processing method, wherein the processing result of the first processing method is a string containing file information, and the second candidate path is any one of multiple candidate paths; if the path information of the second candidate path does not contain the processing result of the first processing method, the matching degree of the second candidate path is determined according to the processing result of the second processing method and the path information contained in the second candidate path, wherein the processing result of the second processing method contains multiple features of the target file, and each feature corresponds one-to-one with each substring in the string.

[0309] In one possible implementation of this application embodiment, the matching degree determination module is configured to: if the number of features of the target file contained in the path information of the second candidate path is greater than or equal to a first threshold, then determine the matching degree of the second candidate path as a second matching degree, wherein the second matching degree is less than the first matching degree; if the number of features of the target file contained in the path information of the second candidate path is greater than or equal to the second threshold and less than the first threshold, then determine the matching degree of the second candidate path as a third matching degree, wherein the third matching degree is less than the second matching degree; if the number of features of the target file contained in the path information of the second candidate path is less than the second threshold, then the first terminal determines the matching degree of the second candidate path as a fourth matching degree, wherein the fourth matching degree is less than the third matching degree.

[0310] In one possible implementation of this application, the storage location determination module is used to determine the priority of each candidate path with the maximum matching degree if there are multiple candidate paths corresponding to the maximum matching degree, wherein the priority of the candidate path is obtained according to the priority of the method of determining the candidate path; and determine the file storage location pointed to by the candidate path with the highest priority among the multiple candidate paths corresponding to the maximum matching degree as the storage location of the target file.

[0311] In one possible implementation of this application embodiment, the priority relationship among the various methods of determining candidate paths is as follows: file search has a higher priority than calling the object connection and embedding interface, the calling the object connection and embedding interface has a higher priority than parsing the command line, and the parsing the command line has a higher priority than reading information about recently used files.

[0312] In one possible implementation of this application embodiment, the apparatus further includes:

[0313] The target file sending module is used to retrieve the target file from the storage location and send the target file to the second terminal.

[0314] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0315] This application also provides a terminal, which may be the first terminal in the foregoing embodiments, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for determining the file storage location in the above embodiments.

[0316] This application also provides a computer storage medium storing computer instructions. When the computer instructions are executed on a first terminal, the first terminal performs the aforementioned method steps to implement the method for determining the file storage location in the above embodiments.

[0317] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the method for determining the file storage location described in the above embodiments.

[0318] Reference Figure 10 The diagram shows a schematic representation of a chip provided in an embodiment of this application. Figure 10 The chip shown can be a general-purpose processor or a dedicated processor. The chip includes a processor 1001. The processor 1001 is used to support the first terminal in executing the aforementioned steps to implement the method for determining the file storage location in the above embodiments.

[0319] Optionally, the chip also includes a transceiver 1002, which is used to receive control from the processor 1001 and to support the first terminal in performing the above-mentioned related steps to implement the method for determining the file storage location in the above embodiments.

[0320] Optional, Figure 10 The chip shown may also include: storage medium 1003.

[0321] It should be noted that, Figure 10 The chip shown can be implemented using one or more field programmable gate arrays (FPGAs), programmable logic devices (PLDs), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout this application.

[0322] Based on the above, this application provides the following embodiments:

[0323] Example 1: A method for determining the storage location of a file, comprising:

[0324] The first terminal determines multiple candidate paths corresponding to the target file, and each candidate path points to a file storage location;

[0325] The first terminal obtains the file information of the target file;

[0326] The first terminal determines the storage location of the target file as the storage location of the file pointed to by the first candidate path among the multiple candidate paths, based on the file information and the multiple candidate paths, wherein the matching degree of the first candidate path is the maximum matching degree among the matching degrees of the multiple candidate paths.

[0327] Example 2: According to the method described in Example 1, wherein the first terminal determines multiple candidate paths corresponding to the target file, including:

[0328] The first terminal uses one or more methods, including calling object connection and embedding interfaces, file search, reading information of recently used files, and parsing command lines, to determine multiple candidate paths for the target file.

[0329] Example 3: According to the method described in Example 1, the first terminal obtains the file information of the target file, including:

[0330] The first terminal acquires window information of the target file, wherein the window information is information displayed at a preset position in the target file;

[0331] The first terminal determines the file information of the target file based on the window information.

[0332] Example 4: The method according to any one of Examples 1-3, wherein the method further includes:

[0333] The first terminal determines the matching degree of each candidate path among the multiple candidate paths based on the file information.

[0334] Example 5: According to the method described in Example 4, wherein the first terminal determines the matching degree of each candidate path among the plurality of candidate paths based on the file information, including:

[0335] The first terminal processes the file information of the target file using a preset first processing method and / or a preset second processing method to obtain a corresponding processing result, wherein the accuracy of the first processing method is higher than that of the second processing method;

[0336] The first terminal determines the matching degree of each candidate path among the multiple candidate paths based on the processing result and the path information contained in each candidate path.

[0337] Example 6: According to the method described in Example 5, the first terminal determines the matching degree of each candidate path among the multiple candidate paths based on the processing result and the path information contained in each candidate path, including:

[0338] If the path information of the second candidate path contains the processing result of the first processing method, then the first terminal determines the matching degree of the second candidate path as the first matching degree, wherein the processing result of the first processing method is a string containing the file information, and the second candidate path is any one of the multiple candidate paths;

[0339] If the path information of the second candidate path does not contain the processing result of the first processing method, the first terminal determines the matching degree of the second candidate path based on the processing result of the second processing method and the path information contained in the second candidate path. The processing result of the second processing method contains multiple features of the target file, and each feature corresponds one-to-one with each substring in the string.

[0340] Example 7: According to the method described in Example 6, the first terminal determines the matching degree of the second candidate path based on the processing result of the second processing method and the path information contained in the second candidate path, including:

[0341] If the number of features of the target file contained in the path information of the second candidate path is greater than or equal to the first threshold, then the first terminal determines the matching degree of the second candidate path as the second matching degree, and the second matching degree is less than the first matching degree.

[0342] If the number of features of the target file contained in the path information of the second candidate path is greater than or equal to the second threshold and less than the first threshold, then the first terminal determines the matching degree of the second candidate path as the third matching degree, which is less than the second matching degree.

[0343] If the number of features of the target file contained in the path information of the second candidate path is less than the second threshold, then the first terminal determines the matching degree of the second candidate path as the fourth matching degree, which is less than the third matching degree.

[0344] Example 8: The method according to any one of Examples 1-7, wherein the method further includes:

[0345] If the candidate path corresponding to the maximum matching degree includes multiple paths, the first terminal determines the priority of each candidate path with the maximum matching degree, wherein the priority of the candidate path is obtained according to the priority of the method of determining the candidate path;

[0346] The first terminal determines the file storage location of the target file as the file storage location pointed to by the candidate path with the highest priority among the multiple candidate paths corresponding to the maximum matching degree.

[0347] Example 9: According to the method described in Example 8, the priority relationship among the various methods for determining candidate paths is as follows:

[0348] File search has a higher priority than calling the object connection and embedding interface, which in turn has a higher priority than parsing the command line, which in turn has a higher priority than reading information about recently used files.

[0349] Example 10: The method according to Example 8, wherein the method further includes:

[0350] The first terminal retrieves the target file from the storage location;

[0351] The first terminal sends the target file to the second terminal.

[0352] Example 11: A device for determining the storage location of a file, applied to a first terminal, the device comprising:

[0353] The candidate path determination module is used to determine multiple candidate paths corresponding to the target file, and each candidate path points to a file storage location;

[0354] The file information acquisition module is used to acquire the file information of the target file;

[0355] The storage location determination module is used to determine the storage location of the target file as the file storage location pointed to by the first candidate path among the multiple candidate paths, based on the file information and the multiple candidate paths, wherein the matching degree of the first candidate path is the maximum matching degree among the matching degrees of the multiple candidate paths.

[0356] Example 12: According to the apparatus of Example 11, the candidate path determination module is used to determine multiple candidate paths of the target file by using one or more of the following methods: calling object connection and embedding interface, file search, reading information of recently used files, and parsing command line.

[0357] Example 13: According to the apparatus described in Example 11, the file information acquisition module is used to acquire window information of the target file, wherein the window information is information displayed at a preset position in the target file; and to determine the file information of the target file based on the window information.

[0358] Example 14: The apparatus according to any one of Examples 11-13, wherein the apparatus further comprises:

[0359] The matching degree determination module is used to determine the matching degree of each candidate path among the multiple candidate paths based on the file information.

[0360] Example 15: According to the apparatus described in Example 14, the matching degree determination module is used to process the file information of the target file using a preset first processing method and / or a preset second processing method to obtain a corresponding processing result, wherein the accuracy of the first processing method is higher than the accuracy of the second processing method; and to determine the matching degree of each candidate path among the multiple candidate paths based on the processing result and the path information contained in each candidate path.

[0361] Example 16: According to the apparatus described in Example 15, the matching degree determination module is configured to: if the path information of the second candidate path contains the processing result of the first processing method, then the first terminal determines the matching degree of the second candidate path as a first matching degree, wherein the processing result of the first processing method is a string containing the file information, and the second candidate path is any one of the plurality of candidate paths; if the path information of the second candidate path does not contain the processing result of the first processing method, then the first terminal determines the matching degree of the second candidate path based on the processing result of the second processing method and the path information contained in the second candidate path, wherein the processing result of the second processing method contains multiple features of the target file, and each feature corresponds one-to-one with each substring in the string.

[0362] Example 17: According to the apparatus described in Example 16, the matching degree determination module is configured to: if the number of features of the target file contained in the path information of the second candidate path is greater than or equal to a first threshold, then the first terminal determines the matching degree of the second candidate path as a second matching degree, the second matching degree being less than the first matching degree; if the number of features of the target file contained in the path information of the second candidate path is greater than or equal to the second threshold and less than the first threshold, then the first terminal determines the matching degree of the second candidate path as a third matching degree, the third matching degree being less than the second matching degree; if the number of features of the target file contained in the path information of the second candidate path is less than the second threshold, then the first terminal determines the matching degree of the second candidate path as a fourth matching degree, the fourth matching degree being less than the third matching degree.

[0363] Example 18. The apparatus according to any one of Examples 11-17, wherein the storage location determination module is used to determine the priority of each candidate path with the maximum matching degree if the candidate path corresponding to the maximum matching degree includes multiple paths, wherein the priority of the candidate path is obtained according to the priority of the method of determining the candidate path; the first terminal determines the file storage location pointed to by the candidate path with the highest priority among the multiple candidate paths corresponding to the maximum matching degree as the storage location of the target file.

[0364] Example 19: According to the apparatus of Example 18, the priority relationship among the various methods of determining candidate paths is as follows:

[0365] File search has a higher priority than calling the object connection and embedding interface, which in turn has a higher priority than parsing the command line, which in turn has a higher priority than reading information about recently used files.

[0366] Example 20: The apparatus according to Example 18, wherein the apparatus further comprises:

[0367] The target file sending module is used to retrieve the target file from the storage location and send the target file to the second terminal.

[0368] Example 21: A terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:

[0369] The first terminal determines multiple candidate paths corresponding to the target file, and each candidate path points to a file storage location;

[0370] The first terminal obtains the file information of the target file;

[0371] The first terminal determines the storage location of the target file as the storage location of the file pointed to by the first candidate path among the multiple candidate paths, based on the file information and the multiple candidate paths, wherein the matching degree of the first candidate path is the maximum matching degree among the matching degrees of the multiple candidate paths.

[0372] Example 22: According to the terminal described in Example 21, the processor, when executing the computer program, further implements the following steps:

[0373] The first terminal uses one or more methods, including calling object connection and embedding interfaces, file search, reading information of recently used files, and parsing command lines, to determine multiple candidate paths for the target file.

[0374] Example 23: According to the terminal described in Example 21, the processor, when executing the computer program, further implements the following steps:

[0375] The first terminal acquires window information of the target file, wherein the window information is information displayed at a preset position in the target file;

[0376] The first terminal determines the file information of the target file based on the window information.

[0377] Example 24: The terminal according to any one of Examples 21-23, wherein when the processor executes the computer program, it further performs the following steps:

[0378] The first terminal determines the matching degree of each candidate path among the multiple candidate paths based on the file information.

[0379] Example 25: According to the terminal described in Example 24, when the processor executes the computer program, it further performs the following steps:

[0380] The first terminal processes the file information of the target file using a preset first processing method and / or a preset second processing method to obtain a corresponding processing result, wherein the accuracy of the first processing method is higher than that of the second processing method;

[0381] The first terminal determines the matching degree of each candidate path among the multiple candidate paths based on the processing result and the path information contained in each candidate path.

[0382] Example 26: According to the terminal described in Example 25, when the processor executes the computer program, it further performs the following steps:

[0383] If the path information of the second candidate path contains the processing result of the first processing method, then the first terminal determines the matching degree of the second candidate path as the first matching degree, wherein the processing result of the first processing method is a string containing the file information, and the second candidate path is any one of the multiple candidate paths;

[0384] If the path information of the second candidate path does not contain the processing result of the first processing method, the first terminal determines the matching degree of the second candidate path based on the processing result of the second processing method and the path information contained in the second candidate path. The processing result of the second processing method contains multiple features of the target file, and each feature corresponds one-to-one with each substring in the string.

[0385] Example 27: According to the terminal described in Example 26, when the processor executes the computer program, it further performs the following steps:

[0386] If the number of features of the target file contained in the path information of the second candidate path is greater than or equal to the first threshold, then the first terminal determines the matching degree of the second candidate path as the second matching degree, and the second matching degree is less than the first matching degree.

[0387] If the number of features of the target file contained in the path information of the second candidate path is greater than or equal to the second threshold and less than the first threshold, then the first terminal determines the matching degree of the second candidate path as the third matching degree, which is less than the second matching degree.

[0388] If the number of features of the target file contained in the path information of the second candidate path is less than the second threshold, then the first terminal determines the matching degree of the second candidate path as the fourth matching degree, which is less than the third matching degree.

[0389] Example 28: The terminal according to any one of Examples 21-27, wherein when the processor executes the computer program, it further performs the following steps:

[0390] If the candidate path corresponding to the maximum matching degree includes multiple paths, the first terminal determines the priority of each candidate path with the maximum matching degree, wherein the priority of the candidate path is obtained according to the priority of the method of determining the candidate path;

[0391] The first terminal determines the file storage location pointed to by the candidate path with the highest priority among the multiple candidate paths corresponding to the maximum matching degree as the storage location of the target file.

[0392] Example 29: According to the terminal described in Example 28, when the processor executes the computer program, it further performs the following steps:

[0393] File search has a higher priority than calling the object connection and embedding interface, which in turn has a higher priority than parsing the command line, which in turn has a higher priority than reading information about recently used files.

[0394] Example 30: The terminal according to Example 28, wherein when the processor executes the computer program, it further performs the following steps:

[0395] The first terminal retrieves the target file from the storage location;

[0396] The first terminal sends the target file to the second terminal.

[0397] Example 31: A chip, the chip including a memory and a processor, the processor executing a computer program stored in the memory to implement the method for determining the file storage location as described in any one of Examples 1-10.

[0398] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for determining the storage location of a file, characterized in that, The first terminal and the second terminal establish a communication connection via NFC technology, including: The first terminal receives a file transfer instruction sent by the second terminal and determines multiple candidate paths corresponding to the target file. The file transfer instruction instructs the first terminal to send the target file to the second terminal. The multiple candidate paths are determined by one or more methods. Each candidate path points to a file storage location. The matching degree of each candidate path is used to reflect the probability that the file storage location corresponding to the candidate path is the storage location of the target file. The target file is a file displayed on the display interface of the first terminal. The first terminal acquires window information of the target file, wherein the window information is information displayed at a preset position in the target file; The first terminal determines the file information of the target file based on the window information; The first terminal determines the storage location of the target file as the storage location of the file pointed to by the first candidate path among the multiple candidate paths, based on the file information and the multiple candidate paths, wherein the matching degree of the first candidate path is the maximum matching degree among the matching degrees of the multiple candidate paths.

2. The method according to claim 1, characterized in that, The first terminal determines multiple candidate paths corresponding to the target file, including: The first terminal uses one or more methods, including calling object connection and embedding interfaces, file search, reading information of recently used files, and parsing command lines, to determine multiple candidate paths for the target file.

3. The method according to any one of claims 1 or 2, characterized in that, The method further includes: The first terminal determines the matching degree of each candidate path among the multiple candidate paths based on the file information.

4. The method according to claim 3, characterized in that, The first terminal determines the matching degree of each candidate path among the multiple candidate paths based on the file information, including: The first terminal processes the file information of the target file using a preset first processing method and / or a preset second processing method to obtain a corresponding processing result, wherein the accuracy of the first processing method is higher than that of the second processing method; The first terminal determines the matching degree of each candidate path among the multiple candidate paths based on the processing result and the path information contained in each candidate path.

5. The method according to claim 4, characterized in that, The first terminal determines the matching degree of each candidate path among the multiple candidate paths based on the processing result and the path information contained in each candidate path, including: If the path information of the second candidate path contains the processing result of the first processing method, then the first terminal determines the matching degree of the second candidate path as the first matching degree, wherein the processing result of the first processing method is a string containing the file information, and the second candidate path is any one of the multiple candidate paths; If the path information of the second candidate path does not contain the processing result of the first processing method, the first terminal determines the matching degree of the second candidate path based on the processing result of the second processing method and the path information contained in the second candidate path. The processing result of the second processing method contains multiple features of the target file, and each feature corresponds one-to-one with each substring in the string.

6. The method according to claim 5, characterized in that, The first terminal determines the matching degree of the second candidate path based on the processing result of the second processing method and the path information contained in the second candidate path, including: If the number of features of the target file contained in the path information of the second candidate path is greater than or equal to the first threshold, then the first terminal determines the matching degree of the second candidate path as the second matching degree, and the second matching degree is less than the first matching degree. If the number of features of the target file contained in the path information of the second candidate path is greater than or equal to the second threshold and less than the first threshold, then the first terminal determines the matching degree of the second candidate path as the third matching degree, which is less than the second matching degree. If the number of features of the target file contained in the path information of the second candidate path is less than the second threshold, then the first terminal determines the matching degree of the second candidate path as the fourth matching degree, which is less than the third matching degree.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: If the candidate path corresponding to the maximum matching degree includes multiple paths, the first terminal determines the priority of each candidate path with the maximum matching degree, wherein the priority of the candidate path is obtained according to the priority of the method of determining the candidate path; The first terminal determines the file storage location of the target file as the file storage location pointed to by the candidate path with the highest priority among the multiple candidate paths corresponding to the maximum matching degree.

8. The method according to claim 7, characterized in that, The priority relationship among the various methods for determining candidate paths is as follows: File search has a higher priority than calling the object connection and embedding interface, which in turn has a higher priority than parsing the command line, which in turn has a higher priority than reading information about recently used files.

9. The method according to claim 7, characterized in that, The method further includes: The first terminal retrieves the target file from the storage location; The first terminal sends the target file to the second terminal.

10. An apparatus for determining the storage location of a file, characterized in that, Applied to a first terminal, the device includes: The candidate path determination module is used to receive a file transfer instruction sent by the second terminal and determine multiple candidate paths corresponding to the target file. The first terminal and the second terminal establish a communication connection through NFC technology. The file transfer instruction instructs the first terminal to send the target file to the second terminal. The multiple candidate paths are determined by one or more methods. Each candidate path points to a file storage location. The matching degree of each candidate path is used to reflect the probability that the file storage location corresponding to the candidate path is the storage location of the target file. The target file is a file displayed on the display interface of the first terminal. The file information acquisition module is used to acquire window information of the target file, wherein the window information is information displayed at a preset position in the target file; and to determine the file information of the target file based on the window information. The storage location determination module is used to determine the storage location of the target file as the file storage location pointed to by the first candidate path among the multiple candidate paths, based on the file information and the multiple candidate paths, wherein the matching degree of the first candidate path is the maximum matching degree among the matching degrees of the multiple candidate paths.

11. A terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for determining the file storage location as described in any one of claims 1-9.

12. A chip, characterized in that, The chip includes a memory and a processor, the processor executing a computer program stored in the memory to implement the method for determining the file storage location as described in any one of claims 1-9.

Citation Information

Patent Citations

  • File lookup method, device and computer program product

    CN111045988A

  • Transmitting and receiving a file in a network environment

    US20120233189A1