File naming method and electronic device
By generating representative file names in electronic devices based on file content and naming rules, the problem of unnamed files affecting viewing and archiving is solved, achieving intelligent naming and improving the user experience.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-11-03
- Publication Date
- 2026-07-30
AI Technical Summary
The large number of unnamed, garbled, or meaningless files in electronic devices affects users' ability to view and archive them. Existing technologies require users to manually enter or modify file names, which is cumbersome and non-standard.
This paper provides a file naming method that generates more representative file names based on file content and naming rules by detecting user operations, including word count, combination, style and text requirements, and uses local or cloud models for intelligent naming.
It improves the efficiency of users viewing and archiving files, generates file names that match content, reduces the tedium of manual operations, and enhances the user experience.
Smart Images

Figure CN2025132050_30072026_PF_FP_ABST
Abstract
Description
File naming methods and electronic devices
[0001] This application claims priority to Chinese patent application filed on January 26, 2025, with application number 202510126258.4 and entitled "Document Naming Method and Electronic Device", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of terminal technology, and in particular to file naming methods and electronic devices. Background Technology
[0003] With the development of terminal technology, the number of files stored on electronic devices (such as mobile phones, tablets, and laptops) is increasing. Among them, a large number of unnamed, garbled, or meaningless files affect users' ability to view and archive them.
[0004] For example, when a document is created on an electronic device, it relies on the user to rename it. Otherwise, the electronic device will generally default to naming the document "New Document" or "New Document Copy" according to the naming rules, resulting in a large number of similar files with similar names, affecting the user's viewing experience. Another example is that the default naming rule of memo apps is to use the first line of text in the memo content as the title name. Confusing title names makes it difficult for subsequent users to identify the specific memo content corresponding to different title names. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides a file naming method and an electronic device. The technical solution provided by this application can generate more representative file names based on the content and naming rules of the file.
[0006] To achieve the above-mentioned technical objectives, this application provides the following technical solution:
[0007] In a first aspect, a file naming method is provided, applied to an electronic device. The method includes: detecting a first user operation, the first operation triggering the generation of a name for a first file; and obtaining a first name for the first file based on the first operation; wherein the first name is determined based on the file content and naming rules of the first file, the naming rules including character count requirements and / or combination requirements, the combination requirements indicating at least the components included in the first name.
[0008] In this way, electronic devices can achieve more flexible and intelligent naming based on file content and naming rules, improving the efficiency of users viewing and archiving files.
[0009] According to the first aspect, the naming rules also include style requirements and / or text requirements; wherein, the style requirements indicate that the style of the first name matches the style of the file content of the first document or that the style of the first name is a preset style, and the text requirements indicate that the first name includes target text.
[0010] For example, naming rules include style requirements and text requirements. The style requirements indicate that the style of the first name should match the style of the content of the first file, while the text requirements indicate that the first name should include "Meeting Minutes". Thus, based on this naming rule, the first name of the obtained first file could be, for example, "XX Meeting Minutes".
[0011] In this way, by using naming rules, the output names are made more consistent with the file content, making it easier for users to find or archive files later.
[0012] According to the first aspect, or any implementation of the first aspect above, the first name is determined based on the target content, which includes one or more of the following: content extracted from the file content of the first file, content generated based on the file content of the first file, content converted based on the file content of the first file, and the second name of the second file; wherein the second file is located in the same folder as the first file.
[0013] In this way, electronic devices can obtain target content in multiple ways in order to subsequently obtain the first name corresponding to the target content.
[0014] According to the first aspect, or any implementation of the first aspect above, when the content of the first document includes text, the target content includes part or all of the content of the first document.
[0015] According to the first aspect, or any implementation of the first aspect above, the file content of the first document includes a first preset number of texts and / or chapter titles in the file content of the first document.
[0016] Thus, for a first file containing text, the corresponding target content can be output to generate the first name of the first file.
[0017] According to the first aspect, or any implementation of the first aspect above, when the first file is an image file, the target content includes the text included in the recognized image file, and / or the descriptive content of the generated image file.
[0018] Optionally, the generated image file description is used to describe the image content of the image file. For example, the description can be content obtained by semantic parsing the image content of the image file.
[0019] Thus, even if the first file is an image file, the corresponding target content can still be output to generate the first name of the first file.
[0020] According to the first aspect, or any implementation of the first aspect above, when the first file is an audio file, the target content includes part or all of the text content converted from the audio file.
[0021] According to the first aspect, or any implementation of the first aspect above, a portion of the text content obtained from the conversion of the audio file includes a second preset number of characters in the text content.
[0022] Thus, even if the first file is an audio file, the corresponding target content can be output to generate the first name of the first file.
[0023] According to the first aspect, or any implementation of the first aspect above, according to the first operation, obtaining the first name of the first file includes: sending the target content to the server; receiving the first name sent by the server, wherein the first name is determined by the server based on the target content and the naming rules, and the naming rules are the naming rules obtained by the server or the naming rules learned by the server.
[0024] In this way, the server enables more flexible and intelligent output of the first name, while reducing the power consumption of electronic devices in processing data.
[0025] According to the first aspect, or any implementation of the first aspect above, according to the first operation, the first name of the first file is obtained, including: obtaining the first keyword corresponding to the target content; obtaining the second keyword matching the first keyword from the database, where the database includes multiple preset keywords; and generating the first name based on the second keyword and the naming rules.
[0026] In this way, the electronic device can obtain the first name of the first file through local matching and processing.
[0027] According to the first aspect, or any implementation of the first aspect above, the naming rules also include matching the first name with the second name of the second file, and the second file being located in the same folder as the first file.
[0028] For example, the second file in the same folder may be a file that the user has already named according to naming conventions. Therefore, by referring to the name of the second file and naming the first file, a first name that meets the user's needs can be obtained.
[0029] In this way, file names can be generated according to the user's naming habits, making it easier for users to archive files later and improving the user experience.
[0030] According to the first aspect, or any implementation of the first aspect above, the combination requirement also indicates the compositional form of the components included in the first name.
[0031] Optionally, this composition format may include, for example, the order in which the components are arranged. For instance, the composition requirement may indicate that the document name should include, in sequence, the meeting time, the meeting location, and the attendees.
[0032] According to the first aspect, or any implementation of the first aspect above, the first operation is one or more of the following: creating a new copy, saving, updating the file content of the first file, downloading, receiving, and renaming.
[0033] According to the first aspect, or any implementation of the first aspect above, the first operation is applied to the first application, which is one or more of the following: memo application, recorder application, browser application, chat application, file management application.
[0034] Secondly, an electronic device is provided. The electronic device includes: a processor and a memory, the memory being coupled to the processor. The memory stores computer program code, which includes computer instructions. When the processor reads the computer instructions from the memory, the electronic device performs the following actions: detecting a first operation by a user, the first operation triggering the generation of a name for a first file; and, based on the first operation, obtaining a first name for the first file; wherein the first name is determined according to the file content and naming rules of the first file, the naming rules including character count requirements and / or combination requirements, the combination requirements indicating at least the components included in the first name.
[0035] According to the second aspect, the naming rules also include style requirements and / or text requirements; wherein, the style requirements indicate that the style of the first name matches the style of the file content of the first file or that the style of the first name is a preset style, and the text requirements indicate that the first name includes target text.
[0036] According to the second aspect, or any implementation of the second aspect above, the combination requirement also indicates the compositional form of the components included in the first name.
[0037] According to the second aspect, or any implementation of the second aspect above, the first name is determined based on the target content, which includes one or more of the following: content extracted from the file content of the first file, content generated based on the file content of the first file, content converted based on the file content of the first file, and the second name of the second file; wherein the second file and the first file are located in the same folder.
[0038] According to the second aspect, or any implementation of the second aspect above, when the content of the first file includes text, the target content includes part or all of the content of the first file.
[0039] According to the second aspect, or any implementation of the second aspect above, the file content of the first file includes a first preset number of texts and / or chapter titles in the file content of the first file.
[0040] According to the second aspect, or any implementation of the second aspect above, when the first file is an image file, the target content includes the text included in the recognized image file, and / or the description content of the generated image file.
[0041] According to the second aspect, or any implementation of the second aspect above, when the first file is an audio file, the target content includes part or all of the text content converted from the audio file.
[0042] According to the second aspect, or any implementation of the second aspect above, a portion of the text content obtained from the conversion of the audio file includes a second preset number of characters in the text content.
[0043] According to the second aspect, or any implementation of the second aspect above, according to the first operation, obtaining the first name of the first file includes: sending the target content to the server; receiving the first name sent by the server, wherein the first name is determined by the server based on the target content and the naming rules, and the naming rules are the naming rules obtained by the server or the naming rules learned by the server.
[0044] According to the second aspect, or any implementation of the second aspect above, according to the first operation, the first name of the first file is obtained, including: obtaining the first keyword corresponding to the target content; obtaining the second keyword matching the first keyword from the database, where the database includes multiple preset keywords; and generating the first name based on the second keyword and naming rules.
[0045] According to the second aspect, or any implementation of the second aspect above, the naming rules also include matching the first name with the second name of the second file, and the second file being located in the same folder as the first file.
[0046] According to the second aspect, or any implementation of the second aspect above, the first operation is one or more of the following: creating a new copy, saving, updating the file content of the first file, downloading, receiving, and renaming.
[0047] According to the second aspect, or any implementation of the second aspect above, the first operation is applied to the first application, which is one or more of the following: memo application, recorder application, browser application, chat application, file management application.
[0048] Thirdly, an electronic device is provided that has the function of implementing the touch method as described in the first aspect and any of its possible implementations. This function can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the described function.
[0049] Fourthly, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as instructions or code) that, when executed by an electronic device, causes the electronic device to perform the method of the first aspect or any embodiment of the first aspect.
[0050] Fifthly, a computer program product is provided that, when run on an electronic device, causes the electronic device to perform the method of the first aspect or any one of the embodiments of the first aspect.
[0051] In a sixth aspect, a circuit system is provided, the circuit system including processing circuitry configured to perform the method of the first aspect or any embodiment of the first aspect.
[0052] In a seventh aspect, a chip system is provided, including at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor, and when the at least one processor executes the instructions, the at least one processor performs the method of the first aspect or any embodiment of the first aspect.
[0053] The technical effects of the aforementioned aspects can be referenced from each other, and will not be elaborated further here. Attached Figure Description
[0054] Figure 1 is a schematic diagram of a file naming scenario provided in an embodiment of this application;
[0055] Figure 2 is a schematic diagram of a file naming scenario provided in an embodiment of this application;
[0056] Figure 3 is a schematic diagram of a file naming scenario provided in an embodiment of this application;
[0057] Figure 4 is a schematic diagram of a communication system in which the file naming method provided in the embodiments of this application is applied;
[0058] Figure 5 is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of this application;
[0059] Figure 6 is a schematic diagram of an intelligent naming process provided in an embodiment of this application;
[0060] Figure 7 is a schematic diagram of another intelligent naming process provided in an embodiment of this application;
[0061] Figure 8 is a schematic diagram of a file intelligent naming scenario provided in an embodiment of this application;
[0062] Figure 9 is a schematic diagram of a file intelligent naming scenario provided in an embodiment of this application;
[0063] Figure 10 is a schematic diagram of the intelligent file naming scenario provided in the embodiment of this application;
[0064] Figure 11 is a schematic diagram of the intelligent file naming scenario provided in the embodiment of this application;
[0065] Figure 12 is a schematic diagram of the intelligent file naming scenario provided in the embodiment of this application;
[0066] Figure 13 is a schematic diagram of a file intelligent naming scenario provided in an embodiment of this application;
[0067] Figure 14 is a schematic diagram of the intelligent file naming scenario provided in the embodiment of this application;
[0068] Figure 15 is a schematic diagram of the intelligent file naming scenario provided in the embodiment of this application;
[0069] Figure 16 is a schematic diagram of a file intelligent naming scenario provided in an embodiment of this application;
[0070] Figure 17 is a schematic diagram of a file intelligent naming scenario provided in an embodiment of this application;
[0071] Figure 18 is a schematic diagram of the intelligent file naming scenario provided in the embodiment of this application;
[0072] Figure 19 is a schematic diagram of the intelligent file naming scenario provided in the embodiments of this application;
[0073] Figure 20 is a schematic flowchart of the file naming method provided in an embodiment of this application;
[0074] Figure 21 is a schematic diagram of the structure of the electronic device provided in the embodiment of this application. Detailed Implementation
[0075] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one or more (including two).
[0076] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0077] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0078] In some embodiments, certain applications in an electronic device have an automatic naming function that can automatically generate file names. However, these names may be garbled characters or unrelated to the file content, affecting the user's ability to view or archive files.
[0079] For example, as shown in Figure 1(a), an electronic device (such as a mobile phone) has a recorder application installed. The recorder application can record the content of a call according to the user's operation and automatically generate a name for the recording file. Generally, the name of the recording file includes the phone number corresponding to the call, the call time, etc. However, when there are many recording files and the storage time is long, the user cannot intuitively confirm the content of the recording file by the file name. They need to open the recording file and play the recording to confirm the content of the recording file, making it difficult to find and archive the recording files.
[0080] For example, as shown in Figure 1(b), an electronic device (such as a mobile phone) has a memo application installed. During the process of a user adding memo content, the memo application can automatically use the first line of text of the memo content as the title name corresponding to that memo content based on the user's saving operation. However, this title name may not represent the memo content, affecting the user's subsequent judgment of the specific memo content corresponding to different title names.
[0081] As exemplarily, as shown in Figure 2(a) or (b), after an electronic device (such as a computer) creates a new file, the file name is usually "New File", "New File Copy", or a copy of the original file name, resulting in a large number of similarly named files of the same type, which affects the user's viewing experience.
[0082] In response to the above situations, users typically need to manually enter or modify file names, which is cumbersome. Furthermore, if the file names created by the user are not standardized, it will also affect the viewing and archiving of the files.
[0083] For example, as shown in Figure 3(a), when an electronic device (such as a computer) is displaying a file directory, it detects that the user has selected a file and instructs the user to rename the file. The electronic device can then receive the newly entered filename from the user.
[0084] As another example, as shown in Figure 3(b), after the file editing is completed, the electronic device (such as a computer) can display a file save as interface based on the user's operation. In this interface, the electronic device can receive the new filename entered by the user.
[0085] Therefore, this application provides a file naming method that can generate more representative file names based on the content and naming rules of the file, thereby improving the efficiency of users viewing and archiving files.
[0086] Figure 4 is a schematic diagram of a communication system in which the file naming method provided in this application is applied. As shown in Figure 4, the communication system includes an electronic device 100 and a server 200.
[0087] Optionally, the electronic device 100 may be a mobile phone, tablet computer, personal computer (PC), smart screen, wearable device (such as smartwatch, smart bracelet, etc.), in-vehicle system, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), artificial intelligence (AI) device, or other terminal device. The operating system installed on the electronic device 100 may include, but is not limited to, those that are not limited to, those that are not installed on the device. Alternatively, other operating systems may be used. This application does not limit the specific type of electronic device 100 or the operating system installed on it.
[0088] Optionally, server 200 can be a device or server with computing capabilities, such as a cloud server or a network server. Server 200 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.
[0089] In some embodiments, the communication system described above may not include the server 200. For example, the file naming method provided in this application embodiment can also be directly applied to the electronic device 100, which automatically generates file names through local calculations.
[0090] For example, Figure 5 shows a schematic diagram of the structure of an electronic device 100.
[0091] Electronic device 100 may include a processor 510, an external memory interface 520, an internal memory 521, a universal serial bus (USB) interface 530, a charging management module 540, a power management module 541, a battery 542, an antenna 1, an antenna 2, a mobile communication module 550, a wireless communication module 560, an audio module 570, a sensor module 580, a button 590, a motor 591, an indicator 592, a camera 593, a display screen 594, and a subscriber identification module (SIM) card interface 595, etc.
[0092] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0093] Processor 510 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0094] In some embodiments, the processor 510 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.
[0095] The MIPI interface can be used to connect the processor 510 to peripheral devices such as the display screen 594 and the camera 593. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 510 and the camera 593 communicate via the CSI interface to enable the electronic device 100 to perform its shooting function. The processor 510 and the display screen 594 communicate via the DSI interface to enable the electronic device 100 to perform its display function.
[0096] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 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 tuning switches.
[0097] Electronic device 100 implements display functions through a GPU, a display screen 594, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 594 and the application processor. The GPU performs mathematical and geometric calculations and is used for graphics rendering. Processor 510 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0098] Display screen 594 is used to display images, videos, etc. Display screen 594 includes a display panel. The display panel can be manufactured using a liquid crystal display (LCD), such as an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini-LED, a micro-LED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 594, where N is a positive integer greater than 1.
[0099] The sensor module 580 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0100] A touch sensor, also known as a "touch device," can be located on the display screen 594. The touch sensor and display screen 594 together form a touchscreen, also known as a "touchscreen." The touch sensor 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 the display screen 594. In some embodiments, the touch sensor may also be located on the surface of the electronic device 100, in a different position than the display screen 594.
[0101] The file naming method provided in the embodiments of this application will be described in detail below.
[0102] In some embodiments, the electronic device 100 has various applications installed, some or all of which support the smart naming function. Optionally, the applications supporting the smart naming function can be system applications or third-party applications. For example, applications supporting the smart naming function can be voice recorder applications, memo applications, browser applications, chat applications, file management applications, etc.
[0103] Optionally, the intelligent naming function can automatically generate file names based on the file's content and corresponding naming rules. The process of generating file names is described in detail below.
[0104] Optionally, the electronic device 100 can intelligently name different types of files. Optionally, file types include, for example, audio files, documents, images, and folders. Documents, for example, can be Word documents, PPT documents, Excel documents, etc.
[0105] Optionally, electronic devices can implement intelligent file naming in various scenarios. For example, intelligent file naming scenarios include: creating a new file, saving a file, updating file content, downloading a file, receiving a file, and renaming a file.
[0106] The following section provides a detailed explanation of the implementation process of the intelligent naming function.
[0107] In some embodiments, in response to triggering intelligent file naming, the electronic device 100 can obtain the file to be named. Then, the electronic device 100 can obtain target content based on the file content of the file to be named, which may also be referred to as semantic content. Optionally, the target content may include one or more of the following: content extracted from the file content of the file to be named, content generated based on the file content of the file to be named, content converted from the file content of the file to be named, and the file names of other files located in the same folder as the file to be named. Then, the electronic device 100 can combine preset naming rules and the target content to generate the name of the file to be named, completing the intelligent file naming process.
[0108] Optionally, the scenario that triggers intelligent file naming can be any one or more of the intelligent file naming scenarios mentioned above. For example, electronic device 100 detects a user's instruction to save a file and triggers intelligent naming of that file.
[0109] Optionally, the target content can be text content.
[0110] For example, the file is a plain text document. Electronic device 100 can use all the content of the file as semantic content. Alternatively, electronic device 100 can use a preset number (e.g., 2000, 1000, 100, etc.) of text content in the file as semantic content. For example, electronic device 100 can use a preset number of text contents at the beginning, end, middle, or other preset positions in the file as semantic content. Or, electronic device 100 can use chapter titles included in the file as semantic content.
[0111] For example, the file may be an image file. The electronic device 100 can use image processing technology to obtain the corresponding text content and use that text content as semantic content. Optionally, image processing technology may include, for example, optical character recognition (OCR) technology, image recognition technology, and image classification technology. For instance, if the image file is a screenshot of plain text, the electronic device 100 can use OCR technology to recognize the text content included in the image and use that text content as the output semantic content. Alternatively, the electronic device 100 can use image recognition technology to obtain the text description corresponding to the image file, such as the image file containing a mobile phone and a person, and use that text description as the output semantic content.
[0112] For example, if the file is an audio file, the electronic device 100 can use speech recognition technology to convert the audio in the audio file into text content, and use this text content as the output semantic content.
[0113] For example, in addition to text, a file may also include images and / or audio. In this case, the electronic device 100 can extract semantic content based on the text content. Alternatively, the electronic device 100 can combine the semantic content corresponding to the images and / or audio with the semantic content corresponding to the text content to generate the final semantic content for the file. For instance, if the file content is a mixture of text and images, the electronic device 100 can ignore the image content and generate semantic content based solely on the text content.
[0114] Optionally, the semantic content also carries a corresponding document format, which represents the format of the semantic content. For example, the semantic content includes chapter titles in the file, and the document format describes the structure of each chapter title, such as first-level headings, second-level headings, etc.
[0115] Optionally, naming rules may include one or more of the following: word count requirements, combination requirements, style requirements, and text requirements.
[0116] For example, a word count requirement indicates a requirement for the number of words in the generated filename. For instance, the filename must be less than or equal to a certain number of words. For example, a word count requirement indicates that the generated filename must be less than 5 words.
[0117] For example, the combination requirement indicates the minimum components that the generated file name must include. Different file content corresponds to different scenarios, and the applicable combination requirements vary depending on the scenario. For instance, in a meeting scenario, the combination requirement might indicate that the generated file name must include the meeting time, meeting location, and attendees. For example, a file name generated according to this combination requirement might be titled: "Minutes of the Patent Department Member Meeting in the Large Conference Room (20250101)," indicating that the file name includes the meeting time as 20250101, the meeting location as the large conference room, and the attendees as patent department members. As another example, in an office scenario, the combination requirement might indicate that the generated file name must include the date and work content. For example, a file name generated according to this combination requirement might be titled: "Drafting a Patent Application (20250101)," indicating that the file name includes the date as 20250101 and the work content as drafting a patent application. Furthermore, scenarios could also include learning scenarios, etc. This application embodiment will not provide examples of the combination requirements for different scenarios. Optionally, the combination requirement can also indicate the composition of the generated file name, such as the order in which the different components of the file name are arranged. For example, in the example scenario above, the combination requirement indicates that the file name should include the meeting time, meeting location, and attendees in sequence.
[0118] For example, the style requirement indicates the style of the generated file name, such as humorous, serious, etc. This style requirement can be a preset style requirement, or it can be a requirement that the style of the output file name matches the style of the file content.
[0119] For example, the text requirement indicates the target text that the generated file name should include. For instance, if the text requirement indicates that the generated file name should include the words "Meeting Minutes", then according to the text requirement, the subsequent generated file name would be, for example, "XX Meeting Minutes".
[0120] In some embodiments, the electronic device 100 can achieve intelligent file naming through a local model or a cloud model. Optionally, the local model or cloud model includes, for example, natural language processing (NLP), generative models, etc. For instance, the local model or cloud model can be a generative pre-trained transformer (GPT) series model, a bidirectional encoder representations from transformers (BERT) model, or other custom models. Optionally, the local model and the cloud model can be different, or they can be the same. For example, if the electronic device 100 has poor performance, it can use a cloud model to achieve intelligent file naming. Alternatively, if the electronic device 100 has good performance, it can achieve intelligent file naming based on local files on the electronic device 100.
[0121] In some examples, the cloud model can be described as a large model, and the local model can be described as a small model. Optionally, the cloud model has greater capabilities than the local model.
[0122] For example, Figure 6 is a schematic diagram of an intelligent naming process provided in an embodiment of this application. As shown in Figure 6, the electronic device 100 includes a file parsing module. In response to triggering intelligent naming of a file, the electronic device 100 obtains the file to be named and sends the file to the file parsing module. After receiving the file to be named, the file parsing module can process the file content of the file to be named to output corresponding semantic content. Optionally, the semantic content is semantic content carrying a document format. Then, the electronic device 100 can send the semantic content to the server 200. Optionally, the server 200 has a preset naming rule A and an intelligent naming module A. After receiving the semantic content, the server 200 can send the semantic content to the intelligent naming module A in the server 200. After receiving the semantic content, the intelligent naming module A can generate an intelligent name corresponding to the semantic content according to the naming rule. Optionally, the intelligent naming module A includes, for example, the cloud model described above. Then, the server 200 can feed back the intelligent name to the electronic device 100. Correspondingly, the electronic device 100 receives the intelligent naming feedback from the server 200 and uses the intelligent naming as the file name of the file to be named.
[0123] Optionally, naming rule A may include a character count rule, for example. For instance, naming rule A requires that the output intelligent name cannot exceed 5 characters. Optionally, naming rule A may also include naming suggestions or naming examples. For example, after receiving naming rule A, intelligent naming module A can refer to the included naming suggestions and output an intelligent name. Or, after receiving naming rule A, intelligent naming module A can learn from the included naming examples and output an intelligent name. Optionally, naming rule A may also include style requirements, abstract extraction, etc. For example, intelligent naming module A obtains a abstract corresponding to the semantic content based on naming rule A and uses this abstract as the intelligent name. Or, intelligent naming module A obtains an intelligent name that meets the style requirements based on naming rule A. Optionally, style requirements can be styles that match the semantic content or mandatory style requirements. For example, the style requirement in naming rule A may be a mandatory requirement that the style of the output file name matches the conference theme style.
[0124] Optionally, naming rule A may include soft constraints. The intelligent naming module A can output corresponding intelligent names based on its own learning.
[0125] It should be understood that the intelligent naming module A can also be a module in the electronic device 100.
[0126] In this way, cloud-based models enable more flexible and intelligent output of smart naming.
[0127] As an example, Figure 7 is a schematic diagram of another intelligent naming process provided in an embodiment of this application. As shown in Figure 7, the electronic device 100 includes a file parsing module. In response to triggering intelligent naming of a file, the electronic device 100 obtains the file to be named and sends the file to the file parsing module. After receiving the file to be named, the file parsing module can process the file content of the file to be named to output semantic content. Optionally, the semantic content is semantic content carrying a document format. Then, the electronic device 100 can send the semantic content to the semantic content processing module for processing, and send the processed keywords to the matching module. Then, the matching module can match the keywords sent by the semantic content processing module with keywords in a preset database to obtain a matching result, which includes at least one keyword. Finally, the intelligent naming module B can obtain the matching result output by the matching module, and process the matching result according to the naming rule B to output the intelligent name. Optionally, the intelligent naming module B is, for example, a local model in the electronic device 100.
[0128] Optionally, the semantic content processing process may include one or more of the following: topic modeling, keyword extraction, semantic clustering, etc.
[0129] The topic modeling process is used to obtain topics for semantic content, such as conference topics or annual celebration topics. Optionally, topic modeling is an unsupervised learning method aimed at extracting latent topics or topic structures from semantic content. By analyzing the co-occurrence patterns of semantic content, latent "topics" are obtained. These topics are sets of different words that can reflect the core content of the semantic content. Optionally, the algorithms used in the topic modeling process include generative algorithms, such as latent dirichlet allocation (LDA) and non-negative matrix factorization (NMF).
[0130] The keyword extraction process is used to obtain keywords included in semantic content. For example, the keyword extraction process is used to identify the words or phrases that best represent the semantic content, i.e., keywords. Optionally, the output of the keyword extraction process may include, for example, at least one set of keywords that appear frequently in the semantic content.
[0131] Semantic clustering is the process of classifying or grouping texts based on their semantic similarity. It considers not only the surface similarity of words but also the deeper semantic meaning of the text content. Through semantic clustering, texts can be grouped into the same category based on their actual meaning, even if their surface vocabulary differs. For example, "car" and "sedan" are different words, but they have high semantic similarity and can be grouped together through semantic clustering. Optionally, the semantic clustering process can also be used to semantically cluster keywords output from the topic modeling process and / or the keyword extraction process to output more representative keywords. For example, if the topic modeling process outputs 3 keywords and the keyword extraction process outputs 5 keywords, the semantic content processing module can semantically cluster these 8 keywords, outputting a final 6 keywords.
[0132] Optionally, the database used in the keyword matching process described above can also be implemented as a semantic vector library. Then, the keywords output by the semantic processing module can be vectorized to output corresponding vectors. Optionally, the text content vectorization process converts natural language text into a numerical form that can be understood and processed by a computer. Afterwards, the matching module matches the output vector with preset vectors in the semantic vector library to obtain matching results. Vectorizing keywords and using vector matching can improve the efficiency and accuracy of fuzzy keyword matching. For example, the keywords obtained by the matching module include a car brand that appears frequently in the document content, while the database includes the preset keyword "car". If direct keyword matching is used, these two keywords may not match successfully. However, through the fuzzy matching process of vectorized keywords, the matching result output by the matching module may include the successfully matched keyword "car".
[0133] It should be understood that the module division process shown in Figure 7 is merely an illustrative example. For instance, the intelligent naming module B may also include a matching module. In this case, the intelligent naming module B can obtain the multiple vectors output by the semantic content processing module. Subsequently, the intelligent naming module B can match these multiple vectors with the preset vectors in the semantic vector library and output appropriate intelligent names according to naming rule B.
[0134] Optionally, the semantic vector library may include text vectors that could serve as filenames. For example, these could be vectors for "meeting minutes," "seminar," "algorithm research," or "shopping list." For instance, if the semantic vector library contains vectors for "meeting minutes," then during vector matching, based on the matching of vectors corresponding to the semantic content, the output intelligent name might be "XX Meeting Minutes." Similarly, if the semantic vector library contains vectors for "shopping list," then during vector matching, based on the various food names included in the semantic content, the output intelligent name might include "shopping list."
[0135] Optionally, naming rule B may include, for example, a character count rule. For instance, naming rule B requires that the output intelligent name cannot exceed 5 characters. Optionally, naming rule B may also include style requirements, summary extraction, etc. For example, the intelligent naming module B obtains a summary corresponding to the semantic content based on naming rule B and uses this summary as the intelligent name. Or, the intelligent naming module B obtains intelligent names that meet style requirements based on naming rule B. Optionally, style requirements can be styles that match the semantic content or mandatory style requirements. For example, the style requirement in naming rule B may be a mandatory requirement that the intelligent name's style be the conference theme style. Optionally, naming rule B may also include combination requirements. Optionally, the combination requirements may differ for different scenarios. For example, in a conference scenario, the corresponding combination requirements may include that the output intelligent name includes the conference time, conference location, attendees, etc.
[0136] Optionally, naming rule B can include strongly constrained rules. The intelligent naming module B needs to output the corresponding intelligent names according to the rules included in naming rule B.
[0137] It should be understood that the intelligent naming module B can also be a module in server 200.
[0138] In this way, the local model can meet the user's intelligent naming needs, and it does not rely on the cloud model. It can also achieve automatic naming function even without network conditions.
[0139] In other embodiments, naming rule A and naming rule B may be the same.
[0140] In some embodiments, based on the above description of the intelligent naming process, the electronic device 100 can obtain the intelligent name of the file to be named. Optionally, the intelligent name may include a combination of characters from the semantic content corresponding to the file, or it may include characters other than those from the semantic content corresponding to the file.
[0141] For example, the semantic content of the file includes potato chips, lollipops, preserved plums, cookies, and jelly. The electronic device 100 ultimately generates a smart name for this file: a snack list.
[0142] In this way, electronic device 100 can achieve more flexible intelligent naming based on file content and naming rules.
[0143] The above text introduced the technical principles of intelligent file naming. The following text will provide a detailed introduction to various intelligent file naming scenarios.
[0144] In some embodiments, in response to creating a new file, the electronic device 100 may automatically generate a name for the new file. For example, in response to a user's operation of creating a new file, the electronic device 100 automatically generates a file name. As another example, in response to an operation of copying an original file, the electronic device 100 automatically generates a copy of the original file and automatically generates a name for the copy file.
[0145] For example, as shown in Figure 8(a), during the display of the Notes application, the mobile phone adds note content based on user actions. During this process, the mobile phone detects the user's click on the save control 81 and determines that the user has instructed the generation of a note file containing the note content. As shown in Figure 8(a), the user has not yet edited the title of the note file. Therefore, the mobile phone can obtain the current note content and, referring to the method described in the above embodiments, generate the note name corresponding to the note content through the mobile phone or server, i.e., through a local model or a cloud model. As shown in Figure 8(b), the mobile phone adds a new note file 82 and automatically generates a subject name for note file 82. In response to the user's operation on note file 82, the mobile phone displays the note content interface as shown in Figure 8(c). It can be seen that the mobile phone has automatically generated the subject name of the note file, and this subject name is not the first line of content in the note.
[0146] This simplifies the process of users editing memo subject names. Furthermore, the intelligent generation of memo subject names, compared to directly using the first line of the memo as the subject name, avoids generating meaningless subject names and improves the efficiency of users finding memo content later.
[0147] For example, as shown in Figure 9(a), the mobile phone displays the recorder application interface and records audio through the recorder application. During this process, the mobile phone detects the user's operation on the stop control 91 and determines that the user has instructed the generation of an audio file. The mobile phone can then obtain the corresponding audio file and, through speech recognition technology, convert the audio in the audio file into text content to obtain the semantic content corresponding to the text content. Then, referring to the method described in the above embodiments, the mobile phone or server generates the audio file name corresponding to the semantic content. Afterwards, the mobile phone can display the interface shown in Figure 9(b), as indicated by reference numeral 92, where the mobile phone displays the automatically generated audio file name.
[0148] In this way, an audio file name that is more suitable for the content of the audio file can be automatically generated. Compared with directly using the time corresponding to the audio file as the audio file name, the audio file name generated by the file naming method provided in this application embodiment can help users intuitively understand the main content of the audio file, making it easier for users to view or archive the audio file later.
[0149] As another example, as shown in Figure 10, the PC creates a new PPT document based on user actions. The name of the newly created blank PPT document may default to "New Document". Then, the PC edits the content of the PPT document based on user actions. During this process, in response to the user's save file action, or in response to a scheduled automatic save file action, the PC can generate a PPT document name based on the edited PPT document content, referring to the method described in the above embodiments, via the PC or server.
[0150] In this way, after a new file is created, a document name matching the file content is automatically generated. This avoids the existence of a large number of similarly named files of the same type, which would affect the user's viewing experience.
[0151] As another example, as shown in Figure 11(a), the PC detects the user's instruction to copy PPT document 111 and determines to generate a copy of PPT document 111. The PC can then obtain the document content of PPT document 111 and trigger the intelligent naming process. Optionally, the names of multiple files stored in the same folder may be related. For example, as shown in Figure 11(a), the user expects to edit the corresponding document name according to the algorithm's research timeline. The PC can then obtain the file names of other files in the folder where PPT document 111 is currently located. Afterwards, the PC can generate the name of the copy of PPT document 111 based on the document content of PPT document 111 and the file names of other files. Optionally, the PC may also use the file names of other files as semantic content corresponding to the file to be named (such as the copy of PPT document 111). Alternatively, the PC may define the style requirement in the naming rules as being the same as or similar to the style of the file names in the folder. As shown in Figure 11(b), in response to the user's copy operation, the PC creates a new PPT document 112. The name of the PPT document 112 conforms to the document content requirements and is the same as the naming style of other files in the current folder.
[0152] Optionally, in the intelligent naming process shown in Figure 6, the intelligent naming module A can obtain a preset naming rule A, or it can obtain the naming rule uploaded by the electronic device 100. For example, in the scenario shown in Figure 11, the naming rule sent by the PC to the server includes that the intelligent naming style is the same as or similar to the style of other file names in the folder.
[0153] In this way, file names can be generated according to the user's naming habits, making it easier for users to archive files later and improving the user experience.
[0154] In some embodiments, when the electronic device 100 detects a change in the file content, it can rename the file based on the changed content. For example, in response to a user's editing of the original file content, the electronic device 100 generates new file content. Subsequently, in response to a user's saving of the file, or in response to a scheduled automatic saving of the file, the electronic device 100 can generate a new file name based on the edited new file content.
[0155] For example, as shown in Figure 12(a), the mobile phone displays a recorder interface and edits the recording file according to the user's operation. For instance, the mobile phone detects the user's operation on the trimming control 121 and can obtain the audio file corresponding to the length of time that the user indicates to trim or retain by dragging the trimming bar 122. This audio file is a part of the original audio file. As shown by reference numeral 123, the original audio file name is "2024XX Seminar". Then, as shown in Figure 12(b), the mobile phone can trigger the intelligent naming process of the audio file, referring to the method described in the above embodiments, and generate an audio file name through the mobile phone or server. As shown by reference numeral 124, the audio file name is "2024XX Seminar Schedule", which is different from the original audio file name.
[0156] Optionally, in the scenario shown in Figure 12, the new audio file overwrites the original audio file, meaning the phone no longer retains the original audio file. In other embodiments, the phone may also retain the original audio file and create a new audio file. This new audio file is generated after the user has trimmed and edited the original audio file. In this way, intelligent naming helps users efficiently distinguish between the original audio file and the newly created audio file.
[0157] In this way, the file name of the audio file can be adaptively modified according to changes in the file content, avoiding the audio file name being the same as or similar to the original audio file name, which would affect the user experience.
[0158] For example, as shown in Figure 13(a), in response to a user operation, the PC creates a new Excel document on the desktop and opens it. As indicated by reference numeral 131, the name of this newly created blank Excel document is "New Worksheet". The PC can then receive editing operations from the user on the Excel document. For example, as shown in Figure 13(b), the PC receives the user's input in the Excel document window and displays the text entered by the user. Then, the PC receives a user instruction to save the Excel document, triggering the intelligent naming process. Referring to the method described in the above embodiments, the PC or server obtains the semantic content corresponding to the content of the Excel document, such as: supermarket, potato chips, lollipops, preserved plums, biscuits, jelly, etc. Based on this semantic content, an Excel document name can be generated, as shown by reference numeral 132, and the name of the Excel document changes to the newly generated name, such as "Supermarket Snack List".
[0159] As shown in Figure 13(b), during the editing of an Excel document, the PC can save the Excel document based on user actions, while maintaining the Excel document window displayed. Alternatively, if the PC detects that the user has closed the Excel document window, it can prompt the user to save the document. In this case, in response to the user's instruction to save, the PC closes the Excel document window and updates the Excel document name according to its content.
[0160] In this way, in response to changes in file content, a new file name is adaptively generated based on the changed file content. This ensures that the file name matches the file content, making it easier for users to view or archive the file later.
[0161] Optionally, in response to a save operation that occurs after changes to the file content, the electronic device 100 may display a prompt message to ask the user whether to automatically update the file name based on the changes in the file content. The electronic device 100 updates the file name only after detecting the user's confirmation. This avoids situations where the user cannot find the file because they are unaware of the file name change.
[0162] Optionally, referring to the scenario shown in Figure 13, the scenario shown in Figure 11 can be implemented in both file copying and file creation scenarios. For example, in response to a user's operation to create a new PPT document, the PC creates a new blank PPT document and receives the user's editing operations on the PPT document. Then, in response to the user's instruction to save the PPT document, the PC can generate a PPT document name with a similar style to other PPT documents in the folder, based on the edited document content and the style requirements included in the naming rules.
[0163] In other words, the various file naming scenarios in the embodiments of this application are merely illustrative examples, and the various file naming scenarios can be combined with each other. The embodiments of this application will not elaborate on these scenarios one by one.
[0164] In some embodiments, after acquiring a file, the electronic device 100 can trigger a smart file naming process. For example, after receiving / downloading / saving a file, the electronic device 100 detects that the file is unnamed, or the file name is garbled or meaningless. Then, the electronic device 100 can generate a more suitable file name based on the file content.
[0165] For example, as shown in Figure 14(a), a mobile phone receives a Word document sent by another user through a chat application. The mobile phone automatically saves the Word document or saves it based on user actions. The filename of this Word document is a meaningless string of characters. As shown in Figure 14(b), the mobile phone can trigger a smart naming process for the Word document, generating a new Word document name via the mobile phone or server, referring to the method described in the above embodiments.
[0166] In this way, after receiving the file, intelligent naming is implemented to match the file name with the file content, making it easier for users to find the file later.
[0167] As an example, as shown in Figure 15(a), the PC displays a browser application window, and within this window, a webpage containing a picture of a mobile phone is displayed. Then, in response to a user's instruction to download the image, the PC can trigger the image download process and the intelligent naming process for the image. Afterwards, the PC can generate semantic content corresponding to the image through image analysis. Referring to the method described in the above embodiments, an image name corresponding to the semantic content is generated via a PC or server. As shown in Figure 15(b), the PC displays a save-as window, as indicated by reference numeral 151, in which the generated image name, such as "XX Mobile Phone," can be displayed. Optionally, the PC can also receive user modifications to the image name in this window.
[0168] In this way, by intelligently naming downloaded files, meaningless garbled names can be avoided, which would affect the efficiency of users finding the downloaded files later.
[0169] Optionally, referring to the intelligent naming scenario, in other embodiments, the electronic device 100 may also trigger the intelligent naming process when copying files from other devices to local storage based on user operations.
[0170] As another example, as shown in Figure 16(a), the PC displays a chat application window 161 and receives an image 162 sent by another user through the chat application. The PC automatically saves or, based on user operation, triggers the saving process of image 162 and the intelligent naming process of image 162. Afterwards, the PC can generate semantic content corresponding to image 162 through image analysis. Referring to the method described in the above embodiments, an image name corresponding to the semantic content is generated through the PC or server. As shown in Figure 16(b), the PC displays a save-as window, as indicated by reference numeral 163, in which the generated image name can be displayed.
[0171] In this way, intelligent naming of images can be achieved during the image saving process, ensuring that the file name matches the image content, making it easier for users to find images later.
[0172] In some embodiments, as described above, the electronic device 100 may automatically trigger a smart file naming process. In other embodiments, the electronic device 100 may also trigger a smart file naming process based on user actions. Optionally, user actions may include, for example, operations on smart naming function controls.
[0173] For example, as shown in Figure 17(a), during the display of a file, the PC detects a right-click operation by the user on a file and displays the menu bar 171 corresponding to that file. Then, the PC detects the user's operation on the smart naming control 172 displayed in the menu bar 171, determining that the user has instructed the triggering of the smart naming process for that file. Then, referring to the method described in the above embodiments, the file name corresponding to the file content is generated via the PC or server. As shown in Figure 17(b), the PC can display the newly generated file name.
[0174] In this way, the intelligent naming process of files is triggered based on user operations, and a file name is generated so that the file name matches the file content. This simplifies the process of users editing file names themselves and reduces the difficulty of user operation.
[0175] Optionally, the current right-click menu bar includes a rename control. The ability to add a smart name can be achieved by adding a smart name control to the right-click menu bar or reusing the rename control.
[0176] In this way, the addition of intelligent naming functionality can be flexibly implemented.
[0177] Optionally, if the user is not satisfied with the file name generated by the electronic device 100, they can refresh the file name by repeatedly triggering the smart naming function. For example, in the scenario shown in Figure 17, if the user is not satisfied with the newly generated file name by the PC, they can trigger the smart naming process again through the smart naming control. For example, based on the user's operation of the smart naming control, the PC can generate a new file name based on the file content and naming rules, and this new file name will be different from the previously generated file name. For example, the naming rules include smart naming to prevent repetition.
[0178] In this way, intelligent renaming is achieved based on user operations, resulting in a final intelligent name that satisfies the user and improves the user experience.
[0179] As an example, as shown in Figure 18(a), the mobile phone displays the recording file interface of the recorder application, which shows at least one recording file. In response to the user selecting a recording file, the mobile phone can display a menu bar 181. Then, in response to the user's operation on the rename control 182 displayed in the menu bar 181, it is determined that the user has instructed to trigger the intelligent naming process of the recording file. Then, the mobile phone uses voice recognition technology to convert the audio in the audio file into text content to obtain the corresponding semantic content. Then, referring to the method described in the above embodiments, the mobile phone or server generates the file name corresponding to the semantic content. As shown in Figure 18(b), the mobile phone displays a file renaming window 183, which displays the generated recording file name, making it convenient for the user to confirm or modify the recording file name.
[0180] In this way, the intelligent naming process of the recording file is triggered based on the user's operation, and the name of the recording file is generated so that the name of the recording file matches the content of the recording file. This simplifies the process of users editing the file name themselves and reduces the difficulty of user operation.
[0181] As another example, as shown in Figure 19(a), the mobile phone displays a file management application interface, which shows at least one folder. In response to the user selecting a folder, the mobile phone displays a menu bar 191. Then, in response to the user's operation on the rename control 192 displayed in the menu bar 191, as shown in Figure 19(b), the mobile phone displays a folder renaming window 193, which displays the original name of the folder for the user to confirm or modify. Next, the mobile phone detects the user's operation on the recommended naming control 194 displayed in the folder renaming window 193 and determines that the user has instructed the triggering of the folder's intelligent naming process. Then, the mobile phone can obtain the file names of at least one file included in the folder and obtain the corresponding semantic content based on the file names of the at least one file. Then, referring to the method described in the above embodiments, the mobile phone or server generates the folder name corresponding to the semantic content. As shown in Figure 19(c), the mobile phone displays the generated folder name in the folder renaming window 193. During this process, the phone detects that the user has again interacted with the recommended naming control 194 displayed in the folder renaming window 193, and determines that the user is not satisfied with the current smart naming result and needs to re-trigger the smart naming process. The phone can then repeat the aforementioned process to generate a new folder name. Afterwards, as shown in Figure 19(d), the phone displays the newly generated folder name in the folder renaming window 193.
[0182] In this way, the system triggers an intelligent folder naming process based on user actions, generating folder names that match the file names within the folders. This simplifies the process of users manually editing folder names and reduces the difficulty of user operation. Furthermore, users can choose to repeatedly trigger the intelligent naming process to obtain satisfactory folder names.
[0183] Figure 20 is a flowchart illustrating a file naming method provided in an embodiment of this application. It should be noted that this method is not limited to the specific order shown in Figure 20 and below. It should be understood that in other embodiments, the order of some steps in this method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0184] S2001, Electronic device 100 detects a first operation by the user, which triggers the generation of the name of the first file.
[0185] The first operation is one or more of the following: creating a new copy, saving, updating the contents of the first file, downloading, receiving, or renaming.
[0186] Optionally, the first operation is performed on a first application. The first application can be one or more of the following: a memo application, a voice recorder application, a browser application, a chat application, or a file management application.
[0187] For example, as shown in Figure 11(a), the PC detects the user's instruction to copy the PPT document 111 and determines to generate a copy of the PPT document 111. Then, the PC can obtain the document content of the PPT document 111 through a file management application and trigger the generation of the name of the copy of the PPT document 111 through the following steps.
[0188] For example, as shown in Figure 8(a), during the display of the Notes application, the phone adds note content based on user actions. During this process, the phone detects the user's first action of clicking the save control 81, determining that the user has instructed the generation of a note file containing that note content. Then, in response to this first action, the phone triggers the generation of the note file and triggers the generation of the note file's name through the following steps.
[0189] As another example, as shown in Figure 15(a), the PC displays a browser application window, and within this browser application window, a webpage containing a picture of a mobile phone is displayed. Subsequently, in response to a user's instruction to download the image, the PC can trigger the image download process, and after downloading, generate the image's name through the following steps.
[0190] As another example, as shown in Figure 14(a), a mobile phone receives a Word document sent by another user through a chat application. The phone automatically saves the Word document or saves it based on user actions. The filename of this Word document is a meaningless string of characters. As shown in Figure 14(b), the mobile phone can trigger the naming process of the Word document through the chat application, generating a name for the Word document through the following steps.
[0191] As another example, as shown in Figure 17(a), during the display of a file, the PC detects a right-click operation by the user on a file and displays the menu bar 171 corresponding to that file. Then, the PC detects the user's operation on the smart naming control 172 displayed in the menu bar 171, triggering the generation of the file's name through the following steps.
[0192] S2002, the electronic device 100 obtains the first name of the first file according to the first operation. The first name is determined based on the file content and naming rules of the first file. The naming rules include character count requirements and / or combination requirements, with the combination requirements indicating the minimum components that the first name must include.
[0193] Optionally, the naming rules may also include style requirements and / or text requirements. The style requirements indicate that the style of the first name matches the style of the content of the first file or that the style of the first name is a preset style; the text requirements indicate that the first name includes target text.
[0194] For example, naming rules include style requirements and text requirements. The style requirements indicate that the style of the first name should match the style of the content of the first file, while the text requirements indicate that the first name should include "Meeting Minutes". Thus, based on this naming rule, the first name of the obtained first file could be, for example, "XX Meeting Minutes".
[0195] In this way, by using naming rules, the output names are made more consistent with the file content, making it easier for users to find or archive files later.
[0196] Optionally, the naming rules also include matching the first name with the second name of the second file, and the second file being located in the same folder as the first file.
[0197] In some embodiments, the electronic device 100 obtains a first name through a cloud model. The naming rules used by the cloud model include general naming rules and differential naming rules. For example, the electronic device 100 has different naming rule requirements in different naming scenarios. Therefore, the electronic device 100 can send the differential naming rules required for the current naming scenario to the server and upload them. In this way, the cloud model on the server can combine the obtained general naming rules and the received differential naming rules to trigger the generation of the first name of the first file. For example, the differential naming rule might match the first name with the second name of the second file. Thus, in the scenario illustrated in Figure 11, the name of the newly copied file can have a similar style to the file names of other files in the same folder.
[0198] Optionally, the combination requirement also indicates the composition of the components included in the first name. Optionally, this composition may include, for example, the order in which the components are arranged. For instance, the combination requirement may indicate that the document name should include the meeting time, meeting location, and attendees in that order.
[0199] In some embodiments, the first name is determined based on the target content. Optionally, the target content includes one or more of the following: content extracted from the file content of the first file, content generated based on the file content of the first file, content converted based on the file content of the first file, and a second name of the second file; wherein the second file is located in the same folder as the first file.
[0200] For example, electronic device 100 may obtain the first name based on the content extracted from the first file. Alternatively, electronic device 100 may also generate semantic content based on the file content of the first file and obtain the first name based on the semantic content.
[0201] In some examples, where the content of the first file includes text, the target content includes part or all of the content of the first file. For example, electronic device 100 may use content extracted from the content of the first file as the target content.
[0202] Optionally, the file content of the first file includes a first preset number of texts and / or chapter titles in the file content of the first file.
[0203] For example, the content of the first file is entirely text. The electronic device 100 uses all of this text as the target content to generate the first name. Alternatively, the electronic device 100 uses a first preset number of characters from this text as the target content, such as the first 2000 characters.
[0204] For example, the content of the first file may include text, as well as images, audio, and other content. The electronic device 100 may process only the text included in the file to obtain the target content. For instance, the electronic device 100 may use all or part of the text included in the file as the target content.
[0205] For example, if the first file contains text, the electronic device 100 can use the chapter titles in the first file's content as the target content. Optionally, the target content also carries a corresponding document format, which is used to represent the format of the target content. For example, if the target content includes chapter titles in the first file, the document format is used to describe the structure corresponding to each chapter title, such as first-level headings, second-level headings, etc.
[0206] For example, as shown in Figure 8(a), during the display of the Notes application, the phone adds note content based on user actions. This note content includes text. During this process, the phone detects the user's click on the save control 81 and determines that the user has instructed the creation of a note file containing this note content. The phone can obtain the current note content and use part or all of the text within that note content as the target content. Then, based on the target content, a name for the note can be generated. As shown in Figure 8(b), the phone adds a new note file 82 and automatically generates a title for note file 82.
[0207] Thus, for a first file containing text, the corresponding target content can be output to generate the first name of the first file.
[0208] In some examples, where the first file is an image file, the target content includes the text identified in the image file, and / or, the descriptive content of the generated image file. For example, electronic device 100 uses content generated based on the content of the first file as the target content.
[0209] Optionally, the generated image file description is used to describe the image content of the image file. For example, the description can be content obtained by semantic parsing the image content of the image file.
[0210] For example, if the image file is a screenshot of plain text, the electronic device 100 can use OCR technology to recognize the text content included in the image, use the text content as the target content for output, and generate a file name based on the target content.
[0211] For example, as shown in Figure 15(a), the PC displays a browser application window, and within this window, a webpage containing a picture of a mobile phone. Then, in response to a user's instruction to download the image, the PC can trigger the image download process and the intelligent naming process. Afterwards, the PC can analyze the image to generate a description corresponding to the image, and use this description as the target content for the generated image name, such as "XX Mobile Phone". Optionally, the image may also include the mobile phone model corresponding to the image. Then, the PC can obtain the mobile phone model by recognizing the text included in the image using OCR. Finally, by combining the recognized mobile phone model with the generated mobile phone image description, the image name can be generated.
[0212] Thus, even if the first file is an image file, the corresponding target content can still be output to generate the first name of the first file.
[0213] In some examples, where the first file is an audio file, the target content includes part or all of the text content converted from the audio file. For example, electronic device 100 uses the content converted from the content of the first file as the target content.
[0214] Optionally, the text content obtained from the audio file conversion may include a second preset number of characters from the text content.
[0215] For example, as shown in Figure 9(a), the mobile phone displays the recorder application interface and records audio through the recorder application. During this process, the mobile phone detects the user's operation on the stop control 91 and determines that the user has instructed the generation of an audio file. The mobile phone can then obtain the corresponding audio file and, through speech recognition technology, convert the audio in the audio file into text content to obtain the target content corresponding to that text content. For example, all the converted text content can be used as the target content. Afterwards, based on this target content, the filename of the audio file can be generated, as shown in Figure 9(b), where the audio filename is "2024XX Seminar".
[0216] Thus, even if the first file is an audio file, the corresponding target content can be output to generate the first name of the first file.
[0217] In some embodiments, the electronic device 100 obtains a first name of a first file according to a first operation, including: the electronic device 100 sending target content to a server. The electronic device 100 receives the first name sent by the server, the first name being determined by the server based on the target content and naming rules, the naming rules being either obtained by the server or learned naming rules.
[0218] For example, after obtaining the target content corresponding to the first file, the electronic device 100 can send the target content to the server to obtain the first name of the first file. As shown in Figure 6, the electronic device 100 obtains the semantic content corresponding to the file through the file parsing module, which is the target content. Then, the electronic device 100 can send the semantic content to the server to trigger the server to generate a file name based on the semantic content through the intelligent module A.
[0219] Optionally, during the file name generation process, the server needs to input naming rule A and semantic content into the intelligent naming module A. Naming rule A can be a naming rule directly obtained by the server, or it can be a naming rule learned by the server. For example, intelligent naming module A can obtain naming examples and learn the necessary naming rules by studying these examples.
[0220] In this way, the server enables more flexible and intelligent output of the first name, while reducing the power consumption of electronic devices in processing data by 100%.
[0221] In other embodiments, the electronic device 100 obtains a first name of a first file according to a first operation, including: the electronic device 100 obtaining a first keyword corresponding to the target content; the electronic device 100 obtaining a second keyword matching the first keyword from a database; wherein the database includes multiple preset keywords; and the electronic device 100 generating a first name based on the second keyword and naming rules.
[0222] For example, after obtaining the target content corresponding to the first file, the electronic device 100 can generate the first name of the first file locally based on the target content. As shown in Figure 7, the electronic device 100 obtains the semantic content corresponding to the file through the file parsing module, which is the target content. Then, the electronic device 100 can send this semantic content to the semantic processing module. The semantic processing module can obtain the first keyword corresponding to the target content through steps such as topic modeling, keyword extraction, and semantic clustering. Then, the semantic processing module sends the first keyword to the matching module, which obtains the second keyword matching the first keyword from the database. Then, the matching module can send the second keyword to the intelligent naming module B. The intelligent module B can obtain the first name of the first file based on naming rule B and the second keyword.
[0223] In the keyword matching process, after steps such as topic modeling, keyword extraction, and semantic clustering, the matching module can also vectorize the obtained first keyword to obtain computer-understandable and processable content. Optionally, the database can be a semantic vector library containing multiple preset vectors. Therefore, during keyword matching, the matching can also obtain a second keyword through vector matching, which is also vectorized computer-understandable and processable content.
[0224] Thus, electronic device 100 can obtain the first name of the first file through local matching and processing.
[0225] In some solutions, multiple embodiments of this application can be combined, and the combined solution can be implemented. Optionally, some operations in the processes of each method embodiment may be combined, and / or the order of some operations may be changed. Furthermore, the execution order between the steps of each process is merely exemplary and does not constitute a limitation on the execution order between steps; other execution orders are also possible. It is not intended to indicate that the execution order is the only possible order in which these operations can be performed. Those skilled in the art will conceive of various ways to reorder the operations described herein. In addition, it should be noted that the process details involved in one embodiment of this document are similarly applicable to other embodiments, or different embodiments may be combined.
[0226] Furthermore, some steps in the method embodiments can be equivalently replaced with other possible steps. Alternatively, some steps in the method embodiments may be optional and can be deleted in certain use cases. Or, other possible steps may be added to the method embodiments.
[0227] Furthermore, the various method embodiments can be implemented individually or in combination.
[0228] The file naming method provided by the embodiments of this application has been described in detail above with reference to Figures 6-20. The electronic device provided by the embodiments of this application is described in detail below with reference to Figure 21.
[0229] In one possible design, FIG21 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. As shown in FIG21, the electronic device 2100 may include a transceiver unit 2101 and a processing unit 2102. The electronic device 2100 can be used to implement the functions of the electronic device 100 involved in the above method embodiments.
[0230] Optionally, the transceiver unit 2101 is used to support the electronic device 2100 in performing S2001 in FIG20.
[0231] Optionally, the processing unit 2102 is used to support the electronic device 2100 in executing S2002 in FIG20.
[0232] The transceiver unit may include a receiving unit and a transmitting unit, and may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or transceiver module. The operation and / or function of each unit in the electronic device 2100 are respectively to implement the corresponding process of the file naming method described in the above method embodiments. All relevant content of each step involved in the above method embodiments can be referred to the functional description of the corresponding functional unit, and for the sake of brevity, it will not be repeated here.
[0233] Optionally, the electronic device 2100 shown in FIG21 may further include a storage unit (not shown in FIG21) storing a program or instructions. When the transceiver unit 2101 and the processing unit 2102 execute the program or instructions, the electronic device 2100 shown in FIG21 can execute the file naming method described in the above method embodiments.
[0234] The technical effects of the electronic device 2100 shown in Figure 21 can be referred to the technical effects of the file naming method described in the above method embodiments, and will not be repeated here.
[0235] In addition to being in the form of electronic device 2100, the technical solution provided in this application may also be a functional unit or chip in an electronic device, or a device used in conjunction with an electronic device.
[0236] This application also provides a chip system, including: a processor coupled to a memory, the memory being used to store programs or instructions, wherein when the program or instructions are executed by the processor, the chip system implements the methods in any of the above method embodiments.
[0237] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0238] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.
[0239] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0240] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
[0241] This application also provides a computer-readable storage medium storing a computer program. When the computer program is run on a computer, it causes the computer to perform the aforementioned steps to implement the file naming method described above.
[0242] 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 file naming method described above.
[0243] In addition, this application also provides an apparatus. Specifically, the apparatus may be a component or module, and may include one or more processors and a memory connected together. The memory is used to store a computer program. When the computer program is executed by one or more processors, the apparatus causes it to perform the file naming methods described in the above method embodiments.
[0244] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0245] The steps of the methods or algorithms described in conjunction with the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an application-specific integrated circuit (ASIC).
[0246] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, the division of the above functional modules is only used as an example. In practical applications, the above functions can be assigned to different functional modules as needed; that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0247] In the several embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules or units may be electrical, mechanical or other forms.
[0248] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0249] Computer-readable storage media include, but are not limited to, any of the following: USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media capable of storing program code.
[0250] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes 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
A file naming method characterized by, The method is applied to an electronic device, and the method includes: The user's first action is detected, and the first action is used to trigger the generation of the name of the first file; According to the first operation, the first name of the first file is obtained; wherein the first name is determined based on the file content and naming rules of the first file, the naming rules include character count requirements and / or combination requirements, and the combination requirements indicate the components that the first name must include at least. The method of claim 1, wherein The naming rules also include style requirements and / or text requirements; wherein, the style requirements indicate that the style of the first name matches the style of the file content of the first file or that the style of the first name is a preset style, and the text requirements indicate that the first name includes target text. The method according to claim 1 or 2, characterized in that The first name is determined based on the target content, which includes one or more of the following: content extracted from the file content of the first file, content generated based on the file content of the first file, content converted based on the file content of the first file, and the second name of the second file; wherein the second file is located in the same folder as the first file. The method according to claim 3, characterized in that If the content of the first file includes text, the target content includes part or all of the content of the first file. The method according to claim 4, characterized in that The file content of the first document includes a first preset number of texts and / or chapter titles in the file content of the first document. The method according to claim 3, characterized in that When the first file is an image file, the target content includes the identified text contained in the image file, and / or the generated description content of the image file. The method according to claim 3, characterized in that If the first file is an audio file, the target content includes part or all of the text content converted from the audio file. The method of claim 7, wherein The text content obtained by converting the audio file includes a second preset number of characters from the text content. The method according to any one of claims 3-8, characterized in that The step of obtaining the first name of the first file according to the first operation includes: Send the target content to the server; The server receives a first name, which is determined by the server based on the target content and the naming rules, wherein the naming rules are either obtained by the server or learned by the server. The method according to any one of claims 3-8, characterized in that The step of obtaining the first name of the first file according to the first operation includes: Obtain the first keyword corresponding to the target content; Retrieve a second keyword that matches the first keyword from a database, wherein the database includes multiple preset keywords; The first name is generated based on the second keyword and the naming rules. The method according to any one of claims 1 to 10, characterized in that The naming rules also include the first name matching the second name of the second file, and the second file being located in the same folder as the first file. The method according to any one of claims 1 to 11, characterized in that The combination requirement also indicates the compositional form of the components included in the first name. The method according to any one of claims 1 to 12, characterized in that The first operation is one or more of the following: creating a new copy, saving, updating the file content of the first file, downloading, receiving, and renaming. The method according to any one of claims 1-13, characterized in that, The first operation is performed on a first application, which is one or more of the following: a memo application, a voice recorder application, a browser application, a chat application, or a file management application. An electronic device, characterized by comprising: include: A processor and a memory, the memory being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, which, when the processor reads the computer instructions from the memory, cause the electronic device to perform the method as described in any one of claims 1-14. A computer-readable storage medium, characterized by The computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-14. A computer program product, characterized in that When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-14.