Machine equipment control method, control equipment and storage medium
By obtaining the application scenario information and target point set in machine equipment control, dividing the sub-point set and using the least squares solution model to optimize the model parameters, the problems of non-convergence and insufficient accuracy of model calculations in the existing technology are solved, and a better solution is achieved. High control accuracy and adaptability.
Patent Information
- Application Number
- CN202411193779.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-01-24
AI Technical Summary
In the existing machine and equipment control methods, there are noise points involved in the calculation process of the model calculation process, and the iterative calculation cannot converge, resulting in insufficient accuracy of the model calculation and cannot meet the needs of different working environments.
By obtaining the application scenario information and target point set of the target machine equipment, it is divided into sub-point sets, the model parameters are determined based on the least squares solution model, the model parameters are optimized, the model to be tested is obtained, and the accuracy of the point set solution is used to determine whether the model meets the Preset conditions and iteratively train the model.
The accuracy of the control of the machine equipment is improved, the calculation caused by noise point is not convergent, and the adaptability and accuracy of the model in different working environments is enhanced.
Smart Images

Figure CN119360054A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of machine equipment control, and in particular to a machine equipment control method, a control device, and a computer-readable storage medium. Background Art
[0002] At present, in most control methods of machine equipment, the calculated model is set in the machine equipment or the corresponding control device to determine the relevant control information of the machine equipment through the model. However, in the existing model calculation process, there are noise points involved in the calculation, and the iterative calculation cannot converge. As a result, the model that meets the use requirements cannot be obtained or the calculation accuracy of the obtained model is insufficient. If there are fewer models set, it is also difficult to meet the needs of the machine equipment in different working environments. Taking the planning of the route of assisting the straight-line driving of the vehicle and controlling the vehicle driving as an example, the next point of the vehicle driving is generally determined by the calculated straight-line equation model, so as to complete the control of the driving vehicle. In the process of model calculation, most of the point sets obtained by simulating the actual application scenario are used to establish the model. However, due to the randomness of the point set selection in the calculation process and the existence of noise points in the point set, the model cannot converge in the calculation process and needs manual intervention and adjustment, and the calculation accuracy of the output model is low. In addition, in the actual driving process of the vehicle, obstacles may appear, resulting in the need to fine-tune the driving route. It is difficult to meet the route adjustment requirements of the vehicle under different road conditions by relying solely on the preset straight-line equation model. It can be seen from the above that it is difficult to obtain a model that meets actual usage requirements through the existing model calculation process, which leads to insufficient control accuracy of the machine equipment. Summary of the invention
[0003] The present application provides a control method for a machine device, a control device, and a computer-readable storage medium, aiming to improve the control accuracy of the machine device.
[0004] In a first aspect, the present application provides a method for controlling a machine device, the method comprising the following steps: Acquire application scenario information of a target machine device and a target point set corresponding to the application scenario information, wherein the target point set includes one of the following: a plurality of image key points in an image to be identified, a plurality of image key points in a target running trajectory map, and a plurality of image key points in a target map; According to the application scenario information, determining a model to be optimized from a plurality of preset mathematical models; Dividing the target point set into a plurality of sub-point sets, wherein the sub-point sets include at least two of the image key points; Based on the least squares solution model, determine the model parameters of the model to be optimized according to at least one of the sub-point sets, and adjust the parameters of the model to be optimized based on the model parameters to obtain the model to be tested; Inputting the target point set into the model to be tested to obtain a first output point set output by the model to be tested; Determining the point set solution accuracy of the model to be tested according to the target point set and the first output point set; When it is determined according to the point set solution accuracy that the model to be tested meets the preset model test conditions, determining the model to be tested as a target model; The control information of the target machine device is determined based on the target model and the application scenario information, and the target machine device is controlled according to the control information.
[0005] In one embodiment, the target point set is input into the model to be tested to obtain a first output point set output by the model to be tested, including: Based on the model to be tested, coordinate point calculation processing is performed on each of the image key points in the target point set to obtain output points corresponding to each of the image key points; The step of determining the point set solution accuracy of the model to be tested according to the target point set and the first output point set includes: Determine the Euclidean distance between the output points corresponding to each of the image key points in the target point set; The accuracy of solving the point set is determined according to the Euclidean distance corresponding to each of the image key points in the target point set.
[0006] In one embodiment, determining the accuracy of the point set solution according to the Euclidean distance corresponding to each of the image key points in the target point set includes: The points whose Euclidean distance is greater than or equal to the preset Euclidean distance threshold are classified into the outer point set, and the points whose Euclidean distance is less than the preset Euclidean distance threshold are classified into the inner point set; The point set solution accuracy is determined according to the number of points in the outer point set and / or the number of points in the inner point set.
[0007] In one embodiment, when it is determined according to the point set solution accuracy that the model to be tested meets the preset model test condition, determining the model to be tested as the target model includes: When the number of points in the outer point set is less than or equal to the first point number threshold and / or the number of points in the inner point set is greater than or equal to the second point number threshold, it is determined that the model to be tested meets the preset model testing conditions, and the model to be tested is determined to be the target model.
[0008] In one embodiment, based on the least squares solution model, determining the model parameters of the model to be optimized according to at least one of the sub-point sets includes: Based on the model transformation network of the least squares solution model, the model to be optimized is subjected to model transformation processing to obtain a parameter equation corresponding to the model to be optimized; Based on the least squares calculation network of the least squares solution model, the parameter equation is solved according to at least two points in the sub-point set to obtain the model parameters.
[0009] In one embodiment, after determining the point set solution accuracy of the model to be tested according to the target point set and the first output point set, the method further includes: When it is determined according to the solution accuracy that the model to be tested does not meet the preset model testing conditions, the target point set is re-divided into multiple sub-point sets, and based on the least squares solution model, the model parameters of the model to be optimized are re-determined according to at least one re-divided sub-point set, so as to determine the model to be tested according to the re-determined model parameters.
[0010] In one embodiment, according to the application scenario information, determining a model to be optimized from a plurality of preset mathematical models includes: In the case where the application scenario information includes an industrial detection contour restoration application scenario or a face recognition contour restoration application scenario, the determined model to be optimized includes at least an elliptic equation model; In a case where the application scenario information includes a vehicle driving route planning application scenario or a robot motion route planning application scenario, the determined model to be optimized includes at least a straight line equation model.
[0011] In one embodiment, determining control information of the target machine device based on the target model and the application scenario information, and controlling the target machine device according to the control information includes: Determine at least one prediction point according to the application scenario information; Inputting the predicted points into the target model to obtain a second output point set; Control information is generated according to the second output point set and the application scenario information, so as to control the target machine device according to the control information.
[0012] In a second aspect, the present application also provides a control device for controlling a target machine device, the control device comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the control method for the machine device provided in the first aspect are implemented.
[0013] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the control method of the machine device as described in the first aspect are implemented.
[0014] The present application provides a control method, a control device and a computer-readable storage medium for a machine device. The present application obtains application scenario information of a target machine device and a target point set corresponding to the application scenario information, wherein the target point set includes one of the following items: multiple image key points in an image to be identified; determining a model to be optimized from multiple preset mathematical models according to the application scenario information; dividing the target point set into multiple sub-point sets, each of which includes at least two image key points; based on a least squares solution model, determining model parameters of the model to be optimized according to at least one sub-point set, and adjusting the parameters of the model to be optimized based on the model parameters to obtain a model to be tested; inputting the target point set into the model to be tested to obtain a first output point set output by the model to be tested; determining the point set solution accuracy of the model to be tested according to the target point set and the first output point set; and determining the model to be tested as the target model when it is determined that the model to be tested meets the preset model test conditions according to the point set solution accuracy; determining the control method of the target machine device based on the target model and the application scenario information. Control information, and control the target machine equipment according to the control information, determine the model to be optimized by applying scenario information, and optimize and adjust the model parameters of the model to be optimized according to the target motor corresponding to the scenario information, which can avoid the problem that the calculated model is pre-set in the machine equipment or the corresponding control device, resulting in the model not being able to meet the actual working environment requirements; and by dividing the target point set into multiple sub-point sets, the sub-point sets are used to optimize the model to be optimized to obtain the model to be tested, and the target point set is input into the model to be tested to obtain the first output point set corresponding to the target point set, and then the point set solution accuracy of the model to be tested is determined by the target point set and the first output point set, which realizes iterative training of the model to be optimized, and after determining the model parameters, the target point set and the first output point set are used to determine the point set solution accuracy, which avoids the randomness of point set selection and the problem that the calculation cannot converge and needs manual adjustment, so that the final model has higher accuracy, thereby improving the control accuracy of the machine equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] Figure 1 A flow chart of a control method for a machine device provided in an embodiment of the present application; Figure 2 A schematic diagram of a control method for a machine device in the prior art; Figure 3 A schematic diagram of a scenario for implementing the control method of the machine equipment provided in this embodiment; Figure 4 This is a schematic block diagram of the structure of a control device involved in one embodiment of the present application. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0018] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0019] The embodiments of the present application provide a control method for a machine device, a control device, and a computer-readable storage medium. The control method for the machine device can be applied to a control device, which can be an electronic device such as a tablet computer, a laptop computer, or a desktop computer. It can also be applied to a server, which can be a separate server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0020] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0021] Please refer to Figure 1 , Figure 1 A flowchart of a control method for a machine device provided in an embodiment of the present application.
[0022] like Figure 1 As shown, the control method of the machine equipment includes steps S101 to S108.
[0023] Step S101, obtaining application scenario information of a target machine device and a target point set corresponding to the application scenario information, wherein the target point set includes one of the following: a plurality of image key points in an image to be identified, a plurality of image key points in a target running trajectory map, and a plurality of image key points in a target map.
[0024] Exemplarily, the application scenario information is used to indicate the working environment of the target machine equipment, wherein the working environment of the target machine equipment includes but is not limited to an image recognition working environment, an object picking and placing working environment, and a motion trajectory construction working environment. Specifically, the image recognition working environment is, for example, industrial detection contour restoration and face recognition contour restoration; the object picking and placing working environment is, for example, identifying the object and then determining the target object to be grasped, and grasping and placing the target object to achieve object transfer; the motion trajectory construction working environment is, for example, route planning for automatic vehicles and automated robots to control the vehicle and / or robot to travel based on the planned route.
[0025] It can be understood that the target machine device collects images of the environment in the working environment, and processes the collected images to obtain a target point set. For example, in the image recognition working environment, the image to be recognized is obtained, and the key point extraction process is performed on the image to be recognized to obtain multiple image key points; for example, in the motion trajectory construction working environment, the environment image in front of the machine device is obtained, such as the front road image corresponding to the moving vehicle, or the environment image in front of the sweeping robot, and the key point extraction process is performed on the road image or the environment image to obtain the corresponding multiple image key points, or multiple image key points in the driving map are determined based on the front image and the driving map. It should be noted that the target machine device can be used in a variety of environments. The various machine devices, working environments of the machine devices, and target point sets mentioned above are only for illustration, and do not limit the types of machine devices, specific working environments, and target point sets.
[0026] Step S102: Determine a model to be optimized from a plurality of preset mathematical models according to the application scenario information.
[0027] Exemplarily, a model to be optimized corresponding to the application scenario information is determined, wherein the preset mathematical model includes but is not limited to a straight line model (such as a linear equation), a circle model, a quadratic curve model, a cubic curve model, etc. The model to be optimized determined according to the application scenario information is a model that conforms to the machine motion law of the application scenario as the model to be optimized.
[0028] In some embodiments, the model to be optimized is determined from a plurality of preset mathematical models based on the application scenario information, including: when the application scenario information includes an industrial detection contour restoration application scenario or a face recognition contour restoration application scenario, the determined model to be optimized includes at least an elliptic equation model.
[0029] Exemplarily, the application scenario of restoring contours for industrial inspection is used to instruct the contour supplement of the detected object to complete the detection of the object; the application scenario of restoring contours for face recognition is used to instruct the contour restoration processing of the collected face image with defects, so as to realize face recognition based on the face image after contour restoration. It can be understood that in the above application scenario, the determined model to be optimized includes at least an elliptical equation model, wherein the elliptical equation model conforms to the distribution law of key points corresponding to the bottom surface of a cylindrical object, for example, and also conforms to the distribution law of key points of the face contour, so the key points can be supplemented or identified by the elliptical equation model. It should be noted that in an application scenario, one or more models to be optimized can be determined, for example, to identify a cylindrical object, and a straight line equation model can also be determined as the model to be optimized to supplement or identify the key points corresponding to the side surface of the cylindrical object.
[0030] In other embodiments, the model to be optimized is determined from a plurality of preset mathematical models based on the application scenario information, including: when the application scenario information includes a vehicle driving route planning application scenario or a robot motion route planning application scenario, the determined model to be optimized includes at least a straight line equation model.
[0031] It is understandable that during the driving of a vehicle or the movement of a robot, at least straight-line driving / movement is required, and it can be determined that the model to be optimized includes a linear equation model. In the specific implementation process, the sweeping robot may also make curved movements, and the vehicle also needs to turn, and the determined model to be optimized also includes a curved model. This application does not limit the specific model to be optimized corresponding to the machine equipment, and the specific form of the model to be optimized is determined according to the needs corresponding to the application scenario.
[0032] Step S103: Divide the target point set into a plurality of sub-point sets, wherein the sub-point sets include at least two of the image key points.
[0033] Exemplarily, the target point set is divided into multiple sub-point sets. Specifically, the target point set contains multiple image key points. The multiple image key points are divided into multiple sub-point sets so that each sub-point set contains at least two image key points. In a specific implementation, the target point set can be evenly divided to obtain multiple sub-point sets, and the size of each sub-point set (the number of image key points contained in the sub-point set) is equal; multiple image key points can also be randomly divided into each sub-point set so that there are at least two sub-point sets of unequal size. This application does not limit the size of the sub-point set and whether the size of each sub-point set is the same. The size of the sub-point set can be determined according to actual usage during use.
[0034] Step S104: based on the least squares solution model, determine the model parameters of the model to be optimized according to at least one of the sub-point sets, and adjust the parameters of the model to be optimized based on the model parameters to obtain the model to be tested.
[0035] Exemplarily, the sub-point set is input into the least squares solution model to determine the model parameters of the model to be optimized according to the sub-point set. In a specific implementation process, the least squares solution model includes a plurality of least squares solvers, each least squares solver is used to determine the model parameters of the model to be optimized according to an input sub-point set. In a specific implementation process, when the target point set is divided into a plurality of sub-point sets, the number of sub-point sets is greater than or equal to the number of least squares solvers. It should be noted that the number and size of the input sub-point sets and the number of least squares solvers do not affect the accuracy of the obtained model parameters, but will affect the time complexity. In actual use, the number of sub-point sets and / or the number of least squares solvers can be set based on the actual number and size of sub-point sets and the complexity of the model to be optimized, and this application is not limited thereto.
[0036] In some embodiments, the least squares solution model is based on determining the model parameters of the model to be optimized according to at least one of the sub-point sets, including: based on the model transformation network of the least squares solution model, performing model transformation processing on the model to be optimized to obtain the parameter equation corresponding to the model to be optimized; based on the least squares calculation network of the least squares solution model, solving the parameter equation according to at least two points in the sub-point set to obtain the model parameters.
[0037] Exemplarily, the least squares solution model also includes a model transformation network and a least squares calculation network, wherein the model transformation network is used to perform model transformation processing on the model to be optimized to determine the parameter equation corresponding to the model to be optimized, and the least squares solution model is used to solve the parameter equation to determine the model parameters of the model to be optimized. It should be understood that each least squares solver includes a least squares calculation network; after the model to be optimized is input into the least squares solution model, the parameter equation corresponding to the model to be optimized is determined based on the model transformation network; and then each least squares solver uses the least squares calculation network to perform least squares calculation on the input sub-point set and the parameter equation to determine the solution of the parameter equation, so as to determine the model parameters according to the solution of the parameter equation.
[0038] Specifically, taking the model to be optimized as y=ax+b as an example, after the model transformation processing of the model to be optimized as y=ax+b is performed based on the model transformation network, the parameter equations are: t=t; x=at+b; y=ct+d, and the least squares solver uses the least squares method to calculate the network and the sub-point set input to the least squares solver to solve the above parameter equations. The specific solution process is not described here. It should be understood that other models to be optimized can refer to the calculation method of the straight line equation model y=ax+b. For example, the expression corresponding to the circle model is (x+a)(x+a)+(y+b)(y+b)=r×r, and the corresponding parameter equations are x=at²+bt+c; y=rt²+mt+n. Models in other forms of expression can be inferred by analogy and are not described here.
[0039] Among them, multiple least squares solvers determine the model parameters of the model to be optimized based on the sub-point sets input to each least squares solver. For example, the sub-point set includes image key points (1,3) and (3,5) represented in coordinate form, and the model to be optimized is a straight line equation y=ax+b. The image key points are input to the straight line equation model correspondingly through the least squares solver to solve the parameters a and b in the straight line equation model to obtain the model parameters of a=1, b=2, and then the parameters of the model to be optimized are adjusted based on the calculated model parameters to obtain the model to be tested y=x+2. It should be understood that other forms of equation models can also be solved by least squares solvers, which will not be described here.
[0040] Specifically, if the similarity between the model parameters output by each least squares solver is less than or equal to the parameter similarity threshold, the model to be optimized is adjusted based on the output model parameters. If the similarity between the model parameters output by each least squares solver is greater than the parameter similarity threshold, the sub-point set input to each least squares solver is changed so that the least squares solver determines the model parameters again according to the changed sub-point set until the similarity between the model parameters output by each least squares solver is less than or equal to the parameter similarity threshold. In other embodiments, according to the parameters output by each least squares solver, the parameter with the highest output ratio is used as the model parameter. For example, if there are five least squares solvers A, B, C, D, and E, and the corresponding output parameters are 8, 6, 7, 8, and 8, then 8 is determined as the model parameter. It should be understood that the number of least squares solvers and the output parameters are for illustration only, and the number of least squares solvers and the output parameters of the present application are not limited.
[0041] The parameters of the model to be optimized are solved by the least squares solution model, and the parameters of the model to be optimized are adjusted based on the obtained model parameters to obtain the model to be tested, so that the machine equipment and / or the control device corresponding to the machine equipment can directly solve the required model to meet the actual needs of the machine equipment in the working environment and improve the applicability of the machine equipment; and it avoids the situation where the model cannot converge during the calculation process due to the presence of noise points when randomly selecting point sets and directly training. Without human intervention, the automation of the machine equipment is realized, and the obtained model parameters are relatively reliable, which can improve the output accuracy of the model after training the test model using the target point set, thereby improving the control accuracy of the machine equipment.
[0042] Step S105: input the target point set into the model to be tested to obtain a first output point set output by the model to be tested.
[0043] Exemplarily, a target point set corresponding to the application scenario information is input into the model to be tested, so that the model to be tested outputs a corresponding first output point set according to the input target point set.
[0044] In some embodiments, the target point set is input into the model to be tested to obtain a first output point set output by the model to be tested, including: based on the model to be tested, performing coordinate point calculation processing on each of the image key points in the target point set to obtain output points corresponding to each of the image key points.
[0045] Exemplarily, a coordinate system is established based on a preset point as a coordinate origin, wherein the established coordinate system includes but is not limited to a plane rectangular coordinate system, a space rectangular coordinate system, a cylindrical coordinate system, a spherical coordinate system, etc. The coordinates corresponding to each image key point are determined according to the established coordinate system, so that the coordinate point calculation processing is performed on each image key point to obtain the corresponding output point.
[0046] Take the model to be tested as y=x+2, and the image key points in the target point set are represented in the form of plane coordinates as an example. In the specific implementation process, the target point set includes (1, 3), (2, 6), (3, 5); after the target point set is input into the model to be tested, the model to be tested is calculated based on the horizontal coordinates (x values) of the coordinate points in the target point set to determine the corresponding vertical coordinates (y values), and the first output point set obtained includes (1, 3), (2, 4), (3, 5). It should be understood that the equations, target point sets and first output point sets corresponding to the above-mentioned model to be tested are all exemplary descriptions. The model to be tested may also include equations in other forms such as linear equations of two variables, and the target point set may also include more or fewer coordinate points, or point sets represented in other forms. This application does not limit the specific form of the model to be tested, the size and expression of the target point set.
[0047] Step S106: determining the point set solution accuracy of the model to be tested according to the target point set and the first output point set.
[0048] Exemplarily, the accuracy of point set solution is determined based on the target point set and the first output point set output by the model to be tested to determine the noise points in the target point set. It should be understood that the key points of the image in the target point set are not necessarily all on the model to be tested. For example, there is the influence of noise points, and the influence of these noise points needs to be excluded during model optimization training, while the first output point set output by the model to be tested must be on the model to be tested. Therefore, the noise points that may exist in the target point set can be determined based on the target point set and the first output point set to obtain the accuracy of point set solution, so as to train and optimize the model again or output the final model based on the accuracy of point set solution.
[0049] In some embodiments, determining the point set solution accuracy of the model to be tested based on the target point set and the first output point set includes: determining the Euclidean distance between the output points corresponding to each of the image key points in the target point set; and determining the point set solution accuracy based on the Euclidean distance corresponding to each of the image key points in the target point set.
[0050] Exemplarily, the output point corresponding to each image key point in the target point set is determined to determine the Euclidean distance between each image key point and the corresponding output point, thereby determining the accuracy of the point set solution according to the Euclidean distance.
[0051] Specifically, for example, the image key points represented by coordinates are given as follows: ), the coordinates of the output point corresponding to the key point of the image are ( ), then the Euclidean distance z between the two points can be calculated as follows:
[0052] It should be understood that the Euclidean distance is calculated for each image key point and the output point corresponding to each image key point to obtain the Euclidean distance corresponding to each image key point, so as to determine the accuracy of the point set solution based on the Euclidean distance corresponding to all image key points.
[0053] In some embodiments, determining the accuracy of the point set solution based on the Euclidean distance corresponding to each of the image key points in the target point set includes: dividing the points whose Euclidean distance is greater than or equal to a preset Euclidean distance threshold into an external point set, and dividing the points whose Euclidean distance is less than the preset Euclidean distance threshold into an internal point set; determining the accuracy of the point set solution based on the number of points in the external point set and / or the number of points in the internal point set.
[0054] Exemplarily, a Euclidean distance threshold is set to compare the calculated Euclidean distance corresponding to the image key point with a preset Euclidean distance threshold, so as to distinguish the image key points in the target point set into internal and external points, wherein the external points are used to indicate points that are not on the model to be tested, and the internal points are used to indicate points on the model to be tested, so that the accuracy of the point set solution can be determined based on the distinguished external point set and internal point set.
[0055] In the specific implementation process, the image key points whose Euclidean distance is greater than or equal to the preset Euclidean distance threshold are divided into the outer point set, and the image key points whose Euclidean distance is less than the preset Euclidean distance threshold are divided into the inner point set to complete the allocation of all image key points in the target point set, thereby determining the accuracy of the point set solution according to the number of points contained in the outer point set and / or the number of points contained in the inner point set.
[0056] By distinguishing the image key points in the target point set into internal and external points, the noise points in the target point set can be determined. Therefore, when the model to be tested needs to be optimized and trained again, the noise points can be avoided from being used to optimize the model to be tested, so as to improve the accuracy of the trained model to be tested.
[0057] Step S107: when it is determined according to the point set solution accuracy that the model to be tested meets the preset model test conditions, the model to be tested is determined to be a target model.
[0058] Exemplarily, the preset model test condition may be a threshold value. When the point set solution accuracy is greater than or equal to the threshold value, the model to be tested is determined to have passed the test and is determined as the target model; otherwise, the model to be tested is determined to have failed the test.
[0059] For example, if the threshold value is 85% accuracy, when the point set solution accuracy is 90%, it is determined that the model to be tested has passed the test; when the point set solution accuracy is 80%, it is determined that the model to be tested has not passed the test, and other processing is performed.
[0060] In some embodiments, when it is determined that the model to be tested meets the preset model testing conditions according to the point set solution accuracy, the model to be tested is determined to be the target model, including: when the number of points in the outer point set is less than or equal to a first point number threshold and / or the number of points in the inner point set is greater than or equal to a second point number threshold, determining that the model to be tested meets the preset model testing conditions, and determining that the model to be tested is the target model.
[0061] Exemplarily, based on the comparison result of the number of points in the outer point set with the first point number threshold and / or the number of points in the inner point set with the second point number threshold, it is determined whether the model to be tested meets the preset model testing conditions, thereby determining the target model.
[0062] In a specific embodiment, the comparison result of the number of points in the outer point set with the first point number threshold can be used alone, or the comparison result of the number of points in the inner point set with the second point number threshold can be used alone to determine whether the model to be tested meets the preset model test conditions, such as when the number of points in the outer point set is less than or equal to the first point number threshold, or when the number of points in the inner point set is greater than or equal to the second point number threshold, it is determined that the model to be tested meets the preset model test conditions; it is also possible to use the comparison result of the number of points in the outer point set with the first point number threshold and the comparison result of the number of points in the inner point set with the second point number threshold to jointly determine whether the model to be tested meets the preset model test conditions, such as when the number of points in the outer point set is less than or equal to the first point number threshold and the number of points in the inner point set is greater than or equal to the second point number threshold, it is determined that the model to be tested meets the preset model test conditions. It should be understood that the first point number threshold and the second point number threshold can be determined according to actual usage, and this application does not limit it.
[0063] Exemplarily, the first point number threshold is 1, and the second point number threshold is 90% of the total number of image key points in the target point set. In actual use, the first point number threshold and the second point number threshold can be adjusted according to actual conditions, and this application does not limit them.
[0064] When the model to be tested meets the model testing conditions, it is determined that the model to be tested can meet the actual usage requirements of the current application scenario of the target machine device, so that the model to be tested is determined as the target model, so as to use the target model to perform corresponding calculations and control the target machine device according to the calculation results.
[0065] In other embodiments, after determining the point set solution accuracy of the model to be tested based on the target point set and the first output point set, the method further includes: when it is determined according to the point set solution accuracy that the model to be tested does not meet the preset model testing conditions, re-dividing the target point set into multiple sub-point sets, and based on the least squares solution model, re-determining the model parameters of the model to be optimized according to at least one re-divided sub-point set, so as to determine the model to be tested according to the re-determined model parameters.
[0066] In a specific implementation process, when the number of points in the outer point concentration is greater than a first point number threshold and / or the number of points in the inner point concentration is less than a second point number threshold, it is determined that the model to be tested does not meet the preset model test conditions.
[0067] After determining that the model to be tested does not meet the preset model test conditions, return to step S103, re-divide the target point set into multiple sub-point sets, and execute steps S104 to S108 as described above, which will not be repeated here. Specifically, the size of the re-divided sub-point set is different from the size of the sub-point set divided last time, or the re-divided sub-point set is different from any of the sub-point sets divided last time.
[0068] It should be noted that when the model to be tested does not meet the preset model testing conditions, it is determined that the model to be tested is not the optimal model. Therefore, the model is optimized and trained again to find and determine the optimal model, thereby improving the control accuracy of the target machine equipment.
[0069] In some other specific implementations, the key image points included in the external point set are deleted from the target point set, and the deleted target point set is divided into multiple sub-point sets to complete the re-determination of the sub-point sets. Deleting points in the external point set is conducive to improving the accuracy of determining model parameters, and is easier to converge during the model training optimization process, thereby improving the efficiency of model training optimization.
[0070] By iteratively training the model to be tested when it does not meet the model testing conditions, the accuracy of the final output model is improved, thereby improving the accuracy of the target machine equipment.
[0071] Step S108: determining control information of the target machine device based on the target model and the application scenario information, and controlling the target machine device according to the control information.
[0072] Exemplarily, after determining the target model, the control information of the target machine device is determined using the target model, so that the target machine device is controlled according to the control information.
[0073] In a specific implementation, taking the case where the vehicle is driving automatically in a straight line and the target model is y=x+2 as an example, the coordinate corresponding to the current position of the vehicle is (0,0), the application scenario information is driving in a straight line, and the driving end point is the coordinate (10, 12); then the horizontal coordinate information of x=1,2,3…10 can be generated, and the horizontal coordinate information is input into the target model y=x+2 to determine multiple coordinate points, so as to control the vehicle driving according to the determined coordinate points. Specifically, the vehicle is controlled to drive through each coordinate point in sequence from small to large in the horizontal coordinate, so as to realize the straight driving of the vehicle to the end point coordinate.
[0074] It should be understood that in other application scenarios, for example, when a vehicle needs to travel on a curve, the vehicle's route can be planned based on the determined target model (the target model includes a curve equation) to meet the vehicle's driving needs. Other target machines and / or other application scenarios can determine the target model and the corresponding control information using the method provided above, which will not be described here.
[0075] In some embodiments, determining the control information of the target machine device based on the target model and the application scenario information, and controlling the target machine device according to the control information, includes: determining at least one prediction point according to the application scenario information; inputting the prediction point into the target model to obtain a second output point set; generating control information according to the second output point set and the application scenario information to control the target machine device according to the control information.
[0076] In a specific implementation process, the prediction points are determined according to the application scenario information and the distribution law of the image key points in the target point set. For example, the application scenario information is straight-line driving and the distribution law of the image key points is an arithmetic progression in which the horizontal coordinates of most image key points are 1. For example, the image key points include (1,3), (3,5), (4,6), (5,7). Then, the prediction points with horizontal coordinates of 2,6 can be predicted according to the distribution law of the horizontal coordinates, and the prediction points are input into the target model y=x+2 to obtain the second output point set including the points (2,4), (6,8). In this way, control information can be generated according to the application scenario information, the target point set corresponding to the application scenario information and the second output point set to improve the control accuracy of the target machine equipment.
[0077] It should be understood that by calculating the predicted points through the target model to determine the second output point set, and generating control information through the second output point set, application scenario information and target point set, the data granularity can be effectively reduced, so that the target machine equipment can be controlled with a smaller granularity, providing a basis for the control of precision machine equipment. In addition, in the case where the key points of the image in the target point set are missing, for example, after the circular image is recognized, the object corresponding to the circular image needs to be stroked. If the key points of the image corresponding to the circle are missing, the target machine equipment cannot complete the stroke well because it is unknown where the target point is. If the predicted points are determined according to the key points of the image in the target point set and the application scenario information, and the final second output point set is determined based on the target model, the points in the second output point set can be used to complete the data of the target point set, so that the target machine model can complete the stroke well.
[0078] For example, let's take the target machine device as a sweeping robot. When the sweeping robot only has a preset straight line equation, it needs to plan a route based on the straight line equation when it encounters a corner. The planned route is as follows: Figure 2 As shown, it can be seen that the sweeping robot needs to travel along multiple straight lines to avoid obstacle A when going to destination B. If the sweeping robot performs route planning according to the method provided in steps S101 to S108, for example, at least a curve equation model can be determined as a model to be optimized in step S102, and after completing the optimization training, the curve equation model that has completed the optimization training and other equation models that have completed the optimization training are used for route planning, so that the sweeping robot can design a more reasonable route to avoid obstacle A and reach destination B. The route can be as follows Figure 3 As shown; driving along the route planned by the equation model that has completed optimization training can also effectively save the power of the sweeping robot, making the sweeping robot smarter, reducing the number and / or duration of returning to the base station for charging, thereby improving the cleaning efficiency of the sweeping robot.
[0079] For another example, taking the target machine device as an object recognition device, when the object recognition device is identifying and detecting rectangular objects and edges, most of the time, only a straight line equation model is preset in the object recognition device to identify and detect the object, so as to improve the efficiency of identification and detection; however, in this process, if the detection pipeline is mixed with non-rectangular objects such as cylindrical objects or the objects have curved edges, the object recognition device will not be able to identify the objects well or even make identification errors. However, by using the steps provided by the above method, a model adapted to the object can be acquired and trained and optimized in time to identify and detect the edges of the object, so that it can adapt to the identification of objects of different shapes, detect the irregular edges of objects, and improve the accuracy of object recognition.
[0080] The control method of the machine equipment provided in the above embodiment enables the target machine equipment to determine different target models in real time during operation according to the use requirements in different working environments (such as changing straight-line driving to curve driving), so as to control the target machine equipment based on the control information generated corresponding to the output result of the target model to meet the use requirements in the corresponding working environment; and in the model calculation process, by first using the sub-point set divided from the target point set to complete the parameter solution of the model, it is avoided that the target point set is directly used to solve the parameters of the model. The situation of non-convergence occurs, and the accuracy of the calculated parameters can be improved; then, based on the model after solving the parameters, the first output point set is determined according to the target point set, and the point set solution accuracy of the model is determined using the first output point set and the target point set, and it is determined whether the model needs to be iteratively trained and optimized again to ensure the accuracy of the model, thereby improving the accuracy of the model output results, and further improving the control accuracy of the target machine equipment.
[0081] See also Figure 4 , Figure 4 A schematic block diagram of the structure of a control device provided in an embodiment of the present application. The control device may be a server or a terminal.
[0082] like Figure 4 As shown, the control device includes a processor, a memory and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.
[0083] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any control method of a machine device.
[0084] The processor is used to provide computing and control capabilities to support the operation of the entire control device.
[0085] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any control method of the machine device.
[0086] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the control device to which the scheme of the present application is applied. The specific control device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0087] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0088] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps: Acquire application scenario information of a target machine device and a target point set corresponding to the application scenario information, wherein the target point set includes one of the following: a plurality of image key points in an image to be identified, a plurality of image key points in a target running trajectory map, and a plurality of image key points in a target map; According to the application scenario information, determining a model to be optimized from a plurality of preset mathematical models; Dividing the target point set into a plurality of sub-point sets, wherein the sub-point sets include at least two of the image key points; Based on the least squares solution model, determine the model parameters of the model to be optimized according to at least one of the sub-point sets, and adjust the parameters of the model to be optimized based on the model parameters to obtain the model to be tested; Inputting the target point set into the model to be tested to obtain a first output point set output by the model to be tested; Determining the point set solution accuracy of the model to be tested according to the target point set and the first output point set; When it is determined according to the point set solution accuracy that the model to be tested meets the preset model test conditions, determining the model to be tested as a target model; The control information of the target machine device is determined based on the target model and the application scenario information, and the target machine device is controlled according to the control information.
[0089] In one embodiment, when the processor implements inputting the target point set into the model to be tested to obtain the first output point set output by the model to be tested, it is configured to implement: Based on the model to be tested, coordinate point calculation processing is performed on each of the image key points in the target point set to obtain output points corresponding to each of the image key points; When the processor determines the point set solution accuracy of the model to be tested according to the target point set and the first output point set, the processor is further used to implement: Determine the Euclidean distance between the output points corresponding to each of the image key points in the target point set; The accuracy of solving the point set is determined according to the Euclidean distance corresponding to each of the image key points in the target point set.
[0090] In one embodiment, when the processor determines the accuracy of the point set solution according to the Euclidean distance corresponding to each of the image key points in the target point set, it is used to implement: The points whose Euclidean distance is greater than or equal to the preset Euclidean distance threshold are classified into the outer point set, and the points whose Euclidean distance is less than the preset Euclidean distance threshold are classified into the inner point set; The point set solution accuracy is determined according to the number of points in the outer point set and / or the number of points in the inner point set.
[0091] In one embodiment, when the processor determines that the model to be tested meets the preset model test condition according to the point set solution accuracy, and determines that the model to be tested is the target model, it is used to implement: When the number of points in the outer point set is less than or equal to the first point number threshold and / or the number of points in the inner point set is greater than or equal to the second point number threshold, it is determined that the model to be tested meets the preset model testing conditions, and the model to be tested is determined to be the target model.
[0092] In one embodiment, when the processor implements the least squares-based solution model and determines the model parameters of the model to be optimized according to at least one of the sub-point sets, it is used to implement: Based on the model transformation network of the least squares solution model, the model to be optimized is subjected to model transformation processing to obtain a parameter equation corresponding to the model to be optimized; Based on the least squares calculation network of the least squares solution model, the parameter equation is solved according to at least two points in the sub-point set to obtain the model parameters.
[0093] In one embodiment, after determining the point set solution accuracy of the model to be tested according to the target point set and the first output point set, the processor is further configured to implement: When it is determined that the model to be tested does not meet the preset model testing conditions based on the point set solution accuracy, the target point set is re-divided into multiple sub-point sets, and based on the least squares solution model, the model parameters of the model to be optimized are re-determined according to at least one re-divided sub-point set, so as to determine the model to be tested according to the re-determined model parameters.
[0094] In one embodiment, when the processor determines the model to be optimized from a plurality of preset mathematical models according to the application scenario information, it is configured to implement: In the case where the application scenario information includes an industrial detection contour restoration application scenario or a face recognition contour restoration application scenario, the determined model to be optimized includes at least an elliptic equation model; In a case where the application scenario information includes a vehicle driving route planning application scenario or a robot motion route planning application scenario, the determined model to be optimized includes at least a straight line equation model.
[0095] In one embodiment, when the processor determines the control information of the target machine device based on the target model and the application scenario information, and controls the target machine device according to the control information, it is configured to implement: Determine at least one prediction point according to the application scenario information; Inputting the predicted points into the target model to obtain a second output point set; Control information is generated according to the second output point set and the application scenario information, so as to control the target machine device according to the control information.
[0096] It should be noted that technicians in the relevant field can clearly understand that for the convenience and brevity of description, the specific working process of the control device described above can refer to the corresponding process in the control method embodiment of the aforementioned machine equipment, and will not be repeated here.
[0097] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the control method of the machine equipment of the present application.
[0098] The computer-readable storage medium may be an internal storage unit of the control device described in the foregoing embodiment, such as a hard disk or memory of the control device. The computer-readable storage medium may also be an external storage device of the control device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the control device.
[0099] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0100] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0101] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A control method for a machine device, characterized in that: include: Acquire application scenario information of a target machine device and a target point set corresponding to the application scenario information, wherein the target point set includes one of the following: a plurality of image key points in an image to be identified, a plurality of image key points in a target running trajectory map, and a plurality of image key points in a target map; According to the application scenario information, determining a model to be optimized from a plurality of preset mathematical models; Dividing the target point set into a plurality of sub-point sets, wherein the sub-point sets include at least two of the image key points; Based on the least squares solution model, determine the model parameters of the model to be optimized according to at least one of the sub-point sets, and adjust the parameters of the model to be optimized based on the model parameters to obtain the model to be tested; Inputting the target point set into the model to be tested to obtain a first output point set output by the model to be tested; Determining the point set solution accuracy of the model to be tested according to the target point set and the first output point set; When it is determined according to the point set solution accuracy that the model to be tested meets the preset model test conditions, determining the model to be tested as a target model; The control information of the target machine device is determined based on the target model and the application scenario information, and the target machine device is controlled according to the control information.
2. The control method of the machine equipment according to claim 1, characterized in that: The step of inputting the target point set into the model to be tested to obtain a first output point set output by the model to be tested includes: Based on the model to be tested, coordinate point calculation processing is performed on each of the image key points in the target point set to obtain output points corresponding to each of the image key points; The step of determining the point set solution accuracy of the model to be tested according to the target point set and the first output point set includes: Determine the Euclidean distance between the output points corresponding to each of the image key points in the target point set; The accuracy of solving the point set is determined according to the Euclidean distance corresponding to each of the image key points in the target point set.
3. The control method of the machine equipment according to claim 2, characterized in that: The step of determining the point set solution accuracy according to the Euclidean distances corresponding to the key points of the image in the target point set includes: The points whose Euclidean distance is greater than or equal to the preset Euclidean distance threshold are classified into the outer point set, and the points whose Euclidean distance is less than the preset Euclidean distance threshold are classified into the inner point set; The point set solution accuracy is determined according to the number of points in the outer point set and / or the number of points in the inner point set.
4. The control method of the machine equipment according to claim 3, characterized in that: In the case where it is determined according to the point set solution accuracy that the model to be tested meets the preset model test condition, determining the model to be tested as the target model includes: When the number of points in the outer point set is less than or equal to the first point number threshold and / or the number of points in the inner point set is greater than or equal to the second point number threshold, it is determined that the model to be tested meets the preset model testing conditions, and the model to be tested is determined to be the target model.
5. The control method of a machine device according to any one of claims 1 to 4, characterized in that: The method of solving the model based on least squares and determining the model parameters of the model to be optimized according to at least one of the sub-point sets includes: Based on the model transformation network of the least squares solution model, the model to be optimized is subjected to model transformation processing to obtain a parameter equation corresponding to the model to be optimized; Based on the least squares calculation network of the least squares solution model, the parameter equation is solved according to at least two points in the sub-point set to obtain the model parameters.
6. The control method of a machine device according to any one of claims 1 to 4, characterized in that: After determining the point set solution accuracy of the model to be tested according to the target point set and the first output point set, the method further includes: When it is determined that the model to be tested does not meet the preset model testing conditions based on the point set solution accuracy, the target point set is re-divided into multiple sub-point sets, and based on the least squares solution model, the model parameters of the model to be optimized are re-determined according to at least one re-divided sub-point set, so as to determine the model to be tested according to the re-determined model parameters.
7. The control method of a machine device according to any one of claims 1 to 4, characterized in that: Determining the model to be optimized from a plurality of preset mathematical models according to the application scenario information includes: In the case where the application scenario information includes an industrial detection contour restoration application scenario or a face recognition contour restoration application scenario, the determined model to be optimized includes at least an elliptic equation model; In a case where the application scenario information includes a vehicle driving route planning application scenario or a robot motion route planning application scenario, the determined model to be optimized includes at least a straight line equation model.
8. The control method of a machine device according to any one of claims 1 to 4, characterized in that: The determining the control information of the target machine device based on the target model and the application scenario information, and controlling the target machine device according to the control information, includes: Determine at least one prediction point according to the application scenario information; Inputting the predicted points into the target model to obtain a second output point set; Control information is generated according to the second output point set and the application scenario information, so as to control the target machine device according to the control information.
9. A control device, characterized in that: The control device is used to control a target machine device, and the control device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the control method of the machine device as described in any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the control method of the machine device according to any one of claims 1 to 8 are implemented.