Method for optimizing file version management and retrieval based on large language model and related equipment
By using a large language model to semantic understanding and vectorization of file change difference data in the file version management system, the problem of querying file versions in the existing system relying on user memory is solved, and management and retrieval efficiency is improved.
Patent Information
- Application Number
- CN202510075552.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-29
AI Technical Summary
When querying file versions, the existing text file version management system relies on user memory submission information and time information, which is inefficient and complex user operations.
By extracting the change difference data generated when file changes, using a large language model for semantic understanding, structured change records are generated, and converted into vector data for storage and retrieval.
It improves the efficiency of file version management and retrieval, reduces the workload of manually writing change records, and the search method is more in line with the human memory model.
Smart Images

Figure CN119903036A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of file version management and retrieval, and in particular to a method and related equipment for optimizing file version management and retrieval based on a large language model. Background Art
[0002] Current text file version management systems, such as Git and SVN, are mainly managed based on character changes and file changes. When users search for a version of a file, they can only search by keyword based on time information and the submission information at that time. This method requires a high level of user memory, requiring users to accurately remember the information entered when submitting or the submission time when searching. Summary of the invention
[0003] The embodiments of the present application provide a method and related devices for optimizing file version management and retrieval based on a large language model to solve the technical problems existing in the prior art.
[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0005] According to a first aspect of an embodiment of the present application, a method for optimizing file version management and retrieval based on a large language model is provided, comprising:
[0006] Extract the change difference data generated when the file is changed;
[0007] Based on the change difference data, using a large language model to analyze and generate a change record;
[0008] Convert the change record into vector data and store it;
[0009] A search is performed based on the vector data.
[0010] In some embodiments of the present application, based on the above solution, the change difference data generated when extracting the file change includes:
[0011] When a user submits a file change, a text comparison algorithm is used to determine the changed content of the file and generate the change difference data.
[0012] In some embodiments of the present application, based on the aforementioned solution, the step of analyzing and generating a change record based on the change difference data using a large language model includes:
[0013] A large language model is used to perform semantic understanding on the change difference data, understand the context and intent of the change, and generate a structured change record.
[0014] In some embodiments of the present application, based on the aforementioned solution, the change record includes: a timestamp, a file name, a change type, a summary of the change content, and a change effect.
[0015] In some embodiments of the present application, based on the aforementioned solution, the searching based on the vector data includes:
[0016] Use natural language processing technology to extract key information from the search information entered by the user;
[0017] Converting the key information into a query vector;
[0018] A semantic similarity search is performed based on the query vector to determine vector data that is most similar to the query vector, and a change record corresponding to the vector data is determined.
[0019] According to a second aspect of an embodiment of the present application, there is provided a device for optimizing file version management and retrieval based on a large language model, comprising:
[0020] An extraction unit, used for extracting change difference data generated when a file is changed;
[0021] A generating unit, configured to generate a change record by analyzing the change difference data using a large language model;
[0022] A conversion unit, used for converting the change record into vector data and storing the vector data;
[0023] A retrieval unit is used to perform retrieval based on the vector data.
[0024] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer executes the method according to the first aspect.
[0025] According to a fourth aspect of the embodiments of the present application, there is provided an electronic device, including: a memory and a processor;
[0026] The memory is used to store computer instructions;
[0027] The processor is used to call the computer instructions stored in the memory so that the electronic device executes the method as described in the first aspect.
[0028] The technical solution of the present application can automatically generate a change record from the perspective of the text change effect according to the text change when the file is changed, and perform retrieval by describing the file change effect when retrieving the file version, thereby improving the management efficiency and retrieval efficiency of the file version.
[0029] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0031] Figure 1 A flow chart of a method for optimizing file version management and retrieval based on a large language model according to an embodiment of the present application is shown;
[0032] Figure 2 A block diagram of a device for optimizing file version management and retrieval based on a large language model according to an embodiment of the present application is shown;
[0033] Figure 3 A block diagram of an electronic device according to an embodiment of the present application is shown;
[0034] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0035] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0036] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0037] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0038] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0039] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] Some embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.
[0041] See also Figure 1 , shows a flow chart of a method for optimizing file version management and retrieval based on a large language model according to an embodiment of the present application.
[0042] like Figure 1 As shown, a method for optimizing file version management and retrieval based on a large language model is presented, which specifically includes steps S100 to S400.
[0043] refer to Figure 1 , step S100, extracting the change difference data generated when the file is changed.
[0044] In some feasible embodiments, based on the above solution, the change difference data generated when extracting the file changes includes:
[0045] When a user submits a file change, a text comparison algorithm is used to determine the changed content of the file and generate the change difference data.
[0046] Exemplary, for example, a text comparison algorithm, such as a diff algorithm, is first set up in the system. When a user submits a file change to the system, the system automatically compares the new and old versions of the file using the diff algorithm to determine changes such as additions and deletions to the file content and extract the change difference data.
[0047] Continue to refer Figure 1 , step S200, based on the change difference data, using a large language model to analyze and generate a change record.
[0048] In some feasible embodiments, based on the above solution, the step of analyzing and generating a change record based on the change difference data using a large language model includes:
[0049] A large language model is used to perform semantic understanding on the change difference data, understand the context and intent of the change, and generate a structured change record.
[0050] For example, a large language model, such as BERT or GPT series, is introduced into the system to perform semantic understanding of change differences. The change difference data is input into the large language model, which automatically analyzes the change content, understands the context and intent of the change, and generates a structured change record.
[0051] Among them, the change record includes timestamp, file name, change type (addition, deletion, etc.), change content summary, change effect, etc.
[0052] Continue to refer Figure 1 , step S300, converting the change record into vector data and storing it.
[0053] Exemplarily, the generated change records are converted into vector form and stored in a vector database, and the efficient retrieval characteristics of the vector database are utilized to provide support for subsequent semantic retrieval.
[0054] Continue to refer Figure 1 , step S400, searching based on the vector data.
[0055] In some feasible embodiments, based on the above solution, the searching based on the vector data includes:
[0056] Use natural language processing technology to extract key information from the search information entered by the user;
[0057] Converting the key information into a query vector;
[0058] A semantic similarity search is performed based on the query vector to determine vector data that is most similar to the query vector, and a change record corresponding to the vector data is determined.
[0059] Exemplarily, a user search interface is provided in the system, and the user inputs natural language to search through the search interface, and the system parses the natural language input by the user to extract key information.
[0060] For example, user input: 2 days ago, I added a plan about colonizing Mars to a txt file.
[0061] The system performs parsing and extracts key information: time (2 days ago), file type (txt), change type (addition), change content or summary (plan for colonization of Mars).
[0062] The system converts the extracted key information into a query vector, performs a semantic similarity search in the vector database, finds the record most similar to the query vector, outputs the search results, and provides them to the user. The search results include the specific file name and version number.
[0063] In summary, the method provided in the embodiment of the present application has the following advantages:
[0064] Accurately identify text changes: By understanding and comparing text changes through a large language model, the content and scope of text changes can be more accurately identified. The specific implementation includes using a large model for fine-grained text comparison and feature extraction to improve the accuracy of change identification.
[0065] Improve efficiency: Automatically generate change records, improve the efficiency of version management, and reduce the workload of manually writing change records. The specific implementation includes using large models to automatically generate change records, reduce manual operations, and improve management efficiency.
[0066] Memorable: Retrieving by describing the effect of the change or a summary rather than the exact text is more in line with human memory and makes it easier for users to retrieve files after a long time. The specific implementation includes using natural language processing technology to extract key information from user input and match it with the change record, which is in line with human memory.
[0067] The following describes an embodiment of the device of the present application, which can be used to execute a method for optimizing file version management and retrieval based on a large language model in the above embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the above method of the present application.
[0068] Reference Figure 2 As shown, according to an embodiment of the present application, a device 200 for optimizing file version management and retrieval based on a large language model includes:
[0069] An extraction unit 201 is used to extract change difference data generated when a file is changed;
[0070] A generating unit 202, configured to generate a change record by analyzing the change difference data using a large language model;
[0071] A conversion unit 203, used for converting the change record into vector data and storing the vector data;
[0072] The retrieval unit 204 is used to perform retrieval based on the vector data.
[0073] like Figure 3 As shown, an embodiment of the present application also provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor. When the processor 320 executes the computer program 311, the steps of the above-mentioned method for optimizing file version management and retrieval based on a large language model are implemented.
[0074] Since the electronic device introduced in this embodiment is a device used to implement a device for optimizing file version management and retrieval based on a large language model in the embodiment of the present application, based on the method introduced in the embodiment of the present application, technical personnel in this field can understand the specific implementation mode of the electronic device of this embodiment and its various variations. Therefore, how the electronic device implements the method in the embodiment of the present application is not introduced in detail here. As long as the equipment used by technical personnel in this field to implement the method in the embodiment of the present application is within the scope of protection of this application.
[0075] During the specific implementation process, when the computer program 311 is executed by a processor, any implementation method in the embodiments corresponding to the first aspect can be implemented.
[0076] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0077] It should be noted that Figure 4 The computer system 400 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0078] like Figure 4 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403, such as executing the method described in the above embodiment. In the RAM 403, various programs and data required for system operation are also stored. The CPU 401, ROM 402 and RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0079] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.
[0080] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 409, and / or installed from a removable medium 411. When the computer program is executed by a central processing unit (CPU) 401, various functions defined in the system of the present application are executed.
[0081] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0082] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0083] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0084] As another aspect, the present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes a method for optimizing file version management and retrieval based on a large language model as described in the above embodiment.
[0085] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements a method for optimizing file version management and retrieval based on a large language model as described in the above embodiment.
[0086] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0087] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0088] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. It should be understood that the present application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for optimizing file version management and retrieval based on a large language model, characterized in that: include: Extract the change difference data generated when the file is changed; Based on the change difference data, using a large language model to analyze and generate a change record; Convert the change record into vector data and store it; A search is performed based on the vector data.
2. The method according to claim 1, characterized in that The change difference data generated when the extracted file is changed includes: When a user submits a file change, a text comparison algorithm is used to determine the changed content of the file and generate the change difference data.
3. The method according to claim 1, characterized in that The step of analyzing and generating a change record based on the change difference data using a large language model includes: A large language model is used to perform semantic understanding on the change difference data, understand the context and intent of the change, and generate a structured change record.
4. The method according to claim 3, characterized in that The change record includes: timestamp, file name, change type, change content summary and change effect.
5. The method according to claim 1, characterized in that: The searching based on the vector data includes: Use natural language processing technology to extract key information from the search information entered by the user; Converting the key information into a query vector; A semantic similarity search is performed based on the query vector to determine vector data that is most similar to the query vector, and a change record corresponding to the vector data is determined.
6. A device for optimizing file version management and retrieval based on a large language model, characterized in that: include: An extraction unit, used for extracting change difference data generated when a file is changed; A generating unit, configured to generate a change record by analyzing the change difference data using a large language model; A conversion unit, used for converting the change record into vector data and storing the vector data; A retrieval unit is used to perform retrieval based on the vector data.
7. A computer-readable storage medium, characterized in that: The storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 5.
8. An electronic device, characterized in that: include: Memory and processor; The memory is used to store computer instructions; The processor is used to call the computer instructions stored in the memory so that the electronic device executes the method as described in any one of claims 1-5.
Citation Information
Cited By
Data index intelligent management system based on large language model
CN121501875A