Method, system and device for adaptively fitting linear function and readable storage medium

Through the adaptive fitting of linear functions, the bridge linear shape is fitted in segments, which solves the accuracy problem caused by improper order setting of the fitting function in the prior art, and achieves higher fitting accuracy.

CN119397640AInactive Publication Date: 2025-02-07CHINA RAILWAY MAJOR BRIDGE RECONNAISSANCE & DESIGN INSTITUTE CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411416676.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-02-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the order of the fitting function of the bridge line shape is set too high or too low, resulting in a significant reduction in fitting accuracy.

Method used

Using the method of adaptive fitting linear function, the target bridge line shape is segmented, and the fit coefficient is determined based on the node coordinates and the order of the fitting function for each line shape, the target goodness of fit is calculated, and the appropriate fit is determined. Function order and coefficient.

Benefits of technology

The accuracy of the fitting function is improved to ensure that the order of the fitting function is neither high nor low leading to overfitting, thereby improving the overall fitting accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397640A_ABST
    Figure CN119397640A_ABST
Patent Text Reader

Abstract

A method, system and device for adaptive fitting of a linear function and a readable storage medium relate to the field of bridge engineering numerical analysis, and specifically comprise: segmenting a line shape corresponding to a target bridge to obtain multiple segments of target line shapes; for each section of target line shape, determining a fitting coefficient corresponding to each fitting function order based on the node coordinates and each fitting function order; determining a target goodness of fit based on the node coordinates and fitting coefficients corresponding to different fitting function orders; and determining a target fitting function of the target line shape based on the target fitting function order and the target fitting coefficient corresponding to the target goodness of fit. According to the method, the problem that the fitting precision is remarkably reduced due to the fact that the order of the target function is set too high or too low in the prior art is solved, the optimal target function is determined according to self-adaption of the fitting line shape, and the fitting precision of the target function is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of numerical analysis of bridge engineering, and in particular to a method, system, device and readable storage medium for adaptively fitting linear functions. Background Art

[0002] At present, the demand for linear analysis in the field of bridge engineering is growing. The existing basic solution for processing bridge linearity is mainly to interpolate first and then fit. Among them, for the interpolation part, the existing interpolation method is relatively mature. Although different interpolation technologies have different fitting accuracy, their impact on the final fitting function is limited; the order setting of the objective function in the existing fitting method is often too high or too low, and too high or too low order setting will significantly reduce the fitting accuracy.

[0003] Therefore, how to provide a fitting function adaptive algorithm to improve the fitting accuracy of the objective function is a problem that needs to be solved urgently. Summary of the invention

[0004] The present application provides a method, system, device and readable storage medium for adaptively fitting linear functions, which can solve the technical problem in the prior art that the fitting accuracy is significantly reduced due to the objective function order being set too high or too low.

[0005] In a first aspect, an embodiment of the present application provides a method for adaptively fitting a linear function, the method for adaptively fitting a linear function comprising:

[0006] The line shape corresponding to the target bridge is segmented to obtain multiple segments of the target line shape;

[0007] For each target line shape, the fitting coefficient corresponding to each fitting function order is determined based on the node coordinates and each fitting function order;

[0008] Determining the target goodness of fit based on the node coordinates and the fitting coefficients corresponding to different fitting function orders;

[0009] The target fitting function of the target linear shape is determined based on the target fitting function order and the target fitting coefficient corresponding to the target fitting goodness of fit.

[0010] In combination with the first aspect, in one implementation, determining the target goodness of fit based on the node coordinates and the fitting coefficients corresponding to different fitting function orders includes:

[0011] For each fitting coefficient, determining a fitting function value based on the fitting coefficient and the node coordinates;

[0012] Determine the regression sum of squares of the fitting function and the overall sum of squares of the fitting function based on the fitting function value and the node coordinates;

[0013] Determine the goodness of fit of the fitting function order corresponding to the fitting coefficient based on the regression sum of squares and the overall sum of squares;

[0014] The target goodness of fit is determined based on the goodness of fit of all fitting function orders and a preset goodness of fit threshold.

[0015] In combination with the first aspect, in one implementation, determining a target goodness of fit based on the goodness of fit of all fitting function orders and a preset goodness of fit threshold comprises:

[0016] For the goodness of fit of each fitting function order, the goodness of fit is subtracted from the preset goodness of fit threshold to obtain the goodness of fit difference;

[0017] A target goodness of fit is determined from all goodness of fits based on the goodness of fit difference and a preset difference threshold range.

[0018] In combination with the first aspect, in one implementation, determining a target goodness of fit from all goodnesses of fit based on the goodness of fit difference and a preset difference threshold range includes:

[0019] The goodness of fit corresponding to the goodness of fit difference within the preset difference threshold range is used as the target goodness of fit.

[0020] In combination with the first aspect, in one implementation, determining the target fitting function of the target linear shape based on the target fitting function order and the target fitting coefficient corresponding to the target goodness of fit includes:

[0021] Substitute the target fitting function order and target fitting coefficient corresponding to the target goodness of fit into the preset fitting function expression, which is as follows:

[0022] p(x)=p1x n +p2x n-1 +...+p n x+p n+1

[0023] Where n is the order of the target fitting function; x is the horizontal coordinate of the node coordinate; p(x) is the target fitting function; p i is the target fitting coefficient, and the value of i ranges from 1 to n+1.

[0024] In combination with the first aspect, in one implementation, the node coordinates of the target bridge are encrypted node coordinates after spline interpolation processing.

[0025] In a second aspect, an embodiment of the present application provides a system for adaptively fitting a linear function, the system for adaptively fitting a linear function comprising:

[0026] The first processing module is used to segment the line shape corresponding to the target bridge to obtain multiple segments of the target line shape;

[0027] The second processing module is used to determine the fitting coefficient corresponding to each fitting function order based on the node coordinates and each fitting function order for each target linear segment;

[0028] A third processing module, which is used to determine the target goodness of fit based on the node coordinates and the fitting coefficients corresponding to different fitting function orders;

[0029] The fourth processing module is used to determine the target fitting function of the target linear shape based on the target fitting function order and the target fitting coefficient corresponding to the target fitting goodness of fit.

[0030] In conjunction with the second aspect, in one implementation, the third processing module is specifically configured to:

[0031] For each fitting coefficient, determining a fitting function value based on the fitting coefficient and the node coordinates;

[0032] Determine the regression sum of squares of the fitting function and the overall sum of squares of the fitting function based on the fitting function value and the node coordinates;

[0033] Determine the goodness of fit of the fitting function order corresponding to the fitting coefficient based on the regression sum of squares and the overall sum of squares;

[0034] The target goodness of fit is determined based on the goodness of fit of all fitting function orders and a preset goodness of fit threshold.

[0035] In a third aspect, an embodiment of the present application provides a device for adaptively fitting linear functions, comprising a processor, a memory, and a program for adaptively fitting linear functions stored in the memory and executable by the processor, wherein when the program for adaptively fitting linear functions is executed by the processor, the steps of the method for adaptively fitting linear functions as described in any of the foregoing items are implemented.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which is stored a program for adaptively fitting linear functions. When the program for adaptively fitting linear functions is executed by a processor, the steps of the method for adaptively fitting linear functions as described in any of the foregoing items are implemented.

[0037] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0038] By segmenting the line shape corresponding to the target bridge, multiple target line shapes are obtained; for each section of the target line shape, the fitting coefficient corresponding to each fitting function order is determined based on the node coordinates and each fitting function order; the target goodness of fit is determined based on the node coordinates and the fitting coefficients corresponding to different fitting function orders, ensuring that the fitting function order is neither too high to cause overfitting nor too low to cause underfitting, thereby improving the overall fitting accuracy; the target fitting function of the target line shape is determined based on the target fitting function order and the target fitting coefficient corresponding to the target goodness of fit, which accurately reflects the linear characteristics of the bridge and improves the accuracy of the fitting function. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a schematic diagram of a flow chart of an embodiment of a method for adaptively fitting a linear function of the present application;

[0040] Figure 2 For this application Figure 1 Detailed flow chart of step S30;

[0041] Figure 3 For this application Figure 2 Detailed flow chart of step S304;

[0042] Figure 4 This is a schematic diagram of the longitudinal section of the bridge route for this application;

[0043] Figure 5 This is a schematic diagram of the bridge fitting situation under different target alignments for trains crossing the bridge in this application;

[0044] Figure 6 This is a schematic diagram of the architecture of an embodiment of a system for adaptively fitting linear functions of the present application;

[0045] Figure 7 This is a schematic diagram of the hardware structure of the device for adaptively fitting linear functions involved in the embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0048] In a first aspect, an embodiment of the present application provides a method for adaptively fitting a linear function.

[0049] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of the method for adaptively fitting a linear function of the present application. Figure 1 As shown, the method of adaptively fitting the linear function includes:

[0050] Step S10: Segment the alignment corresponding to the target bridge to obtain multiple segments of the target alignment.

[0051] For example, in the embodiment of the present application, since the overall trend of the bridge line shape does not completely conform to a single function, the bridge line shape can be divided into several small segments to obtain multiple target line shapes, and each target line shape is described by a different function, wherein the line shape segmentation method of the target bridge can be determined according to actual needs, and is not limited here. Since vehicles often pass through the bridge, the line shape can be segmented according to the distance the train advances. Specifically, it can be assumed that the total length of the target bridge is 1425m and the distance the train advances each step is 3m, then the total number of steps for the train to cross the bridge is about 476 steps, that is, the target line shape has a total of 476 segments.

[0052] It is understandable that since the overall trend of the bridge alignment does not completely conform to a single function, fitting the entire bridge alignment to a single function will sacrifice calculation accuracy to a certain extent; while segmented processing can perform independent fitting and analysis on each segment of the alignment, and can better capture local deformation characteristics and change trends when the target bridge alignment is affected by train loads or temperature, thereby improving the analysis accuracy of the bridge deformation characteristics.

[0053] Step S20: For each target linear segment, the fitting coefficient corresponding to each fitting function order is determined based on the node coordinates and each fitting function order.

[0054] Exemplarily, in the embodiment of the present application, if the order n of the fitting function is set too low, underfitting problems may occur, that is, the function after fitting cannot capture the complexity and characteristics of the bridge line shape. In other words, underfitting is usually manifested as the fitting curve cannot accurately track the trend of the data points, resulting in a large prediction error. If the order n of the objective function is set too high, it may lead to overfitting, that is, the model is too complex and cannot accurately fit the actual trend of the training data. In the embodiment of the present application, multiple fitting function orders n (for example, n is 1 to 9) are preset and the goodness of fit calculation is performed on them respectively, so as to determine the appropriate fitting function order based on the goodness of fit calculation results.

[0055] Specifically, for each target line shape, the target bridge node coordinates (x, y) can be obtained through the bridge finite element model, and then the polynomial fitting coefficients p of each order can be obtained by using the polyfit command to perform polynomial fitting on the target bridge node coordinates (x, y) and each fitting function order n, which can be expressed as p = polyfit (x, y, n), where the polyfit command is a function in programming languages ​​such as MATLAB and Python, which is used to perform polynomial fitting.

[0056] Step S30: Determine the target goodness of fit based on the node coordinates and the fitting coefficients corresponding to different fitting function orders.

[0057] Exemplarily, in an embodiment of the present application, for each fitting function order, multiple goodness of fits are determined based on the node coordinates and the fitting function order, and then a target goodness of fit is screened out from the multiple goodness of fits.

[0058] It can be understood that the target goodness of fit can also be determined by the following method: calculate the goodness of fit starting from the fitting function order n=1 in sequence, and judge whether the goodness of fit meets the condition of the target goodness of fit; if it does, use the goodness of fit as the target goodness of fit; if it does not, continue to calculate the goodness of fit corresponding to the fitting function order n=2 until the target goodness of fit that meets the requirements is calculated.

[0059] Step S40: Determine the target fitting function of the target linear shape based on the target fitting function order and the target fitting coefficient corresponding to the target goodness of fit.

[0060] Exemplarily, in the present embodiment, the target goodness of fit R 2 The closer it is to 1, the better the fitting effect of the node coordinate data is. Then the target fitting function determined according to the target fitting function order and target fitting coefficient corresponding to the target fitting goodness is more accurate, thereby ensuring that the target fitting function in actual applications can better reflect the needs of bridge design, thereby optimizing structural performance, reducing construction costs, and improving safety and reliability.

[0061] The present application obtains multiple target linear shapes by segmenting the linear shape corresponding to the target bridge; for each segment of the target linear shape, the fitting coefficient corresponding to each fitting function order is determined based on the node coordinates and each fitting function order; the target goodness of fit is determined based on the node coordinates and the fitting coefficients corresponding to different fitting function orders, ensuring that the fitting function order is neither too high to cause overfitting nor too low to cause underfitting, thereby improving the overall fitting accuracy; the target fitting function of the target linear shape is determined based on the target fitting function order and the target fitting coefficient corresponding to the target goodness of fit, accurately reflecting the linear characteristics of the bridge and improving the accuracy of the fitting function.

[0062] Further, in one embodiment, referring to Figure 2 As shown, the target goodness of fit is determined based on the node coordinates and the fitting coefficients corresponding to different fitting function orders, including:

[0063] Step S301: for each fitting coefficient, determining a fitting function value based on the fitting coefficient and the node coordinates;

[0064] Step S302: determining the regression sum of squares of the fitting function and the overall sum of squares of the fitting function based on the fitting function value and the node coordinates;

[0065] Step S303: determining the goodness of fit of the fitting function order corresponding to the fitting coefficient based on the regression sum of squares and the overall sum of squares;

[0066] Step S304: Determine a target goodness of fit based on the goodness of fit of all fitting function orders and a preset goodness of fit threshold.

[0067] For example, in the embodiment of the present application, the preset goodness of fit threshold can be determined according to actual needs and is not limited here. For example, the preset goodness of fit threshold is 1. For each fitting coefficient, the polyval command is used to fit the polynomial fitting coefficient p of each order and the horizontal coordinate x in the target bridge node coordinate to obtain the fitting function value f, which can be expressed as f=polyval(p,x), where the polyval command is used to calculate the value of the polynomial; then the fitting function value f and the vertical coordinate y in the target bridge node coordinate are substituted into the regression square sum formula SSR=sum((f-mean(y)) 2 ) to obtain the regression sum of squares SSR, where maen(y) represents the average of all y values; substitute the ordinate y in the target bridge node coordinates into the overall sum of squares formula SST = sum((y-mean(y)) 2 ) to obtain the overall sum of squares SST; taking the quotient of the regression sum of squares SSR and the overall sum of squares SST to obtain the goodness of fit of the fitting function order corresponding to the fitting coefficient; and then screening out the target goodness of fit from all the goodness of fits according to the goodness of fit of all fitting function orders and the goodness of fit threshold.

[0068] Further, in one embodiment, referring to Figure 3 As shown, the target goodness of fit is determined based on the goodness of fit of all fitting function orders and a preset goodness of fit threshold, including:

[0069] Step S3041: for the goodness of fit of each fitting function order, subtract the goodness of fit from a preset goodness of fit threshold to obtain a goodness of fit difference;

[0070] Step S3042: Determine a target goodness of fit from all goodness of fits based on the goodness of fit difference and a preset difference threshold range.

[0071] For example, in the embodiment of the present application, the preset difference threshold range can be determined according to actual needs and is not limited here. For example, the preset difference threshold range is [0, 0.001]. For the goodness of fit of each fitting function order, the goodness of fit is subtracted from the goodness of fit threshold to obtain the goodness of fit difference; then, the target goodness of fit is selected from all goodness of fit according to the size relationship between the goodness of fit difference and the difference threshold range.

[0072] Further, in one embodiment, determining a target goodness of fit from all goodnesses of fit based on the goodness of fit difference and a preset difference threshold range includes:

[0073] The goodness of fit corresponding to the goodness of fit difference within the preset difference threshold range is used as the target goodness of fit.

[0074] Exemplarily, in an embodiment of the present application, it is determined whether the goodness of fit difference is within a difference threshold range. If so, it indicates that the order of the fitting function corresponding to the goodness of fit is the target fitting function order, and the goodness of fit is used as the target goodness of fit.

[0075] Further, in one embodiment, the target fitting function of the target linear shape is determined based on the target fitting function order and the target fitting coefficient corresponding to the target fitting goodness of fit, including:

[0076] Substitute the target fitting function order and target fitting coefficient corresponding to the target goodness of fit into the preset fitting function expression, which is as follows:

[0077] p(x)=p1x n +p2x n-1 +...+p n x+p n+1

[0078] Where n is the order of the target fitting function; x is the horizontal coordinate of the node coordinate; p(x) is the target fitting function; p i is the target fitting coefficient, and the value of i ranges from 1 to n+1.

[0079] Exemplarily, in the embodiment of the present application, the preset fitting function expression can be determined according to actual needs and is not limited here. The fitting function expression is preferably expressed as an n-order polynomial: p(x)=p1x n +p2x n-1 +...+p n x+p n+1Specifically, the target fitting function order n and the target fitting coefficient p are substituted into a preset fitting function expression to obtain the target fitting function p(x), and the fitting function expression is as follows:

[0080] p(x)=p1x n +p2x n-1 +...+p n x+p n+1 .

[0081] It is understandable that after determining the precise target fitting function, a more precise target bridge slope can be obtained by derivation of the target fitting function to ensure that the train will not be unable to climb due to excessive bridge slope. For details, please refer to Figure 4 The slopes i1, i2, and i3 corresponding to the total slope sections adjacent to the slope change points are shown. It should be noted that the purpose of fitting the curve according to the existing bridge line node coordinates is to restore the approximate curve connected by the broken line segments to the standard line shape, thereby ensuring the smoothness and stability of the line, and thus improving safety and reliability.

[0082] Furthermore, in one embodiment, the node coordinates of the target bridge are encrypted node coordinates after spline interpolation processing.

[0083] For example, in the embodiment of the present application, at present, the more mature interpolation methods include least squares method, Lagrange polynomial interpolation, Hermite polynomial interpolation, cubic spline interpolation, etc. For the curve interpolation of the railway line, except for the cubic spline, the other three methods have certain defects. Therefore, the embodiment of the present application can obtain the encrypted node coordinates by performing the cubic spline interpolation method on the node coordinates of the target bridge. It can be understood that the cubic spline interpolation has continuous first-order and second-order derivatives at all data points, and the generated curve is smooth and natural.

[0084] It should be noted that, refer to Figure 5 As shown in the figure, the following example illustrates the fitting of the bridge line shape within the vehicle body range at 4 time steps (i.e. 4 target line shapes) when the train crosses the bridge. Specifically, from the time the train enters the bridge, the number of bridge nodes within the vehicle body range increases to a stable value as the vehicle body gradually goes up the bridge, and the number of cubic spline interpolation points also increases according to the complexity of the data points, making the simulation points smoother. Figure 5 It can be seen from the simulation results of the four stages that the segmented fitting bridge line shape simulation effect is good, and the fitting function can reflect the characteristics of the data points and meet the calculation requirements.

[0085] In a second aspect, an embodiment of the present application also provides a system for adaptively fitting linear functions.

[0086] In one embodiment, referring to Figure 6 , Figure 6This is a functional module diagram of an embodiment of the system for adaptively fitting linear functions of the present application. Figure 4 As shown, the system for adaptively fitting linear functions includes:

[0087] The first processing module is used to segment the line shape corresponding to the target bridge to obtain multiple segments of the target line shape;

[0088] The second processing module is used to determine the fitting coefficient corresponding to each fitting function order based on the node coordinates and each fitting function order for each target linear segment;

[0089] A third processing module, which is used to determine the target goodness of fit based on the node coordinates and the fitting coefficients corresponding to different fitting function orders;

[0090] The fourth processing module is used to determine the target fitting function of the target linear shape based on the target fitting function order and the target fitting coefficient corresponding to the target fitting goodness of fit.

[0091] Furthermore, in one embodiment, the third processing module is specifically used for:

[0092] For each fitting coefficient, determining a fitting function value based on the fitting coefficient and the node coordinates;

[0093] Determine the regression sum of squares of the fitting function and the overall sum of squares of the fitting function based on the fitting function value and the node coordinates;

[0094] Determine the goodness of fit of the fitting function order corresponding to the fitting coefficient based on the regression sum of squares and the overall sum of squares;

[0095] The target goodness of fit is determined based on the goodness of fit of all fitting function orders and a preset goodness of fit threshold.

[0096] Furthermore, in one embodiment, the third processing module is further configured to:

[0097] For the goodness of fit of each fitting function order, the goodness of fit is subtracted from the preset goodness of fit threshold to obtain the goodness of fit difference;

[0098] A target goodness of fit is determined from all goodness of fits based on the goodness of fit difference and a preset difference threshold range.

[0099] Furthermore, in one embodiment, the third processing module is further configured to:

[0100] The goodness of fit corresponding to the goodness of fit difference within the preset difference threshold range is used as the target goodness of fit.

[0101] Furthermore, in one embodiment, the fourth processing module is specifically used for:

[0102] Substitute the target fitting function order and target fitting coefficient corresponding to the target goodness of fit into the preset fitting function expression, which is as follows:

[0103] p(x)=p1x n +p2x n-1 +...+p n x+p n+1

[0104] Where n is the order of the target fitting function; x is the horizontal coordinate of the node coordinate; p(x) is the target fitting function; p i is the target fitting coefficient, and the value of i ranges from 1 to n+1.

[0105] Furthermore, in one embodiment, the first processing module is specifically configured to:

[0106] The node coordinates of the target bridge are encrypted node coordinates after spline interpolation processing.

[0107] The present application obtains multiple target linear shapes by segmenting the linear shape corresponding to the target bridge; for each segment of the target linear shape, the fitting coefficient corresponding to each fitting function order is determined based on the node coordinates and each fitting function order; the target goodness of fit is determined based on the node coordinates and the fitting coefficients corresponding to different fitting function orders, ensuring that the fitting function order is neither too high to cause overfitting nor too low to cause underfitting, thereby improving the overall fitting accuracy; the target fitting function of the target linear shape is determined based on the target fitting function order and the target fitting coefficient corresponding to the target goodness of fit, accurately reflecting the linear characteristics of the bridge and improving the accuracy of the fitting function.

[0108] Among them, the functional implementation of each module in the above-mentioned system for adaptively fitting linear functions corresponds to the steps in the above-mentioned method embodiment for adaptively fitting linear functions, and their functions and implementation processes are no longer repeated here.

[0109] In a third aspect, an embodiment of the present application provides a device for adaptively fitting linear functions. The device for adaptively fitting linear functions may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.

[0110] Reference Figure 7 , Figure 7 Schematic diagram of the hardware structure of the device for adaptively fitting linear functions involved in the embodiment of the present application. In the embodiment of the present application, the device for adaptively fitting linear functions may include a processor, a memory, a communication interface and a communication bus.

[0111] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0112] The communication interface includes an input / output (I / O) interface, a physical interface, and a logical interface, etc., which are used to interconnect devices within the device for implementing the adaptive linear fitting function, and an interface for interconnecting the device for implementing the adaptive linear fitting function with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, an optical fiber interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.

[0113] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0114] The processor may be a general-purpose processor, and the general-purpose processor may call the program of the adaptive fitting linear function stored in the memory, and execute the method of the adaptive fitting linear function provided by the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the program of the adaptive fitting linear function is called may refer to the various embodiments of the method of the adaptive fitting linear function of the present application, which will not be repeated here.

[0115] Those skilled in the art will understand that Figure 7 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0116] In a fourth aspect, an embodiment of the present application also provides a readable storage medium.

[0117] The readable storage medium of the present application stores a program for adaptively fitting linear functions, wherein when the program for adaptively fitting linear functions is executed by a processor, the steps of the method for adaptively fitting linear functions described above are implemented.

[0118] Among them, the method implemented when the program for adaptively fitting linear functions is executed can refer to the various embodiments of the method for adaptively fitting linear functions of the present application, and will not be repeated here.

[0119] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0120] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0121] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0122] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0123] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

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

[0125] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for adaptively fitting a linear function, characterized in that: The method for adaptively fitting a linear function comprises: The line shape corresponding to the target bridge is segmented to obtain multiple segments of the target line shape; For each target line shape, the fitting coefficient corresponding to each fitting function order is determined based on the node coordinates and each fitting function order; Determining the target goodness of fit based on the node coordinates and the fitting coefficients corresponding to different fitting function orders; The target fitting function of the target linear shape is determined based on the target fitting function order and the target fitting coefficient corresponding to the target fitting goodness of fit.

2. The method for adaptively fitting a linear function according to claim 1, wherein: The determining of the target goodness of fit based on the node coordinates and the fitting coefficients corresponding to different fitting function orders includes: For each fitting coefficient, determining a fitting function value based on the fitting coefficient and the node coordinates; Determine the regression sum of squares of the fitting function and the overall sum of squares of the fitting function based on the fitting function value and the node coordinates; Determine the goodness of fit of the fitting function order corresponding to the fitting coefficient based on the regression sum of squares and the overall sum of squares; The target goodness of fit is determined based on the goodness of fit of all fitting function orders and a preset goodness of fit threshold.

3. The method for adaptively fitting a linear function according to claim 2, characterized in that: The step of determining a target goodness of fit based on the goodness of fit of all fitting function orders and a preset goodness of fit threshold comprises: For the goodness of fit of each fitting function order, the goodness of fit is subtracted from the preset goodness of fit threshold to obtain the goodness of fit difference; A target goodness of fit is determined from all goodness of fits based on the goodness of fit difference and a preset difference threshold range.

4. The method for adaptively fitting a linear function according to claim 3, characterized in that: Determining a target goodness of fit from all goodnesses of fit based on the goodness of fit difference and a preset difference threshold range includes: The goodness of fit corresponding to the goodness of fit difference within the preset difference threshold range is used as the target goodness of fit.

5. The method for adaptively fitting a linear function according to claim 1, wherein: The target fitting function of the target linear shape is determined based on the target fitting function order and the target fitting coefficient corresponding to the target fitting goodness of fit, including: Substitute the target fitting function order and target fitting coefficient corresponding to the target goodness of fit into the preset fitting function expression, which is as follows: p(x)=p1x n +p2x n-1 +...+p n x+p n+1 Where n is the order of the target fitting function; x is the horizontal coordinate of the node coordinate; p(x) is the target fitting function; p i is the target fitting coefficient, and the value of i ranges from 1 to n+1.

6. The method for adaptively fitting a linear function according to claim 1, wherein: The node coordinates of the target bridge are encrypted node coordinates after spline interpolation processing.

7. A system for adaptively fitting linear functions, characterized in that: The system for adaptively fitting linear functions comprises: The first processing module is used to segment the line shape corresponding to the target bridge to obtain multiple segments of the target line shape; The second processing module is used to determine the fitting coefficient corresponding to each fitting function order based on the node coordinates and each fitting function order for each target linear segment; A third processing module, which is used to determine the target goodness of fit based on the node coordinates and the fitting coefficients corresponding to different fitting function orders; The fourth processing module is used to determine the target fitting function of the target linear shape based on the target fitting function order and the target fitting coefficient corresponding to the target fitting goodness of fit.

8. The system for adaptively fitting linear functions according to claim 7, characterized in that: The third processing module is specifically used for: For each fitting coefficient, determining a fitting function value based on the fitting coefficient and the node coordinates; Determine the regression sum of squares of the fitting function and the overall sum of squares of the fitting function based on the fitting function value and the node coordinates; Determine the goodness of fit of the fitting function order corresponding to the fitting coefficient based on the regression sum of squares and the overall sum of squares; The target goodness of fit is determined based on the goodness of fit of all fitting function orders and a preset goodness of fit threshold.

9. A device for adaptively fitting linear functions, characterized in that: The device for adaptively fitting linear functions comprises a processor, a memory, and a program for adaptively fitting linear functions stored in the memory and executable by the processor, wherein when the program for adaptively fitting linear functions is executed by the processor, the steps of the method for adaptively fitting linear functions as described in any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for adaptively fitting linear functions, wherein when the program for adaptively fitting linear functions is executed by a processor, the steps of the method for adaptively fitting linear functions according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Bridge alignment real-time monitoring system based on high-precision inclination angle sensors

    CN105258884A

  • Test method for judging quality of fitted curve

    CN111667550A

  • Method and device for acquiring profile curve of hot-rolled strip steel cross section and electronic equipment

    CN112504163A

  • Optical path system calibration method, equipment and computer readable storage medium

    CN113624130A

  • Method for optimizing on-bridge track laying line shape of railroad bridge based on Fourier series fitting

    CN114444177A