Road surface slope determination method, electronic device and vehicle

By calculating the slope difference value of the vehicle slope sensor and correcting the initial slope value, the problem of low measurement accuracy of the inertial acceleration sensor is solved, and the accuracy and reliability of the vehicle slope measurement are improved.

CN118936422BActive Publication Date: 2025-01-03ZHANGJIAGANG GREAT WALL MOTOR R&D CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411401026.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-03
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

When existing inertial acceleration sensors are used for vehicle slope measurement, the measurement accuracy is low and the reliability is insufficient, making it difficult to accurately determine the small resolution slope.

Method used

By obtaining the initial slope value of the vehicle slope sensor for multiple sampling periods, calculating the slope difference value, and correcting the initial slope value based on the comparison results of the difference value and the preset difference value, determining the road surface slope of each sampling period, eliminating jitter phenomenon , improve measurement accuracy.

Benefits of technology

The accuracy and reliability of vehicle slope measurement are improved, accidentality is reduced, and accurate determination of slope values ​​is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118936422B_ABST
    Figure CN118936422B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of data processing, and provides a method for determining the road slope, an electronic device, and a vehicle. The method obtains the initial slope value of a vehicle slope sensor in each sampling period in a preset number of sampling periods, determines the difference between the initial slope values ​​of two adjacent sampling periods, and obtains multiple slope difference values; compares each of the multiple slope difference values ​​with a preset difference value to obtain a comparison result; and corrects the initial slope value of each sampling period according to the comparison result to obtain the road slope corresponding to each sampling period. By adjusting the initial slope value, the jitter phenomenon is eliminated, so that the slope value is smoothed, and the accuracy of the measured slope value is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular to a method for determining a road slope, an electronic device, and a vehicle. Background Art

[0002] With the rapid development of vehicle technology, vehicles have become an important means of transportation in people's daily lives. When users use vehicles, they are often on a sloped road. In order to better realize the functions of the vehicle, it is very important to accurately measure the slope of the vehicle.

[0003] Currently, inertial acceleration sensors are usually used to determine the slope. However, due to the characteristics of inertial acceleration sensors, the measurement accuracy is relatively rough, and the precision and reliability are low. Summary of the invention

[0004] In view of this, the purpose of the present disclosure is to propose a road slope determination method, electronic device and vehicle to solve the problem that an inertial acceleration sensor is usually used to determine the slope, but due to the characteristics of the inertial acceleration sensor, the measurement accuracy is relatively rough, and the accuracy and reliability are low.

[0005] Based on the above purpose, the first aspect of the present disclosure provides a method for determining a road surface slope, the method comprising:

[0006] Obtaining an initial slope value of a vehicle slope sensor in each sampling period in a preset number of sampling periods, determining a difference between the initial slope values ​​of two adjacent sampling periods, and obtaining a plurality of slope difference values;

[0007] Compare each of the plurality of slope difference values ​​with a preset difference value to obtain a comparison result;

[0008] The initial slope value of each sampling period is corrected according to the comparison result to obtain the road surface slope corresponding to each sampling period.

[0009] Based on the same inventive concept, the second aspect of the present disclosure provides a road surface slope determination device, the device comprising:

[0010] A difference determination module is configured to obtain an initial slope value of the vehicle slope sensor in each sampling period in a preset number of sampling periods, determine a difference between the initial slope values ​​of two adjacent sampling periods, and obtain a plurality of slope difference values;

[0011] A comparison module is configured to compare each of the plurality of slope difference values ​​with a preset difference value to obtain a comparison result;

[0012] The slope determination module is configured to correct the initial slope value of each sampling period according to the comparison result to obtain the road surface slope corresponding to each sampling period.

[0013] Based on the same inventive concept, the third aspect of the present disclosure proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the road slope determination method as described above when executing the computer program.

[0014] Based on the same inventive concept, the fourth aspect of the present disclosure proposes a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the road surface slope determination method as described above.

[0015] Based on the same inventive concept, the fifth aspect of the present disclosure provides a vehicle, comprising the road slope determination device described in the second aspect or the electronic device described in the third aspect or the storage medium described in the fourth aspect.

[0016] As can be seen from the above, the present disclosure proposes a road slope determination method, electronic device and vehicle, which obtains the initial slope value of the vehicle slope sensor for a preset number of sampling periods, determines the difference between the initial slope values ​​of two adjacent sampling periods, and obtains multiple slope difference values. The slope difference value is obtained by collecting the values ​​of the slope sensor for multiple periods, and the slope value is subsequently determined based on the slope difference value, which makes the determination of the slope value more accurate and reduces the randomness. Each slope difference value in the multiple slope difference values ​​is compared with the preset difference value to obtain a comparison result, and the initial slope value of each sampling period is corrected according to the comparison result to obtain the road slope corresponding to each sampling period. By adjusting the initial slope value, the jitter phenomenon is eliminated, so that the slope value is smoothed, and the accuracy of the measured slope value is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 A flow chart of a method for determining a road surface slope according to an embodiment of the present disclosure;

[0019] Figure 2 is a structural block diagram of a road surface slope determination device according to an embodiment of the present disclosure;

[0020] Figure 3It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0022] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0023] With the rapid development of vehicle technology, vehicles have become an important means of transportation in people's daily lives. When users use vehicles, they are often on a sloped road. In order to better realize the functions of the vehicle, it is very important to accurately measure the slope of the vehicle.

[0024] At present, inertial acceleration sensors are usually used to determine the slope. The inertial acceleration value obtained when the vehicle is stationary is the acceleration value caused by the gravity slope, which can be converted into the slope value. However, due to the characteristics of inertial acceleration sensors, they are mostly used to roughly estimate the slope range. For small resolution slopes, filtering methods are often used, but this method often only obtains a smoother slope output, but the accuracy and reliability are not increased. At the same time, there is a trade-off problem caused by hysteresis and smoothing.

[0025] Based on the above description, this embodiment proposes a method for determining the road slope, such as Figure 1 As shown, the method includes:

[0026] Step 101, obtaining an initial slope value of a vehicle slope sensor in each sampling period in a preset number of sampling periods, determining a difference between the initial slope values ​​of two adjacent sampling periods, and obtaining a plurality of slope difference values.

[0027] In specific implementation, a sampling period of the initial slope value of the slope sensor is determined, wherein the sampling period is a preset duration, which can be set by the user or a default duration. The initial slope value of the vehicle slope sensor in each sampling period of a preset number of sampling periods is obtained.

[0028] For the initial slope values ​​of each two adjacent sampling periods: the initial slope values ​​of the two adjacent sampling periods are subjected to difference processing to obtain the difference of the initial slope values ​​between the two adjacent sampling periods. According to this method, multiple slope difference values ​​are obtained.

[0029] Exemplarily, the preset number is 10, then the initial slope values ​​of the vehicle slope sensor of 10 sampling periods are obtained, and the difference between the initial slope values ​​of two adjacent sampling periods is calculated to obtain 9 slope difference values.

[0030] Step 102: Compare each of the plurality of slope difference values ​​with a preset difference value to obtain a comparison result.

[0031] In a specific implementation, a preset difference is obtained, and each of the multiple slope difference values ​​is compared with the preset difference value to obtain a comparison result. The comparison result includes any of the following: each of the multiple slope difference values ​​is greater than or equal to the preset difference value, each of the multiple slope difference values ​​is less than the preset difference value, and each of the multiple slope difference values ​​has both a slope difference value greater than or equal to the preset difference value and a slope difference value less than the preset difference value.

[0032] Exemplarily, the preset difference is 0, then the slope difference is greater than the preset difference, which means that the slope value of the next sampling period is greater than the slope value of the previous sampling period, the slope difference is less than the preset difference, which means that the slope value of the next sampling period is less than the slope value of the previous sampling period, and the slope difference is equal to the preset difference, which means that the slope value of the next sampling period is equal to the slope value of the previous sampling period.

[0033] Step 103: Correct the initial slope value of each sampling period according to the comparison result to obtain the road surface slope corresponding to each sampling period.

[0034] In specific implementation, the slope type of the vehicle in multiple sampling periods can be first determined based on the comparison results, and the slope type includes at least one of the following: uphill, downhill, flat slope, or ups and downslope, where ups and downslope means that the road surface where the vehicle is located in multiple sampling periods has both ups and downslopes, which is an uneven road surface.

[0035] The initial slope value of each sampling period is adjusted according to the comparison result, that is, adjusted according to the slope type to obtain the road surface slope corresponding to each sampling period, so that the road surface slope corresponding to each sampling period is more consistent with the slope type, and the slope determination is more accurate.

[0036] Through the above scheme, the initial slope value of the vehicle slope sensor of a preset number of sampling periods is obtained, the difference of the initial slope value between two adjacent sampling periods is determined, and multiple slope difference values ​​are obtained. The slope difference value is obtained by collecting the values ​​of the slope sensor of multiple periods, and the slope value is subsequently determined according to the slope difference value, which makes the determination of the slope value more accurate and reduces the contingency. Each slope difference value in the multiple slope difference values ​​is compared with the preset difference value to obtain a comparison result, and the initial slope value of each sampling period is adjusted according to the comparison result to obtain the road surface slope corresponding to each sampling period. By adjusting the initial slope value, the jitter phenomenon is eliminated, so that the slope value is smoothed, and the accuracy of measuring the slope value is improved.

[0037] In some embodiments, obtaining the initial slope value of the vehicle slope sensor for a preset number of sampling periods in step 101 specifically includes:

[0038] The operation cycle of the slope sensor and the maximum delay time allowed by the slope are determined, and the preset number is determined according to the operation cycle, the sampling cycle and the maximum delay time.

[0039] For example, the operation cycle is 10ms, the sampling cycle is 30ms, that is, one sampling is performed every three operation cycles. The maximum delay time allowed by the slope is 300ms, at which time there are 300 / 30=10 samples in 300ms, that is, the preset number is 10.

[0040] For the initial slope value of the vehicle slope sensor in each sampling period, the slope value corresponding to each operating period within the sampling period is first determined, and then the average of the slope values ​​corresponding to the multiple operating periods is calculated as the initial slope value of the vehicle slope sensor in the sampling period.

[0041] Exemplarily, the slope values ​​corresponding to each operating cycle in sampling period A are 13, 17, and 15 respectively, and the initial slope value of the vehicle slope sensor in sampling period A is 15.

[0042] In some embodiments, step 103 specifically includes:

[0043] Step 1031 , in response to the comparison result that each of the multiple slope difference values ​​is greater than or equal to the preset difference value, all the slope difference values ​​are averaged to obtain a first average value.

[0044] Step 1032: The initial slope value corresponding to the earliest sampling period is used as the road surface slope corresponding to the earliest sampling period.

[0045] Step 1033: The initial slope values ​​of the other sampling periods except the earliest sampling period in the preset number of sampling periods are accumulated according to the first average value to obtain the road surface slopes corresponding to the other sampling periods.

[0046] In specific implementation, when the comparison result is that each of the multiple slope differences is greater than or equal to the preset difference, it means that the vehicle is in an uphill state in multiple sampling periods, and all the slope differences are averaged, that is, the average value of all the slope differences is calculated to obtain the first mean.

[0047] The initial slope value corresponding to the earliest sampling period is used as the road surface slope corresponding to the earliest sampling period, that is, the starting value is the return value of the original slope sensor, that is, the initial slope value corresponding to the earliest sampling period of the slope sensor.

[0048] For the other sampling periods except the earliest sampling period in the preset number of sampling periods: the initial slope values ​​are accumulated according to the first mean value to obtain the road surface slopes corresponding to the other sampling periods.

[0049] Exemplarily, the initial slope values ​​of the vehicle slope sensor of 10 sampling periods are obtained, which are 10, 11, 13, 15, 16, 17, 20, 23, 25, and 28 respectively. The difference between the initial slope values ​​of two adjacent sampling periods is calculated to obtain 9 slope differences, which are 1, 2, 2, 1, 1, 3, 3, 2, and 3 respectively. The average of all slope differences is calculated to obtain a first mean value, which is 2. It is determined that the initial slope value corresponding to the earliest sampling period is 10, and the road slopes corresponding to other sampling periods are 13, 17, 21, 24, 27, 32, 37, 41, and 46 respectively.

[0050] Through the above scheme, when the comparison result is that each of the multiple slope difference values ​​is greater than or equal to the preset difference value, it means that the vehicle is in an uphill state in multiple sampling cycles. After calculating the average of all slope difference values, the original slope sensor return value of the sample is recalculated, thereby realizing smoothing of the slope value and improving the accuracy of slope determination.

[0051] In some embodiments, for the road surface slope corresponding to the earliest sampling period, in addition to using the initial slope value corresponding to the earliest sampling period, if there is a road surface slope corresponding to the last sampling period determined by this method in the previous period, the road surface slope corresponding to the last sampling period determined by this method in the previous period can be used as the road surface slope corresponding to the earliest sampling period of this period.

[0052] In some embodiments, step 103 specifically includes:

[0053] Step 103A: in response to the comparison result that each of the multiple slope differences is smaller than the preset difference, all the slope differences are averaged to obtain a second average.

[0054] Step 103B: taking the initial slope value corresponding to the earliest sampling period as the road surface slope corresponding to the earliest sampling period.

[0055] Step 103C: perform cumulative subtraction processing on the initial slope values ​​of other sampling periods except the earliest sampling period among the preset number of sampling periods according to the second mean value to obtain the road surface slopes corresponding to the other sampling periods.

[0056] In specific implementation, when the comparison result is that each of the multiple slope differences is smaller than the preset difference, it means that the vehicle is in a downhill state in multiple sampling periods, and all the slope differences are averaged, that is, the average value of all the slope differences is calculated to obtain a second mean.

[0057] The initial slope value corresponding to the earliest sampling period is used as the road surface slope corresponding to the earliest sampling period, that is, the starting value is the return value of the original slope sensor, that is, the initial slope value corresponding to the earliest sampling period of the slope sensor.

[0058] For the other sampling periods except the earliest sampling period in the preset number of sampling periods: the initial slope value is cumulatively subtracted according to the second mean value to obtain the road surface slopes corresponding to the other sampling periods.

[0059] Exemplarily, the initial slope values ​​of the vehicle slope sensor of 10 sampling periods are obtained, which are 26, 23, 21, 18, 15, 14, 13, 11, 9, and 8 respectively. The difference between the initial slope values ​​of two adjacent sampling periods is calculated, and 9 slope differences are obtained, which are -3, -2, -3, -3, -1, -1, -2, -2, and -1 respectively. The average of all slope differences is calculated to obtain the second mean, which is -2. It is determined that the initial slope value corresponding to the earliest sampling period is 26, and the road slopes corresponding to the other sampling periods are 21, 17, 12, 7, 4, 1, -3, -7, and -10 respectively.

[0060] Through the above scheme, when the comparison result is that each of the multiple slope difference values ​​is smaller than the preset difference value, it means that the vehicle is in a downhill state in multiple sampling cycles. After calculating the average of all the slope difference values, the original slope sensor return value of the sample is recalculated, thereby achieving smoothing of the slope value and improving the accuracy of slope determination.

[0061] In some embodiments, step 103 specifically includes:

[0062] Step 103a, in response to the comparison result that there is a slope difference value greater than or equal to the preset difference value and there is a slope difference value less than the preset difference value among the multiple slope difference values, determine the slope type according to the multiple slope difference values.

[0063] Step 103b: correct the initial slope value of each sampling period according to the slope type to obtain the road surface slope corresponding to each sampling period.

[0064] In specific implementation, when the comparison result is that there is a slope difference value greater than or equal to the preset difference value, and there is a slope difference value less than the preset difference value among multiple slope difference values, the vehicle may be located on uneven uphill and downhill slopes, resulting in a slope difference value that is both greater than or equal to the preset difference and less than the preset difference; the vehicle may also be located on a flat slope, and due to the acquisition error of the slope sensor, the slope difference value is both greater than or equal to the preset difference and less than the preset difference.

[0065] First, the slope type is determined according to a plurality of slope differences, the slope type being a flat slope or an uphill or downhill slope, and the initial slope value of each sampling period is adjusted according to the slope type to obtain the road surface slope corresponding to each sampling period.

[0066] Through the above scheme, when there is a slope difference value greater than or equal to the preset difference value among multiple slope difference values, and there is a slope difference value less than the preset difference value, the slope type is first determined, and then the initial slope value of each sampling period is adjusted, so that the adjustment of the initial slope value is more accurate.

[0067] In some embodiments, step 103a specifically includes:

[0068] Step 103a1, performing mean processing and variance processing on all slope differences to obtain a third mean and a first variance.

[0069] Step 103a2: Determine a slope type corresponding to the third mean and the first variance according to the third mean and the first variance.

[0070] In specific implementation, all the slope differences are processed by average to obtain a third mean, and all the slope differences are processed by variance to obtain a first variance.

[0071] The database pre-stores the correspondence between the mean and variance and the slope type, and the correspondence includes a table, a key-value pair, etc. Therefore, the slope type corresponding to the third mean and the first variance is found according to the third mean and the first variance, and the slope type is a flat slope or an uphill slope.

[0072] In some embodiments, step 103b specifically includes:

[0073] Step 103b1, in response to the slope type being a flat slope, taking the initial slope value corresponding to each sampling period as the road surface slope corresponding to each sampling period.

[0074] In specific implementation, when the slope type is determined to be a flat slope based on the third mean and the first variance, there is no need to adjust the initial slope value using the third mean, and the initial slope value corresponding to each sampling period is used as the road surface slope corresponding to each sampling period.

[0075] In some embodiments, step 103b specifically includes:

[0076] Step 103ba, in response to the slope type being uphill or downhill, taking a slope difference value among multiple slope differences that is greater than or equal to the preset difference value as a first target slope difference value, determining a first slope adjustment value corresponding to the first target slope difference value, and taking a slope difference value among multiple slope differences that is less than the preset difference value as a second target slope difference value, determining a second slope adjustment value corresponding to the second target slope difference value.

[0077] Step 103bb: taking the initial slope value corresponding to the earliest sampling period as the road surface slope corresponding to the earliest sampling period.

[0078] Step 103bc, taking the sampling period corresponding to the slope difference value greater than or equal to the preset difference value among the multiple slope differences as the first target period, and accumulating the initial slope value of the first target period according to the first slope adjustment value to obtain the road surface slope corresponding to the first target period.

[0079] Step 103bd, taking the sampling period corresponding to the slope difference value less than the preset difference value among the multiple slope differences as the second target period, and for the initial slope value of the second target period, performing cumulative subtraction processing on the initial slope value according to the second slope adjustment value to obtain the road surface slope corresponding to the second target period.

[0080] In a specific implementation, when the slope type is determined to be uphill or downhill according to the third mean and the first variance, multiple slope differences are classified, and slope differences greater than or equal to the preset difference are classified into one category as the first target slope difference. Slope differences less than the preset difference are classified into one category as the second target slope difference. A first slope adjustment value corresponding to the first target slope difference and a second slope adjustment value corresponding to the second target slope difference are respectively determined.

[0081] The specific method for determining the first slope adjustment value and the second slope adjustment value is:

[0082] All first target slope differences are averaged, that is, the average of the first target slope differences is calculated to obtain the first slope adjustment value. All second target slope differences are averaged, that is, the average of the second target slope differences is calculated to obtain the second slope adjustment value.

[0083] The initial slope value corresponding to the earliest sampling period is used as the road surface slope corresponding to the earliest sampling period. For the other sampling periods except the earliest sampling period in the preset number of sampling periods, the sampling period corresponding to the slope difference value greater than or equal to the preset difference value among the multiple slope difference values ​​is used as the first target period, and the sampling period corresponding to the slope difference value less than the preset difference value among the multiple slope difference values ​​is used as the second target period.

[0084] For the initial slope value of the first target cycle, the initial slope value is accumulated according to the first slope adjustment value to obtain the road surface slope corresponding to the first target cycle. For the initial slope value of the second target cycle, the initial slope value is accumulated according to the second slope adjustment value to obtain the road surface slope corresponding to the second target cycle.

[0085] Exemplarily, the initial slope values ​​of the vehicle slope sensor of 10 sampling periods are obtained, which are 10, 13, 11, 15, 14, 16, 18, 21, 19, and 23 respectively. The difference between the initial slope values ​​of two adjacent sampling periods is calculated to obtain 9 slope difference values, which are 3, -2, 4, -1, 2, 2, 3, -2, and 4 respectively. If the slope type is uphill or downhill, the first target slope difference is determined to be 3, 4, 2, 2, 3, and 4, and the second target slope difference is -2, -2, and -2.

[0086] The first slope adjustment value corresponding to the first target slope difference is determined to be 3, and the second slope adjustment value corresponding to the second target slope difference is determined to be -2. The initial slope value corresponding to the earliest sampling period is determined to be 10, and the initial slope value is accumulated according to the first slope adjustment value, and the initial slope value is accumulated according to the second slope adjustment value. The road slopes corresponding to each other period are obtained as 16, 9, 21, 10, 25, 30, 36, 13, and 41.

[0087] Through the above scheme, when the slope type is uphill or downhill, the first slope adjustment value for uphill and the second slope adjustment value for downhill are determined respectively, and the corresponding initial slope value is adjusted according to the first slope adjustment value and the second slope adjustment value respectively, so that the obtained road surface slope is more accurate.

[0088] Based on the same inventive concept, another embodiment of the present disclosure provides a method for determining a road surface slope, comprising:

[0089] According to the requirements of the slope signal usage scenario, the maximum delay time allowed for obtaining the slope is 300ms. 300ms is divided into several parts according to the program operation cycle. Specifically, the operation cycle is 10ms, and one sample is taken every 3 operation cycles, so there are 300 / 30=10 samples in 300ms.

[0090] In 300ms, the slope sensor return value is stored once in each sampling period, and a total of ten groups S1~S10 are obtained. The value of Sn+1-Sn is calculated, and a total of 9 groups of differences are obtained. The signs of the 9 groups of Sn+1-Sn are judged to determine which of the following situations they meet.

[0091] Case A: If all are greater than or equal to 0, it can be determined that the current vehicle is in an uphill state.

[0092] Case B: If all are less than 0, it is determined that the vehicle is in a downhill state.

[0093] Case C: If all the differences change from positive to negative, the vehicle changes from an uphill to a downhill state or the vehicle is on a flat road.

[0094] Case D: If all the differences change from negative to positive, the vehicle changes from a downhill to an uphill state or the vehicle is on a flat road.

[0095] If A is satisfied, the average value of the 9 groups of Sn+1-S values ​​is calculated, and the original 10 groups of slope sensor return values ​​sampled are recalculated. The starting value is the original slope sensor return value, or the last value calculated by this method in the previous cycle (if any). The last 9 groups of values ​​are accumulated according to the calculated difference average value, that is, the average difference is used as the gradient increase.

[0096] If condition B is satisfied, the average value of the 9 groups of Sn+1-S values ​​is calculated, and the original 10 groups of slope sensor return values ​​sampled are recalculated. The starting value is the original slope sensor return value, or the last value calculated by this method in the previous cycle (if any). The last 9 groups of values ​​are cumulatively subtracted according to the calculated difference average value, that is, the average difference is used as the gradient decrease.

[0097] If C or D is satisfied, the average and variance values ​​of the 9 groups of Sn+1-S values ​​are calculated, and the output slope type is determined by looking up the table based on the actual vehicle experience of the average and variance values, where the slope type is flat or uphill. Specifically, the smaller the absolute value of the average and the larger the variance, the closer the actual slope is to a flat road, otherwise it is an uphill and downhill turning condition.

[0098] If it is a flat slope, the original 10 groups of slope sensor return values ​​sampled are recalculated, and all are the original slope sensor return values. If it is an uphill or downhill turn, the original 10 groups of slope sensor return values ​​sampled are recalculated, starting with the original slope sensor return value, and the 9 groups of difference values ​​are averaged by sign (those greater than or equal to 0 are put together to take the average value aa, and those less than 0 are put together to take the average value bb), and then the average value of aa and bb is taken as the gradient, and the slope of the original sensor return value is added and subtracted according to the up and down order of the slope, using this average value as the gradient to obtain the reprocessed slope value.

[0099] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0100] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0101] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a road surface slope determination device.

[0102] refer to Figure 2 , Figure 2 The road surface slope determination device of the embodiment includes:

[0103] The difference determination module 201 is configured to obtain an initial slope value of the vehicle slope sensor in each sampling period in a preset number of sampling periods, determine a difference between the initial slope values ​​of two adjacent sampling periods, and obtain a plurality of slope difference values;

[0104] A comparison module 202 is configured to compare each of the plurality of slope difference values ​​with a preset difference value to obtain a comparison result;

[0105] The slope determination module 203 is configured to correct the initial slope value of each sampling period according to the comparison result to obtain the road surface slope corresponding to each sampling period.

[0106] In some embodiments, the slope determination module 203 is specifically configured as follows:

[0107] In response to the comparison result that each of the plurality of slope difference values ​​is greater than or equal to the preset difference value, performing average processing on all the slope difference values ​​to obtain a first average value;

[0108] The initial slope value corresponding to the earliest sampling period is used as the road surface slope corresponding to the earliest sampling period;

[0109] The initial slope values ​​of the other sampling periods except the earliest sampling period in the preset number of sampling periods are accumulated according to the first average value to obtain the road surface slopes corresponding to the other sampling periods.

[0110] In some embodiments, the slope determination module 203 is specifically configured as follows:

[0111] In response to the comparison result that each of the plurality of slope differences is smaller than the preset difference, performing average processing on all the slope differences to obtain a second average;

[0112] The initial slope value corresponding to the earliest sampling period is used as the road surface slope corresponding to the earliest sampling period;

[0113] The initial slope values ​​of other sampling periods except the earliest sampling period in a preset number of sampling periods are cumulatively subtracted according to the second mean value to obtain the road surface slopes corresponding to the other sampling periods.

[0114] In some embodiments, the slope determination module 203 specifically includes:

[0115] a slope type determining unit configured to determine the slope type according to the plurality of slope difference values ​​in response to the comparison result being that there is a slope difference value greater than or equal to the preset difference value and there is a slope difference value less than the preset difference value among the plurality of slope difference values;

[0116] The slope determination unit is configured to correct the initial slope value of each sampling period according to the slope type to obtain the road surface slope corresponding to each sampling period.

[0117] In some embodiments, the slope type determination unit is specifically configured to:

[0118] All slope differences are processed by mean and variance to obtain the third mean and first variance;

[0119] A slope type corresponding to the third mean and the first variance is determined according to the third mean and the first variance.

[0120] In some embodiments, the slope determination unit is specifically configured to:

[0121] In response to the slope type being a flat slope, the initial slope value corresponding to each sampling period is used as the road surface slope corresponding to each sampling period.

[0122] In some embodiments, the slope determination unit is specifically configured to:

[0123] In response to the slope type being uphill or downhill, taking a slope difference value greater than or equal to the preset difference value among the multiple slope difference values ​​as a first target slope difference value, determining a first slope adjustment value corresponding to the first target slope difference value, and taking a slope difference value less than the preset difference value among the multiple slope difference values ​​as a second target slope difference value, determining a second slope adjustment value corresponding to the second target slope difference value;

[0124] The initial slope value corresponding to the earliest sampling period is used as the road surface slope corresponding to the earliest sampling period;

[0125] The sampling period corresponding to the slope difference value greater than or equal to the preset difference value among the multiple slope difference values ​​is taken as the first target period, and for the initial slope value of the first target period, the initial slope value is accumulated according to the first slope adjustment value to obtain the road surface slope corresponding to the first target period;

[0126] The sampling period corresponding to the slope difference value smaller than the preset difference value among multiple slope differences is taken as the second target period, and for the initial slope value of the second target period, the initial slope value is cumulatively subtracted according to the second slope adjustment value to obtain the road surface slope corresponding to the second target period.

[0127] In some embodiments, determining the first slope adjustment value corresponding to the first target slope difference value includes:

[0128] Performing average processing on all first target slope differences to obtain a first slope adjustment value;

[0129] The step of determining a second slope adjustment value corresponding to the second target slope difference value includes:

[0130] All second target slope differences are averaged to obtain a second slope adjustment value.

[0131] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0132] The device of the above embodiment is used to implement the corresponding road slope determination method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0133] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for determining the road slope described in any of the above-mentioned embodiments is implemented.

[0134] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0135] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0136] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0137] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0138] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0139] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).

[0140] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0141] The electronic device of the above embodiment is used to implement the corresponding road slope determination method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0142] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the road slope determination method described in any of the above embodiments.

[0143] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0144] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the road slope determination method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0145] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides a vehicle, including the road slope determination device in the above-mentioned embodiments, the electronic device in the above-mentioned embodiments, and the computer-readable storage medium in the above-mentioned embodiments, and the vehicle equipment implements the road slope determination method described in any of the above embodiments.

[0146] The vehicle of the above-mentioned embodiment is used to implement the road slope determination method described in any of the above-mentioned embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0147] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0148] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0149] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0150] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0151] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.

[0152] In addition, to simplify the description and discussion, and in order not to obscure the embodiments of the present disclosure, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, devices may be shown in the form of block diagrams to avoid obscuring the embodiments of the present disclosure, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0153] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the discussed embodiments.

[0154] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the protection scope of the present disclosure.

Claims

1. A method for determining a road surface slope, characterized in that: include: Obtaining an initial slope value of a vehicle slope sensor in each sampling period in a preset number of sampling periods, determining a difference between the initial slope values ​​of two adjacent sampling periods, and obtaining a plurality of slope difference values; Comparing each of the plurality of slope difference values ​​with a preset difference value to obtain a comparison result; Correcting the initial slope value of each sampling period according to the comparison result to obtain the road surface slope corresponding to each sampling period; The initial slope value of each sampling period is corrected according to the comparison result to obtain the road surface slope corresponding to each sampling period, including: In response to the comparison result that each of the plurality of slope difference values ​​is greater than or equal to the preset difference value, performing average processing on all the slope difference values ​​to obtain a first average value; The initial slope value corresponding to the earliest sampling period is used as the road surface slope corresponding to the earliest sampling period; The initial slope values ​​of the other sampling periods except the earliest sampling period in the preset number of sampling periods are accumulated according to the first average value to obtain the road surface slopes corresponding to the other sampling periods.

2. The method according to claim 1, characterized in that The initial slope value of each sampling period is corrected according to the comparison result to obtain the road surface slope corresponding to each sampling period, including: In response to the comparison result that each of the plurality of slope differences is smaller than the preset difference, performing average processing on all the slope differences to obtain a second average; The initial slope value corresponding to the earliest sampling period is used as the road surface slope corresponding to the earliest sampling period; The initial slope values ​​of other sampling periods except the earliest sampling period in a preset number of sampling periods are cumulatively subtracted according to the second mean value to obtain the road surface slopes corresponding to the other sampling periods.

3. The method according to claim 1, characterized in that The initial slope value of each sampling period is corrected according to the comparison result to obtain the road surface slope corresponding to each sampling period, including: In response to the comparison result that there is a slope difference value greater than or equal to the preset difference value and there is a slope difference value less than the preset difference value among the multiple slope difference values, determining the slope type according to the multiple slope difference values; The initial slope value of each sampling period is corrected according to the slope type to obtain the road surface slope corresponding to each sampling period.

4. The method according to claim 3, characterized in that The step of determining the slope type according to the plurality of slope difference values ​​comprises: All slope differences are processed by mean and variance to obtain the third mean and first variance; A slope type corresponding to the third mean and the first variance is determined according to the third mean and the first variance.

5. The method according to claim 3, characterized in that: The initial slope value of each sampling period is corrected according to the slope type to obtain the road surface slope corresponding to each sampling period, including: In response to the slope type being a flat slope, the initial slope value corresponding to each sampling period is used as the road surface slope corresponding to each sampling period.

6. The method according to claim 3, characterized in that: The initial slope value of each sampling period is corrected according to the slope type to obtain the road surface slope corresponding to each sampling period, including: In response to the slope type being uphill or downhill, taking a slope difference value greater than or equal to the preset difference value among the multiple slope difference values ​​as a first target slope difference value, determining a first slope adjustment value corresponding to the first target slope difference value, and taking a slope difference value less than the preset difference value among the multiple slope difference values ​​as a second target slope difference value, determining a second slope adjustment value corresponding to the second target slope difference value; The initial slope value corresponding to the earliest sampling period is used as the road surface slope corresponding to the earliest sampling period; The sampling period corresponding to the slope difference value greater than or equal to the preset difference value among the multiple slope difference values ​​is taken as the first target period, and for the initial slope value of the first target period, the initial slope value is accumulated according to the first slope adjustment value to obtain the road surface slope corresponding to the first target period; The sampling period corresponding to the slope difference value smaller than the preset difference value among multiple slope differences is taken as the second target period, and for the initial slope value of the second target period, the initial slope value is cumulatively subtracted according to the second slope adjustment value to obtain the road surface slope corresponding to the second target period.

7. The method according to claim 6, characterized in that The step of determining a first slope adjustment value corresponding to the first target slope difference value includes: Performing average processing on all first target slope differences to obtain a first slope adjustment value; The step of determining a second slope adjustment value corresponding to the second target slope difference value includes: All second target slope differences are averaged to obtain a second slope adjustment value.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program.

9. A vehicle, characterized in that: The electronic device comprising the electronic device described in claim 8.