Shear plate data disk falling method and device, computing equipment and program product

By obtaining data, determining the type, generating file names and suffixes, and directly saving them as local files in the clipboard data writing method, the problem of low efficiency in saving clipboard data is solved, and the operation is simple and the file name is related to the content. sexual enhancement.

CN118796506APending Publication Date: 2024-10-18UNIONTECH SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410785988.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-10-18

Smart Images

  • Figure CN118796506A_ABST
    Figure CN118796506A_ABST
Patent Text Reader

Abstract

The invention discloses a clipboard data loading method and device, computing equipment and a program product, and the method is executed in the computing equipment, and comprises the steps: obtaining clipboard data from a clipboard in response to a clipboard data loading request, and determining a storage position path according to the clipboard data loading request, the clipboard data comprises text data and / or picture data; a subdivision type corresponding to the clipboard data is determined, corresponding feature information is obtained from the clipboard data according to the subdivision type, and the feature information is used for indicating key content of the clipboard data; generating a file name according to the feature information, and generating a file suffix according to the subdivision type; generating a target file path according to a storage position path, the file name and the file suffix; and storing the clipboard data as a local target file according to the target file path. According to the method, the appropriate file name can be automatically generated based on the clipboard data, and the clipboard data are directly stored as the local file with the corresponding name.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method for storing clipboard data on a disk, a device for storing clipboard data on a disk, a computing device, and a program product. Background Art

[0002] The clipboard is a temporary storage area provided by the operating system for transferring data between applications. It allows users to copy or cut data (such as text, images, files, etc.) to the clipboard, and then paste the data into other applications or storage locations. The scope of the clipboard is limited to data transfer between applications, and the content data in the clipboard cannot be directly saved as a local file.

[0003] However, in actual application scenarios, it is often necessary to save the cut content to a disk, for example, a text copied from a web page needs to be stored locally, or a picture is copied from a picture tool and then needs to be saved to a specified directory. In this regard, the conventional storage method in the prior art is to transfer through a third-party tool, such as opening a text editor, pasting the text into the text editor, and then saving it as a text file. This indirect storage method, because it needs to be transferred through a third-party tool, increases the number of operation steps, lengthens the operation path, and is less efficient. In addition, when saving files, users are required to manually name them, and the file name cannot be automatically generated according to the data content.

[0004] Therefore, a method for storing data on a shear plate is needed to solve the problems existing in the above technical solution. Summary of the invention

[0005] To this end, the present invention provides a method and device for storing data on a shear plate to a disk, so as to solve or at least alleviate the above problems.

[0006] According to one aspect of the present invention, there is provided a method for writing clipboard data to a disk, which is executed in a computing device, wherein the computing device includes a clipboard, and the method includes: in response to a request for writing clipboard data to a disk, obtaining clipboard data from the clipboard, and determining a storage location path according to the request for writing clipboard data to a disk, wherein the clipboard data includes text data and / or image data; determining a subdivision type corresponding to the clipboard data, and obtaining corresponding feature information from the clipboard data according to the subdivision type, wherein the feature information is used to indicate key content of the clipboard data; generating a file name according to the feature information, and generating a file suffix according to the subdivision type; generating a target file path according to the storage location path, the file name and the file suffix; and saving the clipboard data as a local target file according to the target file path.

[0007] Optionally, in the method for writing clipboard data to disk according to the present invention, the segmentation type corresponding to the clipboard data includes a text segmentation type and / or an image segmentation type; the text segmentation type includes one or more of a JSON text type, a Tex text type, a C++ text type, an XML text type, and a Python text type; the image segmentation type includes one or more of a PNG image type, a JPEG image type, and a Bitmap image type.

[0008] Optionally, in the method for writing clipboard data to disk according to the present invention, determining the subdivision type corresponding to the clipboard data includes: for image data in the clipboard data, reading the file header of the image data, and determining the image subdivision type corresponding to the image data based on the byte sequence in the file header; for text data in the clipboard data, matching the text data with one or more regular expressions to determine the text subdivision type corresponding to the text data.

[0009] Optionally, in the method for writing clipboard data to disk according to the present invention, corresponding feature information is obtained from the clipboard data according to the segmentation type, including: for text data in the clipboard data, inputting the text data into a large language model, and generating text summary information based on the text data through the large language model as feature information of the text data.

[0010] Optionally, in the method for writing clipboard data to disk according to the present invention, corresponding feature information is obtained from the clipboard data according to the segmentation type, including: for image data in the clipboard data, obtaining image labels from the image data using a deep learning model; extracting image metadata from the image data, and extracting image location information and / or image time information from the image metadata; and using the image label and the image location information and / or image time information as feature information of the image data.

[0011] Optionally, in the method for writing clipboard data to disk according to the present invention, extracting picture metadata from the picture data includes: using an image processing library to load the picture data, and extracting picture metadata from the picture data; using the picture tag and the picture location information and / or picture time information as characteristic information of the picture data, including: parsing the picture location information and / or picture time information to parse the picture location information into first format location information including a location name, and / or parsing the picture time information into second format time information; using the picture tag and the first format location information and / or second format time information as characteristic information of the picture data.

[0012] Optionally, in the method for writing clipboard data to disk according to the present invention, corresponding feature information is obtained from the clipboard data according to the segmentation type, and also includes: when the image data in the clipboard data includes text information, using an OCR recognition algorithm to extract the text information from the image data; inputting the text information into a large language model, and generating text summary information based on the text information through the large language model as feature information of the image data.

[0013] Optionally, in the method for writing clipboard data to disk according to the present invention, an application is running on the operating system of the computing device; in response to a request for writing clipboard data to disk, clipboard data is obtained from the clipboard, including: the application calls a clipboard interface provided by the operating system in response to the request for writing clipboard data to disk to request access to the clipboard; the operating system checks whether the clipboard contains available data, and if so, obtains the clipboard data from the clipboard and provides it to the application.

[0014] According to one aspect of the present invention, there is provided a device for writing clipboard data to a disk, which is deployed in a computing device, wherein the computing device includes a clipboard, and the device includes: an acquisition module, adapted to respond to a request for writing clipboard data to a disk, obtain clipboard data from the clipboard, and determine a storage location path according to the request for writing clipboard data to a disk, wherein the clipboard data includes text data and / or image data; a determination module, adapted to determine a subdivision type corresponding to the clipboard data, and obtain corresponding feature information from the clipboard data according to the subdivision type, wherein the feature information is used to indicate key content of the clipboard data; a first generation module, adapted to generate a file name according to the feature information, and to generate a file suffix according to the subdivision type; a second generation module, adapted to generate a target file path according to the storage location path, the file name and the file suffix; and a saving module, adapted to save the clipboard data as a local target file according to the target file path.

[0015] According to one aspect of the present invention, there is provided a computing device, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be suitable for execution by the at least one processor, and the program instructions include instructions for executing the method for dropping clipboard data to disk as described above.

[0016] According to one aspect of the present invention, a computer program product is provided, comprising a computer program / instruction, wherein the computer program / instruction implements the method as described above when executed by a processor.

[0017] According to one aspect of the present invention, a readable storage medium storing program instructions is provided. When the program instructions are read and executed by a computing device, the computing device executes the method for storing clipboard data on a disk as described above.

[0018] According to the technical solution of the present invention, a method and device for storing clipboard data on a disk are provided. The method can obtain clipboard data from the clipboard and determine the storage location path in response to a request for storing clipboard data on a disk, obtain corresponding feature information from the clipboard data according to the segmentation type corresponding to the clipboard data, generate a file name according to the feature information, and generate a file suffix according to the segmentation type. Furthermore, a target file path is generated according to the storage location path, the file name, and the file suffix, and the clipboard data is saved as a local target file according to the target file path. Based on this, the user only needs to operate with one key to automatically generate a suitable file name based on the clipboard data, and directly store the clipboard data as a local target file with the corresponding name, without the need for transfer through a third-party tool, with fewer operation steps, and improves the efficiency of storing clipboard data on a disk. In addition, the file name obtained based on the feature information is highly correlated with the data content, which is convenient for the user to understand the file content through the file name.

[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to achieve the above and related purposes, some illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. By reading the following detailed description in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present invention will become more apparent. Throughout the present invention, the same reference numerals generally refer to the same parts or elements.

[0021] Figure 1 A schematic diagram of a computing device 100 provided according to an embodiment of the present invention is shown;

[0022] Figure 2 A schematic flow chart of a method 200 for storing clipboard data on a disk according to an embodiment of the present invention is shown;

[0023] Figure 3 A schematic diagram of a shear plate data storage device 300 provided according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0024] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0025] In the prior art, it is impossible to directly save the content data in the clipboard as a local file. The content data in the clipboard (such as text, pictures, etc.) needs to be transferred through a third-party tool and then saved as a file, which increases the number of operation steps, lengthens the operation path, and is inefficient. Moreover, when saving a file, the user needs to manually name it, and the file name cannot be automatically generated according to the data content.

[0026] In response to the above technical problems, the present invention proposes a method for storing clipboard data on disk, which can automatically generate a suitable file name based on the clipboard data and directly store the clipboard data as a local file with the corresponding name. The operation steps are reduced, which improves the efficiency of storing clipboard data on disk.

[0027] It should be noted that "writing to disk" refers to the process of writing data in memory to a disk or other storage device.

[0028] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0029] Figure 1 FIG. 1 is a schematic diagram of a computing device 100 provided according to an embodiment of the present invention. Figure 1 As shown, in a basic configuration, the computing device 100 includes at least one processing unit 102 and a system memory 104. According to one aspect, depending on the configuration and type of the computing device, the processing unit 102 can be implemented as a processor. The system memory 104 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories. According to one aspect, the system memory 104 includes an operating system 105.

[0030] According to one aspect, operating system 105 is suitable for controlling the operation of computing device 100, for example. Furthermore, examples are practiced in conjunction with graphics libraries, other operating systems, or any other application programs, and are not limited to any particular application or system. Figure 1 The basic configuration is shown in FIG. 1 by those components within the dashed lines. According to one aspect, computing device 100 has additional features or functionality. For example, according to one aspect, computing device 100 includes additional data storage devices (removable and / or non-removable), such as magnetic disks, optical disks, or tapes. Such additional storage Figure 11 is illustrated by a removable storage device 109 and a non-removable storage device 110.

[0031] As stated above, according to one aspect, a program module 103 is stored in the system memory 104. According to one aspect, the program module 103 may include one or more application programs, and the present invention does not limit the type of application program, for example, the application program may include: email and contact application programs, word processing application programs, spreadsheet application programs, database application programs, slide show application programs, drawing or computer-aided application programs, web browser application programs, etc.

[0032] According to one aspect, the program module 103 may include a plurality of program instructions suitable for executing the method 200 for writing clipboard data to disk of the present invention, so that the computing device 100 is configured to execute the method 200 for writing clipboard data to disk of the present invention.

[0033] According to one aspect, the program module 103 may include a clipboard data storage device 300 , and the clipboard data storage device 300 may be configured to execute the clipboard data storage method 200 of the present invention.

[0034] According to one aspect, the examples may be practiced on a circuit comprising discrete electronic components, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or a single chip containing electronic components or a microprocessor. Figure 1 Each or many components shown in can be integrated into a system on a chip (SOC) on a single integrated circuit to practice examples. According to one aspect, such a SOC device may include one or more processing units, a graphics unit, a communication unit, a system virtualization unit, and various application functions, all of which are integrated (or "burned") into a chip substrate as a single integrated circuit. When operated via SOC, the functions described in this article can be operated via a dedicated logic integrated with other components of the computing device 100 on a single integrated circuit (chip). Embodiments of the present invention can also be practiced using other technologies capable of performing logical operations (such as AND, OR, and NOT), including but not limited to mechanical, optical, fluid, and quantum technologies. In addition, embodiments of the present invention can be practiced in a general-purpose computer or in any other circuit or system.

[0035] According to one aspect, the computing device 100 may also have one or more input devices 112, such as a keyboard, a mouse, a pen, a voice input device, a touch input device, etc. Output devices 114 may also be included, such as a display, a speaker, a printer, etc. The aforementioned devices are examples and other devices may also be used. The computing device 100 may include one or more communication connections 116 that allow communication with other computing devices 118. Examples of suitable communication connections 116 include, but are not limited to: RF transmitter, receiver and / or transceiver circuits; Universal Serial Bus (USB), parallel and / or serial ports.

[0036] The term computer-readable medium as used herein includes computer storage media. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (e.g., computer-readable instructions, data structures, or program modules 103). System memory 104, removable storage device 109, and non-removable storage device 110 are all examples of computer storage media (i.e., memory storage). Computer storage media may include random access memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices, or any other products that can be used to store information and can be accessed by computing device 100. According to one aspect, any such computer storage medium can be a part of computing device 100. Computer storage media do not include carrier waves or other propagated data signals.

[0037] According to one aspect, communication media is implemented by computer readable instructions, data structures, program modules 103, or other data in a modulated data signal (e.g., a carrier wave or other transport mechanism), and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more characteristics set or changed in such a manner as to encode information in the signal. By way of example and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media.

[0038] In an embodiment according to the present invention, the computing device 100 is configured to execute the method 200 of the present invention for writing data to a clipboard. The computing device 100 includes one or more processors and one or more readable storage media storing program instructions. When the program instructions are configured to be executed by one or more processors, the computing device executes the method 200 of writing data to a clipboard in the embodiment of the present invention.

[0039] In an embodiment according to the present invention, a clipboard data storage device 300 is deployed in the computing device 100, and the clipboard data storage device 300 can be run on the operating system of the computing device 100, and the clipboard data storage device 300 is suitable for executing the clipboard data storage method 200 of the present invention. By executing the clipboard data storage method 200 of the present invention, a suitable file name can be automatically generated based on the clipboard data, and the clipboard data can be directly stored as a local file with a corresponding name.

[0040] Figure 2 The flowchart of a method 200 for writing data from a clipboard to a disk provided according to an embodiment of the present invention is shown. The method 200 for writing data from a clipboard to a disk may be executed in a computing device (eg, the aforementioned computing device 100).

[0041] It should be noted that the computing device 100 includes a clipboard, and the clipboard data is stored in the clipboard. In some embodiments, before executing the method 200 of storing clipboard data on a disk of the present invention, a user can trigger a data cut operation, and the computing device 100 can store the data in the clipboard in response to the data cut operation, that is, obtain the clipboard data.

[0042] like Figure 2 As shown, the method 200 for writing clipboard data to disk includes the following steps 210-250.

[0043] In step 210, the computing device 100 obtains clipboard data from the clipboard in response to the request to write clipboard data to disk, and determines a storage location path according to the request to write clipboard data to disk. The clipboard data may include text data and / or image data.

[0044] In an embodiment of the present invention, a user can trigger a request to store clipboard data on disk with one click to request that clipboard data be stored in a storage location corresponding to a storage location path in the form of a file. In response to the request to store clipboard data on disk, the computing device 100 obtains clipboard data from the clipboard and determines the storage location path according to the request to store clipboard data on disk.

[0045] In step 220, the computing device 100 determines the subdivision type corresponding to the clipboard data, and obtains corresponding feature information from the clipboard data according to the subdivision type. Here, the feature information is used to indicate the key content of the clipboard data.

[0046] It should be noted that the subdivision type refers to a type that is further subdivided based on text and pictures. The subdivision type may include text subdivision type and picture subdivision type.

[0047] In an embodiment of the present invention, in the case where the clipboard data includes text data and / or picture data, the segmentation type corresponding to the clipboard data may include a text segmentation type and / or a picture segmentation type.

[0048] In some embodiments, the text segment type may include one or more of a JSON text type, a Tex text type, a C++ text type, an XML text type, and a Python text type. The image segment type may include one or more of a PNG image type, a JPEG image type, and a Bitmap image type.

[0049] In some embodiments, for text data in the clipboard data, the feature information of the text data includes, for example, text summary information. For image data in the clipboard data, the feature information of the image data includes, for example, image tag information.

[0050] In step 230 , the computing device 100 may generate a file name according to the feature information, and generate a corresponding file suffix according to the segmentation type.

[0051] It should be noted that, since the characteristic information is used to indicate the key content of the clipboard data, the file name generated according to the characteristic information is highly correlated with the content of the clipboard data.

[0052] In step 240, the computing device 100 generates a target file path according to the storage location path, the file name, and the file suffix.

[0053] In step 250, the computing device 100 can save the clipboard data as a local target file according to the target file path. Based on this, the clipboard data can be saved in the form of a local target file in a storage location corresponding to the storage location path.

[0054] It can be seen that according to the clipboard data disk writing method 200 of the present invention, the user only needs to operate with one key to automatically generate a suitable file name based on the clipboard data, and directly store the clipboard data as a local target file with the corresponding name, with fewer operation steps, which improves the efficiency of clipboard data disk writing.

[0055] In some embodiments, an application is running on the operating system of the computing device 100, and the method 200 for dropping clipboard data to disk can be configured to be executed in the application. The present invention does not limit the specific type of application, as long as the application can implement the paste function. The application configured to execute the method 200 for dropping clipboard data to disk of the present invention can be a system application, for example, it can include applications such as the desktop and file manager of the operating system. The present invention is extended on the basis of the paste function of the application, so that the application can execute the method 200 for dropping clipboard data to disk.

[0056] In some embodiments, in step 210, the computing device 100 responds to the request to write the clipboard data to the disk, and the specific process of obtaining the clipboard data from the clipboard is as follows: the above application responds to the request to write the clipboard data to the disk, calls the clipboard interface provided by the operating system to request access to the clipboard; the operating system checks whether the clipboard contains available data, and if it contains available data, obtains the clipboard data from the clipboard and provides it to the application. In this way, the application obtains the clipboard data. Next, the application can perform corresponding operations on the clipboard data according to the type of the clipboard data. For example, in the case where the clipboard data includes text data and / or image data, the application can create a clipboard object, call the request_text() and / or request_image functions of the clipboard object, and provide a callback function on_data_received to access the text data and / or image data in the clipboard. Then, the obtained text data and / or image data are processed in the callback function on_text_received / on_image_received.

[0057] In addition, if the clipboard data is a file path (not text data and / or image data), the clipboard data can be directly saved according to the file path without executing the above steps 220 to 250.

[0058] In some embodiments, in step 220, the computing device 100 determines the subdivision type corresponding to the clipboard data in the following specific manner.

[0059] If the clipboard data includes picture data, for the picture data in the clipboard data, the file header of the picture data can be read, and the picture subdivision type corresponding to the picture data can be determined according to the byte sequence in the file header. It should be noted that the first 8 bytes of the file header of the PNG picture are fixed, which are 137 80 78 71 13 10 26 10. Therefore, if the first 8 bytes of the byte sequence in the file header read from the picture data are the same as the above 8 bytes, it can be determined that the picture subdivision type corresponding to the picture data is the PNG picture type. The first two bytes of the file header of the JPEG picture are fixed, which are 255216, and the two bytes immediately following are specific identifiers JFIF (JPEG File Interchange Format) or Exif (Exchangeable Image File Format). Therefore, if the byte sequence in the file header read from the picture data conforms to the above fixed bytes and specific identifiers, it can be determined that the picture subdivision type corresponding to the picture data is the JPEG picture type. For Bitmap images, the first two bytes of the file header are fixed to 66 77. Therefore, if the first two bytes of the byte sequence in the file header read from the image data are the same as the above two fixed bytes, it is determined that the image subdivision type corresponding to the image data is the Bitmap image type.

[0060] If the clipboard data includes text data, the text data in the clipboard data may be matched with the text data by using one or more regular expressions to determine the text segmentation type corresponding to the text data.

[0061] For example, the regular expression corresponding to the JSON text type is ^[\[\{].*[\]\}]$, which is used to match text that starts with [ or { and ends with ] or}. If the text ending with the above is matched, the text segmentation type corresponding to the text data is determined to be the JSON text type. The regular expression corresponding to the Tex text type is \\documentclass.*|\\begin\{document\}.*|\\end\{document\}.*, which is used to match identifiers containing Tex files, such as \documentclass, \begin{document}, and \end{document}. If any of the above identifiers is matched, the text segmentation type corresponding to the text data can be determined to be the Tex text type. The regular expression corresponding to the C++ text type is #include.*|int\s+main\s*\(|class\s+\w+\s*\{|public:|private:|protected:. This regular expression is used to match specific grammatical structures containing C++ code, such as #include, int main(), class definition and other grammatical structures. If any of the above grammatical structures is matched, it can be determined that the text segmentation type corresponding to the text data is the C++ text type. In addition, the regular expression corresponding to the XML text type is <\?xml.*\?>|<.*>.*<\ / .*>, and the regular expression corresponding to the Python text type is import.*|def\s+\w+\(.*\)|class\s+\w+\(.*\)|if.*:|for.*:|while.*:.

[0062] By matching the regular expressions corresponding to the above-mentioned various text segmentation types with the text data respectively, the text segmentation type corresponding to the text data can be determined.

[0063] In some embodiments, if the clipboard data includes text data, then in step 220, the process of the computing device 100 acquiring corresponding feature information from the clipboard data according to the segmentation type may include the following steps: for the text data in the clipboard data, input the text data into a large language model, generate text summary information based on the text data through the large language model, and use the text summary information as feature information of the text data. Furthermore, in step 230, the computing device 100 may generate a file name based on the text summary information (feature information of the text data), for example, the text summary information may be directly used as the file name.

[0064] It should be noted that the computing device 100 (application) can call the interface of the large language model to interact with the large language model for data. By inputting text data into the large language model and inputting corresponding prompt information, the large language model can generate and output text summary information based on the text data.

[0065] In some embodiments, the large language model may be, for example, OpenAI's ChatGPT-3 model, which learns the statistical characteristics, grammatical structure, and contextual relationships of a language, and is therefore able to summarize text data and generate text summary information. However, the present invention is not limited to the specific type of the large language model.

[0066] In some embodiments, if the clipboard data includes picture data, then in step 220, the process in which the computing device 100 obtains corresponding feature information from the clipboard data according to the segmentation type may include the following steps.

[0067] For the image data in the clipboard data, first, a deep learning model can be used to obtain image tags from the image data. Here, the deep learning model can be, for example, ResNet, Inception, MobileNet, etc., and the present invention is not limited to this. Image tags can include various objects, scenes, and concepts. For example, examples of image tags are as follows: 1) Natural scenery: mountains, rivers, beaches, forests, sunsets, etc.; 2) Animals: dogs, cats, birds, horses, lions, etc.; 3) Plants: flowers, trees, grass, palm trees, etc.; 4) Food: fruits, vegetables, bread, hamburgers, pizza, etc.; 5) Transportation: cars, bicycles, trains, airplanes, ships, etc.; 6) Buildings: houses, bridges, skyscrapers, churches, castles, etc.; 7) People: men, women, children, athletes, etc.; 8) Products: TVs, computers, chairs, tables, mobile phones, etc.

[0068] Considering that only using the picture tag as the file name will result in too large a granularity of the file name, for the picture data in the clipboard data, the computing device 100 can also extract picture metadata from the picture data, and extract picture location information and / or picture time information from the picture metadata. It should be noted that the picture metadata is usually included in the Exif (Exchangeable Image File Format) tag of the picture.

[0069] The computing device 100 may use the above-mentioned picture tags obtained from the picture data, as well as the picture location information and / or picture time information, as feature information of the picture data.

[0070] Furthermore, in step 230, a file name may be generated based on the feature information of the picture data (picture tag and picture location information and / or picture time information).

[0071] In some embodiments, after extracting the picture location information and / or the picture time information, the computing device 100 may also parse the picture location information and / or the picture time information to parse the picture location information into a first format location information including a location name (e.g., a city name, a street name, etc.), and / or parse the picture time information into a second format time information. Here, the second format is a predetermined date and time format. For example, the picture location information includes longitude and latitude. When parsing the picture location information, a reverse geocoding service (such as Google Maps Geocoding API, Baidu Maps API, etc.) may be used to convert the longitude and latitude into a specific location name (e.g., a city name, a street name, etc.), thereby obtaining the first format location information including the location name. The picture time information, for example, includes the shooting time of the picture, and the shooting time of the picture may be converted into time information in a predetermined date and time format.

[0072] Furthermore, the picture tag and the first format position information and / or the second format time information may be used as feature information of the picture data.

[0073] In this embodiment, for the image data in the clipboard data, in step 230, the computing device 100 may generate an image file name according to the image tag and the first format location information and / or the second format time information.

[0074] In some embodiments, the computing device 100 may generate a file name according to the image tag, the first format location information, and the second format time information in a predetermined naming format. In a specific embodiment, the image tag is, for example, "park", the first format location information is, for example, "Beijing", and the second format time information is, for example, "2023 / 8 / 22", then the file name generated according to the predetermined naming format may be "2023 / 8 / 22-Beijing-Park".

[0075] In some embodiments, the computing device 100 may also generate a file name based on the first format location information and the second format time information. For example, the format of the file name may be "city date time" or "location_time".

[0076] In some embodiments, the computing device 100 may extract the image metadata from the image data in the following manner: load the image data from the clipboard using an image processing library (such as Pillow, OpenCV, etc.), and extract the image metadata from the image data.

[0077] In some embodiments, the clipboard data includes image data. When the image data in the clipboard data includes text information, the process of the computing device 100 obtaining corresponding feature information from the clipboard data according to the segmentation type may also include the following steps: extracting text information from the image data using an OCR recognition algorithm, inputting the text information into a large language model, generating text summary information based on the text information through the large language model, and using the text summary information as feature information of the image data. Furthermore, the file name corresponding to the image data may be generated based on the text summary information. The specific method of generating text summary information based on text information through a large language model is similar to the method of generating text summary information based on text data through a large language model in the above-mentioned embodiment. The specific method can be found in the description in the above-mentioned embodiment and will not be repeated here.

[0078] Figure 3 The schematic diagram of a clipboard data storage device 300 provided according to an embodiment of the present invention is shown. The clipboard data storage device 300 can be deployed in the computing device 100, and the clipboard data storage device 300 is configured to execute the clipboard data storage method 200 of the present invention.

[0079] In an embodiment of the present invention, the computing device 100 includes a clipboard, and the clipboard stores clipboard data.

[0080] like Figure 3 As shown, in an embodiment of the present invention, the device 300 for storing clipboard data on a disk includes an acquisition module 310, a determination module 320, a first generation module 330, a second generation module 340 and a storage module 350 which are sequentially communicatively connected.

[0081] The acquisition module 310 may acquire clipboard data from the clipboard in response to a request to write clipboard data to disk, and determine a storage location path according to the request to write clipboard data to disk, wherein the clipboard data includes text data and / or image data.

[0082] The determination module 320 is used to determine the subdivision type corresponding to the clipboard data, and obtain corresponding feature information from the clipboard data according to the subdivision type, where the feature information is used to indicate key content of the clipboard data.

[0083] The first generating module 330 is used to generate a file name according to the characteristic information, and to generate a file suffix according to the subdivision type.

[0084] The second generating module 340 is used to generate a target file path according to the storage location path, the file name and the file suffix.

[0085] The saving module 350 is used to save the clipboard data as a local target file according to the target file path.

[0086] It should be noted that the acquisition module 310, the determination module 320, the first generation module 330, the second generation module 340 and the storage module 350 are respectively used to execute the aforementioned steps 210 to 250. Here, the specific execution logic of each module can be found in the description of steps 210 to 250 in the method 200 above, which will not be repeated here.

[0087] According to the method 200 for storing clipboard data on a disk in an embodiment of the present invention, in response to a request for storing clipboard data on a disk, the clipboard data is obtained from the clipboard and the storage location path is determined. Corresponding feature information is obtained from the clipboard data according to the segmentation type corresponding to the clipboard data, and a file name is generated according to the feature information, and a file suffix is ​​generated according to the segmentation type. Further, a target file path is generated according to the storage location path, the file name, and the file suffix, and the clipboard data is saved as a local target file according to the target file path. Based on this, the user only needs to operate with one key to automatically generate a suitable file name based on the clipboard data, and directly store the clipboard data as a local target file of the corresponding name, without the need for transfer through a third-party tool, with fewer operation steps, which improves the efficiency of storing clipboard data on a disk, and the file name obtained based on the feature information is highly correlated with the data content, which facilitates the user to understand the file content through the file name.

[0088] The various techniques described herein may be implemented in combination with hardware or software, or a combination thereof. Thus, the method and apparatus of the present invention, or some aspects or parts of the method and apparatus of the present invention may be in the form of program codes (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, a USB flash drive, a floppy disk, a CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes a device for practicing the present invention.

[0089] In the case where the program code is executed on a programmable computer, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store the program code; the processor is configured to execute the method of storing the clipboard data on the disk according to the instructions in the program code stored in the memory.

[0090] By way of example and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer readable instructions, data structures, program modules or other data. Communication media generally embody computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and include any information transfer medium. Any combination of the above is also included within the scope of readable media.

[0091] In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the examples of the present invention. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to implement the content of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of the present invention.

[0092] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0093] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof.

[0094] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.

[0095] Unless otherwise specified, the use of ordinal numbers "first", "second", "third", etc. to describe common objects merely indicates that different instances of similar objects are involved and is not intended to imply that the objects so described must have a given order in time, space, order or in any other manner.

Claims

1. A method for writing data from a clipboard to a disk, executed in a computing device, wherein the computing device includes a clipboard, the method comprising: In response to a request for storing clipboard data on a disk, obtaining clipboard data from the clipboard, and determining a storage location path according to the request for storing clipboard data on a disk, wherein the clipboard data includes text data and / or image data; Determine a subdivision type corresponding to the clipboard data, and acquire corresponding feature information from the clipboard data according to the subdivision type, wherein the feature information is used to indicate key content of the clipboard data; Generating a file name according to the characteristic information, and generating a file suffix according to the subdivision type; Generate a target file path according to the storage location path, the file name and the file suffix; According to the target file path, the clipboard data is saved as a local target file.

2. The method of claim 1, wherein: The segmentation type corresponding to the clipboard data includes a text segmentation type and / or a picture segmentation type; The subdivision type of the text includes one or more of JSON text type, Tex text type, C++ text type, XML text type, and Python text type; The image subdivision type includes one or more of a PNG image type, a JPEG image type, and a Bitmap image type.

3. The method according to claim 1 or 2, wherein: Determining the subdivision type corresponding to the clipboard data includes: For the picture data in the clipboard data, read the file header of the picture data, and determine the picture subdivision type corresponding to the picture data according to the byte sequence in the file header; For the text data in the clipboard data, one or more regular expressions are used to match the text data to determine the text segmentation type corresponding to the text data.

4. The method according to any one of claims 1 to 3, wherein: Acquiring corresponding feature information from the clipboard data according to the segmentation type includes: For the text data in the clipboard data, the text data is input into a large language model, and text summary information is generated based on the text data by the large language model as feature information of the text data.

5. The method according to any one of claims 1 to 4, wherein: Acquiring corresponding feature information from the clipboard data according to the segmentation type includes: For the image data in the clipboard data, obtaining an image label from the image data using a deep learning model; Extracting picture metadata from the picture data, and extracting picture location information and / or picture time information from the picture metadata; The picture tag and the picture location information and / or picture time information are used as feature information of the picture data.

6. The method of claim 5, wherein: Extracting picture metadata from the picture data includes: loading the picture data using an image processing library, and extracting picture metadata from the picture data; The image tag and the image location information and / or image time information are used as feature information of the image data, including: Parsing the picture position information and / or the picture time information to parse the picture position information into first format position information including a position name, and / or parsing the picture time information into second format time information; The picture tag and the first format position information and / or the second format time information are used as feature information of the picture data.

7. The method according to any one of claims 1 to 6, wherein: Acquiring corresponding feature information from the clipboard data according to the segmentation type, further comprising: In the case where the image data in the clipboard data includes text information, extracting the text information from the image data using an OCR recognition algorithm; The text information is input into a large language model, and text summary information is generated based on the text information by the large language model as feature information of the image data.

8. The method according to any one of claims 1 to 7, wherein: An application is running on the operating system of the computing device; In response to a request to write clipboard data to a disk, obtaining clipboard data from the clipboard includes: The application, in response to the request to write the clipboard data to the disk, calls the clipboard interface provided by the operating system to request access to the clipboard; The operating system checks whether the clipboard contains available data, and if so, obtains the clipboard data from the clipboard and provides the clipboard data to the application.

9. A device for writing data from a clipboard to a disk, deployed in a computing device, wherein the computing device includes a clipboard, and the device comprises: an acquisition module, adapted to acquire clipboard data from the clipboard in response to a request for storing clipboard data on a disk, and determine a storage location path according to the request for storing clipboard data on a disk, wherein the clipboard data includes text data and / or image data; a determination module, adapted to determine a subdivision type corresponding to the clipboard data, and to obtain corresponding feature information from the clipboard data according to the subdivision type, wherein the feature information is used to indicate key content of the clipboard data; A first generating module, adapted to generate a file name according to the characteristic information, and to generate a file suffix according to the subdivision type; A second generating module, adapted to generate a target file path according to the storage location path, the file name and the file suffix; The saving module is adapted to save the clipboard data as a local target file according to the target file path.

10. A computing device comprising: at least one processor; and A memory storing program instructions, wherein the program instructions are configured to be processed by the at least one processor, and the program instructions include instructions for processing the method according to any one of claims 1 to 8.

11. A computer program product comprising a computer program / instructions, wherein: When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A readable storage medium storing program instructions, which, when read and processed by a computing device, enables the computing device to process the method according to any one of claims 1 to 8.