A method, device and path planning system for determining the moving direction of an intelligent device

By introducing the imagination module and using the encoding module and decoding module to calculate the feature sequence of the simulated path, the problem of inaccurate movement direction of smart devices in traditional technology is solved and the accuracy of reaching the target position is improved.

CN109902876BActive Publication Date: 2024-09-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910156350.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-01
Publication Date
2024-09-06
Estimated Expiration
2039-03-01

AI Technical Summary

Technical Problem

The movement direction of the smart device obtained by the traditional encoder-decoder structure is not accurate enough, resulting in the inability to accurately reach the target location.

Method used

The imagination module is introduced to determine the moving direction of the smart device through the encoding module, imagination module and decoding module, calculate the feature sequence that embodies the simulation path, and determine the moving direction at each time step based on the feature sequence.

Benefits of technology

It improves the possibility of smart devices reaching the target location under path instructions and ensures that smart devices reach the target location more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109902876B
    Figure CN109902876B
Patent Text Reader

Abstract

The present application discloses a method, device and path planning system for determining the moving direction of an intelligent device, and introduces an imagination module to determine the moving direction of the intelligent device, thereby controlling the intelligent device to go to the target position indicated in the path instruction. The introduced imagination module calculates the characteristic sequence that reflects the simulated path, and determines the moving direction corresponding to each time step in the process of the intelligent device going to the target position through a decoder based on the characteristic sequence. Since it is based on the characteristic sequence that reflects the simulated path, the determined moving direction can be more inclined to allow the intelligent device to eventually reach the target position. Compared with the moving direction determined for the intelligent device based only on the current state and environment in the traditional method, the moving direction determined by the present application is more accurate for completing the goal, that is, finally moving the intelligent device to the target position, and increases the possibility of the intelligent device reaching the target position under the path instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automatic control, and in particular to a method, device and path planning system for determining the moving direction of an intelligent device. Background Art

[0002] With the development of science and technology, the application of smart devices is becoming more and more widespread, such as robot waiters, robot sweepers, and vehicles with automatic driving or assisted driving functions. In the working scenarios of smart devices, it is often necessary to go to the target location indicated by the path instruction. Therefore, how to control the smart device to accurately go to the target location is a crucial issue.

[0003] At present, the encoder-decoder structure can be used to control the smart device to go to the target location. The encoder encodes the instructions described in natural language (for example, leave the gym, turn left, go down the stairs, pass the two sofas on the right, turn right into the room and stop) to obtain the encoding result that reflects the meaning of the instruction, and the decoder decodes the aforementioned encoding result to obtain the moving direction of the smart device. Furthermore, the movement of the smart device can be controlled according to the moving direction.

[0004] However, the forward direction obtained by this encoder-decoder structure is often not accurate enough, so that the smart device cannot accurately reach the target location. Summary of the invention

[0005] The technical problem to be solved by the present application is that the moving direction obtained by the traditional encoder-decoder structure is often not accurate enough, so that the smart device cannot accurately reach the target position. A method, device and path planning system for determining the moving direction of a smart device are provided.

[0006] In a first aspect, an embodiment of the present application provides a method for determining a moving direction of a smart device, the method comprising:

[0007] Obtaining a path instruction, wherein the path instruction includes instruction information for going to a target location;

[0008] Determine the moving direction corresponding to each time step in the process of the smart device moving to the target location; the jth time step includes the time process from the jth stop position to the j+1th stop position in the process of the smart device moving to the target location, and the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position;

[0009] The moving direction corresponding to the jth time step is determined as follows:

[0010] Get the decoding result output by the decoding module at the i-th time step;

[0011] Obtaining a semantic feature vector obtained by encoding the path instruction through an encoding module;

[0012] Obtaining environmental data obtained by the smart device at the jth stop position;

[0013] According to the decoding result outputted at the i-th time step, the semantic feature vector and the environmental data acquired by the smart device at the j-th stop position, a feature sequence reflecting a simulation path is obtained through the imagination module; the simulation path includes simulating a path for the smart device to reach the target location from the j-th stop position; i is less than j;

[0014] The moving direction corresponding to the j-th time step is determined by the decoding module according to the feature sequence.

[0015] In a second aspect, an embodiment of the present application provides a device for determining a moving direction of a smart device, the device comprising:

[0016] An acquisition unit, configured to acquire a path instruction, wherein the path instruction includes instruction information for going to a target location;

[0017] a determination unit, configured to determine a moving direction corresponding to each time step in the process of the smart device moving toward the target location; the jth time step includes the time process from the jth stop position to the j+1th stop position in the process of the smart device moving toward the target location, and the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position;

[0018] The moving direction corresponding to the jth time step is determined as follows:

[0019] Get the decoding result output by the decoding module at the i-th time step;

[0020] Obtaining a semantic feature vector obtained by encoding the path instruction through an encoding module;

[0021] Obtaining environmental data obtained by the smart device at the jth stop position;

[0022] According to the decoding result output by the decoding module at the i-th time step, the semantic feature vector and the environmental data obtained by the smart device at the j-th stop position, the feature sequence reflecting the simulation path is obtained through the imagination module; the simulation path includes simulating the path of the smart device from the j-th stop position to the target position; i is less than j;

[0023] The moving direction corresponding to the j-th time step is determined by the decoding module according to the feature sequence.

[0024] In a third aspect, an embodiment of the present application provides a device for determining a moving direction of a smart device, the device comprising a processor and a memory:

[0025] The memory is used to store program code and transmit the program code to the processor;

[0026] The processor is used to execute the method for determining the moving direction of the smart device as described in any one of the first aspects above according to the instructions in the program code.

[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a program code, and the program code is used to execute the method for determining the moving direction of a smart device as described in any one of the first aspects above.

[0028] In a fifth aspect, an embodiment of the present application provides a path planning system, the path planning system comprising an intelligent device, the intelligent device comprising an image acquisition structure and a mobile structure;

[0029] The smart device is used to obtain a path instruction, wherein the path instruction includes instruction information for going to a target location;

[0030] The smart device is also used to determine the moving direction corresponding to each time step in the process of going to the target location; the jth time step includes the time process from the jth stop position to the j+1th stop position in the process of the smart device going to the target location, and the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position;

[0031] The intelligent device is also used to drive the mobile structure to move in the corresponding moving direction at each time step;

[0032] The moving direction corresponding to the jth time step is determined as follows:

[0033] Get the decoding result output by the decoding module at the i-th time step;

[0034] Obtaining a semantic feature vector obtained by encoding the path instruction through an encoding module;

[0035] Acquire environmental data acquired by the smart device at the jth stop position according to the image acquisition structure;

[0036] According to the decoding result outputted at the i-th time step, the semantic feature vector and the environmental data acquired at the j-th stop position, a feature sequence reflecting the simulation path is obtained through the imagination module; the simulation path includes simulating the path of the smart device from the j-th stop position to the target position; i is less than j;

[0037] The moving direction corresponding to the j-th time step is determined by the decoding module according to the feature sequence.

[0038] Compared with the prior art, the embodiments of the present application have the following advantages:

[0039] In the embodiment of the present application, an imagination module is introduced, and the moving direction of the intelligent device is determined by using the encoding module, the imagination module and the decoding module, so as to control the intelligent device to go to the target position indicated in the path instruction. In order to increase the possibility of the intelligent device reaching the target position, the feature sequence reflecting the simulation path is calculated by the introduced imagination module, and the moving direction corresponding to each time step in the process of the intelligent device going to the target position is determined by the decoder based on the feature sequence. The simulation path is calculated by the imagination module according to the decoding result of the decoding module at the i-th time step, the semantic feature vector encoded by the encoding module, and the environmental data obtained by the intelligent device at the j-th stop position, so as to simulate the possible path of the intelligent device moving from the j-th stop position to the target position. In the simulation path, the moving direction of the intelligent device at the j-th stop position can make the intelligent device finally simulate to reach the target position. When the moving direction is determined for each time step, such as the j-th time step, by the decoder, the moving direction determined can be more inclined to make the intelligent device finally reach the target position because it is based on the feature sequence reflecting the simulation path. Compared with the traditional method of determining the moving direction for the smart device based only on the current state and environment, the moving direction determined by the present application is more accurate in achieving the goal, that is, ultimately moving the smart device to the target position, and increases the possibility of the smart device reaching the target position under the path instruction. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A schematic diagram of a framework of an exemplary application scenario in an embodiment of the present application;

[0042] Figure 2A flowchart of a method for determining a moving direction of a smart device provided in an embodiment of the present application;

[0043] Figure 3 A flowchart of a method for determining a moving direction corresponding to a j-th time step provided in an embodiment of the present application;

[0044] Figure 4 A schematic diagram of the structure of a coding module provided in an embodiment of the present application;

[0045] Figure 5 A schematic diagram of a flow chart of a method for obtaining a characteristic sequence provided in an embodiment of the present application;

[0046] Figure 6 A schematic diagram of determining the moving direction of a smart device provided in an embodiment of the present application;

[0047] Figure 7 A schematic diagram of determining a characteristic sequence provided in an embodiment of the present application;

[0048] Figure 8 A schematic diagram of the structure of an apparatus for determining the moving direction of a smart device provided in an embodiment of the present application;

[0049] Fig. 9 A schematic diagram of the structure of an apparatus for determining the moving direction of a smart device provided in an embodiment of the present application;

[0050] Fig.10 A schematic diagram of the structure of an apparatus for determining the moving direction of a smart device provided in an embodiment of the present application;

[0051] Fig.11 A schematic diagram of the structure of a path planning system provided in an embodiment of the present application;

[0052] Fig.12 A flowchart of a method for a smart device to determine a moving direction corresponding to a j-th time step provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0054] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0055] In the conventional technology, the encoder-decoder structure can be used to determine the moving direction corresponding to each time step in the process of the smart device moving to the target location. However, using the conventional technology, when determining the moving direction corresponding to each step, the moving direction is determined by using the state and environment corresponding to the current time step. This moving direction is the optimal moving direction in the current environment where the smart device is located, but moving based on this moving direction may not necessarily reach the target location.

[0056] In view of this, an embodiment of the present application provides a method for determining the moving direction of an intelligent device, and introduces an imagination module. The imagination module can calculate a feature sequence that reflects a simulation path, and determine the moving direction corresponding to each time step in the process of the intelligent device moving to the target position through a decoder based on the feature sequence. The simulation path is a possible path for simulating the movement of an intelligent device from the jth stop position to the target position. In the simulation path, the moving direction of the intelligent device at the jth stop position can enable the intelligent device to eventually simulate reaching the target position. In this way, when the moving direction is determined for each time step, such as the jth time step, by the decoder, since it is based on the feature sequence that reflects the simulation path, the determined moving direction can be more inclined to allow the intelligent device to eventually reach the target position.

[0057] The method for determining the moving direction of a smart device provided in an embodiment of the present application may be executed by a processing device, which may be a server or a processor of the smart device, and is not specifically limited in the embodiment of the present application.

[0058] In the embodiment of the present application, the intelligent device may be a robot, or a vehicle with automatic driving or assisted driving functions, etc., which is not specifically limited in the embodiment of the present application.

[0059] First, a brief introduction to the process of smart device movement is given. In actual applications, when the smart device is heading to the target location indicated by the path instruction, it generally does not move to the target location non-stop, but stays at the location for a while after moving for a while. When the smart device stops, the image acquisition structure on the smart device, such as a camera, can rotate in the horizontal and vertical directions to adjust the heading (heading) and elevation (elevation) to collect images, thereby determining the direction of continued movement based on the collected images and instruction information. After determining the direction of movement, the smart device can continue to move to the next stop position according to the direction. In other words, when the smart device is heading to the target location indicated by the path instruction, it may include multiple stop positions, and the direction of continued movement of the smart device is determined at each stop position.

[0060] In an embodiment of the present application, the time process from the jth stop position to the j+1th stop position in the process of the smart device moving to the target position is called the jth time step, and the moving direction determined by the smart device at the jth stop position is called the moving direction corresponding to the jth time step. It can be understood that the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position.

[0061] The following combination Figure 1 The scenario shown introduces the method for determining the moving direction of a smart device provided by an embodiment of the present application. Figure 1 In the scenario shown, the encoding module 102, the imagination module 103 and the decoding module 104 can determine the moving direction 105 corresponding to the j-th time step of the smart device according to the path instruction 101. Specifically, the encoding module 102 can encode the path instruction 101 to obtain a semantic feature vector 106 that can reflect the semantics expressed by the path instruction. The semantic feature vector 106 is used as one of the inputs of the imagination module. The imagination module can calculate a feature sequence 107. The decoding module 104 processes the feature sequence to obtain the moving direction 105 corresponding to the j-th time step.

[0062] In the embodiment of the present application, the path instruction 101 is used to instruct the smart device to go to the target location. In one implementation of the embodiment of the present application, the path instruction 101 can be an instruction described in natural language. For example: go forward 100 meters, pass the sofa, then turn right, enter the room and stop.

[0063] In the embodiment of the present application, the path instruction 101 includes instruction information for going to the target location to instruct the smart device to reach the target location. The embodiment of the present application does not specifically limit the instruction information, and the instruction information may include, for example, information about an object passed by to the target location, and the object may be a sofa, a chair, etc.; the instruction information may include, for example, information about the distance passed to the target location, and the distance may include 100 meters, 200 meters, etc.

[0064] The embodiment of the present application does not specifically limit the specific content included in the path instruction 101. In addition to the instruction information, the path instruction may also include other information, such as information including the starting point location, etc.

[0065] As described above, the semantic feature vector 106 is one of the inputs of the imagination module 103. In the embodiment of the present application, when determining the moving direction 105 corresponding to the j-th time step, the input of the imagination module 103 includes not only the semantic feature vector 106 but also the decoding result 108 output by the decoding module 104 of the i-th time step and the environmental data 109 acquired by the intelligent device at the j-th stop position. In the embodiment of the present application, i is a positive integer less than j, and the embodiment of the present application does not specifically limit the specific value of i. That is, the imagination module can obtain the feature sequence 107 according to the decoding result 108 output by the decoding module 104 of the i-th time step, the semantic feature vector 106 obtained by encoding the path instruction by the encoding module 102, and the environmental data 109 acquired by the intelligent device at the j-th stop position. Among them, the simulated path is a possible path for simulating the intelligent device to move from the j-th stop position to the target position, that is, if the intelligent device moves according to the simulated path, it can definitely reach the target position. Therefore, according to the moving direction determined by the feature sequence 107, the possibility of the smart device eventually reaching the target position can be made higher, thereby increasing the possibility of the smart device reaching the target position under the path instruction.

[0066] For ease of understanding, the method for determining the moving direction of a smart device provided by the present application is described below through an embodiment. Figure 2 , which is a flow chart of a method for determining the moving direction of a smart device provided in an embodiment of the present application.

[0067] In this embodiment, the method may be implemented by, for example, the following steps S201 - S202 .

[0068] S201: Acquire a path instruction, where the path instruction includes instruction information for going to a target location.

[0069] S202: Determine the moving direction corresponding to each time step in the process of the smart device moving toward the target location.

[0070] Among them, the jth time step includes the time process from the jth stop position to the j+1th stop position in the process of the smart device moving towards the target position, and the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position.

[0071] For the description of path instructions, instruction information and time steps, please refer to the relevant description above and will not be repeated here.

[0072] In the embodiment of the present application, in order to increase the possibility of the smart device reaching the target location, an imagination module is introduced, and the moving direction corresponding to each time step in the process of the smart device moving to the target location is determined by the encoding module, the imagination module, and the decoding module. The following takes the determination of the moving direction corresponding to the jth time step as an example to introduce the implementation method of determining the moving direction corresponding to each time step in the process of the smart device moving to the target location by the encoding module, the imagination module, and the decoding module.

[0073] See also Figure 3 , which is a flow chart of a method for determining a moving direction corresponding to the j-th time step provided in an embodiment of the present application.

[0074] The method for determining the moving direction corresponding to the j-th time step provided in the embodiment of the present application can be implemented through the following steps S301-S305.

[0075] S301: Obtain the decoding result output by the decoding module at the i-th time step.

[0076] S302: Obtain the semantic feature vector obtained by encoding the path instruction through the encoding module. Regarding S301 to S302, it should be noted that the embodiment of the present application does not specifically limit the encoding module. As an example, the encoding module can be embodied as a convolutional neural network (Recurrent Neural Network, RNN) such as a long short-term memory (Long Short-Term Memory, LSTM) network model. As mentioned above, the path instruction can be an instruction described in natural language. When the encoding module encodes the path instruction in a specific implementation, the path instruction can first be segmented to obtain several segmentations, and the word embedding vectors corresponding to the several segmentations are determined, and then the semantic feature vector is determined using the word embedding vectors corresponding to the several segmentations. In the embodiment of the present application, the path instruction can be expressed as I={x1,x2,…,x q}, where I represents the path instruction, x1, x2,…, x q represents the q word segments obtained by segmenting the path instruction. The subscript x represents the order in which the word segments appear in the path. For example, x1 represents the first word in the path instruction. q Indicates the last occurrence of a word in a path directive.

[0077] The following combination Figure 4 The specific implementation method of the encoding module to encode the path instructions to obtain the semantic feature vector is introduced. Figure 4 A schematic diagram of the structure of an encoding module provided in an embodiment of the present application.

[0078] exist Figure 4 In the embodiment of the present application, the encoding module is embodied as an LSTM network model 401, and the LSTM network model 401 can obtain the semantic feature vector after p cycles, where the number p is the same as the number of word segmentations obtained by segmenting the path instruction. The LSTM network model 401 outputs an implicit state after one cycle. In the embodiment of the present application, the implicit state corresponding to the qth cycle can be obtained according to the implicit state outputted in the q-1th cycle in the qth cycle. Figure 4 In order to reflect the cyclic process, p LSTM network models 401 are shown, but in actual applications, the encoding module may include only one LSTM network model 401 or multiple LSTM network models 401.

[0079] In an embodiment of the present application, the implicit state output by the LSTM network model in the qth cycle can be determined by the following formula (1).

[0080]

[0081] in:

[0082] LSTM is a function of an output state; in the following description of the embodiments of the present application, LSTM appearing in the formula is a function of an output state;

[0083] Output the hidden state of the LSTM network model at the qth cycle;

[0084] Output the hidden state of the LSTM network model at the q-1th cycle;

[0085] w q-1 is the qth participle x q For example, w0 is the word embedding vector of the first word x1, w1 is the word embedding vector of the second word x2, and so on. p-1 is the pth participle xp The word embedding vector of .

[0086] The semantic feature vector mentioned in the embodiment of the present application may include the p implicit states output by the LSTM network model 401 in the p-th cycle. It can be understood that the implicit state output by the LSTM network model in the p-th cycle is obtained based on the word embedding vectors corresponding to the p word segments obtained by segmenting the path instruction. Therefore, the implicit state output by the p-th LSTM network model can reflect the complete semantics of the path instruction.

[0087] It should be noted that the embodiments of the present application do not specifically limit the timing when the encoding module encodes the path instruction. As an example, the encoding module may encode the path instruction when receiving the path instruction. As another example, the encoding module may reflect the moving progress of the smart device when encoding the path instruction, that is, it may reflect the current stop position of the smart device. In this case, the encoding module may encode the path instruction when the smart device reaches the jth stop position, so that the semantic feature vector obtained by the encoding reflects the moving progress of the smart device when the smart device is at the jth stop position. S303: Obtain the environmental data obtained by the smart device at the jth stop position.

[0088] As mentioned above, the image acquisition structure on the smart device, such as a camera, can rotate in the horizontal and vertical directions to adjust the heading and elevation to capture images. In an embodiment of the present application, the image acquisition structure installed on the smart device, such as a camera, can be used to obtain environmental data of the smart device at the jth stop position.

[0089] S304: Based on the decoding result output at the i-th time step, the semantic feature vector and the environmental data obtained by the smart device at the j-th stop position, a feature sequence reflecting the simulation path is obtained through the imagination module; the simulation path is a simulation path from the smart device from the j-th stop position to the target position; i is less than j.

[0090] It is understandable that if you want to simulate the intelligent device reaching the target position from the jth stop position, on the one hand, you can combine the environmental information around the current position of the intelligent device, and the intelligent device is generally equipped with an image acquisition structure such as a camera, and the environmental data obtained by the intelligent acquisition device installed on the intelligent device can be used to reflect the environmental information around the current position of the intelligent device. On the other hand, it can also be combined with the instruction information included in the path instruction, and the semantic feature vector can reflect the instruction information. On the other hand, it can also be combined with the moving direction of the intelligent device in the time step before the jth time step. It is understandable that at each time step, such as the i-th time step, the decoding module will output a decoding result corresponding to the i-th time step, and the decoding result of the i-th time step can reflect the moving direction of the i-th time step. Therefore, in the embodiment of the present application, after executing S301-S303 to obtain the decoding result output by the decoding module at the i-th time step, the semantic feature vector, and the environmental data obtained by the smart device at the j-th stop position, the imagination module can calculate the feature sequence reflecting the simulation path according to the decoding result output by the decoding module at the i-th time step, the semantic feature vector, and the environmental data obtained by the smart device at the j-th stop position. The simulation path can be a path that simulates the smart device reaching the target location from the j-th stop position.

[0091] As mentioned above, the image acquisition structure on the smart device, such as a camera, can rotate in the horizontal and vertical directions to adjust the heading and elevation to capture images. In an embodiment of the present application, the image acquisition space of the smart device can be divided into a number of, for example, 1 viewing angles. In an embodiment of the present application, the image acquisition space refers to a three-dimensional space in which the smart device can capture images. The embodiment of the present application does not specifically limit the manner in which the image acquisition space is divided to obtain 1 viewing angles. As an example, the image acquisition space can be divided by a preset angle range to obtain 1 viewing angle.

[0092] In the embodiment of the present application, considering that the smart device includes two parameters, namely, heading and elevation, when moving, the preset angle range may also include two parameters, namely, heading and elevation. When the image acquisition space is carefully divided, the angle range covered by the heading is divided into a first number of angle ranges according to the preset angle, and the angle range covered by the elevation is divided into a second preset number of angle ranges according to the direction of the elevation. The first number of angle ranges and the second preset number of angle ranges are combined in pairs to obtain a third number of angle range combinations, and one angle range combination corresponds to one viewing angle. For example, the angle range covered by the heading is 360 degrees, and the angle range covered by the heading is divided into 12 angle ranges according to 30 degrees; the angle range covered by the elevation angle is from -30 degrees to +30 degrees, and the angle range covered by the elevation angle is divided into three angle ranges of less than 0 degrees, 0 degrees, and more than 0 degrees. The aforementioned 12 angle ranges and 3 angle ranges are combined in pairs to obtain 36 angle range combinations, that is, 36 viewing angles.

[0093] It can be understood that, in practical applications, the environmental data is related to the images of each perspective collected by the smart device. In one implementation of the embodiment of the present application, the environmental data can be represented by the perspective feature vectors corresponding to each perspective of the smart device at the jth stop position. For the description of the perspective feature vector, please refer to the description of formula (15) below, which will not be repeated here.

[0094] In the embodiment of the present application, i is a positive integer less than j. Considering that the closer i is to j, the higher the correlation between the decoding result output by the decoding module at the i-th time step and the state of the smart device at the j-th time step, the more accurate the calculated feature sequence is. Therefore, in an implementation of the embodiment of the present application, the value of i can be equal to j-1.

[0095] S305: Determine the moving direction corresponding to the j-th time step through the decoding module according to the feature sequence.

[0096] It should be noted that the moving direction corresponding to the j-th time step in the embodiment of the present application can be understood as determining a viewing angle from the aforementioned l viewing angles as the moving direction corresponding to the j-th time step.

[0097] The embodiment of the present application does not specifically limit the decoding module. As an example, the decoding module may include a first LSTM network model and an action estimator. In the embodiment of the present application, when the decoding module includes the first LSTM network and the action estimator, S305 may include three implementation methods when implemented specifically.

[0098] The first implementation method: determining a decoding result corresponding to the feature sequence according to the first LSTM network model; and obtaining a moving direction of the smart device through the action estimator according to the decoding result.

[0099] In a first implementation manner, the feature sequence can be used as the input of the first LSTM network model to determine the moving direction corresponding to the j-th time step.

[0100] For the first implementation, the first LSTM network model determines the decoding result corresponding to the feature sequence, which can be determined by the following formula (2) during specific implementation.

[0101]

[0102] In formula (2):

[0103] is the decoding result corresponding to the feature sequence;

[0104] is the decoding result output by the decoding module at the i-th time step;

[0105] v i is the viewing angle feature vector corresponding to the moving side of the smart device at the i-th time step; for the description of the viewing angle feature vector, reference may be made to the description of formula (15) below, which will not be described in detail here;

[0106] m j represents the feature sequence;

[0107] used to represent the implicit state in the semantic feature vector output by the decoding module that the smart device pays attention to at the i-th stop position, that is, used to represent which position in the path instruction the i-th stop position matches; It can be determined by the following formula (3):

[0108]

[0109] In formula (3):

[0110] ATT is a similarity calculation function. Representation calculation and as well as The similarity degree; ATT appearing in the formula in the following embodiments of the present application is a similarity calculation function;

[0111] is the decoding result corresponding to the feature sequence;

[0112] For the LSTM network model used for encoding (e.g. Figure 4 401) in the first cycle outputs the implicit state; For the LSTM network model used for encoding (e.g. Figure 4 401) in the second cycle outputs the implicit state; For the LSTM network model used for encoding (e.g. Figure 4 401) in the pth cycle outputs the hidden state.

[0113] In a first implementation manner, the moving direction of the smart device is obtained through the motion estimator according to the decoding result. In a specific implementation, it can be achieved through the following formula (4).

[0114]

[0115] In formula (4):

[0116] p j is a probability sequence, used to represent the probability that each viewing angle is the moving direction of the smart device;

[0117] is the decoding result corresponding to the feature sequence, that is, the output of the first LSTM network model;

[0118] represents the visual feature vector noticed by the decoding result corresponding to the feature sequence at the jth stop position; It can be obtained by the following formula (5).

[0119]

[0120] In formula (5):

[0121] is the decoding result corresponding to the feature sequence;

[0122] represents the visual feature vector corresponding to the 0th visual angle at the jth stop position; represents the visual feature vector corresponding to the first visual angle at the jth stop position; represents the visual feature vector corresponding to the lth visual angle at the jth stop position;

[0123] V (j) It represents the perspective feature matrix composed of each perspective feature vector at the jth stop position, V (j) This can be achieved by the following formula (6).

[0124]

[0125] In formula (6):

[0126] represents the visual feature vector corresponding to the 0th visual angle at the jth stop position; represents the visual feature vector corresponding to the first visual angle at the jth stop position; Represents the viewing angle feature vector corresponding to the lth viewing angle at the jth stop position.

[0127] It should be noted that, in the embodiment of the present application, the action estimator can be implemented using a softmax function, that is, when formula (4) is specifically implemented, it can be implemented, for example, by the following formula (7).

[0128]

[0129] In formula (7),

[0130] W o , W V and W h are known parameters;

[0131] Represents the transpose of a matrix with dimension l+1 and value 1;

[0132] For the description of other variables in formula (7), please refer to the description of each variable in formula (4), which will not be repeated here.

[0133] The second implementation manner: obtaining the moving direction of the smart device through the action estimator according to the feature sequence.

[0134] In a second implementation, the feature sequence is used as an input of the motion estimator to determine the moving direction corresponding to the j-th time step.

[0135] For the second implementation, the first LSTM network model first calculates a decoding result, and then the action estimator determines the moving direction corresponding to the j-th time step based on the decoding result and the feature sequence.

[0136] For the second implementation, the first LSTM network model determines that the decoding result calculated and obtained can be determined by the following formula (8) during specific implementation.

[0137]

[0138] Formula (8) is similar to formula (2), except that there is no variable m in formula (8).j That is, there is no characteristic sequence. For the description of other variables in formula (8), please refer to the description of each variable in formula (2), which will not be repeated here.

[0139] In a second implementation, the moving direction of the smart device is obtained through the motion estimator according to the decoding result. In a specific implementation, it can be achieved through the following formula (9).

[0140]

[0141] Formula (9) is similar to formula (4), except that compared with formula (4), formula (9) has an additional variable m. j That is, the characteristic sequence is added; for the description of other variables in formula (9), please refer to the description of each variable in formula (4), which will not be repeated here.

[0142] Correspondingly, when the action estimator can be implemented using the softmax function, that is, when formula (9) is implemented specifically, it can be implemented, for example, by the following formula (10).

[0143]

[0144] Formula (10) is similar to formula (7), except that compared with formula (7), formula (10) has an additional variable m. j That is, the characteristic sequence is added; for the description of other variables in formula (10), please refer to the description of each variable in formula (7), which will not be repeated here.

[0145] A third implementation method: determining a decoding result corresponding to the feature sequence according to the first LSTM network model, and obtaining a moving direction of the smart device through the action estimator according to the decoding result and the feature sequence.

[0146] It can be understood that, since the feature sequence can reflect the simulation path, and in the simulation path, the moving direction of the smart device at the jth stop position can make the smart device finally simulate reaching the target position. Therefore, when the decoder determines the moving direction for each time step, such as the jth time step, the determined moving direction can be more inclined to allow the smart device to finally reach the target position because it is based on the feature sequence that reflects the simulation path. When using the feature sequence to determine the moving direction of the smart device, in order to make the determined moving direction more likely to make the smart device reach the target position, the feature sequence can be used as much as possible. Therefore, in the third implementation, the feature sequence is used as both the input of the first LSTM network model and the input of the action estimator.

[0147] For the third implementation, the decoding result corresponding to the feature sequence can be calculated using the aforementioned formula (2), and the moving direction of the smart device can be obtained using the aforementioned formula (9).

[0148] It can be seen from the above description that in the embodiment of the present application, an imagination module is introduced, and the moving direction of the intelligent device is determined by using the encoding module, the imagination module and the decoding module, so as to control the intelligent device to go to the target position indicated in the path instruction. In order to increase the possibility of the intelligent device reaching the target position, the feature sequence reflecting the simulated path is calculated by the introduced imagination module, and the moving direction corresponding to each time step in the process of the intelligent device going to the target position is determined by the decoder based on the feature sequence. The simulated path is calculated by the imagination module according to the decoding result of the decoding module at the i-th time step, the semantic feature vector encoded by the encoding module, and the environmental data obtained by the intelligent device at the j-th stop position, so as to simulate the possible path of the intelligent device moving from the j-th stop position to the target position. In the simulated path, the moving direction of the intelligent device at the j-th stop position can make the intelligent device finally simulate to reach the target position. When the moving direction is determined for each time step, such as the j-th time step, by the decoder, the moving direction determined can be more inclined to make the intelligent device finally reach the target position because it is based on the feature sequence reflecting the simulated path. Compared with the traditional method of determining the moving direction for the smart device based only on the current state and environment, the moving direction determined by the present application is more accurate in achieving the goal, that is, ultimately moving the smart device to the target position, and increases the possibility of the smart device reaching the target position under the path instruction.

[0149] As mentioned above, the imagination module can calculate the feature sequence. The following introduces the implementation method of the imagination module calculating the feature sequence in combination with the specific structure of the imagination module.

[0150] In one implementation of the embodiment of the present application, the imagination module may include a second long short-term memory LSTM network model and an attention model. In this case, in step S302, "according to the decoding result output by the decoding module at the i-th time step, the semantic feature vector and the environmental data obtained by the smart device at the j-th stop position, the feature sequence reflecting the simulation path is obtained by the imagination module" can be implemented in detail. Figure 5 The steps S501-S502 shown are implemented.

[0151] S501: Based on the decoding result output at the i-th time step, the semantic feature vector and the environmental data obtained by the smart device at the j-th stop position, the second LSTM network model is looped k times to obtain the states corresponding to the k time steps in the simulation path.

[0152] In an embodiment of the present application, the simulation path includes k time steps for simulating the smart device to reach the target location. The embodiment of the present application does not specifically limit the specific value of k, and k can be an integer greater than or equal to 1.

[0153] In an embodiment of the present application, the second LSTM network model can calculate the state corresponding to the time step at each time step of the k time steps. Specifically, according to the decoding result outputted at the i-th time step, the semantic feature vector, and the environmental data acquired by the smart device at the j-th stop position, the second LSTM network model can be looped k times to obtain the states corresponding to the k time steps in the simulation path. Among them, the first loop obtains the state corresponding to the first time step, the second loop obtains the state corresponding to the second time step, and so on, and the m-th loop obtains the state corresponding to the m-th time step.

[0154] In the embodiment of the present application, in the k cycles, the m-th cycle obtains the state corresponding to the m-th time step in the following manner:

[0155] If m=1, the state corresponding to the first time step can be calculated by the following formula (11).

[0156]

[0157] In formula (11),

[0158] Indicates the state corresponding to the first time step;

[0159] W′ h , W v and W a are known parameters;

[0160] is the decoding result output by the decoding module at the i-th time step;

[0161] v i Used to characterize the viewing angle of the smart device at the i-th stop position, v i It can be reflected as a viewing angle feature vector corresponding to the viewing angle of the smart device at the i-th stop position;

[0162] is the viewing angle that the smart device focuses on at the jth stop position, The j-th stop of the smart device for the child's attention can represent the direction of movement of the smart device; For the specific calculation method of , please refer to the following formula (14).

[0163] It can be seen from the above formula (11) that when m=1, the state corresponding to the mth time step is determined based on the decoding result output by the decoding module at the i-th time step, the viewing angle of the smart device at the i-th stop position, and the viewing angle focused on by the smart device at the j-th stop position.

[0164] In the embodiment of the present application, if m is greater than 1, the state corresponding to the mth time step can be calculated by the following formula (12).

[0165]

[0166] In formula (12),

[0167] Represents the state corresponding to the mth time step;

[0168] Represents the state corresponding to the m-1th time step;

[0169] Representing the implicit state in the semantic feature vector output by the decoding module noticed in the m-1th time step in the simulation path, that is, used to represent which position in the path instruction the m-1th stop position matches; It can be determined by the following formula (13):

[0170]

[0171] about to For the description of , please refer to the description in formula (3), which will not be repeated here.

[0172] In the embodiment of the present application, the visual angle that the smart device in the jth stop position mentioned in the above formula (12) focuses on is It can be the decoding result output by the decoding module at the i-th time step The characteristic vector of the perspective corresponding to each perspective when the smart device is at the jth stop position is determined. Please refer to formula (14) for understanding.

[0173]

[0174] In formula (14):

[0175] represents the visual feature vector corresponding to the 0th visual angle at the jth stop position; represents the visual feature vector corresponding to the first visual angle at the jth stop position; Represents the viewing angle feature vector corresponding to the lth viewing angle at the jth stop position.

[0176] Regarding the feature vectors of the perspectives corresponding to each perspective when the smart device is at the jth stop position, it should be noted that, in the embodiment of the present application, the perspective feature vector of a perspective may be composed of two parts, one being an appearance feature vector and the other being a direction feature vector.

[0177] Please refer to formula (15) for understanding.

[0178]

[0179] In formula (15):

[0180] A feature vector representing the viewing angle corresponding to the nth viewing angle when the smart device is at the jth stop position;

[0181] The appearance feature vector representing the perspective corresponding to the nth perspective when the smart device is at the jth stop position;

[0182] The directional feature vector representing the viewing angle corresponding to the nth viewing angle when the smart device is at the jth stop position.

[0183] It is understandable that the smart device can collect images corresponding to each perspective when it is at the jth stop position. The appearance feature vector of the nth perspective among the l perspectives in the embodiment of the present application can be determined by the image of the nth perspective collected by the smart device.

[0184] As mentioned above, a viewing angle may include parameters of two dimensions, namely, heading and elevation, and the smart device corresponds to a viewing angle at the jth stop position. In the embodiment of the present application, when the smart device is at the jth stop position, the directional feature vector of the nth viewing angle may be calculated based on the difference between the heading angle corresponding to the nth viewing angle and the heading angle corresponding to the smart device at the jth stop position, and the difference between the elevation angle corresponding to the nth viewing angle and the elevation angle corresponding to the smart device at the jth stop position. This may be understood by referring to formula (16).

[0185]

[0186] In formula (16):

[0187] Represents the directional feature vector of the nth viewing angle when the smart device is at the jth stop position;

[0188] represents the difference between the heading angle corresponding to the nth viewing angle and the heading angle corresponding to the jth viewing angle of the smart device when the smart device is at the jth stopping position;

[0189] It represents the difference between the elevation angle corresponding to the nth viewing angle and the elevation angle corresponding to the jth viewing angle of the smart device when the smart device is at the jth staying position.

[0190] S502: Determine the feature sequence through the attention model according to the decoding result and the states corresponding to the k time steps in the simulation path.

[0191] In the embodiment of the present application, the characteristic sequence can be determined by the following formula (17).

[0192]

[0193] In formula (17),

[0194] Indicates the state corresponding to the first time step; represents the state corresponding to the second time step, and so on. Represents the state corresponding to the kth time step;

[0195] is the decoding result output by the decoding module at the i-th time step.

[0196] In an embodiment of the present application, the encoding module, imagination module and decoding module can be obtained through training data. In an embodiment of the present application, the training data can be a training path instruction and the moving direction of each time step corresponding to the training path instruction. In an embodiment of the present application, since the training model is difficult to converge in the early stage of training, the reward signal obtained by reinforcement learning cannot determine whether the output of the current model is correct, and supervised learning is learned by labels, the labels of the training data can be used to determine whether the output of the current model is correct. Therefore, in an embodiment of the present application, in order to train and obtain the available encoding module, imagination module and decoding module as soon as possible, a training method of supervised learning and then reinforcement learning can be adopted. After a relatively reliable model is obtained through supervised learning training, reinforcement learning training can be used to improve the efficiency of training to obtain the encoding module, imagination module and decoding module.

[0197] In the embodiment of the present application, since the training data of supervised learning carries labels, that is, we know the viewpoint that the smart device will choose next, the loss function of supervised learning is cross entropy loss. When using reinforcement learning training, the current training model can be used to sample a viewpoint sequence V = [v1, v2, ...., v l ], then calculate the reward, and calculate the gradient, and finally use random gradient descent to train the entire model. For reinforcement learning, the reward can be defined as the last point v in the viewpoint sequence V l The inverse of the distance to the target point. In the embodiment of the present application, all parameters in the model can be denoted as θ, which can include W in the above formula (7) o , W V and W h And W′ in the above formula (11) h , W v and W a .

[0198] For reinforcement learning, the objective function can be expressed by formula (18), and the gradient can be approximately expressed by the following formula (19).

[0199]

[0200]

[0201] Where V (s) is obtained by random sampling, V (b) It is obtained in a greedy way (i.e. taking the view with the highest probability each time), V (b) It can be called a reference sequence and is used to reduce the variance of the gradient estimate.

[0202] Regarding the LSTM and ATT mentioned in the formulas of the above embodiments, their working principles are described in detail below.

[0203] The LSTM in the formula in the above embodiment is essentially a stateful function, which is abstractly represented as h t =LSTM(h t-1 ,x t ), where the vector x t is the input at time step t, h t-1 is the hidden state after the previous time step. Inside LSTM, we use T to represent the linear transformation, and the calculation process can be expressed by the following formulas (20) to (22):

[0204]

[0205] c t =f t ⊙c t-1 +i t ⊙g t Formula (21)

[0206]

[0207] In formula (20) to formula (22):

[0208] i t 、f t 、c t and t They are called input gate, forget gate, memory gate and output gate respectively;

[0209] is the hyperbolic tangent function;

[0210] σ is the sigmoid function, a common activation function in neural networks.

[0211] As mentioned above, ATT in the formula in the above embodiment is a similarity calculation function. ATT can also represent an attention model, which can be represented by the following formula (23).

[0212] z=ATT(q,[a1,a2,…,a y ]) Formula (23)

[0213] In formula (23):

[0214] q and a i are all vectors;

[0215] The attention model can be used to determine which a was paid attention to in the previous time step i , that is, to calculate a weight value, and the high weight indicates that it is noticed. The method is to use a multilayer perceptron (MLP) to calculate a i The similarity e with q i , and then calculate the attention weight Using these weights, we can generate a context vector z = ∑w i a i , and used in LSTM at time step t: t =LSTM(h t-1 ,[x t ,z]).

[0216] The above briefly introduces the method for determining the moving direction of a smart device provided in an embodiment of the present application. The following introduces the method in combination with an application scenario.

[0217] See also Figure 6 , Figure 6 A schematic diagram of determining the moving direction of a smart device provided in an embodiment of the present application is shown.

[0218] Figure 6 601 in the figure indicates that the encoding module encodes the path instruction. For the description of 601, please refer to the above description of Figure 4 The description part will not be described in detail here.

[0219] Figure 6 602 in the figure indicates that the decoding module determines the moving direction of the smart device. In 602, the decoding module includes an LSTM network model 621 and an action estimator AP 622. It should be noted that Figure 6 6 shows multiple groups of LSTM network models 621 and action estimator AP 622, which are shown only for the convenience of understanding, so as to reflect that the smart device goes to the target location through r time steps, and the moving direction of the smart device is calculated by the decoding module in each time step, such as Figure 6 As shown in , the moving direction of the smart device calculated by the decoding module at the first time step is embodied by p1. In practical applications, the decoding module may include multiple groups of LSTM network models 621 and action estimators AP 622, or may include one group of LSTM network models 621 and action estimators AP 622.

[0220] It should be noted that the method for calculating the moving direction of the smart device at each time step is similar. Figure 6 The calculation of the moving direction of the smart device at the second time step is described.

[0221] Specifically, the output of the LSTM network model can be calculated using the above formula (2): Then use the above formula (9) to calculate p2.

[0222] It should be noted that in Figure 6 In the above example, m1 is the feature sequence calculated by the imagination module in the first time step, and m2 is the feature sequence calculated by the imagination module in the second time step. Similarly, m r The feature sequence calculated by the imagination module for the second time step. Figure 6 In , the feature sequence is used as both the input of the LSTM network model 621 and the input of the action estimator 622, but Figure 6This is just a schematic illustration. In actual applications, the feature sequence can be used only as the input of the LSTM network model 621, or can be used only as the input of the action estimator 622.

[0223] about Figure 6 The input of the LSTM network model 621 and the input of the action estimator 622 can refer to the description of formula (2) and formula (9), which will not be repeated here.

[0224] The following combination Figure 7 The imagination model is introduced to calculate the implementation method of the feature sequence corresponding to the j-th time step. Figure 7 A schematic diagram of determining a characteristic sequence provided in an embodiment of the present application.

[0225] from Figure 7 It can be seen that the feature sequence output by the imagination module 710 at the jth time step is used as the input of the LSTM network model 621 and the action estimator 622 to determine the moving direction of the smart device at the jth time step.

[0226] exist Figure 7 In the above, the imagination module 710 includes an LSTM network model 711 and an attention model 712. It should be noted that: Figure 7 , multiple groups of LSTM network models 711 and attention models 712 are shown, but this is only shown for ease of understanding to reflect that the imagination module simulates the simulation path of the smart device from the jth stop position to the target position, including k time steps. In actual applications, the imagination module 710 may include only one group of LSTM network models 711 and attention models 712, or may include multiple groups of LSTM network models 711 and attention models 712.

[0227] In the embodiment of the present application, the LSTM network model 711 can use the above formulas (11) and (12) to calculate the state corresponding to each time step in the k time steps, that is, the corresponding Figure 7 The output of the LSTM network model 711 in ; then, the feature sequence of the smart device at the jth time step is calculated using the aforementioned formula (17).

[0228] about Figure 7 The input of the LSTM network model 711 and the input of the attention model 712 can refer to the description of formula (11), formula (12) and formula (17), which will not be repeated here.

[0229] Based on the method for determining the moving direction of a smart device provided in the above embodiment, this embodiment provides an apparatus 800 for determining the moving direction of a smart device, see Figure 8 The device 800 includes an acquisition unit 801 and a determination unit 802.

[0230] An acquisition unit 801 is used to acquire a path instruction, where the path instruction includes instruction information for going to a target location;

[0231] The determination unit 802 is used to determine the moving direction corresponding to each time step in the process of the smart device moving to the target position by using the encoding module, the imagination module and the decoding module; the jth time step includes the time process from the jth stop position to the j+1th stop position in the process of the smart device moving to the target position, and the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position;

[0232] The moving direction corresponding to the jth time step is determined as follows:

[0233] Acquire a semantic feature vector obtained by encoding the path instruction through the encoding module;

[0234] According to the decoding result output by the decoding module at the i-th time step, the semantic feature vector and the environmental data obtained by the smart device at the j-th stop position, the feature sequence reflecting the simulation path is obtained by the imagination module; the simulation path includes simulating the path of the smart device from the j-th stop position to the target position; i is less than j;

[0235] The moving direction corresponding to the j-th time step is determined by the decoding module according to the feature sequence.

[0236] Optionally, the decoding module includes a first long short-term memory (LSTM) network model and an action estimator; and using the decoding module to determine the moving direction of the smart device according to the feature sequence includes:

[0237] Determine a decoding result corresponding to the feature sequence according to the first LSTM network model; obtain a moving direction of the smart device through the action estimator according to the decoding result; and / or,

[0238] The moving direction of the smart device is obtained through the action estimator according to the feature sequence.

[0239] Optionally, the simulation path includes k time steps for simulating the smart device to reach the target location; the imagination module includes a second long short-term memory LSTM network model and an attention model; the feature sequence reflecting the simulation path is obtained through the imagination module according to the decoding result output by the decoding module at the i-th time step, the semantic feature vector and the environmental data obtained by the smart device at the j-th stop position, including:

[0240] According to the decoding result, the semantic feature vector, and the environmental data obtained by the smart device at the jth stop position, the second LSTM network model is looped k times to obtain the states corresponding to the k time steps in the simulation path;

[0241] The feature sequence is determined by the attention model according to the decoding result and the states corresponding to the k time steps in the simulation path.

[0242] Optionally, in the k cycles, the m-th cycle obtains the state corresponding to the m-th time step in the following manner:

[0243] If m is equal to 1, the state corresponding to the mth time step is determined according to the decoding result, the viewing angle of the smart device at the i-th stop position, and the viewing angle that the smart device pays attention to at the j-th stop position; the viewing angle that the smart device pays attention to at the j-th stop position is determined according to the environmental data;

[0244] If m is greater than 1, the state corresponding to the m-1th time step is determined through the mth cycle.

[0245] Optionally, the perspective that the smart device focuses on at the jth stop position is determined based on the decoding result and a feature vector of the perspective corresponding to each perspective when the smart device is at the jth stop position.

[0246] Optionally, the perspective feature vector of the nth perspective when the smart device is at the jth stay position is determined based on the difference between the heading angle corresponding to the nth perspective and the heading angle corresponding to the smart device at the jth stay position, the difference between the elevation angle corresponding to the nth perspective and the elevation angle corresponding to the smart device at the jth stay position, and images of each perspective captured by the smart device at the jth stay position.

[0247] Optionally, the environmental data includes perspective feature vectors corresponding to l perspectives of the smart device at the j-th stop position; the l perspectives are obtained by dividing the image acquisition space of the smart device into a preset angle range.

[0248] Optionally, the encoding module, imagination module and decoding module are trained using training data, using a training method of supervised learning followed by reinforcement learning, wherein the training data are training path instructions and the moving directions of each time step corresponding to the training path instructions.

[0249] It can be seen from the above description that in the embodiment of the present application, an imagination module is introduced, and the moving direction of the intelligent device is determined by using the encoding module, the imagination module and the decoding module, so as to control the intelligent device to go to the target position indicated in the path instruction. In order to increase the possibility of the intelligent device reaching the target position, the feature sequence reflecting the simulated path is calculated by the introduced imagination module, and the moving direction corresponding to each time step in the process of the intelligent device going to the target position is determined by the decoder based on the feature sequence. The simulated path is calculated by the imagination module according to the decoding result of the decoding module at the i-th time step, the semantic feature vector encoded by the encoding module, and the environmental data obtained by the intelligent device at the j-th stop position, so as to simulate the possible path of the intelligent device moving from the j-th stop position to the target position. In the simulated path, the moving direction of the intelligent device at the j-th stop position can make the intelligent device finally simulate to reach the target position. When the moving direction is determined for each time step, such as the j-th time step, by the decoder, the moving direction determined can be more inclined to make the intelligent device finally reach the target position because it is based on the feature sequence reflecting the simulated path. Compared with the traditional method of determining the moving direction for the smart device based only on the current state and environment, the moving direction determined by the present application is more accurate in achieving the goal, that is, ultimately moving the smart device to the target position, and increases the possibility of the smart device reaching the target position under the path instruction.

[0250] The embodiment of the present application also provides a device for determining the moving direction of a smart device. The device for determining the moving direction of a smart device is introduced below in conjunction with the accompanying drawings. Fig. 9As shown, an embodiment of the present application provides a device 900 for determining the direction of movement of an intelligent device. The device 900 may be a server, which may have relatively large differences due to different configurations or performances. It may include one or more central processing units (CPUs) 922 (for example, one or more processors) and a memory 932, and one or more storage media 930 (for example, one or more mass storage devices) storing application programs 942 or data 944. Among them, the memory 932 and the storage medium 930 may be short-term storage or permanent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processor 922 may be configured to communicate with the storage medium 930 to execute a series of instruction operations in the storage medium 930 on 900 for determining the direction of movement of the intelligent device.

[0251] The device 900 for determining the moving direction of the smart device may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input and output interfaces 958, and / or one or more operating systems 941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0252] The steps performed by the server in the above embodiment can be based on the Fig. 9 The server structure shown.

[0253] The CPU 922 is used to execute the following steps:

[0254] Obtaining a path instruction, wherein the path instruction includes instruction information for going to a target location;

[0255] Determine the moving direction corresponding to each time step in the process of the smart device moving to the target location using the encoding module, the imagination module, and the decoding module; the jth time step includes the time process from the jth stop position to the j+1th stop position in the process of the smart device moving to the target location, and the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position;

[0256] The moving direction corresponding to the jth time step is determined as follows:

[0257] Acquire a semantic feature vector obtained by encoding the path instruction through the encoding module;

[0258] According to the decoding result output by the decoding module at the i-th time step, the semantic feature vector and the environmental data obtained by the smart device at the j-th stop position, the feature sequence reflecting the simulation path is obtained by the imagination module; the simulation path includes simulating the path of the smart device from the j-th stop position to the target position; i is less than j;

[0259] The moving direction corresponding to the j-th time step is determined by the decoding module according to the feature sequence.

[0260] See also Fig.10 As shown, the embodiment of the present application provides a device 1000 for determining the moving direction of a smart device. The device 1000 may also be a terminal device, which may include any terminal device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a point of sales (POS), a vehicle-mounted computer, etc., and the terminal device is taken as an example of a mobile phone:

[0261] Fig.10 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Fig.10 The mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090. Those skilled in the art can understand that Fig.10 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0262] Combine the following Fig.10 A detailed introduction to the various components of the mobile phone:

[0263] The RF circuit 1010 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 1080 for processing; in addition, the designed uplink data is sent to the base station. Usually, the RF circuit 1010 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, referred to as LNA), a duplexer, etc. In addition, the RF circuit 1010 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (Global System of Mobile communication, referred to as GSM), General Packet Radio Service (General Packet Radio Service, referred to as GPRS), Code Division Multiple Access (Code Division Multiple Access, referred to as CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, referred to as WCDMA), Long Term Evolution (Long Term Evolution, referred to as LTE), email, Short Messaging Service (SMS), etc.

[0264] The memory 1020 can be used to store software programs and modules. The processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020. The memory 1020 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 1020 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0265] The input unit 1030 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1031 or near the touch panel 1031 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1031, the input unit 1030 may further include other input devices 1032. Specifically, the other input devices 1032 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0266] The display unit 1040 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. Optionally, the display panel 1041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides a corresponding visual output on the display panel 1041 according to the type of touch event. Although in Fig.10 In the embodiment, the touch panel 1031 and the display panel 1041 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.

[0267] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1041 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0268] The audio circuit 1060, the speaker 1061, and the microphone 1062 can provide an audio interface between the user and the mobile phone. The audio circuit 1060 can transmit the received audio data to the speaker 1061 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, and then the audio data is output to the processor 1080 for processing, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for further processing.

[0269] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 1070. It provides users with wireless broadband Internet access. Fig.10 A WiFi module 1070 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0270] The processor 1080 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 1020 and calling data stored in the memory 1020. Optionally, the processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1080.

[0271] The mobile phone also includes a power supply 1090 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1080 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0272] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0273] An embodiment of the present application further provides a computer-readable storage medium for storing program code, wherein the program code is used to execute any one of the implementation methods of determining a moving direction of a smart device described in the aforementioned embodiments.

[0274] Based on the method for determining the moving direction of an intelligent device provided in the above embodiments, the embodiments of the present application further provide a path planning system, which is introduced below.

[0275] The path planning system provided in the embodiments of the present application includes the smart device mentioned in the above embodiments, more specifically, see Fig.11 As shown, Fig.11 The schematic diagram of the structure of a path planning system provided by an embodiment of the present application is as follows: The smart device 1110 in the path planning system 1100 may include an image acquisition structure 1111 and a mobile structure 1112 .

[0276] The smart device 1110 may be used to obtain a path instruction, wherein the path instruction includes instruction information for going to a target location;

[0277] The smart device 1110 is further used to determine the moving direction corresponding to each time step in the process of going to the target location; the jth time step includes the time process from the jth stop position to the j+1th stop position in the process of the smart device going to the target location, and the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position;

[0278] The smart device 1110 is further configured to drive the moving structure 1112 to move in a corresponding moving direction at each time step.

[0279] Specifically, the smart device 1110 can Fig.12 The method shown determines the movement direction corresponding to the j-th time step. Fig.12 A flowchart of a method for a smart device to determine a moving direction corresponding to a j-th time step provided in an embodiment of the present application.

[0280] S1201: Obtain the decoding result output by the decoding module at the i-th time step.

[0281] S1202: Obtain a semantic feature vector obtained by encoding the path instruction through an encoding module.

[0282] S1203: Acquire environmental data acquired by the smart device at the jth stop position according to the image acquisition structure.

[0283] S1204: Based on the decoding result output at the i-th time step, the semantic feature vector and the environmental data obtained at the j-th stop position, a feature sequence reflecting the simulation path is obtained through the imagination module; the simulation path includes simulating the path of the smart device from the j-th stop position to the target position; i is less than j.

[0284] S1205: Determine the moving direction corresponding to the j-th time step through the decoding module according to the feature sequence.

[0285] It should be noted that the specific implementation of S1201-S1205 is similar to the implementation of S301-S305, so the relevant description can refer to the above description of S301-S305, which will not be described in detail here.

[0286] It can be seen from the above description that the path planning system provided by the embodiment of the present application introduces an imagination module when determining the moving direction corresponding to the intelligent device at each time step in the path planning system, and uses the encoding module, imagination module and decoding module to determine the moving direction of the intelligent device, so as to control the intelligent device to go to the target position indicated in the path instruction. In order to increase the possibility of the intelligent device reaching the target position, the feature sequence reflecting the simulated path is calculated by the introduced imagination module, and the moving direction corresponding to each time step in the process of the intelligent device going to the target position is determined by the decoder according to the feature sequence. The simulated path is calculated by the imagination module according to the decoding result of the decoding module at the i-th time step, the semantic feature vector encoded by the encoding module, and the environmental data obtained by the intelligent device at the j-th stop position, so as to simulate the possible path of the intelligent device moving from the j-th stop position to the target position. In the simulated path, the moving direction of the intelligent device at the j-th stop position can make the intelligent device finally simulate to reach the target position. When the moving direction is determined for each time step, such as the j-th time step, by the decoder, the moving direction determined can be more inclined to make the intelligent device finally reach the target position because it is based on the feature sequence reflecting the simulated path. Compared with the traditional method of determining the moving direction for the smart device based only on the current state and environment, the moving direction determined by the present application is more accurate in achieving the goal, that is, ultimately moving the smart device to the target position, and increases the possibility of the smart device reaching the target position under the path instruction.

[0287] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0288] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

[0289] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for determining a moving direction of a smart device, characterized in that: The method comprises: Obtaining a path instruction, wherein the path instruction includes instruction information for going to a target location; Determine the moving direction corresponding to each time step in the process of the smart device moving to the target location; the jth time step includes the time process from the jth stop position to the j+1th stop position in the process of the smart device moving to the target location, and the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position; The moving direction corresponding to the jth time step is determined as follows: Get the decoding result output by the decoding module at the i-th time step; Obtaining a semantic feature vector obtained by encoding the path instruction through an encoding module; Obtaining environmental data obtained by the smart device at the jth stop position; According to the decoding result outputted at the i-th time step, the semantic feature vector and the environmental data acquired by the smart device at the j-th stop position, a feature sequence reflecting a simulation path is obtained through the imagination module; the simulation path includes simulating a path for the smart device to reach the target location from the j-th stop position; i is less than j; Determine the moving direction corresponding to the j-th time step through the decoding module according to the feature sequence; The decoding module includes a first long short-term memory (LSTM) network model and an action estimator, and the step of determining the moving direction corresponding to the j-th time step through the decoding module according to the feature sequence includes: Determine a decoding result corresponding to the feature sequence according to the first long short-term memory (LSTM) network model; obtain a moving direction corresponding to the j-th time step through the action estimator according to the decoding result; and / or, Obtaining the moving direction corresponding to the j-th time step through the action estimator according to the feature sequence; The simulation path includes k time steps for simulating the smart device to reach the target location, the imagination module includes a second long short-term memory LSTM network model and an attention model, and the feature sequence reflecting the simulation path is obtained through the imagination module based on the decoding result output at the i-th time step, the semantic feature vector, and the environmental data obtained by the smart device at the j-th stop position, including: According to the decoding result, the semantic feature vector and the environmental data obtained by the smart device at the jth stop position, the second long short-term memory (LSTM) network model is looped k times to obtain the states corresponding to the k time steps in the simulation path; The feature sequence is determined by the attention model according to the decoding result and the states corresponding to the k time steps in the simulation path.

2. The method according to claim 1, characterized in that In the k cycles, the m-th cycle obtains the state corresponding to the m-th time step in the following manner: If m is equal to 1, the state corresponding to the mth time step is determined according to the decoding result, the viewing angle of the smart device at the i-th stop position, and the viewing angle that the smart device pays attention to at the j-th stop position; the viewing angle that the smart device pays attention to at the j-th stop position is determined according to the environmental data; If m is greater than 1, the state corresponding to the m-1th time step is determined through the mth cycle.

3. The method according to claim 2, characterized in that The viewing angle that the smart device focuses on at the jth stop position is determined based on the decoding result and the feature vectors of the viewing angles corresponding to each viewing angle when the smart device is at the jth stop position.

4. The method according to claim 3, characterized in that The viewing angle feature vector of the nth viewing angle when the smart device is at the jth stop position is determined based on the difference between the heading angle corresponding to the nth viewing angle and the heading angle corresponding to the smart device at the jth stop position, the difference between the elevation angle corresponding to the nth viewing angle and the elevation angle corresponding to the smart device at the jth stop position, and images of each viewing angle collected by the smart device at the jth stop position.

5. The method according to claim 1, characterized in that The environmental data includes perspective feature vectors corresponding to l perspectives of the smart device at the jth stop position; the l perspectives are obtained by dividing the image acquisition space of the smart device into a preset angle range.

6. The method according to any one of claims 1 to 5, characterized in that: The encoding module, imagination module and decoding module are trained using training data, using a training method of supervised learning followed by reinforcement learning. The training data are training path instructions and the moving directions of each time step corresponding to the training path instructions.

7. A device for determining the moving direction of a smart device, characterized in that: The device comprises: An acquisition unit, configured to acquire a path instruction, wherein the path instruction includes instruction information for going to a target location; a determination unit, configured to determine a moving direction corresponding to each time step in the process of the smart device moving toward the target location; the jth time step includes the time process from the jth stop position to the j+1th stop position in the process of the smart device moving toward the target location, and the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position; The moving direction corresponding to the jth time step is determined as follows: Get the decoding result output by the decoding module at the i-th time step; Obtaining a semantic feature vector obtained by encoding the path instruction through an encoding module; Obtaining environmental data obtained by the smart device at the jth stop position; According to the decoding result outputted at the i-th time step, the semantic feature vector and the environmental data acquired by the smart device at the j-th stop position, a feature sequence reflecting a simulation path is obtained through the imagination module; the simulation path includes simulating a path for the smart device to reach the target location from the j-th stop position; i is less than j; Determine the moving direction corresponding to the j-th time step through the decoding module according to the feature sequence; The decoding module includes a first long short-term memory (LSTM) network model and an action estimator, and the step of determining the moving direction corresponding to the j-th time step through the decoding module according to the feature sequence includes: Determine a decoding result corresponding to the feature sequence according to the first long short-term memory (LSTM) network model; obtain a moving direction corresponding to the j-th time step through the action estimator according to the decoding result; and / or, Obtaining the moving direction corresponding to the j-th time step through the action estimator according to the feature sequence; The simulation path includes k time steps for simulating the smart device to reach the target location, the imagination module includes a second long short-term memory LSTM network model and an attention model, and the feature sequence reflecting the simulation path is obtained through the imagination module based on the decoding result output at the i-th time step, the semantic feature vector, and the environmental data obtained by the smart device at the j-th stop position, including: According to the decoding result, the semantic feature vector and the environmental data obtained by the smart device at the jth stop position, the second long short-term memory (LSTM) network model is looped k times to obtain the states corresponding to the k time steps in the simulation path; The feature sequence is determined by the attention model according to the decoding result and the states corresponding to the k time steps in the simulation path.

8. The device according to claim 7, characterized in that In the k cycles, the m-th cycle obtains the state corresponding to the m-th time step in the following manner: If m is equal to 1, the state corresponding to the mth time step is determined according to the decoding result, the viewing angle of the smart device at the i-th stop position, and the viewing angle that the smart device pays attention to at the j-th stop position; the viewing angle that the smart device pays attention to at the j-th stop position is determined according to the environmental data; If m is greater than 1, the state corresponding to the m-1th time step is determined through the mth cycle.

9. A device for determining a moving method of a smart device, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the method for determining the moving direction of the smart device according to any one of claims 1-6 according to the instructions in the program code.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the method for determining the moving direction of a smart device according to any one of claims 1 to 6.

11. A path planning system, characterized in that: The path planning system includes an intelligent device, and the intelligent device includes an image acquisition structure and a mobile structure; The smart device is used to obtain a path instruction, wherein the path instruction includes instruction information for going to a target location; The smart device is also used to determine the moving direction corresponding to each time step in the process of going to the target location; the jth time step includes the time process from the jth stop position to the j+1th stop position in the process of the smart device going to the target location, and the moving direction corresponding to the jth time step is the direction taken by the smart device from the jth stop position to the j+1th stop position; The intelligent device is also used to drive the mobile structure to move in the corresponding moving direction at each time step; The moving direction corresponding to the jth time step is determined as follows: Get the decoding result output by the decoding module at the i-th time step; Obtaining a semantic feature vector obtained by encoding the path instruction through an encoding module; Acquire environmental data acquired by the smart device at the jth stop position according to the image acquisition structure; According to the decoding result outputted at the i-th time step, the semantic feature vector and the environmental data acquired at the j-th stop position, a feature sequence reflecting the simulation path is obtained through the imagination module; the simulation path includes simulating the path of the smart device from the j-th stop position to the target position; i is less than j; Determine the moving direction corresponding to the j-th time step through the decoding module according to the feature sequence; The decoding module includes a first long short-term memory (LSTM) network model and an action estimator, and the step of determining the moving direction corresponding to the j-th time step through the decoding module according to the feature sequence includes: Determine a decoding result corresponding to the feature sequence according to the first long short-term memory (LSTM) network model; obtain a moving direction corresponding to the j-th time step through the action estimator according to the decoding result; and / or, Obtaining the moving direction corresponding to the j-th time step through the action estimator according to the feature sequence; The simulation path includes k time steps for simulating the smart device to reach the target location, the imagination module includes a second long short-term memory LSTM network model and an attention model, and the feature sequence reflecting the simulation path is obtained through the imagination module based on the decoding result output at the i-th time step, the semantic feature vector, and the environmental data obtained by the smart device at the j-th stop position, including: According to the decoding result, the semantic feature vector and the environmental data obtained by the smart device at the jth stop position, the second long short-term memory (LSTM) network model is looped k times to obtain the states corresponding to the k time steps in the simulation path; The feature sequence is determined by the attention model according to the decoding result and the states corresponding to the k time steps in the simulation path.