Method and system for agricultural machine track recognition
By combining agricultural machinery GPS devices with neural network models, farmland and road areas are identified and marked, solving the problems of low efficiency and poor accuracy in obtaining farmland distribution information, and achieving efficient and accurate farmland distribution marking.
Patent Information
- Application Number
- CN202311127961.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-09-01
AI Technical Summary
In existing technologies, obtaining farmland distribution information relies on on-site surveys, which is inefficient and inaccurate, and cannot efficiently and accurately mark farmland distribution on maps.
By collecting trajectory point information through GPS devices mounted on agricultural machinery, and combining it with satellite maps and using neural network models, farmland and road areas can be identified and marked, achieving efficient and accurate marking without the need for manual on-site surveys.
It can efficiently and accurately identify and mark farmland and road areas without the need for manual on-site surveys, providing farmland distribution information and supporting subsequent agricultural planning.
Smart Images

Figure CN118447407B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of agricultural application technology, and more specifically, to methods and systems for agricultural machinery trajectory recognition. Background Technology
[0002] In agricultural work, obtaining information on the distribution of farmland is crucial. Typically, farmers obtain this information through on-site surveys and then mark it on a designated map for display. This method is inefficient and has poor accuracy.
[0003] Therefore, how to efficiently and accurately determine the distribution information of farmland marked on a map without the need for manual on-site surveys is an urgent technical problem to be solved. Summary of the Invention
[0004] This application provides a method and system for agricultural machinery trajectory recognition, which acquires and identifies the movement trajectory of agricultural machinery, matches the movement trajectory of agricultural machinery with satellite maps, analyzes the farmland and road portions corresponding to the movement trajectory, and marks them on the satellite map, so as to achieve efficient and accurate distribution information of marked farmland on the map without human intervention.
[0005] Firstly, a method for identifying agricultural machinery trajectories is provided. The method includes: determining a first trajectory map based on first trajectory point information sent by a GPS device mounted on the agricultural machinery. The first trajectory map includes a first movement trajectory composed of multiple trajectory points, representing the movement trajectory of the agricultural machinery within a first region. The first trajectory point information includes the latitude and longitude coordinates of the agricultural machinery's location, the instantaneous speed of the agricultural machinery, the mileage traveled by the agricultural machinery, and the time of the point marking for each trajectory point. The first trajectory map represents the relationship between the first movement trajectory and first state information, which includes at least one of the following: speed information, time information, and mileage information; determining a first satellite map, representing the first region, wherein the first satellite map and the first trajectory map have the same size parameters and are located on the same geodetic coordinate axis; inputting the first trajectory map and the first satellite map into a first neural network model, and outputting a first labeled map, which includes the identification results for the first movement trajectory. The first neural network model includes an encoder, which includes n stages. The first neural network model is configured as follows: The first trajectory map and the first satellite map are overlaid to determine the first input image, and the initial coordinate information of each trajectory point in the first trajectory map in the first input image is determined. In the first stage of the encoder, feature extraction is performed on the first input image at the first downsampling scale to determine the first feature map, and the first grid is determined based on the first feature map. The coordinate information of each trajectory point in the first grid is determined according to the initial coordinate information of each trajectory point and the first downsampling scale. Then, using bilinear interpolation, based on the coordinate information of each trajectory point in the first grid and the coordinate information of the four adjacent sub-grids around each trajectory point in the first grid, the coordinates of each trajectory point are interpolated. Each trajectory point is associated with the first local feature corresponding to a sub-cell in the first grid, thus determining the sequence of first trajectory points. The first local feature is the image feature in the first feature map. In the m-th stage of the encoder, feature extraction is performed on the first input image at the m-th downsampling scale to determine the m-th feature map, and the m-th grid is determined based on the m-th feature map. Furthermore, based on the coordinate information of each trajectory point in the (m-1)-th grid and the m-th downsampling scale, the coordinate information of each trajectory point in the m-th grid is determined. Then, using bilinear interpolation, based on the coordinate information of each trajectory point in the m-th grid and the coordinate information of the four adjacent sub-cells around each trajectory point in the m-th grid, the coordinates of each trajectory point are interpolated. Each trajectory point is associated with the m-th local feature corresponding to a sub-cell in the m-th grid, thus determining the m-th trajectory point sequence. The m-th local feature is the image feature in the m-th feature map, where m ∈ [2, n] and is an integer. When m equals n, a fully connected method is used to fuse features from the 1st to the nth feature maps to determine the first global feature sequence, and the trajectory point sequence from the 1st to the nth trajectory point sequence is also fused to determine the first local feature sequence. Based on the multi-head self-attention (MSA) mechanism, a self-attention operation is performed on the first global feature sequence to determine the second global feature sequence, and a self-attention operation is performed on the first local feature sequence to determine the second local feature sequence. The first global feature sequence is first processed, and then a cross-self-attention operation is performed on the second global feature sequence and the second local feature sequence to determine the target feature sequence. The target feature sequence includes each trajectory point and its corresponding fused image features and classification information for candidates. The classification information for candidates includes at least farmland and roads. The classification information for each trajectory point is determined from the classification information for candidates using a normalized exponential function. Based on each trajectory point and its corresponding fused image features and the classification information for each trajectory point, the first movement trajectory and the classification information for each trajectory point are mapped to the first satellite map, and the first labeled map is output.
[0006] For example, the first trajectory diagram described above can be an STD-based image. Furthermore, the first trajectory diagram is drawn based on the timing of each trajectory point, specifically a grayscale image. Each trajectory point constituting the first movement trajectory corresponds to a different grayscale value, which can be associated with the aforementioned first state information.
[0007] For example, since the size parameters of the first satellite map and the first trajectory map need to be the same, and they are both used to represent the same area and need to be in the same geodetic coordinate system, the map level and size parameters of the two maps need to be determined in advance.
[0008] For example, in the first neural network model described above, features can be extracted from an image using a convolutional neural network with n stages, also known as n stages. Specifically, there can be four stages. In each stage, the input image needs to go through multiple processing blocks, and in each block, it undergoes CNN convolution operations, batch normalization, and activation by the rectified linear unit (ReLU) function.
[0009] For example, the MSA mechanism described above can be implemented using a transformer model.
[0010] Based on the above technical solution, without the need for manual on-site surveying, the movement trajectory of agricultural machinery can be efficiently and accurately identified using GPS-collected trajectory points and corresponding satellite maps, and marked on the satellite map through a neural network model. Furthermore, the movement trajectory can indicate whether each part belongs to a specific area, such as farmland or roads. Therefore, based on the movement trajectory belonging to farmland, the distribution information of farmland can be intuitively determined.
[0011] In conjunction with the first aspect, in some implementations of the first aspect, before inputting the first trajectory map and the first satellite map into the first neural network model, the first length and the first width in the size parameters of the first trajectory map and the first satellite map are respectively extended to a second length and a second width.
[0012] For example, the first length and the first width mentioned above can be specifically represented based on the number of pixels, specifically 1024×1024; similarly, the second length and the second width mentioned above can be specifically represented as 1280×1280.
[0013] Based on the above technical solution, it can be ensured that the model can obtain sufficiently rich image edge information.
[0014] In conjunction with the first aspect, in some implementations of the first aspect, before overlaying the first trajectory map and the first satellite map, a downsampling operation is performed on the first trajectory map or the first satellite map to reduce the second length and the second width in the size parameters of the first trajectory map or the first satellite map to a third length and a third width, and correspondingly expand the number of image channels in the size parameters of the first trajectory map or the first satellite map.
[0015] For example, two convolutional kernels with a stride of 2 can be used to downsample the first trajectory map and the first satellite map to change the image size parameters.
[0016] Based on the above technical solution, the size of the input image can be reduced while the number of image features is increased, which helps the subsequent neural network model to extract features from the input image more accurately.
[0017] In conjunction with the first aspect, in some implementations of the first aspect, the trajectory points in the first movement trajectory whose classification information is farmland are connected by lines of a first color, and the trajectory points in the first movement trajectory whose classification information is road are connected by lines of a second color.
[0018] Based on the above technical solution, the classification of movement trajectories can be intuitively distinguished on satellite maps, facilitating the direct acquisition of farmland distribution information. This will help to more easily conduct statistical analysis of farmland distribution information and determine corresponding agricultural planning.
[0019] In conjunction with the first aspect, in some implementations of the first aspect, Q sets of datasets including the first trajectory map and the first satellite map are sequentially input into the first neural network model, and the first neural network model outputs Q first marked maps, where Q is an integer greater than 1; the Q first marked maps are spliced together to determine the second marked map.
[0020] Based on the above technical solution, while ensuring the processing efficiency of the neural network model, multiple first-marker maps are stitched together to obtain a second-marker map that can completely present large-scale farmland, further increasing the intuitiveness of presenting farmland distribution information.
[0021] Secondly, a system for agricultural machinery trajectory recognition is provided. This system includes a GPS server, a satellite map server, and an image processing server. The GPS server is used to determine a first trajectory map based on first trajectory point information sent by the GPS device mounted on the agricultural machinery. The first trajectory map includes a first movement trajectory formed by connecting multiple trajectory points. This first movement trajectory represents the movement trajectory of the agricultural machinery within a first area. The first trajectory point information includes the latitude and longitude coordinates of the agricultural machinery's location, the instantaneous speed of the agricultural machinery, the mileage traveled by the agricultural machinery, and the time of the point measurement for each trajectory point. The first trajectory map represents the relationship between the first movement trajectory and first state information, which includes at least one of the following: speed information, time information, and mileage information. The satellite map server is used to determine a first satellite map, which is used to represent a first region. The first satellite map and the first trajectory map have the same size parameters and are on the same geodetic coordinate axis. An image processing server is used to input a first trajectory map and a first satellite map into a first neural network model and output a first labeled map, the first labeled map including recognition results for the aforementioned first movement trajectory. The first neural network model includes an encoder comprising n stages, and the first neural network model is configured as follows: The first trajectory map and the first satellite map are overlaid to determine the first input image, and the initial coordinate information of each trajectory point in the first trajectory map in the first input image is determined. In the first stage of the encoder, feature extraction is performed on the first input image at the first downsampling scale to determine the first feature map, and the first grid is determined based on the first feature map. The coordinate information of each trajectory point in the first grid is determined according to the initial coordinate information of each trajectory point and the first downsampling scale. Then, using bilinear interpolation, based on the coordinate information of each trajectory point in the first grid and the coordinate information of the four adjacent sub-grids around each trajectory point in the first grid, the coordinates of each trajectory point are interpolated. Each trajectory point is associated with the first local feature corresponding to a sub-cell in the first grid, thus determining the sequence of first trajectory points. The first local feature is the image feature in the first feature map. In the m-th stage of the encoder, feature extraction is performed on the first input image at the m-th downsampling scale to determine the m-th feature map, and the m-th grid is determined based on the m-th feature map. Furthermore, based on the coordinate information of each trajectory point in the (m-1)-th grid and the m-th downsampling scale, the coordinate information of each trajectory point in the m-th grid is determined. Then, using bilinear interpolation, based on the coordinate information of each trajectory point in the m-th grid and the coordinate information of the four adjacent sub-cells around each trajectory point in the m-th grid, the coordinates of each trajectory point are interpolated. Each trajectory point is associated with the m-th local feature corresponding to a sub-cell in the m-th grid, thus determining the m-th trajectory point sequence. The m-th local feature is the image feature in the m-th feature map, where m ∈ [2, n] and is an integer. When m equals n, a fully connected method is used to fuse features from the 1st to the nth feature maps to determine the first global feature sequence, and the trajectory point sequence from the 1st to the nth trajectory point sequence is also fused to determine the first local feature sequence. Based on the multi-head self-attention (MSA) mechanism, a self-attention operation is performed on the first global feature sequence to determine the second global feature sequence, and a self-attention operation is performed on the first local feature sequence to determine the second local feature sequence. The first global feature sequence is first processed, and then a cross-self-attention operation is performed on the second global feature sequence and the second local feature sequence to determine the target feature sequence. The target feature sequence includes each trajectory point and its corresponding fused image features and classification information for candidates. The classification information for candidates includes at least farmland and roads. The classification information for each trajectory point is determined from the classification information for candidates using a normalized exponential function. Based on each trajectory point and its corresponding fused image features and the classification information for each trajectory point, the first movement trajectory and the classification information for each trajectory point are mapped to the first satellite map, and the first labeled map is output.
[0022] In conjunction with the second aspect, in some implementations of the second aspect, before the image processing server inputs the first trajectory map and the first satellite map into the first neural network model, the image processing server is further configured to: extend the first length and the first width in the size parameters of the first trajectory map and the first satellite map to a second length and a second width, respectively.
[0023] In conjunction with the second aspect, in some implementations of the second aspect, before the image processing server overlays the first trajectory map and the first satellite map, the image processing server is further configured to: perform a downsampling operation on the first trajectory map and the first satellite map, reduce the second length and the second width in the size parameters of the first trajectory map and the first satellite map to a third length and a third width, and correspondingly expand the number of image channels in the size parameters of the first trajectory map and the first satellite map.
[0024] In conjunction with the second aspect, in some implementations of the second aspect, the aforementioned image processing server is further configured to: sequentially input Q sets of datasets including a first trajectory map, a first satellite map, and a first point sequence into a first neural network model, and the first neural network model outputs Q first marked maps, where Q is an integer greater than 1; and stitch the Q first marked maps together to determine a second marked map.
[0025] Thirdly, an agricultural machinery trajectory recognition device is provided, comprising a processor and a memory, wherein the processor and the memory are connected, wherein the memory is used to store program code, and the processor is used to call the program code to execute any possible implementation of the method in the first aspect of the above-mentioned method design.
[0026] Fourthly, a chip system is provided, which is applied to an electronic device; the chip system includes one or more interface circuits and one or more processors; the interface circuits and processors are interconnected by lines; the interface circuits are used to receive echo signals from the memory of the electronic device and send signals to the processor, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes any possible implementation of the method design of the first aspect above.
[0027] Fifthly, a computer-readable storage medium is provided storing computer instructions that are executed by a processor to implement the method in any possible implementation of the method design of the first aspect.
[0028] In a sixth aspect, a computer program product is provided, wherein when the computer program code or instructions are executed on a computer, the computer performs the method in any possible implementation of the method design of the first aspect described above. Attached Figure Description
[0029] Figure 1 This is a schematic block diagram of a system 100 for agricultural machinery trajectory recognition proposed in an embodiment of this application; Figure 2 This is a schematic block diagram of a method 200 for agricultural machinery trajectory recognition proposed in an embodiment of this application; Figure 3 This is a schematic diagram of a trajectory diagram proposed in an embodiment of this application; Figure 4 This is a schematic block diagram of a neural network model architecture 400 proposed in an embodiment of this application; Figure 5 This is a schematic block diagram of another agricultural machinery trajectory recognition system 500 provided in the embodiments of this application. Detailed Implementation
[0030] In the description of the embodiments in this application, unless otherwise stated, " / " means "or", for example, A / B can mean A or B; "and / or" in this document describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In this application, "at least one" means one or more, and "more" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0031] The use of prefixes such as "first" and "second" in this application embodiment is solely for distinguishing different descriptive objects and does not limit the position, order, priority, quantity, or content of the described objects. The use of ordinal numbers and other prefixes to distinguish descriptive objects in this application embodiment does not constitute a limitation on the described objects. The description of the described objects is found in the claims or the context of the embodiments, and the use of such prefixes should not constitute unnecessary restrictions.
[0032] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0033] Obtaining information on farmland distribution is a crucial part of agricultural work, as this information influences subsequent agricultural strategies. Typically, agricultural workers obtain this information through on-site surveys and then mark it on a designated map for display. However, this method is inefficient and lacks accuracy.
[0034] With the advancement of agricultural automation, informatization, and intelligentization technologies, farming methods that require manual intervention will gradually be replaced. Furthermore, marking farmland distribution information on maps without the need for manual on-site surveys is also a crucial aspect of agricultural technology development.
[0035] In view of this, embodiments of this application propose a method, apparatus and system for agricultural machinery trajectory recognition. By combining information collected from satellite maps and Global Positioning System (GPS) devices through a transformer model configured with special functions and CNN, feature extraction and data fusion operations are performed to accurately and efficiently identify farmland areas and road areas in satellite maps and mark the farmland areas and road areas on the satellite maps.
[0036] Figure 1 This is a schematic block diagram of a system 100 for agricultural machinery trajectory recognition proposed in an embodiment of this application.
[0037] The system 100 includes: agricultural machinery 110, GPS device 120, GPS server 130, satellite map server 140, image processing server 150, and control center 160. These devices can establish connections through a wireless network to enable data exchange between them.
[0038] Among them, agricultural machinery 110 refers to machinery used in agricultural production, such as seeders, drones used for fertilizer application, or combine harvesters. These agricultural machines all have one characteristic: the speed and trajectory of the agricultural machinery in the working area are different from the speed and trajectory of the agricultural machinery in the non-working area.
[0039] GPS device 120, mounted on agricultural machinery 110, is used to collect GPS data about agricultural machinery 110 during its movement. This GPS data can be a sequence of points, each point being a trajectory point of agricultural machinery 110, and each point corresponding to the following information: the latitude and longitude coordinates of the agricultural machinery's location, the instantaneous speed of the agricultural machinery, the distance traveled by the agricultural machinery, and the time of the point recording. Then, the above GPS data is uploaded to GPS server 130.
[0040] In some possible embodiments, the GPS device 120 reporting mechanism is as follows: Each time data is collected from a point, it is reported to the aforementioned GPS server 130; or, Based on a timer mechanism, after a preset time interval, corresponding GPS data is reported to the aforementioned GPS server 130; or, Based on the movement status of the agricultural machinery 110, whenever the agricultural machinery 110 stops moving, that is, when multiple trajectory points are found to have the same latitude and longitude coordinates and travel distance, or when the instantaneous speed corresponding to multiple trajectory points is 0, the corresponding GPS data is reported to the aforementioned GPS server 130; or, Based on a mileage-based mechanism, corresponding GPS data is reported to the aforementioned GPS server 130 every time a preset mileage is reached; or, Based on the data stack mechanism, after each point data is collected, the point data is stored in a data stack with a preset length. Whenever the data stack is full, the corresponding GPS data is reported to the GPS server 130.
[0041] GPS server 130, which may be a server located at a remote point in the agricultural area, is used to generate a corresponding trajectory map based on GPS data. This trajectory map includes the movement trajectory of the agricultural machinery 110. The trajectory map is then sent to satellite map server 140 and image processing server 150.
[0042] The satellite map server 140, or a server located at a remote end of the agricultural area, is used to collect satellite maps that are compatible with the above-mentioned trajectory map. The satellite map has the same size parameters as the above-mentioned trajectory map and corresponds to the same map area. The satellite map is then sent to the image processing server 150.
[0043] In some possible embodiments, the size parameters of the aforementioned trajectory map and satellite map can be uniformly set to the same parameters via a server. Furthermore, the satellite map corresponding to the trajectory map can be determined in the following manner: Based on the above size parameters, the satellite map is divided into multiple tiles, with different tiles corresponding to different areas; and each trajectory point in the above trajectory map can carry its corresponding latitude and longitude coordinates, so the corresponding satellite map can be located based on the latitude and longitude coordinates of each trajectory point.
[0044] Image processing server 150, which can also be a server located far from the agricultural area, receives the trajectory map sent by GPS server 130 and the satellite map sent by satellite map server 140. It then performs corresponding digital image processing operations using a transformer model and a CNN model to extract image features corresponding to each trajectory point and classify the corresponding region, thereby obtaining a satellite map marked with farmland and road areas. The marked satellite map is then sent to control center 160.
[0045] In some possible embodiments, the GPS server 130, satellite map server 140 and image processing server 150 described above can be independent, separately deployed servers, or they can be deployed together, or even a large server that integrates functions together.
[0046] The control center 160 is used to perform statistical analysis of agricultural data based on the aforementioned marked satellite map, and to make corresponding agricultural plans based on the statistical analysis results, such as counting the agricultural operation area of agricultural machinery; or determining the spatial distribution of crops; or planning the agricultural operation routes of agricultural machinery 110, etc.
[0047] Based on the above system 100, this application proposes a method for agricultural machinery trajectory recognition.
[0048] Figure 2 This is a schematic block diagram of a method 200 for agricultural machinery trajectory recognition proposed in an embodiment of this application.
[0049] S210: Determine the first trajectory map based on the first trajectory point information sent by the GPS device on the agricultural machinery.
[0050] The first trajectory map includes a first movement trajectory formed by connecting multiple trajectory points. The first movement trajectory is used to represent the movement trajectory of the agricultural machinery in a first area. The information of the first trajectory points includes the latitude and longitude coordinates of the location of the agricultural machinery, the instantaneous speed of the agricultural machinery, the mileage of the agricultural machinery, and the time of the point marking for each trajectory point. The first trajectory map is used to represent the relationship between the first movement trajectory and the first state information. The first state information includes at least one of the following: speed information, time information, and mileage information.
[0051] In some possible embodiments, the first trajectory map described above can be an image based on the standard deviation (STD) of the image. This first trajectory map is drawn according to the timing of each trajectory point, specifically a grayscale image, where each trajectory point constituting the first movement trajectory corresponds to a different grayscale value, which can be associated with the aforementioned first state information.
[0052] Figure 3 This is a schematic diagram of a trajectory diagram proposed in an embodiment of this application.
[0053] Figure 3 (a) in the figure is a velocity map. In this map, the gray value of the trajectory point is related to the velocity information. The smaller the gray value, the faster the velocity. Figure 3 (b) in the figure is the cumulative time graph. In this graph, the gray value of the trajectory point is related to the time information. The smaller the gray value, the longer the cumulative time. Figure 3(c) in the figure is the mileage map. In this map, the gray value of the trajectory point is related to the mileage information. The smaller the gray value, the longer the mileage.
[0054] S220: Determine a first satellite map, which is used to represent the first region, and the first satellite map and the first trajectory map have the same size parameters and are in the same geodetic coordinate system.
[0055] As can be seen from S220, the size parameters of the first satellite map and the first trajectory map need to be the same, and they are both used to represent the same area. They also need to be in the same geodetic coordinate system. Therefore, the map level and size parameters of the two maps need to be determined in advance in order to accurately establish the correspondence between them.
[0056] In some possible implementations, an appropriate map level needs to be selected for each first trajectory map. If the level is too low, the trajectory may be too fine, resulting in the loss of many details. If the level is too high, the image will be trapped in local details, failing to capture more global information. Therefore, before implementing this scheme, the level of the first trajectory map can be determined through preliminary experiments; the level of the first trajectory map can be 18.
[0057] In some possible embodiments, since the first movement trajectory may be quite long, while the size of the first trajectory image is limited, the first movement trajectory often requires multiple first trajectory images, sometimes even thousands. If excessively large images are directly input into the neural network model, the model will run very slowly and will contain a lot of invalid information, such as a pure black background without a trajectory, which will waste computational resources. Therefore, before implementing this solution, the size parameters of the first trajectory image can be determined through pre-experimentation. These size parameters can be a first length and a first width, which can be represented based on the number of pixels, for example, 1024×1024. In addition, for each first trajectory image, pixel information can be added to its edges, expanding the first length and first width in the size parameters of the first trajectory image to a second length and a second width, for example, 1280×1280, before inputting it into the model for calculation, thereby ensuring that the model can obtain sufficiently rich image edge information.
[0058] Similar to the first trajectory map, before implementing this scheme, the size parameters of the first satellite map can be determined through preliminary experiments. These size parameters are also the first length and the first width. Then, the first length and the first width in the size parameters of the first satellite map are extended to a second length and a second width, respectively. The specific operation is as follows: Taking the first trajectory map with a size parameter of 1280×1280 as an example, firstly, a tile server is built on a satellite map of the same level as the first trajectory map; then, the corresponding tile is locked according to the latitude and longitude coordinates of each trajectory point of the first movement trajectory; then, 4×4 256×256 tiles are combined into a large tile of 1024×1024; finally, pixel information is added to the edge of the satellite map corresponding to the large tile, and its size parameter is also expanded to 1280×1280, so as to ensure that the model can obtain sufficiently rich image edge information.
[0059] S230: Input the first trajectory map, the first satellite map, and the initial point sequence into the first neural network model, and output the first marked map.
[0060] The first marked map includes the recognition results for the aforementioned first movement trajectory, and the first neural network model includes an encoder, which may be a CNN model. The encoder includes n stages, and the first neural network model is configured as follows: S231: Overlay the first trajectory map and the first satellite map to determine the first input image, and determine the initial coordinate information of each trajectory point in the first trajectory map in the first input image.
[0061] It should be understood that since both are in the same geodetic coordinate system, the orientation of the first trajectory map and the first satellite map can be kept consistent.
[0062] S232: The first input image is transmitted to an encoder with n stages. Feature extraction is performed sequentially in each stage of the encoder. Each trajectory point in each stage is associated with the extracted local features of the image to determine the first local feature sequence. The specific operation of S232 is as follows: In the first stage of the encoder, feature extraction is performed on the first input image at the first downsampling scale to determine the first feature map, and the first grid is determined based on the first feature map. According to the initial coordinate information corresponding to each trajectory point and the first downsampling scale, the coordinate information of each trajectory point in the first grid is determined. By using bilinear interpolation, each trajectory point is associated with the first local feature corresponding to the sub-grid in the first grid based on the coordinate information of each trajectory point in the first grid and the coordinate information of the four adjacent sub-grids around each trajectory point in the first grid, and the first trajectory point sequence is determined. The first local feature is the image feature in the first feature map. In the m-th stage of the encoder, features are extracted from the first input image at the m-th downsampling scale to determine the m-th feature map, and the m-th grid is determined based on the m-th feature map. The coordinates of each trajectory point in the m-1 grid and the m-th downsampling scale are used to determine the coordinates of each trajectory point in the m-th grid. Using bilinear interpolation, each trajectory point is associated with the m-th local feature corresponding to the sub-grid in the m-th grid, based on the coordinates of each trajectory point in the m-th grid and the coordinates of the four adjacent sub-grids around each trajectory point in the m-th grid, thus determining the m-th trajectory point sequence. The m-th local feature is the image feature in the m-th feature map, where m ∈ [2, n] and is an integer. When m equals n, the first to n-th feature maps are fused using a fully connected method to determine the first global feature sequence, and the first to n-th trajectory point sequences are fused to determine the first local feature sequence. It should be understood that S242 above is a traversal process, in which the first input image undergoes n stages of feature extraction operations in sequence.
[0063] In some possible implementations, feature extraction from images can be performed using a convolutional neural network with n stages, also known as n stages. Specifically, there can be four stages. In each stage, the input image needs to go through multiple processing blocks, and within each block, it undergoes CNN convolution operations, batch normalization, and activation by the rectified linear unit (ReLU) function. The specific downsampling operation in each stage is as follows: Taking the first input image as an example, which is a 24-channel image.
[0064] In stage 1, two blocks were used to downsample the input image by 1 / 4 scale. The input image had 24 channels and the output image had 32 channels, thus determining the first processing result image. In stage 2, two blocks were used to downsample the first processed image by a scale of 1 / 8, with 32 input image channels and 64 output image channels, to determine the second processed image. In stage 3, 6 blocks were used to downsample the second processed image by a scale of 1 / 16. The input image had 64 channels and the output image had 128 channels to determine the third processed image. In stage 4, two blocks are used to downsample the third processing result image by a scale of 1 / 32. The input image has 128 channels and the output image has 256 channels to determine the fourth processing result image, which is the first feature image mentioned above.
[0065] When the number of image channels for the first trajectory map and the first satellite map is other than the number mentioned above, the number of blocks, input image channels and output image channels corresponding to each stage can be adaptively adjusted.
[0066] It should be understood that as the processing depth increases, the size of the output image decreases, but the number of image channels increases. Higher-level stages have smaller receptive fields, used to extract detailed features; lower-level stages have larger receptive fields, used to extract features within a wider region.
[0067] S233: Based on the multi-headed self-attention (MSA) mechanism, self-attention operation is performed on the first global feature sequence to determine the second global feature sequence, and self-attention operation is performed on the first local feature sequence to determine the second local feature sequence. Then, cross-self-attention operation is performed on the second global feature sequence and the second local feature sequence to determine the target feature sequence.
[0068] The target feature sequence includes each trajectory point and its corresponding fused image features and classification information for candidates, which includes at least farmland and roads.
[0069] In some possible embodiments, when the agricultural machinery is a land-based machine, the aforementioned classification information for candidates can be farmland and roads. When the agricultural machinery is an agricultural drone spreading fertilizer in the air, the aforementioned classification information for candidates can be farmland and air routes. Furthermore, since trajectory points also correspond to elevation information, the above process can also take into account the elevation information of the trajectory points, so the aforementioned classification information for candidates can also include mountainous terrain.
[0070] In some possible implementations, the MSA mechanism described above can be implemented using a transformer model.
[0071] S234: Using the normalized exponential function (softmax), determine the classification information of each trajectory point from the above-mentioned candidate classification information, and map the first moving trajectory and the classification information of each trajectory point to the first satellite map according to each trajectory point, its corresponding fused image features and the classification information of each trajectory point, and output the first labeled map.
[0072] It should be understood that the classification information used for candidates should include at least three categories: background, road, and farmland. Since each trajectory point is strongly correlated with the first movement trajectory and lies on the same plane, the background category lacks discriminative power and can be ignored. Therefore, the classification information used for candidates only needs to include at least the road and farmland categories.
[0073] It should be understood that the size parameters of the first marked map correspond to the first satellite map and the first trajectory map.
[0074] It should be understood that the classification information used as candidates should include at least three categories: background, road, and farmland. Since each trajectory point is strongly correlated with the first movement trajectory and lies on the same plane, the background category lacks discriminatory power and can be ignored. Therefore, the classification information used as candidates only needs to include at least the road and farmland categories. Based on this, the identification result for the first movement trajectory includes the corresponding location of each trajectory point on the first satellite map and the classification information of each trajectory point, thus determining whether the area covered by the first movement trajectory is farmland or road.
[0075] Based on the above technical solution, without the need for manual on-site surveying, the movement trajectory of agricultural machinery can be efficiently and accurately identified using GPS-collected trajectory points and corresponding satellite maps, and marked on the satellite map through a neural network model. Furthermore, the movement trajectory can indicate whether each part belongs to a specific area, such as farmland or roads. Therefore, based on the movement trajectory belonging to farmland, the distribution information of farmland can be intuitively determined.
[0076] In some possible embodiments, based on the above S241 to S244 and the corresponding embodiments, this application also proposes a neural network model architecture 400.
[0077] Figure 4 This is a schematic block diagram of a neural network model architecture 400 proposed in an embodiment of this application.
[0078] refer to Figure 4 As can be seen from the vertical perspective, the neural network model architecture 400 may include: an input layer 410, a feature extraction layer 420 with four stages, a feature search layer 430, a feature fusion layer 440, and an output layer 450.
[0079] The input layer 410 is used to perform the above-described S241 to input the determined input image into the feature extraction layer 420.
[0080] The feature extraction layer 420 is used to perform feature extraction of the input image at a specific downsampling scale in S242 above.
[0081] The feature search layer 430 is used to establish a correspondence between the trajectory points in the image and their positions in the image at each stage. Specifically, it transforms the image at each stage into a grid to determine the sub-grid to which the trajectory points in the image belong, thereby determining the coordinate information of the trajectory point grid.
[0082] It should be understood that when the coordinates of a point on the original image are (a, b), then its downsampled coordinates at the 1 / 4 scale are (a / 4, b / 4), and its downsampled coordinates at the 1 / 8 scale are (a / 8, b / 8), and so on. Therefore, it is possible to determine the grid coordinates and trajectory point coordinates at each stage.
[0083] The feature fusion layer 440 is used to perform the above-mentioned S243 to determine the target feature sequence after data fusion.
[0084] The output layer 450 is used to perform the above S244 to determine the classification information corresponding to each trajectory point, and to mark the first movement trajectory with the classification information of each trajectory point on the first satellite map, and output the first marked map.
[0085] For details on the specific operations of each layer, please refer to the corresponding embodiments described above, which will not be repeated here.
[0086] In some possible embodiments, the first neural network model further includes a preprocessing layer located between the input layer 410 and the feature extraction layer 420. In this preprocessing layer, downsampling operations are performed on the first trajectory image and the first satellite image, reducing the second length and second width in the size parameters of the first trajectory image and the first satellite image to a third length and a third width, and correspondingly expanding the number of image channels in the size parameters of the first trajectory image and the first satellite image. Taking the first trajectory image and the first satellite image as 3-channel images as an example, convolutional kernels can be used in the preprocessing layer to perform downsampling operations on the first trajectory image and the first satellite image respectively, reducing the length and width of these two images and expanding the number of channels of these two images to 24.
[0087] Based on the above technical solution, the size of the input image can be reduced while the number of image features is increased, which helps the subsequent neural network model to extract features from the input image more accurately.
[0088] In some possible embodiments, the first marked map includes a first satellite map and a first movement trajectory, wherein the first movement trajectory is marked at corresponding locations on the first satellite map, and trajectory points classified as farmland in the first movement trajectory are connected by lines of a first color, while trajectory points classified as roads in the first movement trajectory are connected by lines of a second color. For example, the portion of the first movement trajectory belonging to farmland is presented with green lines, and the portion belonging to roads is presented with red lines.
[0089] Based on the above technical solution, the classification of movement trajectories can be intuitively distinguished on satellite maps, facilitating the direct acquisition of farmland distribution information. This will help to more easily conduct statistical analysis of farmland distribution information and determine corresponding agricultural planning.
[0090] In some possible embodiments, since farmland is typically large, the corresponding agricultural machinery movement trajectories span a wide area. Based on the above embodiments, it is known that the size parameter of the input image is limited to ensure the processing efficiency of the neural network model. A complete large-scale farmland can only be fully represented by a single trajectory map and satellite map of limited size. Therefore, for a single farmland, multiple trajectory maps and multiple satellite maps can be used to represent it. Correspondingly, the aforementioned first trajectory map, first satellite map, and first point sequence can be considered a dataset. Given the above, Q datasets need to be input sequentially into the first neural network model. The first neural network model will then output Q first marked maps, where Q is an integer greater than 1. These Q first marked maps are then stitched together to determine the second marked map. This second marked map can encompass a complete large-scale farmland.
[0091] Based on the above technical solution, while ensuring the processing efficiency of the neural network model, multiple first-marker maps are stitched together to obtain a second-marker map that can completely present large-scale farmland, further increasing the intuitiveness of presenting farmland distribution information.
[0092] In some possible embodiments, after receiving the aforementioned dataset, the first neural network model can also first determine the reasonableness of the dataset: firstly, obtain the first satellite location data... Figure 4The coordinates of the four points corresponding to the angles are used to determine the coordinate regions corresponding to these four points. These coordinates can be represented by latitude and longitude coordinates. Then, it is determined whether the coordinates of each trajectory point in the first point sequence corresponding to the first trajectory map are located within the above coordinate regions. If all are located within the above coordinate regions, the dataset is considered reasonable and can proceed with subsequent data processing. If there are trajectory points not located within the above coordinate regions, the dataset is considered abnormal. In this case, feedback information can be sent to the upstream device, instructing it to resend the dataset. Alternatively, if the number of trajectory points not located within the above coordinate regions is less than the tolerable number (e.g., 1, 5, etc.), these trajectory points are deleted from the first point sequence, and data processing is performed based on the dataset after trajectory point deletion. If the number of trajectory points not located within the above coordinate regions is greater than or equal to the tolerable number, feedback information is sent to the upstream device, instructing it to resend the dataset.
[0093] Based on the above technical solution, the first neural network model can avoid the relatively large computational overhead of subsequent data processing steps for unreasonable datasets, thereby avoiding unnecessary large computational overhead.
[0094] In some possible embodiments, after obtaining the first or second marker map, agricultural work is performed based on the first or second marker map and a pre-trained model. This model can be a neural network model, and the agricultural work includes at least one of the following: Based on the first model, the area of agricultural machinery operation is statistically analyzed; or, Based on the second model, determine the spatial distribution of crops in the first region; or... Based on the third model, the farming operation routes of agricultural machinery are planned.
[0095] Based on the above technical solutions, it is possible to further reduce manual involvement in the aforementioned agricultural work and achieve fully automated closed-loop management of farmland distribution information collection, analysis, and planning.
[0096] In some possible embodiments, the performance of the first neural network model can be evaluated based on the focal loss function, and the parameters of the first neural network model can be adjusted based on the output of the focal loss. The focal loss includes a first weight and a second weight. The first weight corresponds to roads in the classification information, and the second weight corresponds to farmland in the classification information. After multiple experiments, it was determined that the first neural network model is more likely to converge when the first weight is set to 2.5 to 3.0.
[0097] Furthermore, embodiments of this application also provide a system for implementing any of the above methods. Figure 5This is a schematic block diagram of another agricultural machinery trajectory recognition system 500 provided in the embodiments of this application.
[0098] The system 500 can be a subsystem of the aforementioned system 100. The system 500 includes: a GPS server 510, a satellite map server 520, and an image processing server 530.
[0099] The GPS server 510 is used to determine a first trajectory map based on the first trajectory point information sent by the GPS device on the agricultural machinery. The first trajectory map includes a first movement trajectory composed of multiple trajectory points. The first movement trajectory is used to represent the movement trajectory of the agricultural machinery in a first area. The first trajectory point information includes the latitude and longitude coordinates of the location of the agricultural machinery, the instantaneous speed of the agricultural machinery, the mileage of the agricultural machinery, and the time of the point marking for each trajectory point. The first trajectory map is used to represent the relationship between the first movement trajectory and the first state information. The first state information includes at least one of the following: speed information, time information, and mileage information. The satellite map server 520 is used to determine a first satellite map, which is used to represent a first region. The first satellite map and the first trajectory map have the same size parameters and are on the same geodetic coordinate axis. Image processing server 530 is configured to input a first trajectory map and a first satellite map into a first neural network model and output a first labeled map, the first labeled map including recognition results for the aforementioned first movement trajectory, the first neural network model including an encoder comprising n stages, and the first neural network model being configured as follows: The first trajectory map and the first satellite map are overlaid to determine the first input image, and the initial coordinate information of each trajectory point in the first trajectory map in the first input image is determined. In the first stage of the encoder, feature extraction is performed on the first input image at the first downsampling scale to determine the first feature map, and the first grid is determined based on the first feature map. According to the initial coordinate information corresponding to each trajectory point and the first downsampling scale, the coordinate information of each trajectory point in the first grid is determined. By using bilinear interpolation, each trajectory point is associated with the first local feature corresponding to the sub-grid in the first grid based on the coordinate information of each trajectory point in the first grid and the coordinate information of the four adjacent sub-grids around each trajectory point in the first grid, and the first trajectory point sequence is determined. The first local feature is the image feature in the first feature map. In the m-th stage of the encoder, feature extraction is performed on the first input image at the m-th downsampling scale to determine the m-th feature map, and the m-th grid is determined based on the m-th feature map; and the coordinate information of each trajectory point in the m-1 grid and the m-th downsampling scale are used to determine the coordinate information of each trajectory point in the m-th grid; and by using bilinear interpolation, each trajectory point is associated with the m-th local feature corresponding to the sub-grid in the m-th grid based on the coordinate information of each trajectory point in the m-th grid and the coordinate information of the four adjacent sub-grids around each trajectory point in the m-th grid, to determine the m-th trajectory point sequence, where the m-th local feature is the image feature in the m-th feature map, m∈[2,n] and is an integer; and when m equals n, the first feature map to the n-th feature map are fused using a fully connected method to determine the first global feature sequence, and the first trajectory point sequence to the n-th trajectory point sequence are fused to determine the first local feature sequence; Based on the multi-head self-attention (MSA) mechanism, a self-attention operation is performed on the first global feature sequence to determine the second global feature sequence, and a self-attention operation is performed on the first local feature sequence to determine the second local feature sequence. Then, a cross-self-attention operation is performed on the second global feature sequence and the second local feature sequence to determine the target feature sequence. The target feature sequence includes each trajectory point and its corresponding fused image features and classification information for candidates. The classification information for candidates includes at least farmland and roads. By using a normalized exponential function, the classification information to which each trajectory point belongs is determined from the classification information used as candidates. Based on each trajectory point and its corresponding fused image features and the classification information to which each trajectory point belongs, the first moving trajectory and the classification information to which each trajectory point belongs are mapped to the first satellite map, and the first labeled map is output.
[0100] In some possible embodiments, before the image processing server 530 inputs the first trajectory map and the first satellite map into the first neural network model, the image processing server 530 is further configured to: extend the first length and the first width in the size parameters of the first trajectory map and the first satellite map to a second length and a second width, respectively.
[0101] In some possible embodiments, before the image processing server 530 overlays the first trajectory map and the first satellite map, the image processing server 530 is further configured to: perform a downsampling operation on the first trajectory map and the first satellite map, reduce the second length and the second width in the size parameters of the first trajectory map and the first satellite map to a third length and a third width, and correspondingly expand the number of image channels in the size parameters of the first trajectory map and the first satellite map.
[0102] In some possible embodiments, the image processing server 530 is further configured to: sequentially input Q sets of datasets including a first trajectory map, a first satellite map, and a first point sequence into a first neural network model, and the first neural network model outputs Q first marked maps, where Q is an integer greater than 1; and stitch the Q first marked maps together to determine a second marked map.
[0103] In some possible embodiments, this application also proposes an agricultural machinery trajectory recognition device, which includes a processor and a memory, wherein the processor and the memory are connected, wherein the memory is used to store program code, and the processor is used to call the program code to execute the method in any of the possible implementations in the above embodiments.
[0104] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0105] In the various embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0106] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0107] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0108] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory, magnetic disks, or optical disks.
[0109] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for agricultural machinery trajectory recognition, characterized in that, The method includes: Based on the first trajectory point information sent by the GPS device on the agricultural machinery, a first trajectory map is determined. The first trajectory map includes a first movement trajectory formed by connecting multiple trajectory points. The first movement trajectory is used to represent the movement trajectory of the agricultural machinery in a first area. The first trajectory point information includes the latitude and longitude coordinates of the location of the agricultural machinery, the instantaneous speed of the agricultural machinery, the mileage of the agricultural machinery, and the time of the point marking for each trajectory point. The first trajectory map is used to represent the relationship between the first movement trajectory and first state information. The first state information includes at least one of the following: speed information, time information, and mileage information. A first satellite map is determined, which is used to represent the first region, and the first satellite map and the first trajectory map have the same size parameters and are on the same geodetic coordinate axis; The first trajectory map and the first satellite map are input into a first neural network model, which outputs a first labeled map. The first labeled map includes the recognition results for the first movement trajectory. The first neural network model includes an encoder, which includes n stages. The first neural network model is configured as follows: The first trajectory map and the first satellite map are superimposed to determine the first input image, and the initial coordinate information of each trajectory point in the first trajectory map in the first input image is determined. In the first stage of the encoder, feature extraction is performed on the first input image at a first downsampling scale to determine a first feature map, and a first grid is determined based on the first feature map; and the coordinate information of each trajectory point in the first grid is determined according to the initial coordinate information corresponding to each trajectory point and the first downsampling scale; and by using bilinear interpolation, each trajectory point is associated with the first local feature corresponding to the sub-grid in the first grid according to the coordinate information of each trajectory point in the first grid and the coordinate information of the four adjacent sub-grids around each trajectory point in the first grid, to determine the first trajectory point sequence, wherein the first local feature is the image feature in the first feature map; In the m-th stage of the encoder, feature extraction is performed on the first input image at the m-th downsampling scale to determine the m-th feature map, and the m-th grid is determined based on the m-th feature map; and the coordinate information of each trajectory point in the m-1 grid and the m-th downsampling scale are used to determine the coordinate information of each trajectory point in the m-th grid; and by using bilinear interpolation, each trajectory point is associated with the m-th local feature corresponding to the sub-grid in the m-th grid based on the coordinate information of each trajectory point in the m-th grid and the coordinate information of the four adjacent sub-grids around each trajectory point in the m-th grid, to determine the m-th trajectory point sequence, where the m-th local feature is the image feature in the m-th feature map, and m ∈ [2, n] and is an integer; and when m equals n, the first feature map to the n-th feature map are fused using a fully connected method to determine the first global feature sequence, and the first trajectory point sequence to the n-th trajectory point sequence are fused to determine the first local feature sequence; Based on the multi-head self-attention (MSA) mechanism, a self-attention operation is performed on the first global feature sequence to determine the second global feature sequence, and a self-attention operation is performed on the first local feature sequence to determine the second local feature sequence. Then, a cross-self-attention operation is performed on the second global feature sequence and the second local feature sequence to determine the target feature sequence. The target feature sequence includes each trajectory point and its corresponding fused image features and classification information for candidates. The classification information for candidates includes at least farmland and roads. By using a normalized exponential function, the classification information to which each trajectory point belongs is determined from the candidate classification information. Based on each trajectory point, its corresponding fused image features, and the classification information to which each trajectory point belongs, the first moving trajectory and the classification information to which each trajectory point belongs are mapped to the first satellite map, and the first marked map is output.
2. The method according to claim 1, characterized in that, Before inputting the first trajectory map and the first satellite map into the first neural network model, the method further includes: The first length and first width in the size parameters of the first trajectory map and the first satellite map are respectively extended to the second length and the second width.
3. The method according to claim 2, characterized in that, Before overlaying the first trajectory map and the first satellite map, the method further includes: A downsampling operation is performed on the first trajectory map or the first satellite map, reducing the second length and second width in the size parameters of the first trajectory map or the first satellite map to a third length and a third width, and correspondingly expanding the number of image channels in the size parameters of the first trajectory map or the first satellite map.
4. The method according to claim 1, characterized in that, In the first movement trajectory, the trajectory points classified as farmland are connected by lines of a first color, and the trajectory points classified as roads are connected by lines of a second color.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The first neural network model is sequentially input with Q sets of datasets including the first trajectory map and the first satellite map, and the first neural network model outputs Q first labeled maps, where Q is an integer greater than 1; The Q first marked maps are stitched together to determine the second marked map.
6. A system for recognizing the trajectory of agricultural machinery, characterized in that, The system includes: a Global Positioning System (GPS) server, a satellite map server, and an image processing server; The GPS server is used to determine a first trajectory map based on the first trajectory point information sent by the GPS device on the agricultural machinery. The first trajectory map includes a first movement trajectory formed by connecting multiple trajectory points. The first movement trajectory is used to represent the movement trajectory of the agricultural machinery in a first area. The first trajectory point information includes the latitude and longitude coordinates of the location of the agricultural machinery, the instantaneous speed of the agricultural machinery, the mileage of the agricultural machinery, and the time of the point measurement for each trajectory point. The first trajectory map is used to represent the relationship between the first movement trajectory and first status information. The first status information includes at least one of the following: speed information, time information, and mileage information. The satellite map server is used to determine a first satellite map, which represents the first region, and the first satellite map and the first trajectory map have the same size parameters and are on the same geodetic coordinate axis. The image processing server is used to input the first trajectory map and the first satellite map into a first neural network model and output a first labeled map. The first labeled map includes the recognition result for the first movement trajectory. The first neural network model includes an encoder, which includes n stages. The first neural network model is configured as follows: The first trajectory map and the first satellite map are superimposed to determine the first input image, and the initial coordinate information of each trajectory point in the first trajectory map in the first input image is determined. In the first stage of the encoder, feature extraction is performed on the first input image at a first downsampling scale to determine a first feature map, and a first grid is determined based on the first feature map; and the coordinate information of each trajectory point in the first grid is determined according to the initial coordinate information corresponding to each trajectory point and the first downsampling scale; and by using bilinear interpolation, each trajectory point is associated with the first local feature corresponding to the sub-grid in the first grid according to the coordinate information of each trajectory point in the first grid and the coordinate information of the four adjacent sub-grids around each trajectory point in the first grid, to determine the first trajectory point sequence, wherein the first local feature is the image feature in the first feature map; In the m-th stage of the encoder, feature extraction is performed on the first input image at the m-th downsampling scale to determine the m-th feature map, and the m-th grid is determined based on the m-th feature map; and the coordinate information of each trajectory point in the m-1 grid and the m-th downsampling scale are used to determine the coordinate information of each trajectory point in the m-th grid; and by using bilinear interpolation, each trajectory point is associated with the m-th local feature corresponding to the sub-grid in the m-th grid based on the coordinate information of each trajectory point in the m-th grid and the coordinate information of the four adjacent sub-grids around each trajectory point in the m-th grid, to determine the m-th trajectory point sequence, where the m-th local feature is the image feature in the m-th feature map, and m ∈ [2, n] and is an integer; and when m equals n, the first feature map to the n-th feature map are fused using a fully connected method to determine the first global feature sequence, and the first trajectory point sequence to the n-th trajectory point sequence are fused to determine the first local feature sequence; Based on the MSA mechanism, a self-attention operation is performed on the first global feature sequence to determine the second global feature sequence, and a self-attention operation is performed on the first local feature sequence to determine the second local feature sequence. Then, a cross-self-attention operation is performed on the second global feature sequence and the second local feature sequence to determine the target feature sequence. The target feature sequence includes each trajectory point and its corresponding fused image features and classification information for candidates. The classification information for candidates includes at least farmland and roads. By using a normalized exponential function, the classification information to which each trajectory point belongs is determined from the candidate classification information. Based on each trajectory point, its corresponding fused image features, and the classification information to which each trajectory point belongs, the first moving trajectory and the classification information to which each trajectory point belongs are mapped to the first satellite map, and the first marked map is output.
7. The system according to claim 6, characterized in that, Before the image processing server inputs the first trajectory map and the first satellite map into the first neural network model, the image processing server is further configured to: The first length and first width in the size parameters of the first trajectory map and the first satellite map are respectively extended to the second length and the second width.
8. The system according to claim 7, characterized in that, Before the image processing server overlays the first trajectory map and the first satellite map, the image processing server is further configured to: A downsampling operation is performed on the first trajectory map or the first satellite map, reducing the second length and second width in the size parameters of the first trajectory map or the first satellite map to a third length and a third width, and correspondingly expanding the number of image channels in the size parameters of the first trajectory map or the first satellite map.
9. The system according to claim 8, characterized in that, The image processing server is also used for: The first neural network model is sequentially input with Q groups of data, including the first trajectory map and the first satellite map, and the first neural network model outputs Q first marked maps, where Q is an integer greater than 1. The Q first marked maps are stitched together to determine the second marked map.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are executed by a processor to implement the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Agricultural machine track field road segmentation method based on motion and vision double-feature fusion
CN114998744A
Agricultural machine track identification method based on remote sensing image scene division and application method thereof
CN115063684A
