Personnel positioning map conversion method and system

By locally caching chemical factory map image resources on the mobile client, the problems of slow loading of maps on the traditional platform side are solved, and the mobile client quickly viewing maps and supporting real-time monitoring and historical trajectory generation are realized, ensuring the safe management of chemical factory personnel.

CN119537456APending Publication Date: 2025-02-28NANJING BESTWAY AUTOMATION SYST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411538510.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The platform map of the traditional chemical factory three-dimensional fusion positioning system is slowly loading and cannot be viewed at any time, and the existing mobile phone map cannot be effectively used for personnel safety tracking and positioning of chemical factories.

Method used

By cached the image resources obtained from the server to the local area of ​​the mobile client, the back-end service of the three-dimensional converged positioning system platform obtains the map image resource address, and store and load map images in the local resource library of the mobile client, real-time monitoring, personnel query, historical trajectory and alarm information viewing.

Benefits of technology

It solves the problems of slow map loading and insufficient timeliness, realizes the mobile client to quickly view maps, and supports real-time monitoring and historical trajectory generation, ensuring the safe management of chemical plant personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537456A_ABST
    Figure CN119537456A_ABST
Patent Text Reader

Abstract

The invention provides a personnel positioning map conversion method and system, and relates to the field of personnel positioning. The method comprises the following steps: calling a back-end service of a three-dimensional fusion positioning system platform, obtaining a map picture resource address so as to obtain a map picture of a target area and storing the map picture locally; receiving a viewing request, and loading a corresponding map picture on a display area of the mobile client based on local data; according to a webSocket communication protocol, connection with a push service of the three-dimensional fusion positioning system platform is carried out, personnel position information in the target area is obtained, coordinate conversion calculation is carried out, and real-time position information of personnel on the display area is correspondingly displayed; the map picture resources are obtained from the platform and converted into the map effect capable of being displayed by the mobile client in real time, the map picture loading speed is high, and the map picture can be checked in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of personnel positioning, and in particular to a personnel positioning map conversion method and system. Background Art

[0002] The traditional three-dimensional fusion positioning system of chemical plants adopts a platform-side implementation method. When working, the user logs into the system on the platform to view the real-time location information of personnel in the factory area and the distribution of personnel in the building, etc. The emergence of the three-dimensional fusion positioning system of chemical plants effectively assists chemical plants to achieve personnel safety management and greatly reduces the probability of accidents.

[0003] However, with the use of the system, it was found that the three-dimensional fusion positioning system of chemical plants as a platform lacks the convenience and timeliness of viewing, and cannot be viewed at any time; and each time the map page is entered, the image resources must be obtained from the server, but due to the large resolution of the factory area images, some factory area images are close to 15M in size, and some factory area images are larger than 15M, resulting in each time from the server to load the map takes nearly 10 seconds, loading slowly. In addition, the existing mobile phone map cannot be effectively applied to chemical plants to track and locate the personnel of chemical plants safely. Summary of the invention

[0004] The purpose of the present invention is to provide a personnel positioning map conversion method and system. In order to solve the problem of slow loading of platform-side maps and the inability to view them at any time, the map can be viewed quickly at any time directly on the mobile client by caching the image resources obtained from the server to the local mobile client for data conversion. Real-time target monitoring, personnel query, historical trajectory and alarm information viewing can also be achieved on the map of the mobile client.

[0005] To achieve the above object, the present invention proposes the following technical solutions:

[0006] In the first aspect, a personnel location map conversion method is proposed, comprising:

[0007] Call the backend service of the stereo fusion positioning system platform to obtain the map image resource address of the target area;

[0008] Request the map image resource address, obtain the map image of the target area and store it in the local resource library of the mobile client;

[0009] Receiving a request for viewing real-time monitoring of a target area, and loading a map image corresponding to the target area on a display area of ​​the mobile client based on the local resource library of the mobile client according to the request;

[0010] Connecting to the push service of the stereoscopic fusion positioning system platform according to the webSocket communication protocol to push the location information of personnel in the target area located by the platform to the requesting mobile client;

[0011] The personnel position information is received to perform coordinate conversion calculation, to obtain the real-time position information of the personnel on the display area of ​​the mobile client, and to perform corresponding display on the display area of ​​the mobile client according to the real-time position information.

[0012] Furthermore, the process of loading the map image corresponding to the target area on the display area of ​​the mobile client based on the local resource library of the mobile client according to the request includes:

[0013] Calculate a first difference between the width of the map image and the width of the mobile client display area, and a second difference between the height of the map image and the height of the mobile client display area, determine a compression ratio of the map image according to the relationship between the first difference and the second difference, and display the compressed map image in the center of the mobile client display area;

[0014] The step of determining the compression ratio of the map image according to the relationship between the first difference and the second difference includes:

[0015] When the first difference is greater than the second difference, the map image compression ratio R is determined according to the map image height and the mobile client display area height, where R=mobile client display area height / map image height;

[0016] When the first difference is smaller than the second difference, the map image compression ratio R is determined according to the map image width and the mobile client display area width, where R=mobile client display area width / map image width;

[0017] When both the first difference and the second difference are not positive numbers, the map image compression ratio R=1.

[0018] Furthermore, the process of receiving the personnel location information and performing coordinate conversion calculation to obtain the real-time location information of the personnel in the display area of ​​the mobile client includes:

[0019] According to the resolution of the map image, the coordinate data of the positioning engine preset on the map image and the coordinate conversion ratio value using the coordinate data of the positioning engine as the relative coordinate origin are obtained;

[0020] Calculating a center offset value of the compressed map image in the display area of ​​the mobile client according to the compression ratio of the map image;

[0021] Receive personnel location information, the personnel location information being first coordinate data relative to the relative coordinate origin, and calculate second coordinate data of the personnel location information on the map image according to the first coordinate data, the coordinate data of the relative coordinate origin, and a coordinate conversion ratio value; wherein the map image has its upper left corner zero point as the coordinate origin;

[0022] The real-time position information of the person on the display area of ​​the mobile client is calculated based on the second coordinate data, the compression ratio and the center offset value.

[0023] Furthermore, it also includes:

[0024] Matrix attributes are added to the map image of the mobile client display area and the avatar images corresponding to all the people displayed on it, and the X-axis offset value, Y-axis offset value and corresponding zoom ratio value of each matrix attribute are assigned the same value, so that when the map image of the mobile client display area is slid or touched to zoom, the avatar images of all the people displayed in the map image can be synchronously slid or zoomed with the map image in the display area.

[0025] Furthermore, it also includes:

[0026] Receiving a touch operation on a target person's head portrait or target person search information, determining the position of the target person in the map image, and moving the position of the target person to the center point of the display area of ​​the mobile client;

[0027] The process of moving the target person to the center point of the display area of ​​the mobile client is as follows:

[0028] Calculate the relative coordinate data (initX, initY) of the target person relative to the coordinate origin of the map image; wherein the map image takes the zero point in the upper left corner as the coordinate origin;

[0029] Acquire a touch event in the display area of ​​the mobile client, determine the image operation corresponding to the touch event, and calculate the total offset value and / or the total zoom value according to the image operation; wherein the image operation is a single-finger screen slide, a single-finger screen click, or a multi-finger screen zoom touch. For a single-finger screen slide, the screen slide distance between two touches is a single touch distance, and the total offset value is the accumulation of each touch distance; for a single-finger screen click or a multi-finger screen zoom touch, the total zoom value is the cumulative multiplication of each zoom value;

[0030] Based on the relative coordinate data (initX, initY), the total offset value and / or the total scaling value, and the coordinate data of the center point (width / 2, height / 2), the coordinate offset value of moving the position of the target person to the center point of the display area of ​​the mobile client is calculated.

[0031] Furthermore, it also includes:

[0032] Receive historical trajectory search information of the target person and determine the time period of the historical trajectory;

[0033] At a preset time interval, sequentially obtain a number of map images within the time period from the local resource library of the mobile client;

[0034] For each of the map images, respectively calculating the second coordinate data of the target person in the map image;

[0035] The second coordinate data are transformed in the order of the time period to form historical location information points in the historical trajectory picture loaded in the mobile client display area, and the historical location information points are connected to generate the historical trajectory of the target person; wherein, the historical trajectory picture is the map picture obtained last time within the time period.

[0036] Furthermore, it also includes:

[0037] For each target person who enters the map image, a corresponding personnel information column is established;

[0038] When the position of the target person is moved to the center point of the mobile client display area, the corresponding person information bar is synchronously displayed at the bottom of the mobile client display area.

[0039] In the second aspect, a personnel location map conversion system is proposed, comprising:

[0040] The calling acquisition module is used to call the backend service of the stereo fusion positioning system platform to obtain the map image resource address of the target area;

[0041] A request acquisition module, used to request the map image resource address, obtain the map image of the target area and store it in the local resource library of the mobile client;

[0042] A receiving loading module, used for receiving a request for viewing real-time monitoring of a target area, and loading a map image corresponding to the target area on a display area of ​​the mobile client based on the local resource library of the mobile client according to the request;

[0043] A push module, used to connect to the push service of the stereo fusion positioning system platform according to the webSocket communication protocol, so as to push the location information of personnel in the target area located by the platform to the requesting mobile client;

[0044] The calculation and display module is used to receive the personnel position information, perform coordinate conversion calculation, obtain the real-time position information of the personnel in the display area of ​​the mobile client, and display the corresponding position information in the display area of ​​the mobile client according to the real-time position information.

[0045] Furthermore, the receiving and loading module may include an execution unit for loading a map image corresponding to the target area on a display area of ​​the mobile client based on the local resource library of the mobile client according to the request, including:

[0046] A calculation and determination unit, used to calculate a first difference between a width of a map image and a width of a mobile client display area, and a second difference between a height of the map image and a height of the mobile client display area, determine a compression ratio of the map image according to a relationship between the first difference and the second difference, and display the compressed map image in the center of the mobile client display area;

[0047] The step of determining the compression ratio of the map image according to the relationship between the first difference and the second difference includes:

[0048] When the first difference is greater than the second difference, the map image compression ratio R is determined according to the map image height and the mobile client display area height, where R=mobile client display area height / map image height;

[0049] When the first difference is smaller than the second difference, the map image compression ratio R is determined according to the map image width and the mobile client display area width, where R=mobile client display area width / map image width;

[0050] When both the first difference and the second difference are not positive numbers, the map image compression ratio R=1.

[0051] Furthermore, the calculation and display module receives the personnel position information and performs coordinate conversion calculation to obtain the execution unit of the real-time position information of the personnel in the display area of ​​the mobile client, including:

[0052] An acquisition unit, used to acquire, according to the resolution of the map image, coordinate data of a positioning engine preset on the map image and a coordinate conversion ratio value using the coordinate data of the positioning engine as a relative coordinate origin;

[0053] A first calculation unit, configured to calculate a center offset value of the compressed map image displayed in the display area of ​​the mobile client according to a compression ratio of the map image;

[0054] A second calculation unit is used to receive personnel location information, the personnel location information is first coordinate data relative to the relative coordinate origin, and calculate second coordinate data of the personnel location information in the map image according to the first coordinate data, the coordinate data of the relative coordinate origin and the coordinate conversion ratio value; wherein the map image takes its upper left corner zero point as the coordinate origin;

[0055] The third calculation unit is used to calculate the real-time position information of the personnel on the display area of ​​the mobile client according to the second coordinate data, the compression ratio and the center offset value.

[0056] Furthermore, it also includes:

[0057] A receiving and moving module is used to receive a touch operation on a target person's head portrait or target person search information, determine the position of the target person in the map image, and move the position of the target person to the center point of the display area of ​​the mobile client;

[0058] The execution unit of the receiving mobile module moving the target person to the center point of the display area of ​​the mobile client includes:

[0059] A fourth calculation unit is used to calculate the relative coordinate data (initX, initY) of the target person relative to the coordinate origin of the map image; wherein the map image has its upper left corner zero point as the coordinate origin;

[0060] A fifth calculation unit is used to obtain a touch event of the display area of ​​the mobile client, determine the image operation corresponding to the touch event, and calculate the total offset value and / or the total zoom value according to the image operation; wherein the image operation is a single-finger screen slide, a single-finger screen click, or a multi-finger screen zoom touch. For a single-finger screen slide, the screen slide distance between two touches is a single touch distance, and the total offset value is the accumulation of each touch distance; for a single-finger screen click or a multi-finger screen zoom touch, the total zoom value is the cumulative multiplication of each zoom value;

[0061] The sixth calculation unit is used to calculate the coordinate offset value of moving the position of the target person to the center point of the display area of ​​the mobile client based on the relative coordinate data (initX, initY), the total offset value and / or the total scaling value, and the coordinate data of the center point (width / 2, height / 2).

[0062] In the third aspect, an electronic device is proposed, comprising a computer program, wherein the computer program is stored in a computer-readable storage medium; when a processor of the electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs the steps of the above-mentioned personnel location map conversion method.

[0063] It can be seen from the above technical solutions that the technical solutions of the present invention have the following beneficial effects:

[0064] The personnel positioning map conversion method and system disclosed in the present invention do not need to call the existing map SDK, and use the three-dimensional fusion positioning system platform to realize the viewing of the real-time position information of personnel in the target area on the mobile client, which can not only realize real-time monitoring and dangerous area alarm, but also realize the tracking of target personnel and the generation of historical trajectories; specifically, the scheme obtains map image resources from the three-dimensional fusion positioning system platform, and converts them into a map effect that can be displayed on the mobile client in real time through image scaling and coordinate conversion; that is, using a map image of the target area and the obtained coordinate point information, through calculation and drawing technology, accurately dotting and marking the position of personnel, so as to realize the accurate positioning of personnel on the map and the map-like effects such as gesture sliding and multi-touch zooming, display the real-time position information of personnel, and realize the map-like display effect of personnel trajectory.

[0065] In order to solve the problem of slow map loading and inability to view at any time of the three-dimensional fusion positioning system platform, the present invention caches the image resources obtained from the server to the local memory of the mobile phone, so that the mobile client does not need to obtain the image from the server and then load it each time it opens the map, thereby solving the problem of slow loading; at the same time, the mobile client, such as a mobile phone, is easy to carry and can be viewed at any time, thereby solving the problem of lack of timeliness and convenience of the three-dimensional fusion positioning system platform; in addition, the real-time location information of the factory personnel can be viewed through the mobile client, and if the personnel are in a dangerous area in the chemical plant area, real-time alarm information can also be generated to ensure the safety of the factory personnel.

[0066] It should be appreciated that all combinations of the foregoing concepts, as well as additional concepts described in greater detail below, may be considered to be part of the inventive subject matter of the present disclosure, provided such concepts are not mutually inconsistent.

[0067] The foregoing and other aspects, embodiments and features of the present invention can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as the features and / or beneficial effects of the exemplary embodiments, will be apparent from the following description or learned from the practice of the specific embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] The accompanying drawings are not drawn to scale according to actual reference objects. In the accompanying drawings, each identical or nearly identical component shown in various figures may be represented by the same reference numeral. For the sake of clarity, not every component is labeled in each figure. Now, embodiments of various aspects of the present invention will be described by way of example and with reference to the accompanying drawings, in which:

[0069] Figure 1 A flowchart of a personnel location map conversion method disclosed in the present invention;

[0070] Figure 2A flow chart of loading a map image in a display area of ​​a mobile client disclosed in the present invention;

[0071] Figure 3 A flowchart of the real-time location information of a computing personnel displayed on a mobile client in the present invention;

[0072] Figure 4 A flowchart of realizing synchronous sliding or zooming of a display area map picture disclosed in the present invention;

[0073] Figure 5 A flowchart of searching for a target person and moving to the center of viewing angle disclosed by the present invention;

[0074] Figure 6 The flowchart of obtaining the historical trajectory of the target person disclosed in the present invention;

[0075] Figure 7 It is a structural block diagram of the personnel positioning map conversion system disclosed in the present invention;

[0076] Figure 8 A structural block diagram of an electronic device is provided for the present invention. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be the common meanings understood by people with ordinary skills in the field to which the present invention belongs.

[0078] The words "first", "second" and similar words used in the patent application specification and claims of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, unless the context clearly indicates otherwise, the singular form of "a", "an" or "the" and other similar words do not indicate a quantitative limitation, but indicate the existence of at least one. "Include" or "comprise" and other similar words mean that the elements or objects appearing before "include" or "comprise" include the features, wholes, steps, operations, elements and / or components listed after "include" or "comprise", and do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0079] The three-dimensional fusion positioning system of the chemical plant as a platform lacks viewing convenience and timeliness, and the process of loading map images takes a long time; therefore, the present invention aims to address the problems existing on the platform side and propose a personnel positioning map conversion method and system, which uses a mobile client to view the map, and caches the image resources obtained from the server to the local memory, avoiding the slow loading problem caused by obtaining the image from the server and then loading it each time the map is opened, and the mobile client is more convenient to use.

[0080] The personnel location map conversion method and system disclosed in the present invention will be further specifically introduced below in conjunction with the accompanying drawings.

[0081] Combination Figure 1 As shown, the personnel location map conversion method disclosed in the embodiment of the present invention is mainly used to realize the viewing of the real-time location information of personnel in the chemical plant area on the mobile phone. The main functions include viewing real-time monitoring, viewing historical trajectories, viewing alarm information, etc.

[0082] Specifically, the method includes the following steps:

[0083] Step S102, calling the backend service of the stereo fusion positioning system platform to obtain the map image resource address of the target area;

[0084] Step S104, requesting the map image resource address, obtaining the map image of the target area and storing it in the local resource library of the mobile client;

[0085] Step S106, receiving a request for viewing real-time monitoring of a target area, and loading a map image corresponding to the target area on a display area of ​​the mobile client based on the local resource library of the mobile client according to the request;

[0086] Steps S102-S106 store the image resources that must be accessed from the server to enter the map page from the platform in advance to the local mobile client, so that each subsequent access to the monitoring page does not require loading images from the server; compared with the platform, the loading time of mobile clients, such as mobile phones, is significantly shortened, and in order to further improve the loading speed of map images, the png format map images obtained from the backend service are further converted into webp format and stored locally on the mobile phone. The speed of loading webp images is faster than that of png images, and the loading speed is significantly improved, with a loading time of less than 1s. In addition, mobile phones are easy to carry as mobile clients and can be viewed at any time, solving the problem of lack of timeliness and convenience on the platform side.

[0087] Step S108, connecting to the push service of the stereoscopic fusion positioning system platform according to the webSocket communication protocol to push the personnel location information within the target area positioned by the platform to the requesting mobile client;

[0088] Step S110, receiving the personnel location information and performing coordinate conversion calculation to obtain the real-time location information of the personnel in the display area of ​​the mobile client, and performing corresponding display in the display area of ​​the mobile client according to the real-time location information.

[0089] After the map image is loaded in the display area of ​​the mobile client, it is necessary to accurately locate the position of the person on the displayed map image. First, determine the location information of the person on the platform, and then use calculation and drawing technology to accurately mark the map image displayed in the display area.

[0090] and Figure 2 As shown, a map image pre-stored in a local resource library is displayed in a display area of ​​a mobile client in the following manner, wherein the process includes: step S1061, calculating a first difference between a width of the map image and a width of a display area of ​​the mobile client, and a second difference between a height of the map image and a height of the display area of ​​the mobile client, determining a compression ratio of the map image according to a relationship between the first difference and the second difference, and displaying the compressed map image in the center of the display area of ​​the mobile client;

[0091] Among them, the compression ratio of the map image is determined according to the relationship between the first difference and the second difference, including: when the first difference is greater than the second difference, the map image compression ratio R is determined according to the map image height and the mobile client display area height, R=mobile client display area height / map image height; when the first difference is less than the second difference, the map image compression ratio R is determined according to the map image width and the mobile client display area width, R=mobile client display area width / map image width; when both the first difference and the second difference are not positive numbers, the map image compression ratio R=1.

[0092] Then, the process of accurately locating the real-time location information of the personnel on the map image displayed in the display area is as follows: Figure 3As shown, it includes: step S1101, according to the resolution of the map image, obtaining the coordinate data of the positioning engine preset on the map image and the coordinate conversion ratio value with the coordinate data of the positioning engine as the relative coordinate origin; step S1102, according to the compression ratio of the map image, calculating the center offset value of the map image displayed in the display area of ​​the mobile client after compression; step S1103, receiving personnel location information, the personnel location information is the first coordinate data relative to the relative coordinate origin, according to the first coordinate data, the coordinate data of the relative coordinate origin and the coordinate conversion ratio value, calculating the second coordinate data of the personnel location information in the map image; wherein, the map image takes the zero point in the upper left corner as the coordinate origin; step S1104, according to the second coordinate data, the compression ratio and the center offset value, calculating the real-time location information of the personnel in the display area of ​​the mobile client.

[0093] For example, the resolution of the map image of the target area, i.e., the chemical plant area, is 9600*5400, the coordinate data of the positioning engine is (6294,4143), and the coordinate conversion ratio is 35.8, i.e., one pixel is equal to 35.8cm. The center offset value is calculated according to the compression ratio of the map image. Assuming that the first difference between the width of the map image and the width of the mobile client display area is greater than the second difference between the height of the map image and the height of the mobile client display area, the compression ratio R = mobile client display area map height / image height, and the center offset value after compression is (x-axis: mobile client display area width - map image width*R) / 2, Y-axis: 0).

[0094] For example, the personnel location information pushed from the positioning engine, that is, the first coordinate data is (100, -200), then the data needs to be divided by the coordinate conversion ratio value first, and then added to the coordinate data of the positioning engine as the relative coordinate origin, that is, (6294+100 / 35.8,4143+(-200 / 35.8)) is the second coordinate data of the person relative to the zero point in the upper left corner of the map image; according to the second coordinate data, the compression ratio and the center offset value, the process of calculating the real-time location information of the person in the display area of ​​the mobile client is to multiply the second coordinate data (6294+100 / 35.8,4143+(-200 / 35.8)) calculated initially relative to the zero point in the upper left corner of the map image by this compression ratio, and then add the middle offset value, which is the real-time location information of the person in the display area of ​​the mobile client.

[0095] like Figure 4As shown, in order to achieve a map-like effect on the map image displayed in the display area on the mobile client, that is, with the sliding of gestures and multi-touch zooming, the positions of the people on the map image should slide and zoom together with the map image, and the relative positions to the map should be fixed and immutable, the conversion method also includes: step S202, adding matrix attributes to the map image of the mobile client display area and the avatar images corresponding to all the people displayed on it, and the X-axis offset value, Y-axis offset value and corresponding zoom ratio value of each matrix attribute are assigned the same value, so that when sliding or touch-zooming the map image of the mobile client display area, the avatar images of all the people displayed in the map image can be synchronously slid or zoomed with the map image in the display area.

[0096] In addition, in order to facilitate the use of the map function on the mobile client, the personnel location map conversion method disclosed in the embodiment of the present invention can also automatically move the position of the personnel on the map to the center of the viewing angle when clicking on the personnel portrait or searching for the personnel; the implementation process of this function is as follows: Figure 5 As shown, it includes: step S302, receiving a touch operation on a target person's avatar or target person search information, determining the position of the target person in the map image, and moving the position of the target person to the center point of the mobile client display area; the process of moving the target person to the center point of the mobile client display area is: calculating the relative coordinate data (initX, initY) of the target person relative to the coordinate origin of the map image; wherein the map image takes the zero point in its upper left corner as the coordinate origin; obtaining a touch event in the mobile client display area, determining the image operation corresponding to the touch event, and calculating a total offset value and / or a total zoom value based on the image operation; wherein the image operation is a single-finger screen slide, a single-finger screen click, or a multi-finger screen zoom touch. For a single-finger screen slide, the screen slide distance between two touches is a single touch distance, and the total offset value is the accumulation of each touch distance, that is, The total offset value is (totalTranslateX, totalTranslateY); for single-finger screen click or multi-finger screen zoom touch, the total zoom value totalRadio is the cumulative multiplication of each zoom value; according to the relative coordinate data (initX, initY), the total offset value and / or the total zoom value, and the coordinate data of the center point (width / 2, height / 2), the coordinate offset value for moving the position of the target person to the center point of the mobile client display area is calculated, that is, (-totalTranslateX+width / 2-initX*totalRadio, -totalTranslateY+height / 2-initY*totalRadio), and then the target person is displayed at the center point of the mobile client display area according to the calculated coordinate offset value.

[0097] When the factory map image is displayed in the mobile client display area for real-time monitoring, the personnel location information and the number of personnel in the building can be displayed on the factory map; in order to further enhance the function of the map, through the above solution, that is, clicking on the personnel portrait or searching for related personnel, the personnel position can be locked and displayed in the center. Optionally, when the personnel position is displayed in the center, the relevant information of the personnel can be displayed synchronously; that is, for each target person entering the map image, a corresponding personnel information column is established respectively; when the position of the target person is moved to the center point of the mobile client display area, the corresponding personnel information column is synchronously displayed at the bottom of the mobile client display area.

[0098] As an optional implementation, the personnel location map conversion method disclosed in the present invention can also realize the function of generating historical tracks similar to the third-party map; specifically, Figure 6 As shown, it includes: step S402, receiving the historical trajectory search information of the target person, and determining the time period of the historical trajectory; step S404, sequentially obtaining a number of map images within the time period from the local resource library of the mobile client at a preset time interval; step S406, for each of the map images, respectively calculating the second coordinate data of the target person in the map image; step S408, transforming each of the second coordinate data into the historical trajectory image loaded in the display area of ​​the mobile client according to the sequence of the time period to form each historical position information point, and connecting each historical position information point to generate the historical trajectory of the target person; wherein, the historical trajectory image is the map image last obtained within the time period.

[0099] In the process of generating personnel historical trajectories, the map image and all the personnel portrait images therein should also be given the same matrix attributes to achieve gesture sliding and multi-touch zoom synchronization effects.

[0100] The personnel location map conversion method disclosed in the present invention displays personnel location information in real time on a map image of a target area. The location information is obtained in real time through a websocket and pushed to a mobile client. After the mobile client obtains the information, it uses the above-mentioned precise calculation method to mark the personnel location information on the map image displayed in the display area. Therefore, as the personnel move, the location information display is also mobile, which is real-time and accurate. The present invention does not call a third-party map SDK. By obtaining map image resources from the platform end and converting them into map effects that can be displayed by the mobile client in real time, it greatly facilitates the chemical plant to achieve personnel safety management.

[0101] In an embodiment of the present application, an electronic device is also provided, including a computer program, the computer program being stored in a computer-readable storage medium; when a processor of the electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the steps of the above-mentioned personnel location map conversion method. Taking an electronic device running on a computer as an example, Figure 8 As shown, the electronic device may include one or more (only one is shown in the figure) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, and a transmission device for communication functions. A person skilled in the art can understand that Figure 8 The structure shown is for illustration only and does not limit the structure of the above-mentioned electronic device.

[0102] The above program can be run in the processor, or it can be stored in the memory, that is, in the computer-readable medium, which includes permanent and non-permanent, removable and non-removable media. Information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include temporary computer-readable media, such as modulated data signals and carrier waves. These computer programs can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a block or multiple blocks may be implemented by different modules corresponding to different method steps.

[0103] In this embodiment, such a device or system is provided, which can be called a personnel location map conversion system. Figure 7As shown, it includes: a calling acquisition module, which is used to call the back-end service of the stereo fusion positioning system platform to obtain the map image resource address of the target area; a request acquisition module, which is used to request the map image resource address, obtain the map image of the target area and store it in the local resource library of the mobile client; a receiving loading module, which is used to receive a request for viewing the real-time monitoring of the target area, and load the map image corresponding to the target area on the display area of ​​the mobile client based on the local resource library of the mobile client according to the request; a push module, which is used to connect to the push service of the stereo fusion positioning system platform according to the webSocket communication protocol, so as to push the position information of the personnel in the target area located by the platform to the requesting mobile client; a calculation and display module, which is used to receive the personnel position information to perform coordinate conversion calculation, obtain the real-time position information of the personnel on the display area of ​​the mobile client, and display it accordingly on the display area of ​​the mobile client according to the real-time position information.

[0104] The steps of the method for converting the personnel location map disclosed in the above embodiment for implementing the system have been described and will not be repeated here.

[0105] For example, the receiving loading module is an execution unit that loads the map image corresponding to the target area on the mobile client display area based on the local resource library of the mobile client according to the request, including: a calculation and determination unit, which is used to calculate a first difference between the width of the map image and the width of the mobile client display area, and a second difference between the height of the map image and the height of the mobile client display area, determine the compression ratio of the map image according to the relationship between the first difference and the second difference, and display the compressed map image in the center of the mobile client display area;

[0106] Among them, the compression ratio of the map image is determined according to the relationship between the first difference and the second difference, including: when the first difference is greater than the second difference, the map image compression ratio R is determined according to the map image height and the mobile client display area height, R=mobile client display area height / map image height; when the first difference is less than the second difference, the map image compression ratio R is determined according to the map image width and the mobile client display area width, R=mobile client display area width / map image width; when both the first difference and the second difference are not positive numbers, the map image compression ratio R=1.

[0107] For another example, the personnel location map conversion system of the embodiment also includes: an additional module for adding matrix attributes to the map image of the mobile client display area and the avatar images corresponding to all the personnel displayed thereon, and the X-axis offset value, Y-axis offset value and corresponding zoom ratio value of each of the matrix attributes are assigned the same value, so as to realize that when the map image of the mobile client display area is slid or touched to zoom, the avatar images of all the personnel displayed in the map image can be synchronously slid or zoomed with the map image in the display area.

[0108] For another example, the calculation and display module receives the personnel location information, performs coordinate conversion calculation, and obtains the execution unit of the real-time location information of the personnel in the display area of ​​the mobile client, including: an acquisition unit, which is used to acquire the coordinate data of the positioning engine preset on the map image and the coordinate conversion ratio value with the coordinate data of the positioning engine as the relative coordinate origin according to the resolution of the map image; a first calculation unit, which is used to calculate the center offset value of the map image displayed in the display area of ​​the mobile client after compression according to the compression ratio of the map image; a second calculation unit, which is used to receive the personnel location information, the personnel location information is the first coordinate data relative to the relative coordinate origin, and calculates the second coordinate data of the personnel location information in the map image according to the first coordinate data, the coordinate data of the relative coordinate origin and the coordinate conversion ratio value; wherein the map image uses the zero point in its upper left corner as the coordinate origin; a third calculation unit, which is used to calculate the real-time location information of the personnel in the display area of ​​the mobile client according to the second coordinate data, the compression ratio and the center offset value.

[0109] For another example, the personnel positioning map conversion system of the embodiment also includes: a receiving movement module, which is used to receive a touch operation on the target person's head portrait or target person search information, determine the position of the target person in the map image, and move the position of the target person to the center point of the display area of ​​the mobile client; the execution unit of the receiving movement module to move the target person to the center point of the display area of ​​the mobile client includes: a fourth calculation unit, which is used to calculate the relative coordinate data (initX, initY) of the target person relative to the coordinate origin of the map image; wherein the map image takes the zero point in its upper left corner as the coordinate origin; a fifth calculation unit, which is used to obtain a touch event in the display area of ​​the mobile client, and determine the touch event corresponding to the touch event. image operation, and calculate the total offset value and / or the total zoom value according to the image operation; wherein, the image operation is single-finger screen sliding, single-finger screen clicking or multi-finger screen zooming touch, for single-finger screen sliding, the screen sliding distance between two touches is the single touch distance, and the total offset value is the accumulation of each touch distance; for single-finger screen clicking or multi-finger screen zooming touch, the total zoom value is the cumulative multiplication of each zoom value; the sixth calculation unit is used to calculate the coordinate offset value of moving the position of the target person to the center point of the display area of ​​the mobile client according to the relative coordinate data (initX, initY), the total offset value and / or the total zoom value, and the coordinate data of the center point (width / 2, height / 2).

[0110] The above-mentioned receiving and moving module achieves the technical effect of moving the position of the target person on the map to the center of the viewing angle. Therefore, in order to further facilitate the viewing of real-time monitoring, while displaying the target person to the center of the viewing angle, the personnel-related information is displayed at the bottom of the display area; that is, the personnel positioning map conversion system also includes: an establishment module, which is used to establish a corresponding personnel information column for each target person entering the map image; a synchronous display module, which is used to move the position of the target person to the center point of the mobile client display area, and synchronously display the corresponding personnel information column at the bottom of the mobile client display area.

[0111] For another example, the personnel positioning map conversion system of the embodiment also includes: a receiving and determining module, which is used to receive the historical trajectory search information of the target personnel and determine the time period of the historical trajectory; a picture acquisition module, which is used to sequentially acquire a number of map pictures within the time period from the local resource library of the mobile client at a preset time interval; a coordinate calculation module, which is used to calculate the second coordinate data of the target personnel in the map picture for each of the map pictures; a transformation and connection module, which is used to transform each of the second coordinate data into the historical trajectory picture loaded in the display area of ​​the mobile client in the order of the time period to form each historical position information point, and connect each historical position information point to generate the historical trajectory of the target personnel; wherein, the historical trajectory picture is the map picture acquired last time within the time period.

[0112] Compared with the existing three-dimensional fusion positioning system platform, which has the technical problems of not being able to efficiently load map images and not being able to view them at any time, the personnel positioning map conversion method and system disclosed in the present invention access the platform server in advance to cache the map images locally on the mobile client, and then directly extract and load them from the cache when viewing, which greatly saves the image loading time; in addition, through calculation and drawing technology, the platform's map images are converted into software that can be viewed and used on the mobile client, and the software realizes the precise positioning of personnel on the map and the technical effects of map-like effects such as gesture sliding and multi-touch zooming.

[0113] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. A person with ordinary knowledge in the technical field to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.

Claims

1. A personnel location map conversion method, characterized in that: include: Call the backend service of the stereo fusion positioning system platform to obtain the map image resource address of the target area; Request the map image resource address, obtain the map image of the target area and store it in the local resource library of the mobile client; Receiving a request for viewing real-time monitoring of a target area, and loading a map image corresponding to the target area on a display area of ​​the mobile client based on the local resource library of the mobile client according to the request; Connecting to the push service of the stereoscopic fusion positioning system platform according to the webSocket communication protocol to push the location information of personnel in the target area located by the platform to the requesting mobile client; The personnel position information is received to perform coordinate conversion calculation, to obtain the real-time position information of the personnel on the display area of ​​the mobile client, and to perform corresponding display on the display area of ​​the mobile client according to the real-time position information.

2. The personnel location map conversion method according to claim 1, characterized in that: The process of loading the map image corresponding to the target area on the display area of ​​the mobile client based on the local resource library of the mobile client according to the request includes: Calculate a first difference between the width of the map image and the width of the mobile client display area, and a second difference between the height of the map image and the height of the mobile client display area, determine a compression ratio of the map image according to the relationship between the first difference and the second difference, and display the compressed map image in the center of the mobile client display area; The step of determining the compression ratio of the map image according to the relationship between the first difference and the second difference includes: When the first difference is greater than the second difference, the map image compression ratio R is determined according to the map image height and the mobile client display area height, where R=mobile client display area height / map image height; When the first difference is smaller than the second difference, the map image compression ratio R is determined according to the map image width and the mobile client display area width, where R=mobile client display area width / map image width; When both the first difference and the second difference are not positive numbers, the map image compression ratio R=1.

3. The personnel location map conversion method according to claim 2, characterized in that: The process of receiving the personnel position information, performing coordinate conversion calculation, and obtaining the real-time position information of the personnel on the display area of ​​the mobile client includes: According to the resolution of the map image, the coordinate data of the positioning engine preset on the map image and the coordinate conversion ratio value using the coordinate data of the positioning engine as the relative coordinate origin are obtained; Calculating a center offset value of the compressed map image in the display area of ​​the mobile client according to the compression ratio of the map image; Receive personnel location information, the personnel location information being first coordinate data relative to the relative coordinate origin, and calculate second coordinate data of the personnel location information on the map image according to the first coordinate data, the coordinate data of the relative coordinate origin, and a coordinate conversion ratio value; wherein the map image has its upper left corner zero point as the coordinate origin; The real-time position information of the person on the display area of ​​the mobile client is calculated based on the second coordinate data, the compression ratio and the center offset value.

4. The personnel location map conversion method according to claim 1, characterized in that: Also includes: Matrix attributes are added to the map image of the mobile client display area and the avatar images corresponding to all the people displayed on it, and the X-axis offset value, Y-axis offset value and corresponding zoom ratio value of each matrix attribute are assigned the same value, so that when the map image of the mobile client display area is slid or touched to zoom, the avatar images of all the people displayed in the map image can be synchronously slid or zoomed with the map image in the display area.

5. The personnel location map conversion method according to claim 1, characterized in that: Also includes: Receiving a touch operation on a target person's head portrait or target person search information, determining the position of the target person in the map image, and moving the position of the target person to the center point of the display area of ​​the mobile client; The process of moving the target person to the center point of the display area of ​​the mobile client is as follows: Calculate the relative coordinate data (initX, initY) of the target person relative to the coordinate origin of the map image; wherein the map image takes the zero point in the upper left corner as the coordinate origin; Acquire a touch event in the display area of ​​the mobile client, determine the image operation corresponding to the touch event, and calculate the total offset value and / or the total zoom value according to the image operation; wherein the image operation is a single-finger screen slide, a single-finger screen click, or a multi-finger screen zoom touch. For a single-finger screen slide, the screen slide distance between two touches is a single touch distance, and the total offset value is the accumulation of each touch distance; for a single-finger screen click or a multi-finger screen zoom touch, the total zoom value is the cumulative multiplication of each zoom value; Based on the relative coordinate data (initX, initY), the total offset value and / or the total scaling value, and the coordinate data of the center point (width / 2, height / 2), the coordinate offset value of moving the position of the target person to the center point of the display area of ​​the mobile client is calculated.

6. The personnel location map conversion method according to claim 3, characterized in that: Also includes: Receive historical trajectory search information of the target person and determine the time period of the historical trajectory; At a preset time interval, sequentially obtain a number of map images within the time period from the local resource library of the mobile client; For each of the map images, respectively calculating the second coordinate data of the target person in the map image; The second coordinate data are transformed in the order of the time period to form historical location information points in the historical trajectory picture loaded in the mobile client display area, and the historical location information points are connected to generate the historical trajectory of the target person; wherein, the historical trajectory picture is the map picture obtained last time within the time period.

7. The personnel location map conversion method according to claim 5, characterized in that: Also includes: For each target person who enters the map image, a corresponding personnel information column is established; When the position of the target person is moved to the center point of the mobile client display area, the corresponding person information bar is synchronously displayed at the bottom of the mobile client display area.

8. A personnel location map conversion system, characterized in that: include: The calling acquisition module is used to call the backend service of the stereo fusion positioning system platform to obtain the map image resource address of the target area; A request acquisition module, used to request the map image resource address, obtain the map image of the target area and store it in the local resource library of the mobile client; A receiving loading module, used for receiving a request for viewing real-time monitoring of a target area, and loading a map image corresponding to the target area on a display area of ​​the mobile client based on the local resource library of the mobile client according to the request; A push module, used to connect to the push service of the stereo fusion positioning system platform according to the webSocket communication protocol, so as to push the location information of personnel in the target area located by the platform to the requesting mobile client; The calculation and display module is used to receive the personnel position information, perform coordinate conversion calculation, obtain the real-time position information of the personnel in the display area of ​​the mobile client, and display the corresponding position information in the display area of ​​the mobile client according to the real-time position information.

9. The personnel location map conversion system according to claim 8, characterized in that: The receiving and loading module includes an execution unit for loading a map image corresponding to the target area on a display area of ​​the mobile client based on the local resource library of the mobile client according to the request, including: A calculation and determination unit, used to calculate a first difference between a width of a map image and a width of a mobile client display area, and a second difference between a height of the map image and a height of the mobile client display area, determine a compression ratio of the map image according to a relationship between the first difference and the second difference, and display the compressed map image in the center of the mobile client display area; The step of determining the compression ratio of the map image according to the relationship between the first difference and the second difference includes: When the first difference is greater than the second difference, the map image compression ratio R is determined according to the map image height and the mobile client display area height, where R=mobile client display area height / map image height; When the first difference is smaller than the second difference, the map image compression ratio R is determined according to the map image width and the mobile client display area width, where R=mobile client display area width / map image width; When both the first difference and the second difference are not positive numbers, the map image compression ratio R=1.

10. An electronic device, characterized in that: It includes a computer program, which is stored in a computer-readable storage medium; when the processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs the steps of the personnel location map conversion method described in any one of claims 1-7.