A top-view device positioning map modeling system and real-time location distribution method for integrated indoor and outdoor factory scenarios
By unifying the map type model and using three-point affine transformation, the problems of fragmented multi-source map labels and disconnected coordinate transformation in the indoor and outdoor positioning system of the factory area were solved. This enabled the natural overlay of the top-view device position in the indoor and outdoor fused map and efficient real-time data processing, thereby improving the stability and adaptability of the system.
Patent Information
- Application Number
- CN202611302923.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, the coordinate systems and data channels of different positioning devices in indoor and outdoor positioning systems in factory areas are independent, resulting in fragmented multi-source map identification, inability to naturally overlay the positions of top-view devices, disconnect between coordinate transformation configuration and real-time data processing, complex protocols that are difficult to support real-time performance and stability, and coupling of position display and storage, which causes single-point anomalies to affect the entire link.
A unified map type model is adopted to represent local maps, GIS maps, indoor-outdoor integrated maps, and top-view maps. The map conversion configuration module maintains reference points and tenant IDs. The coordinates of the top-view device are converted to the indoor-outdoor integrated map using a three-point affine transformation. Combined with the UDP positioning access module, WebSocket data access module, and real-time location normalization module, location parsing, status updates, and data caching are realized, and UDP/WebSocket transmission is decoupled.
It achieves natural overlay of top-view device locations in indoor and outdoor fusion maps, reduces business branching, lowers latency and inconsistency risks, improves system real-time performance and stability, and is suitable for multi-tenant deployment.
Smart Images

Figure CN123118939A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of positioning and map data processing technology, and in particular to a top-view equipment positioning map modeling system and real-time location distribution method for integrated indoor and outdoor scenarios in factory areas. Background Technology
[0002] The factory digital platform supports multiple positioning and map data sources, including UWB, GIS maps, and DS top-view visual positioning devices. The system needs to simultaneously display the real-time location of indoor positioning, outdoor positioning, and top-view robots or AGVs within the same business platform, and use the location data for map display, fence events, trajectory storage, equipment status monitoring, and external distribution via UDP / WebSocket.
[0003] Existing common solutions typically involve separate deployments based on device or map source: indoor UWB uses local planar map coordinates, outdoor uses GIS layers, and top-view devices maintain their own visual maps, robot IDs, mapping status, laser scans, camera images, and relocation status. The coordinate systems, map identifiers, and data channels between different sources are independent, requiring separate adaptations for each type of device on the business side.
[0004] The above common solutions generally have the following drawbacks:
[0005] 1. Fragmented identifiers in multi-source maps. Indoor maps, GIS maps, indoor-outdoor fusion maps, and top-view maps often use different fields or business identifiers. When adding new map types, it is easy to cause logical branches in querying, displaying, synchronizing, and deleting.
[0006] 2. The location of the top-view device cannot be naturally overlaid into the indoor / outdoor fusion map. The top-view device outputs its own map coordinates. Without a unified conversion, the business side can only view it separately in the top-view map, making it difficult to display it together with location data such as UWB and GNSS.
[0007] 3. The coordinate transformation configuration is disconnected from real-time data processing. If the coordinate transformation is performed on a temporary basis or converted by the front end for each location report, it will increase the risk of latency and inconsistency, and will also be detrimental to multi-tenant isolation.
[0008] 4. Top-view devices have complex protocols. UDP, WebSocket, and HTTP interfaces each carry different data such as location, images, laser data, mapping status, and map synchronization. Traditional polling or synchronous processing methods are difficult to support real-time performance and stability.
[0009] 5. Location display, saving, device online status, and external distribution are often coupled in a single process, and a single point of failure can affect the entire chain. Summary of the Invention
[0010] Purpose of the invention: This invention proposes a top-view device positioning map modeling system and real-time location distribution method for integrated indoor and outdoor scenarios in factory areas. The aim is to represent local maps, GIS maps, integrated indoor and outdoor maps, and top-view maps using a unified map type model, reducing business branching caused by separate top-view map identifiers; converting the top-view device's own map coordinates to the coordinate system of the integrated indoor and outdoor map or the main map, enabling different positioning sources to be displayed on the same map layer; completing location parsing, status updates, database event publishing, UDP / WebSocket distribution, and integrated location generation with low latency under high-frequency UDP positioning reporting; caching coordinate transformation parameters for multi-tenant and multi-map environments to avoid frequent database queries in real-time links; and simultaneously integrating the top-view device's positioning, camera images, laser scanning, and mapping status, providing a unified data foundation for map acquisition, supplementary acquisition, application, relocation, and real-time monitoring.
[0011] This invention proposes a top-view equipment positioning map modeling system for integrated indoor and outdoor factory scenarios, comprising: The unified map modeling module is used to maintain basic map information, parent-child hierarchy, map images, engine layer relationships, map type (mapType), and whether it is a top-view attribute, and uses the map type (mapType) as the main identifier of map type for WDF local map, GIS map, indoor-outdoor fusion map, and top-view map; The map conversion configuration module is used to maintain three sets of reference points between the sub-map and the target map, record the target fusion map ID, tenant ID and conversion type, and write the corresponding map conversion configuration to the cache; The top-view device UDP positioning access module is used to listen to the top-view device positioning port, receive top-view device UDP data packets, identify the heartbeat packets in the top-view device UDP data packets, and parse the positioning packets in the top-view device UDP data packets into PoseMessage and publish them to the top-view positioning event topic; The top-view device WebSocket data access module is used to parse the binary WebSocket frames of the top-view device and process camera images, laser scans, mapping progress, repositioning status and robot ID according to data types. The real-time location normalization module is used to subscribe to the top-view positioning event topic and construct the TagPositionInfo corresponding to the original location based on the PoseMessage. The TagPositionInfo includes device code, map ID, X coordinate, Y coordinate, Z coordinate, orientation angle, positioning time, and receiving time. The coordinate fusion transformation module is used to read the map transformation configuration according to the map ID and tenant ID corresponding to the original location, and perform a three-point affine transformation on the original location according to the map transformation configuration to generate TagPositionInfo corresponding to the target fused map location; The latest location caching and event distribution module is used to write the TagPositionInfo corresponding to the original location into the ordinary latest location cache, write the TagPositionInfo corresponding to the target fused map location into the fused top-view latest location cache, and publish location saving events, online status events and external distribution events. The real-time push module is used to read and merge the positions in the ordinary latest position cache and the positions in the merged top view latest position cache, and output the merged position data to the front end or third-party system according to the WebSocket session subscription conditions, UDP real-time push configuration or UDP batch push configuration.
[0012] As a preferred embodiment, the map type (mapType) includes: Map type used to represent WDF local map; Map types used to represent GIS maps; Map types used to represent integrated indoor and outdoor maps; and Map type used to represent top-view maps; Among them, map query, tree structure, map conversion configuration reading, top view map synchronization and fused map uniqueness verification are all based on the map type (mapType).
[0013] As a preferred embodiment, the unified map modeling module automatically supplements the corresponding map conversion configuration when querying the map details of the indoor-outdoor fusion map or the top-view map; When adding a new indoor / outdoor integrated map, the unified map modeling module downgrades other indoor / outdoor integrated maps to ordinary maps to ensure that the main map of the integrated map is unique.
[0014] As a preferred embodiment, the three sets of reference points include three non-collinear reference points P1(x1, y1), P2(x2, y2), and P3(x3, y3) in the sub-map, and reference points Q1(x1, y1), Q2(x2, y2), and Q3(x3, y3) in the target map that correspond to the three non-collinear reference points respectively. After saving or updating the map conversion configuration, the map conversion configuration module reads the map conversion configuration of each tenant and writes it into the cache. The cache key of the cache is generated by combining the tenant ID and the map ID of the sub-map, and the cache key is represented as tenantId:mapId. The coordinate fusion and transformation module generates the cache key based on the tenant ID and the current map ID corresponding to the top-view device, and reads the corresponding map transformation configuration through the cache key.
[0015] As a preferred embodiment, the three-point affine transformation includes: Based on the three non-collinear reference points, establish the following system of six linear equations: X1 = a × x1 + b × y1 + c; X² = a × x² + b × y² + c; X3 = a × x3 + b × y3 + c; Y1 = d × x1 + e × y1 + f; Y² = d × x² + e × y² + f; Y3 = d × x3 + e × y3 + f; The affine transformation coefficients a, b, c, d, e, and f are obtained from the aforementioned six-variable linear equation system. When the coordinates of the original location in the sub-map are D(x, y), the coordinates (X, Y) of the target merged map location are calculated according to the following relationship: X = a × x + b × y + c; Y = d × x + e × y + f; The coordinates (X, Y) of the target fused map location are rounded to two decimal places and encapsulated as the TagPositionInfo corresponding to the target fused map location.
[0016] As a preferred embodiment, the coordinate fusion transformation module retains two decimal places for the coordinates (X, Y) of the target fused map location and encapsulates them into a TagPositionInfo corresponding to the target fused map location; The TagPositionInfo corresponding to the target fused map location inherits the device code, orientation angle, and positioning time from the TagPositionInfo corresponding to the original location, sets the map ID to the target fused map ID in the map conversion configuration, and sets the Z coordinate to 0; When the coordinate fusion and transformation module fails to read the map transformation configuration through the cache key, it only retains the TagPositionInfo corresponding to the original location; When the coordinate fusion conversion module reads the map conversion configuration through the cache key, it simultaneously retains the TagPositionInfo corresponding to the original location and the TagPositionInfo corresponding to the target fused map location.
[0017] As a preferred embodiment, the top-view device UDP positioning access module includes a Netty UDP server, which listens to the top-view device positioning port and hands over the received top-view device UDP data packets to a dynamic thread pool for asynchronous processing; When the UDP data packet of the top-view device is a heartbeat packet, update the heartbeat status of the top-view device; When the UDP packet of the top-view device is a positioning packet, the positioning packet is parsed into a PoseMessage including host IP, X coordinate, Y coordinate, orientation angle, timestamp, map name and device code, and the PoseMessage is published to the top-view positioning event topic; The real-time location normalization module subscribes to the top-view positioning event topic through DsStoragePositionHandler and constructs the TagPositionInfo corresponding to the original location.
[0018] As a preferred embodiment, the top-view device WebSocket data access module is used for: When the binary WebSocket frame of the top-view device is image data and the image location is identified as the top-view camera, the binary image is converted to Base64, and the Base64, the width of the image, the height of the image, the image size, and the host identifier are written into the camera image cache. When the top-view device's binary WebSocket frame is laser scanning data, the scan point array is parsed and written into the laser scanning cache according to the current device encoding; When the top-view device's binary WebSocket frame is the robot's basic state, the robot ID, relocation state, mapping progress, and mapping completion state are parsed and written to the robot ID cache, relocation state cache, mapping progress cache, and mapping state tracker, respectively. When the top-view device reports an abnormal mapping status, the mapping status tracker is updated and the mapping status is deactivated.
[0019] As a preferred embodiment, the real-time push module reads the ordinary latest location cache and the fused top-view latest location cache by executing a timed push task once per second; The real-time push module filters out the valid target fused map locations within 30 seconds from the fused top-view latest location cache, merges the locations in the ordinary latest location cache with the valid target fused map locations within 30 seconds, constructs a push executor based on the map, device, and permission conditions of the WebSocket session, and pushes the merged location data to the corresponding WebSocket session through the push executor. When configured for UDP batch push, the real-time push module sends the merged location data to an external system; The latest location caching and event distribution module publishes the location saving event after each original location enters the system, and the saving task performs persistence on the original location based on the location saving event.
[0020] Furthermore, this invention proposes a real-time location distribution method based on the above-mentioned top-view device positioning map modeling system, comprising the following steps: S1, listen to the positioning port of the top-view device, receive the UDP data packets of the top-view device, and hand over the UDP data packets of the top-view device to the dynamic thread pool for asynchronous processing; S2, identify the data packet type of the UDP data packet of the top-view device; when the UDP data packet of the top-view device is a heartbeat packet, update the heartbeat status of the top-view device; when the UDP data packet of the top-view device is a positioning packet, parse the positioning packet into a PoseMessage, and publish the PoseMessage to the top-view positioning event topic; S3, subscribe to the top-view positioning event topic, construct the TagPositionInfo corresponding to the original location based on the PoseMessage, write the TagPositionInfo corresponding to the original location into the ordinary latest location cache, and publish the location save event; S4. Generate a cache key tenantId:mapId based on the tenant ID and map ID corresponding to the original location, and read the map transformation configuration through the cache key; when the map transformation configuration is not read, only the TagPositionInfo corresponding to the original location is retained; when the map transformation configuration is read, perform a three-point affine transformation on the original location according to the map transformation configuration to generate the TagPositionInfo corresponding to the target merged map location, and write the TagPositionInfo corresponding to the target merged map location into the latest location cache of the merged top view; S5, read the locations in the ordinary latest location cache and the target fused map locations within the valid time range in the fused top-view latest location cache, merge the read locations into a location list, and output the location list to the front end or third-party system according to the WebSocket session subscription conditions, UDP real-time push configuration or UDP batch push configuration.
[0021] As a preferred embodiment, the method further includes the following steps before step S1: Maintain basic map information, parent-child hierarchy, map image, engine layer relationship, map type (mapType), and whether it is a top view attribute; The map type (mapType) is used as the primary identifier for WDF local maps, GIS maps, indoor / outdoor fusion maps, and top-view maps. Configure three sets of non-collinear corresponding reference points for the sub-map and the target map, and record the target fusion map ID, tenant ID and transformation type to form the map transformation configuration; After saving or updating the map conversion configuration, read the map conversion configuration of each tenant and write it to the cache, and generate the cache key tenantId:mapId according to the combination of tenant ID and sub-map map ID.
[0022] As a preferred embodiment, in step S2, the PoseMessage includes the host IP, X coordinate, Y coordinate, orientation angle, timestamp, map name, and device code; In step S3, the TagPositionInfo corresponding to the original location constructed based on the PoseMessage includes device code, map ID, X coordinate, Y coordinate, Z coordinate, orientation angle, positioning time, and receiving time; After writing the TagPositionInfo corresponding to the original location into the ordinary latest location cache, the original location is sent to the UDP real-time push according to the UDP real-time push configuration.
[0023] As a preferred embodiment, the TagPositionInfo corresponding to the target fused map location inherits the device code, orientation angle, and positioning time from the TagPositionInfo corresponding to the original location, sets the map ID to the target fused map ID in the map conversion configuration, and sets the Z coordinate to 0; Step S5 is executed once per second, reading the positions in the ordinary latest position cache, filtering out the valid target fused map positions within 30 seconds from the fused top-view latest position cache, and merging them into the position list; A push executor is constructed based on the map, device, and permission conditions of the WebSocket session, and the location list is pushed to the corresponding WebSocket session through the push executor; When configured for UDP batch push, the location list is sent to an external system; According to the location saving event released in step S3, the saving task performs persistence on the original location.
[0024] As a preferred embodiment, the execution of steps S1 to S5 also includes a top-view device WebSocket data processing step: Receive and parse binary WebSocket frames from the top-view device; When the image data is parsed and the image location is identified as a top-view camera, the image binary is converted to Base64, and the Base64, the image width, the image height, the image size, and the host identifier are written into the camera image cache. When the laser scanning data is obtained, the scan point array is parsed and written into the laser scanning cache according to the current device code; When the robot's basic state is obtained, the robot ID, relocalization state, mapping progress, and mapping completion state are parsed and written to the robot ID cache, localization state cache, mapping progress cache, and mapping state tracker, respectively. When an abnormal mapping status is detected, the mapping status tracker is updated and the mapping status is deactivated so that map acquisition, map synchronization, and real-time monitoring can use the data in the camera image cache, laser scan cache, robot ID cache, positioning status cache, mapping progress cache, and mapping status tracker.
[0025] Compared with the prior art, the present invention has at least the following beneficial effects: (1) Unified map types reduce business branching caused by separate identification of top view maps and facilitate the addition of new map types or device types in the future.
[0026] (2) The location of the top-view device can be automatically superimposed on the indoor and outdoor fusion map, and the business side does not need to care about the original coordinate system of the device.
[0027] (3) The three-point affine transformation configuration is simple and suitable for on-site personnel to complete the calibration through three corresponding points on the map.
[0028] (4) Convert the configuration cache to memory / Redis system, and high-frequency location processing does not require real-time database query, reducing latency.
[0029] (5) The original location and the merged location coexist, which not only retains the device's own map positioning capabilities, but also meets the requirements for unified display across maps.
[0030] (6) UDP, WebSocket and event bus are decoupled, and a single data stream is less likely to block the overall positioning link.
[0031] (7) The top view image, laser, mapping status and positioning data are linked on the same platform, which is conducive to the closed loop of map acquisition, supplementary acquisition, application and relocation operation.
[0032] (8) Multi-tenant key-value isolation, suitable for deployment in multiple factories and multiple projects. Attached Figure Description
[0033] Figure 1 This is a diagram of the overall system architecture of the present invention.
[0034] Figure 2 This is a flowchart of the top-view positioning data processing.
[0035] Figure 3 This is a schematic diagram illustrating the principle of three-point affine coordinate transformation.
[0036] Figure 4 A unified model diagram for map types.
[0037] Figure 5 This is a flowchart of the WebSocket data processing for top-view devices. Detailed Implementation
[0038] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention can be practiced without one or more of these details. In other instances, certain technical features well-known in the art have not been described in order to avoid obscuring the invention.
[0039] The embodiments of the present invention are described in detail from eight aspects: system composition, unified modeling of map types, three-point coordinate conversion method, conversion parameter caching mechanism, top-view device positioning data access process, top-view device WebSocket data processing process, real-time location push and persistence, and system data path diagram.
[0040] I. System Composition The unified map modeling module maintains basic map information, parent-child hierarchy, map images, engine layer relationships, map type (mapType), and whether it is a top-view attribute.
[0041] Map conversion configuration module: Maintains three sets of reference points, including sub-map coordinates (x1,y1), (x2,y2), (x3,y3) and target map coordinates (lng1,lat1), (lng2,lat2), (lng3,lat3), and records the target merged map ID, tenant ID and conversion type.
[0042] Top-view device UDP positioning access module: Based on the NettyUDP server, it listens to the top-view positioning port, parses binary positioning packets, identifies heartbeat packets, and converts positioning messages into PoseMessages.
[0043] Top-view device WebSocket data access module: Parses binary WebSocket frames from the top-view device and processes data such as camera images, laser scans, mapping progress, repositioning status, and robot IDs according to data type.
[0044] Real-time location normalization module: normalizes positioning data input from different protocols into TagPositionInfo, which includes device code, map ID, X / Y / Z coordinates, orientation angle, positioning time, and reception time.
[0045] Coordinate fusion transformation module: Obtain the transformation configuration based on the current device's map ID and tenant ID, and use a three-point affine transformation to convert the top-view device's location into the target fused map location.
[0046] The latest location caching and event distribution module writes the original location and the merged location into the cache respectively, and publishes location saving events, online status events and external distribution events.
[0047] Real-time push module: Outputs location data to the front end or third-party systems according to WebSocket session subscription conditions, UDP real-time push configuration, or batch push configuration.
[0048] II. Unified Modeling of Map Types The system uses mapType as the primary identifier for map types, and includes at least: 0: WDF local map.
[0049] 1: GIS map.
[0050] 2: Indoor and outdoor integrated map.
[0051] 3: Top-view map.
[0052] Map querying, tree structure, map conversion configuration reading, top-view map synchronization, and merged map uniqueness verification all revolve around mapType. For indoor / outdoor merged maps and top-view maps, coordinate conversion configurations are automatically added when querying map details; when adding a new indoor / outdoor merged map, other indoor / outdoor merged maps can be downgraded to ordinary maps to ensure the uniqueness of the main merged map.
[0053] III. Three-point coordinate transformation method The map conversion configuration module requires the user to provide three non-collinear reference points. Let the three points in the sub-map be: P1(x1,y1), P2(x2,y2), P3(x3,y3) The three corresponding points on the target map are: Q1(X1,Y1), Q2(X2,Y2), Q3(X3,Y3) The system solves for the following affine transformation: X=a x+b y + cY = d x+e y+f Construct a system of six linear equations: X1=a x1+b y1+cX2=a x2+b y2+cX3=a x3+b y3+cY1=d x1+e y1+fY2=d x2+e y2+fY3=d x3+e y3+f The transformation matrix is obtained as follows: |abc||def||001| When the top-view device reports coordinates D(x,y), the fusion and transformation module calculates the target map coordinates: X=a x+b y + cY = d x+e y+f The system retains two decimal places for the conversion result and encapsulates it into a new TagPositionInfo. The new location point inherits the device code, orientation angle, and positioning time of the original location, the map ID is modified to the target fused map ID in the conversion configuration, and the Z-axis is fixed at 0.
[0054] IV. Conversion Parameter Caching Mechanism After the map transformation configuration is saved or updated, the system reads the transformation configurations of all tenants and writes them to the cache. The cache key is generated by combining the tenant ID and the map ID. tenantId:mapId During real-time location processing, the system directly reads the cache using the device tenant ID and the current map ID. If no conversion configuration exists, only the original top-view map location is retained; if a conversion configuration exists, a merged map location is generated simultaneously. This mechanism avoids repeated database accesses by high-frequency location links and ensures that conversion configurations are isolated between different tenants.
[0055] V. Top-view device positioning data access process The top-view device positioning UDP access process is as follows: 1. The UDP server listens on the top-view device's location port.
[0056] 2. After receiving the data packet, it is handed over to the dynamic thread pool for asynchronous processing.
[0057] 3. If the data packet is a heartbeat packet, update the device heartbeat status.
[0058] 4. If it is a location packet, it will be parsed into a PoseMessage containing the host IP, X coordinate, Y coordinate, orientation angle, timestamp, map name, and device code.
[0059] 5. Publish the PoseMessage to the top-view location event topic.
[0060] 6. DsStoragePositionHandler subscribes to the topic and builds a platform-unified location object.
[0061] 7. The location object is written to the latest location cache, a location save event is published, and UDP real-time transmission is performed according to the configuration.
[0062] 8. If the map has a transformation configuration, perform a three-point affine transformation to generate the merged map location, write it to the latest top-view location cache after merging, and continue to send it outwards.
[0063] VI. WebSocket Data Processing Flow for Top-View Devices The WebSocket access module of the top-view device processes binary frames, parses them, and distributes them according to data type: 1. Image data: When the image location is identified as a top-view camera, the image binary is converted to Base64, and the width, height, image size and host identifier are written to the camera image cache.
[0064] 2. Laser scanning data: Parse the scan point array and write it into the laser scanning cache according to the current device code for display by the front end or monitoring end.
[0065] 3. Robot basic status: Parse the robot ID, relocation status, mapping progress, and mapping completion status, and write them to the robot ID cache, relocation status cache, mapping progress cache, and mapping status tracker, respectively.
[0066] 4. Abnormal mapping status: When the device reports an abnormal status, the system updates the status tracker and cancels the mapping status to avoid long-term blockage of map synchronization or supplementary data collection processes.
[0067] VII. Real-time location push and persistence The system categorizes the latest location cache into regular latest location and merged top-view latest location. A scheduled push task executes once per second. 1. Read the latest location cache.
[0068] 2. Read the latest position cache of the merged top view and filter the valid data within 30 seconds.
[0069] 3. Merge the two types of positions.
[0070] 4. Build a push executor based on the WebSocket session's map, device, permissions, and other conditions.
[0071] 5. If configured for UDP batch push, the merged location list will be sent to the external system.
[0072] Simultaneously, after each piece of raw location data enters the system, the system issues a location save event, which is then executed by a save task to persist the data. Location data can be written to the location database according to the project's existing fragmentation strategy, accommodating long-term storage of high-frequency location data.
[0073] VIII. System Data Path Diagram Top-view device UDP positioning packet -> NettyUDP reception -> Positioning packet parsing into PoseMessage -> Event bus publishing SOCKET_DS_UDP_POSITION_TOPIC -> Constructing TagPositionInfo original position -> Writing POSITION_TAG_LATEST -> Publishing POSITION_SAVE_TOPIC -> Querying tenantId:mapId conversion configuration cache -> Three-point affine transformation -> Generating target fused map TagPositionInfo -> Writing POSITION_DS_TAG_LATEST -> WebSocket / UDP real-time or batch distribution.
[0074] The process involves: WebSocket binary data from the top-view device -> parsing with UiDatagram -> writing the IMAGE data to DS_CAMERA_IMAGE -> writing the LASER_SCAN data to DS_LASER_SCAN -> writing the robot ID, positioning status, mapping progress, and mapping status cache to ROBOT_BASE -> consuming the above statuses in the map acquisition, map synchronization, and real-time monitoring modules.
[0075] In summary, the present invention discloses a top-view device positioning map modeling system and real-time location distribution method for indoor-outdoor integrated scenarios in factory areas. It uses a unified mapType to model local maps, GIS maps, indoor-outdoor integrated maps, and top-view maps, and uses this type uniformly in map queries, tree organization, transformation parameters, map synchronization, and deletion verification. Based on three sets of reference points, an affine transformation configuration to the target integrated map is established for each tenant and each sub-map, and the configuration is obtained in the real-time positioning link according to tenantId:mapId. After the top-view positioning data enters the platform, the original map location and the target integrated map location are generated simultaneously, allowing the top-view device location to be displayed on the same map as other positioning sources. UDP positioning reception, event bus publishing, location caching, persistent events, coordinate transformation, and WebSocket / UDP distribution are decoupled to improve the stability of high-frequency positioning links. Through WebSocket binary data parsing, top-view camera images, laser scans, robot IDs, relocation status, mapping progress, and mapping status are incorporated into the same device status system. The merged locations are assigned a target map ID, a normalized Z-axis, and their orientation angle and timestamp are retained to ensure consistency in data structure for front-end display, historical storage, and external distribution. An expiration-based filtering mechanism ensures that only merged locations within a certain time window are added to real-time push notifications, preventing expired merged locations from misleading the business side.
[0076] Although the invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the invention itself. Various changes in form and detail may be made without departing from the spirit and scope of the invention as defined in the appended claims, for example: Coordinate transformation can be replaced by four-point or multi-point least squares fitting instead of three-point affine transformation to improve accuracy in large-scale or nonlinear distortion scenarios.
[0077] The target map coordinates can be latitude and longitude, GIS projection coordinates, or internal planar coordinates of the platform. The conversion configuration fields can be expanded according to the coordinate type.
[0078] The real-time event channel can be replaced by a memory event bus with RabbitMQ, Kafka, RedisStream, or MQTT, while still maintaining the decoupling of receiving, transforming, saving, and pushing.
[0079] The expired location filter window can be dynamically adjusted according to device type, map type, or tenant configuration.
[0080] Top-view device communication can be replaced by TCP, MQTT, or HTTP long polling, as long as the input is uniformly converted into PoseMessage or equivalent location message.
[0081] The WebSocket binary protocol can be replaced with JSON, other message definitions from Protobuf, or vendor-specific protocols, and after parsing, it can still be included in the unified caching and state tracking model.
[0082] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A top-view device positioning map modeling system for a factory yard indoor-outdoor fusion scenario, characterized in that, include: The unified map modeling module is used to maintain basic map information, parent-child hierarchy, map images, engine layer relationships, map type, and whether it is a top-view attribute, and uses the map type as the main identifier of the map type for WDF local map, GIS map, indoor-outdoor integrated map, and top-view map; The map conversion configuration module is used to maintain three sets of reference points between the sub-map and the target map, record the target fusion map ID, tenant ID and conversion type, and write the corresponding map conversion configuration to the cache; The top-view device UDP positioning access module is used to listen to the top-view device positioning port, receive top-view device UDP data packets, identify the heartbeat packets in the top-view device UDP data packets, and parse the positioning packets in the top-view device UDP data packets into PoseMessage and publish them to the top-view positioning event topic; The top-view device WebSocket data access module is used to parse the binary WebSocket frames of the top-view device and process camera images, laser scans, mapping progress, repositioning status and robot ID according to data type. The real-time location normalization module is used to subscribe to the top-view positioning event topic and construct the TagPositionInfo corresponding to the original location based on PoseMessage, including device code, map ID, X coordinate, Y coordinate, Z coordinate, orientation angle, positioning time and receiving time; The coordinate fusion transformation module is used to read the map transformation configuration according to the map ID and tenant ID corresponding to the original location, and perform a three-point affine transformation on the original location according to the map transformation configuration to generate TagPositionInfo corresponding to the target fused map location; The latest location caching and event distribution module is used to write the TagPositionInfo corresponding to the original location into the ordinary latest location cache, write the TagPositionInfo corresponding to the target fused map location into the fused top-view latest location cache, and publish location saving events, online status events and external distribution events. The real-time push module is used to read and merge the positions in the ordinary latest position cache and the positions in the merged top view latest position cache, and output the merged position data to the front end or third-party system according to the WebSocket session subscription conditions, UDP real-time push configuration or UDP batch push configuration.
2. The plant site indoor-outdoor fusion scenario oriented overhead equipment positioning map modeling system according to claim 1, wherein, The map types include: The map type used to represent the local map in WDF; Map types used to represent GIS maps; Map types used to represent integrated indoor and outdoor maps; and Map type used to represent top-view maps; Among them, map query, tree structure, map conversion configuration reading, top view map synchronization and fused map uniqueness verification are all based on the map type.
3. The top-view device positioning map modeling system for plant indoor-outdoor fusion scenarios according to claim 2, wherein, When querying the map details of the indoor-outdoor integrated map or the top-view map, the unified map modeling module automatically supplements the corresponding map conversion configuration; When adding a new indoor-outdoor fusion map, the unified map modeling module downgrades other indoor-outdoor fusion maps to ordinary maps to ensure that the main map of the fusion map is unique.
4. The plant site indoor-outdoor fusion scenario oriented overhead equipment positioning map modeling system according to claim 1, wherein, The three sets of reference points include three non-collinear reference points P1(x1, y1), P2(x2, y2), and P3(x3, y3) in the sub-map, and reference points Q1(x1, y1), Q2(x2, y2), and Q3(x3, y3) in the target map that correspond to the three non-collinear reference points respectively. After saving or updating the map conversion configuration, the map conversion configuration module reads the map conversion configuration of each tenant and writes it into the cache. The cache key of the cache is generated by combining the tenant ID and the map ID of the sub-map, and the cache key is represented as tenantId:mapId. The coordinate fusion and transformation module generates the cache key based on the tenant ID and the current map ID corresponding to the top-view device, and reads the corresponding map transformation configuration through the cache key.
5. The plant site indoor-outdoor fusion scenario oriented overhead equipment positioning map modeling system according to claim 4, wherein, The three-point affine transformation includes: Based on the three non-collinear reference points, establish the following system of six linear equations: X1 = a × x1 + b × y1 + c; X² = a × x² + b × y² + c; X3 = a × x3 + b × y3 + c; Y1 = d × x1 + e × y1 + f; Y² = d × x² + e × y² + f; Y3 = d × x3 + e × y3 + f; The affine transformation coefficients a, b, c, d, e, and f are obtained from the aforementioned six-variable linear equation system. When the coordinates of the original location in the sub-map are D(x, y), the coordinates (X, Y) of the target merged map location are calculated according to the following relationship: X = a × x + b × y + c; Y = d × x + e × y + f; The coordinates (X, Y) of the target fused map location are rounded to two decimal places and encapsulated as the TagPositionInfo corresponding to the target fused map location.
6. The plant site indoor-outdoor fusion scenario oriented overhead equipment positioning map modeling system according to claim 5, wherein, The coordinate fusion transformation module retains two decimal places for the coordinates (X, Y) of the target fused map location and encapsulates them into TagPositionInfo corresponding to the target fused map location; The TagPositionInfo corresponding to the target fused map location inherits the device code, orientation angle, and positioning time from the TagPositionInfo corresponding to the original location, sets the map ID to the target fused map ID in the map conversion configuration, and sets the Z coordinate to 0; When the coordinate fusion and transformation module fails to read the map transformation configuration through the cache key, it only retains the TagPositionInfo corresponding to the original location; When the coordinate fusion conversion module reads the map conversion configuration through the cache key, it simultaneously retains the TagPositionInfo corresponding to the original location and the TagPositionInfo corresponding to the target fused map location.
7. The top-view equipment positioning map modeling system for integrated indoor and outdoor factory scenarios according to claim 1, characterized in that, The top-view device UDP positioning access module includes a Netty UDP server, which listens to the top-view device positioning port and hands over the received top-view device UDP data packets to a dynamic thread pool for asynchronous processing; When the UDP data packet of the top-view device is a heartbeat packet, update the heartbeat status of the top-view device; When the UDP packet of the top-view device is a positioning packet, the positioning packet is parsed into a PoseMessage including host IP, X coordinate, Y coordinate, orientation angle, timestamp, map name and device code, and the PoseMessage is published to the top-view positioning event topic; The real-time location normalization module subscribes to the top-view positioning event topic through DsStoragePositionHandler and constructs the TagPositionInfo corresponding to the original location.
8. The top-view equipment positioning map modeling system for integrated indoor and outdoor factory scenarios according to claim 1, characterized in that, The top-view device WebSocket data access module is used for: When the binary WebSocket frame of the top-view device is image data and the image location is identified as the top-view camera, the binary image is converted to Base64, and the Base64, the width of the image, the height of the image, the image size, and the host identifier are written into the camera image cache. When the top-view device's binary WebSocket frame is laser scanning data, the scan point array is parsed and written into the laser scanning cache according to the current device encoding; When the top-view device's binary WebSocket frame is the robot's basic state, the robot ID, relocation state, mapping progress, and mapping completion state are parsed and written to the robot ID cache, relocation state cache, mapping progress cache, and mapping state tracker, respectively. When the top-view device reports an abnormal mapping status, the mapping status tracker is updated and the mapping status is deactivated.
9. The top-view equipment positioning map modeling system for integrated indoor and outdoor factory scenarios according to claim 1, characterized in that, The real-time push module reads the ordinary latest location cache and the fused top-view latest location cache by executing a timed push task once per second. The real-time push module filters out the valid target fused map locations within 30 seconds from the fused top-view latest location cache, merges the locations in the ordinary latest location cache with the valid target fused map locations within 30 seconds, constructs a push executor based on the map, device, and permission conditions of the WebSocket session, and pushes the merged location data to the corresponding WebSocket session through the push executor. When configured for UDP batch push, the real-time push module sends the merged location data to an external system; The latest location caching and event distribution module publishes the location saving event after each original location enters the system, and the saving task performs persistence on the original location based on the location saving event.
10. A real-time location distribution method for a top-view equipment positioning map modeling system for integrated indoor and outdoor factory scenarios, based on any one of claims 1 to 9, characterized in that, Includes the following steps: S1, listen to the positioning port of the top-view device, receive the UDP data packets of the top-view device, and hand over the UDP data packets of the top-view device to the dynamic thread pool for asynchronous processing; S2, identify the data packet type of the UDP data packet of the top-view device; when the UDP data packet of the top-view device is a heartbeat packet, update the heartbeat status of the top-view device; when the UDP data packet of the top-view device is a positioning packet, parse the positioning packet into a PoseMessage, and publish the PoseMessage to the top-view positioning event topic; S3, subscribe to the top-view positioning event topic, construct the TagPositionInfo corresponding to the original location based on the PoseMessage, write the TagPositionInfo corresponding to the original location into the ordinary latest location cache, and publish the location save event; S4. Generate a cache key tenantId:mapId based on the tenant ID and map ID corresponding to the original location, and read the map transformation configuration through the cache key; when the map transformation configuration is not read, only the TagPositionInfo corresponding to the original location is retained; when the map transformation configuration is read, perform a three-point affine transformation on the original location according to the map transformation configuration to generate the TagPositionInfo corresponding to the target merged map location, and write the TagPositionInfo corresponding to the target merged map location into the latest location cache of the merged top view; S5, read the locations in the ordinary latest location cache and the target fused map locations within the valid time range in the fused top-view latest location cache, merge the read locations into a location list, and output the location list to the front end or third-party system according to the WebSocket session subscription conditions, UDP real-time push configuration or UDP batch push configuration.
11. The real-time location distribution method according to claim 10, characterized in that, In step S2, the PoseMessage includes the host IP, X coordinate, Y coordinate, orientation angle, timestamp, map name, and device code; In step S3, the TagPositionInfo corresponding to the original location constructed based on the PoseMessage includes device code, map ID, X coordinate, Y coordinate, Z coordinate, orientation angle, positioning time, and receiving time; After writing the TagPositionInfo corresponding to the original location into the ordinary latest location cache, the original location is sent to the UDP real-time push according to the UDP real-time push configuration. The TagPositionInfo corresponding to the target fused map location inherits the device code, orientation angle, and positioning time from the TagPositionInfo corresponding to the original location, sets the map ID to the target fused map ID in the map conversion configuration, and sets the Z coordinate to 0; Step S5 is executed once per second, reading the positions in the ordinary latest position cache, filtering out the valid target fused map positions within 30 seconds from the fused top-view latest position cache, and merging them into the position list; A push executor is constructed based on the map, device, and permission conditions of the WebSocket session, and the location list is pushed to the corresponding WebSocket session through the push executor; When configured for UDP batch push, the location list is sent to an external system; According to the location saving event released in step S3, the saving task performs persistence on the original location.
12. The real-time location distribution method according to claim 10, characterized in that, The process of executing steps S1 to S5 also includes a top-view device WebSocket data processing step: Receive and parse binary WebSocket frames from the top-view device; When the image data is parsed and the image location is identified as a top-view camera, the image binary is converted to Base64, and the Base64, the image width, the image height, the image size, and the host identifier are written into the camera image cache. When the laser scanning data is obtained, the scan point array is parsed and written into the laser scanning cache according to the current device code; When the robot's basic state is obtained, the robot ID, relocalization state, mapping progress, and mapping completion state are parsed and written to the robot ID cache, localization state cache, mapping progress cache, and mapping state tracker, respectively. When an abnormal mapping status is detected, the mapping status tracker is updated and the mapping status is deactivated so that map acquisition, map synchronization, and real-time monitoring can use the data in the camera image cache, laser scan cache, robot ID cache, positioning status cache, mapping progress cache, and mapping status tracker.
