File naming method and device

By automatically selecting the server or local model for file naming in the electronic device, the inefficiency problem caused by the user manually selecting the model is solved, and efficient and convenient file naming processing is achieved.

CN120723732APending Publication Date: 2025-09-30VIVO MOBILE COMM HANGZHOU CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510939457.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

In the prior art, users need to manually select an algorithm model to name files, resulting in low file naming processing efficiency.

Method used

The file naming pattern is determined by the electronic device, and the file name is automatically generated using the server or local model in different modes, reducing the steps for users to manually select the model.

Benefits of technology

The processing efficiency and ease of use of file naming have been improved. Users do not need to worry about model selection. It can automatically adapt to network quality and user preferences to ensure efficient file naming and privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723732A_ABST
    Figure CN120723732A_ABST
Patent Text Reader

Abstract

The invention discloses a file naming method and device, and belongs to the technical field of computers. The method is executed by the electronic equipment and comprises the steps of determining a file naming mode; under the condition that the file naming mode is a first mode, naming feature information of a first file is input into a first model located at a server side, a first name, output by the first model, of the first file is received, and the name of the first file is named as the first name; under the condition that the file naming mode is a second mode, naming feature information of the first file is input into a second model located in the electronic equipment, a second name, output by the second model, of the first file is received, and the name of the first file is named as the second name.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and specifically relates to a file naming method and device thereof. Background Art

[0002] With the acceleration of the digitalization process, the explosive emergence of multimodal data files has posed severe challenges to the traditional file management method that relies on time-sequential naming rules (such as "20230901_003.txt"), which has given rise to an urgent need for intelligent file naming technology with multimodal data parsing capabilities.

[0003] Intelligent naming is a technology that uses algorithmic models to independently process different file types to generate file names. This technology relies on the algorithmic model's ability to analyze text. In related technologies, the algorithmic model used for file naming is deployed on the client or server, requiring users to manually select the algorithmic model to execute file naming, resulting in low file naming efficiency. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a file naming method and device thereof, which can solve the problem in related technologies that users need to manually select an algorithm model for executing file naming, resulting in low file naming processing efficiency.

[0005] In a first aspect, an embodiment of the present application provides a file naming method, which is executed by an electronic device, and the method includes:

[0006] Determine the file naming pattern;

[0007] In a case where the file naming mode is the first mode, inputting the naming feature information of the first file into a first model located at the server, receiving the first name of the first file output by the first model, and naming the first file as the first name;

[0008] When the file naming mode is the second mode, the naming feature information of the first file is input into the second model located in the electronic device, the second name of the first file output by the second model is received, and the name of the first file is named as the second name.

[0009] In a second aspect, an embodiment of the present application provides a file naming device, applied to an electronic device, the device comprising:

[0010] A first determining module, configured to determine a file naming pattern;

[0011] The first processing module is used to input the naming feature information of the first file into the first model located at the server end when the file naming mode is the first mode, receive the first name of the first file output by the first model, and name the name of the first file as the first name; when the file naming mode is the second mode, input the naming feature information of the first file into the second model located at the electronic device, receive the second name of the first file output by the second model, and name the name of the first file as the second name.

[0012] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0013] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0014] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method described in the first aspect.

[0015] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the method described in the first aspect.

[0016] In an embodiment of the present application, the file naming pattern is determined by the electronic device; when the file naming pattern is the first pattern, the naming feature information of the first file is input into the first model located at the server end, the first name of the first file output by the first model is received, and the name of the first file is named the first name; when the file naming pattern is the second pattern, the naming feature information of the first file is input into the second model located at the electronic device, the second name of the first file output by the second model is received, and the name of the first file is named the second name. Through this embodiment, there is no need for the user to manually select a model, which can reduce the user's operation steps. The user only needs to pay attention to the file content and does not need to care about the model selection, thereby improving the convenience of use and the processing efficiency of file naming. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is one of the flowcharts of the file naming method in the embodiment of the present application;

[0018] Figure 2This is one of the schematic diagrams of the file naming setting interface in the embodiment of the present application;

[0019] Figure 3 This is the second schematic diagram of the file naming setting interface in the embodiment of the present application;

[0020] Figure 4 This is a schematic diagram of the file generation interface in an embodiment of the present application;

[0021] Figure 5 This is one of the file naming interface diagrams in the embodiment of the present application;

[0022] Figure 6 This is the second schematic diagram of the file naming interface in the embodiment of the present application;

[0023] Figure 7 This is the second flowchart of the file naming method in the embodiment of the present application;

[0024] Figure 8 This is a structural block diagram of a file naming device in an embodiment of the present application;

[0025] Figure 9 is a structural block diagram of an electronic device in an embodiment of the present application;

[0026] Figure 10 Schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field fall within the scope of protection of this application.

[0028] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0029] The following describes in detail the file naming method provided in the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0030] See also Figure 1 , an embodiment of the present application provides a file naming method, applied to an electronic device, comprising the following steps:

[0031] Step 101: Determine the file naming pattern.

[0032] Optionally, the file naming pattern may be determined based on at least one of the following information: network quality of the electronic device, user preferences, file content type, etc. User preferences include, but are not limited to, at least one of the following: privacy preference, naming format preference, file type preference, naming complexity preference, naming frequency preference, naming style preference, etc.

[0033] Step 102: When the file naming mode is the first mode, input the naming feature information of the first file into a first model located at the server, receive the first name of the first file output by the first model, and name the first file as the first name;

[0034] When the file naming mode is the second mode, the naming feature information of the first file is input into the second model located in the electronic device, the second name of the first file output by the second model is received, and the name of the first file is named as the second name.

[0035] It should be pointed out that the first model can be understood as an online model, and the second model can be understood as an offline model. Due to the limitation of computing resources, the naming quality of the offline model is much lower than that of the online model. Since the online model involves data transmission to the server, there is a risk of privacy leakage.

[0036] The type of the first file includes but is not limited to: text files, video files, audio files, pictures, etc.

[0037] In the above embodiment, the file naming pattern is determined by the electronic device; when the file naming pattern is the first pattern, the naming feature information of the first file is input into the first model located at the server end, the first name of the first file output by the first model is received, and the name of the first file is named as the first name; when the file naming pattern is the second pattern, the naming feature information of the first file is input into the second model located at the electronic device, the second name of the first file output by the second model is received, and the name of the first file is named as the second name. This embodiment eliminates the need for the user to manually select a model, which can reduce the number of user operation steps. The user only needs to focus on the file content and does not need to worry about the model selection, thereby improving the ease of use and the efficiency of file naming processing.

[0038] In practice, the intelligent naming service provides a client SDK that encapsulates multimodal file content analysis and naming logic, providing a unified naming interface for applications. Its core function is to semantically understand the content of the file being named by invoking a local or cloud-based secondary model, generating a name that aligns with the file's content.

[0039] It's important to note that any electronic device application that requires naming, such as documents, notes, notifications, emails, recordings, and scans, can utilize the intelligent naming service to perform file naming. The intelligent naming service supports multimodal input, such as text, voice, images, and videos, adapting to the naming needs of different file types.

[0040] In some application scenarios, application software that accesses the smart naming service needs to add new "Smart Naming" and "Smart Naming Service" function entries in the application settings.

[0041] For example, the smart naming function is turned off by default, and users can Figure 2 In the "Smart Naming" function entry in the setting interface shown, turn on or off the smart naming function; based on Figure 2 Click on the "Smart Naming Service" function entrance shown in the figure, and enter Figure 3 The selection interface shown; the intelligent naming service is online by default, and users can Figure 3 In the selection interface shown, select online file naming (i.e. Figure 3 ) or offline file naming (i.e. Figure 3 Offline option in ).

[0042] In some embodiments of the present application, determining a file naming pattern includes:

[0043] When a generation completion event of the first file is detected, a file naming pattern is determined; or, a first input of the user regarding the first file is received; and in response to the first input, a file naming pattern is determined.

[0044] For example, Figure 4 and Figure 5 As shown, taking the recorder as an example, in response to the recording completion event, the intelligent naming service is automatically called to name the recording file, and the intelligent naming result waiting interface is displayed, as shown in FIG. Figure 5 "Intelligent naming is being generated..." is displayed in the example. This example can automatically trigger the intelligent file naming function.

[0045] For example, Figure 6In the example of recording files, when the user long-presses the “New Recording 3” that has been generated in the history, the function selection window a is displayed in response to the long-press input; the function selection window a includes a “Smart Naming” control, and may also include the following controls: “Delete” control, “Rename” control, and “Share” control; in response to the user’s input to the “Smart Naming” control, the smart naming service is automatically called, and the following is displayed: Figure 5 The interface shown is when waiting for the smart naming result. This example allows users to manually trigger smart file naming for generated recording files.

[0046] In the above embodiment, two methods are provided for the user: manually triggering the smart naming function and automatically triggering the smart naming function, which facilitates the user to quickly call the file naming function and improves file management efficiency.

[0047] In some embodiments of the present application, the method for determining a file naming pattern includes: determining the file naming pattern according to a grid quality of the electronic device.

[0048] Optionally, when the network quality meets a first network condition, the file naming mode is determined to be the first mode; when the network quality meets a second network condition, the file naming mode is determined to be the second mode; the first network condition is superior to the second network condition. In the first mode, the file name is generated by a first model located on the server; in the second mode, the file name is generated by a second model located on the electronic device.

[0049] In a specific implementation, based on the network quality of the electronic device, determining the file naming pattern may include: sending a Transmission Control Protocol (TCP) empty load detection packet through port 61000 every 300ms, and recording the precise sending timestamp of the detection packet and the arrival timestamp of the received confirmation ACK, and taking the difference between the sending timestamp and the arrival timestamp as the round-trip time (RTT); if the RTT is less than a preset duration (such as 200ms) for a consecutive preset number of times (such as 3 times), then continuing to use the first model to generate the file name; if the RTT is greater than or equal to the preset duration (such as 200ms) for a consecutive preset number of times (such as 3 times), then continuing to use the second model to generate the file name.

[0050] It should be noted that the above-mentioned RTT-based network quality detection method is only an example and does not limit the use of other methods to obtain network quality. For example, network quality can also be determined based on one or more of other factors such as network connection status, data transmission rate, packet loss rate, etc.

[0051] In this embodiment, the electronic device automatically selects a model for file naming based on network conditions by obtaining network quality. When the network quality is good, the first model is selected to generate a file name for the first file, and cloud resources and high-performance computing capabilities are used to ensure efficient operation of file naming. When the network quality is poor, the second model is selected to generate a file name for the first file, reducing the dependence of file naming on network resources, ensuring the timeliness and reliability of file naming, and avoiding chaotic file management due to network problems. In this way, the computing resources of the online model and the offline model can be dynamically balanced, and the delay jitter of file naming caused by network fluctuations can be eliminated, thereby ensuring the smoothness of file naming and improving the processing efficiency of civilized naming. Moreover, based on the network quality, dynamic switching between the first model and the second model is performed without the need for manual selection by the user, which can reduce the user's operation steps. The user only needs to pay attention to the file content and does not need to worry about the network status or model selection, thereby improving the convenience of use.

[0052] In some embodiments of the present application, determining a file naming pattern according to the network quality of the electronic device includes:

[0053] When the smart naming function is turned on and the first mode is selected for smart file naming, the electronic device detects the network quality and switches between the first mode and the second mode according to the network quality; when the smart naming function is turned on and the second mode is selected for smart file naming, the electronic device does not need to perform network quality detection and always uses the second model to generate file names for files.

[0054] In the above embodiment, based on the need for privacy protection, the user may always choose to generate a file name using the offline mode. When the user chooses to generate a file name using the offline mode, there is no need to consider the network quality of the electronic device; when the user chooses to generate a file name in the online mode, switching between the first mode and the second mode based on the network quality can avoid naming delays due to fluctuations in network quality, thereby improving file naming efficiency.

[0055] In some embodiments of the present application, the method for determining a file naming pattern includes: determining the file naming pattern based on user preferences.

[0056] User preferences can be collected through questionnaires, user behavior analysis, or device usage records. User preferences include but are not limited to at least one of the following: privacy preferences, naming format preferences, file type preferences, naming complexity preferences, naming frequency preferences, and naming style preferences.

[0057] For example, privacy preferences can be inferred through user behavior analysis. For example, if a user frequently modifies file names or deletes files, this may indicate a sensitivity to privacy; for example, if a user sets "encryption" or "read-only" permissions for certain folders or file types. Determining the file naming pattern based on privacy preferences includes: if the user is sensitive to privacy, for non-sensitive files, determining to use the first pattern, that is, using the first model on the server to generate a more complex name; for sensitive files, determining to use the second pattern, that is, using the second local model to generate a simple name to avoid the risk of data leakage.

[0058] For example, if it is determined based on at least one of the naming format preference, file type preference, naming complexity preference, naming frequency preference, and naming style preference that the user's file naming quality requirements are high, then the file naming mode is determined to be the first mode, that is, the first mode on the server side is used to generate a file name for the first file.

[0059] In this implementation, the file naming mode is selected based on the user's preference, which can ensure that a file name that meets the user's needs is generated and reduce manual input.

[0060] In some embodiments of the present application, the method for determining a file naming pattern includes: determining the file naming pattern based on user preferences and file content type.

[0061] For example, if a user uploads a "financial report.xlsx" file multiple times and does not modify the file name, it is determined that the user is not sensitive to privacy. When the file type of the first file is identified as sensitive information (such as financial data, ID card, bank statement, medical information, etc.), based on the user's historical behavior preferences (the behavior of not modifying the file name of the financial report), it is inferred that the user may want to simplify the naming process but does not want to upload the data. Therefore, the file naming mode is determined to be the second mode, that is, the local second model is selected to generate a file name for the first file, avoiding calling the server-side model and preventing the file content from being analyzed or stored.

[0062] In this implementation, the file naming pattern is selected based on user preferences and file types, which can ensure that a file name that meets user needs is generated, reduce manual input, and avoid leakage of sensitive information.

[0063] It should be noted that the above-mentioned methods for determining the file naming pattern are merely some optional implementation methods, and the embodiments of this application are not limited thereto. For example, in specific implementations, the file naming pattern can also be determined based on other information, such as business scenarios and usage, language preferences, user geographic location, etc.

[0064] In some embodiments of the present application, the above-mentioned file naming method also includes: obtaining text feature information corresponding to the first file; obtaining a keyword weight vector of the first file based on the text feature information, and using the keyword weight vector as the naming feature information.

[0065] For example, it is assumed that the text feature information in the first file includes the following content: "The application of artificial intelligence in medical imaging is showing a rapid growth trend (see Figure 1 , Figure 1 The description includes: "CT scan image showing lung nodules; OCR text: Patient ID: 2023-IMG-017"). The main technological breakthroughs are concentrated in... (followed by the main text)". Based on the text feature information, the extracted keyword weight vector is: "[AI medical: 0.91, CT image: 0.87, deep learning: 0.85, 2023: 0.82, segmentation algorithm: 0.79]", with 0.19, 0.87, 0.85, 0.82, and 0.79 being the weight coefficients of the keywords "AI medical," "CT image," "deep learning," and "segmentation algorithm," respectively.

[0066] In this embodiment, multimodal files to be named are uniformly converted into text feature information, which is converted into keyword weight vectors in a unified format based on the text feature information, and the files to be named are named based on the keyword weight vectors. Compared with the prior art in which different types of files use independent processing flows and there is no unified feature expression system, the embodiment of the present application can improve the naming efficiency of files and ensure the accuracy of naming through the feature expression of the same different types of files.

[0067] In some embodiments of the present application, the input information of the first model or the second model includes: a keyword weight vector and constraints, where the constraints include:

[0068] Mandatory feature words: For example, the first two high-weight feature words are mandatory, and low-weight words are optional supplementary information;

[0069] File name length requirement: File name length ≤ 30 Chinese characters or 60 English characters;

[0070] Generation format requirements: can be customized according to business needs, such as <year><technical field><core method>.

[0071] In the above embodiment, by inputting constraint information into the first model or the second model, it is possible to ensure that the file name complies with specific specifications, thereby facilitating the classification and retrieval of files.

[0072] In some embodiments of the present application, the above file naming method further includes:

[0073] Generate multiple candidate file names using the first model or the second model;

[0074] If the currently generated file name is repeated with the historical file name, it will automatically be postponed to the next file name;

[0075] The file name that passed the verification is used as the first or second name.

[0076] The above embodiment can avoid file overwriting or file confusion problems by verifying the file name, ensure the uniqueness of the file name, and avoid the need for users to manually modify the file name due to duplication.

[0077] In some embodiments of the present application, obtaining a keyword weight vector of the first file according to the text feature information includes:

[0078] Performing word segmentation processing on the text feature information and filtering stop words to obtain a plurality of keywords included in the text feature information;

[0079] Determining the frequency of occurrence of each of the keywords in the text feature information;

[0080] determining an inverse document frequency of each of the keywords in the corpus;

[0081] Determining a weight value corresponding to each keyword according to the product of the occurrence frequency and the inverse document frequency;

[0082] After removing the keywords whose weight values ​​are lower than a preset threshold, the remaining keywords and the weight values ​​corresponding to the remaining keywords are used to form a keyword weight vector of the first file.

[0083] For example, assuming that the text feature information S of the first file includes the following content: "The 2023 product strategy focuses on AI medical imaging, and a breakthrough has been achieved in the deep learning-based CT image segmentation algorithm," the step of obtaining the keyword weight vector of the first file based on the text feature information S may include:

[0084] Step 1: Segment the text feature information.

[0085] Use the Jieba algorithm to segment the text feature information S into a word list. For example, if the text feature information S = "The product strategy in 2023 will focus on AI medical imaging", the word segmentation result is: ["2023", "year", "of", "product", "strategy", "will", "focus on", "AI", "medical", "imaging"].

[0086] Step 2: Filter stop words from the word segmentation results.

[0087] Initialize a general stop word list (such as "of", "is", "in", etc.), and filter the word segmentation results obtained in the first step by stop words. After filtering, it is: ["2023", "year", "product", "strategy", "focus on", "AI", "medical", "imaging"].

[0088] Step 3: Determine the occurrence frequency of each of the keywords in the text feature information.

[0089] The occurrence frequency can also be called the term frequency factor TF, which represents the occurrence frequency of the keyword t in the text feature information S, that is, the proportion of the number of occurrences to the total number of words. The TF of the keyword t can be calculated using the following formula (1):

[0090]

[0091] Among them, N(t) is the number of times the keyword t appears in the text feature information S, and M(S) is the total number of words in the text feature information S. For example, "AI" appears 1 time, and the total number of words in the text is 8, then TF("AI") = 0.125.

[0092] Step 4: Determine the inverse document frequency of each keyword in the corpus.

[0093] Among them, the inverse document frequency IDF reflects the scarcity of the keyword t in the corpus. The scarcer the word, the more it can represent the characteristics of the text feature information S. Calculating IDF depends on the pre-trained corpus information. This corpus can use currently common corpora, such as the Wikipedia dataset. The calculation formula (2) of IDF is as follows:[[]]

[0094]

[0095] Among them, Z is the total number of documents in the corpus, and R(t) is the number of documents containing the keyword t.

[0096] Step 5: Calculate the weight coefficient corresponding to each keyword.

[0097] For example, the weight coefficient of the keyword t can be the product of TF and IDF, as shown in the following formula (3):

[0098] TF-IDF(t) = TF(t) × IDF(t) (3)

[0099] Among them, TF-IDF(t) is the weight coefficient of the keyword t, TF(t) is the term frequency factor of the keyword t, and IDF(t) is the inverse document frequency of the keyword t.

[0100] Step 6: Normalize the weights and filter out the keywords with weights lower than the preset threshold (such as 0.5) to generate a keyword weight vector.

[0101] For example, if the input text feature information S = "The 2023 product strategy focuses on AI medical imaging, and the CT image segmentation algorithm based on deep learning has achieved breakthrough progress...", the converted output keyword weight vector is: "[AI medical: 0.91, CT image: 0.87, deep learning: 0.85, 2023: 0.82, segmentation algorithm: 0.79]".

[0102] In the above embodiment, word segmentation, stop word filtering, and weight calculation are used to ensure that the extracted keywords can accurately reflect the core content of the first file; keywords are filtered based on weight coefficients and preset thresholds to filter out redundant information, and only keywords that are strongly associated with the first file are retained, which can ensure the stability and reliability of keyword extraction. This embodiment converts files (such as text files, pictures, audio and video) into machine-parseable structured semantic vectors through structured feature extraction, eliminating the need for large models to process raw file data, allowing them to concentrate resources on parsing core semantic features and improving the processing efficiency of file naming.

[0103] In some embodiments of the present application, obtaining text feature information corresponding to the first file includes:

[0104] Determining the file type of the first file based on file type identification information of the first file, wherein the file type identification information includes at least one of the following: a file format identifier (such as PDF, DOCX, etc.), a hexadecimal characteristic byte sequence in a file header (also referred to as a magic number), a starting position of the hexadecimal characteristic byte sequence in the file header (i.e., a starting offset of the magic number), and a list of extensions;

[0105] Determining a text feature extraction method according to the file type;

[0106] According to the text feature extraction method, text feature information corresponding to the first file is determined.

[0107] In a specific implementation, the first file can be converted into a binary representation, and the first 32 bytes can be converted into a hexadecimal string (e.g., 25504446...). Based on the hexadecimal string, the hexadecimal characteristic byte sequence (also called a magic number) in the file header and the starting position of the characteristic byte sequence in the file header (i.e., the starting offset of the magic number) are determined. The starting offset of the magic number represents the starting position (in bytes) of the hexadecimal characteristic byte sequence in the binary file representation, and the special value -1 indicates no characteristic code.

[0108] It's important to note that a magic number is a special byte sequence stored in the header of a binary file, typically expressed in hexadecimal, that identifies the file format. For example, the special byte sequence for a PDF file is 25504446, and for a PNG file is 89504E47. Plain text files like TXT don't have a fixed magic number and require additional identification using their extension. When offset = -1, the extension is used to identify the file format, such as for TXT files.

[0109] In a specific implementation, determining the file type of the first file according to the file type identification information of the first file includes: performing the following identification operations according to an identification rule for each file type:

[0110] Anomaly detection: If the offset of the current rule exceeds the file data length, it is judged as "file damaged";

[0111] Feature matching: Checks whether the specified offset contains the corresponding hexadecimal feature byte sequence. If the match is successful, the corresponding file format is returned.

[0112] Extension matching: For the type with offset = -1 (such as TXT), check whether the file extension is in the extension list.

[0113] For example, the file type identification rules are as follows:

[0114] (1) For PDF files, match from byte 0 to the magic number "25504446";

[0115] (2) For DOCX format files: match from byte 0 to the magic number "504B0304";

[0116] (3) For TXT files, since there is no fixed magic number (offset = -1), the file type is identified only by checking whether the extension is ".txt".

[0117] If none of the above rules are matched successfully, the system returns the indication that "file of this format is not supported"; if the match is successful, the system returns the corresponding file format identifier.

[0118] In a specific implementation, determining a text feature extraction method according to the file type of the first file; and determining text feature information corresponding to the first file according to the text feature extraction method includes:

[0119] For text (TXT) files: parse the text content of the file, automatically filter out typesetting symbols and garbled data, and output text feature information S as the complete original text;

[0120] For audio files (MP3, WAV): parse the audio stream, automatically filter out silent segments and background noise, and transcribe it into text using the ASR model. The text feature information S is the transcribed content.

[0121] For video (MP4) files: extract key frames, describe them using the on-device model, extract audio information, transcribe it into text using the ASR model, and combine the two text segments as text feature information S.

[0122] For image files (JPEG, PNG): Use the on-device model to describe the image and retain its visual features. Use OCR to recognize the text in the image and combine the two text segments as text feature information S.

[0123] For comprehensive documents (PDF, DOCX): For documents with both text and images, the main text is first parsed and headers, footers, and comments are automatically filtered. Next, embedded images are extracted, and the text within them is recognized using OCR. A visual description is generated using a client-side model. Finally, the image information is inserted into the main text at its original location to generate complete text feature information S. An example of this generation is shown below: "The application of artificial intelligence in medical imaging is showing a rapid growth trend (see Figure 1 ), Figure 1 The description includes: CT scan image showing lung nodules; OCR text: Patient ID: 2023-IMG-017. The main technological breakthrough is concentrated in... (followed by the main text)."

[0124] In the above embodiment, it is possible to perform multimodal feature compression on the named files and establish a unified feature expression system.

[0125] In some embodiments of the present application, when the file naming mode is the second mode, after naming the first file to the second name, the method further includes:

[0126] When the file naming mode is switched from the second mode to the first mode, the naming feature information of the first file is input into the first model, and the first name of the first file output by the first model is received;

[0127] A quantitative evaluation is performed on the second model according to the first name and the second name to obtain a quantitative evaluation result.

[0128] For example, when the user passes Figure 2When the "intelligent naming service" function entry shown selects the online mode (i.e., the first mode) for file naming, the iterative update process of the second model may include: when the electronic device detects that the network quality is poor, it switches from the first mode to the second mode, and uses the second model to name the first file. The second model immediately returns the file naming result to the user end, and at the same time caches the key-value pair {naming feature information: second name} to the local memory; after the network quality is restored, the electronic device switches from the second mode to the first mode, and the system automatically triggers the online model reprocessing process, using the first model to generate the first name for the first file as the standard answer set, and obtains the data set {naming feature information, second name, first name}. Here, the first name and the second name in the data set can be used for quantitative evaluation of the second model, and the naming feature information and the first name can be used for iterative training of the second model.

[0129] In some embodiments of the present application, performing a quantitative evaluation on the second model according to the first name and the second name to obtain a quantitative evaluation result includes:

[0130] Obtain a first word segmentation result set corresponding to the first name and a second word segmentation result set corresponding to the second name;

[0131] Determining a vocabulary coverage of the second model execution file naming based on the first word segmentation result set and the second word segmentation result set;

[0132] Determining a redundant word penalty value for the second model execution file naming based on the first word segmentation result set and the second word segmentation result set;

[0133] A quantitative evaluation result of the second model is determined according to a difference between the vocabulary coverage and the redundant word penalty value.

[0134] Optionally, according to the difference between the vocabulary coverage and the redundant word penalty value, the quantitative evaluation result of the second model can be calculated by formula (4):

[0135]

[0136] Among them, W onlinee Represents the first word segmentation result set, W offline Represents the second word segmentation result set, represents the vocabulary coverage, The redundancy penalty is the difference between the vocabulary coverage and the redundancy penalty, which is the naming ability evaluation result of the second model. If the score is less than 0, it is recorded as 0. The 0.2 here is a calibration value and can be adjusted according to actual needs.

[0137] In the above embodiment, if the vocabulary coverage is low, it means that the second model fails to accurately capture key information; if the redundant word penalty value is high, it means that the file name generated by the model is not concise enough; through the vocabulary coverage and redundant word penalty value, the accuracy and conciseness of the file name generated by the model can be quantitatively evaluated.

[0138] In some embodiments of the present application, the above file naming method further includes:

[0139] Using a data set consisting of the naming feature information of the first file and the first name as a training sample;

[0140] When the number of the training samples is greater than or equal to a preset number threshold and / or the quantitative evaluation result satisfies a preset condition, iteratively training the second model based on the training samples to obtain a third model;

[0141] The second model in the electronic device is replaced with the third model.

[0142] For example, a set of data {naming feature information, first name} with a quantitative evaluation score lower than a first preset score (e.g., 80 points) is used as a valid training sample. After accumulating 200 valid training samples, iterative training of the second model is started to achieve daily updates of the second model. When the naming quality of a preset number (e.g., 10) of the first files is lower than the second preset score, background optimization is immediately triggered to achieve an emergency update of the second model. The values ​​of 200, 10, 80, and 50 here are only examples and are not limited to this.

[0143] The following example uses the file naming pattern determined based on network quality. Figure 7 A file naming method provided in an embodiment of the present application is exemplified.

[0144] See also Figure 7 A file naming method improved by the present application may include the following steps:

[0145] Step 701: Enable smart naming.

[0146] For example, the smart naming function is turned off by default, and users can Figure 2 Click the "Smart Naming" function in the settings interface to turn on or off the smart naming function.

[0147] Step 702: Identify the file type of the first file.

[0148] Determine the file type of the first file based on at least one of the following identification information:

[0149] File format identification;

[0150] The hexadecimal characteristic byte sequence in the file header (i.e., magic number);

[0151] The starting position of the hexadecimal signature byte sequence in the file header (i.e., the starting offset of the magic number);

[0152] A list of extensions.

[0153] Step 703: Obtain the keyword weight vector of the first file.

[0154] This step 703 includes: obtaining text feature information corresponding to the first file; performing word segmentation processing on the text feature information and filtering stop words to obtain multiple keywords included in the text feature information; determining the frequency of occurrence of each keyword in the text feature information; determining the inverse document frequency of each keyword in the corpus; determining the weight value corresponding to each keyword based on the product of the frequency of occurrence and the inverse document frequency; after removing keywords with weight values ​​lower than a preset threshold, the remaining keywords and the weight values ​​corresponding to the keywords constitute a keyword weight vector for the first file.

[0155] Step 704: Select the intelligent naming service mode.

[0156] For example, users can Figure 2 Click on the "Smart Naming Service" function entrance shown in the figure, and enter Figure 3 The selection interface shown in the figure; the intelligent naming service function defaults to obtaining the file name online, and users can Figure 3 In the selection interface shown, select online file naming (i.e. Figure 3 "Online" option in the function) or offline file naming (i.e. Figure 3 Offline option in .

[0157] If online file naming is selected, step 705 is executed; if offline file naming is selected, step 708 is executed.

[0158] Step 705: Network quality assessment.

[0159] If the RTT is less than 200ms for three consecutive times, execute step 706; if the RTT is greater than 200ms for three consecutive times, execute step 707;

[0160] Step 706: Generate a file name using the first model.

[0161] In this step, the keyword weight vector of the first file is input into the first model, the first name output by the first model is received, and the name of the first file is named as the first name.

[0162] Step 707: Generate a file name using the second model.

[0163] In this step, the keyword weight vector of the first file is input into the second model, the second name output by the second model is received, and the name of the first file is named as the second name.

[0164] Step 708: Generate a file name using the second model, and continue to step 709.

[0165] In this step, the keyword weight vector of the first file is input into the second model, the second name output by the second model is received, and the name of the first file is named as the second name.

[0166] Step 709: Evaluate and optimize the second model.

[0167] In step 709, the second model can be evaluated based on the first name and the second name; the second model can be lightweight-trained based on the keyword weight vector and the first name to obtain an optimized third model. In this way, the second model can continue to dynamically evolve, improving the file naming quality output by the second model.

[0168] The above-mentioned embodiments improve file processing efficiency and multimodal file naming by establishing a unified feature expression system. By dynamically balancing online and offline model resources, they can eliminate delay jitter caused by network fluctuations and improve the process of file naming. By continuously optimizing the local second model, the quality of file naming in the second mode can be improved. This solves the collaborative optimization problem of operating efficiency, service stability, and privacy protection in traditional solutions that manually select a single offline model or online model, and can achieve intelligent file naming management.

[0169] The file naming method provided in the embodiment of the present application can be executed by a file naming device. In the embodiment of the present application, the file naming device provided in the embodiment of the present application is described by taking the file naming method executed by the file naming device as an example.

[0170] See also Figure 8 The present invention provides a file naming device for electronic devices. The device 800 includes:

[0171] The first determining module 801 is used to determine a file naming pattern;

[0172] The first processing module 802 is used to input the naming feature information of the first file into the first model located at the server end when the file naming pattern is the first pattern, receive the first name of the first file output by the first model, and name the name of the first file as the first name; when the file naming pattern is the second pattern, input the naming feature information of the first file into the second model located at the electronic device, receive the second name of the first file output by the second model, and name the name of the first file as the second name.

[0173] In some optional embodiments of the present application, the apparatus 800 further includes:

[0174] A first acquisition module, configured to acquire text feature information corresponding to the first file;

[0175] The second acquisition module is configured to obtain a keyword weight vector of the first file according to the text feature information and use the keyword weight vector as the naming feature information.

[0176] In some optional embodiments of the present application, the second acquisition module includes:

[0177] a first acquiring unit, configured to perform word segmentation processing on the text feature information and filter stop words to obtain a plurality of keywords included in the text feature information;

[0178] A second acquiring unit, configured to determine the frequency of occurrence of each keyword in the text feature information;

[0179] a third acquisition unit, configured to determine an inverse document frequency of each of the keywords in the corpus;

[0180] a fourth acquiring unit, configured to determine a weight value corresponding to each of the keywords according to a product of the occurrence frequency and the inverse document frequency;

[0181] The fifth acquiring unit is configured to remove the keywords whose weight values ​​are lower than a preset threshold, and then form a keyword weight vector of the first file with the remaining keywords and the weight values ​​corresponding to the remaining keywords.

[0182] In some optional embodiments of the present application, the first acquisition module includes:

[0183] a sixth acquiring unit, configured to determine the file type of the first file based on the file type identification information of the first file; wherein the file type identification information includes at least one of the following: a file format identifier, a hexadecimal characteristic byte sequence in a file header, a starting position of the hexadecimal characteristic byte sequence in the file header, and an extension list;

[0184] a seventh acquisition unit, configured to determine a text feature extraction method according to the file type;

[0185] An eighth acquiring unit is configured to determine text feature information corresponding to the first file according to the text feature extraction method.

[0186] In some optional embodiments of the present application, the apparatus 800 further includes:

[0187] a second processing module, configured to input the naming feature information of the first file into the first model and receive a first name of the first file output by the first model when the file naming mode is switched from the second mode to the first mode;

[0188] A third processing module is configured to obtain a first word segmentation result set corresponding to the first name and a second word segmentation result set corresponding to the second name;

[0189] a fourth processing module, configured to determine a vocabulary coverage of the second model execution file naming based on the first word segmentation result set and the second word segmentation result set;

[0190] a fifth processing module, configured to determine a redundant word penalty value for the second model execution file naming based on the first word segmentation result set and the second word segmentation result set;

[0191] A sixth processing module is used to determine a quantitative evaluation result of the second model according to a difference between the vocabulary coverage and the redundant word penalty value.

[0192] In some optional embodiments of the present application, the apparatus 800 further includes:

[0193] a seventh processing module, configured to use a data set consisting of the naming feature information of the first file and the first name as a training sample;

[0194] An eighth processing module, configured to iteratively train the second model based on the training samples to obtain a third model if the number of the training samples is greater than or equal to a preset number threshold and / or the quantitative evaluation result satisfies a preset condition;

[0195] A ninth processing module is configured to replace the second model in the electronic device with the third model.

[0196] In some optional embodiments of the present application, the first determining module 801 includes:

[0197] A first determining unit is configured to determine a file naming pattern when a generation completion event of the first file is detected; or

[0198] The second determining unit is configured to receive a first input from a user regarding the first file; and determine a file naming pattern in response to the first input.

[0199] It should be pointed out that the file naming device 800 is a device corresponding to the above-mentioned file naming method. All implementation means in the above-mentioned method embodiment are applicable to the embodiment of the file naming device and can also achieve the same technical effect.

[0200] The file naming device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It can also be a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not specifically limit it.

[0201] The file naming device in the embodiment of the present application can be a device having an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0202] The file naming device provided in the embodiment of the present application can achieve Figures 1 to 7 To avoid repetition, the various processes implemented in the method embodiment are not described here.

[0203] Alternatively, as Figure 9 As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901 and a memory 902, wherein the memory 902 stores a program or instruction that can be run on the processor 901. When the program or instruction is executed by the processor 901, the various steps of the above-mentioned file naming method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0204] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0205] Figure 10 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

[0206] The electronic device 1000 includes but is not limited to components such as a radio frequency unit 1001 , a network module 1002 , an audio output unit 1003 , an input unit 1004 , a sensor 1005 , a display unit 1006 , a user input unit 1007 , an interface unit 1008 , a memory 1009 , and a processor 1010 .

[0207] Those skilled in the art will understand that the electronic device 1000 may also include a power source (such as a battery) to power each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be repeated here.

[0208] Among them, the processor 1010 is used to determine a file naming pattern; when the file naming pattern is a first pattern, the naming feature information of the first file is input into a first model located at the server end, the first name of the first file output by the first model is received, and the name of the first file is named as the first name; when the file naming pattern is a second pattern, the naming feature information of the first file is input into a second model located at the electronic device, the second name of the first file output by the second model is received, and the name of the first file is named as the second name.

[0209] Optionally, the processor 1010 is further configured to obtain text feature information corresponding to the first file; obtain a keyword weight vector of the first file based on the text feature information, and use the keyword weight vector as the naming feature information.

[0210] Optionally, the processor 1010 is further configured to perform word segmentation processing on the text feature information and filter stop words to obtain a plurality of keywords included in the text feature information;

[0211] Determining the frequency of occurrence of each of the keywords in the text feature information;

[0212] determining an inverse document frequency of each of the keywords in the corpus;

[0213] Determining a weight value corresponding to each keyword according to the product of the occurrence frequency and the inverse document frequency;

[0214] After removing the keywords whose weight values ​​are lower than a preset threshold, the remaining keywords and the weight values ​​corresponding to the remaining keywords are used to form a keyword weight vector of the first file.

[0215] Optionally, the processor 1010 is further configured to determine the file type of the first file based on file type identification information of the first file; wherein the file type identification information includes at least one of the following: a file format identifier, a hexadecimal characteristic byte sequence in a file header, a starting position of the hexadecimal characteristic byte sequence in the file header, and an extension list;

[0216] Determining a text feature extraction method according to the file type;

[0217] According to the text feature extraction method, text feature information corresponding to the first file is determined.

[0218] Optionally, the processor 1010 is further configured to:

[0219] When the file naming mode is switched from the second mode to the first mode, inputting the naming feature information of the first file into the first model, and receiving the first name of the first file output by the first model;

[0220] Obtain a first word segmentation result set corresponding to the first name and a second word segmentation result set corresponding to the second name;

[0221] Determining a vocabulary coverage of the second model execution file naming based on the first word segmentation result set and the second word segmentation result set;

[0222] Determining a redundant word penalty value for the second model execution file naming based on the first word segmentation result set and the second word segmentation result set;

[0223] A quantitative evaluation result of the second model is determined according to a difference between the vocabulary coverage and the redundant word penalty value.

[0224] Optionally, the processor 1010 is further used to use the naming feature information of the first file and the data set consisting of the first name as a training sample; when the number of the training samples is greater than or equal to a preset number threshold and / or the quantitative evaluation result meets a preset condition, iteratively train the second model based on the training samples to obtain a third model; and replace the second model in the electronic device with the third model.

[0225] Optionally, the processor 1010 is further configured to, upon detecting the event that generation of the first file is completed, determine a file naming pattern; or

[0226] Receive a first input from a user regarding the first file; and determine a file naming pattern in response to the first input.

[0227] In the above embodiment, the user does not need to manually select a model, which can reduce the user's operation steps. The user only needs to focus on the file content and does not need to worry about the model selection, which improves the convenience of use and the processing efficiency of file naming.

[0228] It should be understood that in an embodiment of the present application, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.

[0229] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0230] Processor 1010 may include one or more processing units. Optionally, processor 1010 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 1010.

[0231] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned file naming method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0232] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0233] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned file naming method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0234] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0235] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned file naming method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0236] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0237] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0238] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A file naming method, characterized in that: Executed by an electronic device, the method includes: Determine the file naming pattern; In a case where the file naming mode is the first mode, inputting the naming feature information of the first file into a first model located at the server, receiving the first name of the first file output by the first model, and naming the first file as the first name; When the file naming mode is the second mode, the naming feature information of the first file is input into the second model located in the electronic device, the second name of the first file output by the second model is received, and the name of the first file is named as the second name.

2. The file naming method according to claim 1, wherein: The method further comprises: Obtaining text feature information corresponding to the first file; A keyword weight vector of the first file is obtained according to the text feature information, and the keyword weight vector is used as the naming feature information.

3. The file naming method according to claim 2, wherein: Obtaining a keyword weight vector of the first file according to the text feature information includes: Performing word segmentation processing on the text feature information and filtering stop words to obtain a plurality of keywords included in the text feature information; Determining the frequency of occurrence of each of the keywords in the text feature information; determining an inverse document frequency of each of the keywords in the corpus; Determining a weight value corresponding to each keyword according to the product of the occurrence frequency and the inverse document frequency; After removing the keywords whose weight values ​​are lower than a preset threshold, the remaining keywords and the weight values ​​corresponding to the remaining keywords are used to form a keyword weight vector of the first file.

4. The file naming method according to claim 2, wherein: The obtaining of text feature information corresponding to the first file includes: Determining the file type of the first file based on file type identification information of the first file; wherein the file type identification information includes at least one of the following: a file format identifier, a hexadecimal characteristic byte sequence in a file header, a starting position of the hexadecimal characteristic byte sequence in the file header, and an extension list; Determining a text feature extraction method according to the file type; According to the text feature extraction method, text feature information corresponding to the first file is determined.

5. The file naming method according to claim 1, wherein: When the file naming mode is the second mode, after naming the first file to the second name, the method further includes: When the file naming mode is switched from the second mode to the first mode, inputting the naming feature information of the first file into the first model, and receiving the first name of the first file output by the first model; Obtain a first word segmentation result set corresponding to the first name and a second word segmentation result set corresponding to the second name; Determining a vocabulary coverage of the second model execution file naming based on the first word segmentation result set and the second word segmentation result set; Determining a redundant word penalty value for the second model execution file naming based on the first word segmentation result set and the second word segmentation result set; A quantitative evaluation result of the second model is determined according to a difference between the vocabulary coverage and the redundant word penalty value.

6. A file naming device, characterized in that: Applied to electronic equipment, the device comprises: A first determining module, configured to determine a file naming pattern; The first processing module is used to input the naming feature information of the first file into the first model located at the server end when the file naming mode is the first mode, receive the first name of the first file output by the first model, and name the name of the first file as the first name; when the file naming mode is the second mode, input the naming feature information of the first file into the second model located at the electronic device, receive the second name of the first file output by the second model, and name the name of the first file as the second name.

7. The file naming device according to claim 6, characterized in that: The device further comprises: A first acquisition module, configured to acquire text feature information corresponding to the first file; The second acquisition module is configured to obtain a keyword weight vector of the first file according to the text feature information and use the keyword weight vector as the naming feature information.

8. The file naming device according to claim 7, characterized in that: The second acquisition module includes: a first acquiring unit, configured to perform word segmentation processing on the text feature information and filter stop words to obtain a plurality of keywords included in the text feature information; A second acquiring unit, configured to determine the frequency of occurrence of each keyword in the text feature information; a third acquisition unit, configured to determine an inverse document frequency of each of the keywords in the corpus; a fourth acquiring unit, configured to determine a weight value corresponding to each of the keywords according to a product of the occurrence frequency and the inverse document frequency; The fifth acquiring unit is configured to remove the keywords whose weight values ​​are lower than a preset threshold, and then form a keyword weight vector of the first file with the remaining keywords and the weight values ​​corresponding to the remaining keywords.

9. The file naming device according to claim 7, characterized in that: The first acquisition module includes: a sixth acquiring unit, configured to determine the file type of the first file based on the file type identification information of the first file; wherein the file type identification information includes at least one of the following: a file format identifier, a hexadecimal characteristic byte sequence in a file header, a starting position of the hexadecimal characteristic byte sequence in the file header, and an extension list; a seventh acquisition unit, configured to determine a text feature extraction method according to the file type; An eighth acquiring unit is configured to determine text feature information corresponding to the first file according to the text feature extraction method.

10. The file naming device according to claim 6, characterized in that: The device further comprises: a second processing module, configured to input the naming feature information of the first file into the first model and receive a first name of the first file output by the first model when the file naming mode is switched from the second mode to the first mode; A third processing module is configured to obtain a first word segmentation result set corresponding to the first name and a second word segmentation result set corresponding to the second name; a fourth processing module, configured to determine a vocabulary coverage of the second model execution file naming based on the first word segmentation result set and the second word segmentation result set; a fifth processing module, configured to determine a redundant word penalty value for the second model execution file naming based on the first word segmentation result set and the second word segmentation result set; A sixth processing module is used to determine a quantitative evaluation result of the second model according to a difference between the vocabulary coverage and the redundant word penalty value.

Citation Information

Patent Citations

  • Named entity recognition method, device and system

    CN108255816A

  • Text recognition method and device, recognition model, electronic equipment and storage medium

    CN117892728A

  • File naming method and device, electronic equipment, storage medium and program product

    CN119377175A

  • Cognitive digital file naming

    US20220027316A1

  • Data processing method, apparatus, and device, and computer readable storage medium

    WO2022002030A1