CN117787105B - Tunnel surrounding rock grading method, device, equipment and readable storage medium - Google Patents

Tunnel surrounding rock grading method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN117787105B
CN117787105B CN202410024202.3A CN202410024202A CN117787105B CN 117787105 B CN117787105 B CN 117787105B CN 202410024202 A CN202410024202 A CN 202410024202A CN 117787105 B CN117787105 B CN 117787105B
Authority
CN
China
Prior art keywords
target
sparrow
surrounding rock
unit
fitness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410024202.3A
Other languages
Chinese (zh)
Other versions
CN117787105A (en
Inventor
富海鹰
王志豪
赵炎炎
张洪滔
余康鑫
周洋立
严子勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southwest Jiaotong University
Original Assignee
Southwest Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southwest Jiaotong University filed Critical Southwest Jiaotong University
Priority to CN202410024202.3A priority Critical patent/CN117787105B/en
Publication of CN117787105A publication Critical patent/CN117787105A/en
Application granted granted Critical
Publication of CN117787105B publication Critical patent/CN117787105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a method, a device, equipment and a readable storage medium for grading tunnel surrounding rocks, which relate to the technical field of surrounding rock prediction and comprise the steps of acquiring historical surrounding rock data of target surrounding rocks in a historical time period; initializing the sparrow population position based on chaotic mapping to obtain a plurality of initial position parameters; constructing a model based on the initial position parameters to obtain an initial prediction model; training an initial prediction model based on historical surrounding rock data and a sparrow algorithm to obtain a target classification model; inputting real-time surrounding rock data of the target surrounding rock into the target grading model to obtain a real-time surrounding rock grading result of the target surrounding rock. According to the invention, parameters in the convolutional neural network are optimized through the sparrow search algorithm, so that the method can be more quickly and better adapted to the judgment of various working condition models, and a self-adaptive chaotic mapping is adopted, so that a correction step factor is established, the convergence speed of the sparrow search algorithm is improved, and the training efficiency of the model is greatly improved.

Description

一种隧道围岩分级方法、装置、设备及可读存储介质A tunnel surrounding rock classification method, device, equipment and readable storage medium

技术领域Technical Field

本发明涉及围岩预测技术领域,具体而言,涉及隧道围岩分级方法、装置、设备及可读存储介质。The present invention relates to the technical field of surrounding rock prediction, and in particular to a tunnel surrounding rock classification method, device, equipment and a readable storage medium.

背景技术Background technique

目前的岩体分级方法都是基于以往的工程经验发展起来的,对结构抗力、耐久性和可维护性没有做区分,更不能提供设计的可靠度,因此不能满足现代设计规范的要求。Current rock mass classification methods are developed based on previous engineering experience. They do not differentiate between structural resistance, durability and maintainability, and cannot provide design reliability. Therefore, they cannot meet the requirements of modern design specifications.

发明内容Summary of the invention

本发明的目的在于提供一种隧道围岩分级方法、装置、设备及可读存储介质,以改善上述问题。为了实现上述目的,本发明采取的技术方案如下:The purpose of the present invention is to provide a tunnel surrounding rock classification method, device, equipment and readable storage medium to improve the above problems. In order to achieve the above purpose, the technical solution adopted by the present invention is as follows:

第一方面,本申请提供了一种隧道围岩分级方法,包括:In a first aspect, the present application provides a tunnel surrounding rock classification method, comprising:

获取历史时间段内目标围岩的历史围岩数据;Obtain historical surrounding rock data of target surrounding rock within a historical time period;

基于混沌映射对麻雀种群位置初始化,获得多个初始位置参数;Initialize the position of the sparrow population based on chaotic mapping to obtain multiple initial position parameters;

基于所述初始位置参数构建模型,得到初始预测模型;Building a model based on the initial position parameters to obtain an initial prediction model;

基于所述历史围岩数据和麻雀算法对所述初始预测模型进行训练,得到目标分级模型;The initial prediction model is trained based on the historical surrounding rock data and the Sparrow algorithm to obtain a target classification model;

将所述目标围岩的实时围岩数据输入所述目标分级模型中,得到所述目标围岩的实时围岩分级结果。The real-time surrounding rock data of the target surrounding rock is input into the target classification model to obtain the real-time surrounding rock classification result of the target surrounding rock.

第二方面,本申请还提供了一种隧道围岩分级装置,包括:In a second aspect, the present application also provides a tunnel surrounding rock grading device, comprising:

第一获取单元,用于获取历史时间段内目标围岩的历史围岩数据;A first acquisition unit is used to acquire historical surrounding rock data of target surrounding rock in a historical time period;

初始化单元,用于基于混沌映射对麻雀种群位置初始化,获得多个初始位置参数;An initialization unit, used for initializing the position of the sparrow population based on chaotic mapping to obtain a plurality of initial position parameters;

构建单元,用于基于所述初始位置参数构建模型,得到初始预测模型;A construction unit, used to construct a model based on the initial position parameters to obtain an initial prediction model;

训练单元,用于所述历史围岩数据和麻雀算法对所述初始预测模型进行训练,得到目标分级模型;A training unit, used for training the initial prediction model using the historical surrounding rock data and the Sparrow algorithm to obtain a target classification model;

输入单元,用于将所述目标围岩的实时围岩数据输入所述目标分级模型中,得到所述目标围岩的实时围岩分级结果。The input unit is used to input the real-time surrounding rock data of the target surrounding rock into the target classification model to obtain the real-time surrounding rock classification result of the target surrounding rock.

第三方面,本申请还提供了一种隧道围岩分级设备,包括:In a third aspect, the present application also provides a tunnel surrounding rock grading device, comprising:

存储器,用于存储计算机程序;Memory for storing computer programs;

处理器,用于执行所述计算机程序时实现所述隧道围岩分级方法的步骤。A processor is used to implement the steps of the tunnel surrounding rock classification method when executing the computer program.

第四方面,本申请还提供了一种可读存储介质,所述可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述基于隧道围岩分级方法的步骤。In a fourth aspect, the present application further provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned tunnel surrounding rock classification method are implemented.

本发明的有益效果为:The beneficial effects of the present invention are:

本发明通过麻雀搜索算法对卷积神经网络中的参数进行优化,可以更快更好的适应各种工况模型的判别,并且采用自适应混沌映射,建立了修正步长因子,提高麻雀搜索算法的收敛速度,从而大大提高了模型的训练效率。The present invention optimizes the parameters in the convolutional neural network through the sparrow search algorithm, which can adapt to the discrimination of various working condition models faster and better, and adopts adaptive chaotic mapping to establish a modified step size factor to improve the convergence speed of the sparrow search algorithm, thereby greatly improving the training efficiency of the model.

本发明的其他特征和优点将在随后的说明书阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明实施例了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

图1为本发明实施例中所述的隧道围岩分级方法流程示意图;Figure 1 is a schematic diagram of a tunnel surrounding rock classification method according to an embodiment of the present invention;

图2为本发明实施例中所述的参数映射图;FIG2 is a parameter mapping diagram described in an embodiment of the present invention;

图3为本发明实施例中所述的隧道围岩分级装置结构示意图;FIG3 is a schematic structural diagram of a tunnel surrounding rock classification device according to an embodiment of the present invention;

图4为本发明实施例中所述的隧道围岩分级设备结构示意图。FIG. 4 is a schematic diagram of the structure of the tunnel surrounding rock grading equipment described in an embodiment of the present invention.

图中标记:Markings in the figure:

10000、第一获取单元;20000、初始化单元;30000、构建单元;40000、训练单元;50000、输入单元;20100、第二获取单元;20200、第一计算单元;20300、第二计算单元;20400、第三计算单元;20500、第四计算单元;20600、重复单元;20700、第五计算单元;40100、第一确定单元;40200、划分单元;40300、第一更新单元;40400、第三获取单元;40500、第六计算单元;40600、第七计算单元;40700、第八计算单元;40800、第九计算单元;40900、第二确定单元;41000、第四获取单元;41100、第二更新单元;41200、第三更新单元;41300、调整单元;40301、第三确定单元;40302、第一比较单元;40303、第五获取单元;40304、第十计算单元;40305、第一带入单元;40306、第十一计算单元;40307、第六获取单元;40308、第四确定单元;40309、第二比较单元;40310、第十二计算单元;40311、第二带入单元;40312、第七获取单元;40313、第十三计算单元;40314、第三带入单元;40901、第八获取单元;40902、第九获取单元;40903、第五确定单元;40904、第十四计算单元;40905、第十五计算单元;10000, first acquisition unit; 20000, initialization unit; 30000, construction unit; 40000, training unit; 50000, input unit; 20100, second acquisition unit; 20200, first calculation unit; 20300, second calculation unit; 20400, third calculation unit; 20500, fourth calculation unit; 20600, repetition unit; 20700, fifth calculation unit; 40100, first determination unit; 40200, division unit; 40300, first update unit; 40400, third acquisition unit; 40500, sixth calculation unit; 40600, seventh calculation unit; 40700, eighth calculation unit; 40800, ninth calculation unit; 40900, second determination unit; 41000, fourth acquisition unit; 41100, The second updating unit; 41200, the third updating unit; 41300, the adjusting unit; 40301, the third determining unit; 40302, the first comparing unit; 40303, the fifth acquiring unit; 40304, the tenth calculating unit; 40305, the first bringing-in unit; 40306, the eleventh calculating unit; 40307, the sixth acquiring unit; 40308, the fourth determining unit; 40309, the second comparing unit; 40310, the twelfth calculating unit; 40311, the second bringing-in unit; 40312, the seventh acquiring unit; 40313, the thirteenth calculating unit; 40314, the third bringing-in unit; 40901, the eighth acquiring unit; 40902, the ninth acquiring unit; 40903, the fifth determining unit; 40904, the fourteenth calculating unit; 40905, the fifteenth calculating unit;

800、隧道围岩分级设备;801、处理器;802、存储器;803、多媒体组件;804、I/O接口;805、通信组件。800, tunnel surrounding rock grading equipment; 801, processor; 802, memory; 803, multimedia component; 804, I/O interface; 805, communication component.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions 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, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本发明的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

实施例1:Embodiment 1:

本实施例提供了一种隧道围岩分级方法。This embodiment provides a tunnel surrounding rock classification method.

参见图1,图中示出了本方法包括步骤S10000、步骤S20000、步骤S30000、步骤S40000和步骤S50000。Referring to FIG. 1 , it is shown that the method includes step S10000 , step S20000 , step S30000 , step S40000 , and step S50000 .

步骤S10000.获取历史时间段内目标围岩的历史围岩数据;Step S10000. Obtain historical surrounding rock data of target surrounding rock within a historical time period;

具体的,收集整理隧道围岩分级设计数据库,包括不同地区隧道围岩的工程地质条件即地形地貌、地层岩性、地质构造、气象水文条件、地应力场等和围岩定性指标即岩石坚硬程度、岩体完整程度、嵌合程度、岩体结构、节理风化状况、地下水状况和地应力状况等。Specifically, the database of tunnel surrounding rock classification design is collected and organized, including the engineering geological conditions of tunnel surrounding rock in different regions, namely topography, stratum lithology, geological structure, meteorological and hydrological conditions, geostress field, etc., and qualitative indicators of surrounding rock, namely rock hardness, rock integrity, degree of interlocking, rock structure, joint weathering conditions, groundwater conditions and geostress conditions, etc.

步骤S20000.基于混沌映射对麻雀种群位置初始化,获得多个初始位置参数;Step S20000. Initialize the position of the sparrow population based on chaotic mapping to obtain multiple initial position parameters;

具体的,采用混沌映射对麻雀种群初始化,能够在一定范围内对麻雀种群的状态进行不重复遍历,可使麻雀种群相对均匀地分布在整个搜索空间,既增加了麻雀初始种群的多样性,也避免了麻雀算法搜索过程中陷入局部最优的状况。Specifically, use The chaotic mapping is used to initialize the sparrow population, which can traverse the state of the sparrow population without repetition within a certain range, and can make the sparrow population relatively evenly distributed in the entire search space, which not only increases the diversity of the initial sparrow population, but also avoids falling into the local optimal state during the search process of the sparrow algorithm.

具体的,步骤S20000具体包括:Specifically, step S20000 includes:

步骤S20100.获取任一麻雀的随机位置参数和混沌控制参数,初始位置位于第一设定范围内,混沌控制参数位于第二设定范围内;Step S20100. Obtain random position parameters and chaos control parameters of any sparrow, the initial position is within a first set range, and the chaos control parameters are within a second set range;

步骤S20200.第一计算操作:计算初始位置与第一设定阈值的乘积,作为第一乘积;Step S20200. First calculation operation: calculating the product of the initial position and the first set threshold as the first product;

步骤S20300.第二计算操作:计算第一乘积的正弦函数值,作为第一数值;Step S20300. Second calculation operation: Calculate the sine function value of the first product as the first value;

步骤S20400.第三计算操作:计算混沌控制参数与第二设定阈值的比值,作为第一比值;Step S20400. A third calculation operation: calculating a ratio of the chaos control parameter to a second set threshold as a first ratio;

步骤S20500.第四计算操作:计算第一数值与第一比值的乘积,作为第二乘积;Step S20500. Fourth calculation operation: calculating the product of the first value and the first ratio as the second product;

步骤S20600.重复第一计算操作、第二计算操作、第三计算操作和第四计算操作,直到达到预设重复次数,得到目标位置参数;Step S20600. Repeat the first calculation operation, the second calculation operation, the third calculation operation and the fourth calculation operation until a preset number of repetitions is reached to obtain the target position parameter;

步骤S20700.计算所有麻雀所对应的目标位置参数,得到麻雀种群的多个初始位置参数;Step S20700. Calculate the target position parameters corresponding to all sparrows to obtain multiple initial position parameters of the sparrow population;

具体的,混沌映射数学表达式为:Specifically, the mathematical expression of chaos mapping is:

;其中,/>为麻雀/>的第/>次的混沌值;/>为麻雀/>的第次的混沌值,取值范围为/>;/>为混沌系统控制参数,取值范围为/> ; Among them, /> For sparrows/> The first/> The chaos value of this time; /> For sparrows/> First The chaos value of this time ranges from/> ; /> is the control parameter of the chaotic system, and its value range is/> ;

本实施例中采用对每个参数映射两千次后的混沌值作为麻雀的初始位置参数,如图2所示,为混沌映射两千次迭代后的参数映射图。In this embodiment, the chaotic value after mapping each parameter 2,000 times is used as the initial position parameter of the sparrow, as shown in FIG2 , which is a parameter mapping diagram after 2,000 iterations of chaotic mapping.

步骤S30000.基于初始位置参数构建模型,得到初始预测模型;Step S30000. Build a model based on the initial position parameters to obtain an initial prediction model;

具体的,使用麻雀算法的初始位置参数初始化模型,这些初始化的位置参数将成为模型的初始预测。Specifically, the model is initialized using the initial position parameters of the Sparrow algorithm, and these initialized position parameters will become the initial predictions of the model.

步骤S40000.基于历史围岩数据和麻雀算法对初始预测模型进行训练,得到目标分级模型;Step S40000. Train the initial prediction model based on historical surrounding rock data and the Sparrow algorithm to obtain a target classification model;

具体的,步骤S40000具体包括:Specifically, step S40000 includes:

步骤S40100.基于所有麻雀的初始位置参数,确定出所有麻雀的初始适应度;Step S40100. Based on the initial position parameters of all sparrows, determine the initial fitness of all sparrows;

具体的,假设麻雀种群个体数量为,每个麻雀个体作为/>维解空间中的一个解,麻雀种群的适应度为:Specifically, assuming that the number of individuals in the sparrow population is , each sparrow individual as/> A solution in the dimensional solution space, the fitness of the sparrow population is:

;

其中,为麻雀种群的适应度;/>为种群中麻雀/>在第/>维空间的位置;为麻雀/>的个体适应度。in, is the fitness of the sparrow population; /> For the sparrows in the population/> In the /> The position of the dimensional space; For sparrows/> individual fitness.

步骤S40200.划分操作:基于初始适应度将所有麻雀划分为发现者、跟随者和警戒者;Step S40200. Division operation: divide all sparrows into discoverers, followers and guards based on initial fitness;

步骤S40300.更新操作:基于预设的目标公式更新所有麻雀的初始位置参数,得到多个更新位置参数;Step S40300. Update operation: Update the initial position parameters of all sparrows based on a preset target formula to obtain multiple updated position parameters;

具体的,步骤S40300具体包括:Specifically, step S40300 includes:

步骤S40301.基于所有初始适应度,确定出当前预警值;Step S40301. Based on all initial fitness, determine the current warning value;

步骤S40302.将当前预警值与预设的警戒预警值进行比较,得到第一比较结果;Step S40302. Compare the current warning value with the preset alert warning value to obtain a first comparison result;

步骤S40303.当第一比较结果满足第一设定条件时,获取发现者的上限约束、发现者的下限约束、第一最优麻雀位置参数、第一最差麻雀位置参数、常数因子和第一迭代次数;Step S40303. When the first comparison result satisfies the first set condition, obtain the finder's upper limit constraint, the finder's lower limit constraint, the first optimal sparrow position parameter, the first worst sparrow position parameter, the constant factor and the first iteration number;

步骤S40304.基于上限约束、下限约束、第一最优麻雀位置参数、第一最差麻雀位置参数、常数因子和第一迭代次数,计算得到自适应权重;Step S40304. Based on the upper limit constraint, the lower limit constraint, the first optimal sparrow position parameter, the first worst sparrow position parameter, the constant factor and the first iteration number, calculate the adaptive weight;

步骤S40305.将自适应权重带入预设的第一目标公式中,计算得到发现者更新后的更新位置参数;Step S40305. Substitute the adaptive weight into the preset first target formula to calculate the updated position parameter after the finder updates;

步骤S40306.当第一比较结果满足第二设定条件时,基于预设的第二目标公式计算得到发现者更新后的更新位置参数;Step S40306. When the first comparison result satisfies the second set condition, the updated position parameter after the finder is updated is calculated based on the preset second target formula;

具体的,全局搜索过于依赖发现者的位置,借鉴鲸鱼优化算法中迭代寻优的螺旋式上升搜索方式,引入自适应权重因子,使得麻雀算法中发现者在位置更新后探索下一次区域时,前期以较大步长搜索,后期进行小步长收敛探索,麻雀发现者的位置迭代公式如下所示:Specifically, the global search is too dependent on the position of the discoverer. By referring to the spiral upward search method of iterative optimization in the whale optimization algorithm, an adaptive weight factor is introduced, so that when the discoverer in the sparrow algorithm explores the next area after the position is updated, it searches with a larger step size in the early stage and conducts a small step size convergence exploration in the later stage. The position iteration formula of the sparrow discoverer is as follows:

;

;

其中,为第/>次迭代后种群中麻雀/>的第/>维位置;/>为第T次迭代后种群中麻雀/>的第j维位置;/>为自适应权重因子;/>为种群最大迭代次数;/>为均匀随机数,取值范围为/>;/>为预警值,取值范围为/>;/>为警戒阈值,取值范围为/>;/>为服从正态分布的随机数;/>为1行d列的矩阵;/>为第/>次迭代后种群中麻雀/>的最差位置;/>为第/>次迭代后种群中麻雀/>的最优位置;/>和/>为常数因子;/>为麻雀/>的上限约束;/>为麻雀/>的下限约束;in, For the first/> After iterations, the number of sparrows in the population/> The first/> Dimensional position; /> is the number of sparrows in the population after the Tth iteration/> The j-th dimension position of; /> is the adaptive weight factor; /> is the maximum number of iterations of the population; /> is a uniform random number, ranging from/> ; /> is the warning value, the value range is/> ; /> is the warning threshold, the value range is/> ; /> is a random number that follows a normal distribution; /> is a matrix with 1 row and d columns; /> For the first/> After iterations, the number of sparrows in the population/> The worst position of For the first/> After iterations, the number of sparrows in the population/> The optimal position of and/> is a constant factor; /> For sparrows/> The upper limit constraint of For sparrows/> The lower limit constraint of

时,表示预警值小于安全值,此时觅食环境中没有捕食者,发现者可以进行广泛搜索操作;当/>时,意味着种群中有部分麻雀已经发现捕食者,并向种群中的其他麻雀发出预警,所有麻雀都需要飞往安全区域进行觅食。when When , it means that the warning value is less than the safety value. At this time, there are no predators in the foraging environment, and the discoverer can perform extensive search operations; when /> When the predator is detected, it means that some sparrows in the population have already discovered the predator and have issued an early warning to other sparrows in the population. All sparrows need to fly to a safe area to forage for food.

本申请实施例中,麻雀跟随者位置更新如下;In the embodiment of the present application, the position of the sparrow follower is updated as follows;

;

其中,为第/>次迭代后种群中麻雀/>的第/>维位置;/>为第/>次迭代后种群中最差麻雀的位置;/>为第/>次迭代后种群中麻雀/>的第/>维位置;/>为服从正态分布的随机数;/>为第/>次迭代后种群中麻雀/>的位置;/>为均匀随机数,取值范围为/>;/>为空间维度;/>为第/>次迭代后种群中麻雀/>的第/>维位置;/>为麻雀种群的个体数量为;in, For the first/> After iterations, the number of sparrows in the population/> The first/> Dimensional position; /> For the first/> The position of the worst sparrow in the population after iterations; /> For the first/> After iterations, the number of sparrows in the population/> The first/> Dimensional position; /> is a random number that follows a normal distribution; /> For the first/> After iterations, the number of sparrows in the population/> Location; /> is a uniform random number, ranging from/> ; /> is the spatial dimension; /> For the first/> After iterations, the number of sparrows in the population/> The first/> Dimensional position; /> The number of individuals in the sparrow population is;

时,表明第i个跟随者没有获得食物,处于饥饿状态,此时需要飞往其他地方进行觅食,以获得更多的能量;当/>时,这表明第/>个跟随者可以获得食物,不需要飞往其他地方进行觅食就可以获得能量。when When , it indicates that the i-th follower has not obtained food and is in a hungry state. At this time, it needs to fly to other places to forage for more energy; when /> This indicates that the Each follower can obtain food and gain energy without having to fly to other places to forage.

步骤S40307.获取第二迭代次数;Step S40307. Obtain the second iteration number;

步骤S40308.基于所有初始适应度,确定出最优适应度和最差适应度;Step S40308. Based on all initial fitnesses, determine the best fitness and the worst fitness;

步骤S40309.将警戒者的适应度与最优适应度进行比较,获得第二比较结果;Step S40309. Compare the fitness of the alerter with the optimal fitness to obtain a second comparison result;

步骤S40310.当第二比较结果满足第三设定条件时,基于最优适应度、最差适应度、初始位置参数和第二迭代次数,计算得到步长控制参数;Step S40310. When the second comparison result satisfies the third setting condition, the step size control parameter is calculated based on the best fitness, the worst fitness, the initial position parameter and the second iteration number;

步骤S40311.将步长控制参数带入预设的第三目标公式中,计算得到警戒者更新后的更新位置参数;Step S40311. Substitute the step length control parameter into the preset third target formula to calculate the updated position parameter of the sentinel after the update;

步骤S40312.当第二比较结果满足第四设定条件时,获取第一随机因子;Step S40312. When the second comparison result satisfies the fourth setting condition, obtain the first random factor;

步骤S40313.基于最优适应度、最差适应度、初始位置参数、第一随机因子和第二迭代次数,计算得到初始参数;Step S40313. Calculate the initial parameters based on the best fitness, the worst fitness, the initial position parameters, the first random factor and the second iteration number;

步骤S40314.将初始参数带入预设的第四目标公式中,计算得到警戒者更新后的更新位置参数;Step S40314. Substitute the initial parameters into the preset fourth target formula to calculate the updated position parameters of the sentinel after the update;

具体的,为了提高麻雀算法的收敛速度和精度,修正了步长因子和/>,步长因子修正公式为:Specifically, in order to improve the convergence speed and accuracy of the sparrow algorithm, the step size factor is modified and/> , the step factor correction formula is:

;

;

其中,为当前种群最优麻雀的适应度;/>为当前种群最差麻雀的适应度;/>为当前迭代次数;/>为初始化参数;/>为均匀分布的随机因子;in, is the fitness of the best sparrow in the current population; /> is the fitness of the worst sparrow in the current population; /> is the current iteration number; /> For initialization parameters; /> is a uniformly distributed random factor;

麻雀警戒者的位置更新公式为:The position update formula of the sparrow sentinel is:

;

其中,为第/>次迭代后种群中麻雀/>的第/>维位置;/>为第T次迭代后种群中麻雀/>的第/>维位置;/>为第/>次迭代后种群中最优麻雀的位置;/>为第/>次迭代后种群中最差麻雀的位置;/>为麻雀/>的个体适应度;/>为当前种群中最差麻雀的适应度;为当前种群中最优麻雀的适应度;/>为防止分母为零的最小常数;/>和/>为步长因子,/>的取值范围为/>in, For the first/> After iterations, the number of sparrows in the population/> The first/> Dimensional position; /> is the number of sparrows in the population after the Tth iteration/> The first/> Dimensional position; /> For the first/> The position of the best sparrow in the population after iterations; /> For the first/> The position of the worst sparrow in the population after iterations; /> For sparrows/> Individual fitness; /> is the fitness of the worst sparrow in the current population; is the fitness of the best sparrow in the current population; /> The minimum constant to prevent the denominator from being zero; /> and/> is the step size factor, /> The value range is /> ;

时,表示此时麻雀处于种群边缘,极易受到捕食者的攻击;当/>时,表示处于种群中间的麻雀也受到了危险,此时需要靠近其他麻雀以减少被捕食的风险。when When , it means that the sparrows are at the edge of the population and are very vulnerable to predators; when /> , it means that the sparrows in the middle of the population are also in danger and need to get closer to other sparrows to reduce the risk of being preyed upon.

步骤S40400.第一获取操作:获取最大变异率、最小变异率、当前迭代次数和最大迭代次数;Step S40400. First acquisition operation: acquiring the maximum mutation rate, the minimum mutation rate, the current number of iterations and the maximum number of iterations;

步骤S40500.第五计算操作:计算最大变异率和最小变异率的差值,作为第一差值;Step S40500. Fifth calculation operation: Calculate the difference between the maximum mutation rate and the minimum mutation rate as the first difference;

步骤S40600.第六计算操作:计算当前迭代次数与最大迭代次数的比值,作为第二比值;Step S40600. Sixth calculation operation: calculate the ratio of the current number of iterations to the maximum number of iterations as the second ratio;

步骤S40700.第七计算操作:计算第三设定阈值与第二比值的差值,作为第二差值;Step S40700. Seventh calculation operation: Calculate the difference between the third set threshold and the second ratio as the second difference;

步骤S40800.第八计算操作:计算第二差值的四次方,并与第一差值的乘积,得到目标变异率;Step S40800. Eighth calculation operation: Calculate the fourth power of the second difference and multiply it by the first difference to obtain the target mutation rate;

具体的,变异操作可以扩大麻雀种群的搜索空间,但并非让每个麻雀个体在每次迭代中都执行该操作,需要通过变异率来确定,变异率计算公式为:Specifically, the mutation operation can expand the search space of the sparrow population, but it does not require every sparrow individual to perform this operation in each iteration. It needs to be determined by the mutation rate. The mutation rate calculation formula is:

;

其中,为变异率;/>为预先设定的最大变异率;/>为预先设定的最小变异率;/>为麻雀种群的个体数量;/>为种群最大迭代次数。in, is the mutation rate; /> is the preset maximum mutation rate; /> is the preset minimum mutation rate;/> is the number of individuals in the sparrow population; /> is the maximum number of iterations of the population.

步骤S40900.确定操作:基于目标变异率确定出目标麻雀,并基于预设的第一公式更新并替换更新位置参数,得到目标位置参数;Step S40900. Determine operation: determine the target sparrow based on the target mutation rate, and update and replace the update position parameter based on the preset first formula to obtain the target position parameter;

具体的,步骤S40900具体包括:Specifically, step S40900 includes:

步骤S40901.获取第二随机因子;Step S40901. Obtain a second random factor;

步骤S40902.获取所有麻雀的搜索范围,得到多个范围参数;Step S40902. Obtain the search range of all sparrows and obtain multiple range parameters;

步骤S40903.从多个范围参数中确定出最小值,作为目标范围参数;Step S40903. Determine a minimum value from multiple range parameters as a target range parameter;

步骤S40904.计算目标范围参数与第二随机因子的乘积,作为第三乘积;Step S40904. Calculate the product of the target range parameter and the second random factor as the third product;

步骤S40905.计算第三乘积与目标麻雀的更新位置参数之和,得到目标位置参数。Step S40905. Calculate the sum of the third product and the updated position parameter of the target sparrow to obtain the target position parameter.

步骤S40905.计算第三乘积与目标麻雀的更新位置参数之和,得到目标位置参数。Step S40905. Calculate the sum of the third product and the updated position parameter of the target sparrow to obtain the target position parameter.

具体的,为了防止麻雀过早聚类,融入位置扰动变异因子,计算公式为:Specifically, in order to prevent sparrows from clustering too early, the position disturbance variation factor is incorporated, and the calculation formula is:

;

;

其中,为第/>次迭代后种群中麻雀/>的第/>维位置;/>为第/>次迭代后种群中麻雀/>的第/>维位置;/>为变异因子;/>为均匀分布的随机因子;/>为第/>个麻雀个体的搜索范围;/>为取小函数。in, For the first/> After iterations, the number of sparrows in the population/> The first/> Dimensional position; /> For the first/> After iterations, the number of sparrows in the population/> The first/> Dimensional position; /> is the variation factor; /> is a uniformly distributed random factor; /> For the first/> The search range of each sparrow individual; /> To take the small function.

本申请实施例中,为了提高麻雀算法的优化能力和跳出局部最优问题,引进高斯-柯西变异,达到置换麻雀算法中的参数变量达到优化算法的目的,本申请结合高斯分布和柯西分布的优点,考虑不同搜索阶段的变异需求,设计高斯-柯西变异机制,方便保留较好适应度位置的麻雀个体,进入下一次迭代,表达式如下:In the embodiment of the present application, in order to improve the optimization ability of the sparrow algorithm and escape the local optimal problem, the Gaussian-Cauchy mutation is introduced to achieve the purpose of optimizing the algorithm by replacing the parameter variables in the sparrow algorithm. The present application combines the advantages of Gaussian distribution and Cauchy distribution, considers the mutation requirements of different search stages, and designs a Gaussian-Cauchy mutation mechanism to facilitate the retention of sparrow individuals with better fitness positions and enter the next iteration. The expression is as follows:

;

;

其中,为适应度较好的麻雀个体变异后的位置;/>为当前种群中适应度较好的麻雀个体位置;/>和/>为随迭代次数自适应调整的动态参数;/>为满足柯西分布的随机变量;/>为满足高斯分布的随机变量;/>为种群最大迭代次数;/>为当前迭代次数。in, is the position of the sparrow with better fitness after mutation;/> is the position of the sparrow individual with better fitness in the current population;/> and/> It is a dynamic parameter that is adaptively adjusted with the number of iterations;/> is a random variable that satisfies the Cauchy distribution; /> is a random variable that satisfies Gaussian distribution; /> is the maximum number of iterations of the population; /> is the current iteration number.

步骤S41000.第二获取操作:获取警戒者的数量,作为目标数量;Step S41000. Second acquisition operation: acquiring the number of alerters as the target number;

步骤S41100.当目标数量大于预设的警戒者最小值时,基于预设的第二公式更新警戒者数量,并重复划分操作至第二获取操作;Step S41100. When the target number is greater than the preset minimum value of the alerters, the number of alerters is updated based on the preset second formula, and the division operation is repeated to the second acquisition operation;

步骤S41200.当目标数量不大于警戒者最小值时,基于更新位置参数和目标位置参数,确定出目标最优麻雀,并确定出目标最优麻雀的目标最优位置参数和目标最优适应度;Step S41200. When the number of targets is not greater than the minimum value of the alerter, the target optimal sparrow is determined based on the updated position parameter and the target position parameter, and the target optimal position parameter and the target optimal fitness of the target optimal sparrow are determined;

步骤S41300.基于历史围岩数据、目标最优位置参数和目标最优适应度调整初始预测模型,得到目标分级模型;Step S41300. Adjust the initial prediction model based on historical surrounding rock data, target optimal position parameters and target optimal fitness to obtain a target classification model;

具体的,通过判定警戒者的比例来确定更新后最优种群的位置,警戒者的数量较多有利于算法进行全局搜索,较少则利于加快收敛并在小范围内进行局部搜索,可以在算法的前期赋予种群较高的警戒者比例,增强种群的全局搜索能力,随着种群迭代次数的增加逐渐降低警戒者比例,加快算法收敛速度。Specifically, the position of the optimal population after update is determined by judging the proportion of alerts. A larger number of alerts is conducive to the global search of the algorithm, while a smaller number is conducive to accelerating convergence and performing local search in a small range. A higher proportion of alerts can be given to the population in the early stage of the algorithm to enhance the global search ability of the population. As the number of population iterations increases, the proportion of alerts can be gradually reduced to accelerate the convergence of the algorithm.

警戒者比例更新公式为:The formula for updating the proportion of vigilant is:

;

其中,为警戒者比例;/>为警戒者初始比例;/>为当前迭代次数;/>为种群最大迭代次数;/>为预设的警戒者比例最小值;in, The proportion of alert people; /> is the initial ratio of alerters;/> is the current iteration number; /> is the maximum number of iterations of the population; /> It is the preset minimum value of the ratio of alerters;

时,继续进行麻雀位置更新迭代操作直到满足条件为止;当/>时,满足条件结束迭代,从全局中获得最优位置和最佳适应度值,确定出卷积神经网络的最优权值和阈值,将最优权值和阈值传回卷积神经网络重新进行训练,获得目标分级模型。when When , continue to iterate the sparrow position update operation until the condition is met; when /> When , the conditions are met to end the iteration, obtain the optimal position and the best fitness value from the global, determine the optimal weights and thresholds of the convolutional neural network, and pass the optimal weights and thresholds back to the convolutional neural network for retraining to obtain the target classification model.

步骤S50000.将目标围岩的实时围岩数据输入目标分级模型中,得到目标围岩的实时围岩分级结果;Step S50000. Input the real-time surrounding rock data of the target surrounding rock into the target classification model to obtain the real-time surrounding rock classification result of the target surrounding rock;

具体的,在围岩分级预测中,预测结果包括对围岩级别的确定,从而使得工作人员能够实时掌握隧道的围岩状况,并对围岩级别进行及时调整,在满足设计要求的同时,通过智能方案比选,从大量设计参数中选出最优方案,从而实现隧道围岩分级工作的信息化作业,大大节约了建造成本,符合我国绿色可持续发展理念。Specifically, in the surrounding rock classification prediction, the prediction results include the determination of the surrounding rock level, so that the staff can grasp the surrounding rock conditions of the tunnel in real time and make timely adjustments to the surrounding rock level. While meeting the design requirements, through intelligent scheme comparison, the optimal scheme is selected from a large number of design parameters, thereby realizing the informatization of tunnel surrounding rock classification work, greatly saving construction costs, and complying with my country's green and sustainable development concept.

实施例2:Embodiment 2:

如图3所示,本实施例提供了一种隧道围岩分级装置,装置包括:As shown in FIG3 , this embodiment provides a tunnel surrounding rock classification device, the device comprising:

第一获取单元10000,用于获取历史时间段内目标围岩的历史围岩数据;The first acquisition unit 10000 is used to acquire historical surrounding rock data of target surrounding rock in a historical time period;

初始化单元20000,用于基于混沌映射对麻雀种群位置初始化,获得多个初始位置参数;An initialization unit 20000 is used to initialize the position of the sparrow population based on chaotic mapping to obtain a plurality of initial position parameters;

构建单元30000,用于基于初始位置参数构建模型,得到初始预测模型;A construction unit 30000 is used to construct a model based on the initial position parameters to obtain an initial prediction model;

训练单元40000,用于历史围岩数据和麻雀算法对初始预测模型进行训练,得到目标分级模型;The training unit 40000 is used to train the initial prediction model using historical surrounding rock data and the Sparrow algorithm to obtain a target classification model;

输入单元50000,用于将目标围岩的实时围岩数据输入目标分级模型中,得到目标围岩的实时围岩分级结果。The input unit 50000 is used to input the real-time surrounding rock data of the target surrounding rock into the target classification model to obtain the real-time surrounding rock classification result of the target surrounding rock.

在本申请公开的一种具体实施方式中,初始化单元20000包括:In a specific implementation disclosed in the present application, the initialization unit 20000 includes:

第二获取单元20100,用于获取任一麻雀的随机位置参数和混沌控制参数,初始位置位于第一设定范围内,混沌控制参数位于第二设定范围内;The second acquisition unit 20100 is used to acquire the random position parameter and chaos control parameter of any sparrow, the initial position is within the first setting range, and the chaos control parameter is within the second setting range;

第一计算单元20200,用于第一计算操作:计算初始位置与第一设定阈值的乘积,作为第一乘积;The first calculation unit 20200 is used for a first calculation operation: calculating the product of the initial position and the first set threshold as a first product;

第二计算单元20300,用于第二计算操作:计算第一乘积的正弦函数值,作为第一数值;The second calculation unit 20300 is used for a second calculation operation: calculating a sine function value of the first product as a first value;

第三计算单元20400,用于第三计算操作:计算混沌控制参数与第二设定阈值的比值,作为第一比值;The third calculation unit 20400 is used for a third calculation operation: calculating a ratio of the chaos control parameter to a second set threshold as a first ratio;

第四计算单元20500,用于第四计算操作:计算第一数值与第一比值的乘积,作为第二乘积;A fourth calculation unit 20500 is configured to perform a fourth calculation operation: calculating a product of the first value and the first ratio as a second product;

重复单元20600,用于重复第一计算操作、第二计算操作、第三计算操作和第四计算操作,直到达到预设重复次数,得到目标位置参数;A repeating unit 20600 is used to repeat the first calculation operation, the second calculation operation, the third calculation operation and the fourth calculation operation until a preset number of repetitions is reached to obtain a target position parameter;

第五计算单元20700,用于计算所有麻雀所对应的目标位置参数,得到麻雀种群的多个初始位置参数。The fifth calculating unit 20700 is used to calculate the target position parameters corresponding to all sparrows to obtain a plurality of initial position parameters of the sparrow population.

在本申请公开的一种具体实施方式中,训练单元40000包括:In a specific implementation manner disclosed in the present application, the training unit 40000 includes:

第一确定单元40100,用于基于所有麻雀的初始位置参数,确定出所有麻雀的初始适应度;The first determining unit 40100 is used to determine the initial fitness of all sparrows based on the initial position parameters of all sparrows;

划分单元40200,用于划分操作:基于初始适应度将所有麻雀划分为发现者、跟随者和警戒者;A division unit 40200 is used for a division operation: dividing all sparrows into discoverers, followers and guards based on initial fitness;

第一更新单元40300,用于更新操作:基于预设的目标公式更新所有麻雀的初始位置参数,得到多个更新位置参数;The first updating unit 40300 is used for the updating operation: updating the initial position parameters of all sparrows based on a preset target formula to obtain a plurality of updated position parameters;

第三获取单元40400,用于第一获取操作:获取最大变异率、最小变异率、当前迭代次数和最大迭代次数;The third acquisition unit 40400 is used for the first acquisition operation: acquiring the maximum mutation rate, the minimum mutation rate, the current number of iterations and the maximum number of iterations;

第六计算单元40500,用于第五计算操作:计算最大变异率和最小变异率的差值,作为第一差值;The sixth calculation unit 40500 is used for a fifth calculation operation: calculating a difference between the maximum mutation rate and the minimum mutation rate as a first difference;

第七计算单元40600,用于第六计算操作:计算当前迭代次数与最大迭代次数的比值,作为第二比值;A seventh calculation unit 40600, configured for a sixth calculation operation: calculating a ratio of a current number of iterations to a maximum number of iterations as a second ratio;

第八计算单元40700,用于第七计算操作:计算第三设定阈值与第二比值的差值,作为第二差值;An eighth calculation unit 40700 is configured to perform a seventh calculation operation: calculating a difference between a third set threshold and a second ratio as a second difference;

第九计算单元40800,用于第八计算操作:计算第二差值的四次方,并与第一差值的乘积,得到目标变异率;A ninth calculation unit 40800 is used for an eighth calculation operation: calculating the fourth power of the second difference and multiplying the fourth power of the second difference by the first difference to obtain a target mutation rate;

第二确定单元40900,用于确定操作:基于目标变异率确定出目标麻雀,并基于预设的第一公式更新并替换更新位置参数,得到目标位置参数;The second determination unit 40900 is used for determining the operation: determining the target sparrow based on the target mutation rate, and updating and replacing the update position parameter based on the preset first formula to obtain the target position parameter;

第四获取单元41000,用于第二获取操作:获取警戒者的数量,作为目标数量;The fourth acquisition unit 41000 is used for the second acquisition operation: acquiring the number of alerters as the target number;

第二更新单元41100,用于当目标数量大于预设的警戒者最小值时,基于预设的第二公式更新警戒者数量,并重复划分操作至第二获取操作;A second updating unit 41100 is used to update the number of alerters based on a preset second formula when the number of targets is greater than a preset minimum number of alerters, and to repeat the division operation to the second acquisition operation;

第三更新单元41200,用于当目标数量不大于警戒者最小值时,基于更新位置参数和目标位置参数,确定出目标最优麻雀,并确定出目标最优麻雀的目标最优位置参数和目标最优适应度;The third updating unit 41200 is used to determine the target optimal sparrow based on the update position parameter and the target position parameter when the target number is not greater than the minimum value of the alerter, and determine the target optimal position parameter and the target optimal fitness of the target optimal sparrow;

调整单元41300,用于基于历史围岩数据、目标最优位置参数和目标最优适应度调整初始预测模型,得到目标分级模型。The adjustment unit 41300 is used to adjust the initial prediction model based on historical surrounding rock data, target optimal position parameters and target optimal fitness to obtain a target classification model.

在本申请公开的一种具体实施方式中,第一更新单元40300包括:In a specific implementation manner disclosed in the present application, the first updating unit 40300 includes:

第三确定单元40301,用于基于所有初始适应度,确定出当前预警值;The third determining unit 40301 is used to determine the current warning value based on all initial fitness levels;

第一比较单元40302,用于将当前预警值与预设的警戒预警值进行比较,得到第一比较结果;The first comparison unit 40302 is used to compare the current warning value with the preset alert warning value to obtain a first comparison result;

第五获取单元40303,用于当第一比较结果满足第一设定条件时,获取发现者的上限约束、发现者的下限约束、第一最优麻雀位置参数、第一最差麻雀位置参数、常数因子和第一迭代次数;A fifth acquisition unit 40303 is used to acquire the upper limit constraint of the finder, the lower limit constraint of the finder, the first optimal sparrow position parameter, the first worst sparrow position parameter, the constant factor and the first iteration number when the first comparison result satisfies the first set condition;

第十计算单元40304,用于基于上限约束、下限约束、第一最优麻雀位置参数、第一最差麻雀位置参数、常数因子和第一迭代次数,计算得到自适应权重;A tenth calculation unit 40304 is used to calculate the adaptive weight based on the upper limit constraint, the lower limit constraint, the first optimal sparrow position parameter, the first worst sparrow position parameter, the constant factor and the first iteration number;

第一带入单元40305,用于将自适应权重带入预设的第一目标公式中,计算得到发现者更新后的更新位置参数;The first input unit 40305 is used to input the adaptive weight into the preset first target formula to calculate the updated position parameter after the finder updates;

第十一计算单元40306,用于当第一比较结果满足第二设定条件时,基于预设的第二目标公式计算得到发现者更新后的更新位置参数。The eleventh calculation unit 40306 is used to calculate the updated position parameter after the finder updates based on the preset second target formula when the first comparison result satisfies the second set condition.

在本申请公开的一种具体实施方式中,第一更新单元40300还包括:In a specific implementation manner disclosed in the present application, the first updating unit 40300 further includes:

第六获取单元40307,用于获取第二迭代次数;A sixth obtaining unit 40307, used to obtain a second iteration number;

第四确定单元40308,用于基于所有初始适应度,确定出最优适应度和最差适应度;The fourth determining unit 40308 is used to determine the best fitness and the worst fitness based on all the initial fitnesses;

第二比较单元40309,用于将警戒者的适应度与最优适应度进行比较,获得第二比较结果;The second comparison unit 40309 is used to compare the fitness of the alerter with the optimal fitness to obtain a second comparison result;

第十二计算单元40310,用于当第二比较结果满足第三设定条件时,基于最优适应度、最差适应度、初始位置参数和第二迭代次数,计算得到步长控制参数;A twelfth calculation unit 40310 is used to calculate a step size control parameter based on the best fitness, the worst fitness, the initial position parameter and the second iteration number when the second comparison result satisfies the third setting condition;

第二带入单元40311,用于将步长控制参数带入预设的第三目标公式中,计算得到警戒者更新后的更新位置参数;The second input unit 40311 is used to input the step length control parameter into the preset third target formula to calculate the updated position parameter of the sentinel after the update;

第七获取单元40312,用于当第二比较结果满足第四设定条件时,获取第一随机因子;A seventh acquisition unit 40312, configured to acquire a first random factor when the second comparison result satisfies a fourth setting condition;

第十三计算单元40313,用于基于最优适应度、最差适应度、初始位置参数、第一随机因子和第二迭代次数,计算得到初始参数;A thirteenth calculating unit 40313 is used to calculate the initial parameters based on the best fitness, the worst fitness, the initial position parameter, the first random factor and the second iteration number;

第三带入单元40314,用于将初始参数带入预设的第四目标公式中,计算得到警戒者更新后的更新位置参数。The third input unit 40314 is used to input the initial parameters into the preset fourth target formula to calculate the updated position parameters of the sentinel after the update.

在本申请公开的一种具体实施方式中,第二确定单元40900包括:In a specific implementation manner disclosed in the present application, the second determining unit 40900 includes:

第八获取单元40901,用于获取第二随机因子;An eighth obtaining unit 40901, configured to obtain a second random factor;

第九获取单元40902,用于获取所有麻雀的搜索范围,得到多个范围参数;The ninth acquisition unit 40902 is used to acquire the search range of all sparrows and obtain multiple range parameters;

第五确定单元40903,用于从多个范围参数中确定出最小值,作为目标范围参数;A fifth determining unit 40903, configured to determine a minimum value from the multiple range parameters as a target range parameter;

第十四计算单元40904,用于计算目标范围参数与第二随机因子的乘积,作为第三乘积;A fourteenth calculation unit 40904, used to calculate the product of the target range parameter and the second random factor as a third product;

第十五计算单元40905,用于计算第三乘积与目标麻雀的更新位置参数之和,得到目标位置参数。The fifteenth calculating unit 40905 is used to calculate the sum of the third product and the updated position parameter of the target sparrow to obtain the target position parameter.

需要说明的是,关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。It should be noted that, regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

实施例3:Embodiment 3:

相应于上面的方法实施例,本实施例中还提供了一种隧道围岩分级设备,下文描述的一种隧道围岩分级设备与上文描述的一种隧道围岩分级方法可相互对应参照。Corresponding to the above method embodiment, this embodiment further provides a tunnel surrounding rock grading device, and the tunnel surrounding rock grading device described below and the tunnel surrounding rock grading method described above can correspond to each other.

图4是根据示例性实施例示出的一种隧道围岩分级设备800的框图。如图4所示,该隧道围岩分级设备800可以包括:处理器801,存储器802。该隧道围岩分级设备800还可以包括多媒体组件803, I/O接口804,以及通信组件805中的一者或多者。Fig. 4 is a block diagram of a tunnel surrounding rock classification device 800 according to an exemplary embodiment. As shown in Fig. 4, the tunnel surrounding rock classification device 800 may include: a processor 801, a memory 802. The tunnel surrounding rock classification device 800 may also include one or more of a multimedia component 803, an I/O interface 804, and a communication component 805.

其中,处理器801用于控制该隧道围岩分级设备800的整体操作,以完成上述的隧道围岩分级方法中的全部或部分步骤。存储器802用于存储各种类型的数据以支持在该隧道围岩分级设备800的操作,这些数据例如可以包括用于在该隧道围岩分级设备800上操作的任何应用程序或方法的指令,以及应用程序相关的数据,例如联系人数据、收发的消息、图片、音频、视频等等。该存储器802可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(Static Random Access Memory,简称SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,简称EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,简称EPROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),只读存储器(Read-Only Memory,简称ROM),磁存储器,快闪存储器,磁盘或光盘。多媒体组件803可以包括屏幕和音频组件。其中屏幕例如可以是触摸屏,音频组件用于输出和/或输入音频信号。例如,音频组件可以包括一个麦克风,麦克风用于接收外部音频信号。所接收的音频信号可以被进一步存储在存储器802或通过通信组件805发送。音频组件还包括至少一个扬声器,用于输出音频信号。I/O接口804为处理器801和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚拟按钮或者实体按钮。通信组件805用于该隧道围岩分级设备800与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near FieldCommunication,简称NFC),2G、3G或4G,或它们中的一种或几种的组合,因此相应的该通信组件805可以包括:Wi-Fi模块,蓝牙模块,NFC模块。The processor 801 is used to control the overall operation of the tunnel surrounding rock classification device 800 to complete all or part of the steps in the tunnel surrounding rock classification method described above. The memory 802 is used to store various types of data to support the operation of the tunnel surrounding rock classification device 800, and these data may include, for example, instructions for any application or method used to operate on the tunnel surrounding rock classification device 800, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and/or input audio signals. For example, the audio component may include a microphone, which is used to receive external audio signals. The received audio signal may be further stored in the memory 802 or sent through the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I/O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the tunnel surrounding rock grading device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 may include: Wi-Fi module, Bluetooth module, NFC module.

在一示例性实施例中,隧道围岩分级设备800可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,简称ASIC)、数字信号处理器(DigitalSignal Processor,简称DSP)、数字信号处理设备(Digital Signal ProcessingDevice,简称DSPD)、可编程逻辑器件(Programmable Logic Device,简称PLD)、现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述的隧道围岩分级方法。In an exemplary embodiment, the tunnel surrounding rock grading device 800 can be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), digital signal processors (Digital Signal Processor, referred to as DSP), digital signal processing devices (Digital Signal Processing Device, referred to as DSPD), programmable logic devices (Programmable Logic Device, referred to as PLD), field programmable gate arrays (Field Programmable Gate Array, referred to as FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned tunnel surrounding rock grading method.

在另一示例性实施例中,还提供了一种包括程序指令的计算机可读存储介质,该程序指令被处理器执行时实现上述的隧道围岩分级方法的步骤。例如,该计算机可读存储介质可以为上述包括程序指令的存储器802,上述程序指令可由隧道围岩分级设备800的处理器801执行以完成上述的隧道围岩分级方法。In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the tunnel surrounding rock classification method described above are implemented. For example, the computer-readable storage medium may be the memory 802 including the program instructions, and the program instructions may be executed by the processor 801 of the tunnel surrounding rock classification device 800 to complete the tunnel surrounding rock classification method described above.

实施例4:Embodiment 4:

相应于上面的方法实施例,本实施例中还提供了一种可读存储介质,下文描述的一种可读存储介质与上文描述的一种隧道围岩分级方法可相互对应参照。Corresponding to the above method embodiment, a readable storage medium is also provided in this embodiment. The readable storage medium described below and the tunnel surrounding rock classification method described above can be referred to each other.

一种可读存储介质,可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述方法实施例的隧道围岩分级方法的步骤。A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the tunnel surrounding rock classification method of the above method embodiment are implemented.

该可读存储介质具体可以为U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可存储程序代码的可读存储介质。The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (8)

1.一种隧道围岩分级方法,其特征在于,包括:1. A tunnel surrounding rock classification method, characterized by comprising: 获取历史时间段内目标围岩的历史围岩数据;Obtain historical surrounding rock data of target surrounding rock within a historical time period; 基于混沌映射对麻雀种群位置初始化,获得多个初始位置参数;Initialize the position of the sparrow population based on chaotic mapping to obtain multiple initial position parameters; 基于所述初始位置参数构建模型,得到初始预测模型;Building a model based on the initial position parameters to obtain an initial prediction model; 基于所述历史围岩数据和麻雀算法对所述初始预测模型进行训练,得到目标分级模型;The initial prediction model is trained based on the historical surrounding rock data and the Sparrow algorithm to obtain a target classification model; 将所述目标围岩的实时围岩数据输入所述目标分级模型中,得到所述目标围岩的实时围岩分级结果;Inputting the real-time surrounding rock data of the target surrounding rock into the target classification model to obtain the real-time surrounding rock classification result of the target surrounding rock; 其中,基于所述历史围岩数据和麻雀算法对所述初始预测模型进行训练,得到目标分级模型,包括:The initial prediction model is trained based on the historical surrounding rock data and the sparrow algorithm to obtain a target classification model, including: 基于所有麻雀的所述初始位置参数,确定出所有麻雀的初始适应度;Based on the initial position parameters of all sparrows, determining the initial fitness of all sparrows; 划分操作:基于所述初始适应度将所有麻雀划分为发现者、跟随者和警戒者;Division operation: dividing all sparrows into discoverers, followers and guards based on the initial fitness; 更新操作:基于预设的目标公式更新所有麻雀的初始位置参数,得到多个更新位置参数;Update operation: Update the initial position parameters of all sparrows based on the preset target formula to obtain multiple updated position parameters; 第一获取操作:获取最大变异率、最小变异率、当前迭代次数和最大迭代次数;The first acquisition operation: obtaining the maximum mutation rate, the minimum mutation rate, the current number of iterations and the maximum number of iterations; 第五计算操作:计算所述最大变异率和所述最小变异率的差值,作为第一差值;A fifth calculation operation: calculating a difference between the maximum mutation rate and the minimum mutation rate as a first difference; 第六计算操作:计算所述当前迭代次数与所述最大迭代次数的比值,作为第二比值;Sixth calculation operation: calculating a ratio of the current number of iterations to the maximum number of iterations as a second ratio; 第七计算操作:计算第三设定阈值与所述第二比值的差值,作为第二差值;A seventh calculation operation: calculating a difference between a third set threshold and the second ratio as a second difference; 第八计算操作:计算所述第二差值的四次方,并与所述第一差值的乘积,得到目标变异率;An eighth calculation operation: calculating the fourth power of the second difference and multiplying the fourth power by the first difference to obtain a target mutation rate; 确定操作:基于所述目标变异率确定出目标麻雀,并基于预设的第一公式更新并替换所述更新位置参数,得到目标位置参数;Determine operation: determine the target sparrow based on the target mutation rate, and update and replace the update position parameter based on a preset first formula to obtain the target position parameter; 第二获取操作:获取所述警戒者的数量,作为目标数量;The second acquisition operation: acquiring the number of the alerters as the target number; 当所述目标数量大于预设的警戒者最小值时,基于预设的第二公式更新所述警戒者数量,并重复所述划分操作至所述第二获取操作;When the target number is greater than a preset minimum number of alerters, updating the number of alerters based on a preset second formula, and repeating the division operation to the second acquisition operation; 当所述目标数量不大于所述警戒者最小值时,基于所述更新位置参数和所述目标位置参数,确定出目标最优麻雀,并确定出所述目标最优麻雀的目标最优位置参数和目标最优适应度;When the number of targets is not greater than the minimum value of the alerters, determining the target optimal sparrow based on the updated position parameter and the target position parameter, and determining the target optimal position parameter and target optimal fitness of the target optimal sparrow; 基于所述历史围岩数据、所述目标最优位置参数和所述目标最优适应度调整所述初始预测模型,得到所述目标分级模型;Adjust the initial prediction model based on the historical surrounding rock data, the target optimal position parameters and the target optimal fitness to obtain the target classification model; 其中,更新操作:基于预设的目标公式更新所有麻雀的初始位置参数,得到多个更新位置参数,包括:Among them, the update operation: based on the preset target formula, the initial position parameters of all sparrows are updated to obtain multiple updated position parameters, including: 获取第二迭代次数;Get the second iteration number; 基于所有初始适应度,确定出最优适应度和最差适应度;Based on all initial fitness, determine the best fitness and the worst fitness; 将所述警戒者的适应度与所述最优适应度进行比较,获得第二比较结果;Comparing the fitness of the sentinel with the optimal fitness to obtain a second comparison result; 当所述第二比较结果满足第三设定条件时,基于所述最优适应度、所述最差适应度、所述初始位置参数和所述第二迭代次数,计算得到步长控制参数;When the second comparison result satisfies a third setting condition, a step size control parameter is calculated based on the optimal fitness, the worst fitness, the initial position parameter and the second iteration number; 将所述步长控制参数带入预设的第三目标公式中,计算得到所述警戒者更新后的所述更新位置参数;Substituting the step length control parameter into a preset third target formula, and calculating the updated position parameter of the sentinel after the update; 当所述第二比较结果满足第四设定条件时,获取第一随机因子;When the second comparison result satisfies a fourth set condition, obtaining a first random factor; 基于所述最优适应度、所述最差适应度、所述初始位置参数、所述第一随机因子和所述第二迭代次数,计算得到初始参数;Calculate and obtain initial parameters based on the optimal fitness, the worst fitness, the initial position parameter, the first random factor, and the second number of iterations; 将所述初始参数带入预设的第四目标公式中,计算得到所述警戒者更新后的所述更新位置参数;Substituting the initial parameters into the preset fourth target formula, and calculating the updated position parameters of the alerter after the update; 其中,所述第四目标公式为:Wherein, the fourth objective formula is: 其中,为第T+1次迭代后种群中麻雀i的第j维位置;/>为第T次迭代后种群中麻雀i的第j维位置;/>为第T次迭代后种群中最优麻雀的位置;/>为第T次迭代后种群中最差麻雀的位置;fi为麻雀i的个体适应度;fw为当前种群中最差麻雀的适应度;fg为当前种群中最优麻雀的适应度;ε为防止分母为零的最小常数;t为当前迭代次数;Si为初始化参数;rand为均匀分布的随机因子;/>和B为步长因子,B的取值范围为[0,1]。in, is the j-th position of sparrow i in the population after the T+1th iteration;/> is the j-th position of sparrow i in the population after the T-th iteration;/> is the position of the best sparrow in the population after the Tth iteration;/> is the position of the worst sparrow in the population after the Tth iteration; fi is the individual fitness of sparrow i; fw is the fitness of the worst sparrow in the current population; fg is the fitness of the best sparrow in the current population; ε is the minimum constant to prevent the denominator from being zero; t is the current number of iterations; Si is the initialization parameter; rand is a uniformly distributed random factor; /> and B are step factors, and the value range of B is [0, 1]. 2.根据权利要求1所述的隧道围岩分级方法,其特征在于,基于混沌映射对麻雀种群位置初始化,获得多个初始位置参数,包括:2. The tunnel surrounding rock classification method according to claim 1 is characterized in that the position of the sparrow population is initialized based on chaotic mapping to obtain multiple initial position parameters, including: 获取任一麻雀的随机位置参数和混沌控制参数,所述初始位置位于第一设定范围内,所述混沌控制参数位于第二设定范围内;Obtaining a random position parameter and a chaos control parameter of any sparrow, wherein the initial position is within a first setting range, and the chaos control parameter is within a second setting range; 第一计算操作:计算所述初始位置与第一设定阈值的乘积,作为第一乘积;First calculation operation: calculating the product of the initial position and a first set threshold as a first product; 第二计算操作:计算所述第一乘积的正弦函数值,作为第一数值;A second calculation operation: calculating a sine function value of the first product as a first value; 第三计算操作:计算所述混沌控制参数与第二设定阈值的比值,作为第一比值;A third calculation operation: calculating a ratio of the chaos control parameter to a second set threshold as a first ratio; 第四计算操作:计算所述第一数值与所述第一比值的乘积,作为第二乘积;Fourth calculation operation: calculating the product of the first value and the first ratio as a second product; 重复所述第一计算操作、所述第二计算操作、所述第三计算操作和所述第四计算操作,直到达到预设重复次数,得到目标位置参数;Repeating the first calculation operation, the second calculation operation, the third calculation operation and the fourth calculation operation until a preset number of repetitions is reached to obtain a target position parameter; 计算所有麻雀所对应的目标位置参数,得到所述麻雀种群的多个初始位置参数。Calculate the target position parameters corresponding to all sparrows to obtain a plurality of initial position parameters of the sparrow population. 3.根据权利要求1所述的隧道围岩分级方法,其特征在于,更新操作,基于预设的目标公式更新所有麻雀的初始位置参数,得到多个更新位置参数,包括:3. The tunnel surrounding rock classification method according to claim 1 is characterized in that the updating operation updates the initial position parameters of all sparrows based on a preset target formula to obtain multiple updated position parameters, including: 基于所有初始适应度,确定出当前预警值;Based on all initial fitness, determine the current warning value; 将所述当前预警值与预设的警戒预警值进行比较,得到第一比较结果;Comparing the current warning value with a preset alert warning value to obtain a first comparison result; 当所述第一比较结果满足第一设定条件时,获取所述发现者的上限约束、所述发现者的下限约束、第一最优麻雀位置参数、第一最差麻雀位置参数、常数因子和第一迭代次数;When the first comparison result satisfies the first set condition, obtaining the upper limit constraint of the finder, the lower limit constraint of the finder, the first optimal sparrow position parameter, the first worst sparrow position parameter, the constant factor and the first number of iterations; 基于所述上限约束、所述下限约束、所述第一最优麻雀位置参数、所述第一最差麻雀位置参数、所述常数因子和所述第一迭代次数,计算得到自适应权重;Calculate an adaptive weight based on the upper limit constraint, the lower limit constraint, the first optimal sparrow position parameter, the first worst sparrow position parameter, the constant factor and the first number of iterations; 将所述自适应权重带入预设的第一目标公式中,计算得到所述发现者更新后的所述更新位置参数;Substituting the adaptive weight into a preset first target formula, and calculating the updated position parameter after the discoverer updates; 当所述第一比较结果满足第二设定条件时,基于预设的第二目标公式计算得到所述发现者更新后的所述更新位置参数。When the first comparison result satisfies a second set condition, the updated position parameter after being updated by the discoverer is calculated based on a preset second target formula. 4.一种隧道围岩分级装置,其特征在于,包括:4. A tunnel surrounding rock classification device, characterized by comprising: 第一获取单元,用于获取历史时间段内目标围岩的历史围岩数据;A first acquisition unit is used to acquire historical surrounding rock data of target surrounding rock in a historical time period; 初始化单元,用于基于混沌映射对麻雀种群位置初始化,获得多个初始位置参数;An initialization unit, used for initializing the position of the sparrow population based on chaotic mapping to obtain a plurality of initial position parameters; 构建单元,用于基于所述初始位置参数构建模型,得到初始预测模型;A construction unit, used to construct a model based on the initial position parameters to obtain an initial prediction model; 训练单元,用于所述历史围岩数据和麻雀算法对所述初始预测模型进行训练,得到目标分级模型;A training unit, used for training the initial prediction model using the historical surrounding rock data and the Sparrow algorithm to obtain a target classification model; 输入单元,用于将所述目标围岩的实时围岩数据输入所述目标分级模型中,得到所述目标围岩的实时围岩分级结果;An input unit, used for inputting the real-time surrounding rock data of the target surrounding rock into the target classification model to obtain the real-time surrounding rock classification result of the target surrounding rock; 其中,所述训练单元包括:Wherein, the training unit comprises: 第一确定单元,用于基于所有麻雀的所述初始位置参数,确定出所有麻雀的初始适应度;A first determining unit, configured to determine the initial fitness of all sparrows based on the initial position parameters of all sparrows; 划分单元,用于划分操作:基于所述初始适应度将所有麻雀划分为发现者、跟随者和警戒者;A division unit, used for a division operation: dividing all sparrows into discoverers, followers and guards based on the initial fitness; 第一更新单元,用于更新操作:基于预设的目标公式更新所有麻雀的初始位置参数,得到多个更新位置参数;The first updating unit is used for updating operation: updating the initial position parameters of all sparrows based on a preset target formula to obtain a plurality of updated position parameters; 第三获取单元,用于第一获取操作:获取最大变异率、最小变异率、当前迭代次数和最大迭代次数;A third acquisition unit, used for the first acquisition operation: acquiring the maximum mutation rate, the minimum mutation rate, the current number of iterations and the maximum number of iterations; 第六计算单元,用于第五计算操作:计算所述最大变异率和所述最小变异率的差值,作为第一差值;A sixth calculation unit, configured for a fifth calculation operation: calculating a difference between the maximum mutation rate and the minimum mutation rate as a first difference; 第七计算单元,用于第六计算操作:计算所述当前迭代次数与所述最大迭代次数的比值,作为第二比值;a seventh calculation unit, configured for a sixth calculation operation: calculating a ratio of the current number of iterations to the maximum number of iterations as a second ratio; 第八计算单元,用于第七计算操作:计算第三设定阈值与所述第二比值的差值,作为第二差值;an eighth calculation unit, configured for a seventh calculation operation: calculating a difference between a third set threshold and the second ratio as a second difference; 第九计算单元,用于第八计算操作:计算所述第二差值的四次方,并与所述第一差值的乘积,得到目标变异率;A ninth calculation unit, configured to perform an eighth calculation operation: calculating the fourth power of the second difference and multiplying the fourth power of the second difference by the first difference to obtain a target mutation rate; 第二确定单元,用于确定操作:基于所述目标变异率确定出目标麻雀,并基于预设的第一公式更新并替换所述更新位置参数,得到目标位置参数;A second determination unit is used for determining an operation: determining a target sparrow based on the target mutation rate, and updating and replacing the update position parameter based on a preset first formula to obtain a target position parameter; 第四获取单元,用于第二获取操作:获取所述警戒者的数量,作为目标数量;A fourth acquisition unit is used for a second acquisition operation: acquiring the number of the alerters as a target number; 第二更新单元,用于当所述目标数量大于预设的警戒者最小值时,基于预设的第二公式更新所述警戒者数量,并重复所述划分操作至所述第二获取操作;A second updating unit, configured to update the number of alerters based on a preset second formula when the target number is greater than a preset minimum number of alerters, and repeat the division operation to the second acquisition operation; 第三更新单元,用于当所述目标数量不大于所述警戒者最小值时,基于所述更新位置参数和所述目标位置参数,确定出目标最优麻雀,并确定出所述目标最优麻雀的目标最优位置参数和目标最优适应度;A third updating unit is used for determining a target optimal sparrow based on the update position parameter and the target position parameter when the target number is not greater than the minimum value of the alerter, and determining a target optimal position parameter and a target optimal fitness of the target optimal sparrow; 调整单元,用于基于所述历史围岩数据、所述目标最优位置参数和所述目标最优适应度调整所述初始预测模型,得到所述目标分级模型;An adjustment unit, configured to adjust the initial prediction model based on the historical surrounding rock data, the target optimal position parameter and the target optimal fitness to obtain the target classification model; 其中,所述第一更新单元包括:Wherein, the first updating unit includes: 第六获取单元,用于获取第二迭代次数;A sixth obtaining unit, used to obtain a second iteration number; 第四确定单元,用于基于所有初始适应度,确定出最优适应度和最差适应度;A fourth determining unit, used for determining the best fitness and the worst fitness based on all the initial fitnesses; 第二比较单元,用于将所述警戒者的适应度与所述最优适应度进行比较,获得第二比较结果;A second comparison unit, used for comparing the fitness of the alerter with the optimal fitness to obtain a second comparison result; 第十二计算单元,用于当所述第二比较结果满足第三设定条件时,基于所述最优适应度、所述最差适应度、所述初始位置参数和所述第二迭代次数,计算得到步长控制参数;a twelfth calculation unit, configured to calculate a step size control parameter based on the optimal fitness, the worst fitness, the initial position parameter and the second number of iterations when the second comparison result satisfies a third set condition; 第二带入单元,用于将所述步长控制参数带入预设的第三目标公式中,计算得到所述警戒者更新后的所述更新位置参数;A second input unit is used to input the step length control parameter into a preset third target formula to calculate the updated position parameter of the sentinel after the update; 第七获取单元,用于当所述第二比较结果满足第四设定条件时,获取第一随机因子;a seventh acquisition unit, configured to acquire a first random factor when the second comparison result satisfies a fourth setting condition; 第十三计算单元,用于基于所述最优适应度、所述最差适应度、所述初始位置参数、所述第一随机因子和所述第二迭代次数,计算得到初始参数;A thirteenth calculation unit, configured to calculate an initial parameter based on the optimal fitness, the worst fitness, the initial position parameter, the first random factor, and the second number of iterations; 第三带入单元,用于将所述初始参数带入预设的第四目标公式中,计算得到所述警戒者更新后的所述更新位置参数;A third input unit is used to input the initial parameters into a preset fourth target formula to calculate and obtain the updated position parameters of the alerter after the update; 其中,所述第四目标公式为:Wherein, the fourth objective formula is: 其中,为第T+1次迭代后种群中麻雀i的第j维位置;/>为第T次迭代后种群中麻雀i的第j维位置;/>为第T次迭代后种群中最优麻雀的位置;/>为第T次迭代后种群中最差麻雀的位置;fi为麻雀i的个体适应度;fw为当前种群中最差麻雀的适应度;fg为当前种群中最优麻雀的适应度;ε为防止分母为零的最小常数;t为当前迭代次数;Si为初始化参数;rand为均匀分布的随机因子;/>和B为步长因子,B的取值范围为[0,1]。in, is the j-th position of sparrow i in the population after the T+1th iteration;/> is the j-th position of sparrow i in the population after the T-th iteration;/> is the position of the best sparrow in the population after the Tth iteration;/> is the position of the worst sparrow in the population after the Tth iteration; fi is the individual fitness of sparrow i; fw is the fitness of the worst sparrow in the current population; fg is the fitness of the best sparrow in the current population; ε is the minimum constant to prevent the denominator from being zero; t is the current number of iterations; Si is the initialization parameter; rand is a uniformly distributed random factor; /> and B are step factors, and the value range of B is [0, 1]. 5.根据权利要求4所述的隧道围岩分级装置,其特征在于,所述初始化单元包括:5. The tunnel surrounding rock classification device according to claim 4, characterized in that the initialization unit comprises: 第二获取单元,用于获取任一麻雀的随机位置参数和混沌控制参数,所述初始位置位于第一设定范围内,所述混沌控制参数位于第二设定范围内;A second acquisition unit is used to acquire a random position parameter and a chaos control parameter of any sparrow, wherein the initial position is within a first setting range, and the chaos control parameter is within a second setting range; 第一计算单元,用于第一计算操作:计算所述初始位置与第一设定阈值的乘积,作为第一乘积;A first calculation unit, configured for a first calculation operation: calculating a product of the initial position and a first set threshold as a first product; 第二计算单元,用于第The second computing unit is used for 二计算操作:计算所述第一乘积的正弦函数值,作为第一数值;A second calculation operation: calculating a sine function value of the first product as a first value; 第三计算单元,用于第三计算操作:计算所述混沌控制参数与第二设定阈值的比值,作为第一比值;A third calculation unit is used for a third calculation operation: calculating a ratio of the chaos control parameter to a second set threshold as a first ratio; 第四计算单元,用于第四计算操作:计算所述第一数值与所述第一比值的乘积,作为第二乘积;a fourth calculation unit, configured for a fourth calculation operation: calculating a product of the first value and the first ratio as a second product; 重复单元,用于重复所述第一计算操作、所述第二计算操作、所述第三计算操作和所述第四计算操作,直到达到预设重复次数,得到目标位置参数;a repeating unit, configured to repeat the first calculation operation, the second calculation operation, the third calculation operation and the fourth calculation operation until a preset number of repetitions is reached to obtain a target position parameter; 第五计算单元,用于计算所有麻雀所对应的目标位置参数,得到所述麻雀种群的多个初始位置参数。The fifth calculation unit is used to calculate the target position parameters corresponding to all sparrows to obtain a plurality of initial position parameters of the sparrow population. 6.根据权利要求4所述的隧道围岩分级装置,其特征在于,所述第一更新单元包括:6. The tunnel surrounding rock grading device according to claim 4, characterized in that the first updating unit comprises: 第三确定单元,用于基于所有初始适应度,确定出当前预警值;A third determining unit, configured to determine a current warning value based on all initial fitness levels; 第一比较单元,用于将所述当前预警值与预设的警戒预警值进行比较,得到第一比较结果;A first comparison unit, used for comparing the current warning value with a preset alert warning value to obtain a first comparison result; 第五获取单元,用于当所述第一比较结果满足第一设定条件时,获取所述发现者的上限约束、所述发现者的下限约束、第一最优麻雀位置参数、第一最差麻雀位置参数、常数因子和第一迭代次数;a fifth acquisition unit, configured to acquire, when the first comparison result satisfies a first set condition, an upper limit constraint of the finder, a lower limit constraint of the finder, a first optimal sparrow position parameter, a first worst sparrow position parameter, a constant factor, and a first number of iterations; 第十计算单元,用于基于所述上限约束、所述下限约束、所述第一最优麻雀位置参数、所述第一最差麻雀位置参数、所述常数因子和所述第一迭代次数,计算得到自适应权重;a tenth calculation unit, configured to calculate an adaptive weight based on the upper limit constraint, the lower limit constraint, the first optimal sparrow position parameter, the first worst sparrow position parameter, the constant factor, and the first number of iterations; 第一带入单元,用于将所述自适应权重带入预设的第一目标公式中,计算得到所述发现者更新后的所述更新位置参数;A first input unit, used for inputting the adaptive weight into a preset first target formula to calculate and obtain the updated position parameter after the discoverer updates; 第十一计算单元,用于当所述第一比较结果满足第二设定条件时,基于预设的第二目标公式计算得到所述发现者更新后的所述更新位置参数。An eleventh calculation unit is used to calculate the updated position parameter after the finder updates based on a preset second target formula when the first comparison result satisfies a second set condition. 7.一种隧道围岩分级设备,其特征在于,包括:7. A tunnel surrounding rock classification device, characterized by comprising: 存储器,用于存储计算机程序;Memory for storing computer programs; 处理器,用于执行所述计算机程序时实现如权利要求1至3任一项所述隧道围岩分级方法的步骤。A processor is used to implement the steps of the tunnel surrounding rock classification method as claimed in any one of claims 1 to 3 when executing the computer program. 8.一种可读存储介质,其特征在于,所述可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至3任一项所述隧道围岩分级方法的步骤。8. A readable storage medium, characterized in that a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the steps of the tunnel surrounding rock classification method according to any one of claims 1 to 3 are implemented.
CN202410024202.3A 2024-01-08 2024-01-08 Tunnel surrounding rock grading method, device, equipment and readable storage medium Active CN117787105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410024202.3A CN117787105B (en) 2024-01-08 2024-01-08 Tunnel surrounding rock grading method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410024202.3A CN117787105B (en) 2024-01-08 2024-01-08 Tunnel surrounding rock grading method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN117787105A CN117787105A (en) 2024-03-29
CN117787105B true CN117787105B (en) 2024-06-07

Family

ID=90394606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410024202.3A Active CN117787105B (en) 2024-01-08 2024-01-08 Tunnel surrounding rock grading method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117787105B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118468064B (en) * 2024-05-23 2025-03-11 西南交通大学 A method and device for grouping structural surface occurrence based on sparrow algorithm
CN119962977B (en) * 2025-04-10 2025-06-24 西南交通大学 A tunnel coal and gas hazard classification prediction method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326660A (en) * 2021-06-17 2021-08-31 广西路桥工程集团有限公司 Tunnel surrounding rock extrusion deformation prediction method based on GA-XGboost model
CN115374689A (en) * 2022-01-17 2022-11-22 浙江科技学院 Air Quality Index Prediction Method Based on Improved Sparrow Search Algorithm Optimization
CN116108590A (en) * 2023-04-12 2023-05-12 西南交通大学 Design method, device, equipment and readable storage medium of a gravity retaining wall
CN116596021A (en) * 2023-05-11 2023-08-15 国网新疆电力有限公司信息通信公司 Model parameter optimization method and device based on improved sparrow search algorithm

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326660A (en) * 2021-06-17 2021-08-31 广西路桥工程集团有限公司 Tunnel surrounding rock extrusion deformation prediction method based on GA-XGboost model
CN115374689A (en) * 2022-01-17 2022-11-22 浙江科技学院 Air Quality Index Prediction Method Based on Improved Sparrow Search Algorithm Optimization
CN116108590A (en) * 2023-04-12 2023-05-12 西南交通大学 Design method, device, equipment and readable storage medium of a gravity retaining wall
CN116596021A (en) * 2023-05-11 2023-08-15 国网新疆电力有限公司信息通信公司 Model parameter optimization method and device based on improved sparrow search algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Rockburst Intensity Level Prediction Method Based on FA-SSA-PNN Model;Gang Xu 等;《Energies》;20220708;第15卷(第14期);1-19 *
东河口滑坡高速远程运动特性的影响因素研究;李小琴 等;《自然灾害学报》;20211215;第30卷(第6期);166-175 *
基于SSA-BP神经网络的岩爆烈度等级预测;王文通 等;《有色金属(矿山部分)》;20231116;第76卷(第1期);77-83、91 *

Also Published As

Publication number Publication date
CN117787105A (en) 2024-03-29

Similar Documents

Publication Publication Date Title
CN117787105B (en) Tunnel surrounding rock grading method, device, equipment and readable storage medium
CN113947009B (en) Sparse LSTM landslide dynamic prediction method based on Cauchy disturbance sparrow optimization
JP5888640B2 (en) Photovoltaic power generation prediction apparatus, solar power generation prediction method, and solar power generation prediction program
Qu et al. Chicken swarm optimization based on elite opposition‐based learning
CN112887994A (en) Wireless sensor network optimization method based on improved binary particle swarm and application
CN107516150A (en) A short-term wind power prediction method, device and system
CN108665104A (en) A kind of fishing ground forecasting procedure based on LSTM
CN106411896A (en) APDE-RBF neural network based network security situation prediction method
CN109116299B (en) Fingerprint positioning method, terminal and computer readable storage medium
CN115455804A (en) Blasting block size prediction method based on ore rock crushing mechanism
Dao et al. Compact bat algorithm
CN101763528A (en) Gene regulation and control network constructing method based on Bayesian network
CN114330119B (en) Deep learning-based extraction and storage unit adjusting system identification method
CN114117787A (en) Short-term wind power prediction method based on SSA-optimized BP neural network
CN115496187A (en) Wind power composite prediction method based on PCA-BP-SSA algorithm
CN113240307B (en) An Economic Dispatching Method of Power System Based on Improved Differential Evolution Algorithm
CN117540874A (en) Medium-long term line loss prediction method
CN115203631A (en) A method and system for multimodal data analysis based on improved genetic algorithm
CN118485302A (en) Enterprise supply chain risk prediction method based on artificial intelligence
CN118014131A (en) TWOA-LSTM-based short-term power load prediction method
CN112215412B (en) Dissolved oxygen prediction method and device
CN116108590A (en) Design method, device, equipment and readable storage medium of a gravity retaining wall
CN118780575B (en) A reservoir group optimization scheduling method and system based on improved whale algorithm
CN111582535A (en) A performance improvement method for medium and long-term forecasting model of power load
CN117910329B (en) Ocean time sequence data prediction method and system based on improved particle swarm optimization algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant