Factory mobile terminal positioning and alarming method and system based on modern communication and geographic information technology
By using modern communication and geographic information technologies, the system can monitor and store employee locations in real time and generate automatic alarms, solving the problems of inaccurate location tracking and untimely alarms in traditional security systems, and improving the safety and management efficiency of industrial plants.
Patent Information
- Application Number
- CN202411350488.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-10
AI Technical Summary
Traditional security and production management methods have significant shortcomings in real-time location tracking, hazardous area setting, problem reporting, and map positioning. They cannot effectively monitor employee locations, lack automatic alarm functions, and thus increase safety risks and reduce management efficiency.
By employing modern communication and geographic information technologies, the system inputs worker information, sets up electronic fences, monitors and stores location data in real time, generates alarms for boundary crossings and dangerous areas, uses the WebSocket protocol to notify administrators in real time, and stores the data in a database.
It enables dynamic tracking and precise management of employee locations, improves safety response speed and management efficiency, reduces manual intervention, provides intuitive map positioning and information management, and ensures the timeliness and accuracy of information transmission.
Smart Images

Figure CN119296275A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method for positioning and alarming a mobile terminal in a factory based on modern communications and geographic information technology. Background Art
[0002] Since the beginning of the 21st century, my country's economy has entered an era of rapid development. At the same time, various industries have also achieved unprecedented development. Among them, the rapid development of industry is particularly prominent. In order to meet the daily security and production work of the factory, the number and types of work of front-line practitioners in industrial plants have also continued to increase and improve. This makes it particularly important to know the real-time location of the corresponding practitioners and report any problems found in security and production operations.
[0003] First, the traditional method cannot effectively set the range of activities of the corresponding personnel. This means that it is impossible to monitor and limit the activity areas of employees in real time, which may cause employees to enter unauthorized areas or neglect important safety regulations. Secondly, the traditional system lacks the function of clearly setting dangerous areas, making it difficult to identify and manage dangerous areas. Without effective dangerous area restrictions, employees may mistakenly enter these dangerous areas, increasing the risk of accidents.
[0004] In addition, the process of uploading alarms after discovering a problem is cumbersome. Traditional methods usually require employees to manually edit text reports, which is not only time-consuming and labor-intensive, but also prone to errors, increasing management complexity. Alarm uploads lack an effective map positioning function, which requires administrators to do extra work to confirm the alarm location. This secondary confirmation process not only wastes time, but also reduces the efficiency of handling emergency situations.
[0005] In summary, traditional security and production management methods have significant deficiencies in real-time location tracking, dangerous area setting, problem reporting and map positioning. These problems urgently need to be solved through more advanced technologies and systems to improve the safety and management efficiency of industrial plants. Summary of the invention
[0006] Aiming at the problem that traditional security and production management methods have significant deficiencies in real-time location tracking, dangerous area setting, problem reporting and map positioning, the present invention proposes a method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology, the method comprising:
[0007] S1: Enter the attributes and department information of the operator, and set the electronic fences for entry and exit;
[0008] S2: Load the real-time location information of the mobile terminal of the on-site personnel into a container and store it in a database;
[0009] S3: Determine the current area of the person based on the real-time location information;
[0010] S4: When a person is outside the specified area, the person is prompted to leave the specified area name, and an alarm is generated and forwarded to the administrator at the same level and the upper level, and the out-of-bounds alarm information is stored in the database;
[0011] S6: When a person is in a dangerous area, the name of the dangerous area that the person has entered is prompted, and an alarm is generated and forwarded to the administrator at the same level and the upper level, and the danger alarm information is stored in the database; a consumer timing thread is set to send the location in the container to the corresponding administrator in a 5s period.
[0012] Furthermore, a preferred method is proposed, wherein step S1 comprises:
[0013] Enter the attributes of the on-site workers into the platform. The attributes include: name, work number and type;
[0014] Enter departments and set up hierarchical relationships;
[0015] Set up administrators in each department;
[0016] Access the organizational structure management module, select the person to be attached from the personnel list, assign the department to which the selected person belongs, and set the department to which the person belongs as the corresponding department primary key;
[0017] Set up no-entry and no-exit electronic fences and define the fence shape. The number of vertices of the polygon should be less than 10.
[0018] Furthermore, a preferred method is proposed, wherein step S2 comprises:
[0019] The mobile terminal uses GPS to obtain the current longitude, latitude, speed and heading data;
[0020] Format the obtained location information as a JSON object;
[0021] Send JSON data to the server interface via HTTP POST method;
[0022] Set the person's primary key in the request header, and the server listens and receives HTTP requests;
[0023] Extract the person's primary key from the request header and read the JSON data in the request body;
[0024] Use a JSON parser to convert JSON data into actionable objects;
[0025] Extract the longitude, latitude, speed and heading from the JSON object;
[0026] Store the data information in the JSON object in the database.
[0027] Furthermore, a preferred method is proposed, wherein step S3 comprises:
[0028] If the person's location is outside the specified area, an out-of-bounds alarm is triggered;
[0029] Generate a JSON object containing longitude, latitude, and time information based on the out-of-bounds event:
[0030] Establish a WebSocket connection to the WebSocket server of the management system;
[0031] The generated WebSocket server will receive this alarm message and forward it to the immediate and superior administrators as needed. The JSON object is sent to the management system address via WebSocket.
[0032] Furthermore, a preferred method is proposed, wherein step S4 comprises:
[0033] Get the latitude and longitude information of the person's current location, as well as the polygon vertex data of the electronic fence;
[0034] Determine whether the point is within the polygon;
[0035] If the point is determined to be within the polygon, an alarm message in JSON format is created;
[0036] The generated JSON alarm information is sent to the direct and superior administrators via the WebSocket protocol.
[0037] Furthermore, a preferred method is proposed, wherein the determining whether the point is within the polygon includes:
[0038] Determine whether the personnel point is located at the vertex of the polygon. If the point is located at the vertex, it is considered to be inside the polygon;
[0039] Connect the adjacent vertices of the polygon. If the personnel point is on the connecting line, it is considered that the point is inside the polygon.
[0040] Draw a ray in any direction from the personnel point. If the number of intersection points is odd, the point is considered to be inside the polygon; if the number of intersection points is even, the point is considered to be outside the polygon.
[0041] Furthermore, a preferred embodiment is proposed, wherein the method further comprises:
[0042] Record alarm video on mobile terminal;
[0043] Record the location information of the mobile terminal, including longitude, latitude and the primary key of the person;
[0044] The mobile terminal sends the alarm data to the server in the form of a form, and the personnel primary key is passed through the request header;
[0045] The server receives the form data, parses the longitude, latitude, video file and personnel primary key; packages the alarm information into JSON format, and forwards it to the immediate and superior administrators in real time through the WebSocket protocol;
[0046] The server stores the alarm information in the database.
[0047] Based on the same inventive concept, the present invention also proposes a mobile terminal positioning and alarm system for a factory area based on modern communication and geographic information technology, the system comprising:
[0048] Information entry unit, used to enter the attributes and department information of operators, and set up electronic fences for entry and exit;
[0049] A location information acquisition unit, used to load the real-time location information of the mobile terminal of the on-site personnel into a container and store it in a database;
[0050] A location determination unit, used to determine the current location of a person based on real-time location information;
[0051] The out-of-bounds alarm unit is used to remind the person that he / she has left the specified area when he / she is outside the specified area, and to generate an alarm and forward it to the administrator at the same level and the upper level, and store the out-of-bounds alarm information in the database;
[0052] The danger alarm unit is used to prompt the name of the danger zone that a person has entered when the person is in the danger zone, and to generate an alarm and forward it to the administrator at the same level and the upper level, and store the danger alarm information in the database; set the consumer timing thread to send the location in the container to the corresponding administrator in a 5s cycle.
[0053] Based on the same inventive concept, the present invention also proposes a computer device, including a memory and a processor, wherein the memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes a method for mobile terminal positioning and alarm in a factory area based on modern communication and geographic information technology as described above.
[0054] Based on the same inventive concept, the present invention also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the steps of a method for mobile terminal positioning and alarm in a factory area based on modern communication and geographic information technology as described in any of the above items are executed.
[0055] The present invention is beneficial in that:
[0056] 1. Traditional security systems often rely on static monitoring equipment and manual inspections, which results in inaccurate real-time location tracking and the inability to obtain the dynamic location of personnel in real time, thus affecting the effectiveness of personnel safety and regional management. The method proposed in the present invention realizes dynamic tracking of personnel by collecting the location data of the mobile terminal of the operator in real time and storing it in the database. By using modern communication technology and geographic information system (GIS), the location of personnel can be updated and monitored in real time, thereby improving the accuracy and efficiency of real-time tracking.
[0057] 2. The traditional system cannot dynamically set and adjust the danger zone, and it is difficult to achieve automatic alarm and real-time notification, which makes it difficult to respond in time when people enter the danger zone. The method proposed in the present invention realizes the dynamic management of the danger zone by setting electronic fences and danger zones. When a person enters the danger zone, the system will automatically generate an alarm and notify the administrators at the same level and the superior in real time. This automated alarm system significantly improves the response speed and processing efficiency to dangerous situations.
[0058] 3. The traditional reporting mechanism relies on manual operation, resulting in untimely information transmission. Especially in emergency situations, information delay may lead to serious consequences. The method proposed in the present invention automatically generates an alarm and forwards it to the administrators at the same level and the upper level when a person crosses the boundary or enters a dangerous area, and stores the alarm information in the database. This automated processing method not only improves the speed and accuracy of information transmission, but also reduces the need for manual intervention, thereby improving overall management efficiency.
[0059] 4. Traditional methods have problems of dispersion and inefficiency in map positioning and information integration, which makes it difficult for managers to quickly obtain global information. The method proposed in this invention combines geographic information technology, combines real-time location information with electronic maps, and provides intuitive map positioning and information management. By loading location data into containers and storing them in databases, managers can more easily access and analyze location information and conduct effective regional management and personnel monitoring.
[0060] 5. In the present invention, the administrator supervises the real-time location of the on-site personnel, and chooses to use the "producer + consumer" method, that is, the real-time location sent by the mobile terminal is stored in the corresponding container according to the user's authority, and the timing thread pushes the location data of the online personnel in the container to the corresponding administrator according to the authority. This greatly reduces the front-end overhead. In addition, the location of the on-site personnel is pushed according to the authority, and the administrator of each authority will only receive the real-time location of the personnel of this department and subordinate departments. If a certain on-site personnel leaves the designated area, the system will immediately notify him of the name of the specified area to which he belongs, and form an alarm forwarding to the administrator at this level and the superior. Similarly, if a certain on-site personnel enters the alarm area, the system will immediately notify him of the name of the dangerous area he entered, and form an alarm forwarding to the administrator at this level and the superior. The corresponding alarm record will be stored in the database, and historical inquiries can be performed if necessary. Similarly, the historical location of the on-site personnel will also be persistently saved in the database, which is convenient for viewing the historical trajectory of the corresponding personnel.
[0061] 6. In response to sudden alarms on site, the present invention can use video recording to describe the alarm. This greatly reduces the description time of the alarm and improves efficiency, while also making the on-site situation briefly and clearly explained effectively. While uploading the video, the mobile terminal also uploads its longitude and latitude and the primary key of the on-site personnel. In forwarding the alarm, it will also be forwarded to the corresponding administrator according to the department where the personnel is located. The administrator can make corresponding processing based on the "alarm personnel", "alarm location" and "alarm video". The corresponding alarm records will be persistently saved in the database to view historical alarms. All forwarding administrator operations use the WebSocket protocol, which can greatly reduce the pressure of front-end polling and enhance real-time performance.
[0062] The invention is applicable to the industrial field. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a flow chart of a method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology as described in implementation mode 1;
[0064] Figure 2 This is a flowchart of real-time location forwarding described in implementation mode three;
[0065] Figure 3 This is a flowchart of the alarm upload and forwarding administrator process described in Implementation Mode 7. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0067] Implementation method 1, see Figure 1 This embodiment describes a method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology, and the method includes:
[0068] S1: Enter the attributes and department information of the operator, and set the electronic fences for entry and exit;
[0069] S2: Load the real-time location information of the mobile terminal of the on-site personnel into a container and store it in a database;
[0070] S3: Determine the current area of the person based on the real-time location information;
[0071] S4: When a person is outside the specified area, the person is prompted to leave the specified area name, and an alarm is generated and forwarded to the administrator at the same level and the upper level, and the out-of-bounds alarm information is stored in the database;
[0072] S6: When a person is in a dangerous area, the name of the dangerous area that the person has entered is prompted, and an alarm is forwarded to the administrator at the same level and the upper level, and the danger alarm information is stored in the database; a consumer timing thread is set to send the location in the container to the corresponding administrator in a 5s cycle. Specifically:
[0073] The real-time location of personnel in the corresponding department is forwarded to the corresponding administrator in the form of JSON based on the authority through the WebSocket protocol. The format of JSON is as follows:
[0074] {"Command":40000,
[0075] position:[{"longitude":125.145769,"latitude":46.559629,"speed":0.47,"azimuth":207.52,
[0076] "name":zns,"userId":0}...]}
[0077] Command: Command code 40000 is the real-time location of the mobile terminal, position: the real-time location set of the mobile terminal,
[0078] longitude: longitude, latitude: latitude, speed: speed, azimuth: direction, name: name of the mobile terminal holder, userId: primary key of the mobile terminal holder.
[0079] In actual applications, frontline operators are entered separately according to their departments, so that administrators of different departments can view the current location and historical movement trajectory of the corresponding on-site personnel. In addition, on-site personnel will also be displayed in the form of a directory tree according to their organizational structure, so that different departments can manage the personnel under their own authority. Moreover, historical locations and alarm information will be persistently stored in the database, making it easy to view their historical records.
[0080] Specifically, the method described in this embodiment enters the attributes and department information of the operating personnel into the platform in the early stage to ensure that the roles and responsibilities of each employee are accurately recorded. According to the safety requirements of the factory area, electronic fences are set, and these fences include forbidden entry and forbidden exit areas. The forbidden entry fence is a set area where entry is prohibited, such as a dangerous area or a high-risk area; the forbidden exit fence is a range that allows activities in a specific area but is not allowed to exceed. Through mobile devices, the platform continuously obtains and updates the real-time location information of on-site personnel. This information is loaded into a container and stored in a database to ensure the security and integrity of the data. The platform determines the current specific location of the personnel based on the real-time location information. The location data is compared with the pre-set electronic fence data to determine whether the personnel is in the specified area. When the personnel moves outside the specified area, the platform will automatically prompt the employee that he has left the specified area. At the same time, the cross-border alarm information is generated and forwarded to the administrators at this level and the superior. This information is also stored in the database for subsequent review and recording. If the personnel enters the dangerous area, the platform will prompt that they have entered the designated dangerous area and generate an alarm message. These alarm messages will be forwarded to the administrators at the same level and above. At the same time, the location information will also be sent to the corresponding administrators to ensure that possible safety hazards are dealt with in a timely manner.
[0081] The method proposed in this embodiment enables managers to instantly understand the location information of each employee through the update of real-time location information and the storage of the database, thereby improving the monitoring capability and response speed of the factory area. The platform can automatically identify and alarm without manual intervention, thereby reducing human errors and delays. The automatic alarm function enables safety issues to be handled quickly and improves the efficiency of safety management. By setting up no-entry and no-exit electronic fences, managers can accurately control dangerous areas and activity ranges, reduce the risk of employees mistakenly entering dangerous areas, and enhance safety protection. All alarm information and location information are stored in the database, providing detailed data support for subsequent analysis. This enables managers to trace and analyze historical data to improve safety management measures. Real-time prompts and alarm functions can help employees correct their behavior in a timely manner and avoid entering dangerous areas, thereby improving the overall work safety and the safety level of the production environment.
[0082] The method proposed in this implementation mode selects the "producer + consumer" method in the administrator's supervision of the real-time location of the on-site personnel, that is, the real-time location sent by the mobile terminal is stored in the corresponding container according to the user's authority, and the timing thread pushes the location data of the online personnel in the container to the corresponding administrator according to the authority. This greatly reduces the front-end overhead. Moreover, the location of the on-site personnel is pushed according to the authority, and the administrator of each authority will only receive the real-time location of the personnel of the department and subordinate departments. If a field personnel leaves the designated area, the system will immediately notify him of the name of the specified area to which he belongs, and form an alarm forwarding to the administrator at this level and the superior. Similarly, if a field personnel enters the alarm area, the system will immediately notify him of the name of the dangerous area he entered, and form an alarm forwarding to the administrator at this level and the superior. The corresponding alarm record will be stored in the database, and historical queries can be performed if necessary. Similarly, the historical location of the on-site personnel will also be persistently saved in the database, which is convenient for viewing the historical trajectory of the corresponding personnel.
[0083] Implementation method 2: This implementation method is a further limitation of the method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology described in implementation method 1. Step S1 includes:
[0084] Enter the attributes of the on-site workers into the platform. The attributes include: name, work number and type;
[0085] Enter departments and set up hierarchical relationships;
[0086] Set up administrators in each department;
[0087] Access the organizational structure management module, select the person to be attached from the personnel list, assign the department to which the selected person belongs, and set the department to which the person belongs as the corresponding department primary key;
[0088] Set up no-entry and no-exit electronic fences and define the fence shape. The number of vertices of the polygon should be less than 10.
[0089] In this implementation, by entering personnel attributes (such as name, work number and type) and setting up departments and superior-subordinate relationships, personnel management is made more systematic and easy to identify and manage quickly. Setting up department administrators and clarifying department primary keys helps to achieve effective authority control and ensure that only authorized personnel can manage or view relevant information. The electronic fence has no-entry and no-exit settings, and the fence shape is defined as a polygon (the number of vertices is less than 10), allowing accurate geographic fence settings for the factory area, which can more flexibly adapt to the actual conditions of different factory areas and enhance safety. Combined with modern communication technology, it can monitor the location of personnel in real time, and promptly alarm when no-entry or no-exit situations occur, thereby improving the safety and prevention capabilities of the factory area.
[0090] Implementation method three, see Figure 2 This embodiment is a further limitation of the method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology as described in the first embodiment. Step S2 includes:
[0091] The mobile terminal uses GPS to obtain the current longitude, latitude, speed and heading data;
[0092] Format the obtained location information as a JSON object;
[0093] Send JSON data to the server interface via HTTP POST method;
[0094] Set the person's primary key in the request header, and the server listens and receives HTTP requests;
[0095] Extract the person's primary key from the request header and read the JSON data in the request body;
[0096] Use a JSON parser to convert JSON data into actionable objects;
[0097] Extract the longitude, latitude, speed and heading from the JSON object;
[0098] Store the data information in the JSON object in the database.
[0099] In this implementation, the location information is edited in JSON as follows:
[0100] {"longitude":125.145769,"latitude":46.559629,"speed":0.47,"azimuth":207.52}
[0101] longitude: longitude, latitude: latitude, speed: speed, azimuth: direction.
[0102] The real-time location information forwarding process includes:
[0103] Step 1: Get the real-time location of all personnel in the container;
[0104] Step 2: Determine whether there is data in the container;
[0105] Step 3: If there is no data, ignore this transmission;
[0106] Step 4: If there is data, determine whether the person is offline;
[0107] Step 5: If a person is offline, ignore sending the person's location data;
[0108] Step 6: If the person is online, send the location data of all persons with this permission.
[0109] In this embodiment, the location information (longitude, latitude, speed and heading) obtained by GPS is formatted as a JSON object, which is convenient for cross-platform data exchange and processing, and improves the efficiency and compatibility of data transmission. The HTTP POST method is used to send JSON data to the server interface, and the integrity and security of the data are ensured. The personnel primary key is set in the request header so that the server can quickly identify and associate each piece of data with a specific person. This method improves the accuracy of data management and simplifies the data retrieval and analysis process. The server side uses a JSON parser to convert JSON data into an operable object so that the data can be further processed, analyzed and stored by the system. The location information is extracted and stored in the database to ensure the persistence and queryability of the data. This can support subsequent query, analysis and alarm operations.
[0110] Embodiment 4: This embodiment further limits the method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology described in Embodiment 1. Step S3 includes:
[0111] If the person's location is outside the specified area, an out-of-bounds alarm is triggered;
[0112] Generate a JSON object containing longitude, latitude, and time information based on the out-of-bounds event:
[0113] Establish a WebSocket connection to the WebSocket server of the management system;
[0114] The generated WebSocket server will receive this alarm message and forward it to the immediate and superior administrators as needed. The JSON object is sent to the management system address via WebSocket.
[0115] The JSON format is as follows:
[0116] {"Command":60000,
[0117] "longitude":125.145769,"latitude":46.559629,"dateTime":"2022-08-0119:20:03",
[0118] "wallName":"test","wallId":"58811d33c37f49e09d1c21","name":zns,"userId":0}
[0119] Command: Command code 60000 is the mobile terminal out-of-bounds alarm, longitude: alarm longitude, latitude: alarm latitude, dateTime: alarm time, wallName: fence name, wallId: fence primary key, name: mobile terminal holder name, userId: mobile terminal holder primary key.
[0120] In this embodiment, real-time data transmission is achieved by establishing a WebSocket connection. Unlike traditional HTTP requests, WebSocket provides two-way communication capabilities, so that alarm messages can be pushed to the platform instantly without frequent polling, significantly reducing latency and improving response speed. Once a person crosses the border, the platform will immediately generate and send a JSON object containing longitude, latitude, and time information. This instant processing ensures that cross-border alarms can be quickly received and processed, improving the timeliness and efficiency of accident response. Continuing to use JSON format to transmit data maintains data consistency and standardization, which facilitates data parsing and subsequent processing. The alarm message is sent to the management system via WebSocket and forwarded to direct and superior administrators as needed. This hierarchical management method ensures that relevant personnel can obtain alarm information in a timely manner and take appropriate actions, improving the efficiency of event handling.
[0121] Implementation mode 5: This implementation mode further limits the method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology described in implementation mode 1. Step S4 includes:
[0122] Get the latitude and longitude information of the person's current location, as well as the polygon vertex data of the electronic fence;
[0123] Determine whether the point is within the polygon;
[0124] If the point is determined to be within the polygon, an alarm message in JSON format is created;
[0125] The generated JSON alarm information is sent to the direct and superior administrators via the WebSocket protocol.
[0126] Specifically, the JSON format is as follows:
[0127] {"Command":50000,
[0128] "longitude":125.145769,"latitude":46.559629,"dateTime":"2022-08-0119:20:03",
[0129] "wallName":"test","wallId":"58811d33c37f49e09d1c21","name":zns,"userId":0}
[0130] Command: Command code 50000 is the mobile terminal entry ban alarm, longitude: alarm longitude, latitude: alarm latitude, dateTime: alarm time, wallName: fence name, wallId: fence primary key, name: mobile terminal holder name, userId: mobile terminal holder primary key.
[0131] In this embodiment, polygon vertex data is used to define an electronic fence to achieve accurate monitoring of a specific area. By determining whether the current position of a person is within the defined polygonal area, the behavior within the area can be detected and managed more accurately. Alarm information is generated only when a person enters a set area, avoiding unnecessary alarms. This targeted alarm reduces false alarms and noise, and improves the practicality and reliability of the system. JSON alarm information is sent through the WebSocket protocol, providing real-time, two-way data transmission. This method ensures the immediate communication and processing of alarm information and improves the response speed of the system. Creating and transmitting alarm information in JSON format maintains the standardization and consistency of data, so that alarm data can be easily parsed and processed.
[0132] Implementation method 6: This implementation method further limits the method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology described in implementation method 5. The method of determining whether a point is within a polygon includes:
[0133] Determine whether the personnel point is located at the vertex of the polygon. If the point is located at the vertex, it is considered to be inside the polygon;
[0134] Connect the adjacent vertices of the polygon. If the personnel point is on the connecting line, it is considered that the point is inside the polygon.
[0135] Draw a ray in any direction from the personnel point. If the number of intersection points is odd, the point is considered to be inside the polygon; if the number of intersection points is even, the point is considered to be outside the polygon.
[0136] Specifically, first check whether the person's position is exactly at the vertex of the polygon. If so, the point is inside the polygon. Boundary judgment: Check whether the person's position is on the boundary line of the polygon. If so, the point is considered to be inside the polygon.
[0137] Starting from the person's position, emit a ray in any direction and calculate the number of intersections between the ray and the polygon boundary segment. If the number of intersections is an odd number, the person's position is inside the polygon; if it is an even number, the person's position is outside the polygon.
[0138] Implementation method 7: See Figure 3 This embodiment further defines the method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology as described in the first embodiment, and the method further includes:
[0139] Record alarm video on mobile terminal;
[0140] Record the location information of the mobile terminal, including longitude, latitude and the primary key of the person;
[0141] The mobile terminal sends the alarm data to the server in the form of a form, and the personnel primary key is passed through the request header; the attributes of the form are as follows:
[0142] longitude: alarm longitude, latitude: alarm latitude, file: alarm video;
[0143] The server receives the form data, parses the longitude, latitude, video file and personnel primary key; packages the alarm information into JSON format, and forwards it to the immediate and superior administrators in real time through the WebSocket protocol;
[0144] The JSON format is as follows:
[0145] {"Command":40000,
[0146] position:[{"longitude":125.145769,"latitude":46.559629,"speed":0.47,"azimuth":207.52,
[0147] "name":zns,"userId":0}...]}
[0148] Command: Command code 40000 is the real-time location of the mobile terminal, position: the real-time location set of the mobile terminal,
[0149] longitude: longitude, latitude: latitude, speed: speed, azimuth: direction, name: name of the mobile terminal holder, userId: primary key of the mobile terminal holder.
[0150] The server stores the alarm information in the database for easy viewing of historical data.
[0151] In actual applications, the alarm upload and forwarding administrator also includes:
[0152] Step 1: Record the alarm video and describe the alarm event in words;
[0153] Step 2: Record the alarm location and the primary key of the alarm person;
[0154] Step 3: Determine whether the administrator is online;
[0155] Step 4: If offline, the message will be displayed indicating that the forwarding failed.
[0156] Step 5: If online, forward it to the administrator at the same level and the upper level;
[0157] Step 6: Record the alarm time and store the alarm information in the database.
[0158] Embodiment 8: This embodiment describes a mobile terminal positioning and alarm system for a factory area based on modern communication and geographic information technology, the system comprising:
[0159] Information entry unit, used to enter the attributes and department information of operators, and set up electronic fences for entry and exit;
[0160] A location information acquisition unit, used to load the real-time location information of the mobile terminal of the on-site personnel into a container and store it in a database;
[0161] A location determination unit, used to determine the current location of a person based on real-time location information;
[0162] The out-of-bounds alarm unit is used to remind the person that he / she has left the specified area when he / she is outside the specified area, and to generate an alarm and forward it to the administrator at the same level and the upper level, and store the out-of-bounds alarm information in the database;
[0163] The danger alarm unit is used to prompt the name of the danger zone that a person has entered when the person is in the danger zone, and to generate an alarm and forward it to the administrator at the same level and the upper level, and store the danger alarm information in the database; set the consumer timing thread to send the location in the container to the corresponding administrator in a 5s cycle.
[0164] Embodiment 9. A computer device described in this embodiment includes a memory and a processor, wherein the memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes a method for mobile terminal positioning and alarm in a factory area based on modern communication and geographic information technology as described in any one of embodiments 1 to 7.
[0165] Implementation method ten, a computer-readable storage medium described in this implementation method, on which a computer program is stored, and when the computer program is executed by a processor, the steps of a method for mobile terminal positioning and alarming in a factory area based on modern communication and geographic information technology are executed as described in any one of implementation methods one to seven.
[0166] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0167] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure rather than to limit its protection scope. Although the present disclosure has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that after reading the present disclosure, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the invention, but these changes, modifications or equivalent substitutions are all within the protection scope of the disclosed claims to be approved.
Claims
1. A method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology, characterized in that: The method comprises: S1: Enter the attributes and department information of the operator, and set the electronic fences for entry and exit; S2: Load the real-time location information of the mobile terminal of the on-site personnel into a container and store it in a database; S3: Determine the current area of the person based on the real-time location information; S4: When a person is outside the specified area, the person is prompted to leave the specified area name, and an alarm is generated and forwarded to the administrator at the same level and the upper level, and the out-of-bounds alarm information is stored in the database; S6: When a person is in a dangerous area, the name of the dangerous area that the person has entered is prompted, and an alarm is generated and forwarded to the administrator at the same level and the upper level, and the danger alarm information is stored in the database; a consumer timing thread is set to send the location in the container to the corresponding administrator in a 5s cycle.
2. According to claim 1, a method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology is characterized in that: The step S1 comprises: Enter the attributes of the on-site workers into the platform. The attributes include: name, work number and type; Enter departments and set up hierarchical relationships; Set up administrators in each department; Access the organizational structure management module, select the person to be attached from the personnel list, assign the department to which the selected person belongs, and set the department to which the person belongs as the corresponding department primary key; Set up no-entry and no-exit electronic fences and define the fence shape. The number of vertices of the polygon should be less than 10.
3. According to claim 1, a method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology is characterized in that: The step S2 comprises: The mobile terminal uses GPS to obtain the current longitude, latitude, speed and heading data; Format the obtained location information as a JSON object; Send JSON data to the server interface via HTTP POST method; Set the person's primary key in the request header, and the server listens and receives HTTP requests; Extract the person's primary key from the request header and read the JSON data in the request body; Use a JSON parser to convert JSON data into actionable objects; Extract the longitude, latitude, speed and heading from the JSON object; Store the data information in the JSON object in the database.
4. According to claim 1, a method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology is characterized in that: The step S3 comprises: If the person's location is outside the specified area, an out-of-bounds alarm is triggered; Generate a JSON object containing longitude, latitude, and time information based on the out-of-bounds event: Establish a WebSocket connection to the WebSocket server of the management system; The generated WebSocket server will receive this alarm message and forward it to the immediate and superior administrators as needed. The JSON object is sent to the address of the management system via WebSocket.
5. According to claim 1, a method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology is characterized in that: The step S4 comprises: Get the latitude and longitude information of the person's current location, as well as the polygon vertex data of the electronic fence; Determine whether the point is within the polygon; If the point is determined to be within the polygon, an alarm message in JSON format is created; The generated JSON alarm information is sent to the direct and superior administrators via the WebSocket protocol.
6. The method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology according to claim 5 is characterized in that: The step of determining whether the point is within the polygon includes: Determine whether the personnel point is located at the vertex of the polygon. If the point is located at the vertex, it is considered to be inside the polygon; Connect the adjacent vertices of the polygon. If the personnel point is on the connecting line, it is considered that the point is inside the polygon. Draw a ray in any direction from the personnel point. If the number of intersection points is odd, the point is considered to be inside the polygon; if the number of intersection points is even, the point is considered to be outside the polygon.
7. According to claim 1, a method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology is characterized in that: The method further comprises: Record alarm video on mobile terminal; Record the location information of the mobile terminal, including longitude, latitude and the primary key of the person; The mobile terminal sends the alarm data to the server in the form of a form, and the personnel primary key is passed through the request header; The server receives the form data, parses the longitude, latitude, video file and personnel primary key; packages the alarm information into JSON format, and forwards it to the immediate and superior administrators in real time through the WebSocket protocol; The server stores the alarm information in the database.
8. A mobile terminal positioning and alarm system for factory areas based on modern communication and geographic information technology, characterized in that: The system comprises: Information entry unit, used to enter the attributes and department information of operators, and set up electronic fences for entry and exit; A location information acquisition unit, used to load the real-time location information of the mobile terminal of the on-site personnel into a container and store it in a database; A location determination unit, used to determine the current location of a person based on real-time location information; The out-of-bounds alarm unit is used to remind the person that he / she has left the specified area when he / she is outside the specified area, and to generate an alarm and forward it to the administrator at the same level and the upper level, and store the out-of-bounds alarm information in the database; The danger alarm unit is used to prompt the name of the danger zone that a person has entered when the person is in the danger zone, and to generate an alarm and forward it to the administrator at the same level and the upper level, and store the danger alarm information in the database; set the consumer timing thread to send the location in the container to the corresponding administrator in a 5s cycle.
9. A computer device, characterized in that: It includes a memory and a processor, wherein a computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes a method for positioning and alarming a mobile terminal in a factory based on modern communication and geographic information technology according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of a method for positioning and alarming a mobile terminal in a factory area based on modern communication and geographic information technology as described in any one of claims 1 to 7.