Parallel optimization method for hydroelectric power generation equipment knowledge multi-mode large model
By adopting a parallel optimization method of multimodal large model in the field of hydropower, the problem of inconvenience in the query of hydropower knowledge in the existing technology is solved, and intelligent knowledge recommendation and query services are realized, providing a foundation for the intelligent construction of hydropower stations.
Patent Information
- Application Number
- CN202411668104.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing hydropower knowledge query technology is not convenient to use, lacks the ability to access and recommend recommendations online, and requires the help of a browser to realize related functions, and the structure is fixed, making it difficult to quickly query and recommend knowledge of hydropower equipment.
The parallel optimization method of multimodal large model of hydropower equipment knowledge is adopted. By collecting multimodal data, LORA fine-tuning large model combined with optimization algorithm is used to adjust and train parameters to form an optimal model, and the inference interface is used to realize user question-and-answer usage.
It realizes intelligent recommendation and query of hydropower knowledge, combines multiple data sources of hydropower plant equipment, and provides convenient knowledge Q&A services to assist hydropower plant production and employment, providing a foundation for the intelligent construction of hydropower plant.
Smart Images

Figure CN119623950A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hydropower generation based on artificial intelligence and computer big data, and in particular to a parallel optimization method for a large multi-modal model of hydropower generation equipment knowledge. Background Art
[0002] In China, the hydropower industry has a long history of development and has accumulated rich experience and technology. The development and utilization of major rivers such as the Yangtze River and the Yellow River have laid a solid foundation for the development of hydropower in China. Most of the existing hydropower knowledge query technologies are traditional knowledge question-and-answer assistants. These knowledge question-and-answer assistants have a fixed structure and need to be flipped through like e-books, which is very inconvenient. They do not have the ability to consult recommendations online and need to use a browser to implement related functions. Summary of the invention
[0003] In order to solve the existing problems, the present invention provides a parallel optimization method for a large multi-modal model of hydropower equipment knowledge. The specific scheme is as follows:
[0004] A parallel optimization method for a large multi-modal model of hydropower equipment knowledge comprises the following steps:
[0005] S1, collects multimodal data and uses it as input for the LORA fine-tuning large model;
[0006] S2, adjust the parameters in the LORA fine-tuning large model through the optimization algorithm and perform optimization calculations;
[0007] S3, feeds multi-modal data to the LORA fine-tuning large model based on the improved LLAMA3 structure and trains it, and adjusts the parameters of the mode switching algorithm through the LORA technology combined with the optimization algorithm to form the optimal model;
[0008] S4, uses the reasoning interface to allow users to use it in a question-and-answer style, that is, the user inputs image or text data and asks corresponding questions, and the static model infers the output results and displays them in the window output.
[0009] Preferably, the multimodal data includes retrieval knowledge, equipment manuals, maintenance reports, national standards, group documents, on-site pictures, and meeting minutes.
[0010] Preferably, the parameters in the LORA fine-tuning large model in step S2 include: R rank parameter, alaph shrinkage factor, and Dropout parameter; after adjustment and parallel optimization calculation, the optimal R rank, alaph shrinkage factor, and Dropout parameter are obtained.
[0011] Preferably, when training text data, the optimization algorithm of step S2 selects the PSOGSA algorithm, and the update formula of the PSOGSA algorithm is as follows:
[0012]
[0013] Among them, C1 and C2 are constants in the interval (0, 1), r i1 and r i2 is a normal number, and is the velocity of particle i at time t+1 and time t in k-dimensional space, is the acceleration of particle i at time t in k-dimensional space, is the global optimal solution of particle i in the k-dimensional space within the first t time, and is the position of particle i at time t+1 and time t in the k-dimensional space.
[0014] When training visual and audio data, the artificial fish swarm algorithm is selected for parameter training and optimization.
[0015] Preferably, the steps of implementing the artificial fish swarm algorithm include:
[0016] S1', initialization settings, including population size N, initial position of each artificial fish, visual field Visual of artificial fish, step size step, crowding factor δ, and number of repetitions Trynumber;
[0017] S2', calculate the fitness value of each individual in the initial fish group, take the optimal artificial fish state and its value and assign it to the bulletin board;
[0018] S3', evaluate each individual and select the behavior to be performed, including foraging Pary, Swarm, Follow and evaluation behavior Bulletin;
[0019] S4', executes the behavior of the artificial fish, updates itself, and generates a new school of fish;
[0020] S5', evaluate all individuals, if an individual is better than the billboard, update the billboard to that individual;
[0021] S6', when the optimal solution on the bulletin board reaches the satisfactory error limit or reaches the upper limit of the number of iterations, the algorithm ends, otherwise it returns to S3'.
[0022] Preferably, the structural improvement of LLAMA3 in step S3 is to replace the MLP layer structure with a recursive neural network GRU fused MLP structure, so as to improve the network's temporal learning ability.
[0023] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. After the computer program is run, any of the above methods is executed.
[0024] The present invention also discloses a computer system, including a processor and a storage medium, wherein a computer program is stored on the storage medium, and the processor reads and runs the computer program from the storage medium to execute any of the methods described above.
[0025] The beneficial effects of the present invention are:
[0026] The present invention combines the large-scale model of hydropower knowledge recommendation technology to solve the problem of difficult manual query to a certain extent. The technology combines various equipment of hydropower stations, such as turbine generator sets, speed control equipment, hydraulic devices, hydraulic control valves, water pumps, compressors, air compressors, water injection equipment, etc., equipment maintenance reports, equipment manuals, and national standards, industry standards, group standards, enterprise standards, industry equipment knowledge, Internet search knowledge, group enterprise internal documents, etc. to recommend knowledge questions and answers, which can well assist the production and employment of hydropower stations and provide power and foundation for the intelligent construction of hydropower stations. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 It is the original LLAMA3 structure diagram in the embodiment of the present invention;
[0029] Figure 2 It is a structural diagram of improved LLAMA3 in an embodiment of the present invention;
[0030] Figure 3 It is a schematic diagram of the process of an embodiment of the present invention;
[0031] Figure 4 It is the automatic switching flow chart of PSOGSA algorithm and artificial fish swarm algorithm. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments 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.
[0033] Example:
[0034] A parallel optimization method for a large multi-modal model of hydropower equipment knowledge comprises the following steps:
[0035] S1, collect multimodal data, store, manage and govern it, and use it as input for the LORA fine-tuning large model; the multimodal data is used as a data source, including retrieval knowledge, equipment manuals, maintenance reports, national standards, group documents, on-site pictures, meeting minutes and other data.
[0036] S2, adjust the parameters in the LORA fine-tuning large model through the optimization algorithm and perform optimization calculations.
[0037] like Figure 3 and Figure 4 As shown in the figure, the PSOGSA algorithm and the artificial fish swarm algorithm are used to adjust the R rank parameter, alaph shrinkage factor, and Dropout in the LORA fine-tuning large model and optimize the calculation in parallel. The goal is to obtain the optimal R rank, alaph shrinkage factor, and Dropout parameters, and save the optimized model. When training text data, the PSOGSA algorithm is used to optimize the parameters, and when training visual and audio data, the artificial fish swarm algorithm is used to optimize the parameters. Use data to feed the large model and combine it with the multimodal optimization algorithm to fine-tune it. The goal is to train the optimal model and use the inference interface to allow users to use it in a question-and-answer style.
[0038] (I) When training text data, the optimization algorithm of step S2 selects the PSOGSA algorithm. PSOGSA is used to adjust the R rank parameter, alaph shrinkage factor, and Dropout in the LORA fine-tuning large model and optimize the calculation in parallel, aiming to obtain the optimal R rank, alaph shrinkage factor, and Dropout parameter.
[0039] The advantage of the PSOGSA algorithm is that it combines the characteristics of the PSO algorithm and the GSA algorithm. In the PSO algorithm, the global optimal solution is found by simulating the movement of particles in the search space, while the GSA algorithm relies on simulating gravity to find the global optimal solution. The PSOGSA algorithm improves and integrates these two methods, giving full play to the global search characteristics of the PSO algorithm and the local search characteristics of the GSA algorithm.
[0040] The update formula of the PSOGSA algorithm is as follows:
[0041]
[0042] Among them, C1 and C2 are constants in the interval (0, 1), r i1 and r i2 is a normal number, and is the velocity of particle i at time t+1 and time t in k-dimensional space, is the acceleration of particle i at time t in k-dimensional space, is the global optimal solution of particle i in the k-dimensional space within the first t time, and is the position of particle i at time t+1 and time t in the k-dimensional space.
[0043] (II) When training video, image, and audio data, select the artificial fish swarm algorithm for parameter training optimization. The artificial fish swarm is used to adjust the R rank parameter, alaph shrinkage factor, and Dropout in the LORA fine-tuning model under image data and optimize the calculation in parallel, aiming to obtain the optimal R rank, alaph shrinkage factor, and Dropout parameter.
[0044] Specifically, the steps of implementing the artificial fish swarm algorithm include:
[0045] S1', initialization settings, including population size N, initial position of each artificial fish, visual field Visual of artificial fish, step size step, crowding factor δ, and number of repetitions Trynumber;
[0046] S2', calculate the fitness value of each individual in the initial fish group, take the optimal artificial fish state and its value and assign it to the bulletin board;
[0047] S3', evaluate each individual and select the behavior to be performed, including foraging Pary, Swarm, Follow and evaluation behavior Bulletin;
[0048] S4', executes the behavior of the artificial fish, updates itself, and generates a new school of fish;
[0049] S5', evaluate all individuals, if an individual is better than the billboard, update the billboard to that individual;
[0050] S6', when the optimal solution on the bulletin board reaches the satisfactory error limit or reaches the upper limit of the number of iterations, the algorithm ends, otherwise it returns to S3'.
[0051] S3 feeds multimodal data to the LORA fine-tuned large model based on the improved LLAMA3 structure and trains it. The LORA technology is combined with the optimization algorithm to adjust the parameters of the mode switching algorithm to form the optimal model.
[0052] Specifically, Figure 1 and Figure 2. The structural improvement of LLAMA3 is to replace the MLP layer structure with a recursive neural network GRU fused MLP structure to improve the network's temporal learning ability. During the fine-tuning process, the weights of the changed structure are first set to 0, and then the weights of this part are updated using fine-tuning. The LoRA model is a lightweight fine-tuning technology that adapts to specific tasks by injecting low-rank matrices into large pre-trained models. It not only retains the generalization ability of the original model, but also significantly reduces the computing resources and data required for fine-tuning. By reducing the number of parameters and the amount of calculation, the training efficiency and generation quality are improved, which is particularly suitable for scenarios that require rapid customization of large language models or image generation models.
[0053] LLAMA3 improves large models such as Figure 2 By inputting pictures and picture annotation texts into the LLAMA3 improved large model, training is performed using multiple graphics cards on the server, and the optimization module is used to adjust the R rank parameter, alaph shrinkage factor, and Dropout in the trained LORA algorithm and perform parallel optimization calculations, with the goal of obtaining the optimal R rank, alaph shrinkage factor, Dropout parameter, and optimal LLAMA3 improved large model.
[0054] S4, uses the reasoning interface to allow users to use it in a question-and-answer style, that is, the user inputs graphic data and asks corresponding questions, and the static model infers the output results and displays them in the window output.
[0055] The user inputs "Introduction to turbine equipment knowledge", and the static model reasoning outputs the result "A turbine is a power machine that converts the energy of water flow into rotational mechanical energy. It belongs to turbine machinery among fluid machinery. As early as around 100 BC, the prototype of a turbine appeared in China - a water wheel, which was used for irrigation and driving grain processing equipment. Most modern turbines are installed in hydropower stations to drive generators to generate electricity. In a hydropower station, water from an upstream reservoir is led to the turbine through a water diversion pipe, which drives the turbine runner to rotate and drives the generator to generate electricity. The water that has done work is discharged downstream through the tailwater pipe. The higher the water head and the greater the flow rate, the greater the output power of the turbine." The result is fed back to the window output.
[0056] The present invention combines the large-scale model of hydropower knowledge recommendation technology to solve the problem of difficult manual query to a certain extent. The technology combines various equipment of hydropower stations, such as turbine generator sets, speed control equipment, hydraulic devices, hydraulic control valves, water pumps, compressors, air compressors, water injection equipment, etc., equipment maintenance reports, equipment manuals, and national standards, industry standards, group standards, enterprise standards, industry equipment knowledge, Internet search knowledge, group enterprise internal documents, etc. to recommend knowledge questions and answers, which can well assist the production and employment of hydropower stations and provide power and foundation for the intelligent construction of hydropower stations.
[0057] The present invention also discloses a computer-readable storage medium and a computer system. The computer-readable storage medium stores a computer program, and after the computer program is run, the method described in any one of the above items is executed. The computer system includes a processor and a storage medium, and the storage medium stores a computer program. The processor reads and runs the computer program from the storage medium to execute the method described in any one of the above items.
[0058] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or a combination of the two. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. The technician may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention.
[0059] The various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in cooperation with a DSP core, or any other such configuration.
[0060] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read and write information from / to the storage medium. In an alternative, a storage medium may be integrated into a processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in a user terminal as discrete components.
[0061] In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented as a computer program product in software, each function may be stored on or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include both computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one place to another. Storage media may be any available medium that can be accessed by a computer. As an example and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer. Any connection is also properly referred to as a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wherein disk often reproduces data magnetically, while disc reproduces data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0062] The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but should be granted the widest scope consistent with the principles and novel features disclosed herein.
[0063] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A parallel optimization method for a large multi-modal model of hydropower equipment knowledge, characterized in that: The following steps are involved: S1, collects multimodal data and uses it as input for the LORA fine-tuning large model; S2, adjust the parameters in the LORA fine-tuning large model through the optimization algorithm and perform optimization calculations; S3, feeds multi-modal data to the LORA fine-tuning large model based on the improved LLAMA3 structure and trains it, and adjusts the parameters of the mode switching algorithm through the LORA technology combined with the optimization algorithm to form the optimal model; S4, uses the reasoning interface to allow users to use it in a question-and-answer style, that is, the user inputs image or text data and asks corresponding questions, and the static model infers the output results and displays them in the window output.
2. The method according to claim 1, characterized in that: The multimodal data includes retrieval knowledge, equipment manuals, maintenance reports, national standards, group documents, on-site pictures, and meeting minutes.
3. The method according to claim 1, characterized in that The parameters in the LORA fine-tuning large model in step S2 include: R rank parameter, alaph shrinkage factor, and Dropout parameter; after adjustment and parallel optimization calculation, the optimal R rank, alaph shrinkage factor, and Dropout parameter are obtained.
4. The method according to claim 1, characterized in that: When training text data, the optimization algorithm of step S2 selects the PSOGSA algorithm, and the update formula of the PSOGSA algorithm is as follows: Among them, C1 and C2 are constants in the interval (0, 1), r i1 and r i2 is a positive constant, and is the velocity of particle i at time t+1 and time t in k-dimensional space, is the acceleration of particle i at time t in k-dimensional space, is the global optimal solution of particle i in the k-dimensional space within the first t time, and is the position of particle i at time t+1 and time t in k-dimensional space; CWhen training visual and audio data, select the artificial fish swarm algorithm for parameter training optimization.
5. The method according to claim 5, characterized in that: The steps of implementing the artificial fish swarm algorithm include: S1', initialization settings, including population size N, initial position of each artificial fish, visual field Visual of artificial fish, step size step, crowding factor δ, and number of repetitions Trynumber; S2', calculate the fitness value of each individual in the initial fish group, take the optimal artificial fish state and its value and assign it to the bulletin board; S3', evaluate each individual and select the behavior to be performed, including foraging Pary, Swarm, Follow and evaluation behavior Bulletin; S4', executes the behavior of the artificial fish, updates itself, and generates a new school of fish; S5', evaluate all individuals, if an individual is better than the billboard, update the billboard to that individual; S6', when the optimal solution on the bulletin board reaches the satisfactory error limit or reaches the upper limit of the number of iterations, the algorithm ends, otherwise it returns to S3'.
6. The method according to claim 1, characterized in that: The structural improvement of LLAMA3 in step S3 is to replace the MLP layer structure with a recursive neural network GRU fused with MLP structure to improve the network's temporal learning ability.
7. A computer-readable storage medium, characterized in that: A computer program is stored on the medium, and after the computer program is run, the method according to any one of claims 1 to 6 is executed.
8. A computer system, characterized in that: The method comprises a processor and a storage medium, wherein a computer program is stored in the storage medium, and the processor reads and runs the computer program from the storage medium to execute the method as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Audio feature selection method for anti-noise SVM classifier
CN109192196A
RGB-D camera calibration method based on PSO-GSA algorithm
CN117173250A
Fine adjustment method, system and equipment based on large language model and medium
CN117290480A
Construction method of industrial intelligent question and answer knowledge base based on artificial intelligence large model
CN117828034A
Multi-modal large model training optimization method and device in electric power vertical field
CN118643470A