CN109388782B - Method and device for determining relation function - Google Patents

Method and device for determining relation function Download PDF

Info

Publication number
CN109388782B
CN109388782B CN201811150595.3A CN201811150595A CN109388782B CN 109388782 B CN109388782 B CN 109388782B CN 201811150595 A CN201811150595 A CN 201811150595A CN 109388782 B CN109388782 B CN 109388782B
Authority
CN
China
Prior art keywords
distance
energy
function
relationship
relation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811150595.3A
Other languages
Chinese (zh)
Other versions
CN109388782A (en
Inventor
陈朝喜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201811150595.3A priority Critical patent/CN109388782B/en
Publication of CN109388782A publication Critical patent/CN109388782A/en
Application granted granted Critical
Publication of CN109388782B publication Critical patent/CN109388782B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/17Function evaluation by approximation methods, e.g. inter- or extrapolation, smoothing, least mean square method

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Optical Radar Systems And Details Thereof (AREA)
  • Radar Systems Or Details Thereof (AREA)

Abstract

The present disclosure relates to a method for determining a relationship function, comprising: training according to a first energy and a first distance in a first sample set to determine a plurality of relational functions of energy and distance; respectively bringing second energy in a second sample set into each relation function to obtain a predicted distance; and determining an objective relation function in a plurality of relation functions according to the relation between a second distance in the second sample set and a plurality of predicted distances. According to the embodiment of the disclosure, the second energy in the second sample set is respectively brought into each relation function to obtain the predicted distance, and the target relation function with the highest relation coincidence degree with the actual distance and energy can be determined in the relation functions based on the obtained relation between the predicted distance and the second distance in the second sample set, so that the follow-up distance sensor can accurately determine the distance according to the target relation.

Description

Method and device for determining relation function
Technical Field
The present disclosure relates to the field of sensor technology, and in particular, to a method for determining a relationship function, a device for determining a relationship function, an electronic apparatus, and a computer-readable storage medium.
Background
To determine the relationship between the energy of the object reflected signal received by the distance sensor and the distance between the object and the distance sensor, a relationship function of the energy and the distance may be generated. However, the relationship function may not be accurate, e.g. a relationship function obtained by linear fitting from the energy and distance in the sample, there may be under-fitting or over-fitting situations, resulting in a lower accuracy of determining the distance from the relationship function and the energy.
Disclosure of Invention
The present disclosure provides a method of determining a relationship function, a device of determining a relationship function, an electronic apparatus, and a computer-readable storage medium to solve the deficiencies in the related art.
According to a first aspect of embodiments of the present disclosure, a method for determining a relationship function is provided, applied to a distance sensor, the method including:
training according to first energy and first distance in a first sample set to determine a plurality of relation functions of energy and distance, wherein the first sample set comprises a plurality of first energies and first distances in one-to-one correspondence, and the energy of an object reflected signal received by the distance sensor when the distance sensor is at the first distance from an object is the first energy;
respectively bringing second energy in a second sample set into each relation function to obtain a predicted distance, wherein the second sample set comprises a plurality of second energies and second distances which are in one-to-one correspondence, and the energy of an object reflection signal received by the distance sensor when the distance sensor is away from an object by the second distances is the second energy;
and determining an objective relation function in a plurality of relation functions according to the relation between a second distance in the second sample set and a plurality of predicted distances.
Optionally, the determining an objective relationship function from a plurality of relationship functions according to a relationship between a second distance in the second sample set and a plurality of predicted distances includes:
calculating a difference between the second distance and a predicted distance obtained from a second energy corresponding to the second distance;
calculating the root mean square of the corresponding difference value of each second distance;
and determining a relation function corresponding to the predicted distance corresponding to the minimum root mean square as the target relation function.
Optionally, the method further comprises:
if a plurality of target relation functions are determined, determining the highest power of the independent variables in the target relation functions and the number of items containing the independent variables;
a final objective function is determined from the highest power and the number among a plurality of the objective functions.
Optionally, the number of first energies and first distances in the first sample set is greater than the number of second energies and second distances in the second sample set.
According to a second aspect of the embodiments of the present disclosure, a determining device of a relation function is proposed, applied to a distance sensor, the device comprising:
a training module configured to train according to a first energy and a first distance in a first set of samples, to determine a plurality of relationship functions of energy and distance, wherein the first set of samples includes a plurality of first energies and first distances in one-to-one correspondence, and the distance sensor receives an object reflected signal when the distance sensor is at the first distance from an object as the first energy;
a calculation module configured to bring second energy in a second sample set into each relation function to obtain a predicted distance, wherein the second sample set comprises a plurality of second energies and second distances which are in one-to-one correspondence, and the energy of an object reflection signal received by the distance sensor when the distance sensor is at the second distance from an object is the second energy;
and the determining module is used for determining an objective relation function in a plurality of relation functions according to the relation between the second distance in the second sample set and a plurality of predicted distances.
Optionally, the determining module includes:
a difference calculation sub-module configured to calculate a difference between the second distance and a predicted distance derived from a second energy corresponding to the second distance;
a root mean square calculation sub-module configured to calculate a root mean square of each of the second distance corresponding differences;
and the determining submodule is configured to determine a relation function corresponding to the predicted distance corresponding to the minimum root mean square as the target relation function.
Optionally, the apparatus further comprises:
a power determination module configured to determine a highest power of an argument in the objective relation function, if the determination submodule determines a plurality of objective relation functions;
a number determination module configured to determine a number of items containing arguments in the target relationship function, in a case where the determination submodule determines a plurality of target relationship functions;
wherein the determining module is further configured to determine a final objective function from the highest power and the number among a plurality of the objective functions.
Optionally, the number of first energies and first distances in the first sample set is greater than the number of second energies and second distances in the second sample set.
According to a third aspect of embodiments of the present disclosure, an electronic device adapted for a distance sensor is presented, the electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of any of the embodiments described above.
According to a fourth aspect of the disclosed embodiments, a computer-readable storage medium is provided, on which a computer program is stored, adapted for use in an electronic device, which program, when being executed by a processor, implements the steps of the method according to any of the embodiments described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
as can be seen from the foregoing embodiments, according to the present disclosure, a predicted distance is obtained by respectively bringing the second energy in the second sample set into each relationship function, and based on the obtained relationship between the predicted distance and the second distance in the second sample set, a target relationship function having the highest relationship between the actual distance and the energy may be determined from a plurality of relationship functions, so as to ensure that a subsequent distance sensor may accurately determine the distance according to the target relationship.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic flow chart diagram illustrating a method of determining a relationship function according to an embodiment of the present disclosure.
FIG. 2 is a schematic flow diagram illustrating a method for determining an objective relationship function among a plurality of relationship functions according to an embodiment of the present disclosure.
Fig. 3 is a schematic flow chart diagram illustrating another method of determining a relationship function according to an embodiment of the present disclosure.
Fig. 4 is a schematic block diagram of a determination device of a relationship function shown according to an embodiment of the present disclosure.
Fig. 5 is a schematic block diagram of a determination module shown in accordance with an embodiment of the present disclosure.
Fig. 6 is a schematic block diagram of another determination module shown in accordance with an embodiment of the present disclosure.
Fig. 7 is a schematic block diagram illustrating an apparatus for determining a relationship function according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a schematic flow chart diagram illustrating a method of determining a relationship function according to an embodiment of the present disclosure. The method for determining the relation function shown in the embodiment may be applied to a distance sensor, where the distance sensor may be an infrared distance sensor, and the distance between the object and the distance sensor may be determined according to the energy of the received infrared rays by emitting infrared rays and receiving the infrared rays reflected by the object, so as to achieve distance measurement.
As shown in fig. 1, the method for determining the relationship function includes the following steps:
training according to first energy and first distance in a first sample set to determine a plurality of relation functions of energy and distance, wherein the first sample set comprises a plurality of first energies and first distances in one-to-one correspondence, and the energy of an object reflection signal received by the distance sensor when the distance sensor is at the first distance from an object is the first energy;
in step S2, bringing second energies in a second sample set into each relation function to obtain a predicted distance, where the second sample set includes a plurality of second energies and second distances that are in one-to-one correspondence, and the energy of the object reflected signal received by the distance sensor when the distance sensor is at the second distance from the object is the second energy;
in step S3, an objective relationship function is determined among the plurality of relationship functions according to the relationship between the second distance in the second sample set and the plurality of predicted distances.
In one embodiment, the object may be placed in advance at different distances from the distance sensor, and then the energy of the reflected signal from the object is received after the signal transmitted from the distance sensor is recorded. The process is repeated for a plurality of times to obtain a plurality of energy and distances corresponding to one another, the obtained energy and distances corresponding to one another are divided into a first sample set, and the other part is divided into a second sample set.
In one embodiment, training is based on a first energy and a first distance in a first set of samples, may be performed by machine learning, which may be supervised machine learning, so that the training process can be stopped as needed during the training process to output a relationship function, and different relationship functions are obtained by setting conditions.
In one embodiment, the relationship function may be tested by a plurality of one-to-one second energies and second distances in a second set of samples different from the first set of samples, as the resulting relationship function is not necessarily accurate.
For example, the resulting relationship function is f (x) =ax m +bx m-1 +cx m-2 +. where x is the energy, f (x) is the energy, a, b and c are constants, m is an integer, and m is the highest power of x in f (x), a, b and c and m in different f (x) may be different, and the number of entries comprising x may also be different.
The second sample set comprises n one-to-one second energies and a second distance, wherein the second energies are x i The second distance is y i N is an integer greater than 1, i ε n. Example(s)If there are k relation functions f j (x) M is an integer greater than 0, j e k, the second energy x i Input to a relation function f j (x) Obtaining the predicted distance f j (x i )。
Due to the second energy x i Corresponding second distance y i For the actual distance, the second energy x i Input to a relation function f j (x) Obtained f j (x i ) To predict the distance, therefore, the distance f j (x i ) From the actual distance y i The smaller the difference, the description f j (x) The more accurate.
Thus, a relationship of the second distance and the plurality of predicted distances in the second sample set may be determined, e.g. for a relationship function f 1 (x) Respectively determining the second distances y i And each predicted distance f 1 (x i ) Absolute value y of difference of (2) i -f 1 (x i ) I, then calculate the sum of absolute values D of the differences corresponding to the n second distances 1 =|y 1 -f 1 (x 1 )|+|y 2 -f 1 (x 2 )|+…+|y n -f 1 (x n ) | a. The invention relates to a method for producing a fibre-reinforced plastic composite. And then for each f j (x) Respectively calculating the sum of absolute values D of the differences j Minimum D j Corresponding relation function f j (x) I.e. as a target relationship function.
The second energy in the second sample set is respectively brought into each relation function to obtain a predicted distance, and based on the obtained predicted distance and the relation of the second distance in the second sample set, the target relation function with the highest relation coincidence degree with the actual distance and energy can be determined in a plurality of relation functions, so that the follow-up distance sensor can accurately determine the distance according to the target relation.
FIG. 2 is a schematic flow diagram illustrating a method for determining an objective relationship function among a plurality of relationship functions according to an embodiment of the present disclosure. As shown in fig. 2, on the basis of the embodiment shown in fig. 1, the determining an objective relationship function from a plurality of relationship functions according to the relationship between the second distance in the second sample set and the plurality of predicted distances includes:
in step S31, calculating a difference between the second distance and a predicted distance obtained from a second energy corresponding to the second distance;
in step S32, calculating the root mean square of the difference value corresponding to each second distance;
in step S33, a relationship function corresponding to the predicted distance corresponding to the minimum root mean square is determined as the target relationship function.
In one embodiment, the second distance y may be calculated first i And according to the second distance y i Corresponding second energy x i The obtained predicted distance f j (x i ) Is the difference y of (2) i -f j (x i ) Then for each second distance y i Corresponding difference y i -f j (x i ) Calculating root mean square
Figure BDA0001817871080000071
And then the minimum root mean square minw j Corresponding predicted distance f j (x i ) Corresponding relation function f j (x) Is determined as an objective relationship function.
The objective function is determined based on the minimum root mean square, and the determination result is more accurate than the determination of the objective function based on the sum of absolute values of the differences in the embodiment shown in fig. 1.
Fig. 3 is a schematic flow chart diagram illustrating another method of determining a relationship function according to an embodiment of the present disclosure. As shown in fig. 3, on the basis of the embodiment shown in fig. 1, the method further includes:
if a plurality of objective relation functions are determined, determining the highest power of the independent variables in the objective relation functions and the number of items containing the independent variables in the step S4;
in step S5, a final objective function is determined among a plurality of said objective functions based on said highest power and said number.
In one embodiment, in some cases, multiple objective relationship functions may be determined, such as calculating the sum of absolute values of differences based on the embodiment shown in FIG. 1, with the sum of absolute values of differences being multiple minimum, or calculating the root mean square based on the embodiment shown in FIG. 2, with the root mean square being multiple minimum.
In this case, the highest power of the argument in the objective function, and the number of terms containing the argument, i.e., f (x) =ax, can be further determined m +bx m-1 +cx m-2 +. in the values of m and the number of entries containing x.
For example f (x) =ax 2 +bx+c, then m=2, the number of entries containing x is 2, e.g. f (x) =ax 2 Then m=2, the number of entries containing x is 1, and so on.
Since the energy and distance relationship, although not absolutely determined in advance, is relatively determined, i.e. the user may know in advance that the energy and distance satisfy a certain relationship, e.g. in general, the energy and distance are inversely related, i.e. the larger the distance is, the smaller the energy is, so that f (x) with the highest power (e.g. m > 2) must not represent the actual energy and distance relationship, while the number of items comprising x (e.g. the number is greater than 3) is too large, f (x) may change monotonically frequently during the change of x, and such f (x) may also represent the actual energy and distance relationship.
Thus, a final objective function may be determined from the highest power and the number among the plurality of objective functions, with the function being determined to be the final objective function with the highest power being lower (e.g., m < 2) and the number being smaller (e.g., less than 3).
Optionally, the number of first energies and first distances in the first sample set is greater than the number of second energies and second distances in the second sample set.
In one embodiment, the second energy and the second distance in the second sample set are tested only on the obtained relationship function, as training based on the first energy and the first distance in the first sample set is required. Therefore, the number of first energies and first distances may be high in order to obtain a relatively accurate relationship function, thereby avoiding that the obtained relationship function is inaccurate, and thus that no matter how the relationship function is tested by the second energy and the second distance in the second sample set, no accurate target relationship function can be determined.
Corresponding to the embodiments of the relationship function method described above, the present disclosure also provides embodiments of the relationship function apparatus.
Fig. 4 is a schematic block diagram of a determination device of a relationship function shown according to an embodiment of the present disclosure. The determining device of the relation function shown in the present embodiment may be applied to a distance sensor, where the distance sensor may be an infrared distance sensor, and distance measurement may be achieved by emitting infrared rays and receiving infrared rays reflected by an object, and determining the distance from the object to the distance sensor based on the energy of the received infrared rays.
As shown in fig. 4, the determining means of the relationship function may include:
a training module 1 configured to train according to a first energy and a first distance in a first sample set to determine a plurality of relation functions of energy and distance, wherein the first sample set comprises a plurality of first energies and first distances in one-to-one correspondence, and the energy of an object reflected signal received by the distance sensor when the distance sensor is at the first distance from an object is the first energy;
a calculation module 2, configured to bring second energy in a second sample set into each relation function to obtain a predicted distance, wherein the second sample set comprises a plurality of second energies and second distances which are in one-to-one correspondence, and the energy of the object reflection signal received by the distance sensor when the distance sensor is at the second distance from the object is the second energy;
a determining module 3, configured to determine an objective relationship function from a plurality of relationship functions according to a relationship between a second distance in the second sample set and a plurality of predicted distances.
Fig. 5 is a schematic block diagram of a determination module shown in accordance with an embodiment of the present disclosure. As shown in fig. 5, on the basis of the embodiment shown in fig. 4, the determining module 3 includes:
a difference calculation sub-module 31 configured to calculate a difference between the second distance and a predicted distance obtained from a second energy corresponding to the second distance;
a root mean square calculation sub-module 32 configured to calculate a root mean square of each of the second distance correspondence differences;
a determining sub-module 33 configured to determine a relationship function corresponding to a predicted distance corresponding to a minimum root mean square as the target relationship function.
Fig. 6 is a schematic block diagram of another determination module shown in accordance with an embodiment of the present disclosure. As shown in fig. 6, on the basis of the embodiment shown in fig. 4, the apparatus further includes:
a power determination module 4 configured to determine the highest power of the argument in the objective relation function in case the determination submodule determines a plurality of objective relation functions;
a number determination module 5 configured to determine the number of items containing arguments in the target relationship function, in the case where the determination submodule determines a plurality of target relationship functions;
wherein the determining module 3 is further configured to determine a final objective function from the highest power and the number among a plurality of the objective functions.
Optionally, the number of first energies and first distances in the first sample set is greater than the number of second energies and second distances in the second sample set.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the related methods, and will not be described in detail herein.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the objectives of the disclosed solution. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Embodiments of the present disclosure also provide an electronic device adapted for a distance sensor, the electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of any of the embodiments described above.
Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, adapted to be used in an electronic device, which program, when being executed by a processor, implements the steps of the method according to any of the embodiments described above.
Fig. 7 is a schematic block diagram illustrating an apparatus 700 for determining a relationship function according to an embodiment of the present disclosure. For example, apparatus 700 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 7, an apparatus 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the apparatus 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 702 can include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the apparatus 700. Examples of such data include instructions for any application or method operating on the apparatus 700, contact data, phonebook data, messages, pictures, videos, and the like. The memory 704 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 700.
The multimedia component 708 includes a screen between the device 700 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the apparatus 700 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 further includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the apparatus 700. For example, the sensor assembly 714 may detect an on/off state of the device 700, a relative positioning of the components, such as a display and keypad of the device 700, a change in position of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, an orientation or acceleration/deceleration of the device 700, and a change in temperature of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate communication between the apparatus 700 and other devices in a wired or wireless manner. The apparatus 700 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 716 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic elements for executing the methods described in any one of the embodiments above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 704, including instructions executable by processor 720 of apparatus 700 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A method of determining a relationship function for use with a distance sensor, the method comprising:
training according to first energy and first distance in a first sample set to determine a plurality of relation functions of energy and distance, wherein the first sample set comprises a plurality of first energies and first distances in one-to-one correspondence, and the energy of an object reflected signal received by the distance sensor when the distance sensor is at the first distance from an object is the first energy;
respectively bringing second energy in a second sample set into each relation function to obtain a predicted distance, wherein the second sample set comprises a plurality of second energies and second distances which are in one-to-one correspondence, and the energy of an object reflection signal received by the distance sensor when the distance sensor is away from an object by the second distances is the second energy;
determining a target relationship function from a plurality of relationship functions according to the relationship between a second distance in the second sample set and a plurality of predicted distances;
said determining an objective relationship function from a plurality of said relationship functions based on a relationship of a second distance in said second set of samples and a plurality of said predicted distances comprises:
calculating a difference between the second distance and a predicted distance obtained from a second energy corresponding to the second distance;
calculating the root mean square of the corresponding difference value of each second distance;
and determining a relation function corresponding to the predicted distance corresponding to the minimum root mean square as the target relation function.
2. The method as recited in claim 1, further comprising:
if a plurality of target relation functions are determined, determining the highest power of the independent variables in the target relation functions and the number of items containing the independent variables;
a final objective function is determined from the highest power and the number among a plurality of the objective functions.
3. The method of claim 1 or 2, wherein the number of first energies and first distances in one-to-one correspondence in the first set of samples is greater than the number of second energies and second distances in one-to-one correspondence in the second set of samples.
4. A device for determining a relationship function, for application to a distance sensor, the device comprising:
a training module configured to train according to a first energy and a first distance in a first set of samples, to determine a plurality of relationship functions of energy and distance, wherein the first set of samples includes a plurality of first energies and first distances in one-to-one correspondence, and the distance sensor receives an object reflected signal when the distance sensor is at the first distance from an object as the first energy;
a calculation module configured to bring second energy in a second sample set into each relation function to obtain a predicted distance, wherein the second sample set comprises a plurality of second energies and second distances which are in one-to-one correspondence, and the energy of an object reflection signal received by the distance sensor when the distance sensor is at the second distance from an object is the second energy;
a determining module, configured to determine an objective relationship function from a plurality of relationship functions according to a relationship between a second distance in the second sample set and a plurality of predicted distances;
the determining module includes:
a difference calculation sub-module configured to calculate a difference between the second distance and a predicted distance derived from a second energy corresponding to the second distance;
a root mean square calculation sub-module configured to calculate a root mean square of each of the second distance corresponding differences;
and the determining submodule is configured to determine a relation function corresponding to the predicted distance corresponding to the minimum root mean square as the target relation function.
5. The apparatus as recited in claim 4, further comprising:
a power determination module configured to determine a highest power of an argument in the objective relation function, if the determination submodule determines a plurality of objective relation functions;
a number determination module configured to determine a number of items containing arguments in the target relationship function, in a case where the determination submodule determines a plurality of target relationship functions;
wherein the determining module is further configured to determine a final objective function from the highest power and the number among a plurality of the objective functions.
6. The apparatus of claim 4 or 5, wherein the number of first energies and first distances in one-to-one correspondence in the first set of samples is greater than the number of second energies and second distances in one-to-one correspondence in the second set of samples.
7. An electronic device adapted for use with a distance sensor, the electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of any one of claims 1 to 3.
8. A computer readable storage medium, on which a computer program is stored, characterized in that it is adapted for use in an electronic device, which program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
CN201811150595.3A 2018-09-29 2018-09-29 Method and device for determining relation function Active CN109388782B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811150595.3A CN109388782B (en) 2018-09-29 2018-09-29 Method and device for determining relation function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811150595.3A CN109388782B (en) 2018-09-29 2018-09-29 Method and device for determining relation function

Publications (2)

Publication Number Publication Date
CN109388782A CN109388782A (en) 2019-02-26
CN109388782B true CN109388782B (en) 2023-05-09

Family

ID=65418074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811150595.3A Active CN109388782B (en) 2018-09-29 2018-09-29 Method and device for determining relation function

Country Status (1)

Country Link
CN (1) CN109388782B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998023024A1 (en) * 1996-11-20 1998-05-28 Iancu Lungu Electronically switched two phases reluctance machine
CN106482638A (en) * 2016-10-17 2017-03-08 南京航空航天大学 Method for position is sentenced based on the impact that full frequency band signal amplitude energy and inverse function solve
CN107133301A (en) * 2017-04-27 2017-09-05 北京小米移动软件有限公司 The Forecasting Methodology and device of probability

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7203323B2 (en) * 2003-07-25 2007-04-10 Microsoft Corporation System and process for calibrating a microphone array

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998023024A1 (en) * 1996-11-20 1998-05-28 Iancu Lungu Electronically switched two phases reluctance machine
CN106482638A (en) * 2016-10-17 2017-03-08 南京航空航天大学 Method for position is sentenced based on the impact that full frequency band signal amplitude energy and inverse function solve
CN107133301A (en) * 2017-04-27 2017-09-05 北京小米移动软件有限公司 The Forecasting Methodology and device of probability

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LSSVM改进测地距离的核函数算法研究;吴登国等;《自动化仪表》;20111220(第12期);全文 *

Also Published As

Publication number Publication date
CN109388782A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
TWI781359B (en) Face and hand association detection method and device, electronic device and computer-readable storage medium
CN110557547B (en) Lens position adjusting method and device
EP3173970A1 (en) Image processing method and apparatus
US20200186722A1 (en) Terminal, focusing method and apparatus, and computer readable storage medium
CN107944367B (en) Face key point detection method and device
CN109255128B (en) Multi-level label generation method, device and storage medium
CN111461304B (en) Training method of classified neural network, text classification method, device and equipment
CN114240882A (en) Defect detection method and device, electronic equipment and storage medium
US11335348B2 (en) Input method, device, apparatus, and storage medium
CN106599858B (en) Fingerprint identification method and device and electronic equipment
CN111061452A (en) Voice control method and device of user interface
CN112948704A (en) Model training method and device for information recommendation, electronic equipment and medium
CN108984628B (en) Loss value obtaining method and device of content description generation model
CN107239758B (en) Method and device for positioning key points of human face
CN108319899B (en) Fingerprint identification method and device
CN109388782B (en) Method and device for determining relation function
CN116310633A (en) Key point detection model training method and key point detection method
CN107832112B (en) Wallpaper setting method and device
CN116418975A (en) Occlusion detection method, device and medium for camera group
CN108345590B (en) Translation method, translation device, electronic equipment and storage medium
CN108108668B (en) Age prediction method and device based on image
CN108241438B (en) Input method, input device and input device
CN117893591B (en) Light curtain template recognition method and device, equipment, storage medium and program product
CN111752397B (en) Candidate word determining method and device
CN108471524B (en) Focusing method and device and storage medium

Legal Events

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